[
  {
    "path": ".gitattributes",
    "content": "###############################################################################\n# Set default behavior to automatically normalize line endings.\n###############################################################################\n* text=auto\n\n###############################################################################\n# Set default behavior for command prompt diff.\n#\n# This is need for earlier builds of msysgit that does not have it on by\n# default for csharp files.\n# Note: This is only used by command line\n###############################################################################\n#*.cs     diff=csharp\n\n###############################################################################\n# Set the merge driver for project and solution files\n#\n# Merging from the command prompt will add diff markers to the files if there\n# are conflicts (Merging from VS is not affected by the settings below, in VS\n# the diff markers are never inserted). Diff markers may cause the following \n# file extensions to fail to load in VS. An alternative would be to treat\n# these files as binary and thus will always conflict and require user\n# intervention with every merge. To do so, just uncomment the entries below\n###############################################################################\n#*.sln       merge=binary\n#*.csproj    merge=binary\n#*.vbproj    merge=binary\n#*.vcxproj   merge=binary\n#*.vcproj    merge=binary\n#*.dbproj    merge=binary\n#*.fsproj    merge=binary\n#*.lsproj    merge=binary\n#*.wixproj   merge=binary\n#*.modelproj merge=binary\n#*.sqlproj   merge=binary\n#*.wwaproj   merge=binary\n\n###############################################################################\n# behavior for image files\n#\n# image files are treated as binary by default.\n###############################################################################\n#*.jpg   binary\n#*.png   binary\n#*.gif   binary\n\n###############################################################################\n# diff behavior for common document formats\n# \n# Convert binary document formats to text before diffing them. This feature\n# is only available from the command line. Turn it on by uncommenting the \n# entries below.\n###############################################################################\n#*.doc   diff=astextplain\n#*.DOC   diff=astextplain\n#*.docx  diff=astextplain\n#*.DOCX  diff=astextplain\n#*.dot   diff=astextplain\n#*.DOT   diff=astextplain\n#*.pdf   diff=astextplain\n#*.PDF   diff=astextplain\n#*.rtf   diff=astextplain\n#*.RTF   diff=astextplain\n"
  },
  {
    "path": ".gitignore",
    "content": "## Ignore Visual Studio temporary files, build results, and\n## files generated by popular Visual Studio add-ons.\n\n# User-specific files\n*.suo\n*.user\n*.sln.docstates\n\n# Build results\n[Dd]ebug/\n[Dd]ebugPublic/\n[Rr]elease/\n[Rr]eleases/\nx64/\nx86/\nbuild/\nbld/\n[Bb]in/\n[Oo]bj/\n\n# Roslyn cache directories\n*.ide/\n\n# MSTest test Results\n[Tt]est[Rr]esult*/\n[Bb]uild[Ll]og.*\n\n#NUNIT\n*.VisualState.xml\nTestResult.xml\n\n# Build Results of an ATL Project\n[Dd]ebugPS/\n[Rr]eleasePS/\ndlldata.c\n\n*_i.c\n*_p.c\n*_i.h\n*.ilk\n*.meta\n*.obj\n*.pch\n*.pdb\n*.pgc\n*.pgd\n*.rsp\n*.sbr\n*.tlb\n*.tli\n*.tlh\n*.tmp\n*.tmp_proj\n*.log\n*.vspscc\n*.vssscc\n.builds\n*.pidb\n*.svclog\n*.scc\n\n# Chutzpah Test files\n_Chutzpah*\n\n# Visual C++ cache files\nipch/\n*.aps\n*.ncb\n*.opensdf\n*.sdf\n*.cachefile\n\n# Visual Studio profiler\n*.psess\n*.vsp\n*.vspx\n\n# TFS 2012 Local Workspace\n$tf/\n\n# Guidance Automation Toolkit\n*.gpState\n\n# ReSharper is a .NET coding add-in\n_ReSharper*/\n*.[Rr]e[Ss]harper\n*.DotSettings.user\n\n# JustCode is a .NET coding addin-in\n.JustCode\n\n# TeamCity is a build add-in\n_TeamCity*\n\n# DotCover is a Code Coverage Tool\n*.dotCover\n\n# NCrunch\n_NCrunch_*\n.*crunch*.local.xml\n\n# MightyMoose\n*.mm.*\nAutoTest.Net/\n\n# Web workbench (sass)\n.sass-cache/\n\n# Installshield output folder\n[Ee]xpress/\n\n# DocProject is a documentation generator add-in\nDocProject/buildhelp/\nDocProject/Help/*.HxT\nDocProject/Help/*.HxC\nDocProject/Help/*.hhc\nDocProject/Help/*.hhk\nDocProject/Help/*.hhp\nDocProject/Help/Html2\nDocProject/Help/html\n\n# Click-Once directory\npublish/\n\n# Publish Web Output\n*.[Pp]ublish.xml\n*.azurePubxml\n# TODO: Comment the next line if you want to checkin your web deploy settings \n# but database connection strings (with potential passwords) will be unencrypted\n*.pubxml\n*.publishproj\n\n# NuGet Packages\n*.nupkg\n# The packages folder can be ignored because of Package Restore\n**/packages/*\n# except build/, which is used as an MSBuild target.\n!**/packages/build/\n# If using the old MSBuild-Integrated Package Restore, uncomment this:\n#!**/packages/repositories.config\n\n# Windows Azure Build Output\ncsx/\n*.build.csdef\n\n# Windows Store app package directory\nAppPackages/\n\n# Others\nsql/\n*.Cache\nClientBin/\n[Ss]tyle[Cc]op.*\n~$*\n*~\n*.dbmdl\n*.dbproj.schemaview\n*.pfx\n*.publishsettings\nnode_modules/\n\n# RIA/Silverlight projects\nGenerated_Code/\n\n# Backup & report files from converting an old project file\n# to a newer Visual Studio version. Backup files are not needed,\n# because we have git ;-)\n_UpgradeReport_Files/\nBackup*/\nUpgradeLog*.XML\nUpgradeLog*.htm\n\n# SQL Server files\n*.mdf\n*.ldf\n\n# Business Intelligence projects\n*.rdl.data\n*.bim.layout\n*.bim_*.settings\n\n# Microsoft Fakes\nFakesAssemblies/\n"
  },
  {
    "path": "05 - Domain Model Implementation Patterns/PPPDDDChap05.DomainModel/PPPDDDChap05.DomainModel/Application/BidOnAuctionService.cs",
    "content": "﻿using System;\nusing PPPDDDChap05.DomainModel.Model;\n\nnamespace PPPPDDDChap05.DomainModel.Application\n{\n    public class BidOnAuctionService\n    {\n        private IAuctionRepository _auctions;\n\n        public BidOnAuctionService(IAuctionRepository auctions)\n        {\n            _auctions = auctions;\n\n        }\n\n        public void Bid(Guid auctionId, Guid memberId, decimal amount, DateTime dateOfBid)\n        {                                                        \n            var auction = _auctions.FindBy(auctionId);\n\n            var bidAmount = new Money(amount);\n\n            var offer = new Bid(memberId, bidAmount, dateOfBid);\n\n            auction.PlaceBidFor(offer, dateOfBid);                                \n         }                      \n    }\n}"
  },
  {
    "path": "05 - Domain Model Implementation Patterns/PPPDDDChap05.DomainModel/PPPDDDChap05.DomainModel/Model/Auction.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\n\nnamespace PPPDDDChap05.DomainModel.Model\n{\npublic class Auction \n{\n    private Auction() { }\n\n    public Auction(Guid id, Guid listingId, Money startingPrice, DateTime endsAt)\n    {\n        if (id == Guid.Empty)\n            throw new ArgumentNullException(\"Auction Id cannot be null\");\n\n        if (startingPrice == null)\n            throw new ArgumentNullException(\"Starting Price cannot be null\");\n\n        if (endsAt == DateTime.MinValue)\n            throw new ArgumentNullException(\"EndsAt must have a value\");\n\n        if (listingId == Guid.Empty)\n            throw new ArgumentNullException(\"Lisitng Id cannot be null\");\n            \n        Id = id;\n        ListingId = listingId;\n        StartingPrice = startingPrice;\n        EndsAt = endsAt;            \n    }\n\n    private Guid Id { get; set; }\n    private IList<HistoricalBid> Bids { get; set; }         \n    private Guid ListingId { get; set; }\n    private DateTime EndsAt { get; set; }       \n    private Money StartingPrice { get; set; }\n    private WinningBid WinningBid { get; set; }\n    private bool HasEnded { get; set; }\n       \n    private bool StillInProgress(DateTime currentTime)\n    {\n        return (EndsAt > currentTime);             \n    }\n\n    public bool CanPlaceBid()\n    { \n        return HasEnded == false;        \n    }\n\n    public void PlaceBidFor(Bid bid, DateTime currentTime)\n    {\n        if (StillInProgress(currentTime))\n        {\n            if (IsFirstBid())\n                RegisterFirst(bid);\n            else if (BidderIsIncreasingMaximumBid(bid))\n                WinningBid = WinningBid.RaiseMaximumBidTo(bid.MaximumBid);\n            else if (WinningBid.CanMeetOrExceedBidIncrement(bid.MaximumBid))\n            {\n                Place(WinningBid.DetermineWinningBidIncrement(bid));\n            }                                                   \n        }     \n    }\n\n    private bool BidderIsIncreasingMaximumBid(Bid bid)\n    {\n        return WinningBid.WasMadeBy(bid.Bidder) && bid.MaximumBid.IsGreaterThan(WinningBid.MaximumBid);\n    }\n\n    private bool IsFirstBid()\n    {\n        return WinningBid == null;\n    }\n\n    private void RegisterFirst(Bid bid)\n    {\n        if (IsFirstBid() && bid.MaximumBid.IsGreaterThanOrEqualTo(StartingPrice)) \n            Place(new WinningBid(bid.Bidder, bid.MaximumBid, StartingPrice, bid.TimeOfOffer));            \n    }\n\n    private void Place(WinningBid newBid)\n    {\n        Bids.Add(new HistoricalBid(newBid.Bidder, newBid.MaximumBid, newBid.TimeOfBid));\n        WinningBid = newBid;            \n    }\n}\n}\n"
  },
  {
    "path": "05 - Domain Model Implementation Patterns/PPPDDDChap05.DomainModel/PPPDDDChap05.DomainModel/Model/Bid.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\n\nnamespace PPPDDDChap05.DomainModel.Model\n{\n    public class Bid \n    {\n        public Bid(Guid bidderId, Money maximumBid, DateTime timeOfOffer)\n        {\n            if (bidderId == Guid.Empty)\n                throw new ArgumentNullException(\"BidderId cannot be null\");\n\n            if (maximumBid == null)\n                throw new ArgumentNullException(\"MaximumBid cannot be null\");\n\n            if (timeOfOffer == DateTime.MinValue)\n                throw new ArgumentNullException(\"Time of Offer must have a value\");\n\n            Bidder = bidderId;\n            MaximumBid = maximumBid;\n            TimeOfOffer = timeOfOffer;\n        }\n\n        public Guid Bidder { get; private set; }\n        public Money MaximumBid { get; private set; }\n        public DateTime TimeOfOffer { get; private set; }\n    }   \n}\n"
  },
  {
    "path": "05 - Domain Model Implementation Patterns/PPPDDDChap05.DomainModel/PPPDDDChap05.DomainModel/Model/ClassDiagram.cd",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<ClassDiagram MajorVersion=\"1\" MinorVersion=\"1\">\n  <Class Name=\"PPPDDDChap05.DomainModel.Model.Auction\">\n    <Position X=\"0.5\" Y=\"0.5\" Width=\"2.75\" />\n    <Members>\n      <Method Name=\"BidderIsIncreasingMaximumBid\" Hidden=\"true\" />\n      <Method Name=\"FirstOffer\" Hidden=\"true\" />\n      <Method Name=\"Place\" Hidden=\"true\" />\n      <Method Name=\"PlaceABidForTheFirst\" Hidden=\"true\" />\n      <Method Name=\"StillInProgress\" Hidden=\"true\" />\n    </Members>\n    <AssociationLine Name=\"StartingPrice\" Type=\"PPPDDDChap05.DomainModel.Model.Money\">\n      <MemberNameLabel ManuallyPlaced=\"true\" ManuallySized=\"true\">\n        <Position X=\"0.568\" Y=\"0.268\" Height=\"0.182\" Width=\"1.403\" />\n      </MemberNameLabel>\n    </AssociationLine>\n    <TypeIdentifier>\n      <HashCode>AAACAABAEQgABAAAAAAABAAAACgAAAAABGCAAABAAAA=</HashCode>\n      <FileName>Model\\Auction.cs</FileName>\n    </TypeIdentifier>\n    <ShowAsAssociation>\n      <Property Name=\"StartingPrice\" />\n      <Property Name=\"WinningBid\" />\n    </ShowAsAssociation>\n    <ShowAsCollectionAssociation>\n      <Property Name=\"Bids\" />\n    </ShowAsCollectionAssociation>\n  </Class>\n  <Class Name=\"PPPDDDChap05.DomainModel.Model.Money\">\n    <Position X=\"4.5\" Y=\"4.25\" Width=\"2.25\" />\n    <Members>\n      <Method Name=\"ThrowExceptionIfNotValid\" Hidden=\"true\" />\n    </Members>\n    <TypeIdentifier>\n      <HashCode>AAIAAAAAAAAAAAAEAAAAgAAAAAQAAAAAAACoAAAAAAA=</HashCode>\n      <FileName>Model\\Money.cs</FileName>\n    </TypeIdentifier>\n  </Class>\n  <Class Name=\"PPPDDDChap05.DomainModel.Model.Bid\">\n    <Position X=\"0.5\" Y=\"4.5\" Width=\"1.75\" />\n    <TypeIdentifier>\n      <HashCode>AAAAAAAAAQAAAAAAAAAAAAIAAAAAgAAAAAAAAAAAAAA=</HashCode>\n      <FileName>Model\\Bid.cs</FileName>\n    </TypeIdentifier>\n    <ShowAsAssociation>\n      <Property Name=\"MaximumBid\" />\n    </ShowAsAssociation>\n  </Class>\n  <Class Name=\"PPPDDDChap05.DomainModel.Model.Price\">\n    <Position X=\"8.5\" Y=\"0.5\" Width=\"1.75\" />\n    <AssociationLine Name=\"Amount\" Type=\"PPPDDDChap05.DomainModel.Model.Money\">\n      <MemberNameLabel ManuallyPlaced=\"true\">\n        <Position X=\"0.81\" Y=\"0.127\" />\n      </MemberNameLabel>\n    </AssociationLine>\n    <TypeIdentifier>\n      <HashCode>AAAABAAAAAAAAAAAAAAAAACAAgAAAAAAAAAAAAAAAAA=</HashCode>\n      <FileName>Model\\Price.cs</FileName>\n    </TypeIdentifier>\n    <ShowAsAssociation>\n      <Property Name=\"Amount\" />\n    </ShowAsAssociation>\n  </Class>\n  <Class Name=\"PPPDDDChap05.DomainModel.Model.WinningBid\">\n    <Position X=\"4.5\" Y=\"0.5\" Width=\"2.25\" />\n    <Members>\n      <Method Name=\"CreateNewBid\" Hidden=\"true\" />\n      <Method Name=\"DetermineWinnerFromProxyBidding\" Hidden=\"true\" />\n      <Method Name=\"MaxBidCanBeExceededBy\" Hidden=\"true\" />\n    </Members>\n    <AssociationLine Name=\"MaximumBid\" Type=\"PPPDDDChap05.DomainModel.Model.Money\">\n      <MemberNameLabel ManuallyPlaced=\"true\" ManuallySized=\"true\">\n        <Position X=\"-2.065\" Y=\"0.077\" Height=\"0.182\" Width=\"1.862\" />\n      </MemberNameLabel>\n    </AssociationLine>\n    <AssociationLine Name=\"CurrentAuctionPrice\" Type=\"PPPDDDChap05.DomainModel.Model.Price\">\n      <MemberNameLabel ManuallyPlaced=\"true\" ManuallySized=\"true\">\n        <Position X=\"0.152\" Y=\"0.135\" Height=\"0.182\" Width=\"1.477\" />\n      </MemberNameLabel>\n    </AssociationLine>\n    <TypeIdentifier>\n      <HashCode>BAAIAAAAAQAAAgAhAAAAIAIAAgAAAAUAAAAAAAAEBAA=</HashCode>\n      <FileName>Model\\WinningBid.cs</FileName>\n    </TypeIdentifier>\n    <ShowAsAssociation>\n      <Property Name=\"MaximumBid\" />\n      <Property Name=\"CurrentAuctionPrice\" />\n    </ShowAsAssociation>\n  </Class>\n  <Class Name=\"PPPDDDChap05.DomainModel.Model.HistoricalBid\" Collapsed=\"true\">\n    <Position X=\"0.5\" Y=\"3.5\" Width=\"1.75\" />\n    <TypeIdentifier>\n      <HashCode>AAAAAAAAAQAAAAABAAAAAACAAAAAAAAAAAAAAAAAAAA=</HashCode>\n      <FileName>Model\\HistoricalBid.cs</FileName>\n    </TypeIdentifier>\n  </Class>\n  <Font Name=\"Segoe UI\" Size=\"9\" />\n</ClassDiagram>"
  },
  {
    "path": "05 - Domain Model Implementation Patterns/PPPDDDChap05.DomainModel/PPPDDDChap05.DomainModel/Model/HistoricalBid.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace PPPDDDChap05.DomainModel.Model\n{\n    public class HistoricalBid\n    {\n        public HistoricalBid(Guid bidder, Money Bid, DateTime timeOfBid)\n        { \n        \n        }\n\n\n        public Guid Bidder {get; set;} \n        public Money Amount {get; set;}\n        public DateTime TimeOfBid { get; set; }\n    }\n}\n"
  },
  {
    "path": "05 - Domain Model Implementation Patterns/PPPDDDChap05.DomainModel/PPPDDDChap05.DomainModel/Model/IAuctionRepository.cs",
    "content": "﻿using System;\n\nnamespace PPPDDDChap05.DomainModel.Model\n{\n    public interface IAuctionRepository\n    {\n        void Add(Auction item);\n        Auction FindBy(Guid Id);\n    }\n}\n"
  },
  {
    "path": "05 - Domain Model Implementation Patterns/PPPDDDChap05.DomainModel/PPPDDDChap05.DomainModel/Model/Money.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\n\nnamespace PPPDDDChap05.DomainModel.Model\n{\n    public class Money \n    {\n        protected decimal Value { get; set; }\n\n        public Money()\n            : this(0m)\n        {\n        }\n\n        public Money(decimal value)\n        {\n            ThrowExceptionIfNotValid(value);\n\n            Value = value;\n        }\n\n        private void ThrowExceptionIfNotValid(decimal value)\n        {\n            if (value % 0.01m != 0)\n                throw new InvalidOperationException(\"There cannot be more than two decimal places.\"); \n\n            if(value < 0)\n                throw new InvalidOperationException(\"Money cannot be a negative value.\");\n        }\n\n        public Money Add(Money money)\n        {\n            return new Money(Value + money.Value);\n        }\n\n        public bool IsGreaterThan(Money money)\n        {\n            return this.Value > money.Value;\n        }\n\n        public bool IsGreaterThanOrEqualTo(Money money)\n        {\n            return this.Value > money.Value || this.Equals(money);\n        }\n\n        public bool IsLessThanOrEqualTo(Money money)\n        {\n            return this.Value < money.Value || this.Equals(money);\n        }\n\n        public override string ToString()\n        {\n            return string.Format(\"{0}\", Value);\n        }\n    }\n}\n"
  },
  {
    "path": "05 - Domain Model Implementation Patterns/PPPDDDChap05.DomainModel/PPPDDDChap05.DomainModel/Model/Price.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\n\nnamespace PPPDDDChap05.DomainModel.Model\n{\n    public class Price \n    {\n        private Price()\n        { }\n\n        public Price(Money amount)\n        {\n            if (amount == null)\n                throw new ArgumentNullException(\"Amount cannot be null\");\n\n            Amount = amount;\n        }\n\n        public Money Amount { get; private set; }\n\n        public Money BidIncrement()\n        {\n            if (Amount.IsGreaterThanOrEqualTo(new Money(0.01m)) && Amount.IsLessThanOrEqualTo(new Money(0.99m)))\n                    return Amount.Add(new Money(0.05m));\n\n            if (Amount.IsGreaterThanOrEqualTo(new Money(1.00m)) && Amount.IsLessThanOrEqualTo(new Money(4.99m)))\n                    return Amount.Add(new Money(0.20m));\n                \n            if (Amount.IsGreaterThanOrEqualTo(new Money(5.00m)) && Amount.IsLessThanOrEqualTo(new Money(14.99m)))\n                    return Amount.Add(new Money(0.50m));\n\n            return Amount.Add(new Money(1.00m));\n            \n        }\n\n        public bool CanBeExceededBy(Money offer)\n        {\n            return offer.IsGreaterThanOrEqualTo(BidIncrement());\n        }\n    }\n}\n"
  },
  {
    "path": "05 - Domain Model Implementation Patterns/PPPDDDChap05.DomainModel/PPPDDDChap05.DomainModel/Model/WinningBid.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nnamespace PPPDDDChap05.DomainModel.Model\n{\n    public class WinningBid \n    {\n        private WinningBid() { }\n\n        public WinningBid(Guid bidder, Money maximumBid, Money bid, DateTime timeOfBid)\n        {\n            if (bidder == Guid.Empty)\n                throw new ArgumentNullException(\"Bidder cannot be null\");\n\n            if (maximumBid == null)\n                throw new ArgumentNullException(\"MaximumBid cannot be null\");\n\n            if (timeOfBid == DateTime.MinValue)\n                throw new ArgumentNullException(\"TimeOfBid must have a value\");\n\n\n            Bidder = bidder;\n            MaximumBid = maximumBid;\n            TimeOfBid = timeOfBid;\n            CurrentAuctionPrice = new Price(bid);\n        }\n        \n        public Guid AuctionId { get; private set; }\n        public Guid Bidder { get; private set; }\n        public Money MaximumBid { get; private set; }\n        public DateTime TimeOfBid { get; private set; }\n        public Price CurrentAuctionPrice { get; private set; }\n\n        public WinningBid RaiseMaximumBidTo(Money newAmount)\n        {\n            if (newAmount.IsGreaterThan(MaximumBid))\n                return new WinningBid(Bidder, newAmount, CurrentAuctionPrice.Amount, DateTime.Now);\n            else\n                throw new ApplicationException(\"Maximum bid increase must be larger than current maximum bid.\");\n        }\n\n        public bool WasMadeBy(Guid bidder)\n        {\n            return Bidder.Equals(bidder);\n        }\n\n        public WinningBid DetermineWinningBidIncrement(Bid newbid)\n        {\n            if (this.CanMeetOrExceedBidIncrement(this.MaximumBid) && this.CanMeetOrExceedBidIncrement(newbid.MaximumBid))\n            {\n                return DetermineWinnerFromProxyBidding(this, newbid);\n            }\n            else if (this.CanMeetOrExceedBidIncrement(newbid.MaximumBid))\n            {\n                return CreateNewBid(newbid.Bidder, CurrentAuctionPrice.BidIncrement(), newbid.MaximumBid, newbid.TimeOfOffer);\n            }\n            else\n                return this;\n        }\n\n        private WinningBid DetermineWinnerFromProxyBidding(WinningBid winningBid, Bid newbid)\n        {\n            WinningBid nextIncrement;\n\n            if (winningBid.MaxBidCanBeExceededBy(newbid.MaximumBid))\n            {\n                nextIncrement = CreateNewBid(this.Bidder, this.MaximumBid, this.MaximumBid, this.TimeOfBid);\n\n                if (nextIncrement.CanMeetOrExceedBidIncrement(newbid.MaximumBid))\n                    return CreateNewBid(newbid.Bidder, nextIncrement.CurrentAuctionPrice.BidIncrement(), newbid.MaximumBid, newbid.TimeOfOffer);\n                else\n                    return CreateNewBid(newbid.Bidder, newbid.MaximumBid, newbid.MaximumBid, newbid.TimeOfOffer);\n            }\n            else\n            {\n                nextIncrement = CreateNewBid(newbid.Bidder, newbid.MaximumBid, newbid.MaximumBid, newbid.TimeOfOffer);\n\n                if (nextIncrement.CanMeetOrExceedBidIncrement(winningBid.MaximumBid))\n                    return CreateNewBid(winningBid.Bidder, nextIncrement.CurrentAuctionPrice.BidIncrement(), winningBid.MaximumBid, winningBid.TimeOfBid);\n                else\n                    return CreateNewBid(winningBid.Bidder, winningBid.MaximumBid, winningBid.MaximumBid, winningBid.TimeOfBid);\n            }\n        }\n\n        private WinningBid CreateNewBid(Guid bidder, Money bid, Money maxBid, DateTime timeOfBid)\n        {          \n            return new WinningBid(bidder, bid, maxBid, timeOfBid);\n        }\n\n        private bool MaxBidCanBeExceededBy(Money bid)\n        {\n            return !this.MaximumBid.IsGreaterThanOrEqualTo(bid);\n        }\n\n        public bool CanMeetOrExceedBidIncrement(Money offer)\n        {\n            return CurrentAuctionPrice.CanBeExceededBy(offer);\n        }\n\n        public bool HasNotReachedMaximumBid()\n        {\n            return MaximumBid.IsGreaterThan(CurrentAuctionPrice.Amount);\n        }\n    }\n}\n"
  },
  {
    "path": "05 - Domain Model Implementation Patterns/PPPDDDChap05.DomainModel/PPPDDDChap05.DomainModel/PPPDDDChap05.DomainModel.csproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"4.0\" DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <Import Project=\"$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props\" Condition=\"Exists('$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props')\" />\n  <PropertyGroup>\n    <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>\n    <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>\n    <ProjectGuid>{0E353285-2A32-46DB-88E3-6832FDA9FF68}</ProjectGuid>\n    <OutputType>Library</OutputType>\n    <AppDesignerFolder>Properties</AppDesignerFolder>\n    <RootNamespace>PPPDDDChap05.DomainModel</RootNamespace>\n    <AssemblyName>PPPDDDChap05.DomainModel</AssemblyName>\n    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\n    <FileAlignment>512</FileAlignment>\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' \">\n    <DebugSymbols>true</DebugSymbols>\n    <DebugType>full</DebugType>\n    <Optimize>false</Optimize>\n    <OutputPath>bin\\Debug\\</OutputPath>\n    <DefineConstants>DEBUG;TRACE</DefineConstants>\n    <ErrorReport>prompt</ErrorReport>\n    <WarningLevel>4</WarningLevel>\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' \">\n    <DebugType>pdbonly</DebugType>\n    <Optimize>true</Optimize>\n    <OutputPath>bin\\Release\\</OutputPath>\n    <DefineConstants>TRACE</DefineConstants>\n    <ErrorReport>prompt</ErrorReport>\n    <WarningLevel>4</WarningLevel>\n  </PropertyGroup>\n  <ItemGroup>\n    <Reference Include=\"System\" />\n    <Reference Include=\"System.Core\" />\n    <Reference Include=\"System.Xml.Linq\" />\n    <Reference Include=\"System.Data.DataSetExtensions\" />\n    <Reference Include=\"Microsoft.CSharp\" />\n    <Reference Include=\"System.Data\" />\n    <Reference Include=\"System.Xml\" />\n  </ItemGroup>\n  <ItemGroup>\n    <Compile Include=\"Application\\BidOnAuctionService.cs\" />\n    <Compile Include=\"Model\\Auction.cs\" />\n    <Compile Include=\"Model\\HistoricalBid.cs\" />\n    <Compile Include=\"Model\\IAuctionRepository.cs\" />\n    <Compile Include=\"Model\\Money.cs\" />\n    <Compile Include=\"Model\\Bid.cs\" />\n    <Compile Include=\"Model\\Price.cs\" />\n    <Compile Include=\"Model\\WinningBid.cs\" />\n    <Compile Include=\"Properties\\AssemblyInfo.cs\" />\n  </ItemGroup>\n  <ItemGroup>\n    <None Include=\"Model\\ClassDiagram.cd\" />\n  </ItemGroup>\n  <Import Project=\"$(MSBuildToolsPath)\\Microsoft.CSharp.targets\" />\n  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \n       Other similar extension points exist, see Microsoft.Common.targets.\n  <Target Name=\"BeforeBuild\">\n  </Target>\n  <Target Name=\"AfterBuild\">\n  </Target>\n  -->\n</Project>"
  },
  {
    "path": "05 - Domain Model Implementation Patterns/PPPDDDChap05.DomainModel/PPPDDDChap05.DomainModel/Properties/AssemblyInfo.cs",
    "content": "﻿using System.Reflection;\nusing System.Runtime.CompilerServices;\nusing System.Runtime.InteropServices;\n\n// General Information about an assembly is controlled through the following \n// set of attributes. Change these attribute values to modify the information\n// associated with an assembly.\n[assembly: AssemblyTitle(\"PPPDDDChap05.DomainModel\")]\n[assembly: AssemblyDescription(\"\")]\n[assembly: AssemblyConfiguration(\"\")]\n[assembly: AssemblyCompany(\"\")]\n[assembly: AssemblyProduct(\"PPPDDDChap05.DomainModel\")]\n[assembly: AssemblyCopyright(\"Copyright ©  2014\")]\n[assembly: AssemblyTrademark(\"\")]\n[assembly: AssemblyCulture(\"\")]\n\n// Setting ComVisible to false makes the types in this assembly not visible \n// to COM components.  If you need to access a type in this assembly from \n// COM, set the ComVisible attribute to true on that type.\n[assembly: ComVisible(false)]\n\n// The following GUID is for the ID of the typelib if this project is exposed to COM\n[assembly: Guid(\"1caf44dd-f726-4107-aa0a-c13fc290c560\")]\n\n// Version information for an assembly consists of the following four values:\n//\n//      Major Version\n//      Minor Version \n//      Build Number\n//      Revision\n//\n// You can specify all the values or you can default the Build and Revision Numbers \n// by using the '*' as shown below:\n// [assembly: AssemblyVersion(\"1.0.*\")]\n[assembly: AssemblyVersion(\"1.0.0.0\")]\n[assembly: AssemblyFileVersion(\"1.0.0.0\")]\n"
  },
  {
    "path": "05 - Domain Model Implementation Patterns/PPPDDDChap05.DomainModel/PPPDDDChap05.DomainModel.sln",
    "content": "﻿\nMicrosoft Visual Studio Solution File, Format Version 12.00\n# Visual Studio 2012\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"PPPDDDChap05.DomainModel\", \"PPPDDDChap05.DomainModel\\PPPDDDChap05.DomainModel.csproj\", \"{0E353285-2A32-46DB-88E3-6832FDA9FF68}\"\nEndProject\nGlobal\n\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\n\t\tDebug|Any CPU = Debug|Any CPU\n\t\tRelease|Any CPU = Release|Any CPU\n\tEndGlobalSection\n\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\n\t\t{0E353285-2A32-46DB-88E3-6832FDA9FF68}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{0E353285-2A32-46DB-88E3-6832FDA9FF68}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{0E353285-2A32-46DB-88E3-6832FDA9FF68}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{0E353285-2A32-46DB-88E3-6832FDA9FF68}.Release|Any CPU.Build.0 = Release|Any CPU\n\tEndGlobalSection\n\tGlobalSection(SolutionProperties) = preSolution\n\t\tHideSolutionNode = FALSE\n\tEndGlobalSection\nEndGlobal\n"
  },
  {
    "path": "05 - Domain Model Implementation Patterns/PPPDDDChap05.TableModule/PPPDDDChap05.TableModule/Domain/Customers.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace PPPDDDChap05.TableModule.Domain\n{\n    public class Customers\n    {\n    }\n}\n"
  },
  {
    "path": "05 - Domain Model Implementation Patterns/PPPDDDChap05.TableModule/PPPDDDChap05.TableModule/Domain/Orders.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\nusing System.Data;\n\nnamespace PPPDDDChap05.TableModule.Domain\n{\n    public class Orders\n    {\n\n        public Orders(DataSet dataSet)\n        { \n            \n        }\n    }\n}\n"
  },
  {
    "path": "05 - Domain Model Implementation Patterns/PPPDDDChap05.TableModule/PPPDDDChap05.TableModule/Domain/TableModuleBase.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace PPPDDDChap05.TableModule.Domain\n{\n    public class TableModuleBase\n    {\n    }\n}\n"
  },
  {
    "path": "05 - Domain Model Implementation Patterns/PPPDDDChap05.TableModule/PPPDDDChap05.TableModule/PPPDDDChap05.TableModule.csproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"4.0\" DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <Import Project=\"$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props\" Condition=\"Exists('$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props')\" />\n  <PropertyGroup>\n    <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>\n    <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>\n    <ProjectGuid>{F9520565-61E6-438C-9452-97F1F0C298D3}</ProjectGuid>\n    <OutputType>Library</OutputType>\n    <AppDesignerFolder>Properties</AppDesignerFolder>\n    <RootNamespace>PPPDDDChap05.TableModule</RootNamespace>\n    <AssemblyName>PPPDDDChap05.TableModule</AssemblyName>\n    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\n    <FileAlignment>512</FileAlignment>\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' \">\n    <DebugSymbols>true</DebugSymbols>\n    <DebugType>full</DebugType>\n    <Optimize>false</Optimize>\n    <OutputPath>bin\\Debug\\</OutputPath>\n    <DefineConstants>DEBUG;TRACE</DefineConstants>\n    <ErrorReport>prompt</ErrorReport>\n    <WarningLevel>4</WarningLevel>\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' \">\n    <DebugType>pdbonly</DebugType>\n    <Optimize>true</Optimize>\n    <OutputPath>bin\\Release\\</OutputPath>\n    <DefineConstants>TRACE</DefineConstants>\n    <ErrorReport>prompt</ErrorReport>\n    <WarningLevel>4</WarningLevel>\n  </PropertyGroup>\n  <ItemGroup>\n    <Reference Include=\"System\" />\n    <Reference Include=\"System.Core\" />\n    <Reference Include=\"System.Xml.Linq\" />\n    <Reference Include=\"System.Data.DataSetExtensions\" />\n    <Reference Include=\"Microsoft.CSharp\" />\n    <Reference Include=\"System.Data\" />\n    <Reference Include=\"System.Xml\" />\n  </ItemGroup>\n  <ItemGroup>\n    <Compile Include=\"Domain\\Customers.cs\" />\n    <Compile Include=\"Domain\\Orders.cs\" />\n    <Compile Include=\"Domain\\TableModuleBase.cs\" />\n    <Compile Include=\"Properties\\AssemblyInfo.cs\" />\n  </ItemGroup>\n  <ItemGroup>\n    <Folder Include=\"Application\\\" />\n  </ItemGroup>\n  <Import Project=\"$(MSBuildToolsPath)\\Microsoft.CSharp.targets\" />\n  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \n       Other similar extension points exist, see Microsoft.Common.targets.\n  <Target Name=\"BeforeBuild\">\n  </Target>\n  <Target Name=\"AfterBuild\">\n  </Target>\n  -->\n</Project>"
  },
  {
    "path": "05 - Domain Model Implementation Patterns/PPPDDDChap05.TableModule/PPPDDDChap05.TableModule/Properties/AssemblyInfo.cs",
    "content": "﻿using System.Reflection;\nusing System.Runtime.CompilerServices;\nusing System.Runtime.InteropServices;\n\n// General Information about an assembly is controlled through the following \n// set of attributes. Change these attribute values to modify the information\n// associated with an assembly.\n[assembly: AssemblyTitle(\"PPPDDDChap05.TableModule\")]\n[assembly: AssemblyDescription(\"\")]\n[assembly: AssemblyConfiguration(\"\")]\n[assembly: AssemblyCompany(\"\")]\n[assembly: AssemblyProduct(\"PPPDDDChap05.TableModule\")]\n[assembly: AssemblyCopyright(\"Copyright ©  2014\")]\n[assembly: AssemblyTrademark(\"\")]\n[assembly: AssemblyCulture(\"\")]\n\n// Setting ComVisible to false makes the types in this assembly not visible \n// to COM components.  If you need to access a type in this assembly from \n// COM, set the ComVisible attribute to true on that type.\n[assembly: ComVisible(false)]\n\n// The following GUID is for the ID of the typelib if this project is exposed to COM\n[assembly: Guid(\"42d09094-56a4-47a1-aac8-3c51dfac2a62\")]\n\n// Version information for an assembly consists of the following four values:\n//\n//      Major Version\n//      Minor Version \n//      Build Number\n//      Revision\n//\n// You can specify all the values or you can default the Build and Revision Numbers \n// by using the '*' as shown below:\n// [assembly: AssemblyVersion(\"1.0.*\")]\n[assembly: AssemblyVersion(\"1.0.0.0\")]\n[assembly: AssemblyFileVersion(\"1.0.0.0\")]\n"
  },
  {
    "path": "05 - Domain Model Implementation Patterns/PPPDDDChap05.TableModule/PPPDDDChap05.TableModule.sln",
    "content": "﻿\nMicrosoft Visual Studio Solution File, Format Version 12.00\n# Visual Studio 2012\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"PPPDDDChap05.TableModule\", \"PPPDDDChap05.TableModule\\PPPDDDChap05.TableModule.csproj\", \"{F9520565-61E6-438C-9452-97F1F0C298D3}\"\nEndProject\nGlobal\n\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\n\t\tDebug|Any CPU = Debug|Any CPU\n\t\tRelease|Any CPU = Release|Any CPU\n\tEndGlobalSection\n\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\n\t\t{F9520565-61E6-438C-9452-97F1F0C298D3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{F9520565-61E6-438C-9452-97F1F0C298D3}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{F9520565-61E6-438C-9452-97F1F0C298D3}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{F9520565-61E6-438C-9452-97F1F0C298D3}.Release|Any CPU.Build.0 = Release|Any CPU\n\tEndGlobalSection\n\tGlobalSection(SolutionProperties) = preSolution\n\t\tHideSolutionNode = FALSE\n\tEndGlobalSection\nEndGlobal\n"
  },
  {
    "path": "05 - Domain Model Implementation Patterns/PPPDDDChap05.TransactionScript/PPPDDDChap05.TransactionScript/Application/BidOnAuctionService.cs",
    "content": "﻿using System;\nusing PPPDDDChap05.TransactionScript.Domain;\n\nnamespace PPPPDDDChap05.TransactionScript.Application\n{\n    public class BidOnAuctionService\n    {\n        private BidOnAuctionCommand _bidOnAuctionCommand;\n\n        public BidOnAuctionService(BidOnAuctionCommand bidOnAuctionCommand)\n        {\n            _bidOnAuctionCommand = bidOnAuctionCommand;\n        }\n\n        public void Bid(Guid auctionId, Guid memberId, decimal amount, DateTime dateOfBid)\n        {\n            _bidOnAuctionCommand.Execute(auctionId, memberId, amount, dateOfBid);                             \n         }                      \n    }\n}"
  },
  {
    "path": "05 - Domain Model Implementation Patterns/PPPDDDChap05.TransactionScript/PPPDDDChap05.TransactionScript/Domain/Auction.cs",
    "content": "﻿using System;\n\nnamespace PPPDDDChap05.TransactionScript.Domain\n{\n    public class Auction \n    {\n        public Guid Id { get; set; }\n        public Guid ListingId { get; set; }\n        public DateTime EndsAt { get; set; }\n        public decimal StartingPrice { get; set; }\n        public decimal WinningBid { get; set; }\n        public decimal WinninBidderMaximumBid { get; set; }\n        public Guid WinningBidder { get; set; }                    \n    }\n}\n"
  },
  {
    "path": "05 - Domain Model Implementation Patterns/PPPDDDChap05.TransactionScript/PPPDDDChap05.TransactionScript/Domain/BidOnAuction.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace PPPDDDChap05.TransactionScript.Domain\n{\n    public class BidOnAuction: ICommand\n    {\n        public void Execute()\n        {\n            throw new NotImplementedException();\n        }\n    }\n}\n"
  },
  {
    "path": "05 - Domain Model Implementation Patterns/PPPDDDChap05.TransactionScript/PPPDDDChap05.TransactionScript/Domain/BidOnAuctionCommand.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\nusing System.Transactions;\n\nnamespace PPPDDDChap05.TransactionScript.Domain\n{\n    public class BidOnAuctionCommand: ICommand\n    {\n        private Guid auctionId {get; set;}\n        private Guid bidderId {get; set;}\n        private decimal amount {get; set;}\n        private DateTime timeOfBid { get; set; }\n\n        public BidOnAuctionCommand(Guid auctionId, Guid bidderId, decimal amount, DateTime timeOfBid)\n        {\n            this.auctionId = auctionId;\n            this.bidderId = bidderId;\n            this.amount = amount;\n            this.timeOfBid = timeOfBid;\n        }\n\n        public void Execute()\n        {\n            using (TransactionScope scope = new TransactionScope())\n            {\n                ThrowExceptionIfNotValid(auctionId, bidderId, amount, timeOfBid);\n\n                ThrowExceptionIfAuctionHasEnded(auctionId);\n\n                if (IsFirstBid(auctionId))\n                    PlaceFirstBid(auctionId, bidderId, amount, timeOfBid);\n                else if (IsIncreasingMaximimBid(auctionId, amount, bidderId))\n                    IncreaseMaximumBidTo(amount);\n                else if (CanMeetOrExceedBidIncrement(amount))\n                    UpdatePrice(auctionId, bidderId, amount, timeOfBid);\n            }\n        }\n\n        private void ThrowExceptionIfAuctionHasEnded(Guid auctionId)\n        {\n            // check at DB\n        }\n\n        private bool CanMeetOrExceedBidIncrement(decimal amount)\n        {\n            return true;\n        }\n\n        private void UpdatePrice(Guid auctionId, Guid bidderId, decimal amount, DateTime timeOfBi)\n        {\n        \n        }\n\n        private void IncreaseMaximumBidTo(decimal amount)\n        { \n        \n        }\n\n        private bool IsIncreasingMaximimBid(Guid auctionId, decimal amount, Guid bidderId)\n        {\n            return true;\n        }\n\n        private bool IsFirstBid(Guid auctionId)\n        {\n            return true;\n        }\n\n        private void PlaceFirstBid(Guid auctionId, Guid bidderId, decimal amount, DateTime timeOfBid)\n        { \n        \n        }\n\n        private void FirstBid(Auction auction, Guid bidderId, decimal amount, DateTime dateOfBid)\n        {\n            if (amount > auction.StartingPrice)\n            {\n                auction.WinningBidder = bidderId;\n                auction.WinningBid = amount;\n\n                // DB Update\n            }\n            else\n                throw new ApplicationException(\"You have to bid greater than the starting price.\");\n        }\n\n        private void ThrowExceptionIfNotValid(Guid auctionId, Guid bidderId, decimal amount, DateTime dateOfBid)\n        { \n            if (auctionId == Guid.Empty)\n                throw new ArgumentNullException(\"AuctionId cannot be null\");\n\n            if (bidderId == Guid.Empty)\n                throw new ArgumentNullException(\"BidderId cannot be null\");\n\n            if (dateOfBid == DateTime.MinValue)\n                throw new ArgumentNullException(\"Time of bid must have a value\");\n\n            if (amount % 0.01m != 0)\n                throw new InvalidOperationException(\"There cannot be more than two decimal places.\");\n\n            if (amount < 0)\n                throw new InvalidOperationException(\"Money cannot be a negative value.\");\n        }\n\n        private decimal BidIncrement(decimal currentAuctionWinningBid)\n        {\n            if (currentAuctionWinningBid >= 0.01m && currentAuctionWinningBid <= 0.99m)\n                return 0.05m;\n\n            if (currentAuctionWinningBid >= 1.00m  && currentAuctionWinningBid <= 4.99m)\n                return 0.20m;\n\n            if (currentAuctionWinningBid >= 5.00m && currentAuctionWinningBid >= 14.99m)\n                return 0.50m;\n\n            return 1.00m;\n\n        }\n\n    }\n}\n"
  },
  {
    "path": "05 - Domain Model Implementation Patterns/PPPDDDChap05.TransactionScript/PPPDDDChap05.TransactionScript/Domain/ClassDiagram1.cd",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<ClassDiagram MajorVersion=\"1\" MinorVersion=\"1\">\n  <Class Name=\"PPPDDDChap05.TransactionScript.Domain.CreateAuction\">\n    <Position X=\"4\" Y=\"2.75\" Width=\"1.5\" />\n    <TypeIdentifier>\n      <HashCode>AAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>\n      <FileName>Domain\\CreateAuction.cs</FileName>\n    </TypeIdentifier>\n    <Lollipop Position=\"0.2\" />\n  </Class>\n  <Class Name=\"PPPDDDChap05.TransactionScript.Domain.BidOnAuction\">\n    <Position X=\"6.5\" Y=\"2.75\" Width=\"1.5\" />\n    <TypeIdentifier>\n      <HashCode>AAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>\n      <FileName>Domain\\BidOnAuction.cs</FileName>\n    </TypeIdentifier>\n    <Lollipop Position=\"0.2\" />\n  </Class>\n  <Interface Name=\"PPPDDDChap05.TransactionScript.Domain.ICommand\">\n    <Position X=\"5.25\" Y=\"1\" Width=\"1.5\" />\n    <TypeIdentifier>\n      <HashCode>AAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>\n      <FileName>Domain\\ICommand.cs</FileName>\n    </TypeIdentifier>\n  </Interface>\n  <Font Name=\"Segoe UI\" Size=\"9\" />\n</ClassDiagram>"
  },
  {
    "path": "05 - Domain Model Implementation Patterns/PPPDDDChap05.TransactionScript/PPPDDDChap05.TransactionScript/Domain/CreateAuction.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace PPPDDDChap05.TransactionScript.Domain\n{\n    public class CreateAuction : ICommand\n    {\n        public void Execute()\n        {\n            throw new NotImplementedException();\n        }\n    }\n}\n"
  },
  {
    "path": "05 - Domain Model Implementation Patterns/PPPDDDChap05.TransactionScript/PPPDDDChap05.TransactionScript/Domain/ICommand.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace PPPDDDChap05.TransactionScript.Domain\n{\n    public interface ICommand\n    {\n        public void Execute();\n    }\n}\n"
  },
  {
    "path": "05 - Domain Model Implementation Patterns/PPPDDDChap05.TransactionScript/PPPDDDChap05.TransactionScript/PPPDDDChap05.TransactionScript.csproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"4.0\" DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <Import Project=\"$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props\" Condition=\"Exists('$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props')\" />\n  <PropertyGroup>\n    <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>\n    <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>\n    <ProjectGuid>{32A69A1D-17FD-4F51-981B-81298242440F}</ProjectGuid>\n    <OutputType>Library</OutputType>\n    <AppDesignerFolder>Properties</AppDesignerFolder>\n    <RootNamespace>PPPDDDChap05.TransactionScript</RootNamespace>\n    <AssemblyName>PPPDDDChap05.TransactionScript</AssemblyName>\n    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\n    <FileAlignment>512</FileAlignment>\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' \">\n    <DebugSymbols>true</DebugSymbols>\n    <DebugType>full</DebugType>\n    <Optimize>false</Optimize>\n    <OutputPath>bin\\Debug\\</OutputPath>\n    <DefineConstants>DEBUG;TRACE</DefineConstants>\n    <ErrorReport>prompt</ErrorReport>\n    <WarningLevel>4</WarningLevel>\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' \">\n    <DebugType>pdbonly</DebugType>\n    <Optimize>true</Optimize>\n    <OutputPath>bin\\Release\\</OutputPath>\n    <DefineConstants>TRACE</DefineConstants>\n    <ErrorReport>prompt</ErrorReport>\n    <WarningLevel>4</WarningLevel>\n  </PropertyGroup>\n  <ItemGroup>\n    <Reference Include=\"System\" />\n    <Reference Include=\"System.Core\" />\n    <Reference Include=\"System.Transactions\" />\n    <Reference Include=\"System.Xml.Linq\" />\n    <Reference Include=\"System.Data.DataSetExtensions\" />\n    <Reference Include=\"Microsoft.CSharp\" />\n    <Reference Include=\"System.Data\" />\n    <Reference Include=\"System.Xml\" />\n  </ItemGroup>\n  <ItemGroup>\n    <Compile Include=\"Application\\BidOnAuctionService.cs\" />\n    <Compile Include=\"Domain\\Auction.cs\" />\n    <Compile Include=\"Domain\\BidOnAuction.cs\" />\n    <Compile Include=\"Domain\\BidOnAuctionCommand.cs\" />\n    <Compile Include=\"Domain\\CreateAuction.cs\" />\n    <Compile Include=\"Domain\\ICommand.cs\" />\n    <Compile Include=\"Properties\\AssemblyInfo.cs\" />\n  </ItemGroup>\n  <ItemGroup>\n    <None Include=\"Domain\\ClassDiagram1.cd\" />\n  </ItemGroup>\n  <Import Project=\"$(MSBuildToolsPath)\\Microsoft.CSharp.targets\" />\n  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \n       Other similar extension points exist, see Microsoft.Common.targets.\n  <Target Name=\"BeforeBuild\">\n  </Target>\n  <Target Name=\"AfterBuild\">\n  </Target>\n  -->\n</Project>"
  },
  {
    "path": "05 - Domain Model Implementation Patterns/PPPDDDChap05.TransactionScript/PPPDDDChap05.TransactionScript/Properties/AssemblyInfo.cs",
    "content": "﻿using System.Reflection;\nusing System.Runtime.CompilerServices;\nusing System.Runtime.InteropServices;\n\n// General Information about an assembly is controlled through the following \n// set of attributes. Change these attribute values to modify the information\n// associated with an assembly.\n[assembly: AssemblyTitle(\"PPPDDDChap05.TransactionScript\")]\n[assembly: AssemblyDescription(\"\")]\n[assembly: AssemblyConfiguration(\"\")]\n[assembly: AssemblyCompany(\"\")]\n[assembly: AssemblyProduct(\"PPPDDDChap05.TransactionScript\")]\n[assembly: AssemblyCopyright(\"Copyright ©  2014\")]\n[assembly: AssemblyTrademark(\"\")]\n[assembly: AssemblyCulture(\"\")]\n\n// Setting ComVisible to false makes the types in this assembly not visible \n// to COM components.  If you need to access a type in this assembly from \n// COM, set the ComVisible attribute to true on that type.\n[assembly: ComVisible(false)]\n\n// The following GUID is for the ID of the typelib if this project is exposed to COM\n[assembly: Guid(\"973aaa8a-6c99-41e2-a811-0db1308fa968\")]\n\n// Version information for an assembly consists of the following four values:\n//\n//      Major Version\n//      Minor Version \n//      Build Number\n//      Revision\n//\n// You can specify all the values or you can default the Build and Revision Numbers \n// by using the '*' as shown below:\n// [assembly: AssemblyVersion(\"1.0.*\")]\n[assembly: AssemblyVersion(\"1.0.0.0\")]\n[assembly: AssemblyFileVersion(\"1.0.0.0\")]\n"
  },
  {
    "path": "05 - Domain Model Implementation Patterns/PPPDDDChap05.TransactionScript/PPPDDDChap05.TransactionScript.sln",
    "content": "﻿\nMicrosoft Visual Studio Solution File, Format Version 12.00\n# Visual Studio 2012\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"PPPDDDChap05.TransactionScript\", \"PPPDDDChap05.TransactionScript\\PPPDDDChap05.TransactionScript.csproj\", \"{32A69A1D-17FD-4F51-981B-81298242440F}\"\nEndProject\nGlobal\n\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\n\t\tDebug|Any CPU = Debug|Any CPU\n\t\tRelease|Any CPU = Release|Any CPU\n\tEndGlobalSection\n\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\n\t\t{32A69A1D-17FD-4F51-981B-81298242440F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{32A69A1D-17FD-4F51-981B-81298242440F}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{32A69A1D-17FD-4F51-981B-81298242440F}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{32A69A1D-17FD-4F51-981B-81298242440F}.Release|Any CPU.Build.0 = Release|Any CPU\n\tEndGlobalSection\n\tGlobalSection(SolutionProperties) = preSolution\n\t\tHideSolutionNode = FALSE\n\tEndGlobalSection\nEndGlobal\n"
  },
  {
    "path": "10 - Applying the Principles, Practices and Patterns of DDD/PPPDDD.Chap10.ecommerce/PPPDDD.Chap10.ecommerce/ExplicitLogic/Model/BasketItem.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace PPPDDD.Chap10.ecommerce.ExplicitLogic.Model\n{\n    public class BasketItem\n    {\n        public Quantity quantity()\n        {\n            throw new NotImplementedException();\n        }\n\n        internal void increase_item_quantity_by(Quantity quantity)\n        {\n            throw new NotImplementedException();\n        }\n    }\n}\n"
  },
  {
    "path": "10 - Applying the Principles, Practices and Patterns of DDD/PPPDDD.Chap10.ecommerce/PPPDDD.Chap10.ecommerce/ExplicitLogic/Model/BasketItemFactory.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace PPPDDD.Chap10.ecommerce.ExplicitLogic.Model\n{\n    public class BasketItemFactory\n    {\n        internal static BasketItem create_item_for(Product product, basket basket)\n        {\n            throw new NotImplementedException();\n        }\n    }\n}\n"
  },
  {
    "path": "10 - Applying the Principles, Practices and Patterns of DDD/PPPDDD.Chap10.ecommerce/PPPDDD.Chap10.ecommerce/ExplicitLogic/Model/BasketItems.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace PPPDDD.Chap10.ecommerce.ExplicitLogic.Model\n{\n    public class BasketItems : List<BasketItem>\n    {\n    }\n}\n"
  },
  {
    "path": "10 - Applying the Principles, Practices and Patterns of DDD/PPPDDD.Chap10.ecommerce/PPPDDD.Chap10.ecommerce/ExplicitLogic/Model/Country.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\n\nnamespace PPPDDD.Chap10.ecommerce.ExplicitLogic.Model\n{\n    public class Country\n    {\n    }\n}\n"
  },
  {
    "path": "10 - Applying the Principles, Practices and Patterns of DDD/PPPDDD.Chap10.ecommerce/PPPDDD.Chap10.ecommerce/ExplicitLogic/Model/OverSeasSellingPolicyException.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\n\nnamespace PPPDDD.Chap10.ecommerce.ExplicitLogic.Model\n{\n    class OverSeasSellingPolicyException : Exception\n    {\n        public OverSeasSellingPolicyException(string message)\n        {\n        }\n    }\n}\n"
  },
  {
    "path": "10 - Applying the Principles, Practices and Patterns of DDD/PPPDDD.Chap10.ecommerce/PPPDDD.Chap10.ecommerce/ExplicitLogic/Model/OverseasSellingPolicy.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace PPPDDD.Chap10.ecommerce.ExplicitLogic.Model\n{\n    public class OverSeasSellingPolicy\n    {\n        public static Quantity quantity_threshold = new Quantity(50);\n        \n        public bool is_satisfied_by(Quantity item_quantity, Country country)\n        {\n            if (item_quantity.contains_more_than(quantity_threshold))\n                return false;\n            else\n                return true;\n        }\n\n        internal bool is_satisfied_by(Quantity item_quantity)\n        {\n            throw new NotImplementedException();\n        }\n    }\n}\n"
  },
  {
    "path": "10 - Applying the Principles, Practices and Patterns of DDD/PPPDDD.Chap10.ecommerce/PPPDDD.Chap10.ecommerce/ExplicitLogic/Model/Product.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace PPPDDD.Chap10.ecommerce.ExplicitLogic.Model\n{\n    public class Product\n    {\n    }\n}\n"
  },
  {
    "path": "10 - Applying the Principles, Practices and Patterns of DDD/PPPDDD.Chap10.ecommerce/PPPDDD.Chap10.ecommerce/ExplicitLogic/Model/Quantity.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace PPPDDD.Chap10.ecommerce.ExplicitLogic.Model\n{\n    public class Quantity\n    {\n        public Quantity(int p)\n        {\n        }\n\n        public Quantity add(Quantity quantity)\n        {\n            throw new NotImplementedException();\n        }\n\n        internal bool contains_more_than(Quantity quantity_threshold)\n        {\n            throw new NotImplementedException();\n        }\n    }\n}\n"
  },
  {
    "path": "10 - Applying the Principles, Practices and Patterns of DDD/PPPDDD.Chap10.ecommerce/PPPDDD.Chap10.ecommerce/ExplicitLogic/Model/basket.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace PPPDDD.Chap10.ecommerce.ExplicitLogic.Model\n{\n    //  This example, including associated classes, accentuates making logic explicit. \n    //  It does not demonstrate coding and DDD best practices\n    public class basket\n    {\n        private BasketItems _items;\n        private OverSeasSellingPolicy _over_seas_selling_policy;\n\n        public void add(Product product)\n        {\n            if (basket_contains_an_item_for(product))\n            {\n                var item_quantity = get_item_for(product).quantity().add(new Quantity(1));\n                if (_over_seas_selling_policy.is_satisfied_by(item_quantity))\n                    get_item_for(product).increase_item_quantity_by(new Quantity(1));\n                else\n                    throw new OverSeasSellingPolicyException(\n                        string.Format(\n                        \"You can only purchase {0} of a single product.\",\n                        OverSeasSellingPolicy.quantity_threshold)\n                    );\n            }\n            else\n                _items.Add(BasketItemFactory.create_item_for(product, this));\n        }\n\n        private BasketItem get_item_for(Product product)\n        {\n            throw new NotImplementedException();\n        }\n\n        private bool basket_contains_an_item_for(Product product)\n        {\n            throw new NotImplementedException();\n        }\n\n    }\n}\n"
  },
  {
    "path": "10 - Applying the Principles, Practices and Patterns of DDD/PPPDDD.Chap10.ecommerce/PPPDDD.Chap10.ecommerce/ImplicitLogic/Model/BasketItem.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace PPPDDD.Chap10.ecommerce.ImplicitLogic.Model\n{\n    public class BasketItem\n    {\n        public Quantity quantity()\n        {\n            throw new NotImplementedException();\n        }\n\n        internal void increase_item_quantity_by(Quantity quantity)\n        {\n            throw new NotImplementedException();\n        }\n    }\n}\n"
  },
  {
    "path": "10 - Applying the Principles, Practices and Patterns of DDD/PPPDDD.Chap10.ecommerce/PPPDDD.Chap10.ecommerce/ImplicitLogic/Model/BasketItemFactory.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace PPPDDD.Chap10.ecommerce.ImplicitLogic.Model\n{\n    public class BasketItemFactory\n    {\n        internal static BasketItem create_item_for(Product product, basket basket)\n        {\n            throw new NotImplementedException();\n        }\n    }\n}\n"
  },
  {
    "path": "10 - Applying the Principles, Practices and Patterns of DDD/PPPDDD.Chap10.ecommerce/PPPDDD.Chap10.ecommerce/ImplicitLogic/Model/BasketItems.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace PPPDDD.Chap10.ecommerce.ImplicitLogic.Model\n{\n    public class BasketItems : List<BasketItem>\n    {\n    }\n}\n"
  },
  {
    "path": "10 - Applying the Principles, Practices and Patterns of DDD/PPPDDD.Chap10.ecommerce/PPPDDD.Chap10.ecommerce/ImplicitLogic/Model/Product.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace PPPDDD.Chap10.ecommerce.ImplicitLogic.Model\n{\n    public class Product\n    {\n    }\n}\n"
  },
  {
    "path": "10 - Applying the Principles, Practices and Patterns of DDD/PPPDDD.Chap10.ecommerce/PPPDDD.Chap10.ecommerce/ImplicitLogic/Model/Quantity.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace PPPDDD.Chap10.ecommerce.ImplicitLogic.Model\n{\n    public class Quantity\n    {\n        public Quantity(int p)\n        {\n        }\n\n        public Quantity add(Quantity quantity)\n        {\n            throw new NotImplementedException();\n        }\n\n        internal bool contains_more_than(Quantity quantity_threshold)\n        {\n            throw new NotImplementedException();\n        }\n    }\n}\n"
  },
  {
    "path": "10 - Applying the Principles, Practices and Patterns of DDD/PPPDDD.Chap10.ecommerce/PPPDDD.Chap10.ecommerce/ImplicitLogic/Model/basket.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace PPPDDD.Chap10.ecommerce.ImplicitLogic.Model\n{\n    // This example, including associated classes, demonstrates the problems of not making concepts explicit. \n    // It does not demonstrate coding and DDD best practices\n    public class basket\n    {\n        private BasketItems _items;\n\n        public void add(Product product)\n        {\n            if (basket_contains_an_item_for(product))\n            {\n                var item_quantity = get_item_for(product).quantity()\n                .add(new Quantity(1));\n                if (item_quantity.contains_more_than(new Quantity(50)))\n                    throw new ApplicationException(\n                    \"You can only purchase 50 of a single product.\");\n                else\n                    get_item_for(product).increase_item_quantity_by(\n                    new Quantity(1));\n            }\n            else\n                _items.Add(BasketItemFactory.create_item_for(product, this));\n        }\n\n        private BasketItem get_item_for(Product product)\n        {\n            throw new NotImplementedException();\n        }\n\n        private bool basket_contains_an_item_for(Product product)\n        {\n            throw new NotImplementedException();\n        }\n    }\n}\n"
  },
  {
    "path": "10 - Applying the Principles, Practices and Patterns of DDD/PPPDDD.Chap10.ecommerce/PPPDDD.Chap10.ecommerce/PPPDDD.Chap10.ecommerce.csproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"12.0\" DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <Import Project=\"$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props\" Condition=\"Exists('$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props')\" />\n  <PropertyGroup>\n    <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>\n    <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>\n    <ProjectGuid>{4DFA816B-6069-4B9E-B7F2-F13B498EAD9F}</ProjectGuid>\n    <OutputType>Library</OutputType>\n    <AppDesignerFolder>Properties</AppDesignerFolder>\n    <RootNamespace>PPPDDD.Chap10.ecommerce</RootNamespace>\n    <AssemblyName>PPPDDD.Chap10.ecommerce</AssemblyName>\n    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\n    <FileAlignment>512</FileAlignment>\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' \">\n    <DebugSymbols>true</DebugSymbols>\n    <DebugType>full</DebugType>\n    <Optimize>false</Optimize>\n    <OutputPath>bin\\Debug\\</OutputPath>\n    <DefineConstants>DEBUG;TRACE</DefineConstants>\n    <ErrorReport>prompt</ErrorReport>\n    <WarningLevel>4</WarningLevel>\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' \">\n    <DebugType>pdbonly</DebugType>\n    <Optimize>true</Optimize>\n    <OutputPath>bin\\Release\\</OutputPath>\n    <DefineConstants>TRACE</DefineConstants>\n    <ErrorReport>prompt</ErrorReport>\n    <WarningLevel>4</WarningLevel>\n  </PropertyGroup>\n  <ItemGroup>\n    <Reference Include=\"System\" />\n    <Reference Include=\"System.Core\" />\n    <Reference Include=\"System.Xml.Linq\" />\n    <Reference Include=\"System.Data.DataSetExtensions\" />\n    <Reference Include=\"Microsoft.CSharp\" />\n    <Reference Include=\"System.Data\" />\n    <Reference Include=\"System.Xml\" />\n  </ItemGroup>\n  <ItemGroup>\n    <Compile Include=\"ExplicitLogic\\Model\\basket.cs\" />\n    <Compile Include=\"ExplicitLogic\\Model\\BasketItem.cs\" />\n    <Compile Include=\"ExplicitLogic\\Model\\BasketItemFactory.cs\" />\n    <Compile Include=\"ExplicitLogic\\Model\\BasketItems.cs\" />\n    <Compile Include=\"ExplicitLogic\\Model\\Country.cs\" />\n    <Compile Include=\"ExplicitLogic\\Model\\OverseasSellingPolicy.cs\" />\n    <Compile Include=\"ExplicitLogic\\Model\\OverSeasSellingPolicyException.cs\" />\n    <Compile Include=\"ExplicitLogic\\Model\\Product.cs\" />\n    <Compile Include=\"ExplicitLogic\\Model\\Quantity.cs\" />\n    <Compile Include=\"ImplicitLogic\\Model\\basket.cs\" />\n    <Compile Include=\"ImplicitLogic\\Model\\BasketItem.cs\" />\n    <Compile Include=\"ImplicitLogic\\Model\\BasketItemFactory.cs\" />\n    <Compile Include=\"ImplicitLogic\\Model\\BasketItems.cs\" />\n    <Compile Include=\"ImplicitLogic\\Model\\Product.cs\" />\n    <Compile Include=\"ImplicitLogic\\Model\\Quantity.cs\" />\n    <Compile Include=\"Properties\\AssemblyInfo.cs\" />\n  </ItemGroup>\n  <ItemGroup>\n    <Folder Include=\"ExplicitLogic\\Application\\\" />\n    <Folder Include=\"ExplicitLogic\\Infrastructure\\\" />\n    <Folder Include=\"ImplicitLogic\\Application\\\" />\n    <Folder Include=\"ImplicitLogic\\Infrastructure\\\" />\n  </ItemGroup>\n  <Import Project=\"$(MSBuildToolsPath)\\Microsoft.CSharp.targets\" />\n  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \n       Other similar extension points exist, see Microsoft.Common.targets.\n  <Target Name=\"BeforeBuild\">\n  </Target>\n  <Target Name=\"AfterBuild\">\n  </Target>\n  -->\n</Project>"
  },
  {
    "path": "10 - Applying the Principles, Practices and Patterns of DDD/PPPDDD.Chap10.ecommerce/PPPDDD.Chap10.ecommerce/Properties/AssemblyInfo.cs",
    "content": "﻿using System.Reflection;\nusing System.Runtime.CompilerServices;\nusing System.Runtime.InteropServices;\n\n// General Information about an assembly is controlled through the following \n// set of attributes. Change these attribute values to modify the information\n// associated with an assembly.\n[assembly: AssemblyTitle(\"PPPDDD.Chap10.ecommerce\")]\n[assembly: AssemblyDescription(\"\")]\n[assembly: AssemblyConfiguration(\"\")]\n[assembly: AssemblyCompany(\"\")]\n[assembly: AssemblyProduct(\"PPPDDD.Chap10.ecommerce\")]\n[assembly: AssemblyCopyright(\"Copyright ©  2015\")]\n[assembly: AssemblyTrademark(\"\")]\n[assembly: AssemblyCulture(\"\")]\n\n// Setting ComVisible to false makes the types in this assembly not visible \n// to COM components.  If you need to access a type in this assembly from \n// COM, set the ComVisible attribute to true on that type.\n[assembly: ComVisible(false)]\n\n// The following GUID is for the ID of the typelib if this project is exposed to COM\n[assembly: Guid(\"4f3f7625-a00b-47a3-8154-ef201dd2d522\")]\n\n// Version information for an assembly consists of the following four values:\n//\n//      Major Version\n//      Minor Version \n//      Build Number\n//      Revision\n//\n// You can specify all the values or you can default the Build and Revision Numbers \n// by using the '*' as shown below:\n// [assembly: AssemblyVersion(\"1.0.*\")]\n[assembly: AssemblyVersion(\"1.0.0.0\")]\n[assembly: AssemblyFileVersion(\"1.0.0.0\")]\n"
  },
  {
    "path": "10 - Applying the Principles, Practices and Patterns of DDD/PPPDDD.Chap10.ecommerce/PPPDDD.Chap10.ecommerce.sln",
    "content": "﻿\nMicrosoft Visual Studio Solution File, Format Version 12.00\n# Visual Studio Express 2013 for Web\nVisualStudioVersion = 12.0.31101.0\nMinimumVisualStudioVersion = 10.0.40219.1\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"PPPDDD.Chap10.ecommerce\", \"PPPDDD.Chap10.ecommerce\\PPPDDD.Chap10.ecommerce.csproj\", \"{4DFA816B-6069-4B9E-B7F2-F13B498EAD9F}\"\nEndProject\nGlobal\n\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\n\t\tDebug|Any CPU = Debug|Any CPU\n\t\tRelease|Any CPU = Release|Any CPU\n\tEndGlobalSection\n\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\n\t\t{4DFA816B-6069-4B9E-B7F2-F13B498EAD9F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{4DFA816B-6069-4B9E-B7F2-F13B498EAD9F}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{4DFA816B-6069-4B9E-B7F2-F13B498EAD9F}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{4DFA816B-6069-4B9E-B7F2-F13B498EAD9F}.Release|Any CPU.Build.0 = Release|Any CPU\n\tEndGlobalSection\n\tGlobalSection(SolutionProperties) = preSolution\n\t\tHideSolutionNode = FALSE\n\tEndGlobalSection\nEndGlobal\n"
  },
  {
    "path": "11 - Integrating Bounded Contexts/README.md",
    "content": "PPPDDD\n======\n\nThere is no sample code for chapter 11. This chapter contains theory and \ncase-studies of integrating bounded contexts and team in distributed domain \ndriven design (DDDD) environments.\n"
  },
  {
    "path": "12 - Integrating Via Messaging/Billing.Messages/Billing.Messages.csproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Project ToolsVersion=\"12.0\" DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\r\n  <Import Project=\"$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props\" Condition=\"Exists('$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props')\" />\r\n  <PropertyGroup>\r\n    <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>\r\n    <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>\r\n    <ProjectGuid>{B3707164-FF36-473E-877D-A652C8E41D14}</ProjectGuid>\r\n    <OutputType>Library</OutputType>\r\n    <AppDesignerFolder>Properties</AppDesignerFolder>\r\n    <RootNamespace>Billing.Messages</RootNamespace>\r\n    <AssemblyName>Billing.Messages</AssemblyName>\r\n    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r\n    <FileAlignment>512</FileAlignment>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' \">\r\n    <DebugSymbols>true</DebugSymbols>\r\n    <DebugType>full</DebugType>\r\n    <Optimize>false</Optimize>\r\n    <OutputPath>bin\\Debug\\</OutputPath>\r\n    <DefineConstants>DEBUG;TRACE</DefineConstants>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <WarningLevel>4</WarningLevel>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' \">\r\n    <DebugType>pdbonly</DebugType>\r\n    <Optimize>true</Optimize>\r\n    <OutputPath>bin\\Release\\</OutputPath>\r\n    <DefineConstants>TRACE</DefineConstants>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <WarningLevel>4</WarningLevel>\r\n  </PropertyGroup>\r\n  <ItemGroup>\r\n    <Reference Include=\"System\" />\r\n    <Reference Include=\"System.Core\" />\r\n    <Reference Include=\"System.Xml.Linq\" />\r\n    <Reference Include=\"System.Data.DataSetExtensions\" />\r\n    <Reference Include=\"Microsoft.CSharp\" />\r\n    <Reference Include=\"System.Data\" />\r\n    <Reference Include=\"System.Xml\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <Compile Include=\"Commands\\RecordPaymentAttempt.cs\" />\r\n    <Compile Include=\"Events\\PaymentAccepted.cs\" />\r\n    <Compile Include=\"Properties\\AssemblyInfo.cs\" />\r\n  </ItemGroup>\r\n  <Import Project=\"$(MSBuildToolsPath)\\Microsoft.CSharp.targets\" />\r\n  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \r\n       Other similar extension points exist, see Microsoft.Common.targets.\r\n  <Target Name=\"BeforeBuild\">\r\n  </Target>\r\n  <Target Name=\"AfterBuild\">\r\n  </Target>\r\n  -->\r\n</Project>"
  },
  {
    "path": "12 - Integrating Via Messaging/Billing.Messages/Commands/RecordPaymentAttempt.cs",
    "content": "﻿using System;\r\n\r\nnamespace Billing.Messages.Commands\r\n{\r\n    public class RecordPaymentAttempt\r\n    {\r\n        public string OrderId { get; set; }\r\n        public PaymentStatus Status { get; set; }\r\n    }\r\n\r\n    public enum PaymentStatus\r\n    {\r\n        Accepted,\r\n        Rejected\r\n    }\r\n}\r\n"
  },
  {
    "path": "12 - Integrating Via Messaging/Billing.Messages/Events/PaymentAccepted.cs",
    "content": "﻿using System;\r\n\r\nnamespace Billing.Messages.Events\r\n{\r\n    public class PaymentAccepted\r\n    {\r\n        public string OrderId { get; set; }\r\n    }\r\n}\r\n"
  },
  {
    "path": "12 - Integrating Via Messaging/Billing.Messages/Properties/AssemblyInfo.cs",
    "content": "﻿using System.Reflection;\r\nusing System.Runtime.CompilerServices;\r\nusing System.Runtime.InteropServices;\r\n\r\n// General Information about an assembly is controlled through the following \r\n// set of attributes. Change these attribute values to modify the information\r\n// associated with an assembly.\r\n[assembly: AssemblyTitle(\"Billing.Messages\")]\r\n[assembly: AssemblyDescription(\"\")]\r\n[assembly: AssemblyConfiguration(\"\")]\r\n[assembly: AssemblyCompany(\"\")]\r\n[assembly: AssemblyProduct(\"Billing.Messages\")]\r\n[assembly: AssemblyCopyright(\"Copyright ©  2014\")]\r\n[assembly: AssemblyTrademark(\"\")]\r\n[assembly: AssemblyCulture(\"\")]\r\n\r\n// Setting ComVisible to false makes the types in this assembly not visible \r\n// to COM components.  If you need to access a type in this assembly from \r\n// COM, set the ComVisible attribute to true on that type.\r\n[assembly: ComVisible(false)]\r\n\r\n// The following GUID is for the ID of the typelib if this project is exposed to COM\r\n[assembly: Guid(\"e54fb802-aa29-4e02-8893-7c5e515a12ba\")]\r\n\r\n// Version information for an assembly consists of the following four values:\r\n//\r\n//      Major Version\r\n//      Minor Version \r\n//      Build Number\r\n//      Revision\r\n//\r\n// You can specify all the values or you can default the Build and Revision Numbers \r\n// by using the '*' as shown below:\r\n// [assembly: AssemblyVersion(\"1.0.*\")]\r\n[assembly: AssemblyVersion(\"1.0.0.0\")]\r\n[assembly: AssemblyFileVersion(\"1.0.0.0\")]\r\n"
  },
  {
    "path": "12 - Integrating Via Messaging/Billing.Payments.PaymentAccepted/App.config",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>\r\n<configuration>\r\n  <configSections>\r\n    <section name=\"MessageForwardingInCaseOfFaultConfig\" type=\"NServiceBus.Config.MessageForwardingInCaseOfFaultConfig, NServiceBus.Core\" />\r\n    <section name=\"UnicastBusConfig\" type=\"NServiceBus.Config.UnicastBusConfig, NServiceBus.Core\" />\r\n    <section name=\"AuditConfig\" type=\"NServiceBus.Config.AuditConfig, NServiceBus.Core\" />\r\n  </configSections>\r\n  <MessageForwardingInCaseOfFaultConfig ErrorQueue=\"error\" />\r\n  <UnicastBusConfig>\r\n    <MessageEndpointMappings>\r\n      <add Messages=\"Sales.Messages\" Type=\"Sales.Messages.OrderCreated\" Endpoint=\"Sales.Orders.OrderCreated\" />\r\n    </MessageEndpointMappings>\r\n  </UnicastBusConfig>\r\n  <AuditConfig QueueName=\"audit\" />\r\n</configuration>"
  },
  {
    "path": "12 - Integrating Via Messaging/Billing.Payments.PaymentAccepted/Billing.Payments.PaymentAccepted.csproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Project ToolsVersion=\"12.0\" DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\r\n  <Import Project=\"$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props\" Condition=\"Exists('$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props')\" />\r\n  <PropertyGroup>\r\n    <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>\r\n    <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>\r\n    <ProjectGuid>{D8BE42BB-5FD0-4DB2-919B-9FCB8D455F63}</ProjectGuid>\r\n    <OutputType>Library</OutputType>\r\n    <AppDesignerFolder>Properties</AppDesignerFolder>\r\n    <RootNamespace>Billing.Payments.PaymentAccepted</RootNamespace>\r\n    <AssemblyName>Billing.Payments.PaymentAccepted</AssemblyName>\r\n    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r\n    <FileAlignment>512</FileAlignment>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' \">\r\n    <DebugSymbols>true</DebugSymbols>\r\n    <DebugType>full</DebugType>\r\n    <Optimize>false</Optimize>\r\n    <OutputPath>bin\\Debug\\</OutputPath>\r\n    <DefineConstants>DEBUG;TRACE</DefineConstants>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <WarningLevel>4</WarningLevel>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' \">\r\n    <DebugType>pdbonly</DebugType>\r\n    <Optimize>true</Optimize>\r\n    <OutputPath>bin\\Release\\</OutputPath>\r\n    <DefineConstants>TRACE</DefineConstants>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <WarningLevel>4</WarningLevel>\r\n  </PropertyGroup>\r\n  <ItemGroup>\r\n    <Reference Include=\"NServiceBus\">\r\n      <HintPath>..\\packages\\NServiceBus.Interfaces.4.3.4\\lib\\net40\\NServiceBus.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"NServiceBus.Core\">\r\n      <HintPath>..\\packages\\NServiceBus.4.3.4\\lib\\net40\\NServiceBus.Core.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"NServiceBus.Host\">\r\n      <HintPath>..\\packages\\NServiceBus.Host.4.3.3\\lib\\net40\\NServiceBus.Host.exe</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"System\" />\r\n    <Reference Include=\"System.Core\" />\r\n    <Reference Include=\"System.Xml.Linq\" />\r\n    <Reference Include=\"System.Data.DataSetExtensions\" />\r\n    <Reference Include=\"Microsoft.CSharp\" />\r\n    <Reference Include=\"System.Data\" />\r\n    <Reference Include=\"System.Xml\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <Compile Include=\"EndpointConfig.cs\" />\r\n    <Compile Include=\"OrderCreatedHandler.cs\" />\r\n    <Compile Include=\"Properties\\AssemblyInfo.cs\" />\r\n    <Compile Include=\"RecordPaymentAttemptHandler.cs\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <None Include=\"App.config\" />\r\n    <None Include=\"packages.config\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <ProjectReference Include=\"..\\Billing.Messages\\Billing.Messages.csproj\">\r\n      <Project>{b3707164-ff36-473e-877d-a652c8e41d14}</Project>\r\n      <Name>Billing.Messages</Name>\r\n    </ProjectReference>\r\n    <ProjectReference Include=\"..\\Sales.Messages\\Sales.Messages.csproj\">\r\n      <Project>{2dd347e9-1417-4ac5-9bdc-84dbe0707427}</Project>\r\n      <Name>Sales.Messages</Name>\r\n    </ProjectReference>\r\n  </ItemGroup>\r\n  <Import Project=\"$(MSBuildToolsPath)\\Microsoft.CSharp.targets\" />\r\n  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \r\n       Other similar extension points exist, see Microsoft.Common.targets.\r\n  <Target Name=\"BeforeBuild\">\r\n  </Target>\r\n  <Target Name=\"AfterBuild\">\r\n  </Target>\r\n  -->\r\n  <PropertyGroup>\r\n    <StartAction>Program</StartAction>\r\n    <StartProgram>$(ProjectDir)$(OutputPath)NServiceBus.Host.exe</StartProgram>\r\n  </PropertyGroup>\r\n</Project>"
  },
  {
    "path": "12 - Integrating Via Messaging/Billing.Payments.PaymentAccepted/EndpointConfig.cs",
    "content": "using NServiceBus;\r\nnamespace Billing.Payments.PaymentAccepted\r\n{\r\n    public class EndpointConfig : IConfigureThisEndpoint, AsA_Server, IWantCustomInitialization, AsA_Publisher\r\n    {\r\n        public void Init()\r\n        {\r\n            Configure.With()\r\n                     .DefiningCommandsAs(t => t.Namespace != null && t.Namespace.Contains(\"Commands\"))\r\n                     .DefiningEventsAs(t => t.Namespace != null && t.Namespace.Contains(\"Events\"));\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "12 - Integrating Via Messaging/Billing.Payments.PaymentAccepted/OrderCreatedHandler.cs",
    "content": "﻿using Billing.Messages.Commands;\r\nusing NServiceBus;\r\nusing Sales.Messages.Events;\r\nusing System;\r\n\r\nnamespace Billing.Payments.PaymentAccepted\r\n{\r\n    public class OrderCreatedHandler : IHandleMessages<OrderCreated>\r\n    {\r\n         // dependency injected by NServiceBus\r\n         public IBus Bus { get; set; }\r\n\r\n         public void Handle(OrderCreated message)\r\n         {\r\n             Console.WriteLine(\"Received order created event: OrderId: {0}\", message.OrderId);\r\n             var cardDetails = Database.GetCardDetailsFor(message.UserId);\r\n             var confirmation = PaymentProvider.ChargeCreditCard(cardDetails, message.Amount);\r\n             var command = new RecordPaymentAttempt\r\n             {\r\n                 OrderId = message.OrderId,\r\n                 Status = confirmation.Status\r\n             };\r\n             Bus.SendLocal(command);\r\n         }\r\n    }\r\n\r\n    public static class PaymentProvider\r\n    {\r\n        private static int Attempts = 0;\r\n\r\n        public static PaymentConfirmation ChargeCreditCard(CardDetails details, double amount)\r\n        {\r\n            if (Attempts < 2)\r\n            {\r\n                Attempts++;\r\n                throw new Exception(\"Service unavailable. Down for maintenance.\");\r\n            }\r\n            return new PaymentConfirmation { Status = PaymentStatus.Accepted };\r\n        }\r\n    }\r\n\r\n    public class PaymentConfirmation\r\n    {\r\n        public PaymentStatus Status { get; set; }\r\n    }\r\n\r\n    public static class Database\r\n    {\r\n        public static CardDetails GetCardDetailsFor(string userId)\r\n        {\r\n            return new CardDetails();\r\n        }\r\n    }\r\n\r\n    public class CardDetails\r\n    {\r\n        // ...\r\n    }\r\n}\r\n"
  },
  {
    "path": "12 - Integrating Via Messaging/Billing.Payments.PaymentAccepted/Properties/AssemblyInfo.cs",
    "content": "﻿using System.Reflection;\r\nusing System.Runtime.CompilerServices;\r\nusing System.Runtime.InteropServices;\r\n\r\n// General Information about an assembly is controlled through the following \r\n// set of attributes. Change these attribute values to modify the information\r\n// associated with an assembly.\r\n[assembly: AssemblyTitle(\"Billing.Payments.PaymentAccepted\")]\r\n[assembly: AssemblyDescription(\"\")]\r\n[assembly: AssemblyConfiguration(\"\")]\r\n[assembly: AssemblyCompany(\"\")]\r\n[assembly: AssemblyProduct(\"Billing.Payments.PaymentAccepted\")]\r\n[assembly: AssemblyCopyright(\"Copyright ©  2014\")]\r\n[assembly: AssemblyTrademark(\"\")]\r\n[assembly: AssemblyCulture(\"\")]\r\n\r\n// Setting ComVisible to false makes the types in this assembly not visible \r\n// to COM components.  If you need to access a type in this assembly from \r\n// COM, set the ComVisible attribute to true on that type.\r\n[assembly: ComVisible(false)]\r\n\r\n// The following GUID is for the ID of the typelib if this project is exposed to COM\r\n[assembly: Guid(\"7c14fade-565f-44ad-9e88-035ea990ed1d\")]\r\n\r\n// Version information for an assembly consists of the following four values:\r\n//\r\n//      Major Version\r\n//      Minor Version \r\n//      Build Number\r\n//      Revision\r\n//\r\n// You can specify all the values or you can default the Build and Revision Numbers \r\n// by using the '*' as shown below:\r\n// [assembly: AssemblyVersion(\"1.0.*\")]\r\n[assembly: AssemblyVersion(\"1.0.0.0\")]\r\n[assembly: AssemblyFileVersion(\"1.0.0.0\")]\r\n"
  },
  {
    "path": "12 - Integrating Via Messaging/Billing.Payments.PaymentAccepted/RecordPaymentAttemptHandler.cs",
    "content": "﻿using System;\r\nusing Billing.Messages.Commands;\r\nusing NServiceBus;\r\n\r\nnamespace Billing.Payments.PaymentAccepted\r\n{\r\n    public class RecordPaymentAttemptHandler : IHandleMessages<RecordPaymentAttempt>\r\n    {\r\n        // dependency injected by NServiceBus\r\n        public IBus Bus { get; set; }\r\n\r\n        public void Handle(RecordPaymentAttempt message)\r\n        {\r\n            Database.SavePaymentAttempt(message.OrderId, message.Status);\r\n            if (message.Status == PaymentStatus.Accepted)\r\n            {\r\n                var evnt = new Billing.Messages.Events.PaymentAccepted \r\n                { \r\n                    OrderId = message.OrderId\r\n                };\r\n                Bus.Publish(evnt);\r\n                Console.WriteLine(\r\n                    \"Recevied payment accepted notification for Order: {0}. Published PaymentAccepted event\",\r\n                    message.OrderId\r\n                );\r\n            }\r\n            else\r\n            {\r\n                // publish a payment rejected event\r\n            }\r\n        }\r\n\r\n        public  static class Database\r\n        {\r\n            public static void SavePaymentAttempt(string orderId, PaymentStatus status)\r\n            {\r\n                // .. save it to your favorite database\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "12 - Integrating Via Messaging/Billing.Payments.PaymentAccepted/packages.config",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<packages>\r\n  <package id=\"NServiceBus\" version=\"4.3.4\" targetFramework=\"net45\" />\r\n  <package id=\"NServiceBus.Host\" version=\"4.3.3\" targetFramework=\"net45\" />\r\n  <package id=\"NServiceBus.Interfaces\" version=\"4.3.4\" targetFramework=\"net45\" />\r\n</packages>"
  },
  {
    "path": "12 - Integrating Via Messaging/DDDesign.Web/App_Start/FilterConfig.cs",
    "content": "﻿using System.Web;\r\nusing System.Web.Mvc;\r\n\r\nnamespace DDDesign.Web\r\n{\r\n    public class FilterConfig\r\n    {\r\n        public static void RegisterGlobalFilters(GlobalFilterCollection filters)\r\n        {\r\n            filters.Add(new HandleErrorAttribute());\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "12 - Integrating Via Messaging/DDDesign.Web/App_Start/RouteConfig.cs",
    "content": "﻿using System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Web;\r\nusing System.Web.Mvc;\r\nusing System.Web.Routing;\r\n\r\nnamespace DDDesign.Web\r\n{\r\n    public class RouteConfig\r\n    {\r\n        public static void RegisterRoutes(RouteCollection routes)\r\n        {\r\n            routes.IgnoreRoute(\"{resource}.axd/{*pathInfo}\");\r\n\r\n            routes.MapRoute(\r\n                name: \"Default\",\r\n                url: \"{controller}/{action}/{id}\",\r\n                defaults: new { controller = \"Home\", action = \"Index\", id = UrlParameter.Optional }\r\n            );\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "12 - Integrating Via Messaging/DDDesign.Web/App_Start/WebApiConfig.cs",
    "content": "﻿using System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Web.Http;\r\n\r\nnamespace DDDesign.Web\r\n{\r\n    public static class WebApiConfig\r\n    {\r\n        public static void Register(HttpConfiguration config)\r\n        {\r\n            config.Routes.MapHttpRoute(\r\n                name: \"DefaultApi\",\r\n                routeTemplate: \"api/{controller}/{id}\",\r\n                defaults: new { id = RouteParameter.Optional }\r\n            );\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "12 - Integrating Via Messaging/DDDesign.Web/Controllers/OrdersController.cs",
    "content": "﻿using Sales.Messages.Commands;\nusing System;\nusing System.Linq;\nusing System.Web;\nusing System.Web.Mvc;\n\nnamespace DDDesign.Web.Controllers\n{\n    public class OrdersController : Controller\n    {\n        [HttpGet]\n        public ActionResult Index()\n        {\n            return View();\n        }\n\n        [HttpPost]\n        public ActionResult Place(string userId, string productIds, string shippingTypeId)\n        {\n            var realProductIds = productIds.Split(',');\n            var placeOrderCommand = new PlaceOrder\n            {\n                UserId = userId,\n                ProductIds = realProductIds,\n                ShippingTypeId = shippingTypeId,\n                TimeStamp = DateTime.Now\n            };\n            MvcApplication.Bus.Send(\"Sales.Orders.OrderCreated\", placeOrderCommand);\n\n            return Content(\"Your order has been placed. You will receive email confirmation shortly.\");\n        }\n\n    }\n}\n"
  },
  {
    "path": "12 - Integrating Via Messaging/DDDesign.Web/DDDesign.Web.csproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Project ToolsVersion=\"12.0\" DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\r\n  <Import Project=\"$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props\" Condition=\"Exists('$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props')\" />\r\n  <PropertyGroup>\r\n    <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>\r\n    <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>\r\n    <ProductVersion>\r\n    </ProductVersion>\r\n    <SchemaVersion>2.0</SchemaVersion>\r\n    <ProjectGuid>{577647AD-2F18-4590-B28F-D46F9351E0E0}</ProjectGuid>\r\n    <ProjectTypeGuids>{E3E379DF-F4C6-4180-9B81-6769533ABE47};{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>\r\n    <OutputType>Library</OutputType>\r\n    <AppDesignerFolder>Properties</AppDesignerFolder>\r\n    <RootNamespace>DDDesign.Web</RootNamespace>\r\n    <AssemblyName>DDDesign.Web</AssemblyName>\r\n    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r\n    <MvcBuildViews>false</MvcBuildViews>\r\n    <UseIISExpress>true</UseIISExpress>\r\n    <IISExpressSSLPort />\r\n    <IISExpressAnonymousAuthentication />\r\n    <IISExpressWindowsAuthentication />\r\n    <IISExpressUseClassicPipelineMode />\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' \">\r\n    <DebugSymbols>true</DebugSymbols>\r\n    <DebugType>full</DebugType>\r\n    <Optimize>false</Optimize>\r\n    <OutputPath>bin\\</OutputPath>\r\n    <DefineConstants>DEBUG;TRACE</DefineConstants>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <WarningLevel>4</WarningLevel>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' \">\r\n    <DebugType>pdbonly</DebugType>\r\n    <Optimize>true</Optimize>\r\n    <OutputPath>bin\\</OutputPath>\r\n    <DefineConstants>TRACE</DefineConstants>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <WarningLevel>4</WarningLevel>\r\n  </PropertyGroup>\r\n  <ItemGroup>\r\n    <Reference Include=\"Microsoft.CSharp\" />\r\n    <Reference Include=\"NServiceBus\">\r\n      <HintPath>..\\packages\\NServiceBus.Interfaces.4.3.4\\lib\\net40\\NServiceBus.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"NServiceBus.Core\">\r\n      <HintPath>..\\packages\\NServiceBus.4.3.3\\lib\\net40\\NServiceBus.Core.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"System\" />\r\n    <Reference Include=\"System.Data\" />\r\n    <Reference Include=\"System.Drawing\" />\r\n    <Reference Include=\"System.Web.DynamicData\" />\r\n    <Reference Include=\"System.Web.Entity\" />\r\n    <Reference Include=\"System.Web.ApplicationServices\" />\r\n    <Reference Include=\"System.ComponentModel.DataAnnotations\" />\r\n    <Reference Include=\"System.Core\" />\r\n    <Reference Include=\"System.Data.DataSetExtensions\" />\r\n    <Reference Include=\"System.Xml.Linq\" />\r\n    <Reference Include=\"System.Web\" />\r\n    <Reference Include=\"System.Web.Extensions\" />\r\n    <Reference Include=\"System.Web.Abstractions\" />\r\n    <Reference Include=\"System.Web.Routing\" />\r\n    <Reference Include=\"System.Xml\" />\r\n    <Reference Include=\"System.Configuration\" />\r\n    <Reference Include=\"System.Web.Services\" />\r\n    <Reference Include=\"System.EnterpriseServices\" />\r\n    <Reference Include=\"Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL\">\r\n      <Private>True</Private>\r\n      <HintPath>..\\packages\\Microsoft.Web.Infrastructure.1.0.0.0\\lib\\net40\\Microsoft.Web.Infrastructure.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"Microsoft.Web.Mvc.FixedDisplayModes, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL\">\r\n      <Private>True</Private>\r\n      <HintPath>..\\packages\\Microsoft.AspNet.Mvc.FixedDisplayModes.1.0.0\\lib\\net40\\Microsoft.Web.Mvc.FixedDisplayModes.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"Newtonsoft.Json\">\r\n      <HintPath>..\\packages\\Newtonsoft.Json.4.5.11\\lib\\net40\\Newtonsoft.Json.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"System.Net.Http\">\r\n    </Reference>\r\n    <Reference Include=\"System.Net.Http.Formatting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL\">\r\n      <HintPath>..\\packages\\Microsoft.AspNet.WebApi.Client.4.0.30506.0\\lib\\net40\\System.Net.Http.Formatting.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"System.Net.Http.WebRequest\">\r\n    </Reference>\r\n    <Reference Include=\"System.Web.Helpers, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL\">\r\n      <Private>True</Private>\r\n      <HintPath>..\\packages\\Microsoft.AspNet.WebPages.2.0.30506.0\\lib\\net40\\System.Web.Helpers.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"System.Web.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL\">\r\n      <HintPath>..\\packages\\Microsoft.AspNet.WebApi.Core.4.0.30506.0\\lib\\net40\\System.Web.Http.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"System.Web.Http.WebHost, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL\">\r\n      <HintPath>..\\packages\\Microsoft.AspNet.WebApi.WebHost.4.0.30506.0\\lib\\net40\\System.Web.Http.WebHost.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL\">\r\n      <Private>True</Private>\r\n      <HintPath>..\\packages\\Microsoft.AspNet.Mvc.4.0.30506.0\\lib\\net40\\System.Web.Mvc.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"System.Web.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL\">\r\n      <Private>True</Private>\r\n      <HintPath>..\\packages\\Microsoft.AspNet.Razor.2.0.30506.0\\lib\\net40\\System.Web.Razor.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"System.Web.WebPages, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL\">\r\n      <Private>True</Private>\r\n      <HintPath>..\\packages\\Microsoft.AspNet.WebPages.2.0.30506.0\\lib\\net40\\System.Web.WebPages.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"System.Web.WebPages.Deployment, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL\">\r\n      <Private>True</Private>\r\n      <HintPath>..\\packages\\Microsoft.AspNet.WebPages.2.0.30506.0\\lib\\net40\\System.Web.WebPages.Deployment.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL\">\r\n      <Private>True</Private>\r\n      <HintPath>..\\packages\\Microsoft.AspNet.WebPages.2.0.30506.0\\lib\\net40\\System.Web.WebPages.Razor.dll</HintPath>\r\n    </Reference>\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <Compile Include=\"Controllers\\OrdersController.cs\" />\r\n    <Compile Include=\"Global.asax.cs\">\r\n      <DependentUpon>Global.asax</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Properties\\AssemblyInfo.cs\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <Compile Include=\"App_Start\\FilterConfig.cs\" />\r\n    <Compile Include=\"App_Start\\RouteConfig.cs\" />\r\n    <Compile Include=\"App_Start\\WebApiConfig.cs\" />\r\n    <Content Include=\"Global.asax\" />\r\n    <Content Include=\"Web.config\" />\r\n    <Content Include=\"Web.Debug.config\">\r\n      <DependentUpon>Web.config</DependentUpon>\r\n    </Content>\r\n    <Content Include=\"Web.Release.config\">\r\n      <DependentUpon>Web.config</DependentUpon>\r\n    </Content>\r\n    <Content Include=\"Views\\Web.config\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <Folder Include=\"App_Data\\\" />\r\n    <Folder Include=\"Models\\\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <Content Include=\"packages.config\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <ProjectReference Include=\"..\\Sales.Messages\\Sales.Messages.csproj\">\r\n      <Project>{2dd347e9-1417-4ac5-9bdc-84dbe0707427}</Project>\r\n      <Name>Sales.Messages</Name>\r\n    </ProjectReference>\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <Content Include=\"Views\\Orders\\Index.cshtml\" />\r\n  </ItemGroup>\r\n  <PropertyGroup>\r\n    <VisualStudioVersion Condition=\"'$(VisualStudioVersion)' == ''\">10.0</VisualStudioVersion>\r\n    <VSToolsPath Condition=\"'$(VSToolsPath)' == ''\">$(MSBuildExtensionsPath32)\\Microsoft\\VisualStudio\\v$(VisualStudioVersion)</VSToolsPath>\r\n  </PropertyGroup>\r\n  <Import Project=\"$(MSBuildBinPath)\\Microsoft.CSharp.targets\" />\r\n  <Import Project=\"$(VSToolsPath)\\WebApplications\\Microsoft.WebApplication.targets\" Condition=\"'$(VSToolsPath)' != ''\" />\r\n  <Import Project=\"$(MSBuildExtensionsPath32)\\Microsoft\\VisualStudio\\v10.0\\WebApplications\\Microsoft.WebApplication.targets\" Condition=\"false\" />\r\n  <Target Name=\"MvcBuildViews\" AfterTargets=\"AfterBuild\" Condition=\"'$(MvcBuildViews)'=='true'\">\r\n    <AspNetCompiler VirtualPath=\"temp\" PhysicalPath=\"$(WebProjectOutputDir)\" />\r\n  </Target>\r\n  <ProjectExtensions>\r\n    <VisualStudio>\r\n      <FlavorProperties GUID=\"{349c5851-65df-11da-9384-00065b846f21}\">\r\n        <WebProjectProperties>\r\n          <UseIIS>True</UseIIS>\r\n          <AutoAssignPort>True</AutoAssignPort>\r\n          <DevelopmentServerPort>2066</DevelopmentServerPort>\r\n          <DevelopmentServerVPath>/</DevelopmentServerVPath>\r\n          <IISUrl>http://localhost:2066/</IISUrl>\r\n          <NTLMAuthentication>False</NTLMAuthentication>\r\n          <UseCustomServer>False</UseCustomServer>\r\n          <CustomServerUrl>\r\n          </CustomServerUrl>\r\n          <SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>\r\n        </WebProjectProperties>\r\n      </FlavorProperties>\r\n    </VisualStudio>\r\n  </ProjectExtensions>\r\n  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \r\n       Other similar extension points exist, see Microsoft.Common.targets.\r\n  <Target Name=\"BeforeBuild\">\r\n  </Target>\r\n  <Target Name=\"AfterBuild\">\r\n  </Target> -->\r\n</Project>"
  },
  {
    "path": "12 - Integrating Via Messaging/DDDesign.Web/Global.asax",
    "content": "﻿<%@ Application Codebehind=\"Global.asax.cs\" Inherits=\"DDDesign.Web.MvcApplication\" Language=\"C#\" %>\r\n"
  },
  {
    "path": "12 - Integrating Via Messaging/DDDesign.Web/Global.asax.cs",
    "content": "﻿using System.Web.Http;\r\nusing System.Web.Mvc;\r\nusing System.Web.Routing;\r\nusing NServiceBus;\r\nusing NServiceBus.Installation.Environments;\r\n\r\nnamespace DDDesign.Web\r\n{\r\n    public class MvcApplication : System.Web.HttpApplication\r\n    {\r\n        private static IBus bus;\r\n\r\n        public static IBus Bus { get { return bus; } }\r\n\r\n        protected void Application_Start()\r\n        {\r\n            Configure.Serialization.Xml();\r\n            bus = Configure.With()\r\n                           .DefaultBuilder()\r\n                           .DefiningCommandsAs(t => t.Namespace != null \r\n                               && t.Namespace.Contains(\"Commands\"))\r\n                           .UseTransport<Msmq>()\r\n                           .UnicastBus()\r\n                           .SendOnly();\r\n\r\n            // following code was provided by default and should remain un-modified\r\n            AreaRegistration.RegisterAllAreas();\r\n\r\n            WebApiConfig.Register(GlobalConfiguration.Configuration);\r\n            FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);\r\n            RouteConfig.RegisterRoutes(RouteTable.Routes);\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "12 - Integrating Via Messaging/DDDesign.Web/Properties/AssemblyInfo.cs",
    "content": "﻿using System.Reflection;\r\nusing System.Runtime.CompilerServices;\r\nusing System.Runtime.InteropServices;\r\n\r\n// General Information about an assembly is controlled through the following \r\n// set of attributes. Change these attribute values to modify the information\r\n// associated with an assembly.\r\n[assembly: AssemblyTitle(\"DDDesign.Web\")]\r\n[assembly: AssemblyDescription(\"\")]\r\n[assembly: AssemblyConfiguration(\"\")]\r\n[assembly: AssemblyCompany(\"\")]\r\n[assembly: AssemblyProduct(\"DDDesign.Web\")]\r\n[assembly: AssemblyCopyright(\"Copyright ©  2014\")]\r\n[assembly: AssemblyTrademark(\"\")]\r\n[assembly: AssemblyCulture(\"\")]\r\n\r\n// Setting ComVisible to false makes the types in this assembly not visible \r\n// to COM components.  If you need to access a type in this assembly from \r\n// COM, set the ComVisible attribute to true on that type.\r\n[assembly: ComVisible(false)]\r\n\r\n// The following GUID is for the ID of the typelib if this project is exposed to COM\r\n[assembly: Guid(\"e000afce-ae81-469c-b2fb-21cb969ea18e\")]\r\n\r\n// Version information for an assembly consists of the following four values:\r\n//\r\n//      Major Version\r\n//      Minor Version \r\n//      Build Number\r\n//      Revision\r\n//\r\n// You can specify all the values or you can default the Revision and Build Numbers \r\n// by using the '*' as shown below:\r\n[assembly: AssemblyVersion(\"1.0.0.0\")]\r\n[assembly: AssemblyFileVersion(\"1.0.0.0\")]\r\n"
  },
  {
    "path": "12 - Integrating Via Messaging/DDDesign.Web/Views/Orders/Index.cshtml",
    "content": "﻿<!DOCTYPE html>\r\n<html>\r\n    <head>\r\n        <title>Place an order</title>\r\n    </head>\r\n    <body>\r\n        <h1>Place an order</h1>\r\n        <form method=\"post\" action=\"/orders/place\">\r\n            <p>\r\n                UserId: <input type=\"text\" name=\"userId\" />\r\n            </p>\r\n            <p>\r\n                ProductIds: <input type=\"text\" name=\"productIds\" />\r\n            </p>\r\n            <p>\r\n                ShippingTypeId: <input type=\"text\" name=\"shippingTypeId\" />\r\n            </p>\r\n            <input type=\"submit\" value=\"Place order\" />\r\n        </form>\r\n    </body>\r\n</html>"
  },
  {
    "path": "12 - Integrating Via Messaging/DDDesign.Web/Views/Web.config",
    "content": "﻿<?xml version=\"1.0\"?>\r\n\r\n<configuration>\r\n  <configSections>\r\n    <sectionGroup name=\"system.web.webPages.razor\" type=\"System.Web.WebPages.Razor.Configuration.RazorWebSectionGroup, System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35\">\r\n      <section name=\"host\" type=\"System.Web.WebPages.Razor.Configuration.HostSection, System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35\" requirePermission=\"false\" />\r\n      <section name=\"pages\" type=\"System.Web.WebPages.Razor.Configuration.RazorPagesSection, System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35\" requirePermission=\"false\" />\r\n    </sectionGroup>\r\n  </configSections>\r\n\r\n  <system.web.webPages.razor>\r\n    <host factoryType=\"System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35\" />\r\n    <pages pageBaseType=\"System.Web.Mvc.WebViewPage\">\r\n      <namespaces>\r\n        <add namespace=\"System.Web.Mvc\" />\r\n        <add namespace=\"System.Web.Mvc.Ajax\" />\r\n        <add namespace=\"System.Web.Mvc.Html\" />\r\n        <add namespace=\"System.Web.Routing\" />\r\n      </namespaces>\r\n    </pages>\r\n  </system.web.webPages.razor>\r\n\r\n  <appSettings>\r\n    <add key=\"webpages:Enabled\" value=\"false\" />\r\n  </appSettings>\r\n\r\n  <system.web>\r\n    <httpHandlers>\r\n      <add path=\"*\" verb=\"*\" type=\"System.Web.HttpNotFoundHandler\"/>\r\n    </httpHandlers>\r\n\r\n    <!--\r\n        Enabling request validation in view pages would cause validation to occur\r\n        after the input has already been processed by the controller. By default\r\n        MVC performs request validation before a controller processes the input.\r\n        To change this behavior apply the ValidateInputAttribute to a\r\n        controller or action.\r\n    -->\r\n    <pages\r\n        validateRequest=\"false\"\r\n        pageParserFilterType=\"System.Web.Mvc.ViewTypeParserFilter, System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35\"\r\n        pageBaseType=\"System.Web.Mvc.ViewPage, System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35\"\r\n        userControlBaseType=\"System.Web.Mvc.ViewUserControl, System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35\">\r\n      <controls>\r\n        <add assembly=\"System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35\" namespace=\"System.Web.Mvc\" tagPrefix=\"mvc\" />\r\n      </controls>\r\n    </pages>\r\n  </system.web>\r\n\r\n  <system.webServer>\r\n    <validation validateIntegratedModeConfiguration=\"false\" />\r\n\r\n    <handlers>\r\n      <remove name=\"BlockViewHandler\"/>\r\n      <add name=\"BlockViewHandler\" path=\"*\" verb=\"*\" preCondition=\"integratedMode\" type=\"System.Web.HttpNotFoundHandler\" />\r\n    </handlers>\r\n  </system.webServer>\r\n</configuration>\r\n"
  },
  {
    "path": "12 - Integrating Via Messaging/DDDesign.Web/Web.Debug.config",
    "content": "﻿<?xml version=\"1.0\"?>\r\n\r\n<!-- For more information on using Web.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 -->\r\n\r\n<configuration xmlns:xdt=\"http://schemas.microsoft.com/XML-Document-Transform\">\r\n  <!--\r\n    In the example below, the \"SetAttributes\" transform will change the value of \r\n    \"connectionString\" to use \"ReleaseSQLServer\" only when the \"Match\" locator \r\n    finds an atrribute \"name\" that has a value of \"MyDB\".\r\n    \r\n    <connectionStrings>\r\n      <add name=\"MyDB\" \r\n        connectionString=\"Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True\" \r\n        xdt:Transform=\"SetAttributes\" xdt:Locator=\"Match(name)\"/>\r\n    </connectionStrings>\r\n  -->\r\n  <system.web>\r\n    <!--\r\n      In the example below, the \"Replace\" transform will replace the entire \r\n      <customErrors> section of your Web.config file.\r\n      Note that because there is only one customErrors section under the \r\n      <system.web> node, there is no need to use the \"xdt:Locator\" attribute.\r\n      \r\n      <customErrors defaultRedirect=\"GenericError.htm\"\r\n        mode=\"RemoteOnly\" xdt:Transform=\"Replace\">\r\n        <error statusCode=\"500\" redirect=\"InternalError.htm\"/>\r\n      </customErrors>\r\n    -->\r\n  </system.web>\r\n</configuration>"
  },
  {
    "path": "12 - Integrating Via Messaging/DDDesign.Web/Web.Release.config",
    "content": "﻿<?xml version=\"1.0\"?>\r\n\r\n<!-- For more information on using Web.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 -->\r\n\r\n<configuration xmlns:xdt=\"http://schemas.microsoft.com/XML-Document-Transform\">\r\n  <!--\r\n    In the example below, the \"SetAttributes\" transform will change the value of \r\n    \"connectionString\" to use \"ReleaseSQLServer\" only when the \"Match\" locator \r\n    finds an atrribute \"name\" that has a value of \"MyDB\".\r\n    \r\n    <connectionStrings>\r\n      <add name=\"MyDB\" \r\n        connectionString=\"Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True\" \r\n        xdt:Transform=\"SetAttributes\" xdt:Locator=\"Match(name)\"/>\r\n    </connectionStrings>\r\n  -->\r\n  <system.web>\r\n    <compilation xdt:Transform=\"RemoveAttributes(debug)\" />\r\n    <!--\r\n      In the example below, the \"Replace\" transform will replace the entire \r\n      <customErrors> section of your Web.config file.\r\n      Note that because there is only one customErrors section under the \r\n      <system.web> node, there is no need to use the \"xdt:Locator\" attribute.\r\n      \r\n      <customErrors defaultRedirect=\"GenericError.htm\"\r\n        mode=\"RemoteOnly\" xdt:Transform=\"Replace\">\r\n        <error statusCode=\"500\" redirect=\"InternalError.htm\"/>\r\n      </customErrors>\r\n    -->\r\n  </system.web>\r\n</configuration>"
  },
  {
    "path": "12 - Integrating Via Messaging/DDDesign.Web/Web.config",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<!--\r\n  For more information on how to configure your ASP.NET application, please visit\r\n  http://go.microsoft.com/fwlink/?LinkId=169433\r\n  -->\r\n\r\n<configuration>\r\n  <appSettings>\r\n    <add key=\"webpages:Version\" value=\"2.0.0.0\" />\r\n    <add key=\"webpages:Enabled\" value=\"false\" />\r\n    <add key=\"PreserveLoginUrl\" value=\"true\" />\r\n    <add key=\"ClientValidationEnabled\" value=\"true\" />\r\n    <add key=\"UnobtrusiveJavaScriptEnabled\" value=\"true\" />\r\n  </appSettings>\r\n\r\n  <system.web>\r\n    \r\n    <httpRuntime targetFramework=\"4.5\" />\r\n    \r\n    <compilation debug=\"true\" targetFramework=\"4.5\" />\r\n\r\n    <pages>\r\n      <namespaces>\r\n        <add namespace=\"System.Web.Helpers\" />\r\n        <add namespace=\"System.Web.Mvc\" />\r\n        <add namespace=\"System.Web.Mvc.Ajax\" />\r\n        <add namespace=\"System.Web.Mvc.Html\" />\r\n        <add namespace=\"System.Web.Routing\" />\r\n        <add namespace=\"System.Web.WebPages\" />\r\n      </namespaces>\r\n    </pages>\r\n  </system.web>\r\n\r\n  <system.webServer>\r\n    <validation validateIntegratedModeConfiguration=\"false\" />\r\n     \r\n  <handlers>\r\n      <remove name=\"ExtensionlessUrlHandler-ISAPI-4.0_32bit\" />\r\n      <remove name=\"ExtensionlessUrlHandler-ISAPI-4.0_64bit\" />\r\n      <remove name=\"ExtensionlessUrlHandler-Integrated-4.0\" />\r\n      <add name=\"ExtensionlessUrlHandler-ISAPI-4.0_32bit\" path=\"*.\" verb=\"GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS\" modules=\"IsapiModule\" scriptProcessor=\"%windir%\\Microsoft.NET\\Framework\\v4.0.30319\\aspnet_isapi.dll\" preCondition=\"classicMode,runtimeVersionv4.0,bitness32\" responseBufferLimit=\"0\" />\r\n      <add name=\"ExtensionlessUrlHandler-ISAPI-4.0_64bit\" path=\"*.\" verb=\"GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS\" modules=\"IsapiModule\" scriptProcessor=\"%windir%\\Microsoft.NET\\Framework64\\v4.0.30319\\aspnet_isapi.dll\" preCondition=\"classicMode,runtimeVersionv4.0,bitness64\" responseBufferLimit=\"0\" />\r\n      <add name=\"ExtensionlessUrlHandler-Integrated-4.0\" path=\"*.\" verb=\"GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS\" type=\"System.Web.Handlers.TransferRequestHandler\" preCondition=\"integratedMode,runtimeVersionv4.0\" />\r\n    </handlers></system.webServer>\r\n</configuration>\r\n"
  },
  {
    "path": "12 - Integrating Via Messaging/DDDesign.Web/packages.config",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<packages>\r\n  <package id=\"Microsoft.AspNet.Mvc\" version=\"4.0.30506.0\" targetFramework=\"net45\" />\r\n  <package id=\"Microsoft.AspNet.Mvc.FixedDisplayModes\" version=\"1.0.0\" targetFramework=\"net45\" />\r\n  <package id=\"Microsoft.AspNet.Razor\" version=\"2.0.30506.0\" targetFramework=\"net45\" />\r\n  <package id=\"Microsoft.AspNet.WebApi\" version=\"4.0.30506.0\" targetFramework=\"net45\" />\r\n  <package id=\"Microsoft.AspNet.WebApi.Client\" version=\"4.0.30506.0\" targetFramework=\"net45\" />\r\n  <package id=\"Microsoft.AspNet.WebApi.Core\" version=\"4.0.30506.0\" targetFramework=\"net45\" />\r\n  <package id=\"Microsoft.AspNet.WebApi.WebHost\" version=\"4.0.30506.0\" targetFramework=\"net45\" />\r\n  <package id=\"Microsoft.AspNet.WebPages\" version=\"2.0.30506.0\" targetFramework=\"net45\" />\r\n  <package id=\"Microsoft.Net.Http\" version=\"2.0.20710.0\" targetFramework=\"net45\" />\r\n  <package id=\"Microsoft.Web.Infrastructure\" version=\"1.0.0.0\" targetFramework=\"net45\" />\r\n  <package id=\"Newtonsoft.Json\" version=\"4.5.11\" targetFramework=\"net45\" />\r\n  <package id=\"NServiceBus\" version=\"4.3.3\" targetFramework=\"net45\" />\r\n  <package id=\"NServiceBus.Interfaces\" version=\"4.3.4\" targetFramework=\"net45\" />\r\n</packages>"
  },
  {
    "path": "12 - Integrating Via Messaging/DDDesign.sln",
    "content": "﻿\nMicrosoft Visual Studio Solution File, Format Version 12.00\n# Visual Studio 2012\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"Sales.Messages\", \"Sales.Messages\\Sales.Messages.csproj\", \"{2DD347E9-1417-4AC5-9BDC-84DBE0707427}\"\nEndProject\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"DDDesign.Web\", \"DDDesign.Web\\DDDesign.Web.csproj\", \"{577647AD-2F18-4590-B28F-D46F9351E0E0}\"\nEndProject\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"Sales.Orders.OrderCreated\", \"Sales.Orders.OrderCreated\\Sales.Orders.OrderCreated.csproj\", \"{18455B18-D42C-4B5A-98E0-2112F8066542}\"\nEndProject\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"Billing.Payments.PaymentAccepted\", \"Billing.Payments.PaymentAccepted\\Billing.Payments.PaymentAccepted.csproj\", \"{D8BE42BB-5FD0-4DB2-919B-9FCB8D455F63}\"\nEndProject\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"Billing.Messages\", \"Billing.Messages\\Billing.Messages.csproj\", \"{B3707164-FF36-473E-877D-A652C8E41D14}\"\nEndProject\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"Shipping.BusinessCustomers.ShippingArranged\", \"Shipping.BusinessCustomers.ShippingArranged\\Shipping.BusinessCustomers.ShippingArranged.csproj\", \"{2A146AA7-EF86-4304-839C-C43B97834F15}\"\nEndProject\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"Shipping.Messages\", \"Shipping.Messages\\Shipping.Messages.csproj\", \"{AB3A64C2-9FD1-4382-AAB8-10748573DE98}\"\nEndProject\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"Promotions.LuckyWinner.LuckyWinnerSelected\", \"Promotions.LuckyWinner.LuckyWinnerSelected\\Promotions.LuckyWinner.LuckyWinnerSelected.csproj\", \"{150B3671-0358-4A92-B1B1-040E1E8A4E75}\"\nEndProject\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"Promotions.LuckyWinner.LuckyWinnerSelected.Bridge\", \"Promotions.LuckyWinner.LuckyWinnerSelected.Bridge\\Promotions.LuckyWinner.LuckyWinnerSelected.Bridge.csproj\", \"{7E833DCC-577E-4601-83DD-E6B71F1B9D77}\"\nEndProject\nProject(\"{2150E333-8FDC-42A3-9474-1A3956D46DE8}\") = \"Billing Context\", \"Billing Context\", \"{3127DD92-DAB4-481E-8A8B-37C22A6D6780}\"\nEndProject\nProject(\"{2150E333-8FDC-42A3-9474-1A3956D46DE8}\") = \"Promotions Context\", \"Promotions Context\", \"{E9D889AA-241E-4DFA-B81D-43449F1DBE76}\"\nEndProject\nProject(\"{2150E333-8FDC-42A3-9474-1A3956D46DE8}\") = \"Sales Context\", \"Sales Context\", \"{AE53C794-2020-4930-A9A9-4F97EDAD9686}\"\nEndProject\nProject(\"{2150E333-8FDC-42A3-9474-1A3956D46DE8}\") = \"Shipping Context\", \"Shipping Context\", \"{079CBA19-BF9F-437B-83DE-47984F187549}\"\nEndProject\nGlobal\n\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\n\t\tDebug|Any CPU = Debug|Any CPU\n\t\tRelease|Any CPU = Release|Any CPU\n\tEndGlobalSection\n\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\n\t\t{2DD347E9-1417-4AC5-9BDC-84DBE0707427}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{2DD347E9-1417-4AC5-9BDC-84DBE0707427}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{2DD347E9-1417-4AC5-9BDC-84DBE0707427}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{2DD347E9-1417-4AC5-9BDC-84DBE0707427}.Release|Any CPU.Build.0 = Release|Any CPU\n\t\t{577647AD-2F18-4590-B28F-D46F9351E0E0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{577647AD-2F18-4590-B28F-D46F9351E0E0}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{577647AD-2F18-4590-B28F-D46F9351E0E0}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{577647AD-2F18-4590-B28F-D46F9351E0E0}.Release|Any CPU.Build.0 = Release|Any CPU\n\t\t{18455B18-D42C-4B5A-98E0-2112F8066542}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{18455B18-D42C-4B5A-98E0-2112F8066542}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{18455B18-D42C-4B5A-98E0-2112F8066542}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{18455B18-D42C-4B5A-98E0-2112F8066542}.Release|Any CPU.Build.0 = Release|Any CPU\n\t\t{D8BE42BB-5FD0-4DB2-919B-9FCB8D455F63}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{D8BE42BB-5FD0-4DB2-919B-9FCB8D455F63}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{D8BE42BB-5FD0-4DB2-919B-9FCB8D455F63}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{D8BE42BB-5FD0-4DB2-919B-9FCB8D455F63}.Release|Any CPU.Build.0 = Release|Any CPU\n\t\t{B3707164-FF36-473E-877D-A652C8E41D14}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{B3707164-FF36-473E-877D-A652C8E41D14}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{B3707164-FF36-473E-877D-A652C8E41D14}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{B3707164-FF36-473E-877D-A652C8E41D14}.Release|Any CPU.Build.0 = Release|Any CPU\n\t\t{2A146AA7-EF86-4304-839C-C43B97834F15}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{2A146AA7-EF86-4304-839C-C43B97834F15}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{2A146AA7-EF86-4304-839C-C43B97834F15}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{2A146AA7-EF86-4304-839C-C43B97834F15}.Release|Any CPU.Build.0 = Release|Any CPU\n\t\t{AB3A64C2-9FD1-4382-AAB8-10748573DE98}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{AB3A64C2-9FD1-4382-AAB8-10748573DE98}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{AB3A64C2-9FD1-4382-AAB8-10748573DE98}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{AB3A64C2-9FD1-4382-AAB8-10748573DE98}.Release|Any CPU.Build.0 = Release|Any CPU\n\t\t{150B3671-0358-4A92-B1B1-040E1E8A4E75}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{150B3671-0358-4A92-B1B1-040E1E8A4E75}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{150B3671-0358-4A92-B1B1-040E1E8A4E75}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{150B3671-0358-4A92-B1B1-040E1E8A4E75}.Release|Any CPU.Build.0 = Release|Any CPU\n\t\t{7E833DCC-577E-4601-83DD-E6B71F1B9D77}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{7E833DCC-577E-4601-83DD-E6B71F1B9D77}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{7E833DCC-577E-4601-83DD-E6B71F1B9D77}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{7E833DCC-577E-4601-83DD-E6B71F1B9D77}.Release|Any CPU.Build.0 = Release|Any CPU\n\tEndGlobalSection\n\tGlobalSection(SolutionProperties) = preSolution\n\t\tHideSolutionNode = FALSE\n\tEndGlobalSection\n\tGlobalSection(NestedProjects) = preSolution\n\t\t{B3707164-FF36-473E-877D-A652C8E41D14} = {3127DD92-DAB4-481E-8A8B-37C22A6D6780}\n\t\t{D8BE42BB-5FD0-4DB2-919B-9FCB8D455F63} = {3127DD92-DAB4-481E-8A8B-37C22A6D6780}\n\t\t{150B3671-0358-4A92-B1B1-040E1E8A4E75} = {E9D889AA-241E-4DFA-B81D-43449F1DBE76}\n\t\t{7E833DCC-577E-4601-83DD-E6B71F1B9D77} = {E9D889AA-241E-4DFA-B81D-43449F1DBE76}\n\t\t{18455B18-D42C-4B5A-98E0-2112F8066542} = {AE53C794-2020-4930-A9A9-4F97EDAD9686}\n\t\t{2DD347E9-1417-4AC5-9BDC-84DBE0707427} = {AE53C794-2020-4930-A9A9-4F97EDAD9686}\n\t\t{2A146AA7-EF86-4304-839C-C43B97834F15} = {079CBA19-BF9F-437B-83DE-47984F187549}\n\t\t{AB3A64C2-9FD1-4382-AAB8-10748573DE98} = {079CBA19-BF9F-437B-83DE-47984F187549}\n\tEndGlobalSection\nEndGlobal\n"
  },
  {
    "path": "12 - Integrating Via Messaging/Promotions.LuckyWinner.LuckyWinnerSelected/App.config",
    "content": "﻿<?xml version=\"1.0\"?>\r\n<configuration>\r\n  <startup>\r\n    <supportedRuntime version=\"v4.0\" sku=\".NETFramework,Version=v4.0\"/>\r\n  </startup>\r\n</configuration>"
  },
  {
    "path": "12 - Integrating Via Messaging/Promotions.LuckyWinner.LuckyWinnerSelected/Application/Program.cs",
    "content": "﻿using MassTransit;\nusing System;\nusing System.Linq;\nusing System.Collections.Generic;\nusing System.Threading;\nusing System.IO;\nusing MassTransit.Context;\nusing System.Text;\n\nnamespace Promotions.LuckyWinner.LuckyWinnerSelected\n{\n    public class Program\n    {\n        public static void Main(string[] args)\n        {\n            Bus.Initialize(config =>\n            {\n                config.UseMsmq();\n                // look on this queue for order placed event messages\n                config.ReceiveFrom(\"msmq://localhost/promotions.ordercreated\");\n                // subscribe to order placed events\n                config.Subscribe(sub =>\n                {\n                    // handle order placed events like this\n                    sub.Handler<OrderCreated>(msg => new OrderCreatedHandler().Handle(msg));\n                });\n\n            });\n\n           // keep the application running so it can listen for messages\n            while(true)\n            {\n                Thread.Sleep(1000);\n            }\n        }\n    }\n\n    public class OrderCreated\n    {\n        public string OrderId { get; set; }\n\n        public string UserId { get; set; }\n\n        public List<string> ProductIds { get; set; }\n\n        public string ShippingTypeId { get; set; }\n\n        public DateTime TimeStamp { get; set; }\n\n        public double Amount { get; set; }\n    }\n   \n    public class OrderCreatedHandler\n    {\n        public void Handle(OrderCreated message)\n        {\n            Console.WriteLine(\n                \"Mass Transit handling order placed event: Order: {0} for User: {1}\", \n                message.OrderId, message.UserId);\n        }\n    }\n\n}\n"
  },
  {
    "path": "12 - Integrating Via Messaging/Promotions.LuckyWinner.LuckyWinnerSelected/Promotions.LuckyWinner.LuckyWinnerSelected.csproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"12.0\" DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <Import Project=\"$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props\" Condition=\"Exists('$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props')\" />\n  <PropertyGroup>\n    <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>\n    <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>\n    <ProjectGuid>{150B3671-0358-4A92-B1B1-040E1E8A4E75}</ProjectGuid>\n    <OutputType>Exe</OutputType>\n    <AppDesignerFolder>Properties</AppDesignerFolder>\n    <RootNamespace>Promotions.LuckyWinner.LuckyWinnerSelected</RootNamespace>\n    <AssemblyName>Promotions.LuckyWinner.LuckyWinnerSelected</AssemblyName>\n    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\n    <FileAlignment>512</FileAlignment>\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' \">\n    <DebugSymbols>true</DebugSymbols>\n    <DebugType>full</DebugType>\n    <Optimize>false</Optimize>\n    <OutputPath>bin\\Debug\\</OutputPath>\n    <DefineConstants>DEBUG;TRACE</DefineConstants>\n    <ErrorReport>prompt</ErrorReport>\n    <WarningLevel>4</WarningLevel>\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' \">\n    <DebugType>pdbonly</DebugType>\n    <Optimize>true</Optimize>\n    <OutputPath>bin\\Release\\</OutputPath>\n    <DefineConstants>TRACE</DefineConstants>\n    <ErrorReport>prompt</ErrorReport>\n    <WarningLevel>4</WarningLevel>\n  </PropertyGroup>\n  <PropertyGroup>\n    <StartupObject />\n  </PropertyGroup>\n  <ItemGroup>\n    <Reference Include=\"Magnum\">\n      <HintPath>..\\packages\\Magnum.2.1.2\\lib\\NET40\\Magnum.dll</HintPath>\n    </Reference>\n    <Reference Include=\"MassTransit\">\n      <HintPath>..\\packages\\MassTransit.2.9.5\\lib\\net40\\MassTransit.dll</HintPath>\n    </Reference>\n    <Reference Include=\"MassTransit.Transports.MSMQ\">\n      <HintPath>..\\packages\\MassTransit.MSMQ.2.9.5\\lib\\net40\\MassTransit.Transports.MSMQ.dll</HintPath>\n    </Reference>\n    <Reference Include=\"Newtonsoft.Json\">\n      <HintPath>..\\packages\\Newtonsoft.Json.5.0.8\\lib\\net45\\Newtonsoft.Json.dll</HintPath>\n    </Reference>\n    <Reference Include=\"System\" />\n    <Reference Include=\"System.Core\" />\n    <Reference Include=\"System.Xml.Linq\" />\n    <Reference Include=\"System.Data.DataSetExtensions\" />\n    <Reference Include=\"Microsoft.CSharp\" />\n    <Reference Include=\"System.Data\" />\n    <Reference Include=\"System.Xml\" />\n  </ItemGroup>\n  <ItemGroup>\n    <Compile Include=\"Application\\Program.cs\" />\n    <Compile Include=\"Properties\\AssemblyInfo.cs\" />\n  </ItemGroup>\n  <ItemGroup>\n    <None Include=\"App.config\" />\n    <None Include=\"packages.config\" />\n  </ItemGroup>\n  <ItemGroup>\n    <Folder Include=\"Infrastructure\\\" />\n    <Folder Include=\"Model\\\" />\n  </ItemGroup>\n  <Import Project=\"$(MSBuildToolsPath)\\Microsoft.CSharp.targets\" />\n  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \n       Other similar extension points exist, see Microsoft.Common.targets.\n  <Target Name=\"BeforeBuild\">\n  </Target>\n  <Target Name=\"AfterBuild\">\n  </Target>\n  -->\n</Project>"
  },
  {
    "path": "12 - Integrating Via Messaging/Promotions.LuckyWinner.LuckyWinnerSelected/Properties/AssemblyInfo.cs",
    "content": "﻿using System.Reflection;\r\nusing System.Runtime.CompilerServices;\r\nusing System.Runtime.InteropServices;\r\n\r\n// General Information about an assembly is controlled through the following \r\n// set of attributes. Change these attribute values to modify the information\r\n// associated with an assembly.\r\n[assembly: AssemblyTitle(\"Promotions.LuckyWinner.LuckyWinnerSelected\")]\r\n[assembly: AssemblyDescription(\"\")]\r\n[assembly: AssemblyConfiguration(\"\")]\r\n[assembly: AssemblyCompany(\"\")]\r\n[assembly: AssemblyProduct(\"Promotions.LuckyWinner.LuckyWinnerSelected\")]\r\n[assembly: AssemblyCopyright(\"Copyright ©  2014\")]\r\n[assembly: AssemblyTrademark(\"\")]\r\n[assembly: AssemblyCulture(\"\")]\r\n\r\n// Setting ComVisible to false makes the types in this assembly not visible \r\n// to COM components.  If you need to access a type in this assembly from \r\n// COM, set the ComVisible attribute to true on that type.\r\n[assembly: ComVisible(false)]\r\n\r\n// The following GUID is for the ID of the typelib if this project is exposed to COM\r\n[assembly: Guid(\"dee36a48-7037-40ce-bc76-e357ca417751\")]\r\n\r\n// Version information for an assembly consists of the following four values:\r\n//\r\n//      Major Version\r\n//      Minor Version \r\n//      Build Number\r\n//      Revision\r\n//\r\n// You can specify all the values or you can default the Build and Revision Numbers \r\n// by using the '*' as shown below:\r\n// [assembly: AssemblyVersion(\"1.0.*\")]\r\n[assembly: AssemblyVersion(\"1.0.0.0\")]\r\n[assembly: AssemblyFileVersion(\"1.0.0.0\")]\r\n"
  },
  {
    "path": "12 - Integrating Via Messaging/Promotions.LuckyWinner.LuckyWinnerSelected/packages.config",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<packages>\r\n  <package id=\"Magnum\" version=\"2.1.2\" targetFramework=\"net45\" />\r\n  <package id=\"MassTransit\" version=\"2.9.5\" targetFramework=\"net45\" />\r\n  <package id=\"MassTransit.MSMQ\" version=\"2.9.5\" targetFramework=\"net45\" />\r\n  <package id=\"Newtonsoft.Json\" version=\"5.0.8\" targetFramework=\"net45\" />\r\n</packages>"
  },
  {
    "path": "12 - Integrating Via Messaging/Promotions.LuckyWinner.LuckyWinnerSelected.Bridge/App.config",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>\r\n<configuration>\r\n  <configSections>\r\n    <section name=\"MessageForwardingInCaseOfFaultConfig\" type=\"NServiceBus.Config.MessageForwardingInCaseOfFaultConfig, NServiceBus.Core\" />\r\n    <section name=\"UnicastBusConfig\" type=\"NServiceBus.Config.UnicastBusConfig, NServiceBus.Core\" />\r\n    <section name=\"AuditConfig\" type=\"NServiceBus.Config.AuditConfig, NServiceBus.Core\" />\r\n  </configSections>\r\n  <MessageForwardingInCaseOfFaultConfig ErrorQueue=\"error\" />\r\n  <UnicastBusConfig>\r\n    <MessageEndpointMappings>\r\n      <add Messages=\"Sales.Messages\" Type=\"Sales.Messages.OrderCreated_V2\" Endpoint=\"Sales.Orders.OrderCreated\" />\r\n    </MessageEndpointMappings>\r\n  </UnicastBusConfig>\r\n  <AuditConfig QueueName=\"audit\" />\r\n</configuration>"
  },
  {
    "path": "12 - Integrating Via Messaging/Promotions.LuckyWinner.LuckyWinnerSelected.Bridge/Application/OrderCreatedHandler.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing NServiceBus;\nusing System.Messaging;\nusing Sales.Messages.Events;\nusing System.Xml.Linq;\nusing System.Xml;\n\nnamespace Promotions.LuckyWinner.LuckyWinnerSelected.Bridge\n{\n    public class OrderCreatedHandler : IHandleMessages<OrderCreated_V2>\n    {\n\n        public void Handle(OrderCreated_V2 message)\n        {\n            Console.WriteLine(\n                \"Bridge received order: {0}. \" +\n                \"About to push it onto Mass Transit's queue\",\n                message.OrderId\n            );\n            var massMsg = ConvertToMassTransitXmlMessageFormat(message);\n            var msmqMsg = new Message \n            {\n                Body = XDocument.Parse(massMsg).Root,\n                Extension = Encoding.UTF8.GetBytes(\"{\\\"Content-Type\\\":\\\"application/vnd.masstransit+xml\\\"}\")\n            };\n            var queue = new MessageQueue(\".\\\\Private$\\\\promotions.ordercreated\", QueueAccessMode.Send);\n            queue.Send(msmqMsg);\n        }\n\n        // use a more robust strategy in production\n        // this approach is used to highligh format mass transit needs\n        private string ConvertToMassTransitXmlMessageFormat(OrderCreated_V2 message)\n        {\n            return \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\" +\n             \"<envelope>\" +\n                \"<headers />\" +\n                \"<destinationAddress>msmq://localhost/promotions.ordercreated?tx=false&amp;recoverable=true</destinationAddress>\" +\n                 \"<message>\" +\n                     \"<orderId>\" + message.OrderId + \"</orderId>\" +\n                     \"<userId>\" + message.UserId + \"</userId>\" +\n                     GenerateProductIdsXml(message.ProductIds) +\n                     \"<shippingTypeId>\" + message.ShippingTypeId + \"</shippingTypeId>\" +\n                     \"<amount>\" + message.Amount + \"</amount>\" +\n                     \"<timestamp>\" + XmlConvert.ToString(message.TimeStamp, XmlDateTimeSerializationMode.Utc) + \"</timestamp>\" +\n                 \"</message>\" +\n                 \"<messageType>urn:message:Promotions.LuckyWinner.LuckyWinnerSelected:OrderCreated</messageType>\" +\n              \"</envelope>\";\n        }\n\n         \n        private string GenerateProductIdsXml(IEnumerable<string> productIds)\n        {\n            return String.Join(\"\", productIds.Select(p => \"<productIds>\" + p + \"</productIds>\"));\n        }\n    }\n}\n"
  },
  {
    "path": "12 - Integrating Via Messaging/Promotions.LuckyWinner.LuckyWinnerSelected.Bridge/Infrastructure/EndpointConfig.cs",
    "content": "\nnamespace Promotions.LuckyWinner.LuckyWinnerSelected.Bridge\n{\n    using NServiceBus;\n\n    public class EndpointConfig : IConfigureThisEndpoint, AsA_Server, IWantCustomInitialization, AsA_Publisher\n    {\n        public void Init()\n        {\n            Configure.With()\n                     .DefiningCommandsAs(t => t.Namespace != null \n                         && t.Namespace.Contains(\"Commands\"))\n                     .DefiningEventsAs(t => t.Namespace != null && t.Namespace.Contains(\"Events\"));\n        }\n    }\n}\n"
  },
  {
    "path": "12 - Integrating Via Messaging/Promotions.LuckyWinner.LuckyWinnerSelected.Bridge/Promotions.LuckyWinner.LuckyWinnerSelected.Bridge.csproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"12.0\" DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <Import Project=\"$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props\" Condition=\"Exists('$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props')\" />\n  <PropertyGroup>\n    <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>\n    <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>\n    <ProjectGuid>{7E833DCC-577E-4601-83DD-E6B71F1B9D77}</ProjectGuid>\n    <OutputType>Library</OutputType>\n    <AppDesignerFolder>Properties</AppDesignerFolder>\n    <RootNamespace>Promotions.LuckyWinner.LuckyWinnerSelected.Bridge</RootNamespace>\n    <AssemblyName>Promotions.LuckyWinner.LuckyWinnerSelected.Bridge</AssemblyName>\n    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\n    <FileAlignment>512</FileAlignment>\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' \">\n    <DebugSymbols>true</DebugSymbols>\n    <DebugType>full</DebugType>\n    <Optimize>false</Optimize>\n    <OutputPath>bin\\Debug\\</OutputPath>\n    <DefineConstants>DEBUG;TRACE</DefineConstants>\n    <ErrorReport>prompt</ErrorReport>\n    <WarningLevel>4</WarningLevel>\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' \">\n    <DebugType>pdbonly</DebugType>\n    <Optimize>true</Optimize>\n    <OutputPath>bin\\Release\\</OutputPath>\n    <DefineConstants>TRACE</DefineConstants>\n    <ErrorReport>prompt</ErrorReport>\n    <WarningLevel>4</WarningLevel>\n  </PropertyGroup>\n  <PropertyGroup>\n    <StartupObject />\n  </PropertyGroup>\n  <ItemGroup>\n    <Reference Include=\"NServiceBus\">\n      <HintPath>..\\packages\\NServiceBus.Interfaces.4.3.4\\lib\\net40\\NServiceBus.dll</HintPath>\n    </Reference>\n    <Reference Include=\"NServiceBus.Core\">\n      <HintPath>..\\packages\\NServiceBus.4.3.4\\lib\\net40\\NServiceBus.Core.dll</HintPath>\n    </Reference>\n    <Reference Include=\"NServiceBus.Host\">\n      <HintPath>..\\packages\\NServiceBus.Host.4.3.3\\lib\\net40\\NServiceBus.Host.exe</HintPath>\n    </Reference>\n    <Reference Include=\"System\" />\n    <Reference Include=\"System.Core\" />\n    <Reference Include=\"System.Messaging\" />\n    <Reference Include=\"System.Xml.Linq\" />\n    <Reference Include=\"System.Data.DataSetExtensions\" />\n    <Reference Include=\"Microsoft.CSharp\" />\n    <Reference Include=\"System.Data\" />\n    <Reference Include=\"System.Xml\" />\n  </ItemGroup>\n  <ItemGroup>\n    <Compile Include=\"Infrastructure\\EndpointConfig.cs\" />\n    <Compile Include=\"Application\\OrderCreatedHandler.cs\" />\n    <Compile Include=\"Properties\\AssemblyInfo.cs\" />\n  </ItemGroup>\n  <ItemGroup>\n    <None Include=\"App.config\" />\n    <None Include=\"packages.config\" />\n  </ItemGroup>\n  <ItemGroup>\n    <ProjectReference Include=\"..\\Sales.Messages\\Sales.Messages.csproj\">\n      <Project>{2dd347e9-1417-4ac5-9bdc-84dbe0707427}</Project>\n      <Name>Sales.Messages</Name>\n    </ProjectReference>\n  </ItemGroup>\n  <ItemGroup>\n    <Folder Include=\"Model\\\" />\n  </ItemGroup>\n  <Import Project=\"$(MSBuildToolsPath)\\Microsoft.CSharp.targets\" />\n  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \n       Other similar extension points exist, see Microsoft.Common.targets.\n  <Target Name=\"BeforeBuild\">\n  </Target>\n  <Target Name=\"AfterBuild\">\n  </Target>\n  -->\n  <PropertyGroup>\n    <StartAction>Program</StartAction>\n    <StartProgram>$(ProjectDir)$(OutputPath)NServiceBus.Host.exe</StartProgram>\n  </PropertyGroup>\n</Project>"
  },
  {
    "path": "12 - Integrating Via Messaging/Promotions.LuckyWinner.LuckyWinnerSelected.Bridge/Properties/AssemblyInfo.cs",
    "content": "﻿using System.Reflection;\r\nusing System.Runtime.CompilerServices;\r\nusing System.Runtime.InteropServices;\r\n\r\n// General Information about an assembly is controlled through the following \r\n// set of attributes. Change these attribute values to modify the information\r\n// associated with an assembly.\r\n[assembly: AssemblyTitle(\"Promotions.LuckyWinner.LuckyWinnerSelected.Bridge\")]\r\n[assembly: AssemblyDescription(\"\")]\r\n[assembly: AssemblyConfiguration(\"\")]\r\n[assembly: AssemblyCompany(\"\")]\r\n[assembly: AssemblyProduct(\"Promotions.LuckyWinner.LuckyWinnerSelected.Bridge\")]\r\n[assembly: AssemblyCopyright(\"Copyright ©  2014\")]\r\n[assembly: AssemblyTrademark(\"\")]\r\n[assembly: AssemblyCulture(\"\")]\r\n\r\n// Setting ComVisible to false makes the types in this assembly not visible \r\n// to COM components.  If you need to access a type in this assembly from \r\n// COM, set the ComVisible attribute to true on that type.\r\n[assembly: ComVisible(false)]\r\n\r\n// The following GUID is for the ID of the typelib if this project is exposed to COM\r\n[assembly: Guid(\"0c882311-bbaa-4ae0-9db2-b62c8ebbd5f6\")]\r\n\r\n// Version information for an assembly consists of the following four values:\r\n//\r\n//      Major Version\r\n//      Minor Version \r\n//      Build Number\r\n//      Revision\r\n//\r\n// You can specify all the values or you can default the Build and Revision Numbers \r\n// by using the '*' as shown below:\r\n// [assembly: AssemblyVersion(\"1.0.*\")]\r\n[assembly: AssemblyVersion(\"1.0.0.0\")]\r\n[assembly: AssemblyFileVersion(\"1.0.0.0\")]\r\n"
  },
  {
    "path": "12 - Integrating Via Messaging/Promotions.LuckyWinner.LuckyWinnerSelected.Bridge/packages.config",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<packages>\r\n  <package id=\"NServiceBus\" version=\"4.3.4\" targetFramework=\"net45\" />\r\n  <package id=\"NServiceBus.Host\" version=\"4.3.3\" targetFramework=\"net45\" />\r\n  <package id=\"NServiceBus.Interfaces\" version=\"4.3.4\" targetFramework=\"net45\" />\r\n</packages>"
  },
  {
    "path": "12 - Integrating Via Messaging/README.md",
    "content": "PPPDDD\n======\n\nSee chapter 12 in the book for guidance on setting up and running this project, \nincluding NServiceBus and MSMQ installation instructions.\n"
  },
  {
    "path": "12 - Integrating Via Messaging/Sales.Messages/Commands/PlaceOrder.cs",
    "content": "﻿using System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Text;\r\nusing System.Threading.Tasks;\r\n\r\nnamespace Sales.Messages.Commands\r\n{\r\n    public class PlaceOrder\r\n    {\r\n        public string UserId { get; set; }\r\n\r\n        public string[] ProductIds { get; set; }\r\n\r\n        public string ShippingTypeId { get; set;}\r\n\r\n        public DateTime TimeStamp { get; set; }\r\n    }\r\n}\r\n"
  },
  {
    "path": "12 - Integrating Via Messaging/Sales.Messages/Events/OrderCreated.cs",
    "content": "﻿using System;\r\nusing System.Collections.Generic;\r\n\r\nnamespace Sales.Messages.Events\r\n{\r\n    public class OrderCreated\r\n    {\r\n        public string OrderId { get; set; }\r\n\r\n        public string UserId { get; set; }\r\n\r\n        public string[] ProductIds { get; set; }\r\n\r\n        public string ShippingTypeId { get; set; }\r\n\r\n        public DateTime TimeStamp { get; set; }\r\n\r\n        public double Amount { get; set; }\r\n    }\r\n}\r\n"
  },
  {
    "path": "12 - Integrating Via Messaging/Sales.Messages/Events/OrderCreated_V2.cs",
    "content": "﻿using System;\r\n\r\nnamespace Sales.Messages.Events\r\n{\r\n    public class OrderCreated_V2 : OrderCreated\r\n    {\r\n        public string AddressId { get; set; }\r\n    }\r\n}\r\n"
  },
  {
    "path": "12 - Integrating Via Messaging/Sales.Messages/Properties/AssemblyInfo.cs",
    "content": "﻿using System.Reflection;\r\nusing System.Runtime.CompilerServices;\r\nusing System.Runtime.InteropServices;\r\n\r\n// General Information about an assembly is controlled through the following \r\n// set of attributes. Change these attribute values to modify the information\r\n// associated with an assembly.\r\n[assembly: AssemblyTitle(\"Sales.Messages\")]\r\n[assembly: AssemblyDescription(\"\")]\r\n[assembly: AssemblyConfiguration(\"\")]\r\n[assembly: AssemblyCompany(\"\")]\r\n[assembly: AssemblyProduct(\"Sales.Messages\")]\r\n[assembly: AssemblyCopyright(\"Copyright ©  2014\")]\r\n[assembly: AssemblyTrademark(\"\")]\r\n[assembly: AssemblyCulture(\"\")]\r\n\r\n// Setting ComVisible to false makes the types in this assembly not visible \r\n// to COM components.  If you need to access a type in this assembly from \r\n// COM, set the ComVisible attribute to true on that type.\r\n[assembly: ComVisible(false)]\r\n\r\n// The following GUID is for the ID of the typelib if this project is exposed to COM\r\n[assembly: Guid(\"80347f4c-c890-4436-a066-0bdeaeb2cb86\")]\r\n\r\n// Version information for an assembly consists of the following four values:\r\n//\r\n//      Major Version\r\n//      Minor Version \r\n//      Build Number\r\n//      Revision\r\n//\r\n// You can specify all the values or you can default the Build and Revision Numbers \r\n// by using the '*' as shown below:\r\n// [assembly: AssemblyVersion(\"1.0.*\")]\r\n[assembly: AssemblyVersion(\"1.0.0.0\")]\r\n[assembly: AssemblyFileVersion(\"1.0.0.0\")]\r\n"
  },
  {
    "path": "12 - Integrating Via Messaging/Sales.Messages/Sales.Messages.csproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Project ToolsVersion=\"12.0\" DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\r\n  <Import Project=\"$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props\" Condition=\"Exists('$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props')\" />\r\n  <PropertyGroup>\r\n    <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>\r\n    <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>\r\n    <ProjectGuid>{2DD347E9-1417-4AC5-9BDC-84DBE0707427}</ProjectGuid>\r\n    <OutputType>Library</OutputType>\r\n    <AppDesignerFolder>Properties</AppDesignerFolder>\r\n    <RootNamespace>Sales.Messages</RootNamespace>\r\n    <AssemblyName>Sales.Messages</AssemblyName>\r\n    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r\n    <FileAlignment>512</FileAlignment>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' \">\r\n    <DebugSymbols>true</DebugSymbols>\r\n    <DebugType>full</DebugType>\r\n    <Optimize>false</Optimize>\r\n    <OutputPath>bin\\Debug\\</OutputPath>\r\n    <DefineConstants>DEBUG;TRACE</DefineConstants>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <WarningLevel>4</WarningLevel>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' \">\r\n    <DebugType>pdbonly</DebugType>\r\n    <Optimize>true</Optimize>\r\n    <OutputPath>bin\\Release\\</OutputPath>\r\n    <DefineConstants>TRACE</DefineConstants>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <WarningLevel>4</WarningLevel>\r\n  </PropertyGroup>\r\n  <ItemGroup>\r\n    <Reference Include=\"System\" />\r\n    <Reference Include=\"System.Core\" />\r\n    <Reference Include=\"System.Xml.Linq\" />\r\n    <Reference Include=\"System.Data.DataSetExtensions\" />\r\n    <Reference Include=\"Microsoft.CSharp\" />\r\n    <Reference Include=\"System.Data\" />\r\n    <Reference Include=\"System.Xml\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <Compile Include=\"Commands\\PlaceOrder.cs\" />\r\n    <Compile Include=\"Events\\OrderCreated_V2.cs\" />\r\n    <Compile Include=\"Events\\OrderCreated.cs\" />\r\n    <Compile Include=\"Properties\\AssemblyInfo.cs\" />\r\n  </ItemGroup>\r\n  <Import Project=\"$(MSBuildToolsPath)\\Microsoft.CSharp.targets\" />\r\n  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \r\n       Other similar extension points exist, see Microsoft.Common.targets.\r\n  <Target Name=\"BeforeBuild\">\r\n  </Target>\r\n  <Target Name=\"AfterBuild\">\r\n  </Target>\r\n  -->\r\n</Project>"
  },
  {
    "path": "12 - Integrating Via Messaging/Sales.Orders.OrderCreated/App.config",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>\r\n<configuration>\r\n  <configSections>\r\n    <section name=\"MessageForwardingInCaseOfFaultConfig\" type=\"NServiceBus.Config.MessageForwardingInCaseOfFaultConfig, NServiceBus.Core\" />\r\n    <section name=\"UnicastBusConfig\" type=\"NServiceBus.Config.UnicastBusConfig, NServiceBus.Core\" />\r\n    <section name=\"AuditConfig\" type=\"NServiceBus.Config.AuditConfig, NServiceBus.Core\" />\r\n  </configSections>\r\n  <!--<MessageForwardingInCaseOfFaultConfig \r\n    ErrorQueue=\"The queue to which errors will be forwarded.\" />-->\r\n  <MessageForwardingInCaseOfFaultConfig ErrorQueue=\"error\" />\r\n  <!--<UnicastBusConfig \r\n    DistributorControlAddress=\"The address for sending control messages to the distributor.\"\r\n    DistributorDataAddress=\"The distributor's data address, used as the return address of messages sent by this endpoint.\"\r\n    TimeoutManagerAddress=\"The address that the timeout manager will use to send and receive messages.\" >\r\n    <MessageEndpointMappings>\r\n      To register all message types defined in an assembly:\r\n      <add Assembly=\"assembly\" Endpoint=\"queue@machinename\" />\r\n      \r\n      To register all message types defined in an assembly with a specific namespace (it does not include sub namespaces):\r\n      <add Assembly=\"assembly\" Namespace=\"namespace\" Endpoint=\"queue@machinename\" />\r\n      \r\n      To register a specific type in an assembly:\r\n      <add Assembly=\"assembly\" Type=\"type fullname (http://msdn.microsoft.com/en-us/library/system.type.fullname.aspx)\" Endpoint=\"queue@machinename\" />\r\n    </MessageEndpointMappings>\r\n  </UnicastBusConfig>-->\r\n  <UnicastBusConfig>\r\n    <MessageEndpointMappings />\r\n  </UnicastBusConfig>\r\n  <!--<AuditConfig \r\n    QueueName=\"The address to which messages received will be forwarded.\"\r\n    OverrideTimeToBeReceived=\"The time to be received set on forwarded messages, specified as a timespan see http://msdn.microsoft.com/en-us/library/vstudio/se73z7b9.aspx\"  />-->\r\n  <AuditConfig QueueName=\"audit\" />\r\n</configuration>"
  },
  {
    "path": "12 - Integrating Via Messaging/Sales.Orders.OrderCreated/Application/PlaceOrderHandler.cs",
    "content": "﻿using System;\nusing NServiceBus;\nusing Sales.Messages.Commands;\nusing System.Collections.Generic;\n\nnamespace Sales.Orders.OrderCreated\n{\n    public class PlaceOrderHandler : IHandleMessages<PlaceOrder>\n    {\n        public IBus Bus { get; set; }\n\n        public void Handle(PlaceOrder message)\n        {\n            var orderId = Database.SaveOrder(message.ProductIds, message.UserId, message.ShippingTypeId);\n\n            Console.WriteLine(\n                @\"Created order #{3} : Products:{0} with shipping: {1} made by user: {2}\", \n                String.Join(\",\", message.ProductIds), message.ShippingTypeId, message.UserId, orderId\n            ); \n\n            // sending a V2 message now\n            var orderCreatedEvent = new Sales.Messages.Events.OrderCreated_V2\n            {\n                OrderId = orderId,\n                UserId = message.UserId,\n                ProductIds = message.ProductIds,\n                ShippingTypeId = message.ShippingTypeId,\n                TimeStamp = DateTime.Now,\n                Amount = CalculateCostOf(message.ProductIds),\n                /*\n                 * add a new field to the form and the PlaceOrder command\n                 * if you don't want to hard-code the value\n                 */\n                AddressId = \"AddressID123\"\n            };\n\n            Bus.Publish(orderCreatedEvent);\n        }\n\n        private double CalculateCostOf(IEnumerable<string> productIds)\n        {\n            // database lookup, etc\n            return 1000.00;\n        }\n    }\n\n    // This could be any database technology. It can differ between Business Components\n    public static class Database\n    {\n        private static int Id = 0;\n\n        public static string SaveOrder(IEnumerable<string> productIds, string userId, string shippingTypeId)\n        {\n            var nextOrderId = Id++;\n            return nextOrderId.ToString();\n        }\n    }\n}\n\n\n"
  },
  {
    "path": "12 - Integrating Via Messaging/Sales.Orders.OrderCreated/Infrastructure/EndpointConfig.cs",
    "content": "using NServiceBus;\n\nnamespace Sales.Orders.OrderCreated\n{\n\tpublic class EndpointConfig : IConfigureThisEndpoint, AsA_Server, IWantCustomInitialization, AsA_Publisher\n    {\n        public void Init()\n        {\n            Configure.With()\n                     .DefiningCommandsAs(t => t.Namespace != null \n                         && t.Namespace.Contains(\"Commands\"))\n                     .DefiningEventsAs(t => t.Namespace != null \n                         && t.Namespace.Contains(\"Events\"));\n        }\n    }\n}\n"
  },
  {
    "path": "12 - Integrating Via Messaging/Sales.Orders.OrderCreated/Properties/AssemblyInfo.cs",
    "content": "﻿using System.Reflection;\r\nusing System.Runtime.CompilerServices;\r\nusing System.Runtime.InteropServices;\r\n\r\n// General Information about an assembly is controlled through the following \r\n// set of attributes. Change these attribute values to modify the information\r\n// associated with an assembly.\r\n[assembly: AssemblyTitle(\"Sales.Orders.OrderCreated\")]\r\n[assembly: AssemblyDescription(\"\")]\r\n[assembly: AssemblyConfiguration(\"\")]\r\n[assembly: AssemblyCompany(\"\")]\r\n[assembly: AssemblyProduct(\"Sales.Orders.OrderCreated\")]\r\n[assembly: AssemblyCopyright(\"Copyright ©  2014\")]\r\n[assembly: AssemblyTrademark(\"\")]\r\n[assembly: AssemblyCulture(\"\")]\r\n\r\n// Setting ComVisible to false makes the types in this assembly not visible \r\n// to COM components.  If you need to access a type in this assembly from \r\n// COM, set the ComVisible attribute to true on that type.\r\n[assembly: ComVisible(false)]\r\n\r\n// The following GUID is for the ID of the typelib if this project is exposed to COM\r\n[assembly: Guid(\"f6917b3a-ce8f-4d92-9738-c44d79fc0072\")]\r\n\r\n// Version information for an assembly consists of the following four values:\r\n//\r\n//      Major Version\r\n//      Minor Version \r\n//      Build Number\r\n//      Revision\r\n//\r\n// You can specify all the values or you can default the Build and Revision Numbers \r\n// by using the '*' as shown below:\r\n// [assembly: AssemblyVersion(\"1.0.*\")]\r\n[assembly: AssemblyVersion(\"1.0.0.0\")]\r\n[assembly: AssemblyFileVersion(\"1.0.0.0\")]\r\n"
  },
  {
    "path": "12 - Integrating Via Messaging/Sales.Orders.OrderCreated/Sales.Orders.OrderCreated.csproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"12.0\" DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <Import Project=\"$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props\" Condition=\"Exists('$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props')\" />\n  <PropertyGroup>\n    <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>\n    <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>\n    <ProjectGuid>{18455B18-D42C-4B5A-98E0-2112F8066542}</ProjectGuid>\n    <OutputType>Library</OutputType>\n    <AppDesignerFolder>Properties</AppDesignerFolder>\n    <RootNamespace>Sales.Orders.OrderCreated</RootNamespace>\n    <AssemblyName>Sales.Orders.OrderCreated</AssemblyName>\n    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\n    <FileAlignment>512</FileAlignment>\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' \">\n    <DebugSymbols>true</DebugSymbols>\n    <DebugType>full</DebugType>\n    <Optimize>false</Optimize>\n    <OutputPath>bin\\Debug\\</OutputPath>\n    <DefineConstants>DEBUG;TRACE</DefineConstants>\n    <ErrorReport>prompt</ErrorReport>\n    <WarningLevel>4</WarningLevel>\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' \">\n    <DebugType>pdbonly</DebugType>\n    <Optimize>true</Optimize>\n    <OutputPath>bin\\Release\\</OutputPath>\n    <DefineConstants>TRACE</DefineConstants>\n    <ErrorReport>prompt</ErrorReport>\n    <WarningLevel>4</WarningLevel>\n  </PropertyGroup>\n  <ItemGroup>\n    <Reference Include=\"NServiceBus\">\n      <HintPath>..\\packages\\NServiceBus.Interfaces.4.3.4\\lib\\net40\\NServiceBus.dll</HintPath>\n    </Reference>\n    <Reference Include=\"NServiceBus.Core\">\n      <HintPath>..\\packages\\NServiceBus.4.3.4\\lib\\net40\\NServiceBus.Core.dll</HintPath>\n    </Reference>\n    <Reference Include=\"NServiceBus.Host\">\n      <HintPath>..\\packages\\NServiceBus.Host.4.3.3\\lib\\net40\\NServiceBus.Host.exe</HintPath>\n    </Reference>\n    <Reference Include=\"System\" />\n    <Reference Include=\"System.Core\" />\n    <Reference Include=\"System.Xml.Linq\" />\n    <Reference Include=\"System.Data.DataSetExtensions\" />\n    <Reference Include=\"Microsoft.CSharp\" />\n    <Reference Include=\"System.Data\" />\n    <Reference Include=\"System.Xml\" />\n  </ItemGroup>\n  <ItemGroup>\n    <Compile Include=\"Infrastructure\\EndpointConfig.cs\" />\n    <Compile Include=\"Application\\PlaceOrderHandler.cs\" />\n    <Compile Include=\"Properties\\AssemblyInfo.cs\" />\n  </ItemGroup>\n  <ItemGroup>\n    <None Include=\"App.config\" />\n    <None Include=\"packages.config\" />\n  </ItemGroup>\n  <ItemGroup>\n    <ProjectReference Include=\"..\\Sales.Messages\\Sales.Messages.csproj\">\n      <Project>{2dd347e9-1417-4ac5-9bdc-84dbe0707427}</Project>\n      <Name>Sales.Messages</Name>\n    </ProjectReference>\n  </ItemGroup>\n  <ItemGroup>\n    <Folder Include=\"Model\\\" />\n  </ItemGroup>\n  <Import Project=\"$(MSBuildToolsPath)\\Microsoft.CSharp.targets\" />\n  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \n       Other similar extension points exist, see Microsoft.Common.targets.\n  <Target Name=\"BeforeBuild\">\n  </Target>\n  <Target Name=\"AfterBuild\">\n  </Target>\n  -->\n  <PropertyGroup>\n    <StartAction>Program</StartAction>\n    <StartProgram>$(ProjectDir)$(OutputPath)NServiceBus.Host.exe</StartProgram>\n  </PropertyGroup>\n</Project>"
  },
  {
    "path": "12 - Integrating Via Messaging/Sales.Orders.OrderCreated/packages.config",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<packages>\r\n  <package id=\"NServiceBus\" version=\"4.3.4\" targetFramework=\"net45\" />\r\n  <package id=\"NServiceBus.Host\" version=\"4.3.3\" targetFramework=\"net45\" />\r\n  <package id=\"NServiceBus.Interfaces\" version=\"4.3.4\" targetFramework=\"net45\" />\r\n</packages>"
  },
  {
    "path": "12 - Integrating Via Messaging/Shipping.BusinessCustomers.ShippingArranged/App.config",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>\r\n<configuration>\r\n  <configSections>\r\n    <section name=\"MessageForwardingInCaseOfFaultConfig\" type=\"NServiceBus.Config.MessageForwardingInCaseOfFaultConfig, NServiceBus.Core\" />\r\n    <section name=\"UnicastBusConfig\" type=\"NServiceBus.Config.UnicastBusConfig, NServiceBus.Core\" />\r\n    <section name=\"AuditConfig\" type=\"NServiceBus.Config.AuditConfig, NServiceBus.Core\" />\r\n  </configSections>\r\n  <MessageForwardingInCaseOfFaultConfig ErrorQueue=\"error\" />\r\n  <UnicastBusConfig>\r\n    <MessageEndpointMappings>\r\n      <add Messages=\"Sales.Messages\" Type=\"Sales.Messages.OrderCreated_V2\" Endpoint=\"Sales.Orders.OrderCreated\" />\r\n      <add Messages=\"Billing.Messages\" Type=\"Billing.Messages.PaymentAccepted\" Endpoint=\"Billing.Payments.PaymentAccepted\" />\r\n    </MessageEndpointMappings>\r\n  </UnicastBusConfig>\r\n  <AuditConfig QueueName=\"audit\" />\r\n</configuration>\r\n"
  },
  {
    "path": "12 - Integrating Via Messaging/Shipping.BusinessCustomers.ShippingArranged/Application/Handlers.cs",
    "content": "﻿using Billing.Messages.Events;\nusing NServiceBus;\nusing Sales.Messages.Events;\nusing System;\nusing System.Linq;\nusing System.Collections.Generic;\n\nnamespace Shipping.BusinessCustomers.ShippingArranged\n{\n    // update inherited interface with V2\n    public class OrderCreatedHandler : IHandleMessages<OrderCreated_V2>\n    {\n        // dependency injected by NServiceBus\n        public IBus Bus { get; set; }\n\n        // updated Handle accepting a V2\n        public void Handle(OrderCreated_V2 message)\n        {\n            Console.WriteLine(\n                \"Shipping BC storing: Order: {0} User: {1} Shipping Type: {2}\",\n                message.OrderId, message.UserId, message.ShippingTypeId, message.AddressId\n            );\n            var order = new ShippingOrder\n            {\n                UserId = message.UserId,\n                OrderId = message.OrderId,\n                AddressId = message.AddressId,\n                ShippingTypeId = message.ShippingTypeId\n            };\n            ShippingDatabase.AddOrderDetails(order);\n        }\n    }\n\n    public class PaymentAcceptedHandler : IHandleMessages<PaymentAccepted>\n   { \n        // dependency injected by NServiceBus\n        public IBus Bus { get; set; }\n\n        public void Handle(PaymentAccepted message)\n        {\n            var address = ShippingDatabase.GetCustomerAddress(message.OrderId);\n            var confirmation = ShippingProvider.ArrangeShippingFor(address, message.OrderId);\n            if (confirmation.Status == ShippingStatus.Success)\n            {\n                var evnt = new Shipping.Messages.Events.ShippingArranged\n                {\n                    OrderId = message.OrderId\n                };\n                Bus.Publish(evnt);\n                Console.WriteLine(\n                    \"Shipping BC arranged shipping for Order: {0}\",\n                    message.OrderId, address\n                );\n            }\n            else\n            {\n                // .. notify failed shipping instead\n            }\n        }\n    }\n\n    public static class ShippingDatabase\n    {\n        private static List<ShippingOrder> Orders = new List<ShippingOrder>();\n\n        public static void AddOrderDetails(ShippingOrder order)\n        {\n            Orders.Add(order);\n        }\n\n        public static string GetCustomerAddress(string orderId)\n        {\n            var order = Orders\n                        .Single(o => o.OrderId == orderId);\n\n            return string.Format(\n                \"{0}, Address ID: {1}\", \n                order.UserId, order.AddressId\n            );\n        }\n    }\n\n    public class ShippingOrder\n    {\n        public string UserId { get; set; }\n\n        public string OrderId { get; set; }\n\n        public string ShippingTypeId { get; set; }\n\n        public string AddressId { get; set; }\n    }\n\n    public static class ShippingProvider\n    {\n        public static ShippingConfirmation ArrangeShippingFor(string address, string referenceCode)\n        {\n            return new ShippingConfirmation { Status = ShippingStatus.Success };\n        }\n    }\n    public class ShippingConfirmation\n    {\n        public ShippingStatus Status { get; set; }\n    }\n    public enum ShippingStatus\n    {\n        Success,\n        Failure\n    }\n}\n\n"
  },
  {
    "path": "12 - Integrating Via Messaging/Shipping.BusinessCustomers.ShippingArranged/Infrastructure/EndpointConfig.cs",
    "content": "using NServiceBus;\n\nnamespace Shipping.BusinessCustomers.ShippingArranged\n{\n    public class EndpointConfig : IConfigureThisEndpoint, AsA_Server, AsA_Publisher, IWantCustomInitialization\n    {\n        public void Init()\n        {\n            Configure.With()\n                     .DefiningCommandsAs(t => t.Namespace != null \n                         && t.Namespace.Contains(\"Commands\"))\n                     .DefiningEventsAs(t => t.Namespace != null \n                         && t.Namespace.Contains(\"Events\"));\n        }\n    }\n}\n"
  },
  {
    "path": "12 - Integrating Via Messaging/Shipping.BusinessCustomers.ShippingArranged/Properties/AssemblyInfo.cs",
    "content": "﻿using System.Reflection;\r\nusing System.Runtime.CompilerServices;\r\nusing System.Runtime.InteropServices;\r\n\r\n// General Information about an assembly is controlled through the following \r\n// set of attributes. Change these attribute values to modify the information\r\n// associated with an assembly.\r\n[assembly: AssemblyTitle(\"Shipping.BusinessCustomers.ShippingArranged\")]\r\n[assembly: AssemblyDescription(\"\")]\r\n[assembly: AssemblyConfiguration(\"\")]\r\n[assembly: AssemblyCompany(\"\")]\r\n[assembly: AssemblyProduct(\"Shipping.BusinessCustomers.ShippingArranged\")]\r\n[assembly: AssemblyCopyright(\"Copyright ©  2014\")]\r\n[assembly: AssemblyTrademark(\"\")]\r\n[assembly: AssemblyCulture(\"\")]\r\n\r\n// Setting ComVisible to false makes the types in this assembly not visible \r\n// to COM components.  If you need to access a type in this assembly from \r\n// COM, set the ComVisible attribute to true on that type.\r\n[assembly: ComVisible(false)]\r\n\r\n// The following GUID is for the ID of the typelib if this project is exposed to COM\r\n[assembly: Guid(\"720d1f39-3d5e-4734-a0df-af71ad5ce28c\")]\r\n\r\n// Version information for an assembly consists of the following four values:\r\n//\r\n//      Major Version\r\n//      Minor Version \r\n//      Build Number\r\n//      Revision\r\n//\r\n// You can specify all the values or you can default the Build and Revision Numbers \r\n// by using the '*' as shown below:\r\n// [assembly: AssemblyVersion(\"1.0.*\")]\r\n[assembly: AssemblyVersion(\"1.0.0.0\")]\r\n[assembly: AssemblyFileVersion(\"1.0.0.0\")]\r\n"
  },
  {
    "path": "12 - Integrating Via Messaging/Shipping.BusinessCustomers.ShippingArranged/Shipping.BusinessCustomers.ShippingArranged.csproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"12.0\" DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <Import Project=\"$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props\" Condition=\"Exists('$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props')\" />\n  <PropertyGroup>\n    <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>\n    <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>\n    <ProjectGuid>{2A146AA7-EF86-4304-839C-C43B97834F15}</ProjectGuid>\n    <OutputType>Library</OutputType>\n    <AppDesignerFolder>Properties</AppDesignerFolder>\n    <RootNamespace>Shipping.BusinessCustomers.ShippingArranged</RootNamespace>\n    <AssemblyName>Shipping.BusinessCustomers.ShippingArranged</AssemblyName>\n    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\n    <FileAlignment>512</FileAlignment>\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' \">\n    <DebugSymbols>true</DebugSymbols>\n    <DebugType>full</DebugType>\n    <Optimize>false</Optimize>\n    <OutputPath>bin\\Debug\\</OutputPath>\n    <DefineConstants>DEBUG;TRACE</DefineConstants>\n    <ErrorReport>prompt</ErrorReport>\n    <WarningLevel>4</WarningLevel>\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' \">\n    <DebugType>pdbonly</DebugType>\n    <Optimize>true</Optimize>\n    <OutputPath>bin\\Release\\</OutputPath>\n    <DefineConstants>TRACE</DefineConstants>\n    <ErrorReport>prompt</ErrorReport>\n    <WarningLevel>4</WarningLevel>\n  </PropertyGroup>\n  <ItemGroup>\n    <Reference Include=\"NServiceBus\">\n      <HintPath>..\\packages\\NServiceBus.Interfaces.4.3.4\\lib\\net40\\NServiceBus.dll</HintPath>\n    </Reference>\n    <Reference Include=\"NServiceBus.Core\">\n      <HintPath>..\\packages\\NServiceBus.4.3.4\\lib\\net40\\NServiceBus.Core.dll</HintPath>\n    </Reference>\n    <Reference Include=\"NServiceBus.Host\">\n      <HintPath>..\\packages\\NServiceBus.Host.4.3.3\\lib\\net40\\NServiceBus.Host.exe</HintPath>\n    </Reference>\n    <Reference Include=\"System\" />\n    <Reference Include=\"System.Core\" />\n    <Reference Include=\"System.Xml.Linq\" />\n    <Reference Include=\"System.Data.DataSetExtensions\" />\n    <Reference Include=\"Microsoft.CSharp\" />\n    <Reference Include=\"System.Data\" />\n    <Reference Include=\"System.Xml\" />\n  </ItemGroup>\n  <ItemGroup>\n    <Compile Include=\"Infrastructure\\EndpointConfig.cs\" />\n    <Compile Include=\"Application\\Handlers.cs\" />\n    <Compile Include=\"Properties\\AssemblyInfo.cs\" />\n  </ItemGroup>\n  <ItemGroup>\n    <ProjectReference Include=\"..\\Billing.Messages\\Billing.Messages.csproj\">\n      <Project>{b3707164-ff36-473e-877d-a652c8e41d14}</Project>\n      <Name>Billing.Messages</Name>\n    </ProjectReference>\n    <ProjectReference Include=\"..\\Sales.Messages\\Sales.Messages.csproj\">\n      <Project>{2dd347e9-1417-4ac5-9bdc-84dbe0707427}</Project>\n      <Name>Sales.Messages</Name>\n    </ProjectReference>\n    <ProjectReference Include=\"..\\Shipping.Messages\\Shipping.Messages.csproj\">\n      <Project>{ab3a64c2-9fd1-4382-aab8-10748573de98}</Project>\n      <Name>Shipping.Messages</Name>\n    </ProjectReference>\n  </ItemGroup>\n  <ItemGroup>\n    <None Include=\"App.config\">\n      <SubType>Designer</SubType>\n    </None>\n    <None Include=\"packages.config\" />\n  </ItemGroup>\n  <ItemGroup>\n    <Folder Include=\"Model\\\" />\n  </ItemGroup>\n  <Import Project=\"$(MSBuildToolsPath)\\Microsoft.CSharp.targets\" />\n  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \n       Other similar extension points exist, see Microsoft.Common.targets.\n  <Target Name=\"BeforeBuild\">\n  </Target>\n  <Target Name=\"AfterBuild\">\n  </Target>\n  -->\n  <PropertyGroup>\n    <StartAction>Program</StartAction>\n    <StartProgram>$(ProjectDir)$(OutputPath)NServiceBus.Host.exe</StartProgram>\n  </PropertyGroup>\n</Project>"
  },
  {
    "path": "12 - Integrating Via Messaging/Shipping.BusinessCustomers.ShippingArranged/packages.config",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<packages>\r\n  <package id=\"NServiceBus\" version=\"4.3.4\" targetFramework=\"net45\" />\r\n  <package id=\"NServiceBus.Host\" version=\"4.3.3\" targetFramework=\"net45\" />\r\n  <package id=\"NServiceBus.Interfaces\" version=\"4.3.4\" targetFramework=\"net45\" />\r\n</packages>"
  },
  {
    "path": "12 - Integrating Via Messaging/Shipping.Messages/Events/ShippingArranged.cs",
    "content": "﻿using System;\r\n\r\nnamespace Shipping.Messages.Events\r\n{\r\n    public class ShippingArranged  \r\n    {\r\n        public string OrderId { get; set; }\r\n\r\n        /*\r\n         * Other fields, such as date/date range \r\n         * could be added here depending on your \r\n         * shipping provider(s) API\r\n         */\r\n    }\r\n}\r\n"
  },
  {
    "path": "12 - Integrating Via Messaging/Shipping.Messages/Properties/AssemblyInfo.cs",
    "content": "﻿using System.Reflection;\r\nusing System.Runtime.CompilerServices;\r\nusing System.Runtime.InteropServices;\r\n\r\n// General Information about an assembly is controlled through the following \r\n// set of attributes. Change these attribute values to modify the information\r\n// associated with an assembly.\r\n[assembly: AssemblyTitle(\"Shipping.Messages\")]\r\n[assembly: AssemblyDescription(\"\")]\r\n[assembly: AssemblyConfiguration(\"\")]\r\n[assembly: AssemblyCompany(\"\")]\r\n[assembly: AssemblyProduct(\"Shipping.Messages\")]\r\n[assembly: AssemblyCopyright(\"Copyright ©  2014\")]\r\n[assembly: AssemblyTrademark(\"\")]\r\n[assembly: AssemblyCulture(\"\")]\r\n\r\n// Setting ComVisible to false makes the types in this assembly not visible \r\n// to COM components.  If you need to access a type in this assembly from \r\n// COM, set the ComVisible attribute to true on that type.\r\n[assembly: ComVisible(false)]\r\n\r\n// The following GUID is for the ID of the typelib if this project is exposed to COM\r\n[assembly: Guid(\"424a0f6d-c104-487a-a7fd-c21c51fab04a\")]\r\n\r\n// Version information for an assembly consists of the following four values:\r\n//\r\n//      Major Version\r\n//      Minor Version \r\n//      Build Number\r\n//      Revision\r\n//\r\n// You can specify all the values or you can default the Build and Revision Numbers \r\n// by using the '*' as shown below:\r\n// [assembly: AssemblyVersion(\"1.0.*\")]\r\n[assembly: AssemblyVersion(\"1.0.0.0\")]\r\n[assembly: AssemblyFileVersion(\"1.0.0.0\")]\r\n"
  },
  {
    "path": "12 - Integrating Via Messaging/Shipping.Messages/Shipping.Messages.csproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Project ToolsVersion=\"12.0\" DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\r\n  <Import Project=\"$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props\" Condition=\"Exists('$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props')\" />\r\n  <PropertyGroup>\r\n    <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>\r\n    <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>\r\n    <ProjectGuid>{AB3A64C2-9FD1-4382-AAB8-10748573DE98}</ProjectGuid>\r\n    <OutputType>Library</OutputType>\r\n    <AppDesignerFolder>Properties</AppDesignerFolder>\r\n    <RootNamespace>Shipping.Messages</RootNamespace>\r\n    <AssemblyName>Shipping.Messages</AssemblyName>\r\n    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r\n    <FileAlignment>512</FileAlignment>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' \">\r\n    <DebugSymbols>true</DebugSymbols>\r\n    <DebugType>full</DebugType>\r\n    <Optimize>false</Optimize>\r\n    <OutputPath>bin\\Debug\\</OutputPath>\r\n    <DefineConstants>DEBUG;TRACE</DefineConstants>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <WarningLevel>4</WarningLevel>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' \">\r\n    <DebugType>pdbonly</DebugType>\r\n    <Optimize>true</Optimize>\r\n    <OutputPath>bin\\Release\\</OutputPath>\r\n    <DefineConstants>TRACE</DefineConstants>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <WarningLevel>4</WarningLevel>\r\n  </PropertyGroup>\r\n  <ItemGroup>\r\n    <Reference Include=\"System\" />\r\n    <Reference Include=\"System.Core\" />\r\n    <Reference Include=\"System.Xml.Linq\" />\r\n    <Reference Include=\"System.Data.DataSetExtensions\" />\r\n    <Reference Include=\"Microsoft.CSharp\" />\r\n    <Reference Include=\"System.Data\" />\r\n    <Reference Include=\"System.Xml\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <Compile Include=\"Properties\\AssemblyInfo.cs\" />\r\n    <Compile Include=\"Events\\ShippingArranged.cs\" />\r\n  </ItemGroup>\r\n  <Import Project=\"$(MSBuildToolsPath)\\Microsoft.CSharp.targets\" />\r\n  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \r\n       Other similar extension points exist, see Microsoft.Common.targets.\r\n  <Target Name=\"BeforeBuild\">\r\n  </Target>\r\n  <Target Name=\"AfterBuild\">\r\n  </Target>\r\n  -->\r\n</Project>"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.JSON.SocialMedia/AccountManagement/AccountManagement.csproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Project ToolsVersion=\"12.0\" DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\r\n  <Import Project=\"$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props\" Condition=\"Exists('$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props')\" />\r\n  <PropertyGroup>\r\n    <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>\r\n    <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>\r\n    <ProductVersion>\r\n    </ProductVersion>\r\n    <SchemaVersion>2.0</SchemaVersion>\r\n    <ProjectGuid>{A5683820-EAE9-4C2A-B91A-50F50A1D052F}</ProjectGuid>\r\n    <ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>\r\n    <OutputType>Library</OutputType>\r\n    <AppDesignerFolder>Properties</AppDesignerFolder>\r\n    <RootNamespace>AccountManagement</RootNamespace>\r\n    <AssemblyName>AccountManagement</AssemblyName>\r\n    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r\n    <UseIISExpress>true</UseIISExpress>\r\n    <IISExpressSSLPort />\r\n    <IISExpressAnonymousAuthentication />\r\n    <IISExpressWindowsAuthentication />\r\n    <IISExpressUseClassicPipelineMode />\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' \">\r\n    <DebugSymbols>true</DebugSymbols>\r\n    <DebugType>full</DebugType>\r\n    <Optimize>false</Optimize>\r\n    <OutputPath>bin\\</OutputPath>\r\n    <DefineConstants>DEBUG;TRACE</DefineConstants>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <WarningLevel>4</WarningLevel>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' \">\r\n    <DebugType>pdbonly</DebugType>\r\n    <Optimize>true</Optimize>\r\n    <OutputPath>bin\\</OutputPath>\r\n    <DefineConstants>TRACE</DefineConstants>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <WarningLevel>4</WarningLevel>\r\n  </PropertyGroup>\r\n  <ItemGroup>\r\n    <Reference Include=\"Microsoft.CSharp\" />\r\n    <Reference Include=\"System.Net.Http\" />\r\n    <Reference Include=\"System.Web.DynamicData\" />\r\n    <Reference Include=\"System.Web.Entity\" />\r\n    <Reference Include=\"System.Web.ApplicationServices\" />\r\n    <Reference Include=\"System.ComponentModel.DataAnnotations\" />\r\n    <Reference Include=\"System\" />\r\n    <Reference Include=\"System.Data\" />\r\n    <Reference Include=\"System.Core\" />\r\n    <Reference Include=\"System.Data.DataSetExtensions\" />\r\n    <Reference Include=\"System.Web.Extensions\" />\r\n    <Reference Include=\"System.Xml.Linq\" />\r\n    <Reference Include=\"System.Drawing\" />\r\n    <Reference Include=\"System.Web\" />\r\n    <Reference Include=\"System.Xml\" />\r\n    <Reference Include=\"System.Configuration\" />\r\n    <Reference Include=\"System.Web.Services\" />\r\n    <Reference Include=\"System.EnterpriseServices\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <Reference Include=\"Newtonsoft.Json\">\r\n      <HintPath>..\\packages\\Newtonsoft.Json.5.0.6\\lib\\net45\\Newtonsoft.Json.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"System.Net.Http.Formatting\">\r\n      <HintPath>..\\packages\\Microsoft.AspNet.WebApi.Client.5.0.0\\lib\\net45\\System.Net.Http.Formatting.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"System.Web.Http\">\r\n      <HintPath>..\\packages\\Microsoft.AspNet.WebApi.Core.5.0.0\\lib\\net45\\System.Web.Http.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"System.Web.Http.WebHost\">\r\n      <HintPath>..\\packages\\Microsoft.AspNet.WebApi.WebHost.5.0.0\\lib\\net45\\System.Web.Http.WebHost.dll</HintPath>\r\n    </Reference>\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <Content Include=\"Global.asax\" />\r\n    <Content Include=\"Web.config\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <Compile Include=\"App_Start\\WebApiConfig.cs\" />\r\n    <Compile Include=\"Controllers\\FollowerDirectoryController.cs\" />\r\n    <Compile Include=\"Global.asax.cs\">\r\n      <DependentUpon>Global.asax</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Properties\\AssemblyInfo.cs\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <Content Include=\"packages.config\" />\r\n    <None Include=\"Web.Debug.config\">\r\n      <DependentUpon>Web.config</DependentUpon>\r\n    </None>\r\n    <None Include=\"Web.Release.config\">\r\n      <DependentUpon>Web.config</DependentUpon>\r\n    </None>\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <Folder Include=\"App_Data\\\" />\r\n    <Folder Include=\"Models\\\" />\r\n  </ItemGroup>\r\n  <PropertyGroup>\r\n    <VisualStudioVersion Condition=\"'$(VisualStudioVersion)' == ''\">10.0</VisualStudioVersion>\r\n    <VSToolsPath Condition=\"'$(VSToolsPath)' == ''\">$(MSBuildExtensionsPath32)\\Microsoft\\VisualStudio\\v$(VisualStudioVersion)</VSToolsPath>\r\n  </PropertyGroup>\r\n  <Import Project=\"$(MSBuildBinPath)\\Microsoft.CSharp.targets\" />\r\n  <Import Project=\"$(VSToolsPath)\\WebApplications\\Microsoft.WebApplication.targets\" Condition=\"'$(VSToolsPath)' != ''\" />\r\n  <Import Project=\"$(MSBuildExtensionsPath32)\\Microsoft\\VisualStudio\\v10.0\\WebApplications\\Microsoft.WebApplication.targets\" Condition=\"false\" />\r\n  <ProjectExtensions>\r\n    <VisualStudio>\r\n      <FlavorProperties GUID=\"{349c5851-65df-11da-9384-00065b846f21}\">\r\n        <WebProjectProperties>\r\n          <UseIIS>True</UseIIS>\r\n          <AutoAssignPort>True</AutoAssignPort>\r\n          <DevelopmentServerPort>1091</DevelopmentServerPort>\r\n          <DevelopmentServerVPath>/</DevelopmentServerVPath>\r\n          <IISUrl>http://localhost:3200/</IISUrl>\r\n          <NTLMAuthentication>False</NTLMAuthentication>\r\n          <UseCustomServer>False</UseCustomServer>\r\n          <CustomServerUrl>\r\n          </CustomServerUrl>\r\n          <SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>\r\n        </WebProjectProperties>\r\n      </FlavorProperties>\r\n    </VisualStudio>\r\n  </ProjectExtensions>\r\n  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \r\n       Other similar extension points exist, see Microsoft.Common.targets.\r\n  <Target Name=\"BeforeBuild\">\r\n  </Target>\r\n  <Target Name=\"AfterBuild\">\r\n  </Target>\r\n  -->\r\n</Project>"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.JSON.SocialMedia/AccountManagement/App_Start/WebApiConfig.cs",
    "content": "﻿using System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Web.Http;\r\n\r\nnamespace AccountManagement\r\n{\r\n    public static class WebApiConfig\r\n    {\r\n        public static void Register(HttpConfiguration config)\r\n        {\r\n            // Web API configuration and services\r\n\r\n            // Web API routes\r\n            config.MapHttpAttributeRoutes();\r\n\r\n            config.Routes.MapHttpRoute(\r\n                name: \"DefaultApi\",\r\n                routeTemplate: \"api/{controller}/{id}\",\r\n                defaults: new { id = RouteParameter.Optional }\r\n            );\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.JSON.SocialMedia/AccountManagement/Controllers/FollowerDirectoryController.cs",
    "content": "﻿using System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Net;\r\nusing System.Net.Http;\r\nusing System.Web.Http;\r\n\r\nnamespace AccountManagement.Controllers\r\n{\r\n    public class FollowerDirectoryController : ApiController\r\n    {\r\n        public IHttpActionResult GetUsersFollowers(string accountId)\r\n        {\r\n            var followers = GenerateDummyFollowers().ToList();\r\n            return Json(followers);\r\n        }\r\n\r\n        private IEnumerable<Follower> GenerateDummyFollowers()\r\n        {\r\n            for (int i = 0; i < 10; i++)\r\n            {\r\n                yield return new Follower\r\n                {\r\n                    FollowerId = \"follower_\" + i,\r\n                    FollowerName = \"happy follower \" + i,\r\n                    SocialTags = new List<string> { \"programming\", \"DDD\", \"Psychology\" },\r\n                };\r\n            }\r\n        }\r\n\r\n    }\r\n\r\n    public class Follower\r\n    {\r\n        public string FollowerId { get; set; }\r\n\r\n        public string FollowerName { get; set; }\r\n\r\n        public List<string> SocialTags { get; set; }\r\n    }\r\n\r\n}\r\n"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.JSON.SocialMedia/AccountManagement/Global.asax",
    "content": "﻿<%@ Application Codebehind=\"Global.asax.cs\" Inherits=\"AccountManagement.WebApiApplication\" Language=\"C#\" %>\r\n"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.JSON.SocialMedia/AccountManagement/Global.asax.cs",
    "content": "﻿using System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Web;\r\nusing System.Web.Http;\r\nusing System.Web.Routing;\r\n\r\nnamespace AccountManagement\r\n{\r\n    public class WebApiApplication : System.Web.HttpApplication\r\n    {\r\n        protected void Application_Start()\r\n        {\r\n            GlobalConfiguration.Configure(WebApiConfig.Register);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.JSON.SocialMedia/AccountManagement/Properties/AssemblyInfo.cs",
    "content": "﻿using System.Reflection;\r\nusing System.Runtime.CompilerServices;\r\nusing System.Runtime.InteropServices;\r\n\r\n// General Information about an assembly is controlled through the following \r\n// set of attributes. Change these attribute values to modify the information\r\n// associated with an assembly.\r\n[assembly: AssemblyTitle(\"AccountManagement\")]\r\n[assembly: AssemblyDescription(\"\")]\r\n[assembly: AssemblyConfiguration(\"\")]\r\n[assembly: AssemblyCompany(\"\")]\r\n[assembly: AssemblyProduct(\"AccountManagement\")]\r\n[assembly: AssemblyCopyright(\"Copyright ©  2014\")]\r\n[assembly: AssemblyTrademark(\"\")]\r\n[assembly: AssemblyCulture(\"\")]\r\n\r\n// Setting ComVisible to false makes the types in this assembly not visible \r\n// to COM components.  If you need to access a type in this assembly from \r\n// COM, set the ComVisible attribute to true on that type.\r\n[assembly: ComVisible(false)]\r\n\r\n// The following GUID is for the ID of the typelib if this project is exposed to COM\r\n[assembly: Guid(\"63f18f3d-8b2f-468d-bc97-fdc2a7fa1faa\")]\r\n\r\n// Version information for an assembly consists of the following four values:\r\n//\r\n//      Major Version\r\n//      Minor Version \r\n//      Build Number\r\n//      Revision\r\n//\r\n// You can specify all the values or you can default the Revision and Build Numbers \r\n// by using the '*' as shown below:\r\n[assembly: AssemblyVersion(\"1.0.0.0\")]\r\n[assembly: AssemblyFileVersion(\"1.0.0.0\")]\r\n"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.JSON.SocialMedia/AccountManagement/Web.Debug.config",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n\r\n<!-- For more information on using web.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 -->\r\n\r\n<configuration xmlns:xdt=\"http://schemas.microsoft.com/XML-Document-Transform\">\r\n  <!--\r\n    In the example below, the \"SetAttributes\" transform will change the value of \r\n    \"connectionString\" to use \"ReleaseSQLServer\" only when the \"Match\" locator \r\n    finds an attribute \"name\" that has a value of \"MyDB\".\r\n    \r\n    <connectionStrings>\r\n      <add name=\"MyDB\" \r\n        connectionString=\"Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True\" \r\n        xdt:Transform=\"SetAttributes\" xdt:Locator=\"Match(name)\"/>\r\n    </connectionStrings>\r\n  -->\r\n  <system.web>\r\n    <!--\r\n      In the example below, the \"Replace\" transform will replace the entire \r\n      <customErrors> section of your web.config file.\r\n      Note that because there is only one customErrors section under the \r\n      <system.web> node, there is no need to use the \"xdt:Locator\" attribute.\r\n      \r\n      <customErrors defaultRedirect=\"GenericError.htm\"\r\n        mode=\"RemoteOnly\" xdt:Transform=\"Replace\">\r\n        <error statusCode=\"500\" redirect=\"InternalError.htm\"/>\r\n      </customErrors>\r\n    -->\r\n  </system.web>\r\n</configuration>"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.JSON.SocialMedia/AccountManagement/Web.Release.config",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n\r\n<!-- For more information on using web.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 -->\r\n\r\n<configuration xmlns:xdt=\"http://schemas.microsoft.com/XML-Document-Transform\">\r\n  <!--\r\n    In the example below, the \"SetAttributes\" transform will change the value of \r\n    \"connectionString\" to use \"ReleaseSQLServer\" only when the \"Match\" locator \r\n    finds an attribute \"name\" that has a value of \"MyDB\".\r\n    \r\n    <connectionStrings>\r\n      <add name=\"MyDB\" \r\n        connectionString=\"Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True\" \r\n        xdt:Transform=\"SetAttributes\" xdt:Locator=\"Match(name)\"/>\r\n    </connectionStrings>\r\n  -->\r\n  <system.web>\r\n    <compilation xdt:Transform=\"RemoveAttributes(debug)\" />\r\n    <!--\r\n      In the example below, the \"Replace\" transform will replace the entire \r\n      <customErrors> section of your web.config file.\r\n      Note that because there is only one customErrors section under the \r\n      <system.web> node, there is no need to use the \"xdt:Locator\" attribute.\r\n      \r\n      <customErrors defaultRedirect=\"GenericError.htm\"\r\n        mode=\"RemoteOnly\" xdt:Transform=\"Replace\">\r\n        <error statusCode=\"500\" redirect=\"InternalError.htm\"/>\r\n      </customErrors>\r\n    -->\r\n  </system.web>\r\n</configuration>"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.JSON.SocialMedia/AccountManagement/Web.config",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<!--\r\n  For more information on how to configure your ASP.NET application, please visit\r\n  http://go.microsoft.com/fwlink/?LinkId=301879\r\n  -->\r\n<configuration>\r\n  <appSettings>\r\n  </appSettings>\r\n  <system.web>\r\n    <compilation debug=\"true\" targetFramework=\"4.5\" />\r\n    <httpRuntime targetFramework=\"4.5\" />\r\n  </system.web>\r\n  <system.webServer>\r\n    <handlers>\r\n      <remove name=\"ExtensionlessUrlHandler-Integrated-4.0\" />\r\n      <remove name=\"OPTIONSVerbHandler\" />\r\n      <remove name=\"TRACEVerbHandler\" />\r\n      <add name=\"ExtensionlessUrlHandler-Integrated-4.0\" path=\"*.\" verb=\"*\" type=\"System.Web.Handlers.TransferRequestHandler\" preCondition=\"integratedMode,runtimeVersionv4.0\" />\r\n    </handlers>\r\n  </system.webServer>\r\n</configuration>\r\n"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.JSON.SocialMedia/AccountManagement/packages.config",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<packages>\r\n  <package id=\"Microsoft.AspNet.WebApi\" version=\"5.0.0\" targetFramework=\"net45\" />\r\n  <package id=\"Microsoft.AspNet.WebApi.Client\" version=\"5.0.0\" targetFramework=\"net45\" />\r\n  <package id=\"Microsoft.AspNet.WebApi.Core\" version=\"5.0.0\" targetFramework=\"net45\" />\r\n  <package id=\"Microsoft.AspNet.WebApi.WebHost\" version=\"5.0.0\" targetFramework=\"net45\" />\r\n  <package id=\"Newtonsoft.Json\" version=\"5.0.6\" targetFramework=\"net45\" />\r\n</packages>"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.JSON.SocialMedia/Discovery/App_Start/WebApiConfig.cs",
    "content": "﻿using System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Web.Http;\r\n\r\nnamespace Discovery\r\n{\r\n    public static class WebApiConfig\r\n    {\r\n        public static void Register(HttpConfiguration config)\r\n        {\r\n            // Web API configuration and services\r\n\r\n            // Web API routes\r\n            config.MapHttpAttributeRoutes();\r\n\r\n            config.Routes.MapHttpRoute(\r\n                name: \"DefaultApi\",\r\n                routeTemplate: \"api/{controller}/{id}\",\r\n                defaults: new { id = RouteParameter.Optional }\r\n            );\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.JSON.SocialMedia/Discovery/Controllers/RecommenderController.cs",
    "content": "﻿using System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Net;\r\nusing System.Net.Http;\r\nusing System.Web.Http;\r\nusing ServiceStack.Text;\r\n\r\nnamespace Discovery.Controllers\r\n{\r\n    public class RecommenderController : ApiController\r\n    {\r\n        public List<string>  GetRecommendedUsers(string accountId)\r\n        {\r\n            var accountManagementUrl =\r\n                \"http://localhost:3200/api/\" +\r\n                \"followerdirectory/getusersfollowers?\" +\r\n                \"accountId=\" + accountId;\r\n\r\n            var response = new WebClient().DownloadString(accountManagementUrl);\r\n            var followers = JsonSerializer.DeserializeFromString<List<Follower>>(response);\r\n\t\t\r\n            // automatically converted to JSON by Web API\r\n            return FindRecommendedUsersBasedOnSocialTags(followers);\r\n        }\r\n\r\n        private List<string> FindRecommendedUsersBasedOnSocialTags(List<Follower> followers)\r\n        {\r\n            /*\r\n             * Real system would look at the users tags and find \r\n             * popular accounts with similar tags by making more \r\n             * RPC calls.\r\n             */\r\n            var tags = followers.SelectMany(f => f.SocialTags).Distinct();\r\n            return tags.Select(t => t + \"_user_1\").ToList();\r\n        }\r\n\r\n    }\r\n\r\n    /* class not shared between Bounded Contexts to meet\r\n     * requirement of no source code dependencies\r\n     */\r\n    public class Follower\r\n    {\r\n        public string FollowerId { get; set; }\r\n\r\n        public string FollowerName { get; set; }\r\n\r\n        public List<string> SocialTags { get; set; }\r\n    }\r\n}\r\n"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.JSON.SocialMedia/Discovery/Discovery.csproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Project ToolsVersion=\"12.0\" DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\r\n  <Import Project=\"$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props\" Condition=\"Exists('$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props')\" />\r\n  <PropertyGroup>\r\n    <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>\r\n    <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>\r\n    <ProductVersion>\r\n    </ProductVersion>\r\n    <SchemaVersion>2.0</SchemaVersion>\r\n    <ProjectGuid>{A8F7B7B2-F436-4F38-A5B6-A0C86FEC4F8F}</ProjectGuid>\r\n    <ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>\r\n    <OutputType>Library</OutputType>\r\n    <AppDesignerFolder>Properties</AppDesignerFolder>\r\n    <RootNamespace>Discovery</RootNamespace>\r\n    <AssemblyName>Discovery</AssemblyName>\r\n    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r\n    <UseIISExpress>true</UseIISExpress>\r\n    <IISExpressSSLPort />\r\n    <IISExpressAnonymousAuthentication />\r\n    <IISExpressWindowsAuthentication />\r\n    <IISExpressUseClassicPipelineMode />\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' \">\r\n    <DebugSymbols>true</DebugSymbols>\r\n    <DebugType>full</DebugType>\r\n    <Optimize>false</Optimize>\r\n    <OutputPath>bin\\</OutputPath>\r\n    <DefineConstants>DEBUG;TRACE</DefineConstants>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <WarningLevel>4</WarningLevel>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' \">\r\n    <DebugType>pdbonly</DebugType>\r\n    <Optimize>true</Optimize>\r\n    <OutputPath>bin\\</OutputPath>\r\n    <DefineConstants>TRACE</DefineConstants>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <WarningLevel>4</WarningLevel>\r\n  </PropertyGroup>\r\n  <ItemGroup>\r\n    <Reference Include=\"Microsoft.CSharp\" />\r\n    <Reference Include=\"ServiceStack.Text\">\r\n      <HintPath>..\\packages\\ServiceStack.Text.4.0.15\\lib\\net40\\ServiceStack.Text.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"System.Net.Http\" />\r\n    <Reference Include=\"System.Net.Http.Formatting, Version=5.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL\">\r\n      <SpecificVersion>False</SpecificVersion>\r\n      <HintPath>..\\packages\\Microsoft.AspNet.WebApi.Client.5.1.1\\lib\\net45\\System.Net.Http.Formatting.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"System.Web.DynamicData\" />\r\n    <Reference Include=\"System.Web.Entity\" />\r\n    <Reference Include=\"System.Web.ApplicationServices\" />\r\n    <Reference Include=\"System.ComponentModel.DataAnnotations\" />\r\n    <Reference Include=\"System\" />\r\n    <Reference Include=\"System.Data\" />\r\n    <Reference Include=\"System.Core\" />\r\n    <Reference Include=\"System.Data.DataSetExtensions\" />\r\n    <Reference Include=\"System.Web.Extensions\" />\r\n    <Reference Include=\"System.Xml.Linq\" />\r\n    <Reference Include=\"System.Drawing\" />\r\n    <Reference Include=\"System.Web\" />\r\n    <Reference Include=\"System.Xml\" />\r\n    <Reference Include=\"System.Configuration\" />\r\n    <Reference Include=\"System.Web.Services\" />\r\n    <Reference Include=\"System.EnterpriseServices\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <Reference Include=\"Newtonsoft.Json\">\r\n      <HintPath>..\\packages\\Newtonsoft.Json.5.0.6\\lib\\net45\\Newtonsoft.Json.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"System.Web.Http\">\r\n      <HintPath>..\\packages\\Microsoft.AspNet.WebApi.Core.5.0.0\\lib\\net45\\System.Web.Http.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"System.Web.Http.WebHost\">\r\n      <HintPath>..\\packages\\Microsoft.AspNet.WebApi.WebHost.5.0.0\\lib\\net45\\System.Web.Http.WebHost.dll</HintPath>\r\n    </Reference>\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <Content Include=\"Global.asax\" />\r\n    <Content Include=\"Web.config\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <Compile Include=\"App_Start\\WebApiConfig.cs\" />\r\n    <Compile Include=\"Controllers\\RecommenderController.cs\" />\r\n    <Compile Include=\"Global.asax.cs\">\r\n      <DependentUpon>Global.asax</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Properties\\AssemblyInfo.cs\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <Content Include=\"packages.config\" />\r\n    <None Include=\"Web.Debug.config\">\r\n      <DependentUpon>Web.config</DependentUpon>\r\n    </None>\r\n    <None Include=\"Web.Release.config\">\r\n      <DependentUpon>Web.config</DependentUpon>\r\n    </None>\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <Folder Include=\"App_Data\\\" />\r\n    <Folder Include=\"Models\\\" />\r\n  </ItemGroup>\r\n  <PropertyGroup>\r\n    <VisualStudioVersion Condition=\"'$(VisualStudioVersion)' == ''\">10.0</VisualStudioVersion>\r\n    <VSToolsPath Condition=\"'$(VSToolsPath)' == ''\">$(MSBuildExtensionsPath32)\\Microsoft\\VisualStudio\\v$(VisualStudioVersion)</VSToolsPath>\r\n  </PropertyGroup>\r\n  <Import Project=\"$(MSBuildBinPath)\\Microsoft.CSharp.targets\" />\r\n  <Import Project=\"$(VSToolsPath)\\WebApplications\\Microsoft.WebApplication.targets\" Condition=\"'$(VSToolsPath)' != ''\" />\r\n  <Import Project=\"$(MSBuildExtensionsPath32)\\Microsoft\\VisualStudio\\v10.0\\WebApplications\\Microsoft.WebApplication.targets\" Condition=\"false\" />\r\n  <ProjectExtensions>\r\n    <VisualStudio>\r\n      <FlavorProperties GUID=\"{349c5851-65df-11da-9384-00065b846f21}\">\r\n        <WebProjectProperties>\r\n          <UseIIS>True</UseIIS>\r\n          <AutoAssignPort>True</AutoAssignPort>\r\n          <DevelopmentServerPort>1273</DevelopmentServerPort>\r\n          <DevelopmentServerVPath>/</DevelopmentServerVPath>\r\n          <IISUrl>http://localhost:1273/</IISUrl>\r\n          <NTLMAuthentication>False</NTLMAuthentication>\r\n          <UseCustomServer>False</UseCustomServer>\r\n          <CustomServerUrl>\r\n          </CustomServerUrl>\r\n          <SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>\r\n        </WebProjectProperties>\r\n      </FlavorProperties>\r\n    </VisualStudio>\r\n  </ProjectExtensions>\r\n  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \r\n       Other similar extension points exist, see Microsoft.Common.targets.\r\n  <Target Name=\"BeforeBuild\">\r\n  </Target>\r\n  <Target Name=\"AfterBuild\">\r\n  </Target>\r\n  -->\r\n</Project>"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.JSON.SocialMedia/Discovery/Global.asax",
    "content": "﻿<%@ Application Codebehind=\"Global.asax.cs\" Inherits=\"Discovery.WebApiApplication\" Language=\"C#\" %>\r\n"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.JSON.SocialMedia/Discovery/Global.asax.cs",
    "content": "﻿using System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Web;\r\nusing System.Web.Http;\r\nusing System.Web.Routing;\r\n\r\nnamespace Discovery\r\n{\r\n    public class WebApiApplication : System.Web.HttpApplication\r\n    {\r\n        protected void Application_Start()\r\n        {\r\n            GlobalConfiguration.Configure(WebApiConfig.Register);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.JSON.SocialMedia/Discovery/Properties/AssemblyInfo.cs",
    "content": "﻿using System.Reflection;\r\nusing System.Runtime.CompilerServices;\r\nusing System.Runtime.InteropServices;\r\n\r\n// General Information about an assembly is controlled through the following \r\n// set of attributes. Change these attribute values to modify the information\r\n// associated with an assembly.\r\n[assembly: AssemblyTitle(\"Discovery\")]\r\n[assembly: AssemblyDescription(\"\")]\r\n[assembly: AssemblyConfiguration(\"\")]\r\n[assembly: AssemblyCompany(\"\")]\r\n[assembly: AssemblyProduct(\"Discovery\")]\r\n[assembly: AssemblyCopyright(\"Copyright ©  2014\")]\r\n[assembly: AssemblyTrademark(\"\")]\r\n[assembly: AssemblyCulture(\"\")]\r\n\r\n// Setting ComVisible to false makes the types in this assembly not visible \r\n// to COM components.  If you need to access a type in this assembly from \r\n// COM, set the ComVisible attribute to true on that type.\r\n[assembly: ComVisible(false)]\r\n\r\n// The following GUID is for the ID of the typelib if this project is exposed to COM\r\n[assembly: Guid(\"bbeb869f-f227-47bb-ba92-11196b518b3d\")]\r\n\r\n// Version information for an assembly consists of the following four values:\r\n//\r\n//      Major Version\r\n//      Minor Version \r\n//      Build Number\r\n//      Revision\r\n//\r\n// You can specify all the values or you can default the Revision and Build Numbers \r\n// by using the '*' as shown below:\r\n[assembly: AssemblyVersion(\"1.0.0.0\")]\r\n[assembly: AssemblyFileVersion(\"1.0.0.0\")]\r\n"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.JSON.SocialMedia/Discovery/Web.Debug.config",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n\r\n<!-- For more information on using web.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 -->\r\n\r\n<configuration xmlns:xdt=\"http://schemas.microsoft.com/XML-Document-Transform\">\r\n  <!--\r\n    In the example below, the \"SetAttributes\" transform will change the value of \r\n    \"connectionString\" to use \"ReleaseSQLServer\" only when the \"Match\" locator \r\n    finds an attribute \"name\" that has a value of \"MyDB\".\r\n    \r\n    <connectionStrings>\r\n      <add name=\"MyDB\" \r\n        connectionString=\"Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True\" \r\n        xdt:Transform=\"SetAttributes\" xdt:Locator=\"Match(name)\"/>\r\n    </connectionStrings>\r\n  -->\r\n  <system.web>\r\n    <!--\r\n      In the example below, the \"Replace\" transform will replace the entire \r\n      <customErrors> section of your web.config file.\r\n      Note that because there is only one customErrors section under the \r\n      <system.web> node, there is no need to use the \"xdt:Locator\" attribute.\r\n      \r\n      <customErrors defaultRedirect=\"GenericError.htm\"\r\n        mode=\"RemoteOnly\" xdt:Transform=\"Replace\">\r\n        <error statusCode=\"500\" redirect=\"InternalError.htm\"/>\r\n      </customErrors>\r\n    -->\r\n  </system.web>\r\n</configuration>"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.JSON.SocialMedia/Discovery/Web.Release.config",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n\r\n<!-- For more information on using web.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 -->\r\n\r\n<configuration xmlns:xdt=\"http://schemas.microsoft.com/XML-Document-Transform\">\r\n  <!--\r\n    In the example below, the \"SetAttributes\" transform will change the value of \r\n    \"connectionString\" to use \"ReleaseSQLServer\" only when the \"Match\" locator \r\n    finds an attribute \"name\" that has a value of \"MyDB\".\r\n    \r\n    <connectionStrings>\r\n      <add name=\"MyDB\" \r\n        connectionString=\"Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True\" \r\n        xdt:Transform=\"SetAttributes\" xdt:Locator=\"Match(name)\"/>\r\n    </connectionStrings>\r\n  -->\r\n  <system.web>\r\n    <compilation xdt:Transform=\"RemoveAttributes(debug)\" />\r\n    <!--\r\n      In the example below, the \"Replace\" transform will replace the entire \r\n      <customErrors> section of your web.config file.\r\n      Note that because there is only one customErrors section under the \r\n      <system.web> node, there is no need to use the \"xdt:Locator\" attribute.\r\n      \r\n      <customErrors defaultRedirect=\"GenericError.htm\"\r\n        mode=\"RemoteOnly\" xdt:Transform=\"Replace\">\r\n        <error statusCode=\"500\" redirect=\"InternalError.htm\"/>\r\n      </customErrors>\r\n    -->\r\n  </system.web>\r\n</configuration>"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.JSON.SocialMedia/Discovery/Web.config",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<!--\r\n  For more information on how to configure your ASP.NET application, please visit\r\n  http://go.microsoft.com/fwlink/?LinkId=301879\r\n  -->\r\n<configuration>\r\n  <appSettings>\r\n  </appSettings>\r\n  <system.web>\r\n    <compilation debug=\"true\" targetFramework=\"4.5\"/>\r\n    <httpRuntime targetFramework=\"4.5\"/>\r\n  </system.web>\r\n  <system.webServer>\r\n    <handlers>\r\n      <remove name=\"ExtensionlessUrlHandler-Integrated-4.0\"/>\r\n      <remove name=\"OPTIONSVerbHandler\"/>\r\n      <remove name=\"TRACEVerbHandler\"/>\r\n      <add name=\"ExtensionlessUrlHandler-Integrated-4.0\" path=\"*.\" verb=\"*\" type=\"System.Web.Handlers.TransferRequestHandler\" preCondition=\"integratedMode,runtimeVersionv4.0\"/>\r\n    </handlers>\r\n  </system.webServer>\r\n\t<runtime>\r\n\t\t<assemblyBinding xmlns=\"urn:schemas-microsoft-com:asm.v1\">\r\n\t\t\t<dependentAssembly>\r\n\t\t\t\t<assemblyIdentity name=\"System.Net.Http.Formatting\" publicKeyToken=\"31BF3856AD364E35\" culture=\"neutral\"/>\r\n\t\t\t\t<bindingRedirect oldVersion=\"0.0.0.0-5.1.0.0\" newVersion=\"5.1.0.0\"/>\r\n\t\t\t</dependentAssembly>\r\n\t\t</assemblyBinding>\r\n\t</runtime>\r\n</configuration>\r\n"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.JSON.SocialMedia/Discovery/packages.config",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<packages>\r\n  <package id=\"Microsoft.AspNet.WebApi\" version=\"5.0.0\" targetFramework=\"net45\" />\r\n  <package id=\"Microsoft.AspNet.WebApi.Client\" version=\"5.1.1\" targetFramework=\"net45\" />\r\n  <package id=\"Microsoft.AspNet.WebApi.Core\" version=\"5.0.0\" targetFramework=\"net45\" />\r\n  <package id=\"Microsoft.AspNet.WebApi.WebHost\" version=\"5.0.0\" targetFramework=\"net45\" />\r\n  <package id=\"Newtonsoft.Json\" version=\"5.0.6\" targetFramework=\"net45\" />\r\n  <package id=\"ServiceStack.Text\" version=\"4.0.15\" targetFramework=\"net45\" />\r\n</packages>"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.JSON.SocialMedia/PPPDDD.JSON.SocialMedia.sln",
    "content": "﻿\nMicrosoft Visual Studio Solution File, Format Version 12.00\n# Visual Studio Express 2013 for Web\nVisualStudioVersion = 12.0.30723.0\nMinimumVisualStudioVersion = 10.0.40219.1\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"AccountManagement\", \"AccountManagement\\AccountManagement.csproj\", \"{A5683820-EAE9-4C2A-B91A-50F50A1D052F}\"\nEndProject\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"Discovery\", \"Discovery\\Discovery.csproj\", \"{A8F7B7B2-F436-4F38-A5B6-A0C86FEC4F8F}\"\nEndProject\nProject(\"{2150E333-8FDC-42A3-9474-1A3956D46DE8}\") = \"Account Management Context\", \"Account Management Context\", \"{71903407-D5A0-4EEE-934C-BF7EE76F1974}\"\nEndProject\nProject(\"{2150E333-8FDC-42A3-9474-1A3956D46DE8}\") = \"Discovery Context\", \"Discovery Context\", \"{AB48B0DE-79AD-4177-98FA-4E04FDF7D9C1}\"\nEndProject\nGlobal\n\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\n\t\tDebug|Any CPU = Debug|Any CPU\n\t\tRelease|Any CPU = Release|Any CPU\n\tEndGlobalSection\n\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\n\t\t{A5683820-EAE9-4C2A-B91A-50F50A1D052F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{A5683820-EAE9-4C2A-B91A-50F50A1D052F}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{A5683820-EAE9-4C2A-B91A-50F50A1D052F}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{A5683820-EAE9-4C2A-B91A-50F50A1D052F}.Release|Any CPU.Build.0 = Release|Any CPU\n\t\t{A8F7B7B2-F436-4F38-A5B6-A0C86FEC4F8F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{A8F7B7B2-F436-4F38-A5B6-A0C86FEC4F8F}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{A8F7B7B2-F436-4F38-A5B6-A0C86FEC4F8F}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{A8F7B7B2-F436-4F38-A5B6-A0C86FEC4F8F}.Release|Any CPU.Build.0 = Release|Any CPU\n\tEndGlobalSection\n\tGlobalSection(SolutionProperties) = preSolution\n\t\tHideSolutionNode = FALSE\n\tEndGlobalSection\n\tGlobalSection(NestedProjects) = preSolution\n\t\t{A5683820-EAE9-4C2A-B91A-50F50A1D052F} = {71903407-D5A0-4EEE-934C-BF7EE76F1974}\n\t\t{A8F7B7B2-F436-4F38-A5B6-A0C86FEC4F8F} = {AB48B0DE-79AD-4177-98FA-4E04FDF7D9C1}\n\tEndGlobalSection\nEndGlobal\n"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.REST.SocialMedia/.gitignore",
    "content": "## Ignore Visual Studio temporary files, build results, and\r\n## files generated by popular Visual Studio add-ons.\r\n\r\n# User-specific files\r\n*.suo\r\n*.user\r\n*.sln.docstates\r\n\r\n# Build results\r\n[Dd]ebug/\r\n[Dd]ebugPublic/\r\n[Rr]elease/\r\nx64/\r\nbuild/\r\nbld/\r\n[Bb]in/\r\n[Oo]bj/\r\n\r\n# MSTest test Results\r\n[Tt]est[Rr]esult*/\r\n[Bb]uild[Ll]og.*\r\n\r\n#NUNIT\r\n*.VisualState.xml\r\nTestResult.xml\r\n\r\n# Build Results of an ATL Project\r\n[Dd]ebugPS/\r\n[Rr]eleasePS/\r\ndlldata.c\r\n\r\n*_i.c\r\n*_p.c\r\n*_i.h\r\n*.ilk\r\n*.meta\r\n*.obj\r\n*.pch\r\n*.pdb\r\n*.pgc\r\n*.pgd\r\n*.rsp\r\n*.sbr\r\n*.tlb\r\n*.tli\r\n*.tlh\r\n*.tmp\r\n*.tmp_proj\r\n*.log\r\n*.vspscc\r\n*.vssscc\r\n.builds\r\n*.pidb\r\n*.svclog\r\n*.scc\r\n\r\n# Chutzpah Test files\r\n_Chutzpah*\r\n\r\n# Visual C++ cache files\r\nipch/\r\n*.aps\r\n*.ncb\r\n*.opensdf\r\n*.sdf\r\n*.cachefile\r\n\r\n# Visual Studio profiler\r\n*.psess\r\n*.vsp\r\n*.vspx\r\n\r\n# TFS 2012 Local Workspace\r\n$tf/\r\n\r\n# Guidance Automation Toolkit\r\n*.gpState\r\n\r\n# ReSharper is a .NET coding add-in\r\n_ReSharper*/\r\n*.[Rr]e[Ss]harper\r\n*.DotSettings.user\r\n\r\n# JustCode is a .NET coding addin-in\r\n.JustCode\r\n\r\n# TeamCity is a build add-in\r\n_TeamCity*\r\n\r\n# DotCover is a Code Coverage Tool\r\n*.dotCover\r\n\r\n# NCrunch\r\n*.ncrunch*\r\n_NCrunch_*\r\n.*crunch*.local.xml\r\n\r\n# MightyMoose\r\n*.mm.*\r\nAutoTest.Net/\r\n\r\n# Web workbench (sass)\r\n.sass-cache/\r\n\r\n# Installshield output folder\r\n[Ee]xpress/\r\n\r\n# DocProject is a documentation generator add-in\r\nDocProject/buildhelp/\r\nDocProject/Help/*.HxT\r\nDocProject/Help/*.HxC\r\nDocProject/Help/*.hhc\r\nDocProject/Help/*.hhk\r\nDocProject/Help/*.hhp\r\nDocProject/Help/Html2\r\nDocProject/Help/html\r\n\r\n# Click-Once directory\r\npublish/\r\n\r\n# Publish Web Output\r\n*.[Pp]ublish.xml\r\n*.azurePubxml\r\n\r\n# NuGet Packages Directory\r\npackages/\r\n## TODO: If the tool you use requires repositories.config uncomment the next line\r\n#!packages/repositories.config\r\n\r\n# Enable \"build/\" folder in the NuGet Packages folder since NuGet packages use it for MSBuild targets\r\n# This line needs to be after the ignore of the build folder (and the packages folder if the line above has been uncommented)\r\n!packages/build/\r\n\r\n# Windows Azure Build Output\r\ncsx/\r\n*.build.csdef\r\n\r\n# Windows Store app package directory\r\nAppPackages/\r\n\r\n# Others\r\nsql/\r\n*.Cache\r\nClientBin/\r\n[Ss]tyle[Cc]op.*\r\n~$*\r\n*~\r\n*.dbmdl\r\n*.dbproj.schemaview\r\n*.pfx\r\n*.publishsettings\r\nnode_modules/\r\n\r\n# RIA/Silverlight projects\r\nGenerated_Code/\r\n\r\n# Backup & report files from converting an old project file to a newer\r\n# Visual Studio version. Backup files are not needed, because we have git ;-)\r\n_UpgradeReport_Files/\r\nBackup*/\r\nUpgradeLog*.XML\r\nUpgradeLog*.htm\r\n\r\n# SQL Server files\r\n*.mdf\r\n*.ldf\r\n\r\n# Business Intelligence projects\r\n*.rdl.data\r\n*.bim.layout\r\n*.bim_*.settings\r\n\r\n# Microsoft Fakes\r\nFakesAssemblies/"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.REST.SocialMedia/AccountManagement.Accounts.Api/AccountManagement.Accounts.Api.csproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Project ToolsVersion=\"12.0\" DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\r\n  <Import Project=\"$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props\" Condition=\"Exists('$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props')\" />\r\n  <PropertyGroup>\r\n    <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>\r\n    <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>\r\n    <ProductVersion>\r\n    </ProductVersion>\r\n    <SchemaVersion>2.0</SchemaVersion>\r\n    <ProjectGuid>{F9B8D9B8-C9C7-4F8B-A75B-39B28A8E7F55}</ProjectGuid>\r\n    <ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>\r\n    <OutputType>Library</OutputType>\r\n    <AppDesignerFolder>Properties</AppDesignerFolder>\r\n    <RootNamespace>AccountManagement.Accounts.Api</RootNamespace>\r\n    <AssemblyName>AccountManagement.Accounts.Api</AssemblyName>\r\n    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r\n    <UseIISExpress>true</UseIISExpress>\r\n    <IISExpressSSLPort />\r\n    <IISExpressAnonymousAuthentication />\r\n    <IISExpressWindowsAuthentication />\r\n    <IISExpressUseClassicPipelineMode />\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' \">\r\n    <DebugSymbols>true</DebugSymbols>\r\n    <DebugType>full</DebugType>\r\n    <Optimize>false</Optimize>\r\n    <OutputPath>bin\\</OutputPath>\r\n    <DefineConstants>DEBUG;TRACE</DefineConstants>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <WarningLevel>4</WarningLevel>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' \">\r\n    <DebugType>pdbonly</DebugType>\r\n    <Optimize>true</Optimize>\r\n    <OutputPath>bin\\</OutputPath>\r\n    <DefineConstants>TRACE</DefineConstants>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <WarningLevel>4</WarningLevel>\r\n  </PropertyGroup>\r\n  <ItemGroup>\r\n    <Reference Include=\"EventStore.ClientAPI\">\r\n      <HintPath>..\\packages\\EventStore.Client.2.0.2\\lib\\net40\\EventStore.ClientAPI.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"Microsoft.CSharp\" />\r\n    <Reference Include=\"ServiceStack.Text\">\r\n      <HintPath>..\\packages\\ServiceStack.Text.4.0.15\\lib\\net40\\ServiceStack.Text.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"System.Net.Http\" />\r\n    <Reference Include=\"System.Net.Http.Formatting, Version=5.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL\">\r\n      <SpecificVersion>False</SpecificVersion>\r\n      <HintPath>..\\packages\\Microsoft.AspNet.WebApi.Client.5.1.1\\lib\\net45\\System.Net.Http.Formatting.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"System.Web.Cors, Version=5.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL\">\r\n      <SpecificVersion>False</SpecificVersion>\r\n      <HintPath>..\\packages\\Microsoft.AspNet.Cors.5.1.1\\lib\\net45\\System.Web.Cors.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"System.Web.DynamicData\" />\r\n    <Reference Include=\"System.Web.Entity\" />\r\n    <Reference Include=\"System.Web.ApplicationServices\" />\r\n    <Reference Include=\"System.ComponentModel.DataAnnotations\" />\r\n    <Reference Include=\"System\" />\r\n    <Reference Include=\"System.Data\" />\r\n    <Reference Include=\"System.Core\" />\r\n    <Reference Include=\"System.Data.DataSetExtensions\" />\r\n    <Reference Include=\"System.Web.Extensions\" />\r\n    <Reference Include=\"System.Web.Http, Version=5.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL\">\r\n      <SpecificVersion>False</SpecificVersion>\r\n      <HintPath>..\\packages\\Microsoft.AspNet.WebApi.Core.5.1.1\\lib\\net45\\System.Web.Http.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"System.Web.Http.Cors, Version=5.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL\">\r\n      <SpecificVersion>False</SpecificVersion>\r\n      <HintPath>..\\packages\\Microsoft.AspNet.WebApi.Cors.5.1.1\\lib\\net45\\System.Web.Http.Cors.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"System.Xml.Linq\" />\r\n    <Reference Include=\"System.Drawing\" />\r\n    <Reference Include=\"System.Web\" />\r\n    <Reference Include=\"System.Xml\" />\r\n    <Reference Include=\"System.Configuration\" />\r\n    <Reference Include=\"System.Web.Services\" />\r\n    <Reference Include=\"System.EnterpriseServices\" />\r\n    <Reference Include=\"WebApi.Hal\">\r\n      <HintPath>..\\packages\\WebApi.Hal.2.2.0.18\\lib\\net45\\WebApi.Hal.dll</HintPath>\r\n    </Reference>\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <Reference Include=\"Newtonsoft.Json\">\r\n      <HintPath>..\\packages\\Newtonsoft.Json.5.0.6\\lib\\net45\\Newtonsoft.Json.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"System.Web.Http.WebHost\">\r\n      <HintPath>..\\packages\\Microsoft.AspNet.WebApi.WebHost.5.0.0\\lib\\net45\\System.Web.Http.WebHost.dll</HintPath>\r\n    </Reference>\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <Content Include=\"Global.asax\" />\r\n    <Content Include=\"Web.config\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <Compile Include=\"App_Start\\WebApiConfig.cs\" />\r\n    <Compile Include=\"Controllers\\AccountsController.cs\" />\r\n    <Compile Include=\"Controllers\\FollowersController.cs\" />\r\n    <Compile Include=\"Global.asax.cs\">\r\n      <DependentUpon>Global.asax</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Properties\\AssemblyInfo.cs\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <Content Include=\"packages.config\" />\r\n    <None Include=\"Web.Debug.config\">\r\n      <DependentUpon>Web.config</DependentUpon>\r\n    </None>\r\n    <None Include=\"Web.Release.config\">\r\n      <DependentUpon>Web.config</DependentUpon>\r\n    </None>\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <Folder Include=\"App_Data\\\" />\r\n    <Folder Include=\"Models\\\" />\r\n  </ItemGroup>\r\n  <PropertyGroup>\r\n    <VisualStudioVersion Condition=\"'$(VisualStudioVersion)' == ''\">10.0</VisualStudioVersion>\r\n    <VSToolsPath Condition=\"'$(VSToolsPath)' == ''\">$(MSBuildExtensionsPath32)\\Microsoft\\VisualStudio\\v$(VisualStudioVersion)</VSToolsPath>\r\n  </PropertyGroup>\r\n  <Import Project=\"$(MSBuildBinPath)\\Microsoft.CSharp.targets\" />\r\n  <Import Project=\"$(VSToolsPath)\\WebApplications\\Microsoft.WebApplication.targets\" Condition=\"'$(VSToolsPath)' != ''\" />\r\n  <Import Project=\"$(MSBuildExtensionsPath32)\\Microsoft\\VisualStudio\\v10.0\\WebApplications\\Microsoft.WebApplication.targets\" Condition=\"false\" />\r\n  <ProjectExtensions>\r\n    <VisualStudio>\r\n      <FlavorProperties GUID=\"{349c5851-65df-11da-9384-00065b846f21}\">\r\n        <WebProjectProperties>\r\n          <UseIIS>True</UseIIS>\r\n          <AutoAssignPort>True</AutoAssignPort>\r\n          <DevelopmentServerPort>1088</DevelopmentServerPort>\r\n          <DevelopmentServerVPath>/</DevelopmentServerVPath>\r\n          <IISUrl>http://localhost:4101/</IISUrl>\r\n          <NTLMAuthentication>False</NTLMAuthentication>\r\n          <UseCustomServer>False</UseCustomServer>\r\n          <CustomServerUrl>\r\n          </CustomServerUrl>\r\n          <SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>\r\n        </WebProjectProperties>\r\n      </FlavorProperties>\r\n    </VisualStudio>\r\n  </ProjectExtensions>\r\n  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \r\n       Other similar extension points exist, see Microsoft.Common.targets.\r\n  <Target Name=\"BeforeBuild\">\r\n  </Target>\r\n  <Target Name=\"AfterBuild\">\r\n  </Target>\r\n  -->\r\n</Project>"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.REST.SocialMedia/AccountManagement.Accounts.Api/App_Start/WebApiConfig.cs",
    "content": "﻿using System;\r\nusing System.Web.Http;\r\nusing System.Web.Http.Cors;\r\n\r\nnamespace AccountManagement.Accounts.Api\r\n{\r\n    public static class WebApiConfig\r\n    {\r\n        public static void Register(HttpConfiguration config)\r\n        {\r\n            var cors = new EnableCorsAttribute(\"*\", \"*\", \"*\");\r\n            config.EnableCors(cors);\r\n\r\n            config.MapHttpAttributeRoutes();\r\n\r\n            config.Routes.MapHttpRoute(\r\n                name: \"Accounts Collection\",\r\n                routeTemplate: \"accountmanagement/accounts\",\r\n                defaults: new { controller = \"Accounts\", action = \"Index\" }\r\n            );\r\n\r\n            config.Routes.MapHttpRoute(\r\n                name: \"Individual Account\",\r\n                routeTemplate: \"accountmanagement/accounts/{accountId}\",\r\n                defaults: new { controller = \"Accounts\", action = \"Account\" }\r\n            );\r\n\r\n            config.Routes.MapHttpRoute(\r\n               name: \"Account Followers\",\r\n               routeTemplate: \"accountmanagement/accounts/{accountId}/followers\",\r\n               defaults: new { controller = \"Followers\", action = \"Index\" }\r\n            );\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.REST.SocialMedia/AccountManagement.Accounts.Api/Controllers/AccountsController.cs",
    "content": "﻿using System;\r\nusing System.Collections.Generic;\r\nusing System.Web.Http;\r\nusing WebApi.Hal;\r\n\r\nnamespace AccountManagement.Accounts.Api.Controllers\r\n{\r\n    public class AccountsController : ApiController\r\n    {\r\n        private const string EntryPointBaseUrl = \"http://localhost:4100/\";\r\n        private const string AccountsBaseUrl  = \"http://localhost:4101/accountmanagement/\";\r\n\r\n\t    [HttpGet]\r\n        public AccountsRepresentation Index()\r\n        {\r\n            return new AccountsRepresentation\r\n            {\r\n                Href = AccountsBaseUrl + \"accounts\",\r\n                Rel = \"self\",\r\n                Links = new List<Link>\r\n                {\r\n                    new Link\r\n                    {\r\n                        Href = AccountsBaseUrl + \"accounts?page=1\",\r\n                        Rel = \"alternative\",\r\n                    },\r\n                    new Link\r\n                    {\r\n                        // automatically identified as a template \r\n                        Href = AccountsBaseUrl + \"accounts/{accountId}\",\r\n                        Rel = \"account\",\r\n                        Title = \"account template\"\r\n                    },\r\n                    new Link\r\n                    {\r\n                        Href = AccountsBaseUrl + \"accounts/123\",\r\n                        Rel = \"account\",\r\n                        Title = \"account 123\"\r\n                    },\r\n                    new Link\r\n                    {\r\n                        Href = AccountsBaseUrl + \"accounts/456\",\r\n                        Rel = \"account\",\r\n                        Title = \"account 456\"\r\n                    },\r\n                    new Link \r\n                    {\r\n                        Href = AccountsBaseUrl + \"acccounts?page=2\",\r\n                        Rel = \"next\"\r\n                    },\r\n                    new Link\r\n                    {\r\n                        Href = EntryPointBaseUrl + \"accountmanagement\",\r\n                        Rel = \"parent\"\r\n                    }\r\n                },\r\n            };\r\n        }\r\n\r\n        [HttpGet]\r\n        public AccountRepresentation Account(string accountId)\r\n        {\r\n            // canned data.. for now\r\n            return new AccountRepresentation\r\n            {\r\n                Href = AccountsBaseUrl + \"accounts/\" + accountId,\r\n                Rel = \"self\",\r\n                AccountId = accountId,\r\n                Name = \"Account_\" + accountId,\r\n                Links = new List<Link>\r\n                {\r\n                    new Link\r\n                    {\r\n                        Href = AccountsBaseUrl + \"accounts\",\r\n                        Rel = \"collection\", \r\n                    },\r\n                    new Link\r\n                    {\r\n                        Href = AccountsBaseUrl + \"accounts/\" + accountId + \"/followers\",\r\n                        Rel = \"followers\", \r\n                    },\r\n                    new Link\r\n                    {\r\n                        Href = AccountsBaseUrl + \"accounts/\" + accountId + \"/following\",\r\n                        Rel = \"following\",\r\n                    },\r\n                    new Link\r\n                    {\r\n                        Href = AccountsBaseUrl + \"accounts/\" + accountId + \"/blurbs\",\r\n                        Rel = \"blurbs\",\r\n                    }\r\n                }\r\n            };\r\n        }\r\n\r\n    }\r\n\r\n    public class AccountRepresentation : Representation\r\n    {\r\n        public string AccountId { get; set; }\r\n        public string Name { get; set; }\r\n\r\n        protected override void CreateHypermedia()\r\n        {\r\n        }\r\n    }\r\n\r\n    public class AccountsRepresentation : Representation\r\n    {\r\n        protected override void CreateHypermedia()\r\n        {\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.REST.SocialMedia/AccountManagement.Accounts.Api/Controllers/FollowersController.cs",
    "content": "﻿using System;\r\nusing System.Collections.Generic;\r\nusing System.Web.Http;\r\nusing WebApi.Hal;\r\nusing EventStore.ClientAPI;\r\nusing System.Net;\r\nusing System.Text;\r\nusing ServiceStack.Text;\r\nusing System.Net.Http;\r\n\r\nnamespace AccountManagement.Accounts.Controllers\r\n{\r\n    public class FollowersController : ApiController\r\n    {\r\n        private const string AccountsBaseUrl = \"http://localhost:4101/accountmanagement/\";\r\n\r\n        [HttpGet]\r\n        public FollowersRepresentation Index(string accountId)\r\n        {\r\n            return new FollowersRepresentation\r\n            {\r\n                Href = AccountsBaseUrl + \"accounts/\" + accountId + \"/followers\",\r\n                Rel = \"self\",\r\n                Links = new List<Link>\r\n                {\r\n                    new Link\r\n                    {\r\n                        Href = AccountsBaseUrl + \"accounts/\" + accountId + \"/followers?pages=2\",\r\n                        Rel = \"next\",\r\n                    },\r\n                },\r\n                followers = GetFollowers(accountId)\r\n            };\r\n        }\r\n\r\n        private List<Follower> GetFollowers(string accountId)\r\n        {\r\n            // replace with DB lookup etc\r\n            return new List<Follower>\r\n            {\r\n                new Follower \r\n                {\r\n                    AccountId = \"fl1\",\r\n\t\t         },\r\n                new Follower \r\n                {\r\n                    AccountId = \"fl2\",\r\n\t\t        },\r\n                new Follower \r\n                {\r\n                    AccountId = \"fl3\",\r\n\t\t        }\r\n            };\r\n        }\r\n\r\n        [HttpPost] // respond to POST requests only\r\n        [ActionName(\"index\")] // Web API will not allow duplicate names\r\n        public IHttpActionResult IndexPOST(string accountId, Follower follower)\r\n        {\r\n            // accountId will be taken from querystring - it is a simple type\r\n            // follower will be taken from request body - it is a complex type\r\n\r\n            var evnt = new BeganFollowing\r\n            {\r\n                AccountId = accountId,\r\n                FollowerId = follower.AccountId\r\n            };\r\n            EventPersister.PersistEvent(evnt);\r\n            return RedirectToRoute(\"Account Followers\", new { accountId = accountId });\r\n        }\r\n    }\r\n\r\n    public class FollowersRepresentation : Representation\r\n    {\r\n        public List<Follower> followers { get; set; }\r\n\r\n        protected override void CreateHypermedia()\r\n        {\r\n        }\r\n    }\r\n\r\n    public class Follower\r\n    {\r\n        public string AccountId { get; set; }\r\n    }\r\n\r\n    // representing the domain event\r\n    public class BeganFollowing\r\n    {\r\n        public string AccountId { get; set; }\r\n\r\n        public string FollowerId { get; set; }\r\n    }\r\n\r\n    public static class EventPersister\r\n    {\r\n        private static IPEndPoint defaultEsEndpoint =\r\n     new IPEndPoint(IPAddress.Loopback, 1113);\r\n\r\n        private static IEventStoreConnection esConn =\r\n        EventStoreConnection.Create(defaultEsEndpoint);\r\n\r\n        static EventPersister()\r\n        {\r\n            esConn.Connect();\r\n        }\r\n\r\n        public static void PersistEvent(object ev)\r\n        {\r\n            var commitHeaders = new Dictionary<string, object>\r\n            {\r\n                {\"CommitId\", Guid.NewGuid()},\r\n            };\r\n\r\n            esConn.AppendToStream(\r\n                \"BeganFollowing\", ExpectedVersion.Any, ToEventData(Guid.NewGuid(),\r\n                ev, commitHeaders\r\n            ));\r\n        }\r\n\r\n        private static EventData ToEventData(Guid eventId, object evnt, IDictionary<string, object> headers)\r\n        {\r\n            var data = Encoding.UTF8.GetBytes(\r\n                JsonSerializer.SerializeToString(evnt)\r\n            );\r\n            var metadata = Encoding.UTF8.GetBytes(\r\n                JsonSerializer.SerializeToString(headers)\r\n            );\r\n            var typeName = evnt.GetType().Name;\r\n            \r\n            return new EventData(eventId, typeName, true, data, metadata);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.REST.SocialMedia/AccountManagement.Accounts.Api/Global.asax",
    "content": "﻿<%@ Application Codebehind=\"Global.asax.cs\" Inherits=\"AccountManagement.Accounts.Api.WebApiApplication\" Language=\"C#\" %>\r\n"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.REST.SocialMedia/AccountManagement.Accounts.Api/Global.asax.cs",
    "content": "﻿using System;\r\nusing System.Web.Http;\r\nusing WebApi.Hal;\r\n\r\nnamespace AccountManagement.Accounts.Api\r\n{\r\n    public class WebApiApplication : System.Web.HttpApplication\r\n    {\r\n        protected void Application_Start()\r\n        {\r\n            GlobalConfiguration.Configure(WebApiConfig.Register);\r\n\r\n            // default media type (HAL JSON)\r\n            GlobalConfiguration.Configuration.Formatters.Insert(\r\n                0, new JsonHalMediaTypeFormatter()\r\n            );\r\n\r\n            // alternative media type (HAL XML)\r\n            // accept header must equal application/hal+xml\r\n            GlobalConfiguration.Configuration.Formatters.Insert(\r\n                1, new XmlHalMediaTypeFormatter()\r\n            );\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.REST.SocialMedia/AccountManagement.Accounts.Api/Properties/AssemblyInfo.cs",
    "content": "﻿using System.Reflection;\r\nusing System.Runtime.CompilerServices;\r\nusing System.Runtime.InteropServices;\r\n\r\n// General Information about an assembly is controlled through the following \r\n// set of attributes. Change these attribute values to modify the information\r\n// associated with an assembly.\r\n[assembly: AssemblyTitle(\"AccountManagement.Accounts.Api\")]\r\n[assembly: AssemblyDescription(\"\")]\r\n[assembly: AssemblyConfiguration(\"\")]\r\n[assembly: AssemblyCompany(\"\")]\r\n[assembly: AssemblyProduct(\"AccountManagement.Accounts.Api\")]\r\n[assembly: AssemblyCopyright(\"Copyright ©  2014\")]\r\n[assembly: AssemblyTrademark(\"\")]\r\n[assembly: AssemblyCulture(\"\")]\r\n\r\n// Setting ComVisible to false makes the types in this assembly not visible \r\n// to COM components.  If you need to access a type in this assembly from \r\n// COM, set the ComVisible attribute to true on that type.\r\n[assembly: ComVisible(false)]\r\n\r\n// The following GUID is for the ID of the typelib if this project is exposed to COM\r\n[assembly: Guid(\"41bfc8b0-3ef3-4f17-9314-f6afdbce670e\")]\r\n\r\n// Version information for an assembly consists of the following four values:\r\n//\r\n//      Major Version\r\n//      Minor Version \r\n//      Build Number\r\n//      Revision\r\n//\r\n// You can specify all the values or you can default the Revision and Build Numbers \r\n// by using the '*' as shown below:\r\n[assembly: AssemblyVersion(\"1.0.0.0\")]\r\n[assembly: AssemblyFileVersion(\"1.0.0.0\")]\r\n"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.REST.SocialMedia/AccountManagement.Accounts.Api/Web.Debug.config",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n\r\n<!-- For more information on using web.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 -->\r\n\r\n<configuration xmlns:xdt=\"http://schemas.microsoft.com/XML-Document-Transform\">\r\n  <!--\r\n    In the example below, the \"SetAttributes\" transform will change the value of \r\n    \"connectionString\" to use \"ReleaseSQLServer\" only when the \"Match\" locator \r\n    finds an attribute \"name\" that has a value of \"MyDB\".\r\n    \r\n    <connectionStrings>\r\n      <add name=\"MyDB\" \r\n        connectionString=\"Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True\" \r\n        xdt:Transform=\"SetAttributes\" xdt:Locator=\"Match(name)\"/>\r\n    </connectionStrings>\r\n  -->\r\n  <system.web>\r\n    <!--\r\n      In the example below, the \"Replace\" transform will replace the entire \r\n      <customErrors> section of your web.config file.\r\n      Note that because there is only one customErrors section under the \r\n      <system.web> node, there is no need to use the \"xdt:Locator\" attribute.\r\n      \r\n      <customErrors defaultRedirect=\"GenericError.htm\"\r\n        mode=\"RemoteOnly\" xdt:Transform=\"Replace\">\r\n        <error statusCode=\"500\" redirect=\"InternalError.htm\"/>\r\n      </customErrors>\r\n    -->\r\n  </system.web>\r\n</configuration>"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.REST.SocialMedia/AccountManagement.Accounts.Api/Web.Release.config",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n\r\n<!-- For more information on using web.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 -->\r\n\r\n<configuration xmlns:xdt=\"http://schemas.microsoft.com/XML-Document-Transform\">\r\n  <!--\r\n    In the example below, the \"SetAttributes\" transform will change the value of \r\n    \"connectionString\" to use \"ReleaseSQLServer\" only when the \"Match\" locator \r\n    finds an attribute \"name\" that has a value of \"MyDB\".\r\n    \r\n    <connectionStrings>\r\n      <add name=\"MyDB\" \r\n        connectionString=\"Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True\" \r\n        xdt:Transform=\"SetAttributes\" xdt:Locator=\"Match(name)\"/>\r\n    </connectionStrings>\r\n  -->\r\n  <system.web>\r\n    <compilation xdt:Transform=\"RemoveAttributes(debug)\" />\r\n    <!--\r\n      In the example below, the \"Replace\" transform will replace the entire \r\n      <customErrors> section of your web.config file.\r\n      Note that because there is only one customErrors section under the \r\n      <system.web> node, there is no need to use the \"xdt:Locator\" attribute.\r\n      \r\n      <customErrors defaultRedirect=\"GenericError.htm\"\r\n        mode=\"RemoteOnly\" xdt:Transform=\"Replace\">\r\n        <error statusCode=\"500\" redirect=\"InternalError.htm\"/>\r\n      </customErrors>\r\n    -->\r\n  </system.web>\r\n</configuration>"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.REST.SocialMedia/AccountManagement.Accounts.Api/Web.config",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<!--\r\n  For more information on how to configure your ASP.NET application, please visit\r\n  http://go.microsoft.com/fwlink/?LinkId=301879\r\n  -->\r\n<configuration>\r\n  <appSettings>\r\n  </appSettings>\r\n  <system.web>\r\n    <compilation debug=\"true\" targetFramework=\"4.5\"/>\r\n    <httpRuntime targetFramework=\"4.5\"/>\r\n  </system.web>\r\n  \r\n<system.webServer>\r\n    <handlers>\r\n      <remove name=\"ExtensionlessUrlHandler-Integrated-4.0\"/>\r\n      <remove name=\"OPTIONSVerbHandler\"/>\r\n      <remove name=\"TRACEVerbHandler\"/>\r\n      <add name=\"ExtensionlessUrlHandler-Integrated-4.0\" path=\"*.\" verb=\"*\" type=\"System.Web.Handlers.TransferRequestHandler\" preCondition=\"integratedMode,runtimeVersionv4.0\"/>\r\n    </handlers>\r\n  </system.webServer>\t<runtime>\r\n\t\t<assemblyBinding xmlns=\"urn:schemas-microsoft-com:asm.v1\">\r\n\t\t\t<dependentAssembly>\r\n\t\t\t\t<assemblyIdentity name=\"System.Web.Http\" publicKeyToken=\"31BF3856AD364E35\" culture=\"neutral\"/>\r\n\t\t\t\t<bindingRedirect oldVersion=\"0.0.0.0-5.1.0.0\" newVersion=\"5.1.0.0\"/>\r\n\t\t\t</dependentAssembly>\r\n\t\t\t<dependentAssembly>\r\n\t\t\t\t<assemblyIdentity name=\"System.Net.Http.Formatting\" publicKeyToken=\"31BF3856AD364E35\" culture=\"neutral\"/>\r\n\t\t\t\t<bindingRedirect oldVersion=\"0.0.0.0-5.1.0.0\" newVersion=\"5.1.0.0\"/>\r\n\t\t\t</dependentAssembly>\r\n\t\t</assemblyBinding>\r\n\t</runtime>\r\n</configuration>\r\n"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.REST.SocialMedia/AccountManagement.Accounts.Api/packages.config",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<packages>\r\n  <package id=\"EventStore.Client\" version=\"2.0.2\" targetFramework=\"net45\" />\r\n  <package id=\"Microsoft.AspNet.Cors\" version=\"5.1.1\" targetFramework=\"net45\" />\r\n  <package id=\"Microsoft.AspNet.WebApi\" version=\"5.0.0\" targetFramework=\"net45\" />\r\n  <package id=\"Microsoft.AspNet.WebApi.Client\" version=\"5.1.1\" targetFramework=\"net45\" />\r\n  <package id=\"Microsoft.AspNet.WebApi.Core\" version=\"5.1.1\" targetFramework=\"net45\" />\r\n  <package id=\"Microsoft.AspNet.WebApi.Cors\" version=\"5.1.1\" targetFramework=\"net45\" />\r\n  <package id=\"Microsoft.AspNet.WebApi.WebHost\" version=\"5.0.0\" targetFramework=\"net45\" />\r\n  <package id=\"Newtonsoft.Json\" version=\"5.0.6\" targetFramework=\"net45\" />\r\n  <package id=\"ServiceStack.Text\" version=\"4.0.15\" targetFramework=\"net45\" />\r\n  <package id=\"WebApi.Hal\" version=\"2.2.0.18\" targetFramework=\"net45\" />\r\n</packages>"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.REST.SocialMedia/AccountManagement.EntryPoint/.gitignore",
    "content": ".DS_Store\r\n"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.REST.SocialMedia/AccountManagement.EntryPoint/AccountManagement.EntryPoint.Api.csproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Project ToolsVersion=\"12.0\" DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\r\n  <Import Project=\"$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props\" Condition=\"Exists('$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props')\" />\r\n  <PropertyGroup>\r\n    <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>\r\n    <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>\r\n    <ProductVersion>\r\n    </ProductVersion>\r\n    <SchemaVersion>2.0</SchemaVersion>\r\n    <ProjectGuid>{66644357-5B60-4E85-9615-5378D400C18D}</ProjectGuid>\r\n    <ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>\r\n    <OutputType>Library</OutputType>\r\n    <AppDesignerFolder>Properties</AppDesignerFolder>\r\n    <RootNamespace>AccountManagement.EntryPoint.Api</RootNamespace>\r\n    <AssemblyName>AccountManagement.EntryPoint.Api</AssemblyName>\r\n    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r\n    <UseIISExpress>true</UseIISExpress>\r\n    <IISExpressSSLPort />\r\n    <IISExpressAnonymousAuthentication />\r\n    <IISExpressWindowsAuthentication />\r\n    <IISExpressUseClassicPipelineMode />\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' \">\r\n    <DebugSymbols>true</DebugSymbols>\r\n    <DebugType>full</DebugType>\r\n    <Optimize>false</Optimize>\r\n    <OutputPath>bin\\</OutputPath>\r\n    <DefineConstants>DEBUG;TRACE</DefineConstants>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <WarningLevel>4</WarningLevel>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' \">\r\n    <DebugType>pdbonly</DebugType>\r\n    <Optimize>true</Optimize>\r\n    <OutputPath>bin\\</OutputPath>\r\n    <DefineConstants>TRACE</DefineConstants>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <WarningLevel>4</WarningLevel>\r\n  </PropertyGroup>\r\n  <ItemGroup>\r\n    <Reference Include=\"Microsoft.CSharp\" />\r\n    <Reference Include=\"System.Net.Http\" />\r\n    <Reference Include=\"System.Web.DynamicData\" />\r\n    <Reference Include=\"System.Web.Entity\" />\r\n    <Reference Include=\"System.Web.ApplicationServices\" />\r\n    <Reference Include=\"System.ComponentModel.DataAnnotations\" />\r\n    <Reference Include=\"System\" />\r\n    <Reference Include=\"System.Data\" />\r\n    <Reference Include=\"System.Core\" />\r\n    <Reference Include=\"System.Data.DataSetExtensions\" />\r\n    <Reference Include=\"System.Web.Extensions\" />\r\n    <Reference Include=\"System.Xml.Linq\" />\r\n    <Reference Include=\"System.Drawing\" />\r\n    <Reference Include=\"System.Web\" />\r\n    <Reference Include=\"System.Xml\" />\r\n    <Reference Include=\"System.Configuration\" />\r\n    <Reference Include=\"System.Web.Services\" />\r\n    <Reference Include=\"System.EnterpriseServices\" />\r\n    <Reference Include=\"WebApi.Hal\">\r\n      <HintPath>..\\packages\\WebApi.Hal.2.2.0.18\\lib\\net45\\WebApi.Hal.dll</HintPath>\r\n    </Reference>\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <Reference Include=\"Newtonsoft.Json\">\r\n      <HintPath>..\\packages\\Newtonsoft.Json.5.0.6\\lib\\net45\\Newtonsoft.Json.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"System.Net.Http.Formatting\">\r\n      <HintPath>..\\packages\\Microsoft.AspNet.WebApi.Client.5.0.0\\lib\\net45\\System.Net.Http.Formatting.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"System.Web.Http\">\r\n      <HintPath>..\\packages\\Microsoft.AspNet.WebApi.Core.5.0.0\\lib\\net45\\System.Web.Http.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"System.Web.Http.WebHost\">\r\n      <HintPath>..\\packages\\Microsoft.AspNet.WebApi.WebHost.5.0.0\\lib\\net45\\System.Web.Http.WebHost.dll</HintPath>\r\n    </Reference>\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <Content Include=\"Global.asax\" />\r\n    <Content Include=\"Web.config\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <Compile Include=\"App_Start\\WebApiConfig.cs\" />\r\n    <Compile Include=\"Controllers\\EntryPointController.cs\" />\r\n    <Compile Include=\"Global.asax.cs\">\r\n      <DependentUpon>Global.asax</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Properties\\AssemblyInfo.cs\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <Content Include=\"packages.config\" />\r\n    <None Include=\"Web.Debug.config\">\r\n      <DependentUpon>Web.config</DependentUpon>\r\n    </None>\r\n    <None Include=\"Web.Release.config\">\r\n      <DependentUpon>Web.config</DependentUpon>\r\n    </None>\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <Folder Include=\"App_Data\\\" />\r\n    <Folder Include=\"Models\\\" />\r\n  </ItemGroup>\r\n  <PropertyGroup>\r\n    <VisualStudioVersion Condition=\"'$(VisualStudioVersion)' == ''\">10.0</VisualStudioVersion>\r\n    <VSToolsPath Condition=\"'$(VSToolsPath)' == ''\">$(MSBuildExtensionsPath32)\\Microsoft\\VisualStudio\\v$(VisualStudioVersion)</VSToolsPath>\r\n  </PropertyGroup>\r\n  <Import Project=\"$(MSBuildBinPath)\\Microsoft.CSharp.targets\" />\r\n  <Import Project=\"$(VSToolsPath)\\WebApplications\\Microsoft.WebApplication.targets\" Condition=\"'$(VSToolsPath)' != ''\" />\r\n  <Import Project=\"$(MSBuildExtensionsPath32)\\Microsoft\\VisualStudio\\v10.0\\WebApplications\\Microsoft.WebApplication.targets\" Condition=\"false\" />\r\n  <ProjectExtensions>\r\n    <VisualStudio>\r\n      <FlavorProperties GUID=\"{349c5851-65df-11da-9384-00065b846f21}\">\r\n        <WebProjectProperties>\r\n          <UseIIS>True</UseIIS>\r\n          <AutoAssignPort>True</AutoAssignPort>\r\n          <DevelopmentServerPort>1117</DevelopmentServerPort>\r\n          <DevelopmentServerVPath>/</DevelopmentServerVPath>\r\n          <IISUrl>http://localhost:4100/</IISUrl>\r\n          <NTLMAuthentication>False</NTLMAuthentication>\r\n          <UseCustomServer>False</UseCustomServer>\r\n          <CustomServerUrl>\r\n          </CustomServerUrl>\r\n          <SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>\r\n        </WebProjectProperties>\r\n      </FlavorProperties>\r\n    </VisualStudio>\r\n  </ProjectExtensions>\r\n  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \r\n       Other similar extension points exist, see Microsoft.Common.targets.\r\n  <Target Name=\"BeforeBuild\">\r\n  </Target>\r\n  <Target Name=\"AfterBuild\">\r\n  </Target>\r\n  -->\r\n</Project>"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.REST.SocialMedia/AccountManagement.EntryPoint/App_Start/WebApiConfig.cs",
    "content": "﻿using System;\r\nusing System.Web.Http;\r\n\r\nnamespace AccountManagement.EntryPoint.Api\r\n{\r\n    public static class WebApiConfig\r\n    {\r\n        public static void Register(HttpConfiguration config)\r\n        {\r\n            config.MapHttpAttributeRoutes();\r\n\r\n            config.Routes.MapHttpRoute(\r\n                name: \"Entry Point\",\r\n                routeTemplate: \"accountmanagement\",\r\n                defaults: new { controller = \"EntryPoint\", action = \"Get\" }\r\n            );\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.REST.SocialMedia/AccountManagement.EntryPoint/Controllers/EntryPointController.cs",
    "content": "﻿using System;\r\nusing System.Collections.Generic;\r\nusing System.Web.Http;\r\nusing WebApi.Hal;\r\n\r\nnamespace AccountManagement.EntryPoint.Api.Controllers\r\n{\r\n    public class EntryPointController : ApiController\r\n    {\r\n        private const string EntryPointBaseUrl = \"http://localhost:4100/\";\r\n        private const string AccountsBaseUrl = \"http://localhost:4101/\";\r\n\r\n        [HttpGet]\r\n        public EntryPointRepresentation Get()\r\n        {\r\n            return new EntryPointRepresentation\r\n            {\r\n                Href = EntryPointBaseUrl + \"accountmanagement\",\r\n                Rel = \"self\",\r\n                Links = new List<Link>\r\n                {\r\n                    new Link\r\n                    {\r\n                        Href = AccountsBaseUrl + \"accountmanagement/accounts\",\r\n                        Rel = \"accounts\"\r\n                    },\r\n                    new Link\r\n                    {\r\n                        Href = \"http://localhost:4102/accountmanagement/beganfollowing\",\r\n                        Rel = \"beganfollowing\"\r\n                    }\r\n                }\r\n            };\r\n        }\r\n    }\r\n\r\n    public class EntryPointRepresentation : Representation\r\n    {\r\n        protected override void CreateHypermedia() { }\r\n    }\r\n}"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.REST.SocialMedia/AccountManagement.EntryPoint/Global.asax",
    "content": "﻿<%@ Application Codebehind=\"Global.asax.cs\" Inherits=\"AccountManagement.EntryPoint.Api.WebApiApplication\" Language=\"C#\" %>\r\n"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.REST.SocialMedia/AccountManagement.EntryPoint/Global.asax.cs",
    "content": "﻿using System;\r\nusing System.Web.Http;\r\nusing WebApi.Hal;\r\n\r\nnamespace AccountManagement.EntryPoint.Api\r\n{\r\n    public class WebApiApplication : System.Web.HttpApplication\r\n    {\r\n        protected void Application_Start()\r\n        {\r\n            GlobalConfiguration.Configure(WebApiConfig.Register);\r\n\r\n            // default media type (HAL JSON)\r\n            GlobalConfiguration.Configuration.Formatters.Insert(\r\n                0, new JsonHalMediaTypeFormatter()\r\n            );\r\n\r\n            // alternative media type (HAL XML)\r\n            // accept header must equal application/hal+xml\r\n            GlobalConfiguration.Configuration.Formatters.Insert(\r\n                1, new XmlHalMediaTypeFormatter()\r\n            );\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.REST.SocialMedia/AccountManagement.EntryPoint/MIT-LICENSE.txt",
    "content": "Copyright (c) 2012 Mike Kelly, http://stateless.co/\r\n\r\nPermission is hereby granted, free of charge, to any person obtaining\r\na copy of this software and associated documentation files (the\r\n\"Software\"), to deal in the Software without restriction, including\r\nwithout limitation the rights to use, copy, modify, merge, publish,\r\ndistribute, sublicense, and/or sell copies of the Software, and to\r\npermit persons to whom the Software is furnished to do so, subject to\r\nthe following conditions:\r\n\r\nThe above copyright notice and this permission notice shall be\r\nincluded in all copies or substantial portions of the Software.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\r\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\r\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\r\nLIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\r\nOF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\r\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r\n"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.REST.SocialMedia/AccountManagement.EntryPoint/Properties/AssemblyInfo.cs",
    "content": "﻿using System.Reflection;\r\nusing System.Runtime.CompilerServices;\r\nusing System.Runtime.InteropServices;\r\n\r\n// General Information about an assembly is controlled through the following \r\n// set of attributes. Change these attribute values to modify the information\r\n// associated with an assembly.\r\n[assembly: AssemblyTitle(\"AccountManagement.EntryPoint\")]\r\n[assembly: AssemblyDescription(\"\")]\r\n[assembly: AssemblyConfiguration(\"\")]\r\n[assembly: AssemblyCompany(\"\")]\r\n[assembly: AssemblyProduct(\"AccountManagement.EntryPoint\")]\r\n[assembly: AssemblyCopyright(\"Copyright ©  2014\")]\r\n[assembly: AssemblyTrademark(\"\")]\r\n[assembly: AssemblyCulture(\"\")]\r\n\r\n// Setting ComVisible to false makes the types in this assembly not visible \r\n// to COM components.  If you need to access a type in this assembly from \r\n// COM, set the ComVisible attribute to true on that type.\r\n[assembly: ComVisible(false)]\r\n\r\n// The following GUID is for the ID of the typelib if this project is exposed to COM\r\n[assembly: Guid(\"294c0646-6ab6-44bd-8dce-8ade7cb52546\")]\r\n\r\n// Version information for an assembly consists of the following four values:\r\n//\r\n//      Major Version\r\n//      Minor Version \r\n//      Build Number\r\n//      Revision\r\n//\r\n// You can specify all the values or you can default the Revision and Build Numbers \r\n// by using the '*' as shown below:\r\n[assembly: AssemblyVersion(\"1.0.0.0\")]\r\n[assembly: AssemblyFileVersion(\"1.0.0.0\")]\r\n"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.REST.SocialMedia/AccountManagement.EntryPoint/README.md",
    "content": "HAL-browser\r\n===========\r\nAn API browser for the hal+json media type\r\n\r\nExample Usage\r\n=============\r\nHere is an example of a hal+json API using the browser:\r\n\r\n[http://haltalk.herokuapp.com/explorer/browser.html](http://haltalk.herokuapp.com/explorer/browser.html)\r\n\r\nAbout HAL\r\n========\r\nHAL is a format based on json that establishes conventions for\r\nrepresenting links. For example:\r\n\r\n```javascript\r\n{\r\n    \"_links\": {\r\n        \"self\": { \"href\": \"/orders\" },\r\n        \"next\": { \"href\": \"/orders?page=2\" }\r\n    }\r\n}\r\n```\r\n\r\nMore detail about HAL can be found at\r\n[http://stateless.co/hal_specification.html](http://stateless.co/hal_specification.html).\r\n\r\nInstructions\r\n============\r\nAll you should need to do is copy the files into your webroot.\r\nIt is OK to put it in a subdirectory; it does not need to be in the root.\r\n\r\nAll the JS and CSS dependencies come included in the vendor directory.\r\n\r\n\r\nTODO\r\n===========\r\n* Make Location and Content-Location headers clickable links\r\n* Provide feedback to user when there are issues with response (missing\r\nself link, wrong media type identifier)\r\n* Give 'self' and 'curies' links special treatment\r\n"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.REST.SocialMedia/AccountManagement.EntryPoint/Web.Debug.config",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n\r\n<!-- For more information on using web.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 -->\r\n\r\n<configuration xmlns:xdt=\"http://schemas.microsoft.com/XML-Document-Transform\">\r\n  <!--\r\n    In the example below, the \"SetAttributes\" transform will change the value of \r\n    \"connectionString\" to use \"ReleaseSQLServer\" only when the \"Match\" locator \r\n    finds an attribute \"name\" that has a value of \"MyDB\".\r\n    \r\n    <connectionStrings>\r\n      <add name=\"MyDB\" \r\n        connectionString=\"Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True\" \r\n        xdt:Transform=\"SetAttributes\" xdt:Locator=\"Match(name)\"/>\r\n    </connectionStrings>\r\n  -->\r\n  <system.web>\r\n    <!--\r\n      In the example below, the \"Replace\" transform will replace the entire \r\n      <customErrors> section of your web.config file.\r\n      Note that because there is only one customErrors section under the \r\n      <system.web> node, there is no need to use the \"xdt:Locator\" attribute.\r\n      \r\n      <customErrors defaultRedirect=\"GenericError.htm\"\r\n        mode=\"RemoteOnly\" xdt:Transform=\"Replace\">\r\n        <error statusCode=\"500\" redirect=\"InternalError.htm\"/>\r\n      </customErrors>\r\n    -->\r\n  </system.web>\r\n</configuration>"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.REST.SocialMedia/AccountManagement.EntryPoint/Web.Release.config",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n\r\n<!-- For more information on using web.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 -->\r\n\r\n<configuration xmlns:xdt=\"http://schemas.microsoft.com/XML-Document-Transform\">\r\n  <!--\r\n    In the example below, the \"SetAttributes\" transform will change the value of \r\n    \"connectionString\" to use \"ReleaseSQLServer\" only when the \"Match\" locator \r\n    finds an attribute \"name\" that has a value of \"MyDB\".\r\n    \r\n    <connectionStrings>\r\n      <add name=\"MyDB\" \r\n        connectionString=\"Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True\" \r\n        xdt:Transform=\"SetAttributes\" xdt:Locator=\"Match(name)\"/>\r\n    </connectionStrings>\r\n  -->\r\n  <system.web>\r\n    <compilation xdt:Transform=\"RemoveAttributes(debug)\" />\r\n    <!--\r\n      In the example below, the \"Replace\" transform will replace the entire \r\n      <customErrors> section of your web.config file.\r\n      Note that because there is only one customErrors section under the \r\n      <system.web> node, there is no need to use the \"xdt:Locator\" attribute.\r\n      \r\n      <customErrors defaultRedirect=\"GenericError.htm\"\r\n        mode=\"RemoteOnly\" xdt:Transform=\"Replace\">\r\n        <error statusCode=\"500\" redirect=\"InternalError.htm\"/>\r\n      </customErrors>\r\n    -->\r\n  </system.web>\r\n</configuration>"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.REST.SocialMedia/AccountManagement.EntryPoint/Web.config",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<!--\r\n  For more information on how to configure your ASP.NET application, please visit\r\n  http://go.microsoft.com/fwlink/?LinkId=301879\r\n  -->\r\n<configuration>\r\n  <appSettings>\r\n  </appSettings>\r\n  <system.web>\r\n    <compilation debug=\"true\" targetFramework=\"4.5\" />\r\n    <httpRuntime targetFramework=\"4.5\" />\r\n  </system.web>\r\n  <system.webServer>\r\n    <handlers>\r\n      <remove name=\"ExtensionlessUrlHandler-Integrated-4.0\" />\r\n      <remove name=\"OPTIONSVerbHandler\" />\r\n      <remove name=\"TRACEVerbHandler\" />\r\n      <add name=\"ExtensionlessUrlHandler-Integrated-4.0\" path=\"*.\" verb=\"*\" type=\"System.Web.Handlers.TransferRequestHandler\" preCondition=\"integratedMode,runtimeVersionv4.0\" />\r\n    </handlers>\r\n  </system.webServer>\r\n</configuration>\r\n"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.REST.SocialMedia/AccountManagement.EntryPoint/browser.html",
    "content": "<!doctype html>\r\n  <head>\r\n    <meta charset=\"utf-8\">\r\n    <title>The HAL Browser</title>\r\n    <link rel=\"stylesheet\" media=\"screen\" href=\"vendor/css/bootstrap.css\" />\r\n    <style type=\"text/css\">\r\n      body {\r\n        padding-top: 60px;\r\n        padding-bottom: 40px;\r\n      }\r\n      .sidebar-nav {\r\n        padding: 9px 0;\r\n      }\r\n    </style>\r\n    <link rel=\"stylesheet\" media=\"screen\" href=\"vendor/css/bootstrap-responsive.css\" />\r\n    <link rel=\"stylesheet\" media=\"screen\" href=\"styles.css\" />\r\n  </head>\r\n\r\n  <body>\r\n\r\n    <div class=\"navbar navbar-fixed-top\">\r\n      <div class=\"navbar-inner\">\r\n        <div class=\"container-fluid\">\r\n          <a class=\"brand\">The HAL Browser</a>\r\n          <div class=\"nav-collapse\">\r\n            <ul class=\"nav\">\r\n              <li><a href=\"#/\" id=\"entryPointLink\">Go To Entry Point</a></li>\r\n              <li><a href=\"https://github.com/mikekelly/hal-browser\">About The HAL Browser</a></li>\r\n            </ul>\r\n          </div>\r\n        </div>\r\n      </div>\r\n    </div>\r\n\r\n    <div id=\"browser\" class=\"container-fluid\"></div>\r\n\r\n  <script id=\"location-bar-template\" type=\"text/template\">\r\n<form>\r\n    <div class=\"input-append span12 location-bar-container\">\r\n      <input class=\"span11\" id=\"appendedInputButton\" type=\"text\" value=\"<%= url %>\">\r\n      <button class=\"btn\" type=\"submit\">Go!</button>\r\n       <span class=\"ajax-loader\"></span>\r\n    </div>\r\n</form>\r\n  </script>\r\n\r\n  <script id=\"links-template\" type=\"text/template\">\r\n    <h2>Links</h2>\r\n    <table class=\"table\">\r\n      <thead>\r\n        <tr>\r\n          <th>rel</th>\r\n          <th>title</th>\r\n          <th>name / index</th>\r\n          <th>docs</th>\r\n          <th>GET</th>\r\n          <th>NON-GET</th>\r\n        </tr>\r\n      </thead>\r\n      <tbody>\r\n      <% _.each(links, function(obj, rel) { %>\r\n        <% if ($.isArray(obj)) { %>\r\n          <% _.each(obj, function(link, i) { %>\r\n            <tr>\r\n              <td><strong><%= HAL.truncateIfUrl(rel) %></strong></td>\r\n              <td><%= link.title || '' %></td>\r\n              <td><%= link.name ? 'name: ' + link.name : 'index: ' + i %></a></td>\r\n              <td>\r\n              <% if (HAL.isUrl(rel)) { %>\r\n                <a class=\"dox\" href=\"<%= HAL.buildUrl(rel) %>\"><i class=\"icon-book\"></i></a>\r\n              <% } %>\r\n              </td>\r\n              <td>\r\n                <% if (link.templated === true) { %>\r\n                  <a class=\"query btn btn-success\" href=\"<%= link.href %>\" title=\"Query URI template\"><i class=\"icon-question-sign\"></i></a>\r\n                <% } else { %>\r\n                  <a class=\"follow btn btn-success\" href=\"<%= link.href %>\" title=\"Follow link\"><i class=\"icon-arrow-right\"></i></a>\r\n                <% } %>\r\n              </td>\r\n              <td>\r\n                <a class=\"non-get btn btn-warning\" href=\"<%= link.href %>\" title=\"Perform non-GET request\">!</a>\r\n              </td>\r\n            </tr>\r\n          <% }); %>\r\n        <% } else { %>\r\n          <tr>\r\n            <td><strong><%= HAL.truncateIfUrl(rel) %></strong></td>\r\n            <td><%= obj.title || '' %></td>\r\n            <td><%= obj.name || '' %></td>\r\n            <td>\r\n            <% if (HAL.isUrl(rel)) { %>\r\n              <a class=\"dox\" href=\"<%= HAL.buildUrl(rel) %>\"><i class=\"icon-book\"></i></a>\r\n            <% } %>\r\n            </td>\r\n            <td>\r\n              <% if (obj.templated === true) { %>\r\n                <a class=\"query btn btn-success\" href=\"<%= obj.href %>\" title=\"Query URI template\"><i class=\"icon-question-sign\"></i></a>\r\n              <% } else { %>\r\n                <a class=\"follow btn btn-success\" href=\"<%= obj.href %>\" title=\"Follow link\"><i class=\"icon-arrow-right\"></i></a>\r\n              <% } %>\r\n            </td>\r\n            <td>\r\n              <a class=\"non-get btn btn-warning\" href=\"<%= obj.href %>\" title=\"Perform non-GET request\">!</a>\r\n            </td>\r\n          </tr>\r\n        <% } %>\r\n      <% }) %>\r\n      </tbody>\r\n    </table>\r\n  </script>\r\n\r\n  <script id=\"properties-template\" type=\"text/template\">\r\n    <h2>Properties</h2>\r\n    <pre><%= _.escape(JSON.stringify(properties, null, HAL.jsonIndent)) %></pre>\r\n  </script>\r\n\r\n  <script id=\"request-headers-template\" type=\"text/template\">\r\n    <h2>Custom Request Headers</h2>\r\n    <textarea class=\"span12\"></textarea>\r\n  </script>\r\n\r\n  <script id=\"response-headers-template\" type=\"text/template\">\r\n    <h2>Response Headers</h2>\r\n    <pre><%= status.code %> <%= status.text %>\r\n\r\n<%= headers %></pre>\r\n  </script>\r\n\r\n  <script id=\"response-body-template\" type=\"text/template\">\r\n    <h2>Response Body</h2>\r\n    <pre><%= _.escape(body) %></pre>\r\n  </script>\r\n\r\n  <script id=\"query-uri-template\" type=\"text/template\">\r\n    <div class=\"modal-header\">\r\n      <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-hidden=\"true\">&times;</button>\r\n      <h3>Expand URI Template</h3>\r\n    </div>\r\n\r\n    <form id=\"query\" action=\"<%= href %>\">\r\n      <div class=\"modal-body\">\r\n        <p>URI Template:</p>\r\n        <pre><%= href %></pre>\r\n        <p>Input (JSON):</p>\r\n        <textarea><%= input %></textarea>\r\n        <p>Expanded URI:</p>\r\n        <pre class=\"preview\">&nbsp;</pre>\r\n      </div>\r\n\r\n      <div class=\"modal-footer\">\r\n        <button type=\"submit\" class=\"btn btn-primary\">Follow URI</button>\r\n      </div>\r\n    </form>\r\n  </script>\r\n\r\n\r\n  <script id=\"non-safe-request-template\" type=\"text/template\">\r\n    <div class=\"modal-header\">\r\n      <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-hidden=\"true\">&times;</button>\r\n      <h3>Make a non-GET request</h3>\r\n    </div>\r\n\r\n    <form class=\"non-safe\" action=\"<%= href %>\">\r\n      <div class=\"modal-body\">\r\n        <p>Target URI</p>\r\n        <input name=\"url\" type=\"text\" class=\"url\" value=\"<%= href %>\" />\r\n        <p>Method:</p>\r\n        <input name=\"method\" type=\"text\" class=\"method\" value=\"POST\" />\r\n        <p>Headers:</p>\r\n<textarea name=\"headers\" class=\"headers\" style=\"height: 100px\">\r\nContent-Type: application/json\r\n<%= user_defined_headers %>\r\n</textarea>\r\n        <p>Body:</p>\r\n<textarea name=\"body\" class=\"body\" style=\"height: 200px\">\r\n{\r\n\r\n}\r\n</textarea>\r\n      </div>\r\n\r\n      <div class=\"modal-footer\">\r\n        <button type=\"submit\" class=\"btn btn-primary\">Make Request</button>\r\n      </div>\r\n    </form>\r\n  </script>\r\n\r\n  <script id=\"embedded-resources-template\" type=\"text/template\">\r\n    <h2>Embedded Resources</h2>\r\n  </script>\r\n\r\n  <script id=\"embedded-resource-template\" type=\"text/template\">\r\n    <div class=\"accordion-heading\">\r\n      <a class=\"accordion-toggle\" href=\"#\"><%= resource.identifier %>\r\n      <% if (HAL.isUrl(resource.embed_rel)) { %>\r\n        <span class=\"dox pull-right\" data-href=\"<%= HAL.buildUrl(resource.embed_rel) %>\">\r\n          <i class=\"icon-book\"></i>\r\n        </span>\r\n      <% } %>\r\n      </a>\r\n    </div>\r\n  </script>\r\n\r\n  <script src=\"vendor/js/jquery-1.10.2.min.js\"></script>\r\n  <script src=\"vendor/js/underscore.js\"></script>\r\n  <script src=\"vendor/js/backbone.js\"></script>\r\n  <script src=\"vendor/js/uritemplates.js\"></script>\r\n  <script src=\"vendor/js/bootstrap.js\"></script>\r\n\r\n  <script src=\"js/hal.js\"></script>\r\n  <script src=\"js/hal/browser.js\"></script>\r\n\r\n  <script src=\"js/hal/http/client.js\"></script>\r\n  <script src=\"js/hal/resource.js\"></script>\r\n\r\n  <script src=\"js/hal/views/browser.js\"></script>\r\n  <script src=\"js/hal/views/explorer.js\"></script>\r\n  <script src=\"js/hal/views/inspector.js\"></script>\r\n\r\n  <script src=\"js/hal/views/navigation.js\"></script>\r\n  <script src=\"js/hal/views/location_bar.js\"></script>\r\n  <script src=\"js/hal/views/request_headers.js\"></script>\r\n\r\n  <script src=\"js/hal/views/resource.js\"></script>\r\n  <script src=\"js/hal/views/properties.js\"></script>\r\n  <script src=\"js/hal/views/links.js\"></script>\r\n  <script src=\"js/hal/views/embedded_resources.js\"></script>\r\n  <script src=\"js/hal/views/embedded_resource.js\"></script>\r\n\r\n  <script src=\"js/hal/views/non_safe_request_dialog.js\"></script>\r\n  <script src=\"js/hal/views/query_uri_dialog.js\"></script>\r\n\r\n  <script src=\"js/hal/views/response.js\"></script>\r\n  <script src=\"js/hal/views/response_headers.js\"></script>\r\n  <script src=\"js/hal/views/response_body.js\"></script>\r\n\r\n  <script src=\"js/hal/views/documentation.js\"></script>\r\n\r\n  <script>\r\n    var browser = new HAL.Browser({\r\n      container: $('#browser'),\r\n      entryPoint: '/'\r\n    });\r\n    Backbone.history.start();\r\n  </script>\r\n</body>\r\n"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.REST.SocialMedia/AccountManagement.EntryPoint/js/hal/browser.js",
    "content": "HAL.Browser = Backbone.Router.extend({\r\n  initialize: function(opts) {\r\n    opts = opts || {};\r\n\r\n    var vent = _.extend({}, Backbone.Events),\r\n    $container = opts.container || $('#browser');\r\n\r\n    this.entryPoint = opts.entryPoint || '/';\r\n\r\n    // TODO: don't hang currentDoc off namespace\r\n    vent.bind('response', function(e) {\r\n      window.HAL.currentDocument = e.resource || {};\r\n    });\r\n\r\n    vent.bind('location-go', _.bind(this.loadUrl, this));\r\n\r\n    HAL.client = new HAL.Http.Client({ vent: vent });\r\n\r\n    var browser = new HAL.Views.Browser({ vent: vent, entryPoint: this.entryPoint });\r\n    browser.render()\r\n\r\n    $container.html(browser.el);\r\n    vent.trigger('app:loaded');\r\n\r\n    if (window.location.hash === '') {\r\n      window.location.hash = this.entryPoint;\r\n    }\r\n\r\n    if(location.hash.slice(1,9) === 'NON-GET:') {\r\n      new HAL.Views.NonSafeRequestDialog({\r\n            href: location.hash.slice(9),\r\n            vent: vent\r\n          }).render({});\r\n    }\r\n  },\r\n\r\n  routes: {\r\n    '*url': 'resourceRoute'\r\n  },\r\n\r\n  loadUrl: function(url) {\r\n    if (this.getHash() === url) {\r\n      HAL.client.get(url);\r\n    } else {\r\n      window.location.hash = url;\r\n    }\r\n  },\r\n\r\n  getHash: function() {\r\n    return window.location.hash.slice(1);\r\n  },\r\n\r\n  resourceRoute: function() {\r\n    url = location.hash.slice(1);\r\n    console.log('target url changed to: ' + url);\r\n    if (url.slice(0,8) !== 'NON-GET:') {\r\n      HAL.client.get(url);\r\n    }\r\n  }\r\n});\r\n"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.REST.SocialMedia/AccountManagement.EntryPoint/js/hal/http/client.js",
    "content": "HAL.Http.Client = function(opts) {\r\n  this.vent = opts.vent;\r\n  $.ajaxSetup({ headers: { 'Accept': 'application/hal+json, application/json, */*; q=0.01' } });\r\n};\r\n\r\nHAL.Http.Client.prototype.get = function(url) {\r\n  var self = this;\r\n  this.vent.trigger('location-change', { url: url });\r\n  var jqxhr = $.ajax({\r\n    url: url,\r\n    dataType: 'json',\r\n    success: function(resource, textStatus, jqXHR) {\r\n      self.vent.trigger('response', {\r\n        resource: resource,\r\n        jqxhr: jqXHR,\r\n        headers: jqXHR.getAllResponseHeaders()\r\n      });\r\n    }\r\n  }).error(function() {\r\n    self.vent.trigger('fail-response', { jqxhr: jqxhr });\r\n  });\r\n};\r\n\r\nHAL.Http.Client.prototype.request = function(opts) {\r\n  var self = this;\r\n  opts.dataType = 'json';\r\n  self.vent.trigger('location-change', { url: opts.url });\r\n  return jqxhr = $.ajax(opts);\r\n};\r\n\r\nHAL.Http.Client.prototype.updateDefaultHeaders = function(headers) {\r\n  this.defaultHeaders = headers;\r\n  $.ajaxSetup({ headers: headers });\r\n};\r\n\r\nHAL.Http.Client.prototype.getDefaultHeaders = function() {\r\n  return this.defaultHeaders;\r\n};\r\n"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.REST.SocialMedia/AccountManagement.EntryPoint/js/hal/resource.js",
    "content": "HAL.Models.Resource = Backbone.Model.extend({\r\n  initialize: function(representation) {\r\n    representation = representation || {};\r\n    this.links = representation._links;\r\n    if(representation._embedded !== undefined) {\r\n      this.embeddedResources = this.buildEmbeddedResources(representation._embedded);\r\n    }\r\n    this.set(representation);\r\n    this.unset('_embedded', { silent: true });\r\n    this.unset('_links', { silent: true });\r\n  },\r\n\r\n  buildEmbeddedResources: function(embeddedResources) {\r\n    var result = {};\r\n    _.each(embeddedResources, function(obj, rel) {\r\n      if($.isArray(obj)) {\r\n        var arr = [];\r\n        _.each(obj, function(resource, i) {\r\n          var newResource = new HAL.Models.Resource(resource);\r\n          newResource.identifier = rel + '[' + i + ']';\r\n          newResource.embed_rel = rel;\r\n          arr.push(newResource);\r\n        });\r\n        result[rel] = arr;\r\n      } else {\r\n        var newResource = new HAL.Models.Resource(obj);\r\n        newResource.identifier = rel;\r\n        newResource.embed_rel = rel;\r\n        result[rel] = newResource;\r\n      }\r\n    });\r\n    return result;\r\n  }\r\n});\r\n"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.REST.SocialMedia/AccountManagement.EntryPoint/js/hal/views/browser.js",
    "content": "HAL.Views.Browser = Backbone.View.extend({\r\n  initialize: function(opts) {\r\n    var self = this;\r\n    this.vent = opts.vent;\r\n    this.entryPoint = opts.entryPoint;\r\n    this.explorerView = new HAL.Views.Explorer({ vent: this.vent });\r\n    this.inspectorView = new HAL.Views.Inspector({ vent: this.vent });\r\n  },\r\n\r\n  className: 'hal-browser row-fluid',\r\n\r\n  render: function() {\r\n    this.$el.empty();\r\n\r\n    this.inspectorView.render();\r\n    this.explorerView.render();\r\n\r\n    this.$el.html(this.explorerView.el);\r\n    this.$el.append(this.inspectorView.el);\r\n\r\n    var entryPoint = this.entryPoint;\r\n\r\n    $(\"#entryPointLink\").click(function(event) {\r\n      event.preventDefault();\r\n      window.location.hash = entryPoint;\r\n    });\r\n    return this;\r\n  }\r\n});\r\n"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.REST.SocialMedia/AccountManagement.EntryPoint/js/hal/views/documentation.js",
    "content": "HAL.Views.Documenation = Backbone.View.extend({\r\n  className: 'documentation',\r\n\r\n  render: function(url) {\r\n    this.$el.html('<iframe src=' + url + '></iframe>');\r\n  }\r\n});\r\n"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.REST.SocialMedia/AccountManagement.EntryPoint/js/hal/views/embedded_resource.js",
    "content": "HAL.Views.EmbeddedResource = Backbone.View.extend({\r\n  initialize: function(opts) {\r\n    this.vent = opts.vent;\r\n    this.resource = opts.resource;\r\n\r\n    this.propertiesView = new HAL.Views.Properties({});\r\n    this.linksView = new HAL.Views.Links({\r\n      vent: this.vent\r\n    });\r\n\r\n    _.bindAll(this, 'onToggleClick');\r\n    _.bindAll(this, 'onDoxClick');\r\n  },\r\n\r\n  events: {\r\n    'click a.accordion-toggle': 'onToggleClick',\r\n    'click span.dox': 'onDoxClick'\r\n  },\r\n\r\n  className: 'embedded-resource accordion-group',\r\n\r\n  onToggleClick: function(e) {\r\n    e.preventDefault();\r\n    this.$accordionBody.collapse('toggle');\r\n  },\r\n  \r\n  onDoxClick: function(e) {\r\n    e.preventDefault();\r\n    this.vent.trigger('show-docs', {\r\n      url: $(e.currentTarget).data('href')\r\n    });\r\n    return false;\r\n  },\r\n\r\n  render: function() {\r\n    this.$el.empty();\r\n\r\n    this.propertiesView.render(this.resource.toJSON());\r\n    this.linksView.render(this.resource.links);\r\n\r\n    this.$el.append(this.template({\r\n      resource: this.resource\r\n    }));\r\n\r\n    var $inner = $('<div class=\"accordion-inner\"></div>');\r\n    $inner.append(this.propertiesView.el);\r\n    $inner.append(this.linksView.el);\r\n\r\n    this.$accordionBody = $('<div class=\"accordion-body collapse\"></div>');\r\n    this.$accordionBody.append($inner)\r\n\r\n    this.$el.append(this.$accordionBody);\r\n  },\r\n\r\n  template: _.template($('#embedded-resource-template').html())\r\n});\r\n"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.REST.SocialMedia/AccountManagement.EntryPoint/js/hal/views/embedded_resources.js",
    "content": "HAL.Views.EmbeddedResources = Backbone.View.extend({\r\n  initialize: function(opts) {\r\n    this.vent = opts.vent;\r\n    _.bindAll(this, 'render');\r\n  },\r\n\r\n  className: 'embedded-resources accordion',\r\n\r\n  render: function(resources) {\r\n    var self = this,\r\n        resourceViews = [],\r\n        buildView = function(resource) {\r\n          return new HAL.Views.EmbeddedResource({\r\n            resource: resource,\r\n            vent: self.vent\r\n          });\r\n        };\r\n\r\n    _.each(resources, function(prop) {\r\n      if ($.isArray(prop)) {\r\n        _.each(prop, function(resource) {\r\n          resourceViews.push(buildView(resource));\r\n        });\r\n      } else {\r\n        resourceViews.push(buildView(prop));\r\n      }\r\n    });\r\n\r\n    this.$el.html(this.template());\r\n\r\n    _.each(resourceViews, function(view) {\r\n      view.render();\r\n      self.$el.append(view.el);\r\n    });\r\n\r\n\r\n    return this;\r\n  },\r\n\r\n  template: _.template($('#embedded-resources-template').html())\r\n});\r\n"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.REST.SocialMedia/AccountManagement.EntryPoint/js/hal/views/explorer.js",
    "content": "HAL.Views.Explorer = Backbone.View.extend({\r\n  initialize: function(opts) {\r\n    var self = this;\r\n    this.vent = opts.vent;\r\n    this.navigationView = new HAL.Views.Navigation({ vent: this.vent });\r\n    this.resourceView = new HAL.Views.Resource({ vent: this.vent });\r\n  },\r\n\r\n  className: 'explorer span6',\r\n\r\n  render: function() {\r\n    this.navigationView.render();\r\n\r\n    this.$el.html(this.template());\r\n\r\n    this.$el.append(this.navigationView.el);\r\n    this.$el.append(this.resourceView.el);\r\n  },\r\n\r\n  template: function() {\r\n    return '<h1>Explorer</h1>';\r\n  }\r\n});\r\n"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.REST.SocialMedia/AccountManagement.EntryPoint/js/hal/views/inspector.js",
    "content": "HAL.Views.Inspector = Backbone.View.extend({\r\n  initialize: function(opts) {\r\n    this.vent = opts.vent;\r\n\r\n    _.bindAll(this, 'renderDocumentation');\r\n    _.bindAll(this, 'renderResponse');\r\n\r\n    this.vent.bind('show-docs', this.renderDocumentation);\r\n    this.vent.bind('response', this.renderResponse);\r\n  },\r\n\r\n  className: 'inspector span6',\r\n\r\n  render: function() {\r\n    this.$el.html(this.template());\r\n  },\r\n\r\n  renderResponse: function(response) {\r\n    var responseView = new HAL.Views.Response({ vent: this.vent });\r\n\r\n    this.render();\r\n    responseView.render(response);\r\n\r\n    this.$el.append(responseView.el);\r\n  },\r\n\r\n  renderDocumentation: function(e) {\r\n    var docView = new HAL.Views.Documenation({ vent: this.vent });\r\n\r\n    this.render();\r\n    docView.render(e.url);\r\n\r\n    this.$el.append(docView.el);\r\n  },\r\n\r\n  template: function() {\r\n    return '<h1>Inspector</h1>';\r\n  }\r\n});\r\n"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.REST.SocialMedia/AccountManagement.EntryPoint/js/hal/views/links.js",
    "content": "HAL.Views.Links = Backbone.View.extend({\r\n  initialize: function(opts) {\r\n    this.vent = opts.vent;\r\n  },\r\n\r\n  events: {\r\n    'click .follow': 'followLink',\r\n    'click .non-get': 'showNonSafeRequestDialog',\r\n    'click .query': 'showUriQueryDialog',\r\n    'click .dox': 'showDocs'\r\n  },\r\n\r\n  className: 'links',\r\n\r\n  followLink: function(e) {\r\n    e.preventDefault();\r\n    var $target = $(e.currentTarget);\r\n    var uri = $target.attr('href');\r\n    window.location.hash = uri;\r\n  },\r\n\r\n  showUriQueryDialog: function(e) {\r\n    e.preventDefault();\r\n\r\n    var $target = $(e.currentTarget);\r\n    var uri = $target.attr('href');\r\n\r\n    new HAL.Views.QueryUriDialog({\r\n      href: uri\r\n    }).render({});\r\n  },\r\n\r\n  showNonSafeRequestDialog: function(e) {\r\n    e.preventDefault();\r\n\r\n    var d = new HAL.Views.NonSafeRequestDialog({\r\n      href: $(e.currentTarget).attr('href'),\r\n      vent: this.vent\r\n    }).render({});\r\n  },\r\n\r\n  showDocs: function(e) {\r\n    e.preventDefault();\r\n    var $target = $(e.target);\r\n    var uri = $target.attr('href') || $target.parent().attr('href');\r\n    this.vent.trigger('show-docs', { url: uri });\r\n  },\r\n\r\n  template: _.template($('#links-template').html()),\r\n\r\n  render: function(links) {\r\n    this.$el.html(this.template({ links: links }));\r\n  }\r\n});\r\n"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.REST.SocialMedia/AccountManagement.EntryPoint/js/hal/views/location_bar.js",
    "content": "HAL.Views.LocationBar = Backbone.View.extend({\r\n  initialize: function(opts) {\r\n    this.vent = opts.vent;\r\n    _.bindAll(this, 'render');\r\n    _.bindAll(this, 'onButtonClick');\r\n    this.vent.bind('location-change', this.render);\r\n    this.vent.bind('location-change', _.bind(this.showSpinner, this));\r\n    this.vent.bind('response', _.bind(this.hideSpinner, this));\r\n  },\r\n\r\n  events: {\r\n    'submit form': 'onButtonClick'\r\n  },\r\n\r\n  className: 'address',\r\n\r\n  render: function(e) {\r\n    e = e || { url: '' };\r\n    this.$el.html(this.template(e));\r\n  },\r\n\r\n  onButtonClick: function(e) {\r\n    e.preventDefault();\r\n    this.vent.trigger('location-go', this.getLocation());\r\n  },\r\n\r\n  getLocation: function() {\r\n    return this.$el.find('input').val();\r\n  },\r\n\r\n  showSpinner: function() {\r\n    this.$el.find('.ajax-loader').addClass('visible');\r\n  },\r\n\r\n  hideSpinner: function() {\r\n    this.$el.find('.ajax-loader').removeClass('visible');\r\n  },\r\n\r\n  template: _.template($('#location-bar-template').html())\r\n});\r\n"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.REST.SocialMedia/AccountManagement.EntryPoint/js/hal/views/navigation.js",
    "content": "HAL.Views.Navigation = Backbone.View.extend({\r\n  initialize: function(opts) {\r\n    this.vent = opts.vent;\r\n    this.locationBar = new HAL.Views.LocationBar({ vent: this.vent });\r\n    this.requestHeadersView = new HAL.Views.RequestHeaders({ vent: this.vent });\r\n  },\r\n\r\n  className: 'navigation',\r\n\r\n  render: function() {\r\n    this.$el.empty();\r\n\r\n    this.locationBar.render();\r\n    this.requestHeadersView.render();\r\n\r\n    this.$el.append(this.locationBar.el);\r\n    this.$el.append(this.requestHeadersView.el);\r\n  }\r\n});\r\n"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.REST.SocialMedia/AccountManagement.EntryPoint/js/hal/views/non_safe_request_dialog.js",
    "content": "HAL.Views.NonSafeRequestDialog = Backbone.View.extend({\r\n  initialize: function(opts) {\r\n    this.href = opts.href;\r\n    this.vent = opts.vent;\r\n    this.uriTemplate = uritemplate(this.href);\r\n    _.bindAll(this, 'submitQuery');\r\n  },\r\n\r\n  events: {\r\n    'submit form': 'submitQuery'\r\n  },\r\n\r\n  className: 'modal fade',\r\n\r\n  submitQuery: function(e) {\r\n    e.preventDefault();\r\n\r\n    var self = this,\r\n        opts = {\r\n          url: this.$('.url').val(),\r\n          headers: HAL.parseHeaders(this.$('.headers').val()),\r\n          method:  this.$('.method').val(),\r\n          data: this.$('.body').val()\r\n        };\r\n\r\n    var request = HAL.client.request(opts);\r\n    request.done(function(response) {\r\n      self.vent.trigger('response', { resource: response, jqxhr: jqxhr });\r\n    }).fail(function(response) {\r\n      self.vent.trigger('fail-response', { jqxhr: jqxhr });\r\n    }).always(function() {\r\n      self.vent.trigger('response-headers', { jqxhr: jqxhr });\r\n      window.location.hash = 'NON-GET:' + opts.url;\r\n    });\r\n\r\n    this.$el.modal('hide');\r\n  },\r\n\r\n  render: function(opts) {\r\n    var headers = HAL.client.getDefaultHeaders(),\r\n        headersString = '';\r\n\r\n    _.each(headers, function(value, name) {\r\n      headersString += name + ': ' + value + '\\n';\r\n    });\r\n\r\n    this.$el.html(this.template({ href: this.href, user_defined_headers: headersString }));\r\n    this.$el.modal();\r\n    return this;\r\n  },\r\n\r\n  template: _.template($('#non-safe-request-template').html())\r\n});\r\n"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.REST.SocialMedia/AccountManagement.EntryPoint/js/hal/views/properties.js",
    "content": "HAL.Views.Properties = Backbone.View.extend({\r\n  initialize: function(opts) {\r\n    this.vent = opts.vent;\r\n    _.bindAll(this, 'render');\r\n  },\r\n\r\n  className: 'properties',\r\n\r\n  render: function(props) {\r\n    this.$el.html(this.template({ properties: props }));\r\n  },\r\n\r\n  template: _.template($('#properties-template').html())\r\n});\r\n"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.REST.SocialMedia/AccountManagement.EntryPoint/js/hal/views/query_uri_dialog.js",
    "content": "HAL.Views.QueryUriDialog = Backbone.View.extend({\r\n  initialize: function(opts) {\r\n    this.href = opts.href;\r\n    this.uriTemplate = uritemplate(this.href);\r\n    _.bindAll(this, 'submitQuery');\r\n    _.bindAll(this, 'renderPreview');\r\n  },\r\n\r\n  className: 'modal fade',\r\n\r\n  events: {\r\n    'submit form': 'submitQuery',\r\n    'keyup textarea': 'renderPreview',\r\n    'change textarea': 'renderPreview'\r\n  },\r\n\r\n  submitQuery: function(e) {\r\n    e.preventDefault();\r\n    var input;\r\n    try {\r\n      input = JSON.parse(this.$('textarea').val());\r\n    } catch(err) {\r\n      input = {};\r\n    }\r\n    this.$el.modal('hide');\r\n    window.location.hash = this.uriTemplate.expand(input);\r\n  },\r\n\r\n  renderPreview: function(e) {\r\n    var input, result;\r\n    try {\r\n      input = JSON.parse($(e.target).val());\r\n      result = this.uriTemplate.expand(input);\r\n    } catch (err) {\r\n      result = 'Invalid json input';\r\n    }\r\n    this.$('.preview').html(result);\r\n  },\r\n\r\n  extractExpressionNames: function (template) {\r\n    var names = [];\r\n    for (var i=0; i<template.set.length; i++) {\r\n      if (template.set[i].vars) {\r\n        for (var j=0; j<template.set[i].vars.length; j++) {\r\n          names.push(template.set[i].vars[j].name);\r\n        }\r\n      }\r\n    }\r\n    return names;\r\n  },\r\n\r\n  createDefaultInput: function (expressionNames) {\r\n    var defaultInput = {};\r\n    for (var i=0; i<expressionNames.length; i++) {\r\n      defaultInput[expressionNames[i]] = '';\r\n    }\r\n    return JSON.stringify(defaultInput, null, HAL.jsonIndent);\r\n  },\r\n\r\n  render: function(opts) {\r\n    var input = this.createDefaultInput(this.extractExpressionNames(this.uriTemplate));\r\n    this.$el.html(this.template({ href: this.href, input: input }));\r\n    this.$('textarea').trigger('keyup');\r\n    this.$el.modal(opts);\r\n    return this;\r\n  },\r\n\r\n  template: _.template($('#query-uri-template').html())\r\n});\r\n"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.REST.SocialMedia/AccountManagement.EntryPoint/js/hal/views/request_headers.js",
    "content": "HAL.Views.RequestHeaders = Backbone.View.extend({\r\n  initialize: function(opts) {\r\n    var self = this;\r\n    this.vent = opts.vent;\r\n\r\n    _.bindAll(this, 'updateRequestHeaders');\r\n\r\n    this.vent.bind('app:loaded', function() {\r\n      self.updateRequestHeaders();\r\n    });\r\n  },\r\n\r\n  className: 'request-headers',\r\n\r\n  events: {\r\n    'blur textarea': 'updateRequestHeaders'\r\n  },\r\n\r\n  updateRequestHeaders: function(e) {\r\n    var inputText = this.$('textarea').val() || '';\r\n        headers = HAL.parseHeaders(inputText);\r\n    HAL.client.updateDefaultHeaders(headers)\r\n  },\r\n\r\n  render: function() {\r\n    this.$el.html(this.template());\r\n  },\r\n\r\n  template: _.template($('#request-headers-template').html())\r\n});\r\n"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.REST.SocialMedia/AccountManagement.EntryPoint/js/hal/views/resource.js",
    "content": "HAL.Views.Resource = Backbone.View.extend({\r\n  initialize: function(opts) {\r\n    var self = this;\r\n\r\n    this.vent = opts.vent;\r\n\r\n    this.vent.bind('response', function(e) {\r\n      self.render(new HAL.Models.Resource(e.resource));\r\n    });\r\n\r\n    this.vent.bind('fail-response', function(e) {\r\n        try {\r\n            resource = JSON.parse(e.jqxhr.responseText);\r\n        } catch(err) {\r\n            resource = null;\r\n        }\r\n        self.vent.trigger('response', { resource: resource, jqxhr: e.jqxhr });\r\n    });\r\n  },\r\n\r\n  className: 'resource',\r\n\r\n  render: function(resource) {\r\n    var linksView = new HAL.Views.Links({ vent: this.vent }),\r\n        propertiesView = new HAL.Views.Properties({ vent: this.vent }),\r\n        embeddedResourcesView \r\n\r\n    propertiesView.render(resource.toJSON());\r\n    linksView.render(resource.links);\r\n\r\n    this.$el.empty();\r\n    this.$el.append(propertiesView.el);\r\n    this.$el.append(linksView.el);\r\n\r\n    if (resource.embeddedResources) {\r\n      embeddedResourcesView = new HAL.Views.EmbeddedResources({ vent: this.vent });\r\n      embeddedResourcesView.render(resource.embeddedResources);\r\n      this.$el.append(embeddedResourcesView.el);\r\n    }\r\n\r\n    return this;\r\n  }\r\n});\r\n"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.REST.SocialMedia/AccountManagement.EntryPoint/js/hal/views/response.js",
    "content": "HAL.Views.Response = Backbone.View.extend({\r\n  initialize: function(opts) {\r\n    this.vent = opts.vent;\r\n\r\n    this.headersView = new HAL.Views.ResponseHeaders({ vent: this.vent });\r\n    this.bodyView = new HAL.Views.ResponseBody({ vent: this.vent });\r\n\r\n    _.bindAll(this, 'render');\r\n\r\n    this.vent.bind('response', this.render);\r\n  },\r\n\r\n  className: 'response',\r\n\r\n  render: function(e) {\r\n    this.$el.html();\r\n\r\n    this.headersView.render(e);\r\n    this.bodyView.render(e);\r\n\r\n    this.$el.append(this.headersView.el);\r\n    this.$el.append(this.bodyView.el);\r\n  }\r\n});\r\n"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.REST.SocialMedia/AccountManagement.EntryPoint/js/hal/views/response_body.js",
    "content": "HAL.Views.ResponseBody = Backbone.View.extend({\r\n  initialize: function(opts) {\r\n    this.vent = opts.vent;\r\n  },\r\n\r\n  className: 'response-headers',\r\n\r\n  render: function(e) {\r\n    this.$el.html(this.template({\r\n      body: this._bodyAsStringFromEvent(e)\r\n    }));\r\n  },\r\n\r\n  template: _.template($('#response-body-template').html()),\r\n\r\n  _bodyAsStringFromEvent: function(e) {\r\n    var output = 'n/a';\r\n    if(e.resource !== null) {\r\n      output = JSON.stringify(e.resource, null, HAL.jsonIndent);\r\n    } else {\r\n      // The Ajax request \"failed\", but there may still be an\r\n      // interesting response body (possibly JSON) to show.\r\n      var content_type = e.jqxhr.getResponseHeader('content-type');\r\n      var responseText = e.jqxhr.responseText;\r\n      if(content_type == null || content_type.indexOf('text/') == 0) {\r\n        output = responseText;\r\n      } else if(content_type.indexOf('json') != -1) {\r\n        // Looks like json... try to parse it.\r\n        try {\r\n          var obj = JSON.parse(responseText);\r\n          output = JSON.stringify(obj, null, HAL.jsonIndent);\r\n        } catch (err) {\r\n          // JSON parse failed. Just show the raw text.\r\n          output = responseText;\r\n        }\r\n      }\r\n    }\r\n    return output\r\n  }\r\n});\r\n"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.REST.SocialMedia/AccountManagement.EntryPoint/js/hal/views/response_headers.js",
    "content": "HAL.Views.ResponseHeaders = Backbone.View.extend({\r\n  initialize: function(opts) {\r\n    this.vent = opts.vent;\r\n  },\r\n\r\n  className: 'response-headers',\r\n\r\n  render: function(e) {\r\n    this.$el.html(this.template({\r\n      status: {\r\n        code: e.jqxhr.status,\r\n        text: e.jqxhr.statusText\r\n      },\r\n      headers: e.jqxhr.getAllResponseHeaders()\r\n    }));\r\n  },\r\n\r\n  template: _.template($('#response-headers-template').html())\r\n});\r\n"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.REST.SocialMedia/AccountManagement.EntryPoint/js/hal.js",
    "content": "(function() {\r\n  var urlRegex = /(http|https):\\/\\/(\\w+:{0,1}\\w*@)?(\\S+)(:[0-9]+)?(\\/|\\/([\\w#!:.?+=&%@!\\-\\/]))?/;\r\n\r\n  function isCurie(string) {\r\n    return string.split(':').length > 1;\r\n  };\r\n\r\n  var HAL = {\r\n    Models: {},\r\n    Views: {},\r\n    Http: {},\r\n    currentDocument: {},\r\n    jsonIndent: 2,\r\n    isUrl: function(str) {\r\n      return str.match(urlRegex) || isCurie(str);\r\n    },\r\n    truncateIfUrl: function(str) {\r\n      var replaceRegex = /(http|https):\\/\\/([^\\/]*)\\//;\r\n        return str.replace(replaceRegex, '.../');\r\n    },\r\n    buildUrl: function(rel) {\r\n      if (!rel.match(urlRegex) && isCurie(rel) && HAL.currentDocument._links.curies) {\r\n        var parts = rel.split(':');\r\n        var curies = HAL.currentDocument._links.curies;\r\n        for (var i=0; i<curies.length; i++) {\r\n          if (curies[i].name == parts[0]) {\r\n            var tmpl = uritemplate(curies[i].href);\r\n            return tmpl.expand({ rel: parts[1] });\r\n          }\r\n        }\r\n      }\r\n      else if (!rel.match(urlRegex) && isCurie(rel) && HAL.currentDocument._links.curie) {\r\n        // Backward compatibility with <04 version of spec.\r\n        var tmpl = uritemplate(HAL.currentDocument._links.curie.href);\r\n        return tmpl.expand({ rel: rel.split(':')[1] });\r\n      }\r\n      else {\r\n        return rel;\r\n      }\r\n    },\r\n    parseHeaders: function(string) {\r\n      var header_lines = string.split(\"\\n\");\r\n      var headers = {};\r\n      _.each(header_lines, function(line) {\r\n        var parts = line.split(':');\r\n        if (parts.length > 1) {\r\n          var name = parts.shift().trim();\r\n          var value = parts.join(':').trim();\r\n          headers[name] = value;\r\n        }\r\n      });\r\n      return headers;\r\n    },\r\n  };\r\n\r\n  window.HAL = HAL;\r\n})();\r\n"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.REST.SocialMedia/AccountManagement.EntryPoint/packages.config",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<packages>\r\n  <package id=\"Microsoft.AspNet.WebApi\" version=\"5.0.0\" targetFramework=\"net45\" />\r\n  <package id=\"Microsoft.AspNet.WebApi.Client\" version=\"5.0.0\" targetFramework=\"net45\" />\r\n  <package id=\"Microsoft.AspNet.WebApi.Core\" version=\"5.0.0\" targetFramework=\"net45\" />\r\n  <package id=\"Microsoft.AspNet.WebApi.WebHost\" version=\"5.0.0\" targetFramework=\"net45\" />\r\n  <package id=\"Newtonsoft.Json\" version=\"5.0.6\" targetFramework=\"net45\" />\r\n  <package id=\"WebApi.Hal\" version=\"2.2.0.18\" targetFramework=\"net45\" />\r\n</packages>"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.REST.SocialMedia/AccountManagement.EntryPoint/styles.css",
    "content": "#browser #location-bar { margin: 10px 0; }\r\n\r\n#browser #location-bar .address {\r\n  border: 1px solid #999;\r\n  padding: 4px; margin: 0;\r\n}\r\n\r\n#browser #headers-bar {\r\n border: 1px solid #888;\r\n padding: 5px\r\n}\r\n\r\n#request-headers {\r\n  border: 0;\r\n  outline: none;\r\n  padding: 0;\r\n  resize: vertical;\r\n  width: 100%;\r\n  height: 40px;\r\n  margin-bottom: 0px;\r\n\r\n  -webkit-box-shadow: none;\r\n  -moz-box-shadow: none;\r\n  box-shadow: none;\r\n}\r\n\r\n.inspector { height: 100%; }\r\n\r\n.documentation { height: 100%; }\r\n.documentation iframe { width: 100%; height: 100%; }\r\n\r\n.modal input, .modal textarea {\r\n  width: 90%;\r\n}\r\n\r\n.modal textarea {\r\n  height: 100px;\r\n}\r\n\r\n.links .btn {\r\n  padding: 2px 5px 2px;\r\n  font-size: 12px;\r\n  line-height: 14px;\r\n}\r\n\r\nbody table.table {\r\n  font-size: 11px;\r\n}\r\n\r\n.location-bar-container {\r\n  line-height: 30px;\r\n}\r\n\r\n.ajax-loader {\r\n  vertical-align: middle;\r\n  background-image: url(\"./vendor/img/ajax-loader.gif\");\r\n  background-repeat: no-repeat;\r\n  width: 16px;\r\n  height: 16px;\r\n  margin-left: 6px;\r\n  opacity: 0;\r\n  display: inline-block;\r\n  transition: opacity 1s;\r\n}\r\n.ajax-loader.visible {\r\n  opacity: 1;\r\n}\r\n"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.REST.SocialMedia/AccountManagement.EntryPoint/vendor/css/bootstrap-responsive.css",
    "content": "/*!\r\n * Bootstrap Responsive v2.3.1\r\n *\r\n * Copyright 2012 Twitter, Inc\r\n * Licensed under the Apache License v2.0\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Designed and built with all the love in the world @twitter by @mdo and @fat.\r\n */\r\n\r\n.clearfix {\r\n  *zoom: 1;\r\n}\r\n\r\n.clearfix:before,\r\n.clearfix:after {\r\n  display: table;\r\n  line-height: 0;\r\n  content: \"\";\r\n}\r\n\r\n.clearfix:after {\r\n  clear: both;\r\n}\r\n\r\n.hide-text {\r\n  font: 0/0 a;\r\n  color: transparent;\r\n  text-shadow: none;\r\n  background-color: transparent;\r\n  border: 0;\r\n}\r\n\r\n.input-block-level {\r\n  display: block;\r\n  width: 100%;\r\n  min-height: 30px;\r\n  -webkit-box-sizing: border-box;\r\n     -moz-box-sizing: border-box;\r\n          box-sizing: border-box;\r\n}\r\n\r\n@-ms-viewport {\r\n  width: device-width;\r\n}\r\n\r\n.hidden {\r\n  display: none;\r\n  visibility: hidden;\r\n}\r\n\r\n.visible-phone {\r\n  display: none !important;\r\n}\r\n\r\n.visible-tablet {\r\n  display: none !important;\r\n}\r\n\r\n.hidden-desktop {\r\n  display: none !important;\r\n}\r\n\r\n.visible-desktop {\r\n  display: inherit !important;\r\n}\r\n\r\n@media (min-width: 768px) and (max-width: 979px) {\r\n  .hidden-desktop {\r\n    display: inherit !important;\r\n  }\r\n  .visible-desktop {\r\n    display: none !important ;\r\n  }\r\n  .visible-tablet {\r\n    display: inherit !important;\r\n  }\r\n  .hidden-tablet {\r\n    display: none !important;\r\n  }\r\n}\r\n\r\n@media (max-width: 767px) {\r\n  .hidden-desktop {\r\n    display: inherit !important;\r\n  }\r\n  .visible-desktop {\r\n    display: none !important;\r\n  }\r\n  .visible-phone {\r\n    display: inherit !important;\r\n  }\r\n  .hidden-phone {\r\n    display: none !important;\r\n  }\r\n}\r\n\r\n.visible-print {\r\n  display: none !important;\r\n}\r\n\r\n@media print {\r\n  .visible-print {\r\n    display: inherit !important;\r\n  }\r\n  .hidden-print {\r\n    display: none !important;\r\n  }\r\n}\r\n\r\n@media (min-width: 1200px) {\r\n  .row {\r\n    margin-left: -30px;\r\n    *zoom: 1;\r\n  }\r\n  .row:before,\r\n  .row:after {\r\n    display: table;\r\n    line-height: 0;\r\n    content: \"\";\r\n  }\r\n  .row:after {\r\n    clear: both;\r\n  }\r\n  [class*=\"span\"] {\r\n    float: left;\r\n    min-height: 1px;\r\n    margin-left: 30px;\r\n  }\r\n  .container,\r\n  .navbar-static-top .container,\r\n  .navbar-fixed-top .container,\r\n  .navbar-fixed-bottom .container {\r\n    width: 1170px;\r\n  }\r\n  .span12 {\r\n    width: 1170px;\r\n  }\r\n  .span11 {\r\n    width: 1070px;\r\n  }\r\n  .span10 {\r\n    width: 970px;\r\n  }\r\n  .span9 {\r\n    width: 870px;\r\n  }\r\n  .span8 {\r\n    width: 770px;\r\n  }\r\n  .span7 {\r\n    width: 670px;\r\n  }\r\n  .span6 {\r\n    width: 570px;\r\n  }\r\n  .span5 {\r\n    width: 470px;\r\n  }\r\n  .span4 {\r\n    width: 370px;\r\n  }\r\n  .span3 {\r\n    width: 270px;\r\n  }\r\n  .span2 {\r\n    width: 170px;\r\n  }\r\n  .span1 {\r\n    width: 70px;\r\n  }\r\n  .offset12 {\r\n    margin-left: 1230px;\r\n  }\r\n  .offset11 {\r\n    margin-left: 1130px;\r\n  }\r\n  .offset10 {\r\n    margin-left: 1030px;\r\n  }\r\n  .offset9 {\r\n    margin-left: 930px;\r\n  }\r\n  .offset8 {\r\n    margin-left: 830px;\r\n  }\r\n  .offset7 {\r\n    margin-left: 730px;\r\n  }\r\n  .offset6 {\r\n    margin-left: 630px;\r\n  }\r\n  .offset5 {\r\n    margin-left: 530px;\r\n  }\r\n  .offset4 {\r\n    margin-left: 430px;\r\n  }\r\n  .offset3 {\r\n    margin-left: 330px;\r\n  }\r\n  .offset2 {\r\n    margin-left: 230px;\r\n  }\r\n  .offset1 {\r\n    margin-left: 130px;\r\n  }\r\n  .row-fluid {\r\n    width: 100%;\r\n    *zoom: 1;\r\n  }\r\n  .row-fluid:before,\r\n  .row-fluid:after {\r\n    display: table;\r\n    line-height: 0;\r\n    content: \"\";\r\n  }\r\n  .row-fluid:after {\r\n    clear: both;\r\n  }\r\n  .row-fluid [class*=\"span\"] {\r\n    display: block;\r\n    float: left;\r\n    width: 100%;\r\n    min-height: 30px;\r\n    margin-left: 2.564102564102564%;\r\n    *margin-left: 2.5109110747408616%;\r\n    -webkit-box-sizing: border-box;\r\n       -moz-box-sizing: border-box;\r\n            box-sizing: border-box;\r\n  }\r\n  .row-fluid [class*=\"span\"]:first-child {\r\n    margin-left: 0;\r\n  }\r\n  .row-fluid .controls-row [class*=\"span\"] + [class*=\"span\"] {\r\n    margin-left: 2.564102564102564%;\r\n  }\r\n  .row-fluid .span12 {\r\n    width: 100%;\r\n    *width: 99.94680851063829%;\r\n  }\r\n  .row-fluid .span11 {\r\n    width: 91.45299145299145%;\r\n    *width: 91.39979996362975%;\r\n  }\r\n  .row-fluid .span10 {\r\n    width: 82.90598290598291%;\r\n    *width: 82.8527914166212%;\r\n  }\r\n  .row-fluid .span9 {\r\n    width: 74.35897435897436%;\r\n    *width: 74.30578286961266%;\r\n  }\r\n  .row-fluid .span8 {\r\n    width: 65.81196581196582%;\r\n    *width: 65.75877432260411%;\r\n  }\r\n  .row-fluid .span7 {\r\n    width: 57.26495726495726%;\r\n    *width: 57.21176577559556%;\r\n  }\r\n  .row-fluid .span6 {\r\n    width: 48.717948717948715%;\r\n    *width: 48.664757228587014%;\r\n  }\r\n  .row-fluid .span5 {\r\n    width: 40.17094017094017%;\r\n    *width: 40.11774868157847%;\r\n  }\r\n  .row-fluid .span4 {\r\n    width: 31.623931623931625%;\r\n    *width: 31.570740134569924%;\r\n  }\r\n  .row-fluid .span3 {\r\n    width: 23.076923076923077%;\r\n    *width: 23.023731587561375%;\r\n  }\r\n  .row-fluid .span2 {\r\n    width: 14.52991452991453%;\r\n    *width: 14.476723040552828%;\r\n  }\r\n  .row-fluid .span1 {\r\n    width: 5.982905982905983%;\r\n    *width: 5.929714493544281%;\r\n  }\r\n  .row-fluid .offset12 {\r\n    margin-left: 105.12820512820512%;\r\n    *margin-left: 105.02182214948171%;\r\n  }\r\n  .row-fluid .offset12:first-child {\r\n    margin-left: 102.56410256410257%;\r\n    *margin-left: 102.45771958537915%;\r\n  }\r\n  .row-fluid .offset11 {\r\n    margin-left: 96.58119658119658%;\r\n    *margin-left: 96.47481360247316%;\r\n  }\r\n  .row-fluid .offset11:first-child {\r\n    margin-left: 94.01709401709402%;\r\n    *margin-left: 93.91071103837061%;\r\n  }\r\n  .row-fluid .offset10 {\r\n    margin-left: 88.03418803418803%;\r\n    *margin-left: 87.92780505546462%;\r\n  }\r\n  .row-fluid .offset10:first-child {\r\n    margin-left: 85.47008547008548%;\r\n    *margin-left: 85.36370249136206%;\r\n  }\r\n  .row-fluid .offset9 {\r\n    margin-left: 79.48717948717949%;\r\n    *margin-left: 79.38079650845607%;\r\n  }\r\n  .row-fluid .offset9:first-child {\r\n    margin-left: 76.92307692307693%;\r\n    *margin-left: 76.81669394435352%;\r\n  }\r\n  .row-fluid .offset8 {\r\n    margin-left: 70.94017094017094%;\r\n    *margin-left: 70.83378796144753%;\r\n  }\r\n  .row-fluid .offset8:first-child {\r\n    margin-left: 68.37606837606839%;\r\n    *margin-left: 68.26968539734497%;\r\n  }\r\n  .row-fluid .offset7 {\r\n    margin-left: 62.393162393162385%;\r\n    *margin-left: 62.28677941443899%;\r\n  }\r\n  .row-fluid .offset7:first-child {\r\n    margin-left: 59.82905982905982%;\r\n    *margin-left: 59.72267685033642%;\r\n  }\r\n  .row-fluid .offset6 {\r\n    margin-left: 53.84615384615384%;\r\n    *margin-left: 53.739770867430444%;\r\n  }\r\n  .row-fluid .offset6:first-child {\r\n    margin-left: 51.28205128205128%;\r\n    *margin-left: 51.175668303327875%;\r\n  }\r\n  .row-fluid .offset5 {\r\n    margin-left: 45.299145299145295%;\r\n    *margin-left: 45.1927623204219%;\r\n  }\r\n  .row-fluid .offset5:first-child {\r\n    margin-left: 42.73504273504273%;\r\n    *margin-left: 42.62865975631933%;\r\n  }\r\n  .row-fluid .offset4 {\r\n    margin-left: 36.75213675213675%;\r\n    *margin-left: 36.645753773413354%;\r\n  }\r\n  .row-fluid .offset4:first-child {\r\n    margin-left: 34.18803418803419%;\r\n    *margin-left: 34.081651209310785%;\r\n  }\r\n  .row-fluid .offset3 {\r\n    margin-left: 28.205128205128204%;\r\n    *margin-left: 28.0987452264048%;\r\n  }\r\n  .row-fluid .offset3:first-child {\r\n    margin-left: 25.641025641025642%;\r\n    *margin-left: 25.53464266230224%;\r\n  }\r\n  .row-fluid .offset2 {\r\n    margin-left: 19.65811965811966%;\r\n    *margin-left: 19.551736679396257%;\r\n  }\r\n  .row-fluid .offset2:first-child {\r\n    margin-left: 17.094017094017094%;\r\n    *margin-left: 16.98763411529369%;\r\n  }\r\n  .row-fluid .offset1 {\r\n    margin-left: 11.11111111111111%;\r\n    *margin-left: 11.004728132387708%;\r\n  }\r\n  .row-fluid .offset1:first-child {\r\n    margin-left: 8.547008547008547%;\r\n    *margin-left: 8.440625568285142%;\r\n  }\r\n  input,\r\n  textarea,\r\n  .uneditable-input {\r\n    margin-left: 0;\r\n  }\r\n  .controls-row [class*=\"span\"] + [class*=\"span\"] {\r\n    margin-left: 30px;\r\n  }\r\n  input.span12,\r\n  textarea.span12,\r\n  .uneditable-input.span12 {\r\n    width: 1156px;\r\n  }\r\n  input.span11,\r\n  textarea.span11,\r\n  .uneditable-input.span11 {\r\n    width: 1056px;\r\n  }\r\n  input.span10,\r\n  textarea.span10,\r\n  .uneditable-input.span10 {\r\n    width: 956px;\r\n  }\r\n  input.span9,\r\n  textarea.span9,\r\n  .uneditable-input.span9 {\r\n    width: 856px;\r\n  }\r\n  input.span8,\r\n  textarea.span8,\r\n  .uneditable-input.span8 {\r\n    width: 756px;\r\n  }\r\n  input.span7,\r\n  textarea.span7,\r\n  .uneditable-input.span7 {\r\n    width: 656px;\r\n  }\r\n  input.span6,\r\n  textarea.span6,\r\n  .uneditable-input.span6 {\r\n    width: 556px;\r\n  }\r\n  input.span5,\r\n  textarea.span5,\r\n  .uneditable-input.span5 {\r\n    width: 456px;\r\n  }\r\n  input.span4,\r\n  textarea.span4,\r\n  .uneditable-input.span4 {\r\n    width: 356px;\r\n  }\r\n  input.span3,\r\n  textarea.span3,\r\n  .uneditable-input.span3 {\r\n    width: 256px;\r\n  }\r\n  input.span2,\r\n  textarea.span2,\r\n  .uneditable-input.span2 {\r\n    width: 156px;\r\n  }\r\n  input.span1,\r\n  textarea.span1,\r\n  .uneditable-input.span1 {\r\n    width: 56px;\r\n  }\r\n  .thumbnails {\r\n    margin-left: -30px;\r\n  }\r\n  .thumbnails > li {\r\n    margin-left: 30px;\r\n  }\r\n  .row-fluid .thumbnails {\r\n    margin-left: 0;\r\n  }\r\n}\r\n\r\n@media (min-width: 768px) and (max-width: 979px) {\r\n  .row {\r\n    margin-left: -20px;\r\n    *zoom: 1;\r\n  }\r\n  .row:before,\r\n  .row:after {\r\n    display: table;\r\n    line-height: 0;\r\n    content: \"\";\r\n  }\r\n  .row:after {\r\n    clear: both;\r\n  }\r\n  [class*=\"span\"] {\r\n    float: left;\r\n    min-height: 1px;\r\n    margin-left: 20px;\r\n  }\r\n  .container,\r\n  .navbar-static-top .container,\r\n  .navbar-fixed-top .container,\r\n  .navbar-fixed-bottom .container {\r\n    width: 724px;\r\n  }\r\n  .span12 {\r\n    width: 724px;\r\n  }\r\n  .span11 {\r\n    width: 662px;\r\n  }\r\n  .span10 {\r\n    width: 600px;\r\n  }\r\n  .span9 {\r\n    width: 538px;\r\n  }\r\n  .span8 {\r\n    width: 476px;\r\n  }\r\n  .span7 {\r\n    width: 414px;\r\n  }\r\n  .span6 {\r\n    width: 352px;\r\n  }\r\n  .span5 {\r\n    width: 290px;\r\n  }\r\n  .span4 {\r\n    width: 228px;\r\n  }\r\n  .span3 {\r\n    width: 166px;\r\n  }\r\n  .span2 {\r\n    width: 104px;\r\n  }\r\n  .span1 {\r\n    width: 42px;\r\n  }\r\n  .offset12 {\r\n    margin-left: 764px;\r\n  }\r\n  .offset11 {\r\n    margin-left: 702px;\r\n  }\r\n  .offset10 {\r\n    margin-left: 640px;\r\n  }\r\n  .offset9 {\r\n    margin-left: 578px;\r\n  }\r\n  .offset8 {\r\n    margin-left: 516px;\r\n  }\r\n  .offset7 {\r\n    margin-left: 454px;\r\n  }\r\n  .offset6 {\r\n    margin-left: 392px;\r\n  }\r\n  .offset5 {\r\n    margin-left: 330px;\r\n  }\r\n  .offset4 {\r\n    margin-left: 268px;\r\n  }\r\n  .offset3 {\r\n    margin-left: 206px;\r\n  }\r\n  .offset2 {\r\n    margin-left: 144px;\r\n  }\r\n  .offset1 {\r\n    margin-left: 82px;\r\n  }\r\n  .row-fluid {\r\n    width: 100%;\r\n    *zoom: 1;\r\n  }\r\n  .row-fluid:before,\r\n  .row-fluid:after {\r\n    display: table;\r\n    line-height: 0;\r\n    content: \"\";\r\n  }\r\n  .row-fluid:after {\r\n    clear: both;\r\n  }\r\n  .row-fluid [class*=\"span\"] {\r\n    display: block;\r\n    float: left;\r\n    width: 100%;\r\n    min-height: 30px;\r\n    margin-left: 2.7624309392265194%;\r\n    *margin-left: 2.709239449864817%;\r\n    -webkit-box-sizing: border-box;\r\n       -moz-box-sizing: border-box;\r\n            box-sizing: border-box;\r\n  }\r\n  .row-fluid [class*=\"span\"]:first-child {\r\n    margin-left: 0;\r\n  }\r\n  .row-fluid .controls-row [class*=\"span\"] + [class*=\"span\"] {\r\n    margin-left: 2.7624309392265194%;\r\n  }\r\n  .row-fluid .span12 {\r\n    width: 100%;\r\n    *width: 99.94680851063829%;\r\n  }\r\n  .row-fluid .span11 {\r\n    width: 91.43646408839778%;\r\n    *width: 91.38327259903608%;\r\n  }\r\n  .row-fluid .span10 {\r\n    width: 82.87292817679558%;\r\n    *width: 82.81973668743387%;\r\n  }\r\n  .row-fluid .span9 {\r\n    width: 74.30939226519337%;\r\n    *width: 74.25620077583166%;\r\n  }\r\n  .row-fluid .span8 {\r\n    width: 65.74585635359117%;\r\n    *width: 65.69266486422946%;\r\n  }\r\n  .row-fluid .span7 {\r\n    width: 57.18232044198895%;\r\n    *width: 57.12912895262725%;\r\n  }\r\n  .row-fluid .span6 {\r\n    width: 48.61878453038674%;\r\n    *width: 48.56559304102504%;\r\n  }\r\n  .row-fluid .span5 {\r\n    width: 40.05524861878453%;\r\n    *width: 40.00205712942283%;\r\n  }\r\n  .row-fluid .span4 {\r\n    width: 31.491712707182323%;\r\n    *width: 31.43852121782062%;\r\n  }\r\n  .row-fluid .span3 {\r\n    width: 22.92817679558011%;\r\n    *width: 22.87498530621841%;\r\n  }\r\n  .row-fluid .span2 {\r\n    width: 14.3646408839779%;\r\n    *width: 14.311449394616199%;\r\n  }\r\n  .row-fluid .span1 {\r\n    width: 5.801104972375691%;\r\n    *width: 5.747913483013988%;\r\n  }\r\n  .row-fluid .offset12 {\r\n    margin-left: 105.52486187845304%;\r\n    *margin-left: 105.41847889972962%;\r\n  }\r\n  .row-fluid .offset12:first-child {\r\n    margin-left: 102.76243093922652%;\r\n    *margin-left: 102.6560479605031%;\r\n  }\r\n  .row-fluid .offset11 {\r\n    margin-left: 96.96132596685082%;\r\n    *margin-left: 96.8549429881274%;\r\n  }\r\n  .row-fluid .offset11:first-child {\r\n    margin-left: 94.1988950276243%;\r\n    *margin-left: 94.09251204890089%;\r\n  }\r\n  .row-fluid .offset10 {\r\n    margin-left: 88.39779005524862%;\r\n    *margin-left: 88.2914070765252%;\r\n  }\r\n  .row-fluid .offset10:first-child {\r\n    margin-left: 85.6353591160221%;\r\n    *margin-left: 85.52897613729868%;\r\n  }\r\n  .row-fluid .offset9 {\r\n    margin-left: 79.8342541436464%;\r\n    *margin-left: 79.72787116492299%;\r\n  }\r\n  .row-fluid .offset9:first-child {\r\n    margin-left: 77.07182320441989%;\r\n    *margin-left: 76.96544022569647%;\r\n  }\r\n  .row-fluid .offset8 {\r\n    margin-left: 71.2707182320442%;\r\n    *margin-left: 71.16433525332079%;\r\n  }\r\n  .row-fluid .offset8:first-child {\r\n    margin-left: 68.50828729281768%;\r\n    *margin-left: 68.40190431409427%;\r\n  }\r\n  .row-fluid .offset7 {\r\n    margin-left: 62.70718232044199%;\r\n    *margin-left: 62.600799341718584%;\r\n  }\r\n  .row-fluid .offset7:first-child {\r\n    margin-left: 59.94475138121547%;\r\n    *margin-left: 59.838368402492065%;\r\n  }\r\n  .row-fluid .offset6 {\r\n    margin-left: 54.14364640883978%;\r\n    *margin-left: 54.037263430116376%;\r\n  }\r\n  .row-fluid .offset6:first-child {\r\n    margin-left: 51.38121546961326%;\r\n    *margin-left: 51.27483249088986%;\r\n  }\r\n  .row-fluid .offset5 {\r\n    margin-left: 45.58011049723757%;\r\n    *margin-left: 45.47372751851417%;\r\n  }\r\n  .row-fluid .offset5:first-child {\r\n    margin-left: 42.81767955801105%;\r\n    *margin-left: 42.71129657928765%;\r\n  }\r\n  .row-fluid .offset4 {\r\n    margin-left: 37.01657458563536%;\r\n    *margin-left: 36.91019160691196%;\r\n  }\r\n  .row-fluid .offset4:first-child {\r\n    margin-left: 34.25414364640884%;\r\n    *margin-left: 34.14776066768544%;\r\n  }\r\n  .row-fluid .offset3 {\r\n    margin-left: 28.45303867403315%;\r\n    *margin-left: 28.346655695309746%;\r\n  }\r\n  .row-fluid .offset3:first-child {\r\n    margin-left: 25.69060773480663%;\r\n    *margin-left: 25.584224756083227%;\r\n  }\r\n  .row-fluid .offset2 {\r\n    margin-left: 19.88950276243094%;\r\n    *margin-left: 19.783119783707537%;\r\n  }\r\n  .row-fluid .offset2:first-child {\r\n    margin-left: 17.12707182320442%;\r\n    *margin-left: 17.02068884448102%;\r\n  }\r\n  .row-fluid .offset1 {\r\n    margin-left: 11.32596685082873%;\r\n    *margin-left: 11.219583872105325%;\r\n  }\r\n  .row-fluid .offset1:first-child {\r\n    margin-left: 8.56353591160221%;\r\n    *margin-left: 8.457152932878806%;\r\n  }\r\n  input,\r\n  textarea,\r\n  .uneditable-input {\r\n    margin-left: 0;\r\n  }\r\n  .controls-row [class*=\"span\"] + [class*=\"span\"] {\r\n    margin-left: 20px;\r\n  }\r\n  input.span12,\r\n  textarea.span12,\r\n  .uneditable-input.span12 {\r\n    width: 710px;\r\n  }\r\n  input.span11,\r\n  textarea.span11,\r\n  .uneditable-input.span11 {\r\n    width: 648px;\r\n  }\r\n  input.span10,\r\n  textarea.span10,\r\n  .uneditable-input.span10 {\r\n    width: 586px;\r\n  }\r\n  input.span9,\r\n  textarea.span9,\r\n  .uneditable-input.span9 {\r\n    width: 524px;\r\n  }\r\n  input.span8,\r\n  textarea.span8,\r\n  .uneditable-input.span8 {\r\n    width: 462px;\r\n  }\r\n  input.span7,\r\n  textarea.span7,\r\n  .uneditable-input.span7 {\r\n    width: 400px;\r\n  }\r\n  input.span6,\r\n  textarea.span6,\r\n  .uneditable-input.span6 {\r\n    width: 338px;\r\n  }\r\n  input.span5,\r\n  textarea.span5,\r\n  .uneditable-input.span5 {\r\n    width: 276px;\r\n  }\r\n  input.span4,\r\n  textarea.span4,\r\n  .uneditable-input.span4 {\r\n    width: 214px;\r\n  }\r\n  input.span3,\r\n  textarea.span3,\r\n  .uneditable-input.span3 {\r\n    width: 152px;\r\n  }\r\n  input.span2,\r\n  textarea.span2,\r\n  .uneditable-input.span2 {\r\n    width: 90px;\r\n  }\r\n  input.span1,\r\n  textarea.span1,\r\n  .uneditable-input.span1 {\r\n    width: 28px;\r\n  }\r\n}\r\n\r\n@media (max-width: 767px) {\r\n  body {\r\n    padding-right: 20px;\r\n    padding-left: 20px;\r\n  }\r\n  .navbar-fixed-top,\r\n  .navbar-fixed-bottom,\r\n  .navbar-static-top {\r\n    margin-right: -20px;\r\n    margin-left: -20px;\r\n  }\r\n  .container-fluid {\r\n    padding: 0;\r\n  }\r\n  .dl-horizontal dt {\r\n    float: none;\r\n    width: auto;\r\n    clear: none;\r\n    text-align: left;\r\n  }\r\n  .dl-horizontal dd {\r\n    margin-left: 0;\r\n  }\r\n  .container {\r\n    width: auto;\r\n  }\r\n  .row-fluid {\r\n    width: 100%;\r\n  }\r\n  .row,\r\n  .thumbnails {\r\n    margin-left: 0;\r\n  }\r\n  .thumbnails > li {\r\n    float: none;\r\n    margin-left: 0;\r\n  }\r\n  [class*=\"span\"],\r\n  .uneditable-input[class*=\"span\"],\r\n  .row-fluid [class*=\"span\"] {\r\n    display: block;\r\n    float: none;\r\n    width: 100%;\r\n    margin-left: 0;\r\n    -webkit-box-sizing: border-box;\r\n       -moz-box-sizing: border-box;\r\n            box-sizing: border-box;\r\n  }\r\n  .span12,\r\n  .row-fluid .span12 {\r\n    width: 100%;\r\n    -webkit-box-sizing: border-box;\r\n       -moz-box-sizing: border-box;\r\n            box-sizing: border-box;\r\n  }\r\n  .row-fluid [class*=\"offset\"]:first-child {\r\n    margin-left: 0;\r\n  }\r\n  .input-large,\r\n  .input-xlarge,\r\n  .input-xxlarge,\r\n  input[class*=\"span\"],\r\n  select[class*=\"span\"],\r\n  textarea[class*=\"span\"],\r\n  .uneditable-input {\r\n    display: block;\r\n    width: 100%;\r\n    min-height: 30px;\r\n    -webkit-box-sizing: border-box;\r\n       -moz-box-sizing: border-box;\r\n            box-sizing: border-box;\r\n  }\r\n  .input-prepend input,\r\n  .input-append input,\r\n  .input-prepend input[class*=\"span\"],\r\n  .input-append input[class*=\"span\"] {\r\n    display: inline-block;\r\n    width: auto;\r\n  }\r\n  .controls-row [class*=\"span\"] + [class*=\"span\"] {\r\n    margin-left: 0;\r\n  }\r\n  .modal {\r\n    position: fixed;\r\n    top: 20px;\r\n    right: 20px;\r\n    left: 20px;\r\n    width: auto;\r\n    margin: 0;\r\n  }\r\n  .modal.fade {\r\n    top: -100px;\r\n  }\r\n  .modal.fade.in {\r\n    top: 20px;\r\n  }\r\n}\r\n\r\n@media (max-width: 480px) {\r\n  .nav-collapse {\r\n    -webkit-transform: translate3d(0, 0, 0);\r\n  }\r\n  .page-header h1 small {\r\n    display: block;\r\n    line-height: 20px;\r\n  }\r\n  input[type=\"checkbox\"],\r\n  input[type=\"radio\"] {\r\n    border: 1px solid #ccc;\r\n  }\r\n  .form-horizontal .control-label {\r\n    float: none;\r\n    width: auto;\r\n    padding-top: 0;\r\n    text-align: left;\r\n  }\r\n  .form-horizontal .controls {\r\n    margin-left: 0;\r\n  }\r\n  .form-horizontal .control-list {\r\n    padding-top: 0;\r\n  }\r\n  .form-horizontal .form-actions {\r\n    padding-right: 10px;\r\n    padding-left: 10px;\r\n  }\r\n  .media .pull-left,\r\n  .media .pull-right {\r\n    display: block;\r\n    float: none;\r\n    margin-bottom: 10px;\r\n  }\r\n  .media-object {\r\n    margin-right: 0;\r\n    margin-left: 0;\r\n  }\r\n  .modal {\r\n    top: 10px;\r\n    right: 10px;\r\n    left: 10px;\r\n  }\r\n  .modal-header .close {\r\n    padding: 10px;\r\n    margin: -10px;\r\n  }\r\n  .carousel-caption {\r\n    position: static;\r\n  }\r\n}\r\n\r\n@media (max-width: 979px) {\r\n  body {\r\n    padding-top: 0;\r\n  }\r\n  .navbar-fixed-top,\r\n  .navbar-fixed-bottom {\r\n    position: static;\r\n  }\r\n  .navbar-fixed-top {\r\n    margin-bottom: 20px;\r\n  }\r\n  .navbar-fixed-bottom {\r\n    margin-top: 20px;\r\n  }\r\n  .navbar-fixed-top .navbar-inner,\r\n  .navbar-fixed-bottom .navbar-inner {\r\n    padding: 5px;\r\n  }\r\n  .navbar .container {\r\n    width: auto;\r\n    padding: 0;\r\n  }\r\n  .navbar .brand {\r\n    padding-right: 10px;\r\n    padding-left: 10px;\r\n    margin: 0 0 0 -5px;\r\n  }\r\n  .nav-collapse {\r\n    clear: both;\r\n  }\r\n  .nav-collapse .nav {\r\n    float: none;\r\n    margin: 0 0 10px;\r\n  }\r\n  .nav-collapse .nav > li {\r\n    float: none;\r\n  }\r\n  .nav-collapse .nav > li > a {\r\n    margin-bottom: 2px;\r\n  }\r\n  .nav-collapse .nav > .divider-vertical {\r\n    display: none;\r\n  }\r\n  .nav-collapse .nav .nav-header {\r\n    color: #777777;\r\n    text-shadow: none;\r\n  }\r\n  .nav-collapse .nav > li > a,\r\n  .nav-collapse .dropdown-menu a {\r\n    padding: 9px 15px;\r\n    font-weight: bold;\r\n    color: #777777;\r\n    -webkit-border-radius: 3px;\r\n       -moz-border-radius: 3px;\r\n            border-radius: 3px;\r\n  }\r\n  .nav-collapse .btn {\r\n    padding: 4px 10px 4px;\r\n    font-weight: normal;\r\n    -webkit-border-radius: 4px;\r\n       -moz-border-radius: 4px;\r\n            border-radius: 4px;\r\n  }\r\n  .nav-collapse .dropdown-menu li + li a {\r\n    margin-bottom: 2px;\r\n  }\r\n  .nav-collapse .nav > li > a:hover,\r\n  .nav-collapse .nav > li > a:focus,\r\n  .nav-collapse .dropdown-menu a:hover,\r\n  .nav-collapse .dropdown-menu a:focus {\r\n    background-color: #f2f2f2;\r\n  }\r\n  .navbar-inverse .nav-collapse .nav > li > a,\r\n  .navbar-inverse .nav-collapse .dropdown-menu a {\r\n    color: #999999;\r\n  }\r\n  .navbar-inverse .nav-collapse .nav > li > a:hover,\r\n  .navbar-inverse .nav-collapse .nav > li > a:focus,\r\n  .navbar-inverse .nav-collapse .dropdown-menu a:hover,\r\n  .navbar-inverse .nav-collapse .dropdown-menu a:focus {\r\n    background-color: #111111;\r\n  }\r\n  .nav-collapse.in .btn-group {\r\n    padding: 0;\r\n    margin-top: 5px;\r\n  }\r\n  .nav-collapse .dropdown-menu {\r\n    position: static;\r\n    top: auto;\r\n    left: auto;\r\n    display: none;\r\n    float: none;\r\n    max-width: none;\r\n    padding: 0;\r\n    margin: 0 15px;\r\n    background-color: transparent;\r\n    border: none;\r\n    -webkit-border-radius: 0;\r\n       -moz-border-radius: 0;\r\n            border-radius: 0;\r\n    -webkit-box-shadow: none;\r\n       -moz-box-shadow: none;\r\n            box-shadow: none;\r\n  }\r\n  .nav-collapse .open > .dropdown-menu {\r\n    display: block;\r\n  }\r\n  .nav-collapse .dropdown-menu:before,\r\n  .nav-collapse .dropdown-menu:after {\r\n    display: none;\r\n  }\r\n  .nav-collapse .dropdown-menu .divider {\r\n    display: none;\r\n  }\r\n  .nav-collapse .nav > li > .dropdown-menu:before,\r\n  .nav-collapse .nav > li > .dropdown-menu:after {\r\n    display: none;\r\n  }\r\n  .nav-collapse .navbar-form,\r\n  .nav-collapse .navbar-search {\r\n    float: none;\r\n    padding: 10px 15px;\r\n    margin: 10px 0;\r\n    border-top: 1px solid #f2f2f2;\r\n    border-bottom: 1px solid #f2f2f2;\r\n    -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1);\r\n       -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1);\r\n            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1);\r\n  }\r\n  .navbar-inverse .nav-collapse .navbar-form,\r\n  .navbar-inverse .nav-collapse .navbar-search {\r\n    border-top-color: #111111;\r\n    border-bottom-color: #111111;\r\n  }\r\n  .navbar .nav-collapse .nav.pull-right {\r\n    float: none;\r\n    margin-left: 0;\r\n  }\r\n  .nav-collapse,\r\n  .nav-collapse.collapse {\r\n    height: 0;\r\n    overflow: hidden;\r\n  }\r\n  .navbar .btn-navbar {\r\n    display: block;\r\n  }\r\n  .navbar-static .navbar-inner {\r\n    padding-right: 10px;\r\n    padding-left: 10px;\r\n  }\r\n}\r\n\r\n@media (min-width: 980px) {\r\n  .nav-collapse.collapse {\r\n    height: auto !important;\r\n    overflow: visible !important;\r\n  }\r\n}\r\n"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.REST.SocialMedia/AccountManagement.EntryPoint/vendor/css/bootstrap.css",
    "content": "/*!\r\n * Bootstrap v2.3.1\r\n *\r\n * Copyright 2012 Twitter, Inc\r\n * Licensed under the Apache License v2.0\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Designed and built with all the love in the world @twitter by @mdo and @fat.\r\n */\r\n\r\n.clearfix {\r\n  *zoom: 1;\r\n}\r\n\r\n.clearfix:before,\r\n.clearfix:after {\r\n  display: table;\r\n  line-height: 0;\r\n  content: \"\";\r\n}\r\n\r\n.clearfix:after {\r\n  clear: both;\r\n}\r\n\r\n.hide-text {\r\n  font: 0/0 a;\r\n  color: transparent;\r\n  text-shadow: none;\r\n  background-color: transparent;\r\n  border: 0;\r\n}\r\n\r\n.input-block-level {\r\n  display: block;\r\n  width: 100%;\r\n  min-height: 30px;\r\n  -webkit-box-sizing: border-box;\r\n     -moz-box-sizing: border-box;\r\n          box-sizing: border-box;\r\n}\r\n\r\narticle,\r\naside,\r\ndetails,\r\nfigcaption,\r\nfigure,\r\nfooter,\r\nheader,\r\nhgroup,\r\nnav,\r\nsection {\r\n  display: block;\r\n}\r\n\r\naudio,\r\ncanvas,\r\nvideo {\r\n  display: inline-block;\r\n  *display: inline;\r\n  *zoom: 1;\r\n}\r\n\r\naudio:not([controls]) {\r\n  display: none;\r\n}\r\n\r\nhtml {\r\n  font-size: 100%;\r\n  -webkit-text-size-adjust: 100%;\r\n      -ms-text-size-adjust: 100%;\r\n}\r\n\r\na:focus {\r\n  outline: thin dotted #333;\r\n  outline: 5px auto -webkit-focus-ring-color;\r\n  outline-offset: -2px;\r\n}\r\n\r\na:hover,\r\na:active {\r\n  outline: 0;\r\n}\r\n\r\nsub,\r\nsup {\r\n  position: relative;\r\n  font-size: 75%;\r\n  line-height: 0;\r\n  vertical-align: baseline;\r\n}\r\n\r\nsup {\r\n  top: -0.5em;\r\n}\r\n\r\nsub {\r\n  bottom: -0.25em;\r\n}\r\n\r\nimg {\r\n  width: auto\\9;\r\n  height: auto;\r\n  max-width: 100%;\r\n  vertical-align: middle;\r\n  border: 0;\r\n  -ms-interpolation-mode: bicubic;\r\n}\r\n\r\n#map_canvas img,\r\n.google-maps img {\r\n  max-width: none;\r\n}\r\n\r\nbutton,\r\ninput,\r\nselect,\r\ntextarea {\r\n  margin: 0;\r\n  font-size: 100%;\r\n  vertical-align: middle;\r\n}\r\n\r\nbutton,\r\ninput {\r\n  *overflow: visible;\r\n  line-height: normal;\r\n}\r\n\r\nbutton::-moz-focus-inner,\r\ninput::-moz-focus-inner {\r\n  padding: 0;\r\n  border: 0;\r\n}\r\n\r\nbutton,\r\nhtml input[type=\"button\"],\r\ninput[type=\"reset\"],\r\ninput[type=\"submit\"] {\r\n  cursor: pointer;\r\n  -webkit-appearance: button;\r\n}\r\n\r\nlabel,\r\nselect,\r\nbutton,\r\ninput[type=\"button\"],\r\ninput[type=\"reset\"],\r\ninput[type=\"submit\"],\r\ninput[type=\"radio\"],\r\ninput[type=\"checkbox\"] {\r\n  cursor: pointer;\r\n}\r\n\r\ninput[type=\"search\"] {\r\n  -webkit-box-sizing: content-box;\r\n     -moz-box-sizing: content-box;\r\n          box-sizing: content-box;\r\n  -webkit-appearance: textfield;\r\n}\r\n\r\ninput[type=\"search\"]::-webkit-search-decoration,\r\ninput[type=\"search\"]::-webkit-search-cancel-button {\r\n  -webkit-appearance: none;\r\n}\r\n\r\ntextarea {\r\n  overflow: auto;\r\n  vertical-align: top;\r\n}\r\n\r\n@media print {\r\n  * {\r\n    color: #000 !important;\r\n    text-shadow: none !important;\r\n    background: transparent !important;\r\n    box-shadow: none !important;\r\n  }\r\n  a,\r\n  a:visited {\r\n    text-decoration: underline;\r\n  }\r\n  a[href]:after {\r\n    content: \" (\" attr(href) \")\";\r\n  }\r\n  abbr[title]:after {\r\n    content: \" (\" attr(title) \")\";\r\n  }\r\n  .ir a:after,\r\n  a[href^=\"javascript:\"]:after,\r\n  a[href^=\"#\"]:after {\r\n    content: \"\";\r\n  }\r\n  pre,\r\n  blockquote {\r\n    border: 1px solid #999;\r\n    page-break-inside: avoid;\r\n  }\r\n  thead {\r\n    display: table-header-group;\r\n  }\r\n  tr,\r\n  img {\r\n    page-break-inside: avoid;\r\n  }\r\n  img {\r\n    max-width: 100% !important;\r\n  }\r\n  @page  {\r\n    margin: 0.5cm;\r\n  }\r\n  p,\r\n  h2,\r\n  h3 {\r\n    orphans: 3;\r\n    widows: 3;\r\n  }\r\n  h2,\r\n  h3 {\r\n    page-break-after: avoid;\r\n  }\r\n}\r\n\r\nbody {\r\n  margin: 0;\r\n  font-family: \"Helvetica Neue\", Helvetica, Arial, sans-serif;\r\n  font-size: 14px;\r\n  line-height: 20px;\r\n  color: #333333;\r\n  background-color: #ffffff;\r\n}\r\n\r\na {\r\n  color: #0088cc;\r\n  text-decoration: none;\r\n}\r\n\r\na:hover,\r\na:focus {\r\n  color: #005580;\r\n  text-decoration: underline;\r\n}\r\n\r\n.img-rounded {\r\n  -webkit-border-radius: 6px;\r\n     -moz-border-radius: 6px;\r\n          border-radius: 6px;\r\n}\r\n\r\n.img-polaroid {\r\n  padding: 4px;\r\n  background-color: #fff;\r\n  border: 1px solid #ccc;\r\n  border: 1px solid rgba(0, 0, 0, 0.2);\r\n  -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);\r\n     -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);\r\n          box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);\r\n}\r\n\r\n.img-circle {\r\n  -webkit-border-radius: 500px;\r\n     -moz-border-radius: 500px;\r\n          border-radius: 500px;\r\n}\r\n\r\n.row {\r\n  margin-left: -20px;\r\n  *zoom: 1;\r\n}\r\n\r\n.row:before,\r\n.row:after {\r\n  display: table;\r\n  line-height: 0;\r\n  content: \"\";\r\n}\r\n\r\n.row:after {\r\n  clear: both;\r\n}\r\n\r\n[class*=\"span\"] {\r\n  float: left;\r\n  min-height: 1px;\r\n  margin-left: 20px;\r\n}\r\n\r\n.container,\r\n.navbar-static-top .container,\r\n.navbar-fixed-top .container,\r\n.navbar-fixed-bottom .container {\r\n  width: 940px;\r\n}\r\n\r\n.span12 {\r\n  width: 940px;\r\n}\r\n\r\n.span11 {\r\n  width: 860px;\r\n}\r\n\r\n.span10 {\r\n  width: 780px;\r\n}\r\n\r\n.span9 {\r\n  width: 700px;\r\n}\r\n\r\n.span8 {\r\n  width: 620px;\r\n}\r\n\r\n.span7 {\r\n  width: 540px;\r\n}\r\n\r\n.span6 {\r\n  width: 460px;\r\n}\r\n\r\n.span5 {\r\n  width: 380px;\r\n}\r\n\r\n.span4 {\r\n  width: 300px;\r\n}\r\n\r\n.span3 {\r\n  width: 220px;\r\n}\r\n\r\n.span2 {\r\n  width: 140px;\r\n}\r\n\r\n.span1 {\r\n  width: 60px;\r\n}\r\n\r\n.offset12 {\r\n  margin-left: 980px;\r\n}\r\n\r\n.offset11 {\r\n  margin-left: 900px;\r\n}\r\n\r\n.offset10 {\r\n  margin-left: 820px;\r\n}\r\n\r\n.offset9 {\r\n  margin-left: 740px;\r\n}\r\n\r\n.offset8 {\r\n  margin-left: 660px;\r\n}\r\n\r\n.offset7 {\r\n  margin-left: 580px;\r\n}\r\n\r\n.offset6 {\r\n  margin-left: 500px;\r\n}\r\n\r\n.offset5 {\r\n  margin-left: 420px;\r\n}\r\n\r\n.offset4 {\r\n  margin-left: 340px;\r\n}\r\n\r\n.offset3 {\r\n  margin-left: 260px;\r\n}\r\n\r\n.offset2 {\r\n  margin-left: 180px;\r\n}\r\n\r\n.offset1 {\r\n  margin-left: 100px;\r\n}\r\n\r\n.row-fluid {\r\n  width: 100%;\r\n  *zoom: 1;\r\n}\r\n\r\n.row-fluid:before,\r\n.row-fluid:after {\r\n  display: table;\r\n  line-height: 0;\r\n  content: \"\";\r\n}\r\n\r\n.row-fluid:after {\r\n  clear: both;\r\n}\r\n\r\n.row-fluid [class*=\"span\"] {\r\n  display: block;\r\n  float: left;\r\n  width: 100%;\r\n  min-height: 30px;\r\n  margin-left: 2.127659574468085%;\r\n  *margin-left: 2.074468085106383%;\r\n  -webkit-box-sizing: border-box;\r\n     -moz-box-sizing: border-box;\r\n          box-sizing: border-box;\r\n}\r\n\r\n.row-fluid [class*=\"span\"]:first-child {\r\n  margin-left: 0;\r\n}\r\n\r\n.row-fluid .controls-row [class*=\"span\"] + [class*=\"span\"] {\r\n  margin-left: 2.127659574468085%;\r\n}\r\n\r\n.row-fluid .span12 {\r\n  width: 100%;\r\n  *width: 99.94680851063829%;\r\n}\r\n\r\n.row-fluid .span11 {\r\n  width: 91.48936170212765%;\r\n  *width: 91.43617021276594%;\r\n}\r\n\r\n.row-fluid .span10 {\r\n  width: 82.97872340425532%;\r\n  *width: 82.92553191489361%;\r\n}\r\n\r\n.row-fluid .span9 {\r\n  width: 74.46808510638297%;\r\n  *width: 74.41489361702126%;\r\n}\r\n\r\n.row-fluid .span8 {\r\n  width: 65.95744680851064%;\r\n  *width: 65.90425531914893%;\r\n}\r\n\r\n.row-fluid .span7 {\r\n  width: 57.44680851063829%;\r\n  *width: 57.39361702127659%;\r\n}\r\n\r\n.row-fluid .span6 {\r\n  width: 48.93617021276595%;\r\n  *width: 48.88297872340425%;\r\n}\r\n\r\n.row-fluid .span5 {\r\n  width: 40.42553191489362%;\r\n  *width: 40.37234042553192%;\r\n}\r\n\r\n.row-fluid .span4 {\r\n  width: 31.914893617021278%;\r\n  *width: 31.861702127659576%;\r\n}\r\n\r\n.row-fluid .span3 {\r\n  width: 23.404255319148934%;\r\n  *width: 23.351063829787233%;\r\n}\r\n\r\n.row-fluid .span2 {\r\n  width: 14.893617021276595%;\r\n  *width: 14.840425531914894%;\r\n}\r\n\r\n.row-fluid .span1 {\r\n  width: 6.382978723404255%;\r\n  *width: 6.329787234042553%;\r\n}\r\n\r\n.row-fluid .offset12 {\r\n  margin-left: 104.25531914893617%;\r\n  *margin-left: 104.14893617021275%;\r\n}\r\n\r\n.row-fluid .offset12:first-child {\r\n  margin-left: 102.12765957446808%;\r\n  *margin-left: 102.02127659574467%;\r\n}\r\n\r\n.row-fluid .offset11 {\r\n  margin-left: 95.74468085106382%;\r\n  *margin-left: 95.6382978723404%;\r\n}\r\n\r\n.row-fluid .offset11:first-child {\r\n  margin-left: 93.61702127659574%;\r\n  *margin-left: 93.51063829787232%;\r\n}\r\n\r\n.row-fluid .offset10 {\r\n  margin-left: 87.23404255319149%;\r\n  *margin-left: 87.12765957446807%;\r\n}\r\n\r\n.row-fluid .offset10:first-child {\r\n  margin-left: 85.1063829787234%;\r\n  *margin-left: 84.99999999999999%;\r\n}\r\n\r\n.row-fluid .offset9 {\r\n  margin-left: 78.72340425531914%;\r\n  *margin-left: 78.61702127659572%;\r\n}\r\n\r\n.row-fluid .offset9:first-child {\r\n  margin-left: 76.59574468085106%;\r\n  *margin-left: 76.48936170212764%;\r\n}\r\n\r\n.row-fluid .offset8 {\r\n  margin-left: 70.2127659574468%;\r\n  *margin-left: 70.10638297872339%;\r\n}\r\n\r\n.row-fluid .offset8:first-child {\r\n  margin-left: 68.08510638297872%;\r\n  *margin-left: 67.9787234042553%;\r\n}\r\n\r\n.row-fluid .offset7 {\r\n  margin-left: 61.70212765957446%;\r\n  *margin-left: 61.59574468085106%;\r\n}\r\n\r\n.row-fluid .offset7:first-child {\r\n  margin-left: 59.574468085106375%;\r\n  *margin-left: 59.46808510638297%;\r\n}\r\n\r\n.row-fluid .offset6 {\r\n  margin-left: 53.191489361702125%;\r\n  *margin-left: 53.085106382978715%;\r\n}\r\n\r\n.row-fluid .offset6:first-child {\r\n  margin-left: 51.063829787234035%;\r\n  *margin-left: 50.95744680851063%;\r\n}\r\n\r\n.row-fluid .offset5 {\r\n  margin-left: 44.68085106382979%;\r\n  *margin-left: 44.57446808510638%;\r\n}\r\n\r\n.row-fluid .offset5:first-child {\r\n  margin-left: 42.5531914893617%;\r\n  *margin-left: 42.4468085106383%;\r\n}\r\n\r\n.row-fluid .offset4 {\r\n  margin-left: 36.170212765957444%;\r\n  *margin-left: 36.06382978723405%;\r\n}\r\n\r\n.row-fluid .offset4:first-child {\r\n  margin-left: 34.04255319148936%;\r\n  *margin-left: 33.93617021276596%;\r\n}\r\n\r\n.row-fluid .offset3 {\r\n  margin-left: 27.659574468085104%;\r\n  *margin-left: 27.5531914893617%;\r\n}\r\n\r\n.row-fluid .offset3:first-child {\r\n  margin-left: 25.53191489361702%;\r\n  *margin-left: 25.425531914893618%;\r\n}\r\n\r\n.row-fluid .offset2 {\r\n  margin-left: 19.148936170212764%;\r\n  *margin-left: 19.04255319148936%;\r\n}\r\n\r\n.row-fluid .offset2:first-child {\r\n  margin-left: 17.02127659574468%;\r\n  *margin-left: 16.914893617021278%;\r\n}\r\n\r\n.row-fluid .offset1 {\r\n  margin-left: 10.638297872340425%;\r\n  *margin-left: 10.53191489361702%;\r\n}\r\n\r\n.row-fluid .offset1:first-child {\r\n  margin-left: 8.51063829787234%;\r\n  *margin-left: 8.404255319148938%;\r\n}\r\n\r\n[class*=\"span\"].hide,\r\n.row-fluid [class*=\"span\"].hide {\r\n  display: none;\r\n}\r\n\r\n[class*=\"span\"].pull-right,\r\n.row-fluid [class*=\"span\"].pull-right {\r\n  float: right;\r\n}\r\n\r\n.container {\r\n  margin-right: auto;\r\n  margin-left: auto;\r\n  *zoom: 1;\r\n}\r\n\r\n.container:before,\r\n.container:after {\r\n  display: table;\r\n  line-height: 0;\r\n  content: \"\";\r\n}\r\n\r\n.container:after {\r\n  clear: both;\r\n}\r\n\r\n.container-fluid {\r\n  padding-right: 20px;\r\n  padding-left: 20px;\r\n  *zoom: 1;\r\n}\r\n\r\n.container-fluid:before,\r\n.container-fluid:after {\r\n  display: table;\r\n  line-height: 0;\r\n  content: \"\";\r\n}\r\n\r\n.container-fluid:after {\r\n  clear: both;\r\n}\r\n\r\np {\r\n  margin: 0 0 10px;\r\n}\r\n\r\n.lead {\r\n  margin-bottom: 20px;\r\n  font-size: 21px;\r\n  font-weight: 200;\r\n  line-height: 30px;\r\n}\r\n\r\nsmall {\r\n  font-size: 85%;\r\n}\r\n\r\nstrong {\r\n  font-weight: bold;\r\n}\r\n\r\nem {\r\n  font-style: italic;\r\n}\r\n\r\ncite {\r\n  font-style: normal;\r\n}\r\n\r\n.muted {\r\n  color: #999999;\r\n}\r\n\r\na.muted:hover,\r\na.muted:focus {\r\n  color: #808080;\r\n}\r\n\r\n.text-warning {\r\n  color: #c09853;\r\n}\r\n\r\na.text-warning:hover,\r\na.text-warning:focus {\r\n  color: #a47e3c;\r\n}\r\n\r\n.text-error {\r\n  color: #b94a48;\r\n}\r\n\r\na.text-error:hover,\r\na.text-error:focus {\r\n  color: #953b39;\r\n}\r\n\r\n.text-info {\r\n  color: #3a87ad;\r\n}\r\n\r\na.text-info:hover,\r\na.text-info:focus {\r\n  color: #2d6987;\r\n}\r\n\r\n.text-success {\r\n  color: #468847;\r\n}\r\n\r\na.text-success:hover,\r\na.text-success:focus {\r\n  color: #356635;\r\n}\r\n\r\n.text-left {\r\n  text-align: left;\r\n}\r\n\r\n.text-right {\r\n  text-align: right;\r\n}\r\n\r\n.text-center {\r\n  text-align: center;\r\n}\r\n\r\nh1,\r\nh2,\r\nh3,\r\nh4,\r\nh5,\r\nh6 {\r\n  margin: 10px 0;\r\n  font-family: inherit;\r\n  font-weight: bold;\r\n  line-height: 20px;\r\n  color: inherit;\r\n  text-rendering: optimizelegibility;\r\n}\r\n\r\nh1 small,\r\nh2 small,\r\nh3 small,\r\nh4 small,\r\nh5 small,\r\nh6 small {\r\n  font-weight: normal;\r\n  line-height: 1;\r\n  color: #999999;\r\n}\r\n\r\nh1,\r\nh2,\r\nh3 {\r\n  line-height: 40px;\r\n}\r\n\r\nh1 {\r\n  font-size: 38.5px;\r\n}\r\n\r\nh2 {\r\n  font-size: 31.5px;\r\n}\r\n\r\nh3 {\r\n  font-size: 24.5px;\r\n}\r\n\r\nh4 {\r\n  font-size: 17.5px;\r\n}\r\n\r\nh5 {\r\n  font-size: 14px;\r\n}\r\n\r\nh6 {\r\n  font-size: 11.9px;\r\n}\r\n\r\nh1 small {\r\n  font-size: 24.5px;\r\n}\r\n\r\nh2 small {\r\n  font-size: 17.5px;\r\n}\r\n\r\nh3 small {\r\n  font-size: 14px;\r\n}\r\n\r\nh4 small {\r\n  font-size: 14px;\r\n}\r\n\r\n.page-header {\r\n  padding-bottom: 9px;\r\n  margin: 20px 0 30px;\r\n  border-bottom: 1px solid #eeeeee;\r\n}\r\n\r\nul,\r\nol {\r\n  padding: 0;\r\n  margin: 0 0 10px 25px;\r\n}\r\n\r\nul ul,\r\nul ol,\r\nol ol,\r\nol ul {\r\n  margin-bottom: 0;\r\n}\r\n\r\nli {\r\n  line-height: 20px;\r\n}\r\n\r\nul.unstyled,\r\nol.unstyled {\r\n  margin-left: 0;\r\n  list-style: none;\r\n}\r\n\r\nul.inline,\r\nol.inline {\r\n  margin-left: 0;\r\n  list-style: none;\r\n}\r\n\r\nul.inline > li,\r\nol.inline > li {\r\n  display: inline-block;\r\n  *display: inline;\r\n  padding-right: 5px;\r\n  padding-left: 5px;\r\n  *zoom: 1;\r\n}\r\n\r\ndl {\r\n  margin-bottom: 20px;\r\n}\r\n\r\ndt,\r\ndd {\r\n  line-height: 20px;\r\n}\r\n\r\ndt {\r\n  font-weight: bold;\r\n}\r\n\r\ndd {\r\n  margin-left: 10px;\r\n}\r\n\r\n.dl-horizontal {\r\n  *zoom: 1;\r\n}\r\n\r\n.dl-horizontal:before,\r\n.dl-horizontal:after {\r\n  display: table;\r\n  line-height: 0;\r\n  content: \"\";\r\n}\r\n\r\n.dl-horizontal:after {\r\n  clear: both;\r\n}\r\n\r\n.dl-horizontal dt {\r\n  float: left;\r\n  width: 160px;\r\n  overflow: hidden;\r\n  clear: left;\r\n  text-align: right;\r\n  text-overflow: ellipsis;\r\n  white-space: nowrap;\r\n}\r\n\r\n.dl-horizontal dd {\r\n  margin-left: 180px;\r\n}\r\n\r\nhr {\r\n  margin: 20px 0;\r\n  border: 0;\r\n  border-top: 1px solid #eeeeee;\r\n  border-bottom: 1px solid #ffffff;\r\n}\r\n\r\nabbr[title],\r\nabbr[data-original-title] {\r\n  cursor: help;\r\n  border-bottom: 1px dotted #999999;\r\n}\r\n\r\nabbr.initialism {\r\n  font-size: 90%;\r\n  text-transform: uppercase;\r\n}\r\n\r\nblockquote {\r\n  padding: 0 0 0 15px;\r\n  margin: 0 0 20px;\r\n  border-left: 5px solid #eeeeee;\r\n}\r\n\r\nblockquote p {\r\n  margin-bottom: 0;\r\n  font-size: 17.5px;\r\n  font-weight: 300;\r\n  line-height: 1.25;\r\n}\r\n\r\nblockquote small {\r\n  display: block;\r\n  line-height: 20px;\r\n  color: #999999;\r\n}\r\n\r\nblockquote small:before {\r\n  content: '\\2014 \\00A0';\r\n}\r\n\r\nblockquote.pull-right {\r\n  float: right;\r\n  padding-right: 15px;\r\n  padding-left: 0;\r\n  border-right: 5px solid #eeeeee;\r\n  border-left: 0;\r\n}\r\n\r\nblockquote.pull-right p,\r\nblockquote.pull-right small {\r\n  text-align: right;\r\n}\r\n\r\nblockquote.pull-right small:before {\r\n  content: '';\r\n}\r\n\r\nblockquote.pull-right small:after {\r\n  content: '\\00A0 \\2014';\r\n}\r\n\r\nq:before,\r\nq:after,\r\nblockquote:before,\r\nblockquote:after {\r\n  content: \"\";\r\n}\r\n\r\naddress {\r\n  display: block;\r\n  margin-bottom: 20px;\r\n  font-style: normal;\r\n  line-height: 20px;\r\n}\r\n\r\ncode,\r\npre {\r\n  padding: 0 3px 2px;\r\n  font-family: Monaco, Menlo, Consolas, \"Courier New\", monospace;\r\n  font-size: 12px;\r\n  color: #333333;\r\n  -webkit-border-radius: 3px;\r\n     -moz-border-radius: 3px;\r\n          border-radius: 3px;\r\n}\r\n\r\ncode {\r\n  padding: 2px 4px;\r\n  color: #d14;\r\n  white-space: nowrap;\r\n  background-color: #f7f7f9;\r\n  border: 1px solid #e1e1e8;\r\n}\r\n\r\npre {\r\n  display: block;\r\n  padding: 9.5px;\r\n  margin: 0 0 10px;\r\n  font-size: 13px;\r\n  line-height: 20px;\r\n  word-break: break-all;\r\n  word-wrap: break-word;\r\n  white-space: pre;\r\n  white-space: pre-wrap;\r\n  background-color: #f5f5f5;\r\n  border: 1px solid #ccc;\r\n  border: 1px solid rgba(0, 0, 0, 0.15);\r\n  -webkit-border-radius: 4px;\r\n     -moz-border-radius: 4px;\r\n          border-radius: 4px;\r\n}\r\n\r\npre.prettyprint {\r\n  margin-bottom: 20px;\r\n}\r\n\r\npre code {\r\n  padding: 0;\r\n  color: inherit;\r\n  white-space: pre;\r\n  white-space: pre-wrap;\r\n  background-color: transparent;\r\n  border: 0;\r\n}\r\n\r\n.pre-scrollable {\r\n  max-height: 340px;\r\n  overflow-y: scroll;\r\n}\r\n\r\nform {\r\n  margin: 0 0 20px;\r\n}\r\n\r\nfieldset {\r\n  padding: 0;\r\n  margin: 0;\r\n  border: 0;\r\n}\r\n\r\nlegend {\r\n  display: block;\r\n  width: 100%;\r\n  padding: 0;\r\n  margin-bottom: 20px;\r\n  font-size: 21px;\r\n  line-height: 40px;\r\n  color: #333333;\r\n  border: 0;\r\n  border-bottom: 1px solid #e5e5e5;\r\n}\r\n\r\nlegend small {\r\n  font-size: 15px;\r\n  color: #999999;\r\n}\r\n\r\nlabel,\r\ninput,\r\nbutton,\r\nselect,\r\ntextarea {\r\n  font-size: 14px;\r\n  font-weight: normal;\r\n  line-height: 20px;\r\n}\r\n\r\ninput,\r\nbutton,\r\nselect,\r\ntextarea {\r\n  font-family: \"Helvetica Neue\", Helvetica, Arial, sans-serif;\r\n}\r\n\r\nlabel {\r\n  display: block;\r\n  margin-bottom: 5px;\r\n}\r\n\r\nselect,\r\ntextarea,\r\ninput[type=\"text\"],\r\ninput[type=\"password\"],\r\ninput[type=\"datetime\"],\r\ninput[type=\"datetime-local\"],\r\ninput[type=\"date\"],\r\ninput[type=\"month\"],\r\ninput[type=\"time\"],\r\ninput[type=\"week\"],\r\ninput[type=\"number\"],\r\ninput[type=\"email\"],\r\ninput[type=\"url\"],\r\ninput[type=\"search\"],\r\ninput[type=\"tel\"],\r\ninput[type=\"color\"],\r\n.uneditable-input {\r\n  display: inline-block;\r\n  height: 20px;\r\n  padding: 4px 6px;\r\n  margin-bottom: 10px;\r\n  font-size: 14px;\r\n  line-height: 20px;\r\n  color: #555555;\r\n  vertical-align: middle;\r\n  -webkit-border-radius: 4px;\r\n     -moz-border-radius: 4px;\r\n          border-radius: 4px;\r\n}\r\n\r\ninput,\r\ntextarea,\r\n.uneditable-input {\r\n  width: 206px;\r\n}\r\n\r\ntextarea {\r\n  height: auto;\r\n}\r\n\r\ntextarea,\r\ninput[type=\"text\"],\r\ninput[type=\"password\"],\r\ninput[type=\"datetime\"],\r\ninput[type=\"datetime-local\"],\r\ninput[type=\"date\"],\r\ninput[type=\"month\"],\r\ninput[type=\"time\"],\r\ninput[type=\"week\"],\r\ninput[type=\"number\"],\r\ninput[type=\"email\"],\r\ninput[type=\"url\"],\r\ninput[type=\"search\"],\r\ninput[type=\"tel\"],\r\ninput[type=\"color\"],\r\n.uneditable-input {\r\n  background-color: #ffffff;\r\n  border: 1px solid #cccccc;\r\n  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\r\n     -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\r\n          box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\r\n  -webkit-transition: border linear 0.2s, box-shadow linear 0.2s;\r\n     -moz-transition: border linear 0.2s, box-shadow linear 0.2s;\r\n       -o-transition: border linear 0.2s, box-shadow linear 0.2s;\r\n          transition: border linear 0.2s, box-shadow linear 0.2s;\r\n}\r\n\r\ntextarea:focus,\r\ninput[type=\"text\"]:focus,\r\ninput[type=\"password\"]:focus,\r\ninput[type=\"datetime\"]:focus,\r\ninput[type=\"datetime-local\"]:focus,\r\ninput[type=\"date\"]:focus,\r\ninput[type=\"month\"]:focus,\r\ninput[type=\"time\"]:focus,\r\ninput[type=\"week\"]:focus,\r\ninput[type=\"number\"]:focus,\r\ninput[type=\"email\"]:focus,\r\ninput[type=\"url\"]:focus,\r\ninput[type=\"search\"]:focus,\r\ninput[type=\"tel\"]:focus,\r\ninput[type=\"color\"]:focus,\r\n.uneditable-input:focus {\r\n  border-color: rgba(82, 168, 236, 0.8);\r\n  outline: 0;\r\n  outline: thin dotted \\9;\r\n  /* IE6-9 */\r\n\r\n  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6);\r\n     -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6);\r\n          box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6);\r\n}\r\n\r\ninput[type=\"radio\"],\r\ninput[type=\"checkbox\"] {\r\n  margin: 4px 0 0;\r\n  margin-top: 1px \\9;\r\n  *margin-top: 0;\r\n  line-height: normal;\r\n}\r\n\r\ninput[type=\"file\"],\r\ninput[type=\"image\"],\r\ninput[type=\"submit\"],\r\ninput[type=\"reset\"],\r\ninput[type=\"button\"],\r\ninput[type=\"radio\"],\r\ninput[type=\"checkbox\"] {\r\n  width: auto;\r\n}\r\n\r\nselect,\r\ninput[type=\"file\"] {\r\n  height: 30px;\r\n  /* In IE7, the height of the select element cannot be changed by height, only font-size */\r\n\r\n  *margin-top: 4px;\r\n  /* For IE7, add top margin to align select with labels */\r\n\r\n  line-height: 30px;\r\n}\r\n\r\nselect {\r\n  width: 220px;\r\n  background-color: #ffffff;\r\n  border: 1px solid #cccccc;\r\n}\r\n\r\nselect[multiple],\r\nselect[size] {\r\n  height: auto;\r\n}\r\n\r\nselect:focus,\r\ninput[type=\"file\"]:focus,\r\ninput[type=\"radio\"]:focus,\r\ninput[type=\"checkbox\"]:focus {\r\n  outline: thin dotted #333;\r\n  outline: 5px auto -webkit-focus-ring-color;\r\n  outline-offset: -2px;\r\n}\r\n\r\n.uneditable-input,\r\n.uneditable-textarea {\r\n  color: #999999;\r\n  cursor: not-allowed;\r\n  background-color: #fcfcfc;\r\n  border-color: #cccccc;\r\n  -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025);\r\n     -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025);\r\n          box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025);\r\n}\r\n\r\n.uneditable-input {\r\n  overflow: hidden;\r\n  white-space: nowrap;\r\n}\r\n\r\n.uneditable-textarea {\r\n  width: auto;\r\n  height: auto;\r\n}\r\n\r\ninput:-moz-placeholder,\r\ntextarea:-moz-placeholder {\r\n  color: #999999;\r\n}\r\n\r\ninput:-ms-input-placeholder,\r\ntextarea:-ms-input-placeholder {\r\n  color: #999999;\r\n}\r\n\r\ninput::-webkit-input-placeholder,\r\ntextarea::-webkit-input-placeholder {\r\n  color: #999999;\r\n}\r\n\r\n.radio,\r\n.checkbox {\r\n  min-height: 20px;\r\n  padding-left: 20px;\r\n}\r\n\r\n.radio input[type=\"radio\"],\r\n.checkbox input[type=\"checkbox\"] {\r\n  float: left;\r\n  margin-left: -20px;\r\n}\r\n\r\n.controls > .radio:first-child,\r\n.controls > .checkbox:first-child {\r\n  padding-top: 5px;\r\n}\r\n\r\n.radio.inline,\r\n.checkbox.inline {\r\n  display: inline-block;\r\n  padding-top: 5px;\r\n  margin-bottom: 0;\r\n  vertical-align: middle;\r\n}\r\n\r\n.radio.inline + .radio.inline,\r\n.checkbox.inline + .checkbox.inline {\r\n  margin-left: 10px;\r\n}\r\n\r\n.input-mini {\r\n  width: 60px;\r\n}\r\n\r\n.input-small {\r\n  width: 90px;\r\n}\r\n\r\n.input-medium {\r\n  width: 150px;\r\n}\r\n\r\n.input-large {\r\n  width: 210px;\r\n}\r\n\r\n.input-xlarge {\r\n  width: 270px;\r\n}\r\n\r\n.input-xxlarge {\r\n  width: 530px;\r\n}\r\n\r\ninput[class*=\"span\"],\r\nselect[class*=\"span\"],\r\ntextarea[class*=\"span\"],\r\n.uneditable-input[class*=\"span\"],\r\n.row-fluid input[class*=\"span\"],\r\n.row-fluid select[class*=\"span\"],\r\n.row-fluid textarea[class*=\"span\"],\r\n.row-fluid .uneditable-input[class*=\"span\"] {\r\n  float: none;\r\n  margin-left: 0;\r\n}\r\n\r\n.input-append input[class*=\"span\"],\r\n.input-append .uneditable-input[class*=\"span\"],\r\n.input-prepend input[class*=\"span\"],\r\n.input-prepend .uneditable-input[class*=\"span\"],\r\n.row-fluid input[class*=\"span\"],\r\n.row-fluid select[class*=\"span\"],\r\n.row-fluid textarea[class*=\"span\"],\r\n.row-fluid .uneditable-input[class*=\"span\"],\r\n.row-fluid .input-prepend [class*=\"span\"],\r\n.row-fluid .input-append [class*=\"span\"] {\r\n  display: inline-block;\r\n}\r\n\r\ninput,\r\ntextarea,\r\n.uneditable-input {\r\n  margin-left: 0;\r\n}\r\n\r\n.controls-row [class*=\"span\"] + [class*=\"span\"] {\r\n  margin-left: 20px;\r\n}\r\n\r\ninput.span12,\r\ntextarea.span12,\r\n.uneditable-input.span12 {\r\n  width: 926px;\r\n}\r\n\r\ninput.span11,\r\ntextarea.span11,\r\n.uneditable-input.span11 {\r\n  width: 846px;\r\n}\r\n\r\ninput.span10,\r\ntextarea.span10,\r\n.uneditable-input.span10 {\r\n  width: 766px;\r\n}\r\n\r\ninput.span9,\r\ntextarea.span9,\r\n.uneditable-input.span9 {\r\n  width: 686px;\r\n}\r\n\r\ninput.span8,\r\ntextarea.span8,\r\n.uneditable-input.span8 {\r\n  width: 606px;\r\n}\r\n\r\ninput.span7,\r\ntextarea.span7,\r\n.uneditable-input.span7 {\r\n  width: 526px;\r\n}\r\n\r\ninput.span6,\r\ntextarea.span6,\r\n.uneditable-input.span6 {\r\n  width: 446px;\r\n}\r\n\r\ninput.span5,\r\ntextarea.span5,\r\n.uneditable-input.span5 {\r\n  width: 366px;\r\n}\r\n\r\ninput.span4,\r\ntextarea.span4,\r\n.uneditable-input.span4 {\r\n  width: 286px;\r\n}\r\n\r\ninput.span3,\r\ntextarea.span3,\r\n.uneditable-input.span3 {\r\n  width: 206px;\r\n}\r\n\r\ninput.span2,\r\ntextarea.span2,\r\n.uneditable-input.span2 {\r\n  width: 126px;\r\n}\r\n\r\ninput.span1,\r\ntextarea.span1,\r\n.uneditable-input.span1 {\r\n  width: 46px;\r\n}\r\n\r\n.controls-row {\r\n  *zoom: 1;\r\n}\r\n\r\n.controls-row:before,\r\n.controls-row:after {\r\n  display: table;\r\n  line-height: 0;\r\n  content: \"\";\r\n}\r\n\r\n.controls-row:after {\r\n  clear: both;\r\n}\r\n\r\n.controls-row [class*=\"span\"],\r\n.row-fluid .controls-row [class*=\"span\"] {\r\n  float: left;\r\n}\r\n\r\n.controls-row .checkbox[class*=\"span\"],\r\n.controls-row .radio[class*=\"span\"] {\r\n  padding-top: 5px;\r\n}\r\n\r\ninput[disabled],\r\nselect[disabled],\r\ntextarea[disabled],\r\ninput[readonly],\r\nselect[readonly],\r\ntextarea[readonly] {\r\n  cursor: not-allowed;\r\n  background-color: #eeeeee;\r\n}\r\n\r\ninput[type=\"radio\"][disabled],\r\ninput[type=\"checkbox\"][disabled],\r\ninput[type=\"radio\"][readonly],\r\ninput[type=\"checkbox\"][readonly] {\r\n  background-color: transparent;\r\n}\r\n\r\n.control-group.warning .control-label,\r\n.control-group.warning .help-block,\r\n.control-group.warning .help-inline {\r\n  color: #c09853;\r\n}\r\n\r\n.control-group.warning .checkbox,\r\n.control-group.warning .radio,\r\n.control-group.warning input,\r\n.control-group.warning select,\r\n.control-group.warning textarea {\r\n  color: #c09853;\r\n}\r\n\r\n.control-group.warning input,\r\n.control-group.warning select,\r\n.control-group.warning textarea {\r\n  border-color: #c09853;\r\n  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\r\n     -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\r\n          box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\r\n}\r\n\r\n.control-group.warning input:focus,\r\n.control-group.warning select:focus,\r\n.control-group.warning textarea:focus {\r\n  border-color: #a47e3c;\r\n  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e;\r\n     -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e;\r\n          box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e;\r\n}\r\n\r\n.control-group.warning .input-prepend .add-on,\r\n.control-group.warning .input-append .add-on {\r\n  color: #c09853;\r\n  background-color: #fcf8e3;\r\n  border-color: #c09853;\r\n}\r\n\r\n.control-group.error .control-label,\r\n.control-group.error .help-block,\r\n.control-group.error .help-inline {\r\n  color: #b94a48;\r\n}\r\n\r\n.control-group.error .checkbox,\r\n.control-group.error .radio,\r\n.control-group.error input,\r\n.control-group.error select,\r\n.control-group.error textarea {\r\n  color: #b94a48;\r\n}\r\n\r\n.control-group.error input,\r\n.control-group.error select,\r\n.control-group.error textarea {\r\n  border-color: #b94a48;\r\n  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\r\n     -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\r\n          box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\r\n}\r\n\r\n.control-group.error input:focus,\r\n.control-group.error select:focus,\r\n.control-group.error textarea:focus {\r\n  border-color: #953b39;\r\n  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392;\r\n     -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392;\r\n          box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392;\r\n}\r\n\r\n.control-group.error .input-prepend .add-on,\r\n.control-group.error .input-append .add-on {\r\n  color: #b94a48;\r\n  background-color: #f2dede;\r\n  border-color: #b94a48;\r\n}\r\n\r\n.control-group.success .control-label,\r\n.control-group.success .help-block,\r\n.control-group.success .help-inline {\r\n  color: #468847;\r\n}\r\n\r\n.control-group.success .checkbox,\r\n.control-group.success .radio,\r\n.control-group.success input,\r\n.control-group.success select,\r\n.control-group.success textarea {\r\n  color: #468847;\r\n}\r\n\r\n.control-group.success input,\r\n.control-group.success select,\r\n.control-group.success textarea {\r\n  border-color: #468847;\r\n  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\r\n     -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\r\n          box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\r\n}\r\n\r\n.control-group.success input:focus,\r\n.control-group.success select:focus,\r\n.control-group.success textarea:focus {\r\n  border-color: #356635;\r\n  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b;\r\n     -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b;\r\n          box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b;\r\n}\r\n\r\n.control-group.success .input-prepend .add-on,\r\n.control-group.success .input-append .add-on {\r\n  color: #468847;\r\n  background-color: #dff0d8;\r\n  border-color: #468847;\r\n}\r\n\r\n.control-group.info .control-label,\r\n.control-group.info .help-block,\r\n.control-group.info .help-inline {\r\n  color: #3a87ad;\r\n}\r\n\r\n.control-group.info .checkbox,\r\n.control-group.info .radio,\r\n.control-group.info input,\r\n.control-group.info select,\r\n.control-group.info textarea {\r\n  color: #3a87ad;\r\n}\r\n\r\n.control-group.info input,\r\n.control-group.info select,\r\n.control-group.info textarea {\r\n  border-color: #3a87ad;\r\n  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\r\n     -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\r\n          box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\r\n}\r\n\r\n.control-group.info input:focus,\r\n.control-group.info select:focus,\r\n.control-group.info textarea:focus {\r\n  border-color: #2d6987;\r\n  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7ab5d3;\r\n     -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7ab5d3;\r\n          box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7ab5d3;\r\n}\r\n\r\n.control-group.info .input-prepend .add-on,\r\n.control-group.info .input-append .add-on {\r\n  color: #3a87ad;\r\n  background-color: #d9edf7;\r\n  border-color: #3a87ad;\r\n}\r\n\r\ninput:focus:invalid,\r\ntextarea:focus:invalid,\r\nselect:focus:invalid {\r\n  color: #b94a48;\r\n  border-color: #ee5f5b;\r\n}\r\n\r\ninput:focus:invalid:focus,\r\ntextarea:focus:invalid:focus,\r\nselect:focus:invalid:focus {\r\n  border-color: #e9322d;\r\n  -webkit-box-shadow: 0 0 6px #f8b9b7;\r\n     -moz-box-shadow: 0 0 6px #f8b9b7;\r\n          box-shadow: 0 0 6px #f8b9b7;\r\n}\r\n\r\n.form-actions {\r\n  padding: 19px 20px 20px;\r\n  margin-top: 20px;\r\n  margin-bottom: 20px;\r\n  background-color: #f5f5f5;\r\n  border-top: 1px solid #e5e5e5;\r\n  *zoom: 1;\r\n}\r\n\r\n.form-actions:before,\r\n.form-actions:after {\r\n  display: table;\r\n  line-height: 0;\r\n  content: \"\";\r\n}\r\n\r\n.form-actions:after {\r\n  clear: both;\r\n}\r\n\r\n.help-block,\r\n.help-inline {\r\n  color: #595959;\r\n}\r\n\r\n.help-block {\r\n  display: block;\r\n  margin-bottom: 10px;\r\n}\r\n\r\n.help-inline {\r\n  display: inline-block;\r\n  *display: inline;\r\n  padding-left: 5px;\r\n  vertical-align: middle;\r\n  *zoom: 1;\r\n}\r\n\r\n.input-append,\r\n.input-prepend {\r\n  display: inline-block;\r\n  margin-bottom: 10px;\r\n  font-size: 0;\r\n  white-space: nowrap;\r\n  vertical-align: middle;\r\n}\r\n\r\n.input-append input,\r\n.input-prepend input,\r\n.input-append select,\r\n.input-prepend select,\r\n.input-append .uneditable-input,\r\n.input-prepend .uneditable-input,\r\n.input-append .dropdown-menu,\r\n.input-prepend .dropdown-menu,\r\n.input-append .popover,\r\n.input-prepend .popover {\r\n  font-size: 14px;\r\n}\r\n\r\n.input-append input,\r\n.input-prepend input,\r\n.input-append select,\r\n.input-prepend select,\r\n.input-append .uneditable-input,\r\n.input-prepend .uneditable-input {\r\n  position: relative;\r\n  margin-bottom: 0;\r\n  *margin-left: 0;\r\n  vertical-align: top;\r\n  -webkit-border-radius: 0 4px 4px 0;\r\n     -moz-border-radius: 0 4px 4px 0;\r\n          border-radius: 0 4px 4px 0;\r\n}\r\n\r\n.input-append input:focus,\r\n.input-prepend input:focus,\r\n.input-append select:focus,\r\n.input-prepend select:focus,\r\n.input-append .uneditable-input:focus,\r\n.input-prepend .uneditable-input:focus {\r\n  z-index: 2;\r\n}\r\n\r\n.input-append .add-on,\r\n.input-prepend .add-on {\r\n  display: inline-block;\r\n  width: auto;\r\n  height: 20px;\r\n  min-width: 16px;\r\n  padding: 4px 5px;\r\n  font-size: 14px;\r\n  font-weight: normal;\r\n  line-height: 20px;\r\n  text-align: center;\r\n  text-shadow: 0 1px 0 #ffffff;\r\n  background-color: #eeeeee;\r\n  border: 1px solid #ccc;\r\n}\r\n\r\n.input-append .add-on,\r\n.input-prepend .add-on,\r\n.input-append .btn,\r\n.input-prepend .btn,\r\n.input-append .btn-group > .dropdown-toggle,\r\n.input-prepend .btn-group > .dropdown-toggle {\r\n  vertical-align: top;\r\n  -webkit-border-radius: 0;\r\n     -moz-border-radius: 0;\r\n          border-radius: 0;\r\n}\r\n\r\n.input-append .active,\r\n.input-prepend .active {\r\n  background-color: #a9dba9;\r\n  border-color: #46a546;\r\n}\r\n\r\n.input-prepend .add-on,\r\n.input-prepend .btn {\r\n  margin-right: -1px;\r\n}\r\n\r\n.input-prepend .add-on:first-child,\r\n.input-prepend .btn:first-child {\r\n  -webkit-border-radius: 4px 0 0 4px;\r\n     -moz-border-radius: 4px 0 0 4px;\r\n          border-radius: 4px 0 0 4px;\r\n}\r\n\r\n.input-append input,\r\n.input-append select,\r\n.input-append .uneditable-input {\r\n  -webkit-border-radius: 4px 0 0 4px;\r\n     -moz-border-radius: 4px 0 0 4px;\r\n          border-radius: 4px 0 0 4px;\r\n}\r\n\r\n.input-append input + .btn-group .btn:last-child,\r\n.input-append select + .btn-group .btn:last-child,\r\n.input-append .uneditable-input + .btn-group .btn:last-child {\r\n  -webkit-border-radius: 0 4px 4px 0;\r\n     -moz-border-radius: 0 4px 4px 0;\r\n          border-radius: 0 4px 4px 0;\r\n}\r\n\r\n.input-append .add-on,\r\n.input-append .btn,\r\n.input-append .btn-group {\r\n  margin-left: -1px;\r\n}\r\n\r\n.input-append .add-on:last-child,\r\n.input-append .btn:last-child,\r\n.input-append .btn-group:last-child > .dropdown-toggle {\r\n  -webkit-border-radius: 0 4px 4px 0;\r\n     -moz-border-radius: 0 4px 4px 0;\r\n          border-radius: 0 4px 4px 0;\r\n}\r\n\r\n.input-prepend.input-append input,\r\n.input-prepend.input-append select,\r\n.input-prepend.input-append .uneditable-input {\r\n  -webkit-border-radius: 0;\r\n     -moz-border-radius: 0;\r\n          border-radius: 0;\r\n}\r\n\r\n.input-prepend.input-append input + .btn-group .btn,\r\n.input-prepend.input-append select + .btn-group .btn,\r\n.input-prepend.input-append .uneditable-input + .btn-group .btn {\r\n  -webkit-border-radius: 0 4px 4px 0;\r\n     -moz-border-radius: 0 4px 4px 0;\r\n          border-radius: 0 4px 4px 0;\r\n}\r\n\r\n.input-prepend.input-append .add-on:first-child,\r\n.input-prepend.input-append .btn:first-child {\r\n  margin-right: -1px;\r\n  -webkit-border-radius: 4px 0 0 4px;\r\n     -moz-border-radius: 4px 0 0 4px;\r\n          border-radius: 4px 0 0 4px;\r\n}\r\n\r\n.input-prepend.input-append .add-on:last-child,\r\n.input-prepend.input-append .btn:last-child {\r\n  margin-left: -1px;\r\n  -webkit-border-radius: 0 4px 4px 0;\r\n     -moz-border-radius: 0 4px 4px 0;\r\n          border-radius: 0 4px 4px 0;\r\n}\r\n\r\n.input-prepend.input-append .btn-group:first-child {\r\n  margin-left: 0;\r\n}\r\n\r\ninput.search-query {\r\n  padding-right: 14px;\r\n  padding-right: 4px \\9;\r\n  padding-left: 14px;\r\n  padding-left: 4px \\9;\r\n  /* IE7-8 doesn't have border-radius, so don't indent the padding */\r\n\r\n  margin-bottom: 0;\r\n  -webkit-border-radius: 15px;\r\n     -moz-border-radius: 15px;\r\n          border-radius: 15px;\r\n}\r\n\r\n/* Allow for input prepend/append in search forms */\r\n\r\n.form-search .input-append .search-query,\r\n.form-search .input-prepend .search-query {\r\n  -webkit-border-radius: 0;\r\n     -moz-border-radius: 0;\r\n          border-radius: 0;\r\n}\r\n\r\n.form-search .input-append .search-query {\r\n  -webkit-border-radius: 14px 0 0 14px;\r\n     -moz-border-radius: 14px 0 0 14px;\r\n          border-radius: 14px 0 0 14px;\r\n}\r\n\r\n.form-search .input-append .btn {\r\n  -webkit-border-radius: 0 14px 14px 0;\r\n     -moz-border-radius: 0 14px 14px 0;\r\n          border-radius: 0 14px 14px 0;\r\n}\r\n\r\n.form-search .input-prepend .search-query {\r\n  -webkit-border-radius: 0 14px 14px 0;\r\n     -moz-border-radius: 0 14px 14px 0;\r\n          border-radius: 0 14px 14px 0;\r\n}\r\n\r\n.form-search .input-prepend .btn {\r\n  -webkit-border-radius: 14px 0 0 14px;\r\n     -moz-border-radius: 14px 0 0 14px;\r\n          border-radius: 14px 0 0 14px;\r\n}\r\n\r\n.form-search input,\r\n.form-inline input,\r\n.form-horizontal input,\r\n.form-search textarea,\r\n.form-inline textarea,\r\n.form-horizontal textarea,\r\n.form-search select,\r\n.form-inline select,\r\n.form-horizontal select,\r\n.form-search .help-inline,\r\n.form-inline .help-inline,\r\n.form-horizontal .help-inline,\r\n.form-search .uneditable-input,\r\n.form-inline .uneditable-input,\r\n.form-horizontal .uneditable-input,\r\n.form-search .input-prepend,\r\n.form-inline .input-prepend,\r\n.form-horizontal .input-prepend,\r\n.form-search .input-append,\r\n.form-inline .input-append,\r\n.form-horizontal .input-append {\r\n  display: inline-block;\r\n  *display: inline;\r\n  margin-bottom: 0;\r\n  vertical-align: middle;\r\n  *zoom: 1;\r\n}\r\n\r\n.form-search .hide,\r\n.form-inline .hide,\r\n.form-horizontal .hide {\r\n  display: none;\r\n}\r\n\r\n.form-search label,\r\n.form-inline label,\r\n.form-search .btn-group,\r\n.form-inline .btn-group {\r\n  display: inline-block;\r\n}\r\n\r\n.form-search .input-append,\r\n.form-inline .input-append,\r\n.form-search .input-prepend,\r\n.form-inline .input-prepend {\r\n  margin-bottom: 0;\r\n}\r\n\r\n.form-search .radio,\r\n.form-search .checkbox,\r\n.form-inline .radio,\r\n.form-inline .checkbox {\r\n  padding-left: 0;\r\n  margin-bottom: 0;\r\n  vertical-align: middle;\r\n}\r\n\r\n.form-search .radio input[type=\"radio\"],\r\n.form-search .checkbox input[type=\"checkbox\"],\r\n.form-inline .radio input[type=\"radio\"],\r\n.form-inline .checkbox input[type=\"checkbox\"] {\r\n  float: left;\r\n  margin-right: 3px;\r\n  margin-left: 0;\r\n}\r\n\r\n.control-group {\r\n  margin-bottom: 10px;\r\n}\r\n\r\nlegend + .control-group {\r\n  margin-top: 20px;\r\n  -webkit-margin-top-collapse: separate;\r\n}\r\n\r\n.form-horizontal .control-group {\r\n  margin-bottom: 20px;\r\n  *zoom: 1;\r\n}\r\n\r\n.form-horizontal .control-group:before,\r\n.form-horizontal .control-group:after {\r\n  display: table;\r\n  line-height: 0;\r\n  content: \"\";\r\n}\r\n\r\n.form-horizontal .control-group:after {\r\n  clear: both;\r\n}\r\n\r\n.form-horizontal .control-label {\r\n  float: left;\r\n  width: 160px;\r\n  padding-top: 5px;\r\n  text-align: right;\r\n}\r\n\r\n.form-horizontal .controls {\r\n  *display: inline-block;\r\n  *padding-left: 20px;\r\n  margin-left: 180px;\r\n  *margin-left: 0;\r\n}\r\n\r\n.form-horizontal .controls:first-child {\r\n  *padding-left: 180px;\r\n}\r\n\r\n.form-horizontal .help-block {\r\n  margin-bottom: 0;\r\n}\r\n\r\n.form-horizontal input + .help-block,\r\n.form-horizontal select + .help-block,\r\n.form-horizontal textarea + .help-block,\r\n.form-horizontal .uneditable-input + .help-block,\r\n.form-horizontal .input-prepend + .help-block,\r\n.form-horizontal .input-append + .help-block {\r\n  margin-top: 10px;\r\n}\r\n\r\n.form-horizontal .form-actions {\r\n  padding-left: 180px;\r\n}\r\n\r\ntable {\r\n  max-width: 100%;\r\n  background-color: transparent;\r\n  border-collapse: collapse;\r\n  border-spacing: 0;\r\n}\r\n\r\n.table {\r\n  width: 100%;\r\n  margin-bottom: 20px;\r\n}\r\n\r\n.table th,\r\n.table td {\r\n  padding: 8px;\r\n  line-height: 20px;\r\n  text-align: left;\r\n  vertical-align: top;\r\n  border-top: 1px solid #dddddd;\r\n}\r\n\r\n.table th {\r\n  font-weight: bold;\r\n}\r\n\r\n.table thead th {\r\n  vertical-align: bottom;\r\n}\r\n\r\n.table caption + thead tr:first-child th,\r\n.table caption + thead tr:first-child td,\r\n.table colgroup + thead tr:first-child th,\r\n.table colgroup + thead tr:first-child td,\r\n.table thead:first-child tr:first-child th,\r\n.table thead:first-child tr:first-child td {\r\n  border-top: 0;\r\n}\r\n\r\n.table tbody + tbody {\r\n  border-top: 2px solid #dddddd;\r\n}\r\n\r\n.table .table {\r\n  background-color: #ffffff;\r\n}\r\n\r\n.table-condensed th,\r\n.table-condensed td {\r\n  padding: 4px 5px;\r\n}\r\n\r\n.table-bordered {\r\n  border: 1px solid #dddddd;\r\n  border-collapse: separate;\r\n  *border-collapse: collapse;\r\n  border-left: 0;\r\n  -webkit-border-radius: 4px;\r\n     -moz-border-radius: 4px;\r\n          border-radius: 4px;\r\n}\r\n\r\n.table-bordered th,\r\n.table-bordered td {\r\n  border-left: 1px solid #dddddd;\r\n}\r\n\r\n.table-bordered caption + thead tr:first-child th,\r\n.table-bordered caption + tbody tr:first-child th,\r\n.table-bordered caption + tbody tr:first-child td,\r\n.table-bordered colgroup + thead tr:first-child th,\r\n.table-bordered colgroup + tbody tr:first-child th,\r\n.table-bordered colgroup + tbody tr:first-child td,\r\n.table-bordered thead:first-child tr:first-child th,\r\n.table-bordered tbody:first-child tr:first-child th,\r\n.table-bordered tbody:first-child tr:first-child td {\r\n  border-top: 0;\r\n}\r\n\r\n.table-bordered thead:first-child tr:first-child > th:first-child,\r\n.table-bordered tbody:first-child tr:first-child > td:first-child,\r\n.table-bordered tbody:first-child tr:first-child > th:first-child {\r\n  -webkit-border-top-left-radius: 4px;\r\n          border-top-left-radius: 4px;\r\n  -moz-border-radius-topleft: 4px;\r\n}\r\n\r\n.table-bordered thead:first-child tr:first-child > th:last-child,\r\n.table-bordered tbody:first-child tr:first-child > td:last-child,\r\n.table-bordered tbody:first-child tr:first-child > th:last-child {\r\n  -webkit-border-top-right-radius: 4px;\r\n          border-top-right-radius: 4px;\r\n  -moz-border-radius-topright: 4px;\r\n}\r\n\r\n.table-bordered thead:last-child tr:last-child > th:first-child,\r\n.table-bordered tbody:last-child tr:last-child > td:first-child,\r\n.table-bordered tbody:last-child tr:last-child > th:first-child,\r\n.table-bordered tfoot:last-child tr:last-child > td:first-child,\r\n.table-bordered tfoot:last-child tr:last-child > th:first-child {\r\n  -webkit-border-bottom-left-radius: 4px;\r\n          border-bottom-left-radius: 4px;\r\n  -moz-border-radius-bottomleft: 4px;\r\n}\r\n\r\n.table-bordered thead:last-child tr:last-child > th:last-child,\r\n.table-bordered tbody:last-child tr:last-child > td:last-child,\r\n.table-bordered tbody:last-child tr:last-child > th:last-child,\r\n.table-bordered tfoot:last-child tr:last-child > td:last-child,\r\n.table-bordered tfoot:last-child tr:last-child > th:last-child {\r\n  -webkit-border-bottom-right-radius: 4px;\r\n          border-bottom-right-radius: 4px;\r\n  -moz-border-radius-bottomright: 4px;\r\n}\r\n\r\n.table-bordered tfoot + tbody:last-child tr:last-child td:first-child {\r\n  -webkit-border-bottom-left-radius: 0;\r\n          border-bottom-left-radius: 0;\r\n  -moz-border-radius-bottomleft: 0;\r\n}\r\n\r\n.table-bordered tfoot + tbody:last-child tr:last-child td:last-child {\r\n  -webkit-border-bottom-right-radius: 0;\r\n          border-bottom-right-radius: 0;\r\n  -moz-border-radius-bottomright: 0;\r\n}\r\n\r\n.table-bordered caption + thead tr:first-child th:first-child,\r\n.table-bordered caption + tbody tr:first-child td:first-child,\r\n.table-bordered colgroup + thead tr:first-child th:first-child,\r\n.table-bordered colgroup + tbody tr:first-child td:first-child {\r\n  -webkit-border-top-left-radius: 4px;\r\n          border-top-left-radius: 4px;\r\n  -moz-border-radius-topleft: 4px;\r\n}\r\n\r\n.table-bordered caption + thead tr:first-child th:last-child,\r\n.table-bordered caption + tbody tr:first-child td:last-child,\r\n.table-bordered colgroup + thead tr:first-child th:last-child,\r\n.table-bordered colgroup + tbody tr:first-child td:last-child {\r\n  -webkit-border-top-right-radius: 4px;\r\n          border-top-right-radius: 4px;\r\n  -moz-border-radius-topright: 4px;\r\n}\r\n\r\n.table-striped tbody > tr:nth-child(odd) > td,\r\n.table-striped tbody > tr:nth-child(odd) > th {\r\n  background-color: #f9f9f9;\r\n}\r\n\r\n.table-hover tbody tr:hover > td,\r\n.table-hover tbody tr:hover > th {\r\n  background-color: #f5f5f5;\r\n}\r\n\r\ntable td[class*=\"span\"],\r\ntable th[class*=\"span\"],\r\n.row-fluid table td[class*=\"span\"],\r\n.row-fluid table th[class*=\"span\"] {\r\n  display: table-cell;\r\n  float: none;\r\n  margin-left: 0;\r\n}\r\n\r\n.table td.span1,\r\n.table th.span1 {\r\n  float: none;\r\n  width: 44px;\r\n  margin-left: 0;\r\n}\r\n\r\n.table td.span2,\r\n.table th.span2 {\r\n  float: none;\r\n  width: 124px;\r\n  margin-left: 0;\r\n}\r\n\r\n.table td.span3,\r\n.table th.span3 {\r\n  float: none;\r\n  width: 204px;\r\n  margin-left: 0;\r\n}\r\n\r\n.table td.span4,\r\n.table th.span4 {\r\n  float: none;\r\n  width: 284px;\r\n  margin-left: 0;\r\n}\r\n\r\n.table td.span5,\r\n.table th.span5 {\r\n  float: none;\r\n  width: 364px;\r\n  margin-left: 0;\r\n}\r\n\r\n.table td.span6,\r\n.table th.span6 {\r\n  float: none;\r\n  width: 444px;\r\n  margin-left: 0;\r\n}\r\n\r\n.table td.span7,\r\n.table th.span7 {\r\n  float: none;\r\n  width: 524px;\r\n  margin-left: 0;\r\n}\r\n\r\n.table td.span8,\r\n.table th.span8 {\r\n  float: none;\r\n  width: 604px;\r\n  margin-left: 0;\r\n}\r\n\r\n.table td.span9,\r\n.table th.span9 {\r\n  float: none;\r\n  width: 684px;\r\n  margin-left: 0;\r\n}\r\n\r\n.table td.span10,\r\n.table th.span10 {\r\n  float: none;\r\n  width: 764px;\r\n  margin-left: 0;\r\n}\r\n\r\n.table td.span11,\r\n.table th.span11 {\r\n  float: none;\r\n  width: 844px;\r\n  margin-left: 0;\r\n}\r\n\r\n.table td.span12,\r\n.table th.span12 {\r\n  float: none;\r\n  width: 924px;\r\n  margin-left: 0;\r\n}\r\n\r\n.table tbody tr.success > td {\r\n  background-color: #dff0d8;\r\n}\r\n\r\n.table tbody tr.error > td {\r\n  background-color: #f2dede;\r\n}\r\n\r\n.table tbody tr.warning > td {\r\n  background-color: #fcf8e3;\r\n}\r\n\r\n.table tbody tr.info > td {\r\n  background-color: #d9edf7;\r\n}\r\n\r\n.table-hover tbody tr.success:hover > td {\r\n  background-color: #d0e9c6;\r\n}\r\n\r\n.table-hover tbody tr.error:hover > td {\r\n  background-color: #ebcccc;\r\n}\r\n\r\n.table-hover tbody tr.warning:hover > td {\r\n  background-color: #faf2cc;\r\n}\r\n\r\n.table-hover tbody tr.info:hover > td {\r\n  background-color: #c4e3f3;\r\n}\r\n\r\n[class^=\"icon-\"],\r\n[class*=\" icon-\"] {\r\n  display: inline-block;\r\n  width: 14px;\r\n  height: 14px;\r\n  margin-top: 1px;\r\n  *margin-right: .3em;\r\n  line-height: 14px;\r\n  vertical-align: text-top;\r\n  background-image: url(\"../img/glyphicons-halflings.png\");\r\n  background-position: 14px 14px;\r\n  background-repeat: no-repeat;\r\n}\r\n\r\n/* White icons with optional class, or on hover/focus/active states of certain elements */\r\n\r\n.icon-white,\r\n.nav-pills > .active > a > [class^=\"icon-\"],\r\n.nav-pills > .active > a > [class*=\" icon-\"],\r\n.nav-list > .active > a > [class^=\"icon-\"],\r\n.nav-list > .active > a > [class*=\" icon-\"],\r\n.navbar-inverse .nav > .active > a > [class^=\"icon-\"],\r\n.navbar-inverse .nav > .active > a > [class*=\" icon-\"],\r\n.dropdown-menu > li > a:hover > [class^=\"icon-\"],\r\n.dropdown-menu > li > a:focus > [class^=\"icon-\"],\r\n.dropdown-menu > li > a:hover > [class*=\" icon-\"],\r\n.dropdown-menu > li > a:focus > [class*=\" icon-\"],\r\n.dropdown-menu > .active > a > [class^=\"icon-\"],\r\n.dropdown-menu > .active > a > [class*=\" icon-\"],\r\n.dropdown-submenu:hover > a > [class^=\"icon-\"],\r\n.dropdown-submenu:focus > a > [class^=\"icon-\"],\r\n.dropdown-submenu:hover > a > [class*=\" icon-\"],\r\n.dropdown-submenu:focus > a > [class*=\" icon-\"] {\r\n  background-image: url(\"../img/glyphicons-halflings-white.png\");\r\n}\r\n\r\n.icon-glass {\r\n  background-position: 0      0;\r\n}\r\n\r\n.icon-music {\r\n  background-position: -24px 0;\r\n}\r\n\r\n.icon-search {\r\n  background-position: -48px 0;\r\n}\r\n\r\n.icon-envelope {\r\n  background-position: -72px 0;\r\n}\r\n\r\n.icon-heart {\r\n  background-position: -96px 0;\r\n}\r\n\r\n.icon-star {\r\n  background-position: -120px 0;\r\n}\r\n\r\n.icon-star-empty {\r\n  background-position: -144px 0;\r\n}\r\n\r\n.icon-user {\r\n  background-position: -168px 0;\r\n}\r\n\r\n.icon-film {\r\n  background-position: -192px 0;\r\n}\r\n\r\n.icon-th-large {\r\n  background-position: -216px 0;\r\n}\r\n\r\n.icon-th {\r\n  background-position: -240px 0;\r\n}\r\n\r\n.icon-th-list {\r\n  background-position: -264px 0;\r\n}\r\n\r\n.icon-ok {\r\n  background-position: -288px 0;\r\n}\r\n\r\n.icon-remove {\r\n  background-position: -312px 0;\r\n}\r\n\r\n.icon-zoom-in {\r\n  background-position: -336px 0;\r\n}\r\n\r\n.icon-zoom-out {\r\n  background-position: -360px 0;\r\n}\r\n\r\n.icon-off {\r\n  background-position: -384px 0;\r\n}\r\n\r\n.icon-signal {\r\n  background-position: -408px 0;\r\n}\r\n\r\n.icon-cog {\r\n  background-position: -432px 0;\r\n}\r\n\r\n.icon-trash {\r\n  background-position: -456px 0;\r\n}\r\n\r\n.icon-home {\r\n  background-position: 0 -24px;\r\n}\r\n\r\n.icon-file {\r\n  background-position: -24px -24px;\r\n}\r\n\r\n.icon-time {\r\n  background-position: -48px -24px;\r\n}\r\n\r\n.icon-road {\r\n  background-position: -72px -24px;\r\n}\r\n\r\n.icon-download-alt {\r\n  background-position: -96px -24px;\r\n}\r\n\r\n.icon-download {\r\n  background-position: -120px -24px;\r\n}\r\n\r\n.icon-upload {\r\n  background-position: -144px -24px;\r\n}\r\n\r\n.icon-inbox {\r\n  background-position: -168px -24px;\r\n}\r\n\r\n.icon-play-circle {\r\n  background-position: -192px -24px;\r\n}\r\n\r\n.icon-repeat {\r\n  background-position: -216px -24px;\r\n}\r\n\r\n.icon-refresh {\r\n  background-position: -240px -24px;\r\n}\r\n\r\n.icon-list-alt {\r\n  background-position: -264px -24px;\r\n}\r\n\r\n.icon-lock {\r\n  background-position: -287px -24px;\r\n}\r\n\r\n.icon-flag {\r\n  background-position: -312px -24px;\r\n}\r\n\r\n.icon-headphones {\r\n  background-position: -336px -24px;\r\n}\r\n\r\n.icon-volume-off {\r\n  background-position: -360px -24px;\r\n}\r\n\r\n.icon-volume-down {\r\n  background-position: -384px -24px;\r\n}\r\n\r\n.icon-volume-up {\r\n  background-position: -408px -24px;\r\n}\r\n\r\n.icon-qrcode {\r\n  background-position: -432px -24px;\r\n}\r\n\r\n.icon-barcode {\r\n  background-position: -456px -24px;\r\n}\r\n\r\n.icon-tag {\r\n  background-position: 0 -48px;\r\n}\r\n\r\n.icon-tags {\r\n  background-position: -25px -48px;\r\n}\r\n\r\n.icon-book {\r\n  background-position: -48px -48px;\r\n}\r\n\r\n.icon-bookmark {\r\n  background-position: -72px -48px;\r\n}\r\n\r\n.icon-print {\r\n  background-position: -96px -48px;\r\n}\r\n\r\n.icon-camera {\r\n  background-position: -120px -48px;\r\n}\r\n\r\n.icon-font {\r\n  background-position: -144px -48px;\r\n}\r\n\r\n.icon-bold {\r\n  background-position: -167px -48px;\r\n}\r\n\r\n.icon-italic {\r\n  background-position: -192px -48px;\r\n}\r\n\r\n.icon-text-height {\r\n  background-position: -216px -48px;\r\n}\r\n\r\n.icon-text-width {\r\n  background-position: -240px -48px;\r\n}\r\n\r\n.icon-align-left {\r\n  background-position: -264px -48px;\r\n}\r\n\r\n.icon-align-center {\r\n  background-position: -288px -48px;\r\n}\r\n\r\n.icon-align-right {\r\n  background-position: -312px -48px;\r\n}\r\n\r\n.icon-align-justify {\r\n  background-position: -336px -48px;\r\n}\r\n\r\n.icon-list {\r\n  background-position: -360px -48px;\r\n}\r\n\r\n.icon-indent-left {\r\n  background-position: -384px -48px;\r\n}\r\n\r\n.icon-indent-right {\r\n  background-position: -408px -48px;\r\n}\r\n\r\n.icon-facetime-video {\r\n  background-position: -432px -48px;\r\n}\r\n\r\n.icon-picture {\r\n  background-position: -456px -48px;\r\n}\r\n\r\n.icon-pencil {\r\n  background-position: 0 -72px;\r\n}\r\n\r\n.icon-map-marker {\r\n  background-position: -24px -72px;\r\n}\r\n\r\n.icon-adjust {\r\n  background-position: -48px -72px;\r\n}\r\n\r\n.icon-tint {\r\n  background-position: -72px -72px;\r\n}\r\n\r\n.icon-edit {\r\n  background-position: -96px -72px;\r\n}\r\n\r\n.icon-share {\r\n  background-position: -120px -72px;\r\n}\r\n\r\n.icon-check {\r\n  background-position: -144px -72px;\r\n}\r\n\r\n.icon-move {\r\n  background-position: -168px -72px;\r\n}\r\n\r\n.icon-step-backward {\r\n  background-position: -192px -72px;\r\n}\r\n\r\n.icon-fast-backward {\r\n  background-position: -216px -72px;\r\n}\r\n\r\n.icon-backward {\r\n  background-position: -240px -72px;\r\n}\r\n\r\n.icon-play {\r\n  background-position: -264px -72px;\r\n}\r\n\r\n.icon-pause {\r\n  background-position: -288px -72px;\r\n}\r\n\r\n.icon-stop {\r\n  background-position: -312px -72px;\r\n}\r\n\r\n.icon-forward {\r\n  background-position: -336px -72px;\r\n}\r\n\r\n.icon-fast-forward {\r\n  background-position: -360px -72px;\r\n}\r\n\r\n.icon-step-forward {\r\n  background-position: -384px -72px;\r\n}\r\n\r\n.icon-eject {\r\n  background-position: -408px -72px;\r\n}\r\n\r\n.icon-chevron-left {\r\n  background-position: -432px -72px;\r\n}\r\n\r\n.icon-chevron-right {\r\n  background-position: -456px -72px;\r\n}\r\n\r\n.icon-plus-sign {\r\n  background-position: 0 -96px;\r\n}\r\n\r\n.icon-minus-sign {\r\n  background-position: -24px -96px;\r\n}\r\n\r\n.icon-remove-sign {\r\n  background-position: -48px -96px;\r\n}\r\n\r\n.icon-ok-sign {\r\n  background-position: -72px -96px;\r\n}\r\n\r\n.icon-question-sign {\r\n  background-position: -96px -96px;\r\n}\r\n\r\n.icon-info-sign {\r\n  background-position: -120px -96px;\r\n}\r\n\r\n.icon-screenshot {\r\n  background-position: -144px -96px;\r\n}\r\n\r\n.icon-remove-circle {\r\n  background-position: -168px -96px;\r\n}\r\n\r\n.icon-ok-circle {\r\n  background-position: -192px -96px;\r\n}\r\n\r\n.icon-ban-circle {\r\n  background-position: -216px -96px;\r\n}\r\n\r\n.icon-arrow-left {\r\n  background-position: -240px -96px;\r\n}\r\n\r\n.icon-arrow-right {\r\n  background-position: -264px -96px;\r\n}\r\n\r\n.icon-arrow-up {\r\n  background-position: -289px -96px;\r\n}\r\n\r\n.icon-arrow-down {\r\n  background-position: -312px -96px;\r\n}\r\n\r\n.icon-share-alt {\r\n  background-position: -336px -96px;\r\n}\r\n\r\n.icon-resize-full {\r\n  background-position: -360px -96px;\r\n}\r\n\r\n.icon-resize-small {\r\n  background-position: -384px -96px;\r\n}\r\n\r\n.icon-plus {\r\n  background-position: -408px -96px;\r\n}\r\n\r\n.icon-minus {\r\n  background-position: -433px -96px;\r\n}\r\n\r\n.icon-asterisk {\r\n  background-position: -456px -96px;\r\n}\r\n\r\n.icon-exclamation-sign {\r\n  background-position: 0 -120px;\r\n}\r\n\r\n.icon-gift {\r\n  background-position: -24px -120px;\r\n}\r\n\r\n.icon-leaf {\r\n  background-position: -48px -120px;\r\n}\r\n\r\n.icon-fire {\r\n  background-position: -72px -120px;\r\n}\r\n\r\n.icon-eye-open {\r\n  background-position: -96px -120px;\r\n}\r\n\r\n.icon-eye-close {\r\n  background-position: -120px -120px;\r\n}\r\n\r\n.icon-warning-sign {\r\n  background-position: -144px -120px;\r\n}\r\n\r\n.icon-plane {\r\n  background-position: -168px -120px;\r\n}\r\n\r\n.icon-calendar {\r\n  background-position: -192px -120px;\r\n}\r\n\r\n.icon-random {\r\n  width: 16px;\r\n  background-position: -216px -120px;\r\n}\r\n\r\n.icon-comment {\r\n  background-position: -240px -120px;\r\n}\r\n\r\n.icon-magnet {\r\n  background-position: -264px -120px;\r\n}\r\n\r\n.icon-chevron-up {\r\n  background-position: -288px -120px;\r\n}\r\n\r\n.icon-chevron-down {\r\n  background-position: -313px -119px;\r\n}\r\n\r\n.icon-retweet {\r\n  background-position: -336px -120px;\r\n}\r\n\r\n.icon-shopping-cart {\r\n  background-position: -360px -120px;\r\n}\r\n\r\n.icon-folder-close {\r\n  width: 16px;\r\n  background-position: -384px -120px;\r\n}\r\n\r\n.icon-folder-open {\r\n  width: 16px;\r\n  background-position: -408px -120px;\r\n}\r\n\r\n.icon-resize-vertical {\r\n  background-position: -432px -119px;\r\n}\r\n\r\n.icon-resize-horizontal {\r\n  background-position: -456px -118px;\r\n}\r\n\r\n.icon-hdd {\r\n  background-position: 0 -144px;\r\n}\r\n\r\n.icon-bullhorn {\r\n  background-position: -24px -144px;\r\n}\r\n\r\n.icon-bell {\r\n  background-position: -48px -144px;\r\n}\r\n\r\n.icon-certificate {\r\n  background-position: -72px -144px;\r\n}\r\n\r\n.icon-thumbs-up {\r\n  background-position: -96px -144px;\r\n}\r\n\r\n.icon-thumbs-down {\r\n  background-position: -120px -144px;\r\n}\r\n\r\n.icon-hand-right {\r\n  background-position: -144px -144px;\r\n}\r\n\r\n.icon-hand-left {\r\n  background-position: -168px -144px;\r\n}\r\n\r\n.icon-hand-up {\r\n  background-position: -192px -144px;\r\n}\r\n\r\n.icon-hand-down {\r\n  background-position: -216px -144px;\r\n}\r\n\r\n.icon-circle-arrow-right {\r\n  background-position: -240px -144px;\r\n}\r\n\r\n.icon-circle-arrow-left {\r\n  background-position: -264px -144px;\r\n}\r\n\r\n.icon-circle-arrow-up {\r\n  background-position: -288px -144px;\r\n}\r\n\r\n.icon-circle-arrow-down {\r\n  background-position: -312px -144px;\r\n}\r\n\r\n.icon-globe {\r\n  background-position: -336px -144px;\r\n}\r\n\r\n.icon-wrench {\r\n  background-position: -360px -144px;\r\n}\r\n\r\n.icon-tasks {\r\n  background-position: -384px -144px;\r\n}\r\n\r\n.icon-filter {\r\n  background-position: -408px -144px;\r\n}\r\n\r\n.icon-briefcase {\r\n  background-position: -432px -144px;\r\n}\r\n\r\n.icon-fullscreen {\r\n  background-position: -456px -144px;\r\n}\r\n\r\n.dropup,\r\n.dropdown {\r\n  position: relative;\r\n}\r\n\r\n.dropdown-toggle {\r\n  *margin-bottom: -3px;\r\n}\r\n\r\n.dropdown-toggle:active,\r\n.open .dropdown-toggle {\r\n  outline: 0;\r\n}\r\n\r\n.caret {\r\n  display: inline-block;\r\n  width: 0;\r\n  height: 0;\r\n  vertical-align: top;\r\n  border-top: 4px solid #000000;\r\n  border-right: 4px solid transparent;\r\n  border-left: 4px solid transparent;\r\n  content: \"\";\r\n}\r\n\r\n.dropdown .caret {\r\n  margin-top: 8px;\r\n  margin-left: 2px;\r\n}\r\n\r\n.dropdown-menu {\r\n  position: absolute;\r\n  top: 100%;\r\n  left: 0;\r\n  z-index: 1000;\r\n  display: none;\r\n  float: left;\r\n  min-width: 160px;\r\n  padding: 5px 0;\r\n  margin: 2px 0 0;\r\n  list-style: none;\r\n  background-color: #ffffff;\r\n  border: 1px solid #ccc;\r\n  border: 1px solid rgba(0, 0, 0, 0.2);\r\n  *border-right-width: 2px;\r\n  *border-bottom-width: 2px;\r\n  -webkit-border-radius: 6px;\r\n     -moz-border-radius: 6px;\r\n          border-radius: 6px;\r\n  -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);\r\n     -moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);\r\n          box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);\r\n  -webkit-background-clip: padding-box;\r\n     -moz-background-clip: padding;\r\n          background-clip: padding-box;\r\n}\r\n\r\n.dropdown-menu.pull-right {\r\n  right: 0;\r\n  left: auto;\r\n}\r\n\r\n.dropdown-menu .divider {\r\n  *width: 100%;\r\n  height: 1px;\r\n  margin: 9px 1px;\r\n  *margin: -5px 0 5px;\r\n  overflow: hidden;\r\n  background-color: #e5e5e5;\r\n  border-bottom: 1px solid #ffffff;\r\n}\r\n\r\n.dropdown-menu > li > a {\r\n  display: block;\r\n  padding: 3px 20px;\r\n  clear: both;\r\n  font-weight: normal;\r\n  line-height: 20px;\r\n  color: #333333;\r\n  white-space: nowrap;\r\n}\r\n\r\n.dropdown-menu > li > a:hover,\r\n.dropdown-menu > li > a:focus,\r\n.dropdown-submenu:hover > a,\r\n.dropdown-submenu:focus > a {\r\n  color: #ffffff;\r\n  text-decoration: none;\r\n  background-color: #0081c2;\r\n  background-image: -moz-linear-gradient(top, #0088cc, #0077b3);\r\n  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0077b3));\r\n  background-image: -webkit-linear-gradient(top, #0088cc, #0077b3);\r\n  background-image: -o-linear-gradient(top, #0088cc, #0077b3);\r\n  background-image: linear-gradient(to bottom, #0088cc, #0077b3);\r\n  background-repeat: repeat-x;\r\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0077b3', GradientType=0);\r\n}\r\n\r\n.dropdown-menu > .active > a,\r\n.dropdown-menu > .active > a:hover,\r\n.dropdown-menu > .active > a:focus {\r\n  color: #ffffff;\r\n  text-decoration: none;\r\n  background-color: #0081c2;\r\n  background-image: -moz-linear-gradient(top, #0088cc, #0077b3);\r\n  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0077b3));\r\n  background-image: -webkit-linear-gradient(top, #0088cc, #0077b3);\r\n  background-image: -o-linear-gradient(top, #0088cc, #0077b3);\r\n  background-image: linear-gradient(to bottom, #0088cc, #0077b3);\r\n  background-repeat: repeat-x;\r\n  outline: 0;\r\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0077b3', GradientType=0);\r\n}\r\n\r\n.dropdown-menu > .disabled > a,\r\n.dropdown-menu > .disabled > a:hover,\r\n.dropdown-menu > .disabled > a:focus {\r\n  color: #999999;\r\n}\r\n\r\n.dropdown-menu > .disabled > a:hover,\r\n.dropdown-menu > .disabled > a:focus {\r\n  text-decoration: none;\r\n  cursor: default;\r\n  background-color: transparent;\r\n  background-image: none;\r\n  filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);\r\n}\r\n\r\n.open {\r\n  *z-index: 1000;\r\n}\r\n\r\n.open > .dropdown-menu {\r\n  display: block;\r\n}\r\n\r\n.pull-right > .dropdown-menu {\r\n  right: 0;\r\n  left: auto;\r\n}\r\n\r\n.dropup .caret,\r\n.navbar-fixed-bottom .dropdown .caret {\r\n  border-top: 0;\r\n  border-bottom: 4px solid #000000;\r\n  content: \"\";\r\n}\r\n\r\n.dropup .dropdown-menu,\r\n.navbar-fixed-bottom .dropdown .dropdown-menu {\r\n  top: auto;\r\n  bottom: 100%;\r\n  margin-bottom: 1px;\r\n}\r\n\r\n.dropdown-submenu {\r\n  position: relative;\r\n}\r\n\r\n.dropdown-submenu > .dropdown-menu {\r\n  top: 0;\r\n  left: 100%;\r\n  margin-top: -6px;\r\n  margin-left: -1px;\r\n  -webkit-border-radius: 0 6px 6px 6px;\r\n     -moz-border-radius: 0 6px 6px 6px;\r\n          border-radius: 0 6px 6px 6px;\r\n}\r\n\r\n.dropdown-submenu:hover > .dropdown-menu {\r\n  display: block;\r\n}\r\n\r\n.dropup .dropdown-submenu > .dropdown-menu {\r\n  top: auto;\r\n  bottom: 0;\r\n  margin-top: 0;\r\n  margin-bottom: -2px;\r\n  -webkit-border-radius: 5px 5px 5px 0;\r\n     -moz-border-radius: 5px 5px 5px 0;\r\n          border-radius: 5px 5px 5px 0;\r\n}\r\n\r\n.dropdown-submenu > a:after {\r\n  display: block;\r\n  float: right;\r\n  width: 0;\r\n  height: 0;\r\n  margin-top: 5px;\r\n  margin-right: -10px;\r\n  border-color: transparent;\r\n  border-left-color: #cccccc;\r\n  border-style: solid;\r\n  border-width: 5px 0 5px 5px;\r\n  content: \" \";\r\n}\r\n\r\n.dropdown-submenu:hover > a:after {\r\n  border-left-color: #ffffff;\r\n}\r\n\r\n.dropdown-submenu.pull-left {\r\n  float: none;\r\n}\r\n\r\n.dropdown-submenu.pull-left > .dropdown-menu {\r\n  left: -100%;\r\n  margin-left: 10px;\r\n  -webkit-border-radius: 6px 0 6px 6px;\r\n     -moz-border-radius: 6px 0 6px 6px;\r\n          border-radius: 6px 0 6px 6px;\r\n}\r\n\r\n.dropdown .dropdown-menu .nav-header {\r\n  padding-right: 20px;\r\n  padding-left: 20px;\r\n}\r\n\r\n.typeahead {\r\n  z-index: 1051;\r\n  margin-top: 2px;\r\n  -webkit-border-radius: 4px;\r\n     -moz-border-radius: 4px;\r\n          border-radius: 4px;\r\n}\r\n\r\n.well {\r\n  min-height: 20px;\r\n  padding: 19px;\r\n  margin-bottom: 20px;\r\n  background-color: #f5f5f5;\r\n  border: 1px solid #e3e3e3;\r\n  -webkit-border-radius: 4px;\r\n     -moz-border-radius: 4px;\r\n          border-radius: 4px;\r\n  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);\r\n     -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);\r\n          box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);\r\n}\r\n\r\n.well blockquote {\r\n  border-color: #ddd;\r\n  border-color: rgba(0, 0, 0, 0.15);\r\n}\r\n\r\n.well-large {\r\n  padding: 24px;\r\n  -webkit-border-radius: 6px;\r\n     -moz-border-radius: 6px;\r\n          border-radius: 6px;\r\n}\r\n\r\n.well-small {\r\n  padding: 9px;\r\n  -webkit-border-radius: 3px;\r\n     -moz-border-radius: 3px;\r\n          border-radius: 3px;\r\n}\r\n\r\n.fade {\r\n  opacity: 0;\r\n  -webkit-transition: opacity 0.15s linear;\r\n     -moz-transition: opacity 0.15s linear;\r\n       -o-transition: opacity 0.15s linear;\r\n          transition: opacity 0.15s linear;\r\n}\r\n\r\n.fade.in {\r\n  opacity: 1;\r\n}\r\n\r\n.collapse {\r\n  position: relative;\r\n  height: 0;\r\n  overflow: hidden;\r\n  -webkit-transition: height 0.35s ease;\r\n     -moz-transition: height 0.35s ease;\r\n       -o-transition: height 0.35s ease;\r\n          transition: height 0.35s ease;\r\n}\r\n\r\n.collapse.in {\r\n  height: auto;\r\n}\r\n\r\n.close {\r\n  float: right;\r\n  font-size: 20px;\r\n  font-weight: bold;\r\n  line-height: 20px;\r\n  color: #000000;\r\n  text-shadow: 0 1px 0 #ffffff;\r\n  opacity: 0.2;\r\n  filter: alpha(opacity=20);\r\n}\r\n\r\n.close:hover,\r\n.close:focus {\r\n  color: #000000;\r\n  text-decoration: none;\r\n  cursor: pointer;\r\n  opacity: 0.4;\r\n  filter: alpha(opacity=40);\r\n}\r\n\r\nbutton.close {\r\n  padding: 0;\r\n  cursor: pointer;\r\n  background: transparent;\r\n  border: 0;\r\n  -webkit-appearance: none;\r\n}\r\n\r\n.btn {\r\n  display: inline-block;\r\n  *display: inline;\r\n  padding: 4px 12px;\r\n  margin-bottom: 0;\r\n  *margin-left: .3em;\r\n  font-size: 14px;\r\n  line-height: 20px;\r\n  color: #333333;\r\n  text-align: center;\r\n  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);\r\n  vertical-align: middle;\r\n  cursor: pointer;\r\n  background-color: #f5f5f5;\r\n  *background-color: #e6e6e6;\r\n  background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6);\r\n  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6));\r\n  background-image: -webkit-linear-gradient(top, #ffffff, #e6e6e6);\r\n  background-image: -o-linear-gradient(top, #ffffff, #e6e6e6);\r\n  background-image: linear-gradient(to bottom, #ffffff, #e6e6e6);\r\n  background-repeat: repeat-x;\r\n  border: 1px solid #cccccc;\r\n  *border: 0;\r\n  border-color: #e6e6e6 #e6e6e6 #bfbfbf;\r\n  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);\r\n  border-bottom-color: #b3b3b3;\r\n  -webkit-border-radius: 4px;\r\n     -moz-border-radius: 4px;\r\n          border-radius: 4px;\r\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0);\r\n  filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);\r\n  *zoom: 1;\r\n  -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);\r\n     -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);\r\n          box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);\r\n}\r\n\r\n.btn:hover,\r\n.btn:focus,\r\n.btn:active,\r\n.btn.active,\r\n.btn.disabled,\r\n.btn[disabled] {\r\n  color: #333333;\r\n  background-color: #e6e6e6;\r\n  *background-color: #d9d9d9;\r\n}\r\n\r\n.btn:active,\r\n.btn.active {\r\n  background-color: #cccccc \\9;\r\n}\r\n\r\n.btn:first-child {\r\n  *margin-left: 0;\r\n}\r\n\r\n.btn:hover,\r\n.btn:focus {\r\n  color: #333333;\r\n  text-decoration: none;\r\n  background-position: 0 -15px;\r\n  -webkit-transition: background-position 0.1s linear;\r\n     -moz-transition: background-position 0.1s linear;\r\n       -o-transition: background-position 0.1s linear;\r\n          transition: background-position 0.1s linear;\r\n}\r\n\r\n.btn:focus {\r\n  outline: thin dotted #333;\r\n  outline: 5px auto -webkit-focus-ring-color;\r\n  outline-offset: -2px;\r\n}\r\n\r\n.btn.active,\r\n.btn:active {\r\n  background-image: none;\r\n  outline: 0;\r\n  -webkit-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);\r\n     -moz-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);\r\n          box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);\r\n}\r\n\r\n.btn.disabled,\r\n.btn[disabled] {\r\n  cursor: default;\r\n  background-image: none;\r\n  opacity: 0.65;\r\n  filter: alpha(opacity=65);\r\n  -webkit-box-shadow: none;\r\n     -moz-box-shadow: none;\r\n          box-shadow: none;\r\n}\r\n\r\n.btn-large {\r\n  padding: 11px 19px;\r\n  font-size: 17.5px;\r\n  -webkit-border-radius: 6px;\r\n     -moz-border-radius: 6px;\r\n          border-radius: 6px;\r\n}\r\n\r\n.btn-large [class^=\"icon-\"],\r\n.btn-large [class*=\" icon-\"] {\r\n  margin-top: 4px;\r\n}\r\n\r\n.btn-small {\r\n  padding: 2px 10px;\r\n  font-size: 11.9px;\r\n  -webkit-border-radius: 3px;\r\n     -moz-border-radius: 3px;\r\n          border-radius: 3px;\r\n}\r\n\r\n.btn-small [class^=\"icon-\"],\r\n.btn-small [class*=\" icon-\"] {\r\n  margin-top: 0;\r\n}\r\n\r\n.btn-mini [class^=\"icon-\"],\r\n.btn-mini [class*=\" icon-\"] {\r\n  margin-top: -1px;\r\n}\r\n\r\n.btn-mini {\r\n  padding: 0 6px;\r\n  font-size: 10.5px;\r\n  -webkit-border-radius: 3px;\r\n     -moz-border-radius: 3px;\r\n          border-radius: 3px;\r\n}\r\n\r\n.btn-block {\r\n  display: block;\r\n  width: 100%;\r\n  padding-right: 0;\r\n  padding-left: 0;\r\n  -webkit-box-sizing: border-box;\r\n     -moz-box-sizing: border-box;\r\n          box-sizing: border-box;\r\n}\r\n\r\n.btn-block + .btn-block {\r\n  margin-top: 5px;\r\n}\r\n\r\ninput[type=\"submit\"].btn-block,\r\ninput[type=\"reset\"].btn-block,\r\ninput[type=\"button\"].btn-block {\r\n  width: 100%;\r\n}\r\n\r\n.btn-primary.active,\r\n.btn-warning.active,\r\n.btn-danger.active,\r\n.btn-success.active,\r\n.btn-info.active,\r\n.btn-inverse.active {\r\n  color: rgba(255, 255, 255, 0.75);\r\n}\r\n\r\n.btn-primary {\r\n  color: #ffffff;\r\n  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);\r\n  background-color: #006dcc;\r\n  *background-color: #0044cc;\r\n  background-image: -moz-linear-gradient(top, #0088cc, #0044cc);\r\n  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc));\r\n  background-image: -webkit-linear-gradient(top, #0088cc, #0044cc);\r\n  background-image: -o-linear-gradient(top, #0088cc, #0044cc);\r\n  background-image: linear-gradient(to bottom, #0088cc, #0044cc);\r\n  background-repeat: repeat-x;\r\n  border-color: #0044cc #0044cc #002a80;\r\n  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);\r\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0044cc', GradientType=0);\r\n  filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);\r\n}\r\n\r\n.btn-primary:hover,\r\n.btn-primary:focus,\r\n.btn-primary:active,\r\n.btn-primary.active,\r\n.btn-primary.disabled,\r\n.btn-primary[disabled] {\r\n  color: #ffffff;\r\n  background-color: #0044cc;\r\n  *background-color: #003bb3;\r\n}\r\n\r\n.btn-primary:active,\r\n.btn-primary.active {\r\n  background-color: #003399 \\9;\r\n}\r\n\r\n.btn-warning {\r\n  color: #ffffff;\r\n  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);\r\n  background-color: #faa732;\r\n  *background-color: #f89406;\r\n  background-image: -moz-linear-gradient(top, #fbb450, #f89406);\r\n  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fbb450), to(#f89406));\r\n  background-image: -webkit-linear-gradient(top, #fbb450, #f89406);\r\n  background-image: -o-linear-gradient(top, #fbb450, #f89406);\r\n  background-image: linear-gradient(to bottom, #fbb450, #f89406);\r\n  background-repeat: repeat-x;\r\n  border-color: #f89406 #f89406 #ad6704;\r\n  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);\r\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffbb450', endColorstr='#fff89406', GradientType=0);\r\n  filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);\r\n}\r\n\r\n.btn-warning:hover,\r\n.btn-warning:focus,\r\n.btn-warning:active,\r\n.btn-warning.active,\r\n.btn-warning.disabled,\r\n.btn-warning[disabled] {\r\n  color: #ffffff;\r\n  background-color: #f89406;\r\n  *background-color: #df8505;\r\n}\r\n\r\n.btn-warning:active,\r\n.btn-warning.active {\r\n  background-color: #c67605 \\9;\r\n}\r\n\r\n.btn-danger {\r\n  color: #ffffff;\r\n  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);\r\n  background-color: #da4f49;\r\n  *background-color: #bd362f;\r\n  background-image: -moz-linear-gradient(top, #ee5f5b, #bd362f);\r\n  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#bd362f));\r\n  background-image: -webkit-linear-gradient(top, #ee5f5b, #bd362f);\r\n  background-image: -o-linear-gradient(top, #ee5f5b, #bd362f);\r\n  background-image: linear-gradient(to bottom, #ee5f5b, #bd362f);\r\n  background-repeat: repeat-x;\r\n  border-color: #bd362f #bd362f #802420;\r\n  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);\r\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b', endColorstr='#ffbd362f', GradientType=0);\r\n  filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);\r\n}\r\n\r\n.btn-danger:hover,\r\n.btn-danger:focus,\r\n.btn-danger:active,\r\n.btn-danger.active,\r\n.btn-danger.disabled,\r\n.btn-danger[disabled] {\r\n  color: #ffffff;\r\n  background-color: #bd362f;\r\n  *background-color: #a9302a;\r\n}\r\n\r\n.btn-danger:active,\r\n.btn-danger.active {\r\n  background-color: #942a25 \\9;\r\n}\r\n\r\n.btn-success {\r\n  color: #ffffff;\r\n  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);\r\n  background-color: #5bb75b;\r\n  *background-color: #51a351;\r\n  background-image: -moz-linear-gradient(top, #62c462, #51a351);\r\n  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#51a351));\r\n  background-image: -webkit-linear-gradient(top, #62c462, #51a351);\r\n  background-image: -o-linear-gradient(top, #62c462, #51a351);\r\n  background-image: linear-gradient(to bottom, #62c462, #51a351);\r\n  background-repeat: repeat-x;\r\n  border-color: #51a351 #51a351 #387038;\r\n  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);\r\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff62c462', endColorstr='#ff51a351', GradientType=0);\r\n  filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);\r\n}\r\n\r\n.btn-success:hover,\r\n.btn-success:focus,\r\n.btn-success:active,\r\n.btn-success.active,\r\n.btn-success.disabled,\r\n.btn-success[disabled] {\r\n  color: #ffffff;\r\n  background-color: #51a351;\r\n  *background-color: #499249;\r\n}\r\n\r\n.btn-success:active,\r\n.btn-success.active {\r\n  background-color: #408140 \\9;\r\n}\r\n\r\n.btn-info {\r\n  color: #ffffff;\r\n  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);\r\n  background-color: #49afcd;\r\n  *background-color: #2f96b4;\r\n  background-image: -moz-linear-gradient(top, #5bc0de, #2f96b4);\r\n  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#2f96b4));\r\n  background-image: -webkit-linear-gradient(top, #5bc0de, #2f96b4);\r\n  background-image: -o-linear-gradient(top, #5bc0de, #2f96b4);\r\n  background-image: linear-gradient(to bottom, #5bc0de, #2f96b4);\r\n  background-repeat: repeat-x;\r\n  border-color: #2f96b4 #2f96b4 #1f6377;\r\n  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);\r\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2f96b4', GradientType=0);\r\n  filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);\r\n}\r\n\r\n.btn-info:hover,\r\n.btn-info:focus,\r\n.btn-info:active,\r\n.btn-info.active,\r\n.btn-info.disabled,\r\n.btn-info[disabled] {\r\n  color: #ffffff;\r\n  background-color: #2f96b4;\r\n  *background-color: #2a85a0;\r\n}\r\n\r\n.btn-info:active,\r\n.btn-info.active {\r\n  background-color: #24748c \\9;\r\n}\r\n\r\n.btn-inverse {\r\n  color: #ffffff;\r\n  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);\r\n  background-color: #363636;\r\n  *background-color: #222222;\r\n  background-image: -moz-linear-gradient(top, #444444, #222222);\r\n  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#444444), to(#222222));\r\n  background-image: -webkit-linear-gradient(top, #444444, #222222);\r\n  background-image: -o-linear-gradient(top, #444444, #222222);\r\n  background-image: linear-gradient(to bottom, #444444, #222222);\r\n  background-repeat: repeat-x;\r\n  border-color: #222222 #222222 #000000;\r\n  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);\r\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff444444', endColorstr='#ff222222', GradientType=0);\r\n  filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);\r\n}\r\n\r\n.btn-inverse:hover,\r\n.btn-inverse:focus,\r\n.btn-inverse:active,\r\n.btn-inverse.active,\r\n.btn-inverse.disabled,\r\n.btn-inverse[disabled] {\r\n  color: #ffffff;\r\n  background-color: #222222;\r\n  *background-color: #151515;\r\n}\r\n\r\n.btn-inverse:active,\r\n.btn-inverse.active {\r\n  background-color: #080808 \\9;\r\n}\r\n\r\nbutton.btn,\r\ninput[type=\"submit\"].btn {\r\n  *padding-top: 3px;\r\n  *padding-bottom: 3px;\r\n}\r\n\r\nbutton.btn::-moz-focus-inner,\r\ninput[type=\"submit\"].btn::-moz-focus-inner {\r\n  padding: 0;\r\n  border: 0;\r\n}\r\n\r\nbutton.btn.btn-large,\r\ninput[type=\"submit\"].btn.btn-large {\r\n  *padding-top: 7px;\r\n  *padding-bottom: 7px;\r\n}\r\n\r\nbutton.btn.btn-small,\r\ninput[type=\"submit\"].btn.btn-small {\r\n  *padding-top: 3px;\r\n  *padding-bottom: 3px;\r\n}\r\n\r\nbutton.btn.btn-mini,\r\ninput[type=\"submit\"].btn.btn-mini {\r\n  *padding-top: 1px;\r\n  *padding-bottom: 1px;\r\n}\r\n\r\n.btn-link,\r\n.btn-link:active,\r\n.btn-link[disabled] {\r\n  background-color: transparent;\r\n  background-image: none;\r\n  -webkit-box-shadow: none;\r\n     -moz-box-shadow: none;\r\n          box-shadow: none;\r\n}\r\n\r\n.btn-link {\r\n  color: #0088cc;\r\n  cursor: pointer;\r\n  border-color: transparent;\r\n  -webkit-border-radius: 0;\r\n     -moz-border-radius: 0;\r\n          border-radius: 0;\r\n}\r\n\r\n.btn-link:hover,\r\n.btn-link:focus {\r\n  color: #005580;\r\n  text-decoration: underline;\r\n  background-color: transparent;\r\n}\r\n\r\n.btn-link[disabled]:hover,\r\n.btn-link[disabled]:focus {\r\n  color: #333333;\r\n  text-decoration: none;\r\n}\r\n\r\n.btn-group {\r\n  position: relative;\r\n  display: inline-block;\r\n  *display: inline;\r\n  *margin-left: .3em;\r\n  font-size: 0;\r\n  white-space: nowrap;\r\n  vertical-align: middle;\r\n  *zoom: 1;\r\n}\r\n\r\n.btn-group:first-child {\r\n  *margin-left: 0;\r\n}\r\n\r\n.btn-group + .btn-group {\r\n  margin-left: 5px;\r\n}\r\n\r\n.btn-toolbar {\r\n  margin-top: 10px;\r\n  margin-bottom: 10px;\r\n  font-size: 0;\r\n}\r\n\r\n.btn-toolbar > .btn + .btn,\r\n.btn-toolbar > .btn-group + .btn,\r\n.btn-toolbar > .btn + .btn-group {\r\n  margin-left: 5px;\r\n}\r\n\r\n.btn-group > .btn {\r\n  position: relative;\r\n  -webkit-border-radius: 0;\r\n     -moz-border-radius: 0;\r\n          border-radius: 0;\r\n}\r\n\r\n.btn-group > .btn + .btn {\r\n  margin-left: -1px;\r\n}\r\n\r\n.btn-group > .btn,\r\n.btn-group > .dropdown-menu,\r\n.btn-group > .popover {\r\n  font-size: 14px;\r\n}\r\n\r\n.btn-group > .btn-mini {\r\n  font-size: 10.5px;\r\n}\r\n\r\n.btn-group > .btn-small {\r\n  font-size: 11.9px;\r\n}\r\n\r\n.btn-group > .btn-large {\r\n  font-size: 17.5px;\r\n}\r\n\r\n.btn-group > .btn:first-child {\r\n  margin-left: 0;\r\n  -webkit-border-bottom-left-radius: 4px;\r\n          border-bottom-left-radius: 4px;\r\n  -webkit-border-top-left-radius: 4px;\r\n          border-top-left-radius: 4px;\r\n  -moz-border-radius-bottomleft: 4px;\r\n  -moz-border-radius-topleft: 4px;\r\n}\r\n\r\n.btn-group > .btn:last-child,\r\n.btn-group > .dropdown-toggle {\r\n  -webkit-border-top-right-radius: 4px;\r\n          border-top-right-radius: 4px;\r\n  -webkit-border-bottom-right-radius: 4px;\r\n          border-bottom-right-radius: 4px;\r\n  -moz-border-radius-topright: 4px;\r\n  -moz-border-radius-bottomright: 4px;\r\n}\r\n\r\n.btn-group > .btn.large:first-child {\r\n  margin-left: 0;\r\n  -webkit-border-bottom-left-radius: 6px;\r\n          border-bottom-left-radius: 6px;\r\n  -webkit-border-top-left-radius: 6px;\r\n          border-top-left-radius: 6px;\r\n  -moz-border-radius-bottomleft: 6px;\r\n  -moz-border-radius-topleft: 6px;\r\n}\r\n\r\n.btn-group > .btn.large:last-child,\r\n.btn-group > .large.dropdown-toggle {\r\n  -webkit-border-top-right-radius: 6px;\r\n          border-top-right-radius: 6px;\r\n  -webkit-border-bottom-right-radius: 6px;\r\n          border-bottom-right-radius: 6px;\r\n  -moz-border-radius-topright: 6px;\r\n  -moz-border-radius-bottomright: 6px;\r\n}\r\n\r\n.btn-group > .btn:hover,\r\n.btn-group > .btn:focus,\r\n.btn-group > .btn:active,\r\n.btn-group > .btn.active {\r\n  z-index: 2;\r\n}\r\n\r\n.btn-group .dropdown-toggle:active,\r\n.btn-group.open .dropdown-toggle {\r\n  outline: 0;\r\n}\r\n\r\n.btn-group > .btn + .dropdown-toggle {\r\n  *padding-top: 5px;\r\n  padding-right: 8px;\r\n  *padding-bottom: 5px;\r\n  padding-left: 8px;\r\n  -webkit-box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.125), inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);\r\n     -moz-box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.125), inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);\r\n          box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.125), inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);\r\n}\r\n\r\n.btn-group > .btn-mini + .dropdown-toggle {\r\n  *padding-top: 2px;\r\n  padding-right: 5px;\r\n  *padding-bottom: 2px;\r\n  padding-left: 5px;\r\n}\r\n\r\n.btn-group > .btn-small + .dropdown-toggle {\r\n  *padding-top: 5px;\r\n  *padding-bottom: 4px;\r\n}\r\n\r\n.btn-group > .btn-large + .dropdown-toggle {\r\n  *padding-top: 7px;\r\n  padding-right: 12px;\r\n  *padding-bottom: 7px;\r\n  padding-left: 12px;\r\n}\r\n\r\n.btn-group.open .dropdown-toggle {\r\n  background-image: none;\r\n  -webkit-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);\r\n     -moz-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);\r\n          box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);\r\n}\r\n\r\n.btn-group.open .btn.dropdown-toggle {\r\n  background-color: #e6e6e6;\r\n}\r\n\r\n.btn-group.open .btn-primary.dropdown-toggle {\r\n  background-color: #0044cc;\r\n}\r\n\r\n.btn-group.open .btn-warning.dropdown-toggle {\r\n  background-color: #f89406;\r\n}\r\n\r\n.btn-group.open .btn-danger.dropdown-toggle {\r\n  background-color: #bd362f;\r\n}\r\n\r\n.btn-group.open .btn-success.dropdown-toggle {\r\n  background-color: #51a351;\r\n}\r\n\r\n.btn-group.open .btn-info.dropdown-toggle {\r\n  background-color: #2f96b4;\r\n}\r\n\r\n.btn-group.open .btn-inverse.dropdown-toggle {\r\n  background-color: #222222;\r\n}\r\n\r\n.btn .caret {\r\n  margin-top: 8px;\r\n  margin-left: 0;\r\n}\r\n\r\n.btn-large .caret {\r\n  margin-top: 6px;\r\n}\r\n\r\n.btn-large .caret {\r\n  border-top-width: 5px;\r\n  border-right-width: 5px;\r\n  border-left-width: 5px;\r\n}\r\n\r\n.btn-mini .caret,\r\n.btn-small .caret {\r\n  margin-top: 8px;\r\n}\r\n\r\n.dropup .btn-large .caret {\r\n  border-bottom-width: 5px;\r\n}\r\n\r\n.btn-primary .caret,\r\n.btn-warning .caret,\r\n.btn-danger .caret,\r\n.btn-info .caret,\r\n.btn-success .caret,\r\n.btn-inverse .caret {\r\n  border-top-color: #ffffff;\r\n  border-bottom-color: #ffffff;\r\n}\r\n\r\n.btn-group-vertical {\r\n  display: inline-block;\r\n  *display: inline;\r\n  /* IE7 inline-block hack */\r\n\r\n  *zoom: 1;\r\n}\r\n\r\n.btn-group-vertical > .btn {\r\n  display: block;\r\n  float: none;\r\n  max-width: 100%;\r\n  -webkit-border-radius: 0;\r\n     -moz-border-radius: 0;\r\n          border-radius: 0;\r\n}\r\n\r\n.btn-group-vertical > .btn + .btn {\r\n  margin-top: -1px;\r\n  margin-left: 0;\r\n}\r\n\r\n.btn-group-vertical > .btn:first-child {\r\n  -webkit-border-radius: 4px 4px 0 0;\r\n     -moz-border-radius: 4px 4px 0 0;\r\n          border-radius: 4px 4px 0 0;\r\n}\r\n\r\n.btn-group-vertical > .btn:last-child {\r\n  -webkit-border-radius: 0 0 4px 4px;\r\n     -moz-border-radius: 0 0 4px 4px;\r\n          border-radius: 0 0 4px 4px;\r\n}\r\n\r\n.btn-group-vertical > .btn-large:first-child {\r\n  -webkit-border-radius: 6px 6px 0 0;\r\n     -moz-border-radius: 6px 6px 0 0;\r\n          border-radius: 6px 6px 0 0;\r\n}\r\n\r\n.btn-group-vertical > .btn-large:last-child {\r\n  -webkit-border-radius: 0 0 6px 6px;\r\n     -moz-border-radius: 0 0 6px 6px;\r\n          border-radius: 0 0 6px 6px;\r\n}\r\n\r\n.alert {\r\n  padding: 8px 35px 8px 14px;\r\n  margin-bottom: 20px;\r\n  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);\r\n  background-color: #fcf8e3;\r\n  border: 1px solid #fbeed5;\r\n  -webkit-border-radius: 4px;\r\n     -moz-border-radius: 4px;\r\n          border-radius: 4px;\r\n}\r\n\r\n.alert,\r\n.alert h4 {\r\n  color: #c09853;\r\n}\r\n\r\n.alert h4 {\r\n  margin: 0;\r\n}\r\n\r\n.alert .close {\r\n  position: relative;\r\n  top: -2px;\r\n  right: -21px;\r\n  line-height: 20px;\r\n}\r\n\r\n.alert-success {\r\n  color: #468847;\r\n  background-color: #dff0d8;\r\n  border-color: #d6e9c6;\r\n}\r\n\r\n.alert-success h4 {\r\n  color: #468847;\r\n}\r\n\r\n.alert-danger,\r\n.alert-error {\r\n  color: #b94a48;\r\n  background-color: #f2dede;\r\n  border-color: #eed3d7;\r\n}\r\n\r\n.alert-danger h4,\r\n.alert-error h4 {\r\n  color: #b94a48;\r\n}\r\n\r\n.alert-info {\r\n  color: #3a87ad;\r\n  background-color: #d9edf7;\r\n  border-color: #bce8f1;\r\n}\r\n\r\n.alert-info h4 {\r\n  color: #3a87ad;\r\n}\r\n\r\n.alert-block {\r\n  padding-top: 14px;\r\n  padding-bottom: 14px;\r\n}\r\n\r\n.alert-block > p,\r\n.alert-block > ul {\r\n  margin-bottom: 0;\r\n}\r\n\r\n.alert-block p + p {\r\n  margin-top: 5px;\r\n}\r\n\r\n.nav {\r\n  margin-bottom: 20px;\r\n  margin-left: 0;\r\n  list-style: none;\r\n}\r\n\r\n.nav > li > a {\r\n  display: block;\r\n}\r\n\r\n.nav > li > a:hover,\r\n.nav > li > a:focus {\r\n  text-decoration: none;\r\n  background-color: #eeeeee;\r\n}\r\n\r\n.nav > li > a > img {\r\n  max-width: none;\r\n}\r\n\r\n.nav > .pull-right {\r\n  float: right;\r\n}\r\n\r\n.nav-header {\r\n  display: block;\r\n  padding: 3px 15px;\r\n  font-size: 11px;\r\n  font-weight: bold;\r\n  line-height: 20px;\r\n  color: #999999;\r\n  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);\r\n  text-transform: uppercase;\r\n}\r\n\r\n.nav li + .nav-header {\r\n  margin-top: 9px;\r\n}\r\n\r\n.nav-list {\r\n  padding-right: 15px;\r\n  padding-left: 15px;\r\n  margin-bottom: 0;\r\n}\r\n\r\n.nav-list > li > a,\r\n.nav-list .nav-header {\r\n  margin-right: -15px;\r\n  margin-left: -15px;\r\n  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);\r\n}\r\n\r\n.nav-list > li > a {\r\n  padding: 3px 15px;\r\n}\r\n\r\n.nav-list > .active > a,\r\n.nav-list > .active > a:hover,\r\n.nav-list > .active > a:focus {\r\n  color: #ffffff;\r\n  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2);\r\n  background-color: #0088cc;\r\n}\r\n\r\n.nav-list [class^=\"icon-\"],\r\n.nav-list [class*=\" icon-\"] {\r\n  margin-right: 2px;\r\n}\r\n\r\n.nav-list .divider {\r\n  *width: 100%;\r\n  height: 1px;\r\n  margin: 9px 1px;\r\n  *margin: -5px 0 5px;\r\n  overflow: hidden;\r\n  background-color: #e5e5e5;\r\n  border-bottom: 1px solid #ffffff;\r\n}\r\n\r\n.nav-tabs,\r\n.nav-pills {\r\n  *zoom: 1;\r\n}\r\n\r\n.nav-tabs:before,\r\n.nav-pills:before,\r\n.nav-tabs:after,\r\n.nav-pills:after {\r\n  display: table;\r\n  line-height: 0;\r\n  content: \"\";\r\n}\r\n\r\n.nav-tabs:after,\r\n.nav-pills:after {\r\n  clear: both;\r\n}\r\n\r\n.nav-tabs > li,\r\n.nav-pills > li {\r\n  float: left;\r\n}\r\n\r\n.nav-tabs > li > a,\r\n.nav-pills > li > a {\r\n  padding-right: 12px;\r\n  padding-left: 12px;\r\n  margin-right: 2px;\r\n  line-height: 14px;\r\n}\r\n\r\n.nav-tabs {\r\n  border-bottom: 1px solid #ddd;\r\n}\r\n\r\n.nav-tabs > li {\r\n  margin-bottom: -1px;\r\n}\r\n\r\n.nav-tabs > li > a {\r\n  padding-top: 8px;\r\n  padding-bottom: 8px;\r\n  line-height: 20px;\r\n  border: 1px solid transparent;\r\n  -webkit-border-radius: 4px 4px 0 0;\r\n     -moz-border-radius: 4px 4px 0 0;\r\n          border-radius: 4px 4px 0 0;\r\n}\r\n\r\n.nav-tabs > li > a:hover,\r\n.nav-tabs > li > a:focus {\r\n  border-color: #eeeeee #eeeeee #dddddd;\r\n}\r\n\r\n.nav-tabs > .active > a,\r\n.nav-tabs > .active > a:hover,\r\n.nav-tabs > .active > a:focus {\r\n  color: #555555;\r\n  cursor: default;\r\n  background-color: #ffffff;\r\n  border: 1px solid #ddd;\r\n  border-bottom-color: transparent;\r\n}\r\n\r\n.nav-pills > li > a {\r\n  padding-top: 8px;\r\n  padding-bottom: 8px;\r\n  margin-top: 2px;\r\n  margin-bottom: 2px;\r\n  -webkit-border-radius: 5px;\r\n     -moz-border-radius: 5px;\r\n          border-radius: 5px;\r\n}\r\n\r\n.nav-pills > .active > a,\r\n.nav-pills > .active > a:hover,\r\n.nav-pills > .active > a:focus {\r\n  color: #ffffff;\r\n  background-color: #0088cc;\r\n}\r\n\r\n.nav-stacked > li {\r\n  float: none;\r\n}\r\n\r\n.nav-stacked > li > a {\r\n  margin-right: 0;\r\n}\r\n\r\n.nav-tabs.nav-stacked {\r\n  border-bottom: 0;\r\n}\r\n\r\n.nav-tabs.nav-stacked > li > a {\r\n  border: 1px solid #ddd;\r\n  -webkit-border-radius: 0;\r\n     -moz-border-radius: 0;\r\n          border-radius: 0;\r\n}\r\n\r\n.nav-tabs.nav-stacked > li:first-child > a {\r\n  -webkit-border-top-right-radius: 4px;\r\n          border-top-right-radius: 4px;\r\n  -webkit-border-top-left-radius: 4px;\r\n          border-top-left-radius: 4px;\r\n  -moz-border-radius-topright: 4px;\r\n  -moz-border-radius-topleft: 4px;\r\n}\r\n\r\n.nav-tabs.nav-stacked > li:last-child > a {\r\n  -webkit-border-bottom-right-radius: 4px;\r\n          border-bottom-right-radius: 4px;\r\n  -webkit-border-bottom-left-radius: 4px;\r\n          border-bottom-left-radius: 4px;\r\n  -moz-border-radius-bottomright: 4px;\r\n  -moz-border-radius-bottomleft: 4px;\r\n}\r\n\r\n.nav-tabs.nav-stacked > li > a:hover,\r\n.nav-tabs.nav-stacked > li > a:focus {\r\n  z-index: 2;\r\n  border-color: #ddd;\r\n}\r\n\r\n.nav-pills.nav-stacked > li > a {\r\n  margin-bottom: 3px;\r\n}\r\n\r\n.nav-pills.nav-stacked > li:last-child > a {\r\n  margin-bottom: 1px;\r\n}\r\n\r\n.nav-tabs .dropdown-menu {\r\n  -webkit-border-radius: 0 0 6px 6px;\r\n     -moz-border-radius: 0 0 6px 6px;\r\n          border-radius: 0 0 6px 6px;\r\n}\r\n\r\n.nav-pills .dropdown-menu {\r\n  -webkit-border-radius: 6px;\r\n     -moz-border-radius: 6px;\r\n          border-radius: 6px;\r\n}\r\n\r\n.nav .dropdown-toggle .caret {\r\n  margin-top: 6px;\r\n  border-top-color: #0088cc;\r\n  border-bottom-color: #0088cc;\r\n}\r\n\r\n.nav .dropdown-toggle:hover .caret,\r\n.nav .dropdown-toggle:focus .caret {\r\n  border-top-color: #005580;\r\n  border-bottom-color: #005580;\r\n}\r\n\r\n/* move down carets for tabs */\r\n\r\n.nav-tabs .dropdown-toggle .caret {\r\n  margin-top: 8px;\r\n}\r\n\r\n.nav .active .dropdown-toggle .caret {\r\n  border-top-color: #fff;\r\n  border-bottom-color: #fff;\r\n}\r\n\r\n.nav-tabs .active .dropdown-toggle .caret {\r\n  border-top-color: #555555;\r\n  border-bottom-color: #555555;\r\n}\r\n\r\n.nav > .dropdown.active > a:hover,\r\n.nav > .dropdown.active > a:focus {\r\n  cursor: pointer;\r\n}\r\n\r\n.nav-tabs .open .dropdown-toggle,\r\n.nav-pills .open .dropdown-toggle,\r\n.nav > li.dropdown.open.active > a:hover,\r\n.nav > li.dropdown.open.active > a:focus {\r\n  color: #ffffff;\r\n  background-color: #999999;\r\n  border-color: #999999;\r\n}\r\n\r\n.nav li.dropdown.open .caret,\r\n.nav li.dropdown.open.active .caret,\r\n.nav li.dropdown.open a:hover .caret,\r\n.nav li.dropdown.open a:focus .caret {\r\n  border-top-color: #ffffff;\r\n  border-bottom-color: #ffffff;\r\n  opacity: 1;\r\n  filter: alpha(opacity=100);\r\n}\r\n\r\n.tabs-stacked .open > a:hover,\r\n.tabs-stacked .open > a:focus {\r\n  border-color: #999999;\r\n}\r\n\r\n.tabbable {\r\n  *zoom: 1;\r\n}\r\n\r\n.tabbable:before,\r\n.tabbable:after {\r\n  display: table;\r\n  line-height: 0;\r\n  content: \"\";\r\n}\r\n\r\n.tabbable:after {\r\n  clear: both;\r\n}\r\n\r\n.tab-content {\r\n  overflow: auto;\r\n}\r\n\r\n.tabs-below > .nav-tabs,\r\n.tabs-right > .nav-tabs,\r\n.tabs-left > .nav-tabs {\r\n  border-bottom: 0;\r\n}\r\n\r\n.tab-content > .tab-pane,\r\n.pill-content > .pill-pane {\r\n  display: none;\r\n}\r\n\r\n.tab-content > .active,\r\n.pill-content > .active {\r\n  display: block;\r\n}\r\n\r\n.tabs-below > .nav-tabs {\r\n  border-top: 1px solid #ddd;\r\n}\r\n\r\n.tabs-below > .nav-tabs > li {\r\n  margin-top: -1px;\r\n  margin-bottom: 0;\r\n}\r\n\r\n.tabs-below > .nav-tabs > li > a {\r\n  -webkit-border-radius: 0 0 4px 4px;\r\n     -moz-border-radius: 0 0 4px 4px;\r\n          border-radius: 0 0 4px 4px;\r\n}\r\n\r\n.tabs-below > .nav-tabs > li > a:hover,\r\n.tabs-below > .nav-tabs > li > a:focus {\r\n  border-top-color: #ddd;\r\n  border-bottom-color: transparent;\r\n}\r\n\r\n.tabs-below > .nav-tabs > .active > a,\r\n.tabs-below > .nav-tabs > .active > a:hover,\r\n.tabs-below > .nav-tabs > .active > a:focus {\r\n  border-color: transparent #ddd #ddd #ddd;\r\n}\r\n\r\n.tabs-left > .nav-tabs > li,\r\n.tabs-right > .nav-tabs > li {\r\n  float: none;\r\n}\r\n\r\n.tabs-left > .nav-tabs > li > a,\r\n.tabs-right > .nav-tabs > li > a {\r\n  min-width: 74px;\r\n  margin-right: 0;\r\n  margin-bottom: 3px;\r\n}\r\n\r\n.tabs-left > .nav-tabs {\r\n  float: left;\r\n  margin-right: 19px;\r\n  border-right: 1px solid #ddd;\r\n}\r\n\r\n.tabs-left > .nav-tabs > li > a {\r\n  margin-right: -1px;\r\n  -webkit-border-radius: 4px 0 0 4px;\r\n     -moz-border-radius: 4px 0 0 4px;\r\n          border-radius: 4px 0 0 4px;\r\n}\r\n\r\n.tabs-left > .nav-tabs > li > a:hover,\r\n.tabs-left > .nav-tabs > li > a:focus {\r\n  border-color: #eeeeee #dddddd #eeeeee #eeeeee;\r\n}\r\n\r\n.tabs-left > .nav-tabs .active > a,\r\n.tabs-left > .nav-tabs .active > a:hover,\r\n.tabs-left > .nav-tabs .active > a:focus {\r\n  border-color: #ddd transparent #ddd #ddd;\r\n  *border-right-color: #ffffff;\r\n}\r\n\r\n.tabs-right > .nav-tabs {\r\n  float: right;\r\n  margin-left: 19px;\r\n  border-left: 1px solid #ddd;\r\n}\r\n\r\n.tabs-right > .nav-tabs > li > a {\r\n  margin-left: -1px;\r\n  -webkit-border-radius: 0 4px 4px 0;\r\n     -moz-border-radius: 0 4px 4px 0;\r\n          border-radius: 0 4px 4px 0;\r\n}\r\n\r\n.tabs-right > .nav-tabs > li > a:hover,\r\n.tabs-right > .nav-tabs > li > a:focus {\r\n  border-color: #eeeeee #eeeeee #eeeeee #dddddd;\r\n}\r\n\r\n.tabs-right > .nav-tabs .active > a,\r\n.tabs-right > .nav-tabs .active > a:hover,\r\n.tabs-right > .nav-tabs .active > a:focus {\r\n  border-color: #ddd #ddd #ddd transparent;\r\n  *border-left-color: #ffffff;\r\n}\r\n\r\n.nav > .disabled > a {\r\n  color: #999999;\r\n}\r\n\r\n.nav > .disabled > a:hover,\r\n.nav > .disabled > a:focus {\r\n  text-decoration: none;\r\n  cursor: default;\r\n  background-color: transparent;\r\n}\r\n\r\n.navbar {\r\n  *position: relative;\r\n  *z-index: 2;\r\n  margin-bottom: 20px;\r\n  overflow: visible;\r\n}\r\n\r\n.navbar-inner {\r\n  min-height: 40px;\r\n  padding-right: 20px;\r\n  padding-left: 20px;\r\n  background-color: #fafafa;\r\n  background-image: -moz-linear-gradient(top, #ffffff, #f2f2f2);\r\n  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#f2f2f2));\r\n  background-image: -webkit-linear-gradient(top, #ffffff, #f2f2f2);\r\n  background-image: -o-linear-gradient(top, #ffffff, #f2f2f2);\r\n  background-image: linear-gradient(to bottom, #ffffff, #f2f2f2);\r\n  background-repeat: repeat-x;\r\n  border: 1px solid #d4d4d4;\r\n  -webkit-border-radius: 4px;\r\n     -moz-border-radius: 4px;\r\n          border-radius: 4px;\r\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff2f2f2', GradientType=0);\r\n  *zoom: 1;\r\n  -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065);\r\n     -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065);\r\n          box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065);\r\n}\r\n\r\n.navbar-inner:before,\r\n.navbar-inner:after {\r\n  display: table;\r\n  line-height: 0;\r\n  content: \"\";\r\n}\r\n\r\n.navbar-inner:after {\r\n  clear: both;\r\n}\r\n\r\n.navbar .container {\r\n  width: auto;\r\n}\r\n\r\n.nav-collapse.collapse {\r\n  height: auto;\r\n  overflow: visible;\r\n}\r\n\r\n.navbar .brand {\r\n  display: block;\r\n  float: left;\r\n  padding: 10px 20px 10px;\r\n  margin-left: -20px;\r\n  font-size: 20px;\r\n  font-weight: 200;\r\n  color: #777777;\r\n  text-shadow: 0 1px 0 #ffffff;\r\n}\r\n\r\n.navbar .brand:hover,\r\n.navbar .brand:focus {\r\n  text-decoration: none;\r\n}\r\n\r\n.navbar-text {\r\n  margin-bottom: 0;\r\n  line-height: 40px;\r\n  color: #777777;\r\n}\r\n\r\n.navbar-link {\r\n  color: #777777;\r\n}\r\n\r\n.navbar-link:hover,\r\n.navbar-link:focus {\r\n  color: #333333;\r\n}\r\n\r\n.navbar .divider-vertical {\r\n  height: 40px;\r\n  margin: 0 9px;\r\n  border-right: 1px solid #ffffff;\r\n  border-left: 1px solid #f2f2f2;\r\n}\r\n\r\n.navbar .btn,\r\n.navbar .btn-group {\r\n  margin-top: 5px;\r\n}\r\n\r\n.navbar .btn-group .btn,\r\n.navbar .input-prepend .btn,\r\n.navbar .input-append .btn,\r\n.navbar .input-prepend .btn-group,\r\n.navbar .input-append .btn-group {\r\n  margin-top: 0;\r\n}\r\n\r\n.navbar-form {\r\n  margin-bottom: 0;\r\n  *zoom: 1;\r\n}\r\n\r\n.navbar-form:before,\r\n.navbar-form:after {\r\n  display: table;\r\n  line-height: 0;\r\n  content: \"\";\r\n}\r\n\r\n.navbar-form:after {\r\n  clear: both;\r\n}\r\n\r\n.navbar-form input,\r\n.navbar-form select,\r\n.navbar-form .radio,\r\n.navbar-form .checkbox {\r\n  margin-top: 5px;\r\n}\r\n\r\n.navbar-form input,\r\n.navbar-form select,\r\n.navbar-form .btn {\r\n  display: inline-block;\r\n  margin-bottom: 0;\r\n}\r\n\r\n.navbar-form input[type=\"image\"],\r\n.navbar-form input[type=\"checkbox\"],\r\n.navbar-form input[type=\"radio\"] {\r\n  margin-top: 3px;\r\n}\r\n\r\n.navbar-form .input-append,\r\n.navbar-form .input-prepend {\r\n  margin-top: 5px;\r\n  white-space: nowrap;\r\n}\r\n\r\n.navbar-form .input-append input,\r\n.navbar-form .input-prepend input {\r\n  margin-top: 0;\r\n}\r\n\r\n.navbar-search {\r\n  position: relative;\r\n  float: left;\r\n  margin-top: 5px;\r\n  margin-bottom: 0;\r\n}\r\n\r\n.navbar-search .search-query {\r\n  padding: 4px 14px;\r\n  margin-bottom: 0;\r\n  font-family: \"Helvetica Neue\", Helvetica, Arial, sans-serif;\r\n  font-size: 13px;\r\n  font-weight: normal;\r\n  line-height: 1;\r\n  -webkit-border-radius: 15px;\r\n     -moz-border-radius: 15px;\r\n          border-radius: 15px;\r\n}\r\n\r\n.navbar-static-top {\r\n  position: static;\r\n  margin-bottom: 0;\r\n}\r\n\r\n.navbar-static-top .navbar-inner {\r\n  -webkit-border-radius: 0;\r\n     -moz-border-radius: 0;\r\n          border-radius: 0;\r\n}\r\n\r\n.navbar-fixed-top,\r\n.navbar-fixed-bottom {\r\n  position: fixed;\r\n  right: 0;\r\n  left: 0;\r\n  z-index: 1030;\r\n  margin-bottom: 0;\r\n}\r\n\r\n.navbar-fixed-top .navbar-inner,\r\n.navbar-static-top .navbar-inner {\r\n  border-width: 0 0 1px;\r\n}\r\n\r\n.navbar-fixed-bottom .navbar-inner {\r\n  border-width: 1px 0 0;\r\n}\r\n\r\n.navbar-fixed-top .navbar-inner,\r\n.navbar-fixed-bottom .navbar-inner {\r\n  padding-right: 0;\r\n  padding-left: 0;\r\n  -webkit-border-radius: 0;\r\n     -moz-border-radius: 0;\r\n          border-radius: 0;\r\n}\r\n\r\n.navbar-static-top .container,\r\n.navbar-fixed-top .container,\r\n.navbar-fixed-bottom .container {\r\n  width: 940px;\r\n}\r\n\r\n.navbar-fixed-top {\r\n  top: 0;\r\n}\r\n\r\n.navbar-fixed-top .navbar-inner,\r\n.navbar-static-top .navbar-inner {\r\n  -webkit-box-shadow: 0 1px 10px rgba(0, 0, 0, 0.1);\r\n     -moz-box-shadow: 0 1px 10px rgba(0, 0, 0, 0.1);\r\n          box-shadow: 0 1px 10px rgba(0, 0, 0, 0.1);\r\n}\r\n\r\n.navbar-fixed-bottom {\r\n  bottom: 0;\r\n}\r\n\r\n.navbar-fixed-bottom .navbar-inner {\r\n  -webkit-box-shadow: 0 -1px 10px rgba(0, 0, 0, 0.1);\r\n     -moz-box-shadow: 0 -1px 10px rgba(0, 0, 0, 0.1);\r\n          box-shadow: 0 -1px 10px rgba(0, 0, 0, 0.1);\r\n}\r\n\r\n.navbar .nav {\r\n  position: relative;\r\n  left: 0;\r\n  display: block;\r\n  float: left;\r\n  margin: 0 10px 0 0;\r\n}\r\n\r\n.navbar .nav.pull-right {\r\n  float: right;\r\n  margin-right: 0;\r\n}\r\n\r\n.navbar .nav > li {\r\n  float: left;\r\n}\r\n\r\n.navbar .nav > li > a {\r\n  float: none;\r\n  padding: 10px 15px 10px;\r\n  color: #777777;\r\n  text-decoration: none;\r\n  text-shadow: 0 1px 0 #ffffff;\r\n}\r\n\r\n.navbar .nav .dropdown-toggle .caret {\r\n  margin-top: 8px;\r\n}\r\n\r\n.navbar .nav > li > a:focus,\r\n.navbar .nav > li > a:hover {\r\n  color: #333333;\r\n  text-decoration: none;\r\n  background-color: transparent;\r\n}\r\n\r\n.navbar .nav > .active > a,\r\n.navbar .nav > .active > a:hover,\r\n.navbar .nav > .active > a:focus {\r\n  color: #555555;\r\n  text-decoration: none;\r\n  background-color: #e5e5e5;\r\n  -webkit-box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125);\r\n     -moz-box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125);\r\n          box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125);\r\n}\r\n\r\n.navbar .btn-navbar {\r\n  display: none;\r\n  float: right;\r\n  padding: 7px 10px;\r\n  margin-right: 5px;\r\n  margin-left: 5px;\r\n  color: #ffffff;\r\n  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);\r\n  background-color: #ededed;\r\n  *background-color: #e5e5e5;\r\n  background-image: -moz-linear-gradient(top, #f2f2f2, #e5e5e5);\r\n  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f2f2f2), to(#e5e5e5));\r\n  background-image: -webkit-linear-gradient(top, #f2f2f2, #e5e5e5);\r\n  background-image: -o-linear-gradient(top, #f2f2f2, #e5e5e5);\r\n  background-image: linear-gradient(to bottom, #f2f2f2, #e5e5e5);\r\n  background-repeat: repeat-x;\r\n  border-color: #e5e5e5 #e5e5e5 #bfbfbf;\r\n  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);\r\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2f2f2', endColorstr='#ffe5e5e5', GradientType=0);\r\n  filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);\r\n  -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.075);\r\n     -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.075);\r\n          box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.075);\r\n}\r\n\r\n.navbar .btn-navbar:hover,\r\n.navbar .btn-navbar:focus,\r\n.navbar .btn-navbar:active,\r\n.navbar .btn-navbar.active,\r\n.navbar .btn-navbar.disabled,\r\n.navbar .btn-navbar[disabled] {\r\n  color: #ffffff;\r\n  background-color: #e5e5e5;\r\n  *background-color: #d9d9d9;\r\n}\r\n\r\n.navbar .btn-navbar:active,\r\n.navbar .btn-navbar.active {\r\n  background-color: #cccccc \\9;\r\n}\r\n\r\n.navbar .btn-navbar .icon-bar {\r\n  display: block;\r\n  width: 18px;\r\n  height: 2px;\r\n  background-color: #f5f5f5;\r\n  -webkit-border-radius: 1px;\r\n     -moz-border-radius: 1px;\r\n          border-radius: 1px;\r\n  -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);\r\n     -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);\r\n          box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);\r\n}\r\n\r\n.btn-navbar .icon-bar + .icon-bar {\r\n  margin-top: 3px;\r\n}\r\n\r\n.navbar .nav > li > .dropdown-menu:before {\r\n  position: absolute;\r\n  top: -7px;\r\n  left: 9px;\r\n  display: inline-block;\r\n  border-right: 7px solid transparent;\r\n  border-bottom: 7px solid #ccc;\r\n  border-left: 7px solid transparent;\r\n  border-bottom-color: rgba(0, 0, 0, 0.2);\r\n  content: '';\r\n}\r\n\r\n.navbar .nav > li > .dropdown-menu:after {\r\n  position: absolute;\r\n  top: -6px;\r\n  left: 10px;\r\n  display: inline-block;\r\n  border-right: 6px solid transparent;\r\n  border-bottom: 6px solid #ffffff;\r\n  border-left: 6px solid transparent;\r\n  content: '';\r\n}\r\n\r\n.navbar-fixed-bottom .nav > li > .dropdown-menu:before {\r\n  top: auto;\r\n  bottom: -7px;\r\n  border-top: 7px solid #ccc;\r\n  border-bottom: 0;\r\n  border-top-color: rgba(0, 0, 0, 0.2);\r\n}\r\n\r\n.navbar-fixed-bottom .nav > li > .dropdown-menu:after {\r\n  top: auto;\r\n  bottom: -6px;\r\n  border-top: 6px solid #ffffff;\r\n  border-bottom: 0;\r\n}\r\n\r\n.navbar .nav li.dropdown > a:hover .caret,\r\n.navbar .nav li.dropdown > a:focus .caret {\r\n  border-top-color: #333333;\r\n  border-bottom-color: #333333;\r\n}\r\n\r\n.navbar .nav li.dropdown.open > .dropdown-toggle,\r\n.navbar .nav li.dropdown.active > .dropdown-toggle,\r\n.navbar .nav li.dropdown.open.active > .dropdown-toggle {\r\n  color: #555555;\r\n  background-color: #e5e5e5;\r\n}\r\n\r\n.navbar .nav li.dropdown > .dropdown-toggle .caret {\r\n  border-top-color: #777777;\r\n  border-bottom-color: #777777;\r\n}\r\n\r\n.navbar .nav li.dropdown.open > .dropdown-toggle .caret,\r\n.navbar .nav li.dropdown.active > .dropdown-toggle .caret,\r\n.navbar .nav li.dropdown.open.active > .dropdown-toggle .caret {\r\n  border-top-color: #555555;\r\n  border-bottom-color: #555555;\r\n}\r\n\r\n.navbar .pull-right > li > .dropdown-menu,\r\n.navbar .nav > li > .dropdown-menu.pull-right {\r\n  right: 0;\r\n  left: auto;\r\n}\r\n\r\n.navbar .pull-right > li > .dropdown-menu:before,\r\n.navbar .nav > li > .dropdown-menu.pull-right:before {\r\n  right: 12px;\r\n  left: auto;\r\n}\r\n\r\n.navbar .pull-right > li > .dropdown-menu:after,\r\n.navbar .nav > li > .dropdown-menu.pull-right:after {\r\n  right: 13px;\r\n  left: auto;\r\n}\r\n\r\n.navbar .pull-right > li > .dropdown-menu .dropdown-menu,\r\n.navbar .nav > li > .dropdown-menu.pull-right .dropdown-menu {\r\n  right: 100%;\r\n  left: auto;\r\n  margin-right: -1px;\r\n  margin-left: 0;\r\n  -webkit-border-radius: 6px 0 6px 6px;\r\n     -moz-border-radius: 6px 0 6px 6px;\r\n          border-radius: 6px 0 6px 6px;\r\n}\r\n\r\n.navbar-inverse .navbar-inner {\r\n  background-color: #1b1b1b;\r\n  background-image: -moz-linear-gradient(top, #222222, #111111);\r\n  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#222222), to(#111111));\r\n  background-image: -webkit-linear-gradient(top, #222222, #111111);\r\n  background-image: -o-linear-gradient(top, #222222, #111111);\r\n  background-image: linear-gradient(to bottom, #222222, #111111);\r\n  background-repeat: repeat-x;\r\n  border-color: #252525;\r\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff222222', endColorstr='#ff111111', GradientType=0);\r\n}\r\n\r\n.navbar-inverse .brand,\r\n.navbar-inverse .nav > li > a {\r\n  color: #999999;\r\n  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);\r\n}\r\n\r\n.navbar-inverse .brand:hover,\r\n.navbar-inverse .nav > li > a:hover,\r\n.navbar-inverse .brand:focus,\r\n.navbar-inverse .nav > li > a:focus {\r\n  color: #ffffff;\r\n}\r\n\r\n.navbar-inverse .brand {\r\n  color: #999999;\r\n}\r\n\r\n.navbar-inverse .navbar-text {\r\n  color: #999999;\r\n}\r\n\r\n.navbar-inverse .nav > li > a:focus,\r\n.navbar-inverse .nav > li > a:hover {\r\n  color: #ffffff;\r\n  background-color: transparent;\r\n}\r\n\r\n.navbar-inverse .nav .active > a,\r\n.navbar-inverse .nav .active > a:hover,\r\n.navbar-inverse .nav .active > a:focus {\r\n  color: #ffffff;\r\n  background-color: #111111;\r\n}\r\n\r\n.navbar-inverse .navbar-link {\r\n  color: #999999;\r\n}\r\n\r\n.navbar-inverse .navbar-link:hover,\r\n.navbar-inverse .navbar-link:focus {\r\n  color: #ffffff;\r\n}\r\n\r\n.navbar-inverse .divider-vertical {\r\n  border-right-color: #222222;\r\n  border-left-color: #111111;\r\n}\r\n\r\n.navbar-inverse .nav li.dropdown.open > .dropdown-toggle,\r\n.navbar-inverse .nav li.dropdown.active > .dropdown-toggle,\r\n.navbar-inverse .nav li.dropdown.open.active > .dropdown-toggle {\r\n  color: #ffffff;\r\n  background-color: #111111;\r\n}\r\n\r\n.navbar-inverse .nav li.dropdown > a:hover .caret,\r\n.navbar-inverse .nav li.dropdown > a:focus .caret {\r\n  border-top-color: #ffffff;\r\n  border-bottom-color: #ffffff;\r\n}\r\n\r\n.navbar-inverse .nav li.dropdown > .dropdown-toggle .caret {\r\n  border-top-color: #999999;\r\n  border-bottom-color: #999999;\r\n}\r\n\r\n.navbar-inverse .nav li.dropdown.open > .dropdown-toggle .caret,\r\n.navbar-inverse .nav li.dropdown.active > .dropdown-toggle .caret,\r\n.navbar-inverse .nav li.dropdown.open.active > .dropdown-toggle .caret {\r\n  border-top-color: #ffffff;\r\n  border-bottom-color: #ffffff;\r\n}\r\n\r\n.navbar-inverse .navbar-search .search-query {\r\n  color: #ffffff;\r\n  background-color: #515151;\r\n  border-color: #111111;\r\n  -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 0 rgba(255, 255, 255, 0.15);\r\n     -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 0 rgba(255, 255, 255, 0.15);\r\n          box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 0 rgba(255, 255, 255, 0.15);\r\n  -webkit-transition: none;\r\n     -moz-transition: none;\r\n       -o-transition: none;\r\n          transition: none;\r\n}\r\n\r\n.navbar-inverse .navbar-search .search-query:-moz-placeholder {\r\n  color: #cccccc;\r\n}\r\n\r\n.navbar-inverse .navbar-search .search-query:-ms-input-placeholder {\r\n  color: #cccccc;\r\n}\r\n\r\n.navbar-inverse .navbar-search .search-query::-webkit-input-placeholder {\r\n  color: #cccccc;\r\n}\r\n\r\n.navbar-inverse .navbar-search .search-query:focus,\r\n.navbar-inverse .navbar-search .search-query.focused {\r\n  padding: 5px 15px;\r\n  color: #333333;\r\n  text-shadow: 0 1px 0 #ffffff;\r\n  background-color: #ffffff;\r\n  border: 0;\r\n  outline: 0;\r\n  -webkit-box-shadow: 0 0 3px rgba(0, 0, 0, 0.15);\r\n     -moz-box-shadow: 0 0 3px rgba(0, 0, 0, 0.15);\r\n          box-shadow: 0 0 3px rgba(0, 0, 0, 0.15);\r\n}\r\n\r\n.navbar-inverse .btn-navbar {\r\n  color: #ffffff;\r\n  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);\r\n  background-color: #0e0e0e;\r\n  *background-color: #040404;\r\n  background-image: -moz-linear-gradient(top, #151515, #040404);\r\n  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#151515), to(#040404));\r\n  background-image: -webkit-linear-gradient(top, #151515, #040404);\r\n  background-image: -o-linear-gradient(top, #151515, #040404);\r\n  background-image: linear-gradient(to bottom, #151515, #040404);\r\n  background-repeat: repeat-x;\r\n  border-color: #040404 #040404 #000000;\r\n  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);\r\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff151515', endColorstr='#ff040404', GradientType=0);\r\n  filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);\r\n}\r\n\r\n.navbar-inverse .btn-navbar:hover,\r\n.navbar-inverse .btn-navbar:focus,\r\n.navbar-inverse .btn-navbar:active,\r\n.navbar-inverse .btn-navbar.active,\r\n.navbar-inverse .btn-navbar.disabled,\r\n.navbar-inverse .btn-navbar[disabled] {\r\n  color: #ffffff;\r\n  background-color: #040404;\r\n  *background-color: #000000;\r\n}\r\n\r\n.navbar-inverse .btn-navbar:active,\r\n.navbar-inverse .btn-navbar.active {\r\n  background-color: #000000 \\9;\r\n}\r\n\r\n.breadcrumb {\r\n  padding: 8px 15px;\r\n  margin: 0 0 20px;\r\n  list-style: none;\r\n  background-color: #f5f5f5;\r\n  -webkit-border-radius: 4px;\r\n     -moz-border-radius: 4px;\r\n          border-radius: 4px;\r\n}\r\n\r\n.breadcrumb > li {\r\n  display: inline-block;\r\n  *display: inline;\r\n  text-shadow: 0 1px 0 #ffffff;\r\n  *zoom: 1;\r\n}\r\n\r\n.breadcrumb > li > .divider {\r\n  padding: 0 5px;\r\n  color: #ccc;\r\n}\r\n\r\n.breadcrumb > .active {\r\n  color: #999999;\r\n}\r\n\r\n.pagination {\r\n  margin: 20px 0;\r\n}\r\n\r\n.pagination ul {\r\n  display: inline-block;\r\n  *display: inline;\r\n  margin-bottom: 0;\r\n  margin-left: 0;\r\n  -webkit-border-radius: 4px;\r\n     -moz-border-radius: 4px;\r\n          border-radius: 4px;\r\n  *zoom: 1;\r\n  -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);\r\n     -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);\r\n          box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);\r\n}\r\n\r\n.pagination ul > li {\r\n  display: inline;\r\n}\r\n\r\n.pagination ul > li > a,\r\n.pagination ul > li > span {\r\n  float: left;\r\n  padding: 4px 12px;\r\n  line-height: 20px;\r\n  text-decoration: none;\r\n  background-color: #ffffff;\r\n  border: 1px solid #dddddd;\r\n  border-left-width: 0;\r\n}\r\n\r\n.pagination ul > li > a:hover,\r\n.pagination ul > li > a:focus,\r\n.pagination ul > .active > a,\r\n.pagination ul > .active > span {\r\n  background-color: #f5f5f5;\r\n}\r\n\r\n.pagination ul > .active > a,\r\n.pagination ul > .active > span {\r\n  color: #999999;\r\n  cursor: default;\r\n}\r\n\r\n.pagination ul > .disabled > span,\r\n.pagination ul > .disabled > a,\r\n.pagination ul > .disabled > a:hover,\r\n.pagination ul > .disabled > a:focus {\r\n  color: #999999;\r\n  cursor: default;\r\n  background-color: transparent;\r\n}\r\n\r\n.pagination ul > li:first-child > a,\r\n.pagination ul > li:first-child > span {\r\n  border-left-width: 1px;\r\n  -webkit-border-bottom-left-radius: 4px;\r\n          border-bottom-left-radius: 4px;\r\n  -webkit-border-top-left-radius: 4px;\r\n          border-top-left-radius: 4px;\r\n  -moz-border-radius-bottomleft: 4px;\r\n  -moz-border-radius-topleft: 4px;\r\n}\r\n\r\n.pagination ul > li:last-child > a,\r\n.pagination ul > li:last-child > span {\r\n  -webkit-border-top-right-radius: 4px;\r\n          border-top-right-radius: 4px;\r\n  -webkit-border-bottom-right-radius: 4px;\r\n          border-bottom-right-radius: 4px;\r\n  -moz-border-radius-topright: 4px;\r\n  -moz-border-radius-bottomright: 4px;\r\n}\r\n\r\n.pagination-centered {\r\n  text-align: center;\r\n}\r\n\r\n.pagination-right {\r\n  text-align: right;\r\n}\r\n\r\n.pagination-large ul > li > a,\r\n.pagination-large ul > li > span {\r\n  padding: 11px 19px;\r\n  font-size: 17.5px;\r\n}\r\n\r\n.pagination-large ul > li:first-child > a,\r\n.pagination-large ul > li:first-child > span {\r\n  -webkit-border-bottom-left-radius: 6px;\r\n          border-bottom-left-radius: 6px;\r\n  -webkit-border-top-left-radius: 6px;\r\n          border-top-left-radius: 6px;\r\n  -moz-border-radius-bottomleft: 6px;\r\n  -moz-border-radius-topleft: 6px;\r\n}\r\n\r\n.pagination-large ul > li:last-child > a,\r\n.pagination-large ul > li:last-child > span {\r\n  -webkit-border-top-right-radius: 6px;\r\n          border-top-right-radius: 6px;\r\n  -webkit-border-bottom-right-radius: 6px;\r\n          border-bottom-right-radius: 6px;\r\n  -moz-border-radius-topright: 6px;\r\n  -moz-border-radius-bottomright: 6px;\r\n}\r\n\r\n.pagination-mini ul > li:first-child > a,\r\n.pagination-small ul > li:first-child > a,\r\n.pagination-mini ul > li:first-child > span,\r\n.pagination-small ul > li:first-child > span {\r\n  -webkit-border-bottom-left-radius: 3px;\r\n          border-bottom-left-radius: 3px;\r\n  -webkit-border-top-left-radius: 3px;\r\n          border-top-left-radius: 3px;\r\n  -moz-border-radius-bottomleft: 3px;\r\n  -moz-border-radius-topleft: 3px;\r\n}\r\n\r\n.pagination-mini ul > li:last-child > a,\r\n.pagination-small ul > li:last-child > a,\r\n.pagination-mini ul > li:last-child > span,\r\n.pagination-small ul > li:last-child > span {\r\n  -webkit-border-top-right-radius: 3px;\r\n          border-top-right-radius: 3px;\r\n  -webkit-border-bottom-right-radius: 3px;\r\n          border-bottom-right-radius: 3px;\r\n  -moz-border-radius-topright: 3px;\r\n  -moz-border-radius-bottomright: 3px;\r\n}\r\n\r\n.pagination-small ul > li > a,\r\n.pagination-small ul > li > span {\r\n  padding: 2px 10px;\r\n  font-size: 11.9px;\r\n}\r\n\r\n.pagination-mini ul > li > a,\r\n.pagination-mini ul > li > span {\r\n  padding: 0 6px;\r\n  font-size: 10.5px;\r\n}\r\n\r\n.pager {\r\n  margin: 20px 0;\r\n  text-align: center;\r\n  list-style: none;\r\n  *zoom: 1;\r\n}\r\n\r\n.pager:before,\r\n.pager:after {\r\n  display: table;\r\n  line-height: 0;\r\n  content: \"\";\r\n}\r\n\r\n.pager:after {\r\n  clear: both;\r\n}\r\n\r\n.pager li {\r\n  display: inline;\r\n}\r\n\r\n.pager li > a,\r\n.pager li > span {\r\n  display: inline-block;\r\n  padding: 5px 14px;\r\n  background-color: #fff;\r\n  border: 1px solid #ddd;\r\n  -webkit-border-radius: 15px;\r\n     -moz-border-radius: 15px;\r\n          border-radius: 15px;\r\n}\r\n\r\n.pager li > a:hover,\r\n.pager li > a:focus {\r\n  text-decoration: none;\r\n  background-color: #f5f5f5;\r\n}\r\n\r\n.pager .next > a,\r\n.pager .next > span {\r\n  float: right;\r\n}\r\n\r\n.pager .previous > a,\r\n.pager .previous > span {\r\n  float: left;\r\n}\r\n\r\n.pager .disabled > a,\r\n.pager .disabled > a:hover,\r\n.pager .disabled > a:focus,\r\n.pager .disabled > span {\r\n  color: #999999;\r\n  cursor: default;\r\n  background-color: #fff;\r\n}\r\n\r\n.modal-backdrop {\r\n  position: fixed;\r\n  top: 0;\r\n  right: 0;\r\n  bottom: 0;\r\n  left: 0;\r\n  z-index: 1040;\r\n  background-color: #000000;\r\n}\r\n\r\n.modal-backdrop.fade {\r\n  opacity: 0;\r\n}\r\n\r\n.modal-backdrop,\r\n.modal-backdrop.fade.in {\r\n  opacity: 0.8;\r\n  filter: alpha(opacity=80);\r\n}\r\n\r\n.modal {\r\n  position: fixed;\r\n  top: 10%;\r\n  left: 50%;\r\n  z-index: 1050;\r\n  width: 560px;\r\n  margin-left: -280px;\r\n  background-color: #ffffff;\r\n  border: 1px solid #999;\r\n  border: 1px solid rgba(0, 0, 0, 0.3);\r\n  *border: 1px solid #999;\r\n  -webkit-border-radius: 6px;\r\n     -moz-border-radius: 6px;\r\n          border-radius: 6px;\r\n  outline: none;\r\n  -webkit-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3);\r\n     -moz-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3);\r\n          box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3);\r\n  -webkit-background-clip: padding-box;\r\n     -moz-background-clip: padding-box;\r\n          background-clip: padding-box;\r\n}\r\n\r\n.modal.fade {\r\n  top: -25%;\r\n  -webkit-transition: opacity 0.3s linear, top 0.3s ease-out;\r\n     -moz-transition: opacity 0.3s linear, top 0.3s ease-out;\r\n       -o-transition: opacity 0.3s linear, top 0.3s ease-out;\r\n          transition: opacity 0.3s linear, top 0.3s ease-out;\r\n}\r\n\r\n.modal.fade.in {\r\n  top: 10%;\r\n}\r\n\r\n.modal-header {\r\n  padding: 9px 15px;\r\n  border-bottom: 1px solid #eee;\r\n}\r\n\r\n.modal-header .close {\r\n  margin-top: 2px;\r\n}\r\n\r\n.modal-header h3 {\r\n  margin: 0;\r\n  line-height: 30px;\r\n}\r\n\r\n.modal-body {\r\n  position: relative;\r\n  max-height: 400px;\r\n  padding: 15px;\r\n  overflow-y: auto;\r\n}\r\n\r\n.modal-form {\r\n  margin-bottom: 0;\r\n}\r\n\r\n.modal-footer {\r\n  padding: 14px 15px 15px;\r\n  margin-bottom: 0;\r\n  text-align: right;\r\n  background-color: #f5f5f5;\r\n  border-top: 1px solid #ddd;\r\n  -webkit-border-radius: 0 0 6px 6px;\r\n     -moz-border-radius: 0 0 6px 6px;\r\n          border-radius: 0 0 6px 6px;\r\n  *zoom: 1;\r\n  -webkit-box-shadow: inset 0 1px 0 #ffffff;\r\n     -moz-box-shadow: inset 0 1px 0 #ffffff;\r\n          box-shadow: inset 0 1px 0 #ffffff;\r\n}\r\n\r\n.modal-footer:before,\r\n.modal-footer:after {\r\n  display: table;\r\n  line-height: 0;\r\n  content: \"\";\r\n}\r\n\r\n.modal-footer:after {\r\n  clear: both;\r\n}\r\n\r\n.modal-footer .btn + .btn {\r\n  margin-bottom: 0;\r\n  margin-left: 5px;\r\n}\r\n\r\n.modal-footer .btn-group .btn + .btn {\r\n  margin-left: -1px;\r\n}\r\n\r\n.modal-footer .btn-block + .btn-block {\r\n  margin-left: 0;\r\n}\r\n\r\n.tooltip {\r\n  position: absolute;\r\n  z-index: 1030;\r\n  display: block;\r\n  font-size: 11px;\r\n  line-height: 1.4;\r\n  opacity: 0;\r\n  filter: alpha(opacity=0);\r\n  visibility: visible;\r\n}\r\n\r\n.tooltip.in {\r\n  opacity: 0.8;\r\n  filter: alpha(opacity=80);\r\n}\r\n\r\n.tooltip.top {\r\n  padding: 5px 0;\r\n  margin-top: -3px;\r\n}\r\n\r\n.tooltip.right {\r\n  padding: 0 5px;\r\n  margin-left: 3px;\r\n}\r\n\r\n.tooltip.bottom {\r\n  padding: 5px 0;\r\n  margin-top: 3px;\r\n}\r\n\r\n.tooltip.left {\r\n  padding: 0 5px;\r\n  margin-left: -3px;\r\n}\r\n\r\n.tooltip-inner {\r\n  max-width: 200px;\r\n  padding: 8px;\r\n  color: #ffffff;\r\n  text-align: center;\r\n  text-decoration: none;\r\n  background-color: #000000;\r\n  -webkit-border-radius: 4px;\r\n     -moz-border-radius: 4px;\r\n          border-radius: 4px;\r\n}\r\n\r\n.tooltip-arrow {\r\n  position: absolute;\r\n  width: 0;\r\n  height: 0;\r\n  border-color: transparent;\r\n  border-style: solid;\r\n}\r\n\r\n.tooltip.top .tooltip-arrow {\r\n  bottom: 0;\r\n  left: 50%;\r\n  margin-left: -5px;\r\n  border-top-color: #000000;\r\n  border-width: 5px 5px 0;\r\n}\r\n\r\n.tooltip.right .tooltip-arrow {\r\n  top: 50%;\r\n  left: 0;\r\n  margin-top: -5px;\r\n  border-right-color: #000000;\r\n  border-width: 5px 5px 5px 0;\r\n}\r\n\r\n.tooltip.left .tooltip-arrow {\r\n  top: 50%;\r\n  right: 0;\r\n  margin-top: -5px;\r\n  border-left-color: #000000;\r\n  border-width: 5px 0 5px 5px;\r\n}\r\n\r\n.tooltip.bottom .tooltip-arrow {\r\n  top: 0;\r\n  left: 50%;\r\n  margin-left: -5px;\r\n  border-bottom-color: #000000;\r\n  border-width: 0 5px 5px;\r\n}\r\n\r\n.popover {\r\n  position: absolute;\r\n  top: 0;\r\n  left: 0;\r\n  z-index: 1010;\r\n  display: none;\r\n  max-width: 276px;\r\n  padding: 1px;\r\n  text-align: left;\r\n  white-space: normal;\r\n  background-color: #ffffff;\r\n  border: 1px solid #ccc;\r\n  border: 1px solid rgba(0, 0, 0, 0.2);\r\n  -webkit-border-radius: 6px;\r\n     -moz-border-radius: 6px;\r\n          border-radius: 6px;\r\n  -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);\r\n     -moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);\r\n          box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);\r\n  -webkit-background-clip: padding-box;\r\n     -moz-background-clip: padding;\r\n          background-clip: padding-box;\r\n}\r\n\r\n.popover.top {\r\n  margin-top: -10px;\r\n}\r\n\r\n.popover.right {\r\n  margin-left: 10px;\r\n}\r\n\r\n.popover.bottom {\r\n  margin-top: 10px;\r\n}\r\n\r\n.popover.left {\r\n  margin-left: -10px;\r\n}\r\n\r\n.popover-title {\r\n  padding: 8px 14px;\r\n  margin: 0;\r\n  font-size: 14px;\r\n  font-weight: normal;\r\n  line-height: 18px;\r\n  background-color: #f7f7f7;\r\n  border-bottom: 1px solid #ebebeb;\r\n  -webkit-border-radius: 5px 5px 0 0;\r\n     -moz-border-radius: 5px 5px 0 0;\r\n          border-radius: 5px 5px 0 0;\r\n}\r\n\r\n.popover-title:empty {\r\n  display: none;\r\n}\r\n\r\n.popover-content {\r\n  padding: 9px 14px;\r\n}\r\n\r\n.popover .arrow,\r\n.popover .arrow:after {\r\n  position: absolute;\r\n  display: block;\r\n  width: 0;\r\n  height: 0;\r\n  border-color: transparent;\r\n  border-style: solid;\r\n}\r\n\r\n.popover .arrow {\r\n  border-width: 11px;\r\n}\r\n\r\n.popover .arrow:after {\r\n  border-width: 10px;\r\n  content: \"\";\r\n}\r\n\r\n.popover.top .arrow {\r\n  bottom: -11px;\r\n  left: 50%;\r\n  margin-left: -11px;\r\n  border-top-color: #999;\r\n  border-top-color: rgba(0, 0, 0, 0.25);\r\n  border-bottom-width: 0;\r\n}\r\n\r\n.popover.top .arrow:after {\r\n  bottom: 1px;\r\n  margin-left: -10px;\r\n  border-top-color: #ffffff;\r\n  border-bottom-width: 0;\r\n}\r\n\r\n.popover.right .arrow {\r\n  top: 50%;\r\n  left: -11px;\r\n  margin-top: -11px;\r\n  border-right-color: #999;\r\n  border-right-color: rgba(0, 0, 0, 0.25);\r\n  border-left-width: 0;\r\n}\r\n\r\n.popover.right .arrow:after {\r\n  bottom: -10px;\r\n  left: 1px;\r\n  border-right-color: #ffffff;\r\n  border-left-width: 0;\r\n}\r\n\r\n.popover.bottom .arrow {\r\n  top: -11px;\r\n  left: 50%;\r\n  margin-left: -11px;\r\n  border-bottom-color: #999;\r\n  border-bottom-color: rgba(0, 0, 0, 0.25);\r\n  border-top-width: 0;\r\n}\r\n\r\n.popover.bottom .arrow:after {\r\n  top: 1px;\r\n  margin-left: -10px;\r\n  border-bottom-color: #ffffff;\r\n  border-top-width: 0;\r\n}\r\n\r\n.popover.left .arrow {\r\n  top: 50%;\r\n  right: -11px;\r\n  margin-top: -11px;\r\n  border-left-color: #999;\r\n  border-left-color: rgba(0, 0, 0, 0.25);\r\n  border-right-width: 0;\r\n}\r\n\r\n.popover.left .arrow:after {\r\n  right: 1px;\r\n  bottom: -10px;\r\n  border-left-color: #ffffff;\r\n  border-right-width: 0;\r\n}\r\n\r\n.thumbnails {\r\n  margin-left: -20px;\r\n  list-style: none;\r\n  *zoom: 1;\r\n}\r\n\r\n.thumbnails:before,\r\n.thumbnails:after {\r\n  display: table;\r\n  line-height: 0;\r\n  content: \"\";\r\n}\r\n\r\n.thumbnails:after {\r\n  clear: both;\r\n}\r\n\r\n.row-fluid .thumbnails {\r\n  margin-left: 0;\r\n}\r\n\r\n.thumbnails > li {\r\n  float: left;\r\n  margin-bottom: 20px;\r\n  margin-left: 20px;\r\n}\r\n\r\n.thumbnail {\r\n  display: block;\r\n  padding: 4px;\r\n  line-height: 20px;\r\n  border: 1px solid #ddd;\r\n  -webkit-border-radius: 4px;\r\n     -moz-border-radius: 4px;\r\n          border-radius: 4px;\r\n  -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.055);\r\n     -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.055);\r\n          box-shadow: 0 1px 3px rgba(0, 0, 0, 0.055);\r\n  -webkit-transition: all 0.2s ease-in-out;\r\n     -moz-transition: all 0.2s ease-in-out;\r\n       -o-transition: all 0.2s ease-in-out;\r\n          transition: all 0.2s ease-in-out;\r\n}\r\n\r\na.thumbnail:hover,\r\na.thumbnail:focus {\r\n  border-color: #0088cc;\r\n  -webkit-box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25);\r\n     -moz-box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25);\r\n          box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25);\r\n}\r\n\r\n.thumbnail > img {\r\n  display: block;\r\n  max-width: 100%;\r\n  margin-right: auto;\r\n  margin-left: auto;\r\n}\r\n\r\n.thumbnail .caption {\r\n  padding: 9px;\r\n  color: #555555;\r\n}\r\n\r\n.media,\r\n.media-body {\r\n  overflow: hidden;\r\n  *overflow: visible;\r\n  zoom: 1;\r\n}\r\n\r\n.media,\r\n.media .media {\r\n  margin-top: 15px;\r\n}\r\n\r\n.media:first-child {\r\n  margin-top: 0;\r\n}\r\n\r\n.media-object {\r\n  display: block;\r\n}\r\n\r\n.media-heading {\r\n  margin: 0 0 5px;\r\n}\r\n\r\n.media > .pull-left {\r\n  margin-right: 10px;\r\n}\r\n\r\n.media > .pull-right {\r\n  margin-left: 10px;\r\n}\r\n\r\n.media-list {\r\n  margin-left: 0;\r\n  list-style: none;\r\n}\r\n\r\n.label,\r\n.badge {\r\n  display: inline-block;\r\n  padding: 2px 4px;\r\n  font-size: 11.844px;\r\n  font-weight: bold;\r\n  line-height: 14px;\r\n  color: #ffffff;\r\n  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);\r\n  white-space: nowrap;\r\n  vertical-align: baseline;\r\n  background-color: #999999;\r\n}\r\n\r\n.label {\r\n  -webkit-border-radius: 3px;\r\n     -moz-border-radius: 3px;\r\n          border-radius: 3px;\r\n}\r\n\r\n.badge {\r\n  padding-right: 9px;\r\n  padding-left: 9px;\r\n  -webkit-border-radius: 9px;\r\n     -moz-border-radius: 9px;\r\n          border-radius: 9px;\r\n}\r\n\r\n.label:empty,\r\n.badge:empty {\r\n  display: none;\r\n}\r\n\r\na.label:hover,\r\na.label:focus,\r\na.badge:hover,\r\na.badge:focus {\r\n  color: #ffffff;\r\n  text-decoration: none;\r\n  cursor: pointer;\r\n}\r\n\r\n.label-important,\r\n.badge-important {\r\n  background-color: #b94a48;\r\n}\r\n\r\n.label-important[href],\r\n.badge-important[href] {\r\n  background-color: #953b39;\r\n}\r\n\r\n.label-warning,\r\n.badge-warning {\r\n  background-color: #f89406;\r\n}\r\n\r\n.label-warning[href],\r\n.badge-warning[href] {\r\n  background-color: #c67605;\r\n}\r\n\r\n.label-success,\r\n.badge-success {\r\n  background-color: #468847;\r\n}\r\n\r\n.label-success[href],\r\n.badge-success[href] {\r\n  background-color: #356635;\r\n}\r\n\r\n.label-info,\r\n.badge-info {\r\n  background-color: #3a87ad;\r\n}\r\n\r\n.label-info[href],\r\n.badge-info[href] {\r\n  background-color: #2d6987;\r\n}\r\n\r\n.label-inverse,\r\n.badge-inverse {\r\n  background-color: #333333;\r\n}\r\n\r\n.label-inverse[href],\r\n.badge-inverse[href] {\r\n  background-color: #1a1a1a;\r\n}\r\n\r\n.btn .label,\r\n.btn .badge {\r\n  position: relative;\r\n  top: -1px;\r\n}\r\n\r\n.btn-mini .label,\r\n.btn-mini .badge {\r\n  top: 0;\r\n}\r\n\r\n@-webkit-keyframes progress-bar-stripes {\r\n  from {\r\n    background-position: 40px 0;\r\n  }\r\n  to {\r\n    background-position: 0 0;\r\n  }\r\n}\r\n\r\n@-moz-keyframes progress-bar-stripes {\r\n  from {\r\n    background-position: 40px 0;\r\n  }\r\n  to {\r\n    background-position: 0 0;\r\n  }\r\n}\r\n\r\n@-ms-keyframes progress-bar-stripes {\r\n  from {\r\n    background-position: 40px 0;\r\n  }\r\n  to {\r\n    background-position: 0 0;\r\n  }\r\n}\r\n\r\n@-o-keyframes progress-bar-stripes {\r\n  from {\r\n    background-position: 0 0;\r\n  }\r\n  to {\r\n    background-position: 40px 0;\r\n  }\r\n}\r\n\r\n@keyframes progress-bar-stripes {\r\n  from {\r\n    background-position: 40px 0;\r\n  }\r\n  to {\r\n    background-position: 0 0;\r\n  }\r\n}\r\n\r\n.progress {\r\n  height: 20px;\r\n  margin-bottom: 20px;\r\n  overflow: hidden;\r\n  background-color: #f7f7f7;\r\n  background-image: -moz-linear-gradient(top, #f5f5f5, #f9f9f9);\r\n  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f5f5f5), to(#f9f9f9));\r\n  background-image: -webkit-linear-gradient(top, #f5f5f5, #f9f9f9);\r\n  background-image: -o-linear-gradient(top, #f5f5f5, #f9f9f9);\r\n  background-image: linear-gradient(to bottom, #f5f5f5, #f9f9f9);\r\n  background-repeat: repeat-x;\r\n  -webkit-border-radius: 4px;\r\n     -moz-border-radius: 4px;\r\n          border-radius: 4px;\r\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#fff9f9f9', GradientType=0);\r\n  -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);\r\n     -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);\r\n          box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);\r\n}\r\n\r\n.progress .bar {\r\n  float: left;\r\n  width: 0;\r\n  height: 100%;\r\n  font-size: 12px;\r\n  color: #ffffff;\r\n  text-align: center;\r\n  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);\r\n  background-color: #0e90d2;\r\n  background-image: -moz-linear-gradient(top, #149bdf, #0480be);\r\n  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#149bdf), to(#0480be));\r\n  background-image: -webkit-linear-gradient(top, #149bdf, #0480be);\r\n  background-image: -o-linear-gradient(top, #149bdf, #0480be);\r\n  background-image: linear-gradient(to bottom, #149bdf, #0480be);\r\n  background-repeat: repeat-x;\r\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff149bdf', endColorstr='#ff0480be', GradientType=0);\r\n  -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);\r\n     -moz-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);\r\n          box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);\r\n  -webkit-box-sizing: border-box;\r\n     -moz-box-sizing: border-box;\r\n          box-sizing: border-box;\r\n  -webkit-transition: width 0.6s ease;\r\n     -moz-transition: width 0.6s ease;\r\n       -o-transition: width 0.6s ease;\r\n          transition: width 0.6s ease;\r\n}\r\n\r\n.progress .bar + .bar {\r\n  -webkit-box-shadow: inset 1px 0 0 rgba(0, 0, 0, 0.15), inset 0 -1px 0 rgba(0, 0, 0, 0.15);\r\n     -moz-box-shadow: inset 1px 0 0 rgba(0, 0, 0, 0.15), inset 0 -1px 0 rgba(0, 0, 0, 0.15);\r\n          box-shadow: inset 1px 0 0 rgba(0, 0, 0, 0.15), inset 0 -1px 0 rgba(0, 0, 0, 0.15);\r\n}\r\n\r\n.progress-striped .bar {\r\n  background-color: #149bdf;\r\n  background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));\r\n  background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\r\n  background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\r\n  background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\r\n  background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\r\n  -webkit-background-size: 40px 40px;\r\n     -moz-background-size: 40px 40px;\r\n       -o-background-size: 40px 40px;\r\n          background-size: 40px 40px;\r\n}\r\n\r\n.progress.active .bar {\r\n  -webkit-animation: progress-bar-stripes 2s linear infinite;\r\n     -moz-animation: progress-bar-stripes 2s linear infinite;\r\n      -ms-animation: progress-bar-stripes 2s linear infinite;\r\n       -o-animation: progress-bar-stripes 2s linear infinite;\r\n          animation: progress-bar-stripes 2s linear infinite;\r\n}\r\n\r\n.progress-danger .bar,\r\n.progress .bar-danger {\r\n  background-color: #dd514c;\r\n  background-image: -moz-linear-gradient(top, #ee5f5b, #c43c35);\r\n  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#c43c35));\r\n  background-image: -webkit-linear-gradient(top, #ee5f5b, #c43c35);\r\n  background-image: -o-linear-gradient(top, #ee5f5b, #c43c35);\r\n  background-image: linear-gradient(to bottom, #ee5f5b, #c43c35);\r\n  background-repeat: repeat-x;\r\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b', endColorstr='#ffc43c35', GradientType=0);\r\n}\r\n\r\n.progress-danger.progress-striped .bar,\r\n.progress-striped .bar-danger {\r\n  background-color: #ee5f5b;\r\n  background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));\r\n  background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\r\n  background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\r\n  background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\r\n  background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\r\n}\r\n\r\n.progress-success .bar,\r\n.progress .bar-success {\r\n  background-color: #5eb95e;\r\n  background-image: -moz-linear-gradient(top, #62c462, #57a957);\r\n  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#57a957));\r\n  background-image: -webkit-linear-gradient(top, #62c462, #57a957);\r\n  background-image: -o-linear-gradient(top, #62c462, #57a957);\r\n  background-image: linear-gradient(to bottom, #62c462, #57a957);\r\n  background-repeat: repeat-x;\r\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff62c462', endColorstr='#ff57a957', GradientType=0);\r\n}\r\n\r\n.progress-success.progress-striped .bar,\r\n.progress-striped .bar-success {\r\n  background-color: #62c462;\r\n  background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));\r\n  background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\r\n  background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\r\n  background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\r\n  background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\r\n}\r\n\r\n.progress-info .bar,\r\n.progress .bar-info {\r\n  background-color: #4bb1cf;\r\n  background-image: -moz-linear-gradient(top, #5bc0de, #339bb9);\r\n  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#339bb9));\r\n  background-image: -webkit-linear-gradient(top, #5bc0de, #339bb9);\r\n  background-image: -o-linear-gradient(top, #5bc0de, #339bb9);\r\n  background-image: linear-gradient(to bottom, #5bc0de, #339bb9);\r\n  background-repeat: repeat-x;\r\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff339bb9', GradientType=0);\r\n}\r\n\r\n.progress-info.progress-striped .bar,\r\n.progress-striped .bar-info {\r\n  background-color: #5bc0de;\r\n  background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));\r\n  background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\r\n  background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\r\n  background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\r\n  background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\r\n}\r\n\r\n.progress-warning .bar,\r\n.progress .bar-warning {\r\n  background-color: #faa732;\r\n  background-image: -moz-linear-gradient(top, #fbb450, #f89406);\r\n  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fbb450), to(#f89406));\r\n  background-image: -webkit-linear-gradient(top, #fbb450, #f89406);\r\n  background-image: -o-linear-gradient(top, #fbb450, #f89406);\r\n  background-image: linear-gradient(to bottom, #fbb450, #f89406);\r\n  background-repeat: repeat-x;\r\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffbb450', endColorstr='#fff89406', GradientType=0);\r\n}\r\n\r\n.progress-warning.progress-striped .bar,\r\n.progress-striped .bar-warning {\r\n  background-color: #fbb450;\r\n  background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));\r\n  background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\r\n  background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\r\n  background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\r\n  background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\r\n}\r\n\r\n.accordion {\r\n  margin-bottom: 20px;\r\n}\r\n\r\n.accordion-group {\r\n  margin-bottom: 2px;\r\n  border: 1px solid #e5e5e5;\r\n  -webkit-border-radius: 4px;\r\n     -moz-border-radius: 4px;\r\n          border-radius: 4px;\r\n}\r\n\r\n.accordion-heading {\r\n  border-bottom: 0;\r\n}\r\n\r\n.accordion-heading .accordion-toggle {\r\n  display: block;\r\n  padding: 8px 15px;\r\n}\r\n\r\n.accordion-toggle {\r\n  cursor: pointer;\r\n}\r\n\r\n.accordion-inner {\r\n  padding: 9px 15px;\r\n  border-top: 1px solid #e5e5e5;\r\n}\r\n\r\n.carousel {\r\n  position: relative;\r\n  margin-bottom: 20px;\r\n  line-height: 1;\r\n}\r\n\r\n.carousel-inner {\r\n  position: relative;\r\n  width: 100%;\r\n  overflow: hidden;\r\n}\r\n\r\n.carousel-inner > .item {\r\n  position: relative;\r\n  display: none;\r\n  -webkit-transition: 0.6s ease-in-out left;\r\n     -moz-transition: 0.6s ease-in-out left;\r\n       -o-transition: 0.6s ease-in-out left;\r\n          transition: 0.6s ease-in-out left;\r\n}\r\n\r\n.carousel-inner > .item > img,\r\n.carousel-inner > .item > a > img {\r\n  display: block;\r\n  line-height: 1;\r\n}\r\n\r\n.carousel-inner > .active,\r\n.carousel-inner > .next,\r\n.carousel-inner > .prev {\r\n  display: block;\r\n}\r\n\r\n.carousel-inner > .active {\r\n  left: 0;\r\n}\r\n\r\n.carousel-inner > .next,\r\n.carousel-inner > .prev {\r\n  position: absolute;\r\n  top: 0;\r\n  width: 100%;\r\n}\r\n\r\n.carousel-inner > .next {\r\n  left: 100%;\r\n}\r\n\r\n.carousel-inner > .prev {\r\n  left: -100%;\r\n}\r\n\r\n.carousel-inner > .next.left,\r\n.carousel-inner > .prev.right {\r\n  left: 0;\r\n}\r\n\r\n.carousel-inner > .active.left {\r\n  left: -100%;\r\n}\r\n\r\n.carousel-inner > .active.right {\r\n  left: 100%;\r\n}\r\n\r\n.carousel-control {\r\n  position: absolute;\r\n  top: 40%;\r\n  left: 15px;\r\n  width: 40px;\r\n  height: 40px;\r\n  margin-top: -20px;\r\n  font-size: 60px;\r\n  font-weight: 100;\r\n  line-height: 30px;\r\n  color: #ffffff;\r\n  text-align: center;\r\n  background: #222222;\r\n  border: 3px solid #ffffff;\r\n  -webkit-border-radius: 23px;\r\n     -moz-border-radius: 23px;\r\n          border-radius: 23px;\r\n  opacity: 0.5;\r\n  filter: alpha(opacity=50);\r\n}\r\n\r\n.carousel-control.right {\r\n  right: 15px;\r\n  left: auto;\r\n}\r\n\r\n.carousel-control:hover,\r\n.carousel-control:focus {\r\n  color: #ffffff;\r\n  text-decoration: none;\r\n  opacity: 0.9;\r\n  filter: alpha(opacity=90);\r\n}\r\n\r\n.carousel-indicators {\r\n  position: absolute;\r\n  top: 15px;\r\n  right: 15px;\r\n  z-index: 5;\r\n  margin: 0;\r\n  list-style: none;\r\n}\r\n\r\n.carousel-indicators li {\r\n  display: block;\r\n  float: left;\r\n  width: 10px;\r\n  height: 10px;\r\n  margin-left: 5px;\r\n  text-indent: -999px;\r\n  background-color: #ccc;\r\n  background-color: rgba(255, 255, 255, 0.25);\r\n  border-radius: 5px;\r\n}\r\n\r\n.carousel-indicators .active {\r\n  background-color: #fff;\r\n}\r\n\r\n.carousel-caption {\r\n  position: absolute;\r\n  right: 0;\r\n  bottom: 0;\r\n  left: 0;\r\n  padding: 15px;\r\n  background: #333333;\r\n  background: rgba(0, 0, 0, 0.75);\r\n}\r\n\r\n.carousel-caption h4,\r\n.carousel-caption p {\r\n  line-height: 20px;\r\n  color: #ffffff;\r\n}\r\n\r\n.carousel-caption h4 {\r\n  margin: 0 0 5px;\r\n}\r\n\r\n.carousel-caption p {\r\n  margin-bottom: 0;\r\n}\r\n\r\n.hero-unit {\r\n  padding: 60px;\r\n  margin-bottom: 30px;\r\n  font-size: 18px;\r\n  font-weight: 200;\r\n  line-height: 30px;\r\n  color: inherit;\r\n  background-color: #eeeeee;\r\n  -webkit-border-radius: 6px;\r\n     -moz-border-radius: 6px;\r\n          border-radius: 6px;\r\n}\r\n\r\n.hero-unit h1 {\r\n  margin-bottom: 0;\r\n  font-size: 60px;\r\n  line-height: 1;\r\n  letter-spacing: -1px;\r\n  color: inherit;\r\n}\r\n\r\n.hero-unit li {\r\n  line-height: 30px;\r\n}\r\n\r\n.pull-right {\r\n  float: right;\r\n}\r\n\r\n.pull-left {\r\n  float: left;\r\n}\r\n\r\n.hide {\r\n  display: none;\r\n}\r\n\r\n.show {\r\n  display: block;\r\n}\r\n\r\n.invisible {\r\n  visibility: hidden;\r\n}\r\n\r\n.affix {\r\n  position: fixed;\r\n}\r\n"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.REST.SocialMedia/AccountManagement.EntryPoint/vendor/js/backbone.js",
    "content": "// Backbone.js\r\n// ===========\r\n\r\n// > (c) 2010-2012 Jeremy Ashkenas, DocumentCloud Inc.\r\n// > Backbone may be freely distributed under the MIT license.\r\n// > For all details and documentation: http://backbonejs.org\r\n\r\n// Initial Setup\r\n// -------------\r\n\r\n(function(){\r\n\r\n  // Save a reference to the global object (`window` in the browser, `exports`\r\n  // on the server).\r\n  var root = this;\r\n\r\n  // Save the previous value of the `Backbone` variable, so that it can be\r\n  // restored later on, if `noConflict` is used.\r\n  var previousBackbone = root.Backbone;\r\n\r\n  // Create a local reference to array methods.\r\n  var array = [];\r\n  var push = array.push;\r\n  var slice = array.slice;\r\n  var splice = array.splice;\r\n\r\n  // The top-level namespace. All public Backbone classes and modules will\r\n  // be attached to this. Exported for both CommonJS and the browser.\r\n  var Backbone;\r\n  if (typeof exports !== 'undefined') {\r\n    Backbone = exports;\r\n  } else {\r\n    Backbone = root.Backbone = {};\r\n  }\r\n\r\n  // Current version of the library. Keep in sync with `package.json`.\r\n  Backbone.VERSION = '0.9.10';\r\n\r\n  // Require Underscore, if we're on the server, and it's not already present.\r\n  var _ = root._;\r\n  if (!_ && (typeof require !== 'undefined')) _ = require('underscore');\r\n\r\n  // For Backbone's purposes, jQuery, Zepto, or Ender owns the `$` variable.\r\n  Backbone.$ = root.jQuery || root.Zepto || root.ender;\r\n\r\n  // Runs Backbone.js in *noConflict* mode, returning the `Backbone` variable\r\n  // to its previous owner. Returns a reference to this Backbone object.\r\n  Backbone.noConflict = function() {\r\n    root.Backbone = previousBackbone;\r\n    return this;\r\n  };\r\n\r\n  // Turn on `emulateHTTP` to support legacy HTTP servers. Setting this option\r\n  // will fake `\"PUT\"` and `\"DELETE\"` requests via the `_method` parameter and\r\n  // set a `X-Http-Method-Override` header.\r\n  Backbone.emulateHTTP = false;\r\n\r\n  // Turn on `emulateJSON` to support legacy servers that can't deal with direct\r\n  // `application/json` requests ... will encode the body as\r\n  // `application/x-www-form-urlencoded` instead and will send the model in a\r\n  // form param named `model`.\r\n  Backbone.emulateJSON = false;\r\n\r\n  // Backbone.Events\r\n  // ---------------\r\n\r\n  // Regular expression used to split event strings.\r\n  var eventSplitter = /\\s+/;\r\n\r\n  // Implement fancy features of the Events API such as multiple event\r\n  // names `\"change blur\"` and jQuery-style event maps `{change: action}`\r\n  // in terms of the existing API.\r\n  var eventsApi = function(obj, action, name, rest) {\r\n    if (!name) return true;\r\n    if (typeof name === 'object') {\r\n      for (var key in name) {\r\n        obj[action].apply(obj, [key, name[key]].concat(rest));\r\n      }\r\n    } else if (eventSplitter.test(name)) {\r\n      var names = name.split(eventSplitter);\r\n      for (var i = 0, l = names.length; i < l; i++) {\r\n        obj[action].apply(obj, [names[i]].concat(rest));\r\n      }\r\n    } else {\r\n      return true;\r\n    }\r\n  };\r\n\r\n  // Optimized internal dispatch function for triggering events. Tries to\r\n  // keep the usual cases speedy (most Backbone events have 3 arguments).\r\n  var triggerEvents = function(events, args) {\r\n    var ev, i = -1, l = events.length;\r\n    switch (args.length) {\r\n    case 0: while (++i < l) (ev = events[i]).callback.call(ev.ctx);\r\n    return;\r\n    case 1: while (++i < l) (ev = events[i]).callback.call(ev.ctx, args[0]);\r\n    return;\r\n    case 2: while (++i < l) (ev = events[i]).callback.call(ev.ctx, args[0], args[1]);\r\n    return;\r\n    case 3: while (++i < l) (ev = events[i]).callback.call(ev.ctx, args[0], args[1], args[2]);\r\n    return;\r\n    default: while (++i < l) (ev = events[i]).callback.apply(ev.ctx, args);\r\n    }\r\n  };\r\n\r\n  // A module that can be mixed in to *any object* in order to provide it with\r\n  // custom events. You may bind with `on` or remove with `off` callback\r\n  // functions to an event; `trigger`-ing an event fires all callbacks in\r\n  // succession.\r\n  var Events = Backbone.Events = {\r\n\r\n    // Bind one or more space separated events, or an events map,\r\n    // to a `callback` function. Passing `\"all\"` will bind the callback to\r\n    // all events fired.\r\n    on: function(name, callback, context) {\r\n      if (!(eventsApi(this, 'on', name, [callback, context]) && callback)) return this;\r\n      this._events || (this._events = {});\r\n      var list = this._events[name] || (this._events[name] = []);\r\n      list.push({callback: callback, context: context, ctx: context || this});\r\n      return this;\r\n    },\r\n\r\n    // Bind events to only be triggered a single time. After the first time\r\n    // the callback is invoked, it will be removed.\r\n    once: function(name, callback, context) {\r\n      if (!(eventsApi(this, 'once', name, [callback, context]) && callback)) return this;\r\n      var self = this;\r\n      var once = _.once(function() {\r\n        self.off(name, once);\r\n        callback.apply(this, arguments);\r\n      });\r\n      once._callback = callback;\r\n      this.on(name, once, context);\r\n      return this;\r\n    },\r\n\r\n    // Remove one or many callbacks. If `context` is null, removes all\r\n    // callbacks with that function. If `callback` is null, removes all\r\n    // callbacks for the event. If `name` is null, removes all bound\r\n    // callbacks for all events.\r\n    off: function(name, callback, context) {\r\n      var list, ev, events, names, i, l, j, k;\r\n      if (!this._events || !eventsApi(this, 'off', name, [callback, context])) return this;\r\n      if (!name && !callback && !context) {\r\n        this._events = {};\r\n        return this;\r\n      }\r\n\r\n      names = name ? [name] : _.keys(this._events);\r\n      for (i = 0, l = names.length; i < l; i++) {\r\n        name = names[i];\r\n        if (list = this._events[name]) {\r\n          events = [];\r\n          if (callback || context) {\r\n            for (j = 0, k = list.length; j < k; j++) {\r\n              ev = list[j];\r\n              if ((callback && callback !== ev.callback &&\r\n                               callback !== ev.callback._callback) ||\r\n                  (context && context !== ev.context)) {\r\n                events.push(ev);\r\n              }\r\n            }\r\n          }\r\n          this._events[name] = events;\r\n        }\r\n      }\r\n\r\n      return this;\r\n    },\r\n\r\n    // Trigger one or many events, firing all bound callbacks. Callbacks are\r\n    // passed the same arguments as `trigger` is, apart from the event name\r\n    // (unless you're listening on `\"all\"`, which will cause your callback to\r\n    // receive the true name of the event as the first argument).\r\n    trigger: function(name) {\r\n      if (!this._events) return this;\r\n      var args = slice.call(arguments, 1);\r\n      if (!eventsApi(this, 'trigger', name, args)) return this;\r\n      var events = this._events[name];\r\n      var allEvents = this._events.all;\r\n      if (events) triggerEvents(events, args);\r\n      if (allEvents) triggerEvents(allEvents, arguments);\r\n      return this;\r\n    },\r\n\r\n    // An inversion-of-control version of `on`. Tell *this* object to listen to\r\n    // an event in another object ... keeping track of what it's listening to.\r\n    listenTo: function(obj, name, callback) {\r\n      var listeners = this._listeners || (this._listeners = {});\r\n      var id = obj._listenerId || (obj._listenerId = _.uniqueId('l'));\r\n      listeners[id] = obj;\r\n      obj.on(name, typeof name === 'object' ? this : callback, this);\r\n      return this;\r\n    },\r\n\r\n    // Tell this object to stop listening to either specific events ... or\r\n    // to every object it's currently listening to.\r\n    stopListening: function(obj, name, callback) {\r\n      var listeners = this._listeners;\r\n      if (!listeners) return;\r\n      if (obj) {\r\n        obj.off(name, typeof name === 'object' ? this : callback, this);\r\n        if (!name && !callback) delete listeners[obj._listenerId];\r\n      } else {\r\n        if (typeof name === 'object') callback = this;\r\n        for (var id in listeners) {\r\n          listeners[id].off(name, callback, this);\r\n        }\r\n        this._listeners = {};\r\n      }\r\n      return this;\r\n    }\r\n  };\r\n\r\n  // Aliases for backwards compatibility.\r\n  Events.bind   = Events.on;\r\n  Events.unbind = Events.off;\r\n\r\n  // Allow the `Backbone` object to serve as a global event bus, for folks who\r\n  // want global \"pubsub\" in a convenient place.\r\n  _.extend(Backbone, Events);\r\n\r\n  // Backbone.Model\r\n  // --------------\r\n\r\n  // Create a new model, with defined attributes. A client id (`cid`)\r\n  // is automatically generated and assigned for you.\r\n  var Model = Backbone.Model = function(attributes, options) {\r\n    var defaults;\r\n    var attrs = attributes || {};\r\n    this.cid = _.uniqueId('c');\r\n    this.attributes = {};\r\n    if (options && options.collection) this.collection = options.collection;\r\n    if (options && options.parse) attrs = this.parse(attrs, options) || {};\r\n    if (defaults = _.result(this, 'defaults')) {\r\n      attrs = _.defaults({}, attrs, defaults);\r\n    }\r\n    this.set(attrs, options);\r\n    this.changed = {};\r\n    this.initialize.apply(this, arguments);\r\n  };\r\n\r\n  // Attach all inheritable methods to the Model prototype.\r\n  _.extend(Model.prototype, Events, {\r\n\r\n    // A hash of attributes whose current and previous value differ.\r\n    changed: null,\r\n\r\n    // The default name for the JSON `id` attribute is `\"id\"`. MongoDB and\r\n    // CouchDB users may want to set this to `\"_id\"`.\r\n    idAttribute: 'id',\r\n\r\n    // Initialize is an empty function by default. Override it with your own\r\n    // initialization logic.\r\n    initialize: function(){},\r\n\r\n    // Return a copy of the model's `attributes` object.\r\n    toJSON: function(options) {\r\n      return _.clone(this.attributes);\r\n    },\r\n\r\n    // Proxy `Backbone.sync` by default.\r\n    sync: function() {\r\n      return Backbone.sync.apply(this, arguments);\r\n    },\r\n\r\n    // Get the value of an attribute.\r\n    get: function(attr) {\r\n      return this.attributes[attr];\r\n    },\r\n\r\n    // Get the HTML-escaped value of an attribute.\r\n    escape: function(attr) {\r\n      return _.escape(this.get(attr));\r\n    },\r\n\r\n    // Returns `true` if the attribute contains a value that is not null\r\n    // or undefined.\r\n    has: function(attr) {\r\n      return this.get(attr) != null;\r\n    },\r\n\r\n    // ----------------------------------------------------------------------\r\n\r\n    // Set a hash of model attributes on the object, firing `\"change\"` unless\r\n    // you choose to silence it.\r\n    set: function(key, val, options) {\r\n      var attr, attrs, unset, changes, silent, changing, prev, current;\r\n      if (key == null) return this;\r\n\r\n      // Handle both `\"key\", value` and `{key: value}` -style arguments.\r\n      if (typeof key === 'object') {\r\n        attrs = key;\r\n        options = val;\r\n      } else {\r\n        (attrs = {})[key] = val;\r\n      }\r\n\r\n      options || (options = {});\r\n\r\n      // Run validation.\r\n      if (!this._validate(attrs, options)) return false;\r\n\r\n      // Extract attributes and options.\r\n      unset           = options.unset;\r\n      silent          = options.silent;\r\n      changes         = [];\r\n      changing        = this._changing;\r\n      this._changing  = true;\r\n\r\n      if (!changing) {\r\n        this._previousAttributes = _.clone(this.attributes);\r\n        this.changed = {};\r\n      }\r\n      current = this.attributes, prev = this._previousAttributes;\r\n\r\n      // Check for changes of `id`.\r\n      if (this.idAttribute in attrs) this.id = attrs[this.idAttribute];\r\n\r\n      // For each `set` attribute, update or delete the current value.\r\n      for (attr in attrs) {\r\n        val = attrs[attr];\r\n        if (!_.isEqual(current[attr], val)) changes.push(attr);\r\n        if (!_.isEqual(prev[attr], val)) {\r\n          this.changed[attr] = val;\r\n        } else {\r\n          delete this.changed[attr];\r\n        }\r\n        unset ? delete current[attr] : current[attr] = val;\r\n      }\r\n\r\n      // Trigger all relevant attribute changes.\r\n      if (!silent) {\r\n        if (changes.length) this._pending = true;\r\n        for (var i = 0, l = changes.length; i < l; i++) {\r\n          this.trigger('change:' + changes[i], this, current[changes[i]], options);\r\n        }\r\n      }\r\n\r\n      if (changing) return this;\r\n      if (!silent) {\r\n        while (this._pending) {\r\n          this._pending = false;\r\n          this.trigger('change', this, options);\r\n        }\r\n      }\r\n      this._pending = false;\r\n      this._changing = false;\r\n      return this;\r\n    },\r\n\r\n    // Remove an attribute from the model, firing `\"change\"` unless you choose\r\n    // to silence it. `unset` is a noop if the attribute doesn't exist.\r\n    unset: function(attr, options) {\r\n      return this.set(attr, void 0, _.extend({}, options, {unset: true}));\r\n    },\r\n\r\n    // Clear all attributes on the model, firing `\"change\"` unless you choose\r\n    // to silence it.\r\n    clear: function(options) {\r\n      var attrs = {};\r\n      for (var key in this.attributes) attrs[key] = void 0;\r\n      return this.set(attrs, _.extend({}, options, {unset: true}));\r\n    },\r\n\r\n    // Determine if the model has changed since the last `\"change\"` event.\r\n    // If you specify an attribute name, determine if that attribute has changed.\r\n    hasChanged: function(attr) {\r\n      if (attr == null) return !_.isEmpty(this.changed);\r\n      return _.has(this.changed, attr);\r\n    },\r\n\r\n    // Return an object containing all the attributes that have changed, or\r\n    // false if there are no changed attributes. Useful for determining what\r\n    // parts of a view need to be updated and/or what attributes need to be\r\n    // persisted to the server. Unset attributes will be set to undefined.\r\n    // You can also pass an attributes object to diff against the model,\r\n    // determining if there *would be* a change.\r\n    changedAttributes: function(diff) {\r\n      if (!diff) return this.hasChanged() ? _.clone(this.changed) : false;\r\n      var val, changed = false;\r\n      var old = this._changing ? this._previousAttributes : this.attributes;\r\n      for (var attr in diff) {\r\n        if (_.isEqual(old[attr], (val = diff[attr]))) continue;\r\n        (changed || (changed = {}))[attr] = val;\r\n      }\r\n      return changed;\r\n    },\r\n\r\n    // Get the previous value of an attribute, recorded at the time the last\r\n    // `\"change\"` event was fired.\r\n    previous: function(attr) {\r\n      if (attr == null || !this._previousAttributes) return null;\r\n      return this._previousAttributes[attr];\r\n    },\r\n\r\n    // Get all of the attributes of the model at the time of the previous\r\n    // `\"change\"` event.\r\n    previousAttributes: function() {\r\n      return _.clone(this._previousAttributes);\r\n    },\r\n\r\n    // ---------------------------------------------------------------------\r\n\r\n    // Fetch the model from the server. If the server's representation of the\r\n    // model differs from its current attributes, they will be overriden,\r\n    // triggering a `\"change\"` event.\r\n    fetch: function(options) {\r\n      options = options ? _.clone(options) : {};\r\n      if (options.parse === void 0) options.parse = true;\r\n      var success = options.success;\r\n      options.success = function(model, resp, options) {\r\n        if (!model.set(model.parse(resp, options), options)) return false;\r\n        if (success) success(model, resp, options);\r\n      };\r\n      return this.sync('read', this, options);\r\n    },\r\n\r\n    // Set a hash of model attributes, and sync the model to the server.\r\n    // If the server returns an attributes hash that differs, the model's\r\n    // state will be `set` again.\r\n    save: function(key, val, options) {\r\n      var attrs, success, method, xhr, attributes = this.attributes;\r\n\r\n      // Handle both `\"key\", value` and `{key: value}` -style arguments.\r\n      if (key == null || typeof key === 'object') {\r\n        attrs = key;\r\n        options = val;\r\n      } else {\r\n        (attrs = {})[key] = val;\r\n      }\r\n\r\n      // If we're not waiting and attributes exist, save acts as `set(attr).save(null, opts)`.\r\n      if (attrs && (!options || !options.wait) && !this.set(attrs, options)) return false;\r\n\r\n      options = _.extend({validate: true}, options);\r\n\r\n      // Do not persist invalid models.\r\n      if (!this._validate(attrs, options)) return false;\r\n\r\n      // Set temporary attributes if `{wait: true}`.\r\n      if (attrs && options.wait) {\r\n        this.attributes = _.extend({}, attributes, attrs);\r\n      }\r\n\r\n      // After a successful server-side save, the client is (optionally)\r\n      // updated with the server-side state.\r\n      if (options.parse === void 0) options.parse = true;\r\n      success = options.success;\r\n      options.success = function(model, resp, options) {\r\n        // Ensure attributes are restored during synchronous saves.\r\n        model.attributes = attributes;\r\n        var serverAttrs = model.parse(resp, options);\r\n        if (options.wait) serverAttrs = _.extend(attrs || {}, serverAttrs);\r\n        if (_.isObject(serverAttrs) && !model.set(serverAttrs, options)) {\r\n          return false;\r\n        }\r\n        if (success) success(model, resp, options);\r\n      };\r\n\r\n      // Finish configuring and sending the Ajax request.\r\n      method = this.isNew() ? 'create' : (options.patch ? 'patch' : 'update');\r\n      if (method === 'patch') options.attrs = attrs;\r\n      xhr = this.sync(method, this, options);\r\n\r\n      // Restore attributes.\r\n      if (attrs && options.wait) this.attributes = attributes;\r\n\r\n      return xhr;\r\n    },\r\n\r\n    // Destroy this model on the server if it was already persisted.\r\n    // Optimistically removes the model from its collection, if it has one.\r\n    // If `wait: true` is passed, waits for the server to respond before removal.\r\n    destroy: function(options) {\r\n      options = options ? _.clone(options) : {};\r\n      var model = this;\r\n      var success = options.success;\r\n\r\n      var destroy = function() {\r\n        model.trigger('destroy', model, model.collection, options);\r\n      };\r\n\r\n      options.success = function(model, resp, options) {\r\n        if (options.wait || model.isNew()) destroy();\r\n        if (success) success(model, resp, options);\r\n      };\r\n\r\n      if (this.isNew()) {\r\n        options.success(this, null, options);\r\n        return false;\r\n      }\r\n\r\n      var xhr = this.sync('delete', this, options);\r\n      if (!options.wait) destroy();\r\n      return xhr;\r\n    },\r\n\r\n    // Default URL for the model's representation on the server -- if you're\r\n    // using Backbone's restful methods, override this to change the endpoint\r\n    // that will be called.\r\n    url: function() {\r\n      var base = _.result(this, 'urlRoot') || _.result(this.collection, 'url') || urlError();\r\n      if (this.isNew()) return base;\r\n      return base + (base.charAt(base.length - 1) === '/' ? '' : '/') + encodeURIComponent(this.id);\r\n    },\r\n\r\n    // **parse** converts a response into the hash of attributes to be `set` on\r\n    // the model. The default implementation is just to pass the response along.\r\n    parse: function(resp, options) {\r\n      return resp;\r\n    },\r\n\r\n    // Create a new model with identical attributes to this one.\r\n    clone: function() {\r\n      return new this.constructor(this.attributes);\r\n    },\r\n\r\n    // A model is new if it has never been saved to the server, and lacks an id.\r\n    isNew: function() {\r\n      return this.id == null;\r\n    },\r\n\r\n    // Check if the model is currently in a valid state.\r\n    isValid: function(options) {\r\n      return !this.validate || !this.validate(this.attributes, options);\r\n    },\r\n\r\n    // Run validation against the next complete set of model attributes,\r\n    // returning `true` if all is well. Otherwise, fire a general\r\n    // `\"error\"` event and call the error callback, if specified.\r\n    _validate: function(attrs, options) {\r\n      if (!options.validate || !this.validate) return true;\r\n      attrs = _.extend({}, this.attributes, attrs);\r\n      var error = this.validationError = this.validate(attrs, options) || null;\r\n      if (!error) return true;\r\n      this.trigger('invalid', this, error, options || {});\r\n      return false;\r\n    }\r\n\r\n  });\r\n\r\n  // Backbone.Collection\r\n  // -------------------\r\n\r\n  // Provides a standard collection class for our sets of models, ordered\r\n  // or unordered. If a `comparator` is specified, the Collection will maintain\r\n  // its models in sort order, as they're added and removed.\r\n  var Collection = Backbone.Collection = function(models, options) {\r\n    options || (options = {});\r\n    if (options.model) this.model = options.model;\r\n    if (options.comparator !== void 0) this.comparator = options.comparator;\r\n    this.models = [];\r\n    this._reset();\r\n    this.initialize.apply(this, arguments);\r\n    if (models) this.reset(models, _.extend({silent: true}, options));\r\n  };\r\n\r\n  // Define the Collection's inheritable methods.\r\n  _.extend(Collection.prototype, Events, {\r\n\r\n    // The default model for a collection is just a **Backbone.Model**.\r\n    // This should be overridden in most cases.\r\n    model: Model,\r\n\r\n    // Initialize is an empty function by default. Override it with your own\r\n    // initialization logic.\r\n    initialize: function(){},\r\n\r\n    // The JSON representation of a Collection is an array of the\r\n    // models' attributes.\r\n    toJSON: function(options) {\r\n      return this.map(function(model){ return model.toJSON(options); });\r\n    },\r\n\r\n    // Proxy `Backbone.sync` by default.\r\n    sync: function() {\r\n      return Backbone.sync.apply(this, arguments);\r\n    },\r\n\r\n    // Add a model, or list of models to the set.\r\n    add: function(models, options) {\r\n      models = _.isArray(models) ? models.slice() : [models];\r\n      options || (options = {});\r\n      var i, l, model, attrs, existing, doSort, add, at, sort, sortAttr;\r\n      add = [];\r\n      at = options.at;\r\n      sort = this.comparator && (at == null) && options.sort != false;\r\n      sortAttr = _.isString(this.comparator) ? this.comparator : null;\r\n\r\n      // Turn bare objects into model references, and prevent invalid models\r\n      // from being added.\r\n      for (i = 0, l = models.length; i < l; i++) {\r\n        if (!(model = this._prepareModel(attrs = models[i], options))) {\r\n          this.trigger('invalid', this, attrs, options);\r\n          continue;\r\n        }\r\n\r\n        // If a duplicate is found, prevent it from being added and\r\n        // optionally merge it into the existing model.\r\n        if (existing = this.get(model)) {\r\n          if (options.merge) {\r\n            existing.set(attrs === model ? model.attributes : attrs, options);\r\n            if (sort && !doSort && existing.hasChanged(sortAttr)) doSort = true;\r\n          }\r\n          continue;\r\n        }\r\n\r\n        // This is a new model, push it to the `add` list.\r\n        add.push(model);\r\n\r\n        // Listen to added models' events, and index models for lookup by\r\n        // `id` and by `cid`.\r\n        model.on('all', this._onModelEvent, this);\r\n        this._byId[model.cid] = model;\r\n        if (model.id != null) this._byId[model.id] = model;\r\n      }\r\n\r\n      // See if sorting is needed, update `length` and splice in new models.\r\n      if (add.length) {\r\n        if (sort) doSort = true;\r\n        this.length += add.length;\r\n        if (at != null) {\r\n          splice.apply(this.models, [at, 0].concat(add));\r\n        } else {\r\n          push.apply(this.models, add);\r\n        }\r\n      }\r\n\r\n      // Silently sort the collection if appropriate.\r\n      if (doSort) this.sort({silent: true});\r\n\r\n      if (options.silent) return this;\r\n\r\n      // Trigger `add` events.\r\n      for (i = 0, l = add.length; i < l; i++) {\r\n        (model = add[i]).trigger('add', model, this, options);\r\n      }\r\n\r\n      // Trigger `sort` if the collection was sorted.\r\n      if (doSort) this.trigger('sort', this, options);\r\n\r\n      return this;\r\n    },\r\n\r\n    // Remove a model, or a list of models from the set.\r\n    remove: function(models, options) {\r\n      models = _.isArray(models) ? models.slice() : [models];\r\n      options || (options = {});\r\n      var i, l, index, model;\r\n      for (i = 0, l = models.length; i < l; i++) {\r\n        model = this.get(models[i]);\r\n        if (!model) continue;\r\n        delete this._byId[model.id];\r\n        delete this._byId[model.cid];\r\n        index = this.indexOf(model);\r\n        this.models.splice(index, 1);\r\n        this.length--;\r\n        if (!options.silent) {\r\n          options.index = index;\r\n          model.trigger('remove', model, this, options);\r\n        }\r\n        this._removeReference(model);\r\n      }\r\n      return this;\r\n    },\r\n\r\n    // Add a model to the end of the collection.\r\n    push: function(model, options) {\r\n      model = this._prepareModel(model, options);\r\n      this.add(model, _.extend({at: this.length}, options));\r\n      return model;\r\n    },\r\n\r\n    // Remove a model from the end of the collection.\r\n    pop: function(options) {\r\n      var model = this.at(this.length - 1);\r\n      this.remove(model, options);\r\n      return model;\r\n    },\r\n\r\n    // Add a model to the beginning of the collection.\r\n    unshift: function(model, options) {\r\n      model = this._prepareModel(model, options);\r\n      this.add(model, _.extend({at: 0}, options));\r\n      return model;\r\n    },\r\n\r\n    // Remove a model from the beginning of the collection.\r\n    shift: function(options) {\r\n      var model = this.at(0);\r\n      this.remove(model, options);\r\n      return model;\r\n    },\r\n\r\n    // Slice out a sub-array of models from the collection.\r\n    slice: function(begin, end) {\r\n      return this.models.slice(begin, end);\r\n    },\r\n\r\n    // Get a model from the set by id.\r\n    get: function(obj) {\r\n      if (obj == null) return void 0;\r\n      this._idAttr || (this._idAttr = this.model.prototype.idAttribute);\r\n      return this._byId[obj.id || obj.cid || obj[this._idAttr] || obj];\r\n    },\r\n\r\n    // Get the model at the given index.\r\n    at: function(index) {\r\n      return this.models[index];\r\n    },\r\n\r\n    // Return models with matching attributes. Useful for simple cases of `filter`.\r\n    where: function(attrs) {\r\n      if (_.isEmpty(attrs)) return [];\r\n      return this.filter(function(model) {\r\n        for (var key in attrs) {\r\n          if (attrs[key] !== model.get(key)) return false;\r\n        }\r\n        return true;\r\n      });\r\n    },\r\n\r\n    // Force the collection to re-sort itself. You don't need to call this under\r\n    // normal circumstances, as the set will maintain sort order as each item\r\n    // is added.\r\n    sort: function(options) {\r\n      if (!this.comparator) {\r\n        throw new Error('Cannot sort a set without a comparator');\r\n      }\r\n      options || (options = {});\r\n\r\n      // Run sort based on type of `comparator`.\r\n      if (_.isString(this.comparator) || this.comparator.length === 1) {\r\n        this.models = this.sortBy(this.comparator, this);\r\n      } else {\r\n        this.models.sort(_.bind(this.comparator, this));\r\n      }\r\n\r\n      if (!options.silent) this.trigger('sort', this, options);\r\n      return this;\r\n    },\r\n\r\n    // Pluck an attribute from each model in the collection.\r\n    pluck: function(attr) {\r\n      return _.invoke(this.models, 'get', attr);\r\n    },\r\n\r\n    // Smartly update a collection with a change set of models, adding,\r\n    // removing, and merging as necessary.\r\n    update: function(models, options) {\r\n      options = _.extend({add: true, merge: true, remove: true}, options);\r\n      if (options.parse) models = this.parse(models, options);\r\n      var model, i, l, existing;\r\n      var add = [], remove = [], modelMap = {};\r\n\r\n      // Allow a single model (or no argument) to be passed.\r\n      if (!_.isArray(models)) models = models ? [models] : [];\r\n\r\n      // Proxy to `add` for this case, no need to iterate...\r\n      if (options.add && !options.remove) return this.add(models, options);\r\n\r\n      // Determine which models to add and merge, and which to remove.\r\n      for (i = 0, l = models.length; i < l; i++) {\r\n        model = models[i];\r\n        existing = this.get(model);\r\n        if (options.remove && existing) modelMap[existing.cid] = true;\r\n        if ((options.add && !existing) || (options.merge && existing)) {\r\n          add.push(model);\r\n        }\r\n      }\r\n      if (options.remove) {\r\n        for (i = 0, l = this.models.length; i < l; i++) {\r\n          model = this.models[i];\r\n          if (!modelMap[model.cid]) remove.push(model);\r\n        }\r\n      }\r\n\r\n      // Remove models (if applicable) before we add and merge the rest.\r\n      if (remove.length) this.remove(remove, options);\r\n      if (add.length) this.add(add, options);\r\n      return this;\r\n    },\r\n\r\n    // When you have more items than you want to add or remove individually,\r\n    // you can reset the entire set with a new list of models, without firing\r\n    // any `add` or `remove` events. Fires `reset` when finished.\r\n    reset: function(models, options) {\r\n      options || (options = {});\r\n      if (options.parse) models = this.parse(models, options);\r\n      for (var i = 0, l = this.models.length; i < l; i++) {\r\n        this._removeReference(this.models[i]);\r\n      }\r\n      options.previousModels = this.models.slice();\r\n      this._reset();\r\n      if (models) this.add(models, _.extend({silent: true}, options));\r\n      if (!options.silent) this.trigger('reset', this, options);\r\n      return this;\r\n    },\r\n\r\n    // Fetch the default set of models for this collection, resetting the\r\n    // collection when they arrive. If `update: true` is passed, the response\r\n    // data will be passed through the `update` method instead of `reset`.\r\n    fetch: function(options) {\r\n      options = options ? _.clone(options) : {};\r\n      if (options.parse === void 0) options.parse = true;\r\n      var success = options.success;\r\n      options.success = function(collection, resp, options) {\r\n        var method = options.update ? 'update' : 'reset';\r\n        collection[method](resp, options);\r\n        if (success) success(collection, resp, options);\r\n      };\r\n      return this.sync('read', this, options);\r\n    },\r\n\r\n    // Create a new instance of a model in this collection. Add the model to the\r\n    // collection immediately, unless `wait: true` is passed, in which case we\r\n    // wait for the server to agree.\r\n    create: function(model, options) {\r\n      options = options ? _.clone(options) : {};\r\n      if (!(model = this._prepareModel(model, options))) return false;\r\n      if (!options.wait) this.add(model, options);\r\n      var collection = this;\r\n      var success = options.success;\r\n      options.success = function(model, resp, options) {\r\n        if (options.wait) collection.add(model, options);\r\n        if (success) success(model, resp, options);\r\n      };\r\n      model.save(null, options);\r\n      return model;\r\n    },\r\n\r\n    // **parse** converts a response into a list of models to be added to the\r\n    // collection. The default implementation is just to pass it through.\r\n    parse: function(resp, options) {\r\n      return resp;\r\n    },\r\n\r\n    // Create a new collection with an identical list of models as this one.\r\n    clone: function() {\r\n      return new this.constructor(this.models);\r\n    },\r\n\r\n    // Reset all internal state. Called when the collection is reset.\r\n    _reset: function() {\r\n      this.length = 0;\r\n      this.models.length = 0;\r\n      this._byId  = {};\r\n    },\r\n\r\n    // Prepare a model or hash of attributes to be added to this collection.\r\n    _prepareModel: function(attrs, options) {\r\n      if (attrs instanceof Model) {\r\n        if (!attrs.collection) attrs.collection = this;\r\n        return attrs;\r\n      }\r\n      options || (options = {});\r\n      options.collection = this;\r\n      var model = new this.model(attrs, options);\r\n      if (!model._validate(attrs, options)) return false;\r\n      return model;\r\n    },\r\n\r\n    // Internal method to remove a model's ties to a collection.\r\n    _removeReference: function(model) {\r\n      if (this === model.collection) delete model.collection;\r\n      model.off('all', this._onModelEvent, this);\r\n    },\r\n\r\n    // Internal method called every time a model in the set fires an event.\r\n    // Sets need to update their indexes when models change ids. All other\r\n    // events simply proxy through. \"add\" and \"remove\" events that originate\r\n    // in other collections are ignored.\r\n    _onModelEvent: function(event, model, collection, options) {\r\n      if ((event === 'add' || event === 'remove') && collection !== this) return;\r\n      if (event === 'destroy') this.remove(model, options);\r\n      if (model && event === 'change:' + model.idAttribute) {\r\n        delete this._byId[model.previous(model.idAttribute)];\r\n        if (model.id != null) this._byId[model.id] = model;\r\n      }\r\n      this.trigger.apply(this, arguments);\r\n    },\r\n\r\n    sortedIndex: function (model, value, context) {\r\n      value || (value = this.comparator);\r\n      var iterator = _.isFunction(value) ? value : function(model) {\r\n        return model.get(value);\r\n      };\r\n      return _.sortedIndex(this.models, model, iterator, context);\r\n    }\r\n\r\n  });\r\n\r\n  // Underscore methods that we want to implement on the Collection.\r\n  var methods = ['forEach', 'each', 'map', 'collect', 'reduce', 'foldl',\r\n    'inject', 'reduceRight', 'foldr', 'find', 'detect', 'filter', 'select',\r\n    'reject', 'every', 'all', 'some', 'any', 'include', 'contains', 'invoke',\r\n    'max', 'min', 'toArray', 'size', 'first', 'head', 'take', 'initial', 'rest',\r\n    'tail', 'drop', 'last', 'without', 'indexOf', 'shuffle', 'lastIndexOf',\r\n    'isEmpty', 'chain'];\r\n\r\n  // Mix in each Underscore method as a proxy to `Collection#models`.\r\n  _.each(methods, function(method) {\r\n    Collection.prototype[method] = function() {\r\n      var args = slice.call(arguments);\r\n      args.unshift(this.models);\r\n      return _[method].apply(_, args);\r\n    };\r\n  });\r\n\r\n  // Underscore methods that take a property name as an argument.\r\n  var attributeMethods = ['groupBy', 'countBy', 'sortBy'];\r\n\r\n  // Use attributes instead of properties.\r\n  _.each(attributeMethods, function(method) {\r\n    Collection.prototype[method] = function(value, context) {\r\n      var iterator = _.isFunction(value) ? value : function(model) {\r\n        return model.get(value);\r\n      };\r\n      return _[method](this.models, iterator, context);\r\n    };\r\n  });\r\n\r\n  // Backbone.Router\r\n  // ---------------\r\n\r\n  // Routers map faux-URLs to actions, and fire events when routes are\r\n  // matched. Creating a new one sets its `routes` hash, if not set statically.\r\n  var Router = Backbone.Router = function(options) {\r\n    options || (options = {});\r\n    if (options.routes) this.routes = options.routes;\r\n    this._bindRoutes();\r\n    this.initialize.apply(this, arguments);\r\n  };\r\n\r\n  // Cached regular expressions for matching named param parts and splatted\r\n  // parts of route strings.\r\n  var optionalParam = /\\((.*?)\\)/g;\r\n  var namedParam    = /(\\(\\?)?:\\w+/g;\r\n  var splatParam    = /\\*\\w+/g;\r\n  var escapeRegExp  = /[\\-{}\\[\\]+?.,\\\\\\^$|#\\s]/g;\r\n\r\n  // Set up all inheritable **Backbone.Router** properties and methods.\r\n  _.extend(Router.prototype, Events, {\r\n\r\n    // Initialize is an empty function by default. Override it with your own\r\n    // initialization logic.\r\n    initialize: function(){},\r\n\r\n    // Manually bind a single named route to a callback function.\r\n    route: function(route, name, callback) {\r\n      if (!_.isRegExp(route)) route = this._routeToRegExp(route);\r\n      if (!callback) callback = this[name];\r\n      Backbone.history.route(route, _.bind(function(fragment) {\r\n        var args = this._extractParameters(route, fragment);\r\n        callback && callback.apply(this, args);\r\n        this.trigger.apply(this, ['route:' + name].concat(args));\r\n        this.trigger('route', name, args);\r\n        Backbone.history.trigger('route', this, name, args);\r\n      }, this));\r\n      return this;\r\n    },\r\n\r\n    // Simple proxy to `Backbone.history` to save a fragment into the history.\r\n    navigate: function(fragment, options) {\r\n      Backbone.history.navigate(fragment, options);\r\n      return this;\r\n    },\r\n\r\n    // Bind all defined routes to `Backbone.history`. We have to reverse the\r\n    // order of the routes here to support behavior where the most general\r\n    // routes can be defined at the bottom of the route map.\r\n    _bindRoutes: function() {\r\n      if (!this.routes) return;\r\n      var route, routes = _.keys(this.routes);\r\n      while ((route = routes.pop()) != null) {\r\n        this.route(route, this.routes[route]);\r\n      }\r\n    },\r\n\r\n    // Convert a route string into a regular expression, suitable for matching\r\n    // against the current location hash.\r\n    _routeToRegExp: function(route) {\r\n      route = route.replace(escapeRegExp, '\\\\$&')\r\n                   .replace(optionalParam, '(?:$1)?')\r\n                   .replace(namedParam, function(match, optional){\r\n                     return optional ? match : '([^\\/]+)';\r\n                   })\r\n                   .replace(splatParam, '(.*?)');\r\n      return new RegExp('^' + route + '$');\r\n    },\r\n\r\n    // Given a route, and a URL fragment that it matches, return the array of\r\n    // extracted parameters.\r\n    _extractParameters: function(route, fragment) {\r\n      return route.exec(fragment).slice(1);\r\n    }\r\n\r\n  });\r\n\r\n  // Backbone.History\r\n  // ----------------\r\n\r\n  // Handles cross-browser history management, based on URL fragments. If the\r\n  // browser does not support `onhashchange`, falls back to polling.\r\n  var History = Backbone.History = function() {\r\n    this.handlers = [];\r\n    _.bindAll(this, 'checkUrl');\r\n\r\n    // Ensure that `History` can be used outside of the browser.\r\n    if (typeof window !== 'undefined') {\r\n      this.location = window.location;\r\n      this.history = window.history;\r\n    }\r\n  };\r\n\r\n  // Cached regex for stripping a leading hash/slash and trailing space.\r\n  var routeStripper = /^[#\\/]|\\s+$/g;\r\n\r\n  // Cached regex for stripping leading and trailing slashes.\r\n  var rootStripper = /^\\/+|\\/+$/g;\r\n\r\n  // Cached regex for detecting MSIE.\r\n  var isExplorer = /msie [\\w.]+/;\r\n\r\n  // Cached regex for removing a trailing slash.\r\n  var trailingSlash = /\\/$/;\r\n\r\n  // Has the history handling already been started?\r\n  History.started = false;\r\n\r\n  // Set up all inheritable **Backbone.History** properties and methods.\r\n  _.extend(History.prototype, Events, {\r\n\r\n    // The default interval to poll for hash changes, if necessary, is\r\n    // twenty times a second.\r\n    interval: 50,\r\n\r\n    // Gets the true hash value. Cannot use location.hash directly due to bug\r\n    // in Firefox where location.hash will always be decoded.\r\n    getHash: function(window) {\r\n      var match = (window || this).location.href.match(/#(.*)$/);\r\n      return match ? match[1] : '';\r\n    },\r\n\r\n    // Get the cross-browser normalized URL fragment, either from the URL,\r\n    // the hash, or the override.\r\n    getFragment: function(fragment, forcePushState) {\r\n      if (fragment == null) {\r\n        if (this._hasPushState || !this._wantsHashChange || forcePushState) {\r\n          fragment = this.location.pathname;\r\n          var root = this.root.replace(trailingSlash, '');\r\n          if (!fragment.indexOf(root)) fragment = fragment.substr(root.length);\r\n        } else {\r\n          fragment = this.getHash();\r\n        }\r\n      }\r\n      return fragment.replace(routeStripper, '');\r\n    },\r\n\r\n    // Start the hash change handling, returning `true` if the current URL matches\r\n    // an existing route, and `false` otherwise.\r\n    start: function(options) {\r\n      if (History.started) throw new Error(\"Backbone.history has already been started\");\r\n      History.started = true;\r\n\r\n      // Figure out the initial configuration. Do we need an iframe?\r\n      // Is pushState desired ... is it available?\r\n      this.options          = _.extend({}, {root: '/'}, this.options, options);\r\n      this.root             = this.options.root;\r\n      this._wantsHashChange = this.options.hashChange !== false;\r\n      this._wantsPushState  = !!this.options.pushState;\r\n      this._hasPushState    = !!(this.options.pushState && this.history && this.history.pushState);\r\n      var fragment          = this.getFragment();\r\n      var docMode           = document.documentMode;\r\n      var oldIE             = (isExplorer.exec(navigator.userAgent.toLowerCase()) && (!docMode || docMode <= 7));\r\n\r\n      // Normalize root to always include a leading and trailing slash.\r\n      this.root = ('/' + this.root + '/').replace(rootStripper, '/');\r\n\r\n      if (oldIE && this._wantsHashChange) {\r\n        this.iframe = Backbone.$('<iframe src=\"javascript:0\" tabindex=\"-1\" />').hide().appendTo('body')[0].contentWindow;\r\n        this.navigate(fragment);\r\n      }\r\n\r\n      // Depending on whether we're using pushState or hashes, and whether\r\n      // 'onhashchange' is supported, determine how we check the URL state.\r\n      if (this._hasPushState) {\r\n        Backbone.$(window).on('popstate', this.checkUrl);\r\n      } else if (this._wantsHashChange && ('onhashchange' in window) && !oldIE) {\r\n        Backbone.$(window).on('hashchange', this.checkUrl);\r\n      } else if (this._wantsHashChange) {\r\n        this._checkUrlInterval = setInterval(this.checkUrl, this.interval);\r\n      }\r\n\r\n      // Determine if we need to change the base url, for a pushState link\r\n      // opened by a non-pushState browser.\r\n      this.fragment = fragment;\r\n      var loc = this.location;\r\n      var atRoot = loc.pathname.replace(/[^\\/]$/, '$&/') === this.root;\r\n\r\n      // If we've started off with a route from a `pushState`-enabled browser,\r\n      // but we're currently in a browser that doesn't support it...\r\n      if (this._wantsHashChange && this._wantsPushState && !this._hasPushState && !atRoot) {\r\n        this.fragment = this.getFragment(null, true);\r\n        this.location.replace(this.root + this.location.search + '#' + this.fragment);\r\n        // Return immediately as browser will do redirect to new url\r\n        return true;\r\n\r\n      // Or if we've started out with a hash-based route, but we're currently\r\n      // in a browser where it could be `pushState`-based instead...\r\n      } else if (this._wantsPushState && this._hasPushState && atRoot && loc.hash) {\r\n        this.fragment = this.getHash().replace(routeStripper, '');\r\n        this.history.replaceState({}, document.title, this.root + this.fragment + loc.search);\r\n      }\r\n\r\n      if (!this.options.silent) return this.loadUrl();\r\n    },\r\n\r\n    // Disable Backbone.history, perhaps temporarily. Not useful in a real app,\r\n    // but possibly useful for unit testing Routers.\r\n    stop: function() {\r\n      Backbone.$(window).off('popstate', this.checkUrl).off('hashchange', this.checkUrl);\r\n      clearInterval(this._checkUrlInterval);\r\n      History.started = false;\r\n    },\r\n\r\n    // Add a route to be tested when the fragment changes. Routes added later\r\n    // may override previous routes.\r\n    route: function(route, callback) {\r\n      this.handlers.unshift({route: route, callback: callback});\r\n    },\r\n\r\n    // Checks the current URL to see if it has changed, and if it has,\r\n    // calls `loadUrl`, normalizing across the hidden iframe.\r\n    checkUrl: function(e) {\r\n      var current = this.getFragment();\r\n      if (current === this.fragment && this.iframe) {\r\n        current = this.getFragment(this.getHash(this.iframe));\r\n      }\r\n      if (current === this.fragment) return false;\r\n      if (this.iframe) this.navigate(current);\r\n      this.loadUrl() || this.loadUrl(this.getHash());\r\n    },\r\n\r\n    // Attempt to load the current URL fragment. If a route succeeds with a\r\n    // match, returns `true`. If no defined routes matches the fragment,\r\n    // returns `false`.\r\n    loadUrl: function(fragmentOverride) {\r\n      var fragment = this.fragment = this.getFragment(fragmentOverride);\r\n      var matched = _.any(this.handlers, function(handler) {\r\n        if (handler.route.test(fragment)) {\r\n          handler.callback(fragment);\r\n          return true;\r\n        }\r\n      });\r\n      return matched;\r\n    },\r\n\r\n    // Save a fragment into the hash history, or replace the URL state if the\r\n    // 'replace' option is passed. You are responsible for properly URL-encoding\r\n    // the fragment in advance.\r\n    //\r\n    // The options object can contain `trigger: true` if you wish to have the\r\n    // route callback be fired (not usually desirable), or `replace: true`, if\r\n    // you wish to modify the current URL without adding an entry to the history.\r\n    navigate: function(fragment, options) {\r\n      if (!History.started) return false;\r\n      if (!options || options === true) options = {trigger: options};\r\n      fragment = this.getFragment(fragment || '');\r\n      if (this.fragment === fragment) return;\r\n      this.fragment = fragment;\r\n      var url = this.root + fragment;\r\n\r\n      // If pushState is available, we use it to set the fragment as a real URL.\r\n      if (this._hasPushState) {\r\n        this.history[options.replace ? 'replaceState' : 'pushState']({}, document.title, url);\r\n\r\n      // If hash changes haven't been explicitly disabled, update the hash\r\n      // fragment to store history.\r\n      } else if (this._wantsHashChange) {\r\n        this._updateHash(this.location, fragment, options.replace);\r\n        if (this.iframe && (fragment !== this.getFragment(this.getHash(this.iframe)))) {\r\n          // Opening and closing the iframe tricks IE7 and earlier to push a\r\n          // history entry on hash-tag change.  When replace is true, we don't\r\n          // want this.\r\n          if(!options.replace) this.iframe.document.open().close();\r\n          this._updateHash(this.iframe.location, fragment, options.replace);\r\n        }\r\n\r\n      // If you've told us that you explicitly don't want fallback hashchange-\r\n      // based history, then `navigate` becomes a page refresh.\r\n      } else {\r\n        return this.location.assign(url);\r\n      }\r\n      if (options.trigger) this.loadUrl(fragment);\r\n    },\r\n\r\n    // Update the hash location, either replacing the current entry, or adding\r\n    // a new one to the browser history.\r\n    _updateHash: function(location, fragment, replace) {\r\n      if (replace) {\r\n        var href = location.href.replace(/(javascript:|#).*$/, '');\r\n        location.replace(href + '#' + fragment);\r\n      } else {\r\n        // Some browsers require that `hash` contains a leading #.\r\n        location.hash = '#' + fragment;\r\n      }\r\n    }\r\n\r\n  });\r\n\r\n  // Create the default Backbone.history.\r\n  Backbone.history = new History;\r\n\r\n  // Backbone.View\r\n  // -------------\r\n\r\n  // Creating a Backbone.View creates its initial element outside of the DOM,\r\n  // if an existing element is not provided...\r\n  var View = Backbone.View = function(options) {\r\n    this.cid = _.uniqueId('view');\r\n    this._configure(options || {});\r\n    this._ensureElement();\r\n    this.initialize.apply(this, arguments);\r\n    this.delegateEvents();\r\n  };\r\n\r\n  // Cached regex to split keys for `delegate`.\r\n  var delegateEventSplitter = /^(\\S+)\\s*(.*)$/;\r\n\r\n  // List of view options to be merged as properties.\r\n  var viewOptions = ['model', 'collection', 'el', 'id', 'attributes', 'className', 'tagName', 'events'];\r\n\r\n  // Set up all inheritable **Backbone.View** properties and methods.\r\n  _.extend(View.prototype, Events, {\r\n\r\n    // The default `tagName` of a View's element is `\"div\"`.\r\n    tagName: 'div',\r\n\r\n    // jQuery delegate for element lookup, scoped to DOM elements within the\r\n    // current view. This should be prefered to global lookups where possible.\r\n    $: function(selector) {\r\n      return this.$el.find(selector);\r\n    },\r\n\r\n    // Initialize is an empty function by default. Override it with your own\r\n    // initialization logic.\r\n    initialize: function(){},\r\n\r\n    // **render** is the core function that your view should override, in order\r\n    // to populate its element (`this.el`), with the appropriate HTML. The\r\n    // convention is for **render** to always return `this`.\r\n    render: function() {\r\n      return this;\r\n    },\r\n\r\n    // Remove this view by taking the element out of the DOM, and removing any\r\n    // applicable Backbone.Events listeners.\r\n    remove: function() {\r\n      this.$el.remove();\r\n      this.stopListening();\r\n      return this;\r\n    },\r\n\r\n    // Change the view's element (`this.el` property), including event\r\n    // re-delegation.\r\n    setElement: function(element, delegate) {\r\n      if (this.$el) this.undelegateEvents();\r\n      this.$el = element instanceof Backbone.$ ? element : Backbone.$(element);\r\n      this.el = this.$el[0];\r\n      if (delegate !== false) this.delegateEvents();\r\n      return this;\r\n    },\r\n\r\n    // Set callbacks, where `this.events` is a hash of\r\n    //\r\n    // *{\"event selector\": \"callback\"}*\r\n    //\r\n    //     {\r\n    //       'mousedown .title':  'edit',\r\n    //       'click .button':     'save'\r\n    //       'click .open':       function(e) { ... }\r\n    //     }\r\n    //\r\n    // pairs. Callbacks will be bound to the view, with `this` set properly.\r\n    // Uses event delegation for efficiency.\r\n    // Omitting the selector binds the event to `this.el`.\r\n    // This only works for delegate-able events: not `focus`, `blur`, and\r\n    // not `change`, `submit`, and `reset` in Internet Explorer.\r\n    delegateEvents: function(events) {\r\n      if (!(events || (events = _.result(this, 'events')))) return;\r\n      this.undelegateEvents();\r\n      for (var key in events) {\r\n        var method = events[key];\r\n        if (!_.isFunction(method)) method = this[events[key]];\r\n        if (!method) throw new Error('Method \"' + events[key] + '\" does not exist');\r\n        var match = key.match(delegateEventSplitter);\r\n        var eventName = match[1], selector = match[2];\r\n        method = _.bind(method, this);\r\n        eventName += '.delegateEvents' + this.cid;\r\n        if (selector === '') {\r\n          this.$el.on(eventName, method);\r\n        } else {\r\n          this.$el.on(eventName, selector, method);\r\n        }\r\n      }\r\n    },\r\n\r\n    // Clears all callbacks previously bound to the view with `delegateEvents`.\r\n    // You usually don't need to use this, but may wish to if you have multiple\r\n    // Backbone views attached to the same DOM element.\r\n    undelegateEvents: function() {\r\n      this.$el.off('.delegateEvents' + this.cid);\r\n    },\r\n\r\n    // Performs the initial configuration of a View with a set of options.\r\n    // Keys with special meaning *(model, collection, id, className)*, are\r\n    // attached directly to the view.\r\n    _configure: function(options) {\r\n      if (this.options) options = _.extend({}, _.result(this, 'options'), options);\r\n      _.extend(this, _.pick(options, viewOptions));\r\n      this.options = options;\r\n    },\r\n\r\n    // Ensure that the View has a DOM element to render into.\r\n    // If `this.el` is a string, pass it through `$()`, take the first\r\n    // matching element, and re-assign it to `el`. Otherwise, create\r\n    // an element from the `id`, `className` and `tagName` properties.\r\n    _ensureElement: function() {\r\n      if (!this.el) {\r\n        var attrs = _.extend({}, _.result(this, 'attributes'));\r\n        if (this.id) attrs.id = _.result(this, 'id');\r\n        if (this.className) attrs['class'] = _.result(this, 'className');\r\n        var $el = Backbone.$('<' + _.result(this, 'tagName') + '>').attr(attrs);\r\n        this.setElement($el, false);\r\n      } else {\r\n        this.setElement(_.result(this, 'el'), false);\r\n      }\r\n    }\r\n\r\n  });\r\n\r\n  // Backbone.sync\r\n  // -------------\r\n\r\n  // Map from CRUD to HTTP for our default `Backbone.sync` implementation.\r\n  var methodMap = {\r\n    'create': 'POST',\r\n    'update': 'PUT',\r\n    'patch':  'PATCH',\r\n    'delete': 'DELETE',\r\n    'read':   'GET'\r\n  };\r\n\r\n  // Override this function to change the manner in which Backbone persists\r\n  // models to the server. You will be passed the type of request, and the\r\n  // model in question. By default, makes a RESTful Ajax request\r\n  // to the model's `url()`. Some possible customizations could be:\r\n  //\r\n  // * Use `setTimeout` to batch rapid-fire updates into a single request.\r\n  // * Send up the models as XML instead of JSON.\r\n  // * Persist models via WebSockets instead of Ajax.\r\n  //\r\n  // Turn on `Backbone.emulateHTTP` in order to send `PUT` and `DELETE` requests\r\n  // as `POST`, with a `_method` parameter containing the true HTTP method,\r\n  // as well as all requests with the body as `application/x-www-form-urlencoded`\r\n  // instead of `application/json` with the model in a param named `model`.\r\n  // Useful when interfacing with server-side languages like **PHP** that make\r\n  // it difficult to read the body of `PUT` requests.\r\n  Backbone.sync = function(method, model, options) {\r\n    var type = methodMap[method];\r\n\r\n    // Default options, unless specified.\r\n    _.defaults(options || (options = {}), {\r\n      emulateHTTP: Backbone.emulateHTTP,\r\n      emulateJSON: Backbone.emulateJSON\r\n    });\r\n\r\n    // Default JSON-request options.\r\n    var params = {type: type, dataType: 'json'};\r\n\r\n    // Ensure that we have a URL.\r\n    if (!options.url) {\r\n      params.url = _.result(model, 'url') || urlError();\r\n    }\r\n\r\n    // Ensure that we have the appropriate request data.\r\n    if (options.data == null && model && (method === 'create' || method === 'update' || method === 'patch')) {\r\n      params.contentType = 'application/json';\r\n      params.data = JSON.stringify(options.attrs || model.toJSON(options));\r\n    }\r\n\r\n    // For older servers, emulate JSON by encoding the request into an HTML-form.\r\n    if (options.emulateJSON) {\r\n      params.contentType = 'application/x-www-form-urlencoded';\r\n      params.data = params.data ? {model: params.data} : {};\r\n    }\r\n\r\n    // For older servers, emulate HTTP by mimicking the HTTP method with `_method`\r\n    // And an `X-HTTP-Method-Override` header.\r\n    if (options.emulateHTTP && (type === 'PUT' || type === 'DELETE' || type === 'PATCH')) {\r\n      params.type = 'POST';\r\n      if (options.emulateJSON) params.data._method = type;\r\n      var beforeSend = options.beforeSend;\r\n      options.beforeSend = function(xhr) {\r\n        xhr.setRequestHeader('X-HTTP-Method-Override', type);\r\n        if (beforeSend) return beforeSend.apply(this, arguments);\r\n      };\r\n    }\r\n\r\n    // Don't process data on a non-GET request.\r\n    if (params.type !== 'GET' && !options.emulateJSON) {\r\n      params.processData = false;\r\n    }\r\n\r\n    var success = options.success;\r\n    options.success = function(resp) {\r\n      if (success) success(model, resp, options);\r\n      model.trigger('sync', model, resp, options);\r\n    };\r\n\r\n    var error = options.error;\r\n    options.error = function(xhr) {\r\n      if (error) error(model, xhr, options);\r\n      model.trigger('error', model, xhr, options);\r\n    };\r\n\r\n    // Make the request, allowing the user to override any Ajax options.\r\n    var xhr = options.xhr = Backbone.ajax(_.extend(params, options));\r\n    model.trigger('request', model, xhr, options);\r\n    return xhr;\r\n  };\r\n\r\n  // Set the default implementation of `Backbone.ajax` to proxy through to `$`.\r\n  Backbone.ajax = function() {\r\n    return Backbone.$.ajax.apply(Backbone.$, arguments);\r\n  };\r\n\r\n  // Helpers\r\n  // -------\r\n\r\n  // Helper function to correctly set up the prototype chain, for subclasses.\r\n  // Similar to `goog.inherits`, but uses a hash of prototype properties and\r\n  // class properties to be extended.\r\n  var extend = function(protoProps, staticProps) {\r\n    var parent = this;\r\n    var child;\r\n\r\n    // The constructor function for the new subclass is either defined by you\r\n    // (the \"constructor\" property in your `extend` definition), or defaulted\r\n    // by us to simply call the parent's constructor.\r\n    if (protoProps && _.has(protoProps, 'constructor')) {\r\n      child = protoProps.constructor;\r\n    } else {\r\n      child = function(){ return parent.apply(this, arguments); };\r\n    }\r\n\r\n    // Add static properties to the constructor function, if supplied.\r\n    _.extend(child, parent, staticProps);\r\n\r\n    // Set the prototype chain to inherit from `parent`, without calling\r\n    // `parent`'s constructor function.\r\n    var Surrogate = function(){ this.constructor = child; };\r\n    Surrogate.prototype = parent.prototype;\r\n    child.prototype = new Surrogate;\r\n\r\n    // Add prototype properties (instance properties) to the subclass,\r\n    // if supplied.\r\n    if (protoProps) _.extend(child.prototype, protoProps);\r\n\r\n    // Set a convenience property in case the parent's prototype is needed\r\n    // later.\r\n    child.__super__ = parent.prototype;\r\n\r\n    return child;\r\n  };\r\n\r\n  // Set up inheritance for the model, collection, router, view and history.\r\n  Model.extend = Collection.extend = Router.extend = View.extend = History.extend = extend;\r\n\r\n  // Throw an error when a URL is needed, and none is supplied.\r\n  var urlError = function() {\r\n    throw new Error('A \"url\" property or function must be specified');\r\n  };\r\n\r\n}).call(this);\r\n"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.REST.SocialMedia/AccountManagement.EntryPoint/vendor/js/bootstrap.js",
    "content": "/* ===================================================\r\n * bootstrap-transition.js v2.3.1\r\n * http://twitter.github.com/bootstrap/javascript.html#transitions\r\n * ===================================================\r\n * Copyright 2012 Twitter, Inc.\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n * ========================================================== */\r\n\r\n\r\n!function ($) {\r\n\r\n  \"use strict\"; // jshint ;_;\r\n\r\n\r\n  /* CSS TRANSITION SUPPORT (http://www.modernizr.com/)\r\n   * ======================================================= */\r\n\r\n  $(function () {\r\n\r\n    $.support.transition = (function () {\r\n\r\n      var transitionEnd = (function () {\r\n\r\n        var el = document.createElement('bootstrap')\r\n          , transEndEventNames = {\r\n               'WebkitTransition' : 'webkitTransitionEnd'\r\n            ,  'MozTransition'    : 'transitionend'\r\n            ,  'OTransition'      : 'oTransitionEnd otransitionend'\r\n            ,  'transition'       : 'transitionend'\r\n            }\r\n          , name\r\n\r\n        for (name in transEndEventNames){\r\n          if (el.style[name] !== undefined) {\r\n            return transEndEventNames[name]\r\n          }\r\n        }\r\n\r\n      }())\r\n\r\n      return transitionEnd && {\r\n        end: transitionEnd\r\n      }\r\n\r\n    })()\r\n\r\n  })\r\n\r\n}(window.jQuery);/* ==========================================================\r\n * bootstrap-alert.js v2.3.1\r\n * http://twitter.github.com/bootstrap/javascript.html#alerts\r\n * ==========================================================\r\n * Copyright 2012 Twitter, Inc.\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n * ========================================================== */\r\n\r\n\r\n!function ($) {\r\n\r\n  \"use strict\"; // jshint ;_;\r\n\r\n\r\n /* ALERT CLASS DEFINITION\r\n  * ====================== */\r\n\r\n  var dismiss = '[data-dismiss=\"alert\"]'\r\n    , Alert = function (el) {\r\n        $(el).on('click', dismiss, this.close)\r\n      }\r\n\r\n  Alert.prototype.close = function (e) {\r\n    var $this = $(this)\r\n      , selector = $this.attr('data-target')\r\n      , $parent\r\n\r\n    if (!selector) {\r\n      selector = $this.attr('href')\r\n      selector = selector && selector.replace(/.*(?=#[^\\s]*$)/, '') //strip for ie7\r\n    }\r\n\r\n    $parent = $(selector)\r\n\r\n    e && e.preventDefault()\r\n\r\n    $parent.length || ($parent = $this.hasClass('alert') ? $this : $this.parent())\r\n\r\n    $parent.trigger(e = $.Event('close'))\r\n\r\n    if (e.isDefaultPrevented()) return\r\n\r\n    $parent.removeClass('in')\r\n\r\n    function removeElement() {\r\n      $parent\r\n        .trigger('closed')\r\n        .remove()\r\n    }\r\n\r\n    $.support.transition && $parent.hasClass('fade') ?\r\n      $parent.on($.support.transition.end, removeElement) :\r\n      removeElement()\r\n  }\r\n\r\n\r\n /* ALERT PLUGIN DEFINITION\r\n  * ======================= */\r\n\r\n  var old = $.fn.alert\r\n\r\n  $.fn.alert = function (option) {\r\n    return this.each(function () {\r\n      var $this = $(this)\r\n        , data = $this.data('alert')\r\n      if (!data) $this.data('alert', (data = new Alert(this)))\r\n      if (typeof option == 'string') data[option].call($this)\r\n    })\r\n  }\r\n\r\n  $.fn.alert.Constructor = Alert\r\n\r\n\r\n /* ALERT NO CONFLICT\r\n  * ================= */\r\n\r\n  $.fn.alert.noConflict = function () {\r\n    $.fn.alert = old\r\n    return this\r\n  }\r\n\r\n\r\n /* ALERT DATA-API\r\n  * ============== */\r\n\r\n  $(document).on('click.alert.data-api', dismiss, Alert.prototype.close)\r\n\r\n}(window.jQuery);/* ============================================================\r\n * bootstrap-button.js v2.3.1\r\n * http://twitter.github.com/bootstrap/javascript.html#buttons\r\n * ============================================================\r\n * Copyright 2012 Twitter, Inc.\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n * ============================================================ */\r\n\r\n\r\n!function ($) {\r\n\r\n  \"use strict\"; // jshint ;_;\r\n\r\n\r\n /* BUTTON PUBLIC CLASS DEFINITION\r\n  * ============================== */\r\n\r\n  var Button = function (element, options) {\r\n    this.$element = $(element)\r\n    this.options = $.extend({}, $.fn.button.defaults, options)\r\n  }\r\n\r\n  Button.prototype.setState = function (state) {\r\n    var d = 'disabled'\r\n      , $el = this.$element\r\n      , data = $el.data()\r\n      , val = $el.is('input') ? 'val' : 'html'\r\n\r\n    state = state + 'Text'\r\n    data.resetText || $el.data('resetText', $el[val]())\r\n\r\n    $el[val](data[state] || this.options[state])\r\n\r\n    // push to event loop to allow forms to submit\r\n    setTimeout(function () {\r\n      state == 'loadingText' ?\r\n        $el.addClass(d).attr(d, d) :\r\n        $el.removeClass(d).removeAttr(d)\r\n    }, 0)\r\n  }\r\n\r\n  Button.prototype.toggle = function () {\r\n    var $parent = this.$element.closest('[data-toggle=\"buttons-radio\"]')\r\n\r\n    $parent && $parent\r\n      .find('.active')\r\n      .removeClass('active')\r\n\r\n    this.$element.toggleClass('active')\r\n  }\r\n\r\n\r\n /* BUTTON PLUGIN DEFINITION\r\n  * ======================== */\r\n\r\n  var old = $.fn.button\r\n\r\n  $.fn.button = function (option) {\r\n    return this.each(function () {\r\n      var $this = $(this)\r\n        , data = $this.data('button')\r\n        , options = typeof option == 'object' && option\r\n      if (!data) $this.data('button', (data = new Button(this, options)))\r\n      if (option == 'toggle') data.toggle()\r\n      else if (option) data.setState(option)\r\n    })\r\n  }\r\n\r\n  $.fn.button.defaults = {\r\n    loadingText: 'loading...'\r\n  }\r\n\r\n  $.fn.button.Constructor = Button\r\n\r\n\r\n /* BUTTON NO CONFLICT\r\n  * ================== */\r\n\r\n  $.fn.button.noConflict = function () {\r\n    $.fn.button = old\r\n    return this\r\n  }\r\n\r\n\r\n /* BUTTON DATA-API\r\n  * =============== */\r\n\r\n  $(document).on('click.button.data-api', '[data-toggle^=button]', function (e) {\r\n    var $btn = $(e.target)\r\n    if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')\r\n    $btn.button('toggle')\r\n  })\r\n\r\n}(window.jQuery);/* ==========================================================\r\n * bootstrap-carousel.js v2.3.1\r\n * http://twitter.github.com/bootstrap/javascript.html#carousel\r\n * ==========================================================\r\n * Copyright 2012 Twitter, Inc.\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n * ========================================================== */\r\n\r\n\r\n!function ($) {\r\n\r\n  \"use strict\"; // jshint ;_;\r\n\r\n\r\n /* CAROUSEL CLASS DEFINITION\r\n  * ========================= */\r\n\r\n  var Carousel = function (element, options) {\r\n    this.$element = $(element)\r\n    this.$indicators = this.$element.find('.carousel-indicators')\r\n    this.options = options\r\n    this.options.pause == 'hover' && this.$element\r\n      .on('mouseenter', $.proxy(this.pause, this))\r\n      .on('mouseleave', $.proxy(this.cycle, this))\r\n  }\r\n\r\n  Carousel.prototype = {\r\n\r\n    cycle: function (e) {\r\n      if (!e) this.paused = false\r\n      if (this.interval) clearInterval(this.interval);\r\n      this.options.interval\r\n        && !this.paused\r\n        && (this.interval = setInterval($.proxy(this.next, this), this.options.interval))\r\n      return this\r\n    }\r\n\r\n  , getActiveIndex: function () {\r\n      this.$active = this.$element.find('.item.active')\r\n      this.$items = this.$active.parent().children()\r\n      return this.$items.index(this.$active)\r\n    }\r\n\r\n  , to: function (pos) {\r\n      var activeIndex = this.getActiveIndex()\r\n        , that = this\r\n\r\n      if (pos > (this.$items.length - 1) || pos < 0) return\r\n\r\n      if (this.sliding) {\r\n        return this.$element.one('slid', function () {\r\n          that.to(pos)\r\n        })\r\n      }\r\n\r\n      if (activeIndex == pos) {\r\n        return this.pause().cycle()\r\n      }\r\n\r\n      return this.slide(pos > activeIndex ? 'next' : 'prev', $(this.$items[pos]))\r\n    }\r\n\r\n  , pause: function (e) {\r\n      if (!e) this.paused = true\r\n      if (this.$element.find('.next, .prev').length && $.support.transition.end) {\r\n        this.$element.trigger($.support.transition.end)\r\n        this.cycle(true)\r\n      }\r\n      clearInterval(this.interval)\r\n      this.interval = null\r\n      return this\r\n    }\r\n\r\n  , next: function () {\r\n      if (this.sliding) return\r\n      return this.slide('next')\r\n    }\r\n\r\n  , prev: function () {\r\n      if (this.sliding) return\r\n      return this.slide('prev')\r\n    }\r\n\r\n  , slide: function (type, next) {\r\n      var $active = this.$element.find('.item.active')\r\n        , $next = next || $active[type]()\r\n        , isCycling = this.interval\r\n        , direction = type == 'next' ? 'left' : 'right'\r\n        , fallback  = type == 'next' ? 'first' : 'last'\r\n        , that = this\r\n        , e\r\n\r\n      this.sliding = true\r\n\r\n      isCycling && this.pause()\r\n\r\n      $next = $next.length ? $next : this.$element.find('.item')[fallback]()\r\n\r\n      e = $.Event('slide', {\r\n        relatedTarget: $next[0]\r\n      , direction: direction\r\n      })\r\n\r\n      if ($next.hasClass('active')) return\r\n\r\n      if (this.$indicators.length) {\r\n        this.$indicators.find('.active').removeClass('active')\r\n        this.$element.one('slid', function () {\r\n          var $nextIndicator = $(that.$indicators.children()[that.getActiveIndex()])\r\n          $nextIndicator && $nextIndicator.addClass('active')\r\n        })\r\n      }\r\n\r\n      if ($.support.transition && this.$element.hasClass('slide')) {\r\n        this.$element.trigger(e)\r\n        if (e.isDefaultPrevented()) return\r\n        $next.addClass(type)\r\n        $next[0].offsetWidth // force reflow\r\n        $active.addClass(direction)\r\n        $next.addClass(direction)\r\n        this.$element.one($.support.transition.end, function () {\r\n          $next.removeClass([type, direction].join(' ')).addClass('active')\r\n          $active.removeClass(['active', direction].join(' '))\r\n          that.sliding = false\r\n          setTimeout(function () { that.$element.trigger('slid') }, 0)\r\n        })\r\n      } else {\r\n        this.$element.trigger(e)\r\n        if (e.isDefaultPrevented()) return\r\n        $active.removeClass('active')\r\n        $next.addClass('active')\r\n        this.sliding = false\r\n        this.$element.trigger('slid')\r\n      }\r\n\r\n      isCycling && this.cycle()\r\n\r\n      return this\r\n    }\r\n\r\n  }\r\n\r\n\r\n /* CAROUSEL PLUGIN DEFINITION\r\n  * ========================== */\r\n\r\n  var old = $.fn.carousel\r\n\r\n  $.fn.carousel = function (option) {\r\n    return this.each(function () {\r\n      var $this = $(this)\r\n        , data = $this.data('carousel')\r\n        , options = $.extend({}, $.fn.carousel.defaults, typeof option == 'object' && option)\r\n        , action = typeof option == 'string' ? option : options.slide\r\n      if (!data) $this.data('carousel', (data = new Carousel(this, options)))\r\n      if (typeof option == 'number') data.to(option)\r\n      else if (action) data[action]()\r\n      else if (options.interval) data.pause().cycle()\r\n    })\r\n  }\r\n\r\n  $.fn.carousel.defaults = {\r\n    interval: 5000\r\n  , pause: 'hover'\r\n  }\r\n\r\n  $.fn.carousel.Constructor = Carousel\r\n\r\n\r\n /* CAROUSEL NO CONFLICT\r\n  * ==================== */\r\n\r\n  $.fn.carousel.noConflict = function () {\r\n    $.fn.carousel = old\r\n    return this\r\n  }\r\n\r\n /* CAROUSEL DATA-API\r\n  * ================= */\r\n\r\n  $(document).on('click.carousel.data-api', '[data-slide], [data-slide-to]', function (e) {\r\n    var $this = $(this), href\r\n      , $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\\s]+$)/, '')) //strip for ie7\r\n      , options = $.extend({}, $target.data(), $this.data())\r\n      , slideIndex\r\n\r\n    $target.carousel(options)\r\n\r\n    if (slideIndex = $this.attr('data-slide-to')) {\r\n      $target.data('carousel').pause().to(slideIndex).cycle()\r\n    }\r\n\r\n    e.preventDefault()\r\n  })\r\n\r\n}(window.jQuery);/* =============================================================\r\n * bootstrap-collapse.js v2.3.1\r\n * http://twitter.github.com/bootstrap/javascript.html#collapse\r\n * =============================================================\r\n * Copyright 2012 Twitter, Inc.\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n * ============================================================ */\r\n\r\n\r\n!function ($) {\r\n\r\n  \"use strict\"; // jshint ;_;\r\n\r\n\r\n /* COLLAPSE PUBLIC CLASS DEFINITION\r\n  * ================================ */\r\n\r\n  var Collapse = function (element, options) {\r\n    this.$element = $(element)\r\n    this.options = $.extend({}, $.fn.collapse.defaults, options)\r\n\r\n    if (this.options.parent) {\r\n      this.$parent = $(this.options.parent)\r\n    }\r\n\r\n    this.options.toggle && this.toggle()\r\n  }\r\n\r\n  Collapse.prototype = {\r\n\r\n    constructor: Collapse\r\n\r\n  , dimension: function () {\r\n      var hasWidth = this.$element.hasClass('width')\r\n      return hasWidth ? 'width' : 'height'\r\n    }\r\n\r\n  , show: function () {\r\n      var dimension\r\n        , scroll\r\n        , actives\r\n        , hasData\r\n\r\n      if (this.transitioning || this.$element.hasClass('in')) return\r\n\r\n      dimension = this.dimension()\r\n      scroll = $.camelCase(['scroll', dimension].join('-'))\r\n      actives = this.$parent && this.$parent.find('> .accordion-group > .in')\r\n\r\n      if (actives && actives.length) {\r\n        hasData = actives.data('collapse')\r\n        if (hasData && hasData.transitioning) return\r\n        actives.collapse('hide')\r\n        hasData || actives.data('collapse', null)\r\n      }\r\n\r\n      this.$element[dimension](0)\r\n      this.transition('addClass', $.Event('show'), 'shown')\r\n      $.support.transition && this.$element[dimension](this.$element[0][scroll])\r\n    }\r\n\r\n  , hide: function () {\r\n      var dimension\r\n      if (this.transitioning || !this.$element.hasClass('in')) return\r\n      dimension = this.dimension()\r\n      this.reset(this.$element[dimension]())\r\n      this.transition('removeClass', $.Event('hide'), 'hidden')\r\n      this.$element[dimension](0)\r\n    }\r\n\r\n  , reset: function (size) {\r\n      var dimension = this.dimension()\r\n\r\n      this.$element\r\n        .removeClass('collapse')\r\n        [dimension](size || 'auto')\r\n        [0].offsetWidth\r\n\r\n      this.$element[size !== null ? 'addClass' : 'removeClass']('collapse')\r\n\r\n      return this\r\n    }\r\n\r\n  , transition: function (method, startEvent, completeEvent) {\r\n      var that = this\r\n        , complete = function () {\r\n            if (startEvent.type == 'show') that.reset()\r\n            that.transitioning = 0\r\n            that.$element.trigger(completeEvent)\r\n          }\r\n\r\n      this.$element.trigger(startEvent)\r\n\r\n      if (startEvent.isDefaultPrevented()) return\r\n\r\n      this.transitioning = 1\r\n\r\n      this.$element[method]('in')\r\n\r\n      $.support.transition && this.$element.hasClass('collapse') ?\r\n        this.$element.one($.support.transition.end, complete) :\r\n        complete()\r\n    }\r\n\r\n  , toggle: function () {\r\n      this[this.$element.hasClass('in') ? 'hide' : 'show']()\r\n    }\r\n\r\n  }\r\n\r\n\r\n /* COLLAPSE PLUGIN DEFINITION\r\n  * ========================== */\r\n\r\n  var old = $.fn.collapse\r\n\r\n  $.fn.collapse = function (option) {\r\n    return this.each(function () {\r\n      var $this = $(this)\r\n        , data = $this.data('collapse')\r\n        , options = $.extend({}, $.fn.collapse.defaults, $this.data(), typeof option == 'object' && option)\r\n      if (!data) $this.data('collapse', (data = new Collapse(this, options)))\r\n      if (typeof option == 'string') data[option]()\r\n    })\r\n  }\r\n\r\n  $.fn.collapse.defaults = {\r\n    toggle: true\r\n  }\r\n\r\n  $.fn.collapse.Constructor = Collapse\r\n\r\n\r\n /* COLLAPSE NO CONFLICT\r\n  * ==================== */\r\n\r\n  $.fn.collapse.noConflict = function () {\r\n    $.fn.collapse = old\r\n    return this\r\n  }\r\n\r\n\r\n /* COLLAPSE DATA-API\r\n  * ================= */\r\n\r\n  $(document).on('click.collapse.data-api', '[data-toggle=collapse]', function (e) {\r\n    var $this = $(this), href\r\n      , target = $this.attr('data-target')\r\n        || e.preventDefault()\r\n        || (href = $this.attr('href')) && href.replace(/.*(?=#[^\\s]+$)/, '') //strip for ie7\r\n      , option = $(target).data('collapse') ? 'toggle' : $this.data()\r\n    $this[$(target).hasClass('in') ? 'addClass' : 'removeClass']('collapsed')\r\n    $(target).collapse(option)\r\n  })\r\n\r\n}(window.jQuery);/* ============================================================\r\n * bootstrap-dropdown.js v2.3.1\r\n * http://twitter.github.com/bootstrap/javascript.html#dropdowns\r\n * ============================================================\r\n * Copyright 2012 Twitter, Inc.\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n * ============================================================ */\r\n\r\n\r\n!function ($) {\r\n\r\n  \"use strict\"; // jshint ;_;\r\n\r\n\r\n /* DROPDOWN CLASS DEFINITION\r\n  * ========================= */\r\n\r\n  var toggle = '[data-toggle=dropdown]'\r\n    , Dropdown = function (element) {\r\n        var $el = $(element).on('click.dropdown.data-api', this.toggle)\r\n        $('html').on('click.dropdown.data-api', function () {\r\n          $el.parent().removeClass('open')\r\n        })\r\n      }\r\n\r\n  Dropdown.prototype = {\r\n\r\n    constructor: Dropdown\r\n\r\n  , toggle: function (e) {\r\n      var $this = $(this)\r\n        , $parent\r\n        , isActive\r\n\r\n      if ($this.is('.disabled, :disabled')) return\r\n\r\n      $parent = getParent($this)\r\n\r\n      isActive = $parent.hasClass('open')\r\n\r\n      clearMenus()\r\n\r\n      if (!isActive) {\r\n        $parent.toggleClass('open')\r\n      }\r\n\r\n      $this.focus()\r\n\r\n      return false\r\n    }\r\n\r\n  , keydown: function (e) {\r\n      var $this\r\n        , $items\r\n        , $active\r\n        , $parent\r\n        , isActive\r\n        , index\r\n\r\n      if (!/(38|40|27)/.test(e.keyCode)) return\r\n\r\n      $this = $(this)\r\n\r\n      e.preventDefault()\r\n      e.stopPropagation()\r\n\r\n      if ($this.is('.disabled, :disabled')) return\r\n\r\n      $parent = getParent($this)\r\n\r\n      isActive = $parent.hasClass('open')\r\n\r\n      if (!isActive || (isActive && e.keyCode == 27)) {\r\n        if (e.which == 27) $parent.find(toggle).focus()\r\n        return $this.click()\r\n      }\r\n\r\n      $items = $('[role=menu] li:not(.divider):visible a', $parent)\r\n\r\n      if (!$items.length) return\r\n\r\n      index = $items.index($items.filter(':focus'))\r\n\r\n      if (e.keyCode == 38 && index > 0) index--                                        // up\r\n      if (e.keyCode == 40 && index < $items.length - 1) index++                        // down\r\n      if (!~index) index = 0\r\n\r\n      $items\r\n        .eq(index)\r\n        .focus()\r\n    }\r\n\r\n  }\r\n\r\n  function clearMenus() {\r\n    $(toggle).each(function () {\r\n      getParent($(this)).removeClass('open')\r\n    })\r\n  }\r\n\r\n  function getParent($this) {\r\n    var selector = $this.attr('data-target')\r\n      , $parent\r\n\r\n    if (!selector) {\r\n      selector = $this.attr('href')\r\n      selector = selector && /#/.test(selector) && selector.replace(/.*(?=#[^\\s]*$)/, '') //strip for ie7\r\n    }\r\n\r\n    $parent = selector && $(selector)\r\n\r\n    if (!$parent || !$parent.length) $parent = $this.parent()\r\n\r\n    return $parent\r\n  }\r\n\r\n\r\n  /* DROPDOWN PLUGIN DEFINITION\r\n   * ========================== */\r\n\r\n  var old = $.fn.dropdown\r\n\r\n  $.fn.dropdown = function (option) {\r\n    return this.each(function () {\r\n      var $this = $(this)\r\n        , data = $this.data('dropdown')\r\n      if (!data) $this.data('dropdown', (data = new Dropdown(this)))\r\n      if (typeof option == 'string') data[option].call($this)\r\n    })\r\n  }\r\n\r\n  $.fn.dropdown.Constructor = Dropdown\r\n\r\n\r\n /* DROPDOWN NO CONFLICT\r\n  * ==================== */\r\n\r\n  $.fn.dropdown.noConflict = function () {\r\n    $.fn.dropdown = old\r\n    return this\r\n  }\r\n\r\n\r\n  /* APPLY TO STANDARD DROPDOWN ELEMENTS\r\n   * =================================== */\r\n\r\n  $(document)\r\n    .on('click.dropdown.data-api', clearMenus)\r\n    .on('click.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })\r\n    .on('click.dropdown-menu', function (e) { e.stopPropagation() })\r\n    .on('click.dropdown.data-api'  , toggle, Dropdown.prototype.toggle)\r\n    .on('keydown.dropdown.data-api', toggle + ', [role=menu]' , Dropdown.prototype.keydown)\r\n\r\n}(window.jQuery);\r\n/* =========================================================\r\n * bootstrap-modal.js v2.3.1\r\n * http://twitter.github.com/bootstrap/javascript.html#modals\r\n * =========================================================\r\n * Copyright 2012 Twitter, Inc.\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n * ========================================================= */\r\n\r\n\r\n!function ($) {\r\n\r\n  \"use strict\"; // jshint ;_;\r\n\r\n\r\n /* MODAL CLASS DEFINITION\r\n  * ====================== */\r\n\r\n  var Modal = function (element, options) {\r\n    this.options = options\r\n    this.$element = $(element)\r\n      .delegate('[data-dismiss=\"modal\"]', 'click.dismiss.modal', $.proxy(this.hide, this))\r\n    this.options.remote && this.$element.find('.modal-body').load(this.options.remote)\r\n  }\r\n\r\n  Modal.prototype = {\r\n\r\n      constructor: Modal\r\n\r\n    , toggle: function () {\r\n        return this[!this.isShown ? 'show' : 'hide']()\r\n      }\r\n\r\n    , show: function () {\r\n        var that = this\r\n          , e = $.Event('show')\r\n\r\n        this.$element.trigger(e)\r\n\r\n        if (this.isShown || e.isDefaultPrevented()) return\r\n\r\n        this.isShown = true\r\n\r\n        this.escape()\r\n\r\n        this.backdrop(function () {\r\n          var transition = $.support.transition && that.$element.hasClass('fade')\r\n\r\n          if (!that.$element.parent().length) {\r\n            that.$element.appendTo(document.body) //don't move modals dom position\r\n          }\r\n\r\n          that.$element.show()\r\n\r\n          if (transition) {\r\n            that.$element[0].offsetWidth // force reflow\r\n          }\r\n\r\n          that.$element\r\n            .addClass('in')\r\n            .attr('aria-hidden', false)\r\n\r\n          that.enforceFocus()\r\n\r\n          transition ?\r\n            that.$element.one($.support.transition.end, function () { that.$element.focus().trigger('shown') }) :\r\n            that.$element.focus().trigger('shown')\r\n\r\n        })\r\n      }\r\n\r\n    , hide: function (e) {\r\n        e && e.preventDefault()\r\n\r\n        var that = this\r\n\r\n        e = $.Event('hide')\r\n\r\n        this.$element.trigger(e)\r\n\r\n        if (!this.isShown || e.isDefaultPrevented()) return\r\n\r\n        this.isShown = false\r\n\r\n        this.escape()\r\n\r\n        $(document).off('focusin.modal')\r\n\r\n        this.$element\r\n          .removeClass('in')\r\n          .attr('aria-hidden', true)\r\n\r\n        $.support.transition && this.$element.hasClass('fade') ?\r\n          this.hideWithTransition() :\r\n          this.hideModal()\r\n      }\r\n\r\n    , enforceFocus: function () {\r\n        var that = this\r\n        $(document).on('focusin.modal', function (e) {\r\n          if (that.$element[0] !== e.target && !that.$element.has(e.target).length) {\r\n            that.$element.focus()\r\n          }\r\n        })\r\n      }\r\n\r\n    , escape: function () {\r\n        var that = this\r\n        if (this.isShown && this.options.keyboard) {\r\n          this.$element.on('keyup.dismiss.modal', function ( e ) {\r\n            e.which == 27 && that.hide()\r\n          })\r\n        } else if (!this.isShown) {\r\n          this.$element.off('keyup.dismiss.modal')\r\n        }\r\n      }\r\n\r\n    , hideWithTransition: function () {\r\n        var that = this\r\n          , timeout = setTimeout(function () {\r\n              that.$element.off($.support.transition.end)\r\n              that.hideModal()\r\n            }, 500)\r\n\r\n        this.$element.one($.support.transition.end, function () {\r\n          clearTimeout(timeout)\r\n          that.hideModal()\r\n        })\r\n      }\r\n\r\n    , hideModal: function () {\r\n        var that = this\r\n        this.$element.hide()\r\n        this.backdrop(function () {\r\n          that.removeBackdrop()\r\n          that.$element.trigger('hidden')\r\n        })\r\n      }\r\n\r\n    , removeBackdrop: function () {\r\n        this.$backdrop && this.$backdrop.remove()\r\n        this.$backdrop = null\r\n      }\r\n\r\n    , backdrop: function (callback) {\r\n        var that = this\r\n          , animate = this.$element.hasClass('fade') ? 'fade' : ''\r\n\r\n        if (this.isShown && this.options.backdrop) {\r\n          var doAnimate = $.support.transition && animate\r\n\r\n          this.$backdrop = $('<div class=\"modal-backdrop ' + animate + '\" />')\r\n            .appendTo(document.body)\r\n\r\n          this.$backdrop.click(\r\n            this.options.backdrop == 'static' ?\r\n              $.proxy(this.$element[0].focus, this.$element[0])\r\n            : $.proxy(this.hide, this)\r\n          )\r\n\r\n          if (doAnimate) this.$backdrop[0].offsetWidth // force reflow\r\n\r\n          this.$backdrop.addClass('in')\r\n\r\n          if (!callback) return\r\n\r\n          doAnimate ?\r\n            this.$backdrop.one($.support.transition.end, callback) :\r\n            callback()\r\n\r\n        } else if (!this.isShown && this.$backdrop) {\r\n          this.$backdrop.removeClass('in')\r\n\r\n          $.support.transition && this.$element.hasClass('fade')?\r\n            this.$backdrop.one($.support.transition.end, callback) :\r\n            callback()\r\n\r\n        } else if (callback) {\r\n          callback()\r\n        }\r\n      }\r\n  }\r\n\r\n\r\n /* MODAL PLUGIN DEFINITION\r\n  * ======================= */\r\n\r\n  var old = $.fn.modal\r\n\r\n  $.fn.modal = function (option) {\r\n    return this.each(function () {\r\n      var $this = $(this)\r\n        , data = $this.data('modal')\r\n        , options = $.extend({}, $.fn.modal.defaults, $this.data(), typeof option == 'object' && option)\r\n      if (!data) $this.data('modal', (data = new Modal(this, options)))\r\n      if (typeof option == 'string') data[option]()\r\n      else if (options.show) data.show()\r\n    })\r\n  }\r\n\r\n  $.fn.modal.defaults = {\r\n      backdrop: true\r\n    , keyboard: true\r\n    , show: true\r\n  }\r\n\r\n  $.fn.modal.Constructor = Modal\r\n\r\n\r\n /* MODAL NO CONFLICT\r\n  * ================= */\r\n\r\n  $.fn.modal.noConflict = function () {\r\n    $.fn.modal = old\r\n    return this\r\n  }\r\n\r\n\r\n /* MODAL DATA-API\r\n  * ============== */\r\n\r\n  $(document).on('click.modal.data-api', '[data-toggle=\"modal\"]', function (e) {\r\n    var $this = $(this)\r\n      , href = $this.attr('href')\r\n      , $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\\s]+$)/, ''))) //strip for ie7\r\n      , option = $target.data('modal') ? 'toggle' : $.extend({ remote:!/#/.test(href) && href }, $target.data(), $this.data())\r\n\r\n    e.preventDefault()\r\n\r\n    $target\r\n      .modal(option)\r\n      .one('hide', function () {\r\n        $this.focus()\r\n      })\r\n  })\r\n\r\n}(window.jQuery);\r\n/* ===========================================================\r\n * bootstrap-tooltip.js v2.3.1\r\n * http://twitter.github.com/bootstrap/javascript.html#tooltips\r\n * Inspired by the original jQuery.tipsy by Jason Frame\r\n * ===========================================================\r\n * Copyright 2012 Twitter, Inc.\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n * ========================================================== */\r\n\r\n\r\n!function ($) {\r\n\r\n  \"use strict\"; // jshint ;_;\r\n\r\n\r\n /* TOOLTIP PUBLIC CLASS DEFINITION\r\n  * =============================== */\r\n\r\n  var Tooltip = function (element, options) {\r\n    this.init('tooltip', element, options)\r\n  }\r\n\r\n  Tooltip.prototype = {\r\n\r\n    constructor: Tooltip\r\n\r\n  , init: function (type, element, options) {\r\n      var eventIn\r\n        , eventOut\r\n        , triggers\r\n        , trigger\r\n        , i\r\n\r\n      this.type = type\r\n      this.$element = $(element)\r\n      this.options = this.getOptions(options)\r\n      this.enabled = true\r\n\r\n      triggers = this.options.trigger.split(' ')\r\n\r\n      for (i = triggers.length; i--;) {\r\n        trigger = triggers[i]\r\n        if (trigger == 'click') {\r\n          this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this))\r\n        } else if (trigger != 'manual') {\r\n          eventIn = trigger == 'hover' ? 'mouseenter' : 'focus'\r\n          eventOut = trigger == 'hover' ? 'mouseleave' : 'blur'\r\n          this.$element.on(eventIn + '.' + this.type, this.options.selector, $.proxy(this.enter, this))\r\n          this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this))\r\n        }\r\n      }\r\n\r\n      this.options.selector ?\r\n        (this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) :\r\n        this.fixTitle()\r\n    }\r\n\r\n  , getOptions: function (options) {\r\n      options = $.extend({}, $.fn[this.type].defaults, this.$element.data(), options)\r\n\r\n      if (options.delay && typeof options.delay == 'number') {\r\n        options.delay = {\r\n          show: options.delay\r\n        , hide: options.delay\r\n        }\r\n      }\r\n\r\n      return options\r\n    }\r\n\r\n  , enter: function (e) {\r\n      var defaults = $.fn[this.type].defaults\r\n        , options = {}\r\n        , self\r\n\r\n      this._options && $.each(this._options, function (key, value) {\r\n        if (defaults[key] != value) options[key] = value\r\n      }, this)\r\n\r\n      self = $(e.currentTarget)[this.type](options).data(this.type)\r\n\r\n      if (!self.options.delay || !self.options.delay.show) return self.show()\r\n\r\n      clearTimeout(this.timeout)\r\n      self.hoverState = 'in'\r\n      this.timeout = setTimeout(function() {\r\n        if (self.hoverState == 'in') self.show()\r\n      }, self.options.delay.show)\r\n    }\r\n\r\n  , leave: function (e) {\r\n      var self = $(e.currentTarget)[this.type](this._options).data(this.type)\r\n\r\n      if (this.timeout) clearTimeout(this.timeout)\r\n      if (!self.options.delay || !self.options.delay.hide) return self.hide()\r\n\r\n      self.hoverState = 'out'\r\n      this.timeout = setTimeout(function() {\r\n        if (self.hoverState == 'out') self.hide()\r\n      }, self.options.delay.hide)\r\n    }\r\n\r\n  , show: function () {\r\n      var $tip\r\n        , pos\r\n        , actualWidth\r\n        , actualHeight\r\n        , placement\r\n        , tp\r\n        , e = $.Event('show')\r\n\r\n      if (this.hasContent() && this.enabled) {\r\n        this.$element.trigger(e)\r\n        if (e.isDefaultPrevented()) return\r\n        $tip = this.tip()\r\n        this.setContent()\r\n\r\n        if (this.options.animation) {\r\n          $tip.addClass('fade')\r\n        }\r\n\r\n        placement = typeof this.options.placement == 'function' ?\r\n          this.options.placement.call(this, $tip[0], this.$element[0]) :\r\n          this.options.placement\r\n\r\n        $tip\r\n          .detach()\r\n          .css({ top: 0, left: 0, display: 'block' })\r\n\r\n        this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element)\r\n\r\n        pos = this.getPosition()\r\n\r\n        actualWidth = $tip[0].offsetWidth\r\n        actualHeight = $tip[0].offsetHeight\r\n\r\n        switch (placement) {\r\n          case 'bottom':\r\n            tp = {top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2}\r\n            break\r\n          case 'top':\r\n            tp = {top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2}\r\n            break\r\n          case 'left':\r\n            tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth}\r\n            break\r\n          case 'right':\r\n            tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width}\r\n            break\r\n        }\r\n\r\n        this.applyPlacement(tp, placement)\r\n        this.$element.trigger('shown')\r\n      }\r\n    }\r\n\r\n  , applyPlacement: function(offset, placement){\r\n      var $tip = this.tip()\r\n        , width = $tip[0].offsetWidth\r\n        , height = $tip[0].offsetHeight\r\n        , actualWidth\r\n        , actualHeight\r\n        , delta\r\n        , replace\r\n\r\n      $tip\r\n        .offset(offset)\r\n        .addClass(placement)\r\n        .addClass('in')\r\n\r\n      actualWidth = $tip[0].offsetWidth\r\n      actualHeight = $tip[0].offsetHeight\r\n\r\n      if (placement == 'top' && actualHeight != height) {\r\n        offset.top = offset.top + height - actualHeight\r\n        replace = true\r\n      }\r\n\r\n      if (placement == 'bottom' || placement == 'top') {\r\n        delta = 0\r\n\r\n        if (offset.left < 0){\r\n          delta = offset.left * -2\r\n          offset.left = 0\r\n          $tip.offset(offset)\r\n          actualWidth = $tip[0].offsetWidth\r\n          actualHeight = $tip[0].offsetHeight\r\n        }\r\n\r\n        this.replaceArrow(delta - width + actualWidth, actualWidth, 'left')\r\n      } else {\r\n        this.replaceArrow(actualHeight - height, actualHeight, 'top')\r\n      }\r\n\r\n      if (replace) $tip.offset(offset)\r\n    }\r\n\r\n  , replaceArrow: function(delta, dimension, position){\r\n      this\r\n        .arrow()\r\n        .css(position, delta ? (50 * (1 - delta / dimension) + \"%\") : '')\r\n    }\r\n\r\n  , setContent: function () {\r\n      var $tip = this.tip()\r\n        , title = this.getTitle()\r\n\r\n      $tip.find('.tooltip-inner')[this.options.html ? 'html' : 'text'](title)\r\n      $tip.removeClass('fade in top bottom left right')\r\n    }\r\n\r\n  , hide: function () {\r\n      var that = this\r\n        , $tip = this.tip()\r\n        , e = $.Event('hide')\r\n\r\n      this.$element.trigger(e)\r\n      if (e.isDefaultPrevented()) return\r\n\r\n      $tip.removeClass('in')\r\n\r\n      function removeWithAnimation() {\r\n        var timeout = setTimeout(function () {\r\n          $tip.off($.support.transition.end).detach()\r\n        }, 500)\r\n\r\n        $tip.one($.support.transition.end, function () {\r\n          clearTimeout(timeout)\r\n          $tip.detach()\r\n        })\r\n      }\r\n\r\n      $.support.transition && this.$tip.hasClass('fade') ?\r\n        removeWithAnimation() :\r\n        $tip.detach()\r\n\r\n      this.$element.trigger('hidden')\r\n\r\n      return this\r\n    }\r\n\r\n  , fixTitle: function () {\r\n      var $e = this.$element\r\n      if ($e.attr('title') || typeof($e.attr('data-original-title')) != 'string') {\r\n        $e.attr('data-original-title', $e.attr('title') || '').attr('title', '')\r\n      }\r\n    }\r\n\r\n  , hasContent: function () {\r\n      return this.getTitle()\r\n    }\r\n\r\n  , getPosition: function () {\r\n      var el = this.$element[0]\r\n      return $.extend({}, (typeof el.getBoundingClientRect == 'function') ? el.getBoundingClientRect() : {\r\n        width: el.offsetWidth\r\n      , height: el.offsetHeight\r\n      }, this.$element.offset())\r\n    }\r\n\r\n  , getTitle: function () {\r\n      var title\r\n        , $e = this.$element\r\n        , o = this.options\r\n\r\n      title = $e.attr('data-original-title')\r\n        || (typeof o.title == 'function' ? o.title.call($e[0]) :  o.title)\r\n\r\n      return title\r\n    }\r\n\r\n  , tip: function () {\r\n      return this.$tip = this.$tip || $(this.options.template)\r\n    }\r\n\r\n  , arrow: function(){\r\n      return this.$arrow = this.$arrow || this.tip().find(\".tooltip-arrow\")\r\n    }\r\n\r\n  , validate: function () {\r\n      if (!this.$element[0].parentNode) {\r\n        this.hide()\r\n        this.$element = null\r\n        this.options = null\r\n      }\r\n    }\r\n\r\n  , enable: function () {\r\n      this.enabled = true\r\n    }\r\n\r\n  , disable: function () {\r\n      this.enabled = false\r\n    }\r\n\r\n  , toggleEnabled: function () {\r\n      this.enabled = !this.enabled\r\n    }\r\n\r\n  , toggle: function (e) {\r\n      var self = e ? $(e.currentTarget)[this.type](this._options).data(this.type) : this\r\n      self.tip().hasClass('in') ? self.hide() : self.show()\r\n    }\r\n\r\n  , destroy: function () {\r\n      this.hide().$element.off('.' + this.type).removeData(this.type)\r\n    }\r\n\r\n  }\r\n\r\n\r\n /* TOOLTIP PLUGIN DEFINITION\r\n  * ========================= */\r\n\r\n  var old = $.fn.tooltip\r\n\r\n  $.fn.tooltip = function ( option ) {\r\n    return this.each(function () {\r\n      var $this = $(this)\r\n        , data = $this.data('tooltip')\r\n        , options = typeof option == 'object' && option\r\n      if (!data) $this.data('tooltip', (data = new Tooltip(this, options)))\r\n      if (typeof option == 'string') data[option]()\r\n    })\r\n  }\r\n\r\n  $.fn.tooltip.Constructor = Tooltip\r\n\r\n  $.fn.tooltip.defaults = {\r\n    animation: true\r\n  , placement: 'top'\r\n  , selector: false\r\n  , template: '<div class=\"tooltip\"><div class=\"tooltip-arrow\"></div><div class=\"tooltip-inner\"></div></div>'\r\n  , trigger: 'hover focus'\r\n  , title: ''\r\n  , delay: 0\r\n  , html: false\r\n  , container: false\r\n  }\r\n\r\n\r\n /* TOOLTIP NO CONFLICT\r\n  * =================== */\r\n\r\n  $.fn.tooltip.noConflict = function () {\r\n    $.fn.tooltip = old\r\n    return this\r\n  }\r\n\r\n}(window.jQuery);\r\n/* ===========================================================\r\n * bootstrap-popover.js v2.3.1\r\n * http://twitter.github.com/bootstrap/javascript.html#popovers\r\n * ===========================================================\r\n * Copyright 2012 Twitter, Inc.\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n * =========================================================== */\r\n\r\n\r\n!function ($) {\r\n\r\n  \"use strict\"; // jshint ;_;\r\n\r\n\r\n /* POPOVER PUBLIC CLASS DEFINITION\r\n  * =============================== */\r\n\r\n  var Popover = function (element, options) {\r\n    this.init('popover', element, options)\r\n  }\r\n\r\n\r\n  /* NOTE: POPOVER EXTENDS BOOTSTRAP-TOOLTIP.js\r\n     ========================================== */\r\n\r\n  Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype, {\r\n\r\n    constructor: Popover\r\n\r\n  , setContent: function () {\r\n      var $tip = this.tip()\r\n        , title = this.getTitle()\r\n        , content = this.getContent()\r\n\r\n      $tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title)\r\n      $tip.find('.popover-content')[this.options.html ? 'html' : 'text'](content)\r\n\r\n      $tip.removeClass('fade top bottom left right in')\r\n    }\r\n\r\n  , hasContent: function () {\r\n      return this.getTitle() || this.getContent()\r\n    }\r\n\r\n  , getContent: function () {\r\n      var content\r\n        , $e = this.$element\r\n        , o = this.options\r\n\r\n      content = (typeof o.content == 'function' ? o.content.call($e[0]) :  o.content)\r\n        || $e.attr('data-content')\r\n\r\n      return content\r\n    }\r\n\r\n  , tip: function () {\r\n      if (!this.$tip) {\r\n        this.$tip = $(this.options.template)\r\n      }\r\n      return this.$tip\r\n    }\r\n\r\n  , destroy: function () {\r\n      this.hide().$element.off('.' + this.type).removeData(this.type)\r\n    }\r\n\r\n  })\r\n\r\n\r\n /* POPOVER PLUGIN DEFINITION\r\n  * ======================= */\r\n\r\n  var old = $.fn.popover\r\n\r\n  $.fn.popover = function (option) {\r\n    return this.each(function () {\r\n      var $this = $(this)\r\n        , data = $this.data('popover')\r\n        , options = typeof option == 'object' && option\r\n      if (!data) $this.data('popover', (data = new Popover(this, options)))\r\n      if (typeof option == 'string') data[option]()\r\n    })\r\n  }\r\n\r\n  $.fn.popover.Constructor = Popover\r\n\r\n  $.fn.popover.defaults = $.extend({} , $.fn.tooltip.defaults, {\r\n    placement: 'right'\r\n  , trigger: 'click'\r\n  , content: ''\r\n  , template: '<div class=\"popover\"><div class=\"arrow\"></div><h3 class=\"popover-title\"></h3><div class=\"popover-content\"></div></div>'\r\n  })\r\n\r\n\r\n /* POPOVER NO CONFLICT\r\n  * =================== */\r\n\r\n  $.fn.popover.noConflict = function () {\r\n    $.fn.popover = old\r\n    return this\r\n  }\r\n\r\n}(window.jQuery);\r\n/* =============================================================\r\n * bootstrap-scrollspy.js v2.3.1\r\n * http://twitter.github.com/bootstrap/javascript.html#scrollspy\r\n * =============================================================\r\n * Copyright 2012 Twitter, Inc.\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n * ============================================================== */\r\n\r\n\r\n!function ($) {\r\n\r\n  \"use strict\"; // jshint ;_;\r\n\r\n\r\n /* SCROLLSPY CLASS DEFINITION\r\n  * ========================== */\r\n\r\n  function ScrollSpy(element, options) {\r\n    var process = $.proxy(this.process, this)\r\n      , $element = $(element).is('body') ? $(window) : $(element)\r\n      , href\r\n    this.options = $.extend({}, $.fn.scrollspy.defaults, options)\r\n    this.$scrollElement = $element.on('scroll.scroll-spy.data-api', process)\r\n    this.selector = (this.options.target\r\n      || ((href = $(element).attr('href')) && href.replace(/.*(?=#[^\\s]+$)/, '')) //strip for ie7\r\n      || '') + ' .nav li > a'\r\n    this.$body = $('body')\r\n    this.refresh()\r\n    this.process()\r\n  }\r\n\r\n  ScrollSpy.prototype = {\r\n\r\n      constructor: ScrollSpy\r\n\r\n    , refresh: function () {\r\n        var self = this\r\n          , $targets\r\n\r\n        this.offsets = $([])\r\n        this.targets = $([])\r\n\r\n        $targets = this.$body\r\n          .find(this.selector)\r\n          .map(function () {\r\n            var $el = $(this)\r\n              , href = $el.data('target') || $el.attr('href')\r\n              , $href = /^#\\w/.test(href) && $(href)\r\n            return ( $href\r\n              && $href.length\r\n              && [[ $href.position().top + (!$.isWindow(self.$scrollElement.get(0)) && self.$scrollElement.scrollTop()), href ]] ) || null\r\n          })\r\n          .sort(function (a, b) { return a[0] - b[0] })\r\n          .each(function () {\r\n            self.offsets.push(this[0])\r\n            self.targets.push(this[1])\r\n          })\r\n      }\r\n\r\n    , process: function () {\r\n        var scrollTop = this.$scrollElement.scrollTop() + this.options.offset\r\n          , scrollHeight = this.$scrollElement[0].scrollHeight || this.$body[0].scrollHeight\r\n          , maxScroll = scrollHeight - this.$scrollElement.height()\r\n          , offsets = this.offsets\r\n          , targets = this.targets\r\n          , activeTarget = this.activeTarget\r\n          , i\r\n\r\n        if (scrollTop >= maxScroll) {\r\n          return activeTarget != (i = targets.last()[0])\r\n            && this.activate ( i )\r\n        }\r\n\r\n        for (i = offsets.length; i--;) {\r\n          activeTarget != targets[i]\r\n            && scrollTop >= offsets[i]\r\n            && (!offsets[i + 1] || scrollTop <= offsets[i + 1])\r\n            && this.activate( targets[i] )\r\n        }\r\n      }\r\n\r\n    , activate: function (target) {\r\n        var active\r\n          , selector\r\n\r\n        this.activeTarget = target\r\n\r\n        $(this.selector)\r\n          .parent('.active')\r\n          .removeClass('active')\r\n\r\n        selector = this.selector\r\n          + '[data-target=\"' + target + '\"],'\r\n          + this.selector + '[href=\"' + target + '\"]'\r\n\r\n        active = $(selector)\r\n          .parent('li')\r\n          .addClass('active')\r\n\r\n        if (active.parent('.dropdown-menu').length)  {\r\n          active = active.closest('li.dropdown').addClass('active')\r\n        }\r\n\r\n        active.trigger('activate')\r\n      }\r\n\r\n  }\r\n\r\n\r\n /* SCROLLSPY PLUGIN DEFINITION\r\n  * =========================== */\r\n\r\n  var old = $.fn.scrollspy\r\n\r\n  $.fn.scrollspy = function (option) {\r\n    return this.each(function () {\r\n      var $this = $(this)\r\n        , data = $this.data('scrollspy')\r\n        , options = typeof option == 'object' && option\r\n      if (!data) $this.data('scrollspy', (data = new ScrollSpy(this, options)))\r\n      if (typeof option == 'string') data[option]()\r\n    })\r\n  }\r\n\r\n  $.fn.scrollspy.Constructor = ScrollSpy\r\n\r\n  $.fn.scrollspy.defaults = {\r\n    offset: 10\r\n  }\r\n\r\n\r\n /* SCROLLSPY NO CONFLICT\r\n  * ===================== */\r\n\r\n  $.fn.scrollspy.noConflict = function () {\r\n    $.fn.scrollspy = old\r\n    return this\r\n  }\r\n\r\n\r\n /* SCROLLSPY DATA-API\r\n  * ================== */\r\n\r\n  $(window).on('load', function () {\r\n    $('[data-spy=\"scroll\"]').each(function () {\r\n      var $spy = $(this)\r\n      $spy.scrollspy($spy.data())\r\n    })\r\n  })\r\n\r\n}(window.jQuery);/* ========================================================\r\n * bootstrap-tab.js v2.3.1\r\n * http://twitter.github.com/bootstrap/javascript.html#tabs\r\n * ========================================================\r\n * Copyright 2012 Twitter, Inc.\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n * ======================================================== */\r\n\r\n\r\n!function ($) {\r\n\r\n  \"use strict\"; // jshint ;_;\r\n\r\n\r\n /* TAB CLASS DEFINITION\r\n  * ==================== */\r\n\r\n  var Tab = function (element) {\r\n    this.element = $(element)\r\n  }\r\n\r\n  Tab.prototype = {\r\n\r\n    constructor: Tab\r\n\r\n  , show: function () {\r\n      var $this = this.element\r\n        , $ul = $this.closest('ul:not(.dropdown-menu)')\r\n        , selector = $this.attr('data-target')\r\n        , previous\r\n        , $target\r\n        , e\r\n\r\n      if (!selector) {\r\n        selector = $this.attr('href')\r\n        selector = selector && selector.replace(/.*(?=#[^\\s]*$)/, '') //strip for ie7\r\n      }\r\n\r\n      if ( $this.parent('li').hasClass('active') ) return\r\n\r\n      previous = $ul.find('.active:last a')[0]\r\n\r\n      e = $.Event('show', {\r\n        relatedTarget: previous\r\n      })\r\n\r\n      $this.trigger(e)\r\n\r\n      if (e.isDefaultPrevented()) return\r\n\r\n      $target = $(selector)\r\n\r\n      this.activate($this.parent('li'), $ul)\r\n      this.activate($target, $target.parent(), function () {\r\n        $this.trigger({\r\n          type: 'shown'\r\n        , relatedTarget: previous\r\n        })\r\n      })\r\n    }\r\n\r\n  , activate: function ( element, container, callback) {\r\n      var $active = container.find('> .active')\r\n        , transition = callback\r\n            && $.support.transition\r\n            && $active.hasClass('fade')\r\n\r\n      function next() {\r\n        $active\r\n          .removeClass('active')\r\n          .find('> .dropdown-menu > .active')\r\n          .removeClass('active')\r\n\r\n        element.addClass('active')\r\n\r\n        if (transition) {\r\n          element[0].offsetWidth // reflow for transition\r\n          element.addClass('in')\r\n        } else {\r\n          element.removeClass('fade')\r\n        }\r\n\r\n        if ( element.parent('.dropdown-menu') ) {\r\n          element.closest('li.dropdown').addClass('active')\r\n        }\r\n\r\n        callback && callback()\r\n      }\r\n\r\n      transition ?\r\n        $active.one($.support.transition.end, next) :\r\n        next()\r\n\r\n      $active.removeClass('in')\r\n    }\r\n  }\r\n\r\n\r\n /* TAB PLUGIN DEFINITION\r\n  * ===================== */\r\n\r\n  var old = $.fn.tab\r\n\r\n  $.fn.tab = function ( option ) {\r\n    return this.each(function () {\r\n      var $this = $(this)\r\n        , data = $this.data('tab')\r\n      if (!data) $this.data('tab', (data = new Tab(this)))\r\n      if (typeof option == 'string') data[option]()\r\n    })\r\n  }\r\n\r\n  $.fn.tab.Constructor = Tab\r\n\r\n\r\n /* TAB NO CONFLICT\r\n  * =============== */\r\n\r\n  $.fn.tab.noConflict = function () {\r\n    $.fn.tab = old\r\n    return this\r\n  }\r\n\r\n\r\n /* TAB DATA-API\r\n  * ============ */\r\n\r\n  $(document).on('click.tab.data-api', '[data-toggle=\"tab\"], [data-toggle=\"pill\"]', function (e) {\r\n    e.preventDefault()\r\n    $(this).tab('show')\r\n  })\r\n\r\n}(window.jQuery);/* =============================================================\r\n * bootstrap-typeahead.js v2.3.1\r\n * http://twitter.github.com/bootstrap/javascript.html#typeahead\r\n * =============================================================\r\n * Copyright 2012 Twitter, Inc.\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n * ============================================================ */\r\n\r\n\r\n!function($){\r\n\r\n  \"use strict\"; // jshint ;_;\r\n\r\n\r\n /* TYPEAHEAD PUBLIC CLASS DEFINITION\r\n  * ================================= */\r\n\r\n  var Typeahead = function (element, options) {\r\n    this.$element = $(element)\r\n    this.options = $.extend({}, $.fn.typeahead.defaults, options)\r\n    this.matcher = this.options.matcher || this.matcher\r\n    this.sorter = this.options.sorter || this.sorter\r\n    this.highlighter = this.options.highlighter || this.highlighter\r\n    this.updater = this.options.updater || this.updater\r\n    this.source = this.options.source\r\n    this.$menu = $(this.options.menu)\r\n    this.shown = false\r\n    this.listen()\r\n  }\r\n\r\n  Typeahead.prototype = {\r\n\r\n    constructor: Typeahead\r\n\r\n  , select: function () {\r\n      var val = this.$menu.find('.active').attr('data-value')\r\n      this.$element\r\n        .val(this.updater(val))\r\n        .change()\r\n      return this.hide()\r\n    }\r\n\r\n  , updater: function (item) {\r\n      return item\r\n    }\r\n\r\n  , show: function () {\r\n      var pos = $.extend({}, this.$element.position(), {\r\n        height: this.$element[0].offsetHeight\r\n      })\r\n\r\n      this.$menu\r\n        .insertAfter(this.$element)\r\n        .css({\r\n          top: pos.top + pos.height\r\n        , left: pos.left\r\n        })\r\n        .show()\r\n\r\n      this.shown = true\r\n      return this\r\n    }\r\n\r\n  , hide: function () {\r\n      this.$menu.hide()\r\n      this.shown = false\r\n      return this\r\n    }\r\n\r\n  , lookup: function (event) {\r\n      var items\r\n\r\n      this.query = this.$element.val()\r\n\r\n      if (!this.query || this.query.length < this.options.minLength) {\r\n        return this.shown ? this.hide() : this\r\n      }\r\n\r\n      items = $.isFunction(this.source) ? this.source(this.query, $.proxy(this.process, this)) : this.source\r\n\r\n      return items ? this.process(items) : this\r\n    }\r\n\r\n  , process: function (items) {\r\n      var that = this\r\n\r\n      items = $.grep(items, function (item) {\r\n        return that.matcher(item)\r\n      })\r\n\r\n      items = this.sorter(items)\r\n\r\n      if (!items.length) {\r\n        return this.shown ? this.hide() : this\r\n      }\r\n\r\n      return this.render(items.slice(0, this.options.items)).show()\r\n    }\r\n\r\n  , matcher: function (item) {\r\n      return ~item.toLowerCase().indexOf(this.query.toLowerCase())\r\n    }\r\n\r\n  , sorter: function (items) {\r\n      var beginswith = []\r\n        , caseSensitive = []\r\n        , caseInsensitive = []\r\n        , item\r\n\r\n      while (item = items.shift()) {\r\n        if (!item.toLowerCase().indexOf(this.query.toLowerCase())) beginswith.push(item)\r\n        else if (~item.indexOf(this.query)) caseSensitive.push(item)\r\n        else caseInsensitive.push(item)\r\n      }\r\n\r\n      return beginswith.concat(caseSensitive, caseInsensitive)\r\n    }\r\n\r\n  , highlighter: function (item) {\r\n      var query = this.query.replace(/[\\-\\[\\]{}()*+?.,\\\\\\^$|#\\s]/g, '\\\\$&')\r\n      return item.replace(new RegExp('(' + query + ')', 'ig'), function ($1, match) {\r\n        return '<strong>' + match + '</strong>'\r\n      })\r\n    }\r\n\r\n  , render: function (items) {\r\n      var that = this\r\n\r\n      items = $(items).map(function (i, item) {\r\n        i = $(that.options.item).attr('data-value', item)\r\n        i.find('a').html(that.highlighter(item))\r\n        return i[0]\r\n      })\r\n\r\n      items.first().addClass('active')\r\n      this.$menu.html(items)\r\n      return this\r\n    }\r\n\r\n  , next: function (event) {\r\n      var active = this.$menu.find('.active').removeClass('active')\r\n        , next = active.next()\r\n\r\n      if (!next.length) {\r\n        next = $(this.$menu.find('li')[0])\r\n      }\r\n\r\n      next.addClass('active')\r\n    }\r\n\r\n  , prev: function (event) {\r\n      var active = this.$menu.find('.active').removeClass('active')\r\n        , prev = active.prev()\r\n\r\n      if (!prev.length) {\r\n        prev = this.$menu.find('li').last()\r\n      }\r\n\r\n      prev.addClass('active')\r\n    }\r\n\r\n  , listen: function () {\r\n      this.$element\r\n        .on('focus',    $.proxy(this.focus, this))\r\n        .on('blur',     $.proxy(this.blur, this))\r\n        .on('keypress', $.proxy(this.keypress, this))\r\n        .on('keyup',    $.proxy(this.keyup, this))\r\n\r\n      if (this.eventSupported('keydown')) {\r\n        this.$element.on('keydown', $.proxy(this.keydown, this))\r\n      }\r\n\r\n      this.$menu\r\n        .on('click', $.proxy(this.click, this))\r\n        .on('mouseenter', 'li', $.proxy(this.mouseenter, this))\r\n        .on('mouseleave', 'li', $.proxy(this.mouseleave, this))\r\n    }\r\n\r\n  , eventSupported: function(eventName) {\r\n      var isSupported = eventName in this.$element\r\n      if (!isSupported) {\r\n        this.$element.setAttribute(eventName, 'return;')\r\n        isSupported = typeof this.$element[eventName] === 'function'\r\n      }\r\n      return isSupported\r\n    }\r\n\r\n  , move: function (e) {\r\n      if (!this.shown) return\r\n\r\n      switch(e.keyCode) {\r\n        case 9: // tab\r\n        case 13: // enter\r\n        case 27: // escape\r\n          e.preventDefault()\r\n          break\r\n\r\n        case 38: // up arrow\r\n          e.preventDefault()\r\n          this.prev()\r\n          break\r\n\r\n        case 40: // down arrow\r\n          e.preventDefault()\r\n          this.next()\r\n          break\r\n      }\r\n\r\n      e.stopPropagation()\r\n    }\r\n\r\n  , keydown: function (e) {\r\n      this.suppressKeyPressRepeat = ~$.inArray(e.keyCode, [40,38,9,13,27])\r\n      this.move(e)\r\n    }\r\n\r\n  , keypress: function (e) {\r\n      if (this.suppressKeyPressRepeat) return\r\n      this.move(e)\r\n    }\r\n\r\n  , keyup: function (e) {\r\n      switch(e.keyCode) {\r\n        case 40: // down arrow\r\n        case 38: // up arrow\r\n        case 16: // shift\r\n        case 17: // ctrl\r\n        case 18: // alt\r\n          break\r\n\r\n        case 9: // tab\r\n        case 13: // enter\r\n          if (!this.shown) return\r\n          this.select()\r\n          break\r\n\r\n        case 27: // escape\r\n          if (!this.shown) return\r\n          this.hide()\r\n          break\r\n\r\n        default:\r\n          this.lookup()\r\n      }\r\n\r\n      e.stopPropagation()\r\n      e.preventDefault()\r\n  }\r\n\r\n  , focus: function (e) {\r\n      this.focused = true\r\n    }\r\n\r\n  , blur: function (e) {\r\n      this.focused = false\r\n      if (!this.mousedover && this.shown) this.hide()\r\n    }\r\n\r\n  , click: function (e) {\r\n      e.stopPropagation()\r\n      e.preventDefault()\r\n      this.select()\r\n      this.$element.focus()\r\n    }\r\n\r\n  , mouseenter: function (e) {\r\n      this.mousedover = true\r\n      this.$menu.find('.active').removeClass('active')\r\n      $(e.currentTarget).addClass('active')\r\n    }\r\n\r\n  , mouseleave: function (e) {\r\n      this.mousedover = false\r\n      if (!this.focused && this.shown) this.hide()\r\n    }\r\n\r\n  }\r\n\r\n\r\n  /* TYPEAHEAD PLUGIN DEFINITION\r\n   * =========================== */\r\n\r\n  var old = $.fn.typeahead\r\n\r\n  $.fn.typeahead = function (option) {\r\n    return this.each(function () {\r\n      var $this = $(this)\r\n        , data = $this.data('typeahead')\r\n        , options = typeof option == 'object' && option\r\n      if (!data) $this.data('typeahead', (data = new Typeahead(this, options)))\r\n      if (typeof option == 'string') data[option]()\r\n    })\r\n  }\r\n\r\n  $.fn.typeahead.defaults = {\r\n    source: []\r\n  , items: 8\r\n  , menu: '<ul class=\"typeahead dropdown-menu\"></ul>'\r\n  , item: '<li><a href=\"#\"></a></li>'\r\n  , minLength: 1\r\n  }\r\n\r\n  $.fn.typeahead.Constructor = Typeahead\r\n\r\n\r\n /* TYPEAHEAD NO CONFLICT\r\n  * =================== */\r\n\r\n  $.fn.typeahead.noConflict = function () {\r\n    $.fn.typeahead = old\r\n    return this\r\n  }\r\n\r\n\r\n /* TYPEAHEAD DATA-API\r\n  * ================== */\r\n\r\n  $(document).on('focus.typeahead.data-api', '[data-provide=\"typeahead\"]', function (e) {\r\n    var $this = $(this)\r\n    if ($this.data('typeahead')) return\r\n    $this.typeahead($this.data())\r\n  })\r\n\r\n}(window.jQuery);\r\n/* ==========================================================\r\n * bootstrap-affix.js v2.3.1\r\n * http://twitter.github.com/bootstrap/javascript.html#affix\r\n * ==========================================================\r\n * Copyright 2012 Twitter, Inc.\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n * ========================================================== */\r\n\r\n\r\n!function ($) {\r\n\r\n  \"use strict\"; // jshint ;_;\r\n\r\n\r\n /* AFFIX CLASS DEFINITION\r\n  * ====================== */\r\n\r\n  var Affix = function (element, options) {\r\n    this.options = $.extend({}, $.fn.affix.defaults, options)\r\n    this.$window = $(window)\r\n      .on('scroll.affix.data-api', $.proxy(this.checkPosition, this))\r\n      .on('click.affix.data-api',  $.proxy(function () { setTimeout($.proxy(this.checkPosition, this), 1) }, this))\r\n    this.$element = $(element)\r\n    this.checkPosition()\r\n  }\r\n\r\n  Affix.prototype.checkPosition = function () {\r\n    if (!this.$element.is(':visible')) return\r\n\r\n    var scrollHeight = $(document).height()\r\n      , scrollTop = this.$window.scrollTop()\r\n      , position = this.$element.offset()\r\n      , offset = this.options.offset\r\n      , offsetBottom = offset.bottom\r\n      , offsetTop = offset.top\r\n      , reset = 'affix affix-top affix-bottom'\r\n      , affix\r\n\r\n    if (typeof offset != 'object') offsetBottom = offsetTop = offset\r\n    if (typeof offsetTop == 'function') offsetTop = offset.top()\r\n    if (typeof offsetBottom == 'function') offsetBottom = offset.bottom()\r\n\r\n    affix = this.unpin != null && (scrollTop + this.unpin <= position.top) ?\r\n      false    : offsetBottom != null && (position.top + this.$element.height() >= scrollHeight - offsetBottom) ?\r\n      'bottom' : offsetTop != null && scrollTop <= offsetTop ?\r\n      'top'    : false\r\n\r\n    if (this.affixed === affix) return\r\n\r\n    this.affixed = affix\r\n    this.unpin = affix == 'bottom' ? position.top - scrollTop : null\r\n\r\n    this.$element.removeClass(reset).addClass('affix' + (affix ? '-' + affix : ''))\r\n  }\r\n\r\n\r\n /* AFFIX PLUGIN DEFINITION\r\n  * ======================= */\r\n\r\n  var old = $.fn.affix\r\n\r\n  $.fn.affix = function (option) {\r\n    return this.each(function () {\r\n      var $this = $(this)\r\n        , data = $this.data('affix')\r\n        , options = typeof option == 'object' && option\r\n      if (!data) $this.data('affix', (data = new Affix(this, options)))\r\n      if (typeof option == 'string') data[option]()\r\n    })\r\n  }\r\n\r\n  $.fn.affix.Constructor = Affix\r\n\r\n  $.fn.affix.defaults = {\r\n    offset: 0\r\n  }\r\n\r\n\r\n /* AFFIX NO CONFLICT\r\n  * ================= */\r\n\r\n  $.fn.affix.noConflict = function () {\r\n    $.fn.affix = old\r\n    return this\r\n  }\r\n\r\n\r\n /* AFFIX DATA-API\r\n  * ============== */\r\n\r\n  $(window).on('load', function () {\r\n    $('[data-spy=\"affix\"]').each(function () {\r\n      var $spy = $(this)\r\n        , data = $spy.data()\r\n\r\n      data.offset = data.offset || {}\r\n\r\n      data.offsetBottom && (data.offset.bottom = data.offsetBottom)\r\n      data.offsetTop && (data.offset.top = data.offsetTop)\r\n\r\n      $spy.affix(data)\r\n    })\r\n  })\r\n\r\n\r\n}(window.jQuery);"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.REST.SocialMedia/AccountManagement.EntryPoint/vendor/js/jquery-1.10.2.js",
    "content": "/*!\r\n * jQuery JavaScript Library v1.10.2\r\n * http://jquery.com/\r\n *\r\n * Includes Sizzle.js\r\n * http://sizzlejs.com/\r\n *\r\n * Copyright 2005, 2013 jQuery Foundation, Inc. and other contributors\r\n * Released under the MIT license\r\n * http://jquery.org/license\r\n *\r\n * Date: 2013-07-03T13:48Z\r\n */\r\n(function( window, undefined ) {\r\n\r\n// Can't do this because several apps including ASP.NET trace\r\n// the stack via arguments.caller.callee and Firefox dies if\r\n// you try to trace through \"use strict\" call chains. (#13335)\r\n// Support: Firefox 18+\r\n//\"use strict\";\r\nvar\r\n\t// The deferred used on DOM ready\r\n\treadyList,\r\n\r\n\t// A central reference to the root jQuery(document)\r\n\trootjQuery,\r\n\r\n\t// Support: IE<10\r\n\t// For `typeof xmlNode.method` instead of `xmlNode.method !== undefined`\r\n\tcore_strundefined = typeof undefined,\r\n\r\n\t// Use the correct document accordingly with window argument (sandbox)\r\n\tlocation = window.location,\r\n\tdocument = window.document,\r\n\tdocElem = document.documentElement,\r\n\r\n\t// Map over jQuery in case of overwrite\r\n\t_jQuery = window.jQuery,\r\n\r\n\t// Map over the $ in case of overwrite\r\n\t_$ = window.$,\r\n\r\n\t// [[Class]] -> type pairs\r\n\tclass2type = {},\r\n\r\n\t// List of deleted data cache ids, so we can reuse them\r\n\tcore_deletedIds = [],\r\n\r\n\tcore_version = \"1.10.2\",\r\n\r\n\t// Save a reference to some core methods\r\n\tcore_concat = core_deletedIds.concat,\r\n\tcore_push = core_deletedIds.push,\r\n\tcore_slice = core_deletedIds.slice,\r\n\tcore_indexOf = core_deletedIds.indexOf,\r\n\tcore_toString = class2type.toString,\r\n\tcore_hasOwn = class2type.hasOwnProperty,\r\n\tcore_trim = core_version.trim,\r\n\r\n\t// Define a local copy of jQuery\r\n\tjQuery = function( selector, context ) {\r\n\t\t// The jQuery object is actually just the init constructor 'enhanced'\r\n\t\treturn new jQuery.fn.init( selector, context, rootjQuery );\r\n\t},\r\n\r\n\t// Used for matching numbers\r\n\tcore_pnum = /[+-]?(?:\\d*\\.|)\\d+(?:[eE][+-]?\\d+|)/.source,\r\n\r\n\t// Used for splitting on whitespace\r\n\tcore_rnotwhite = /\\S+/g,\r\n\r\n\t// Make sure we trim BOM and NBSP (here's looking at you, Safari 5.0 and IE)\r\n\trtrim = /^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g,\r\n\r\n\t// A simple way to check for HTML strings\r\n\t// Prioritize #id over <tag> to avoid XSS via location.hash (#9521)\r\n\t// Strict HTML recognition (#11290: must start with <)\r\n\trquickExpr = /^(?:\\s*(<[\\w\\W]+>)[^>]*|#([\\w-]*))$/,\r\n\r\n\t// Match a standalone tag\r\n\trsingleTag = /^<(\\w+)\\s*\\/?>(?:<\\/\\1>|)$/,\r\n\r\n\t// JSON RegExp\r\n\trvalidchars = /^[\\],:{}\\s]*$/,\r\n\trvalidbraces = /(?:^|:|,)(?:\\s*\\[)+/g,\r\n\trvalidescape = /\\\\(?:[\"\\\\\\/bfnrt]|u[\\da-fA-F]{4})/g,\r\n\trvalidtokens = /\"[^\"\\\\\\r\\n]*\"|true|false|null|-?(?:\\d+\\.|)\\d+(?:[eE][+-]?\\d+|)/g,\r\n\r\n\t// Matches dashed string for camelizing\r\n\trmsPrefix = /^-ms-/,\r\n\trdashAlpha = /-([\\da-z])/gi,\r\n\r\n\t// Used by jQuery.camelCase as callback to replace()\r\n\tfcamelCase = function( all, letter ) {\r\n\t\treturn letter.toUpperCase();\r\n\t},\r\n\r\n\t// The ready event handler\r\n\tcompleted = function( event ) {\r\n\r\n\t\t// readyState === \"complete\" is good enough for us to call the dom ready in oldIE\r\n\t\tif ( document.addEventListener || event.type === \"load\" || document.readyState === \"complete\" ) {\r\n\t\t\tdetach();\r\n\t\t\tjQuery.ready();\r\n\t\t}\r\n\t},\r\n\t// Clean-up method for dom ready events\r\n\tdetach = function() {\r\n\t\tif ( document.addEventListener ) {\r\n\t\t\tdocument.removeEventListener( \"DOMContentLoaded\", completed, false );\r\n\t\t\twindow.removeEventListener( \"load\", completed, false );\r\n\r\n\t\t} else {\r\n\t\t\tdocument.detachEvent( \"onreadystatechange\", completed );\r\n\t\t\twindow.detachEvent( \"onload\", completed );\r\n\t\t}\r\n\t};\r\n\r\njQuery.fn = jQuery.prototype = {\r\n\t// The current version of jQuery being used\r\n\tjquery: core_version,\r\n\r\n\tconstructor: jQuery,\r\n\tinit: function( selector, context, rootjQuery ) {\r\n\t\tvar match, elem;\r\n\r\n\t\t// HANDLE: $(\"\"), $(null), $(undefined), $(false)\r\n\t\tif ( !selector ) {\r\n\t\t\treturn this;\r\n\t\t}\r\n\r\n\t\t// Handle HTML strings\r\n\t\tif ( typeof selector === \"string\" ) {\r\n\t\t\tif ( selector.charAt(0) === \"<\" && selector.charAt( selector.length - 1 ) === \">\" && selector.length >= 3 ) {\r\n\t\t\t\t// Assume that strings that start and end with <> are HTML and skip the regex check\r\n\t\t\t\tmatch = [ null, selector, null ];\r\n\r\n\t\t\t} else {\r\n\t\t\t\tmatch = rquickExpr.exec( selector );\r\n\t\t\t}\r\n\r\n\t\t\t// Match html or make sure no context is specified for #id\r\n\t\t\tif ( match && (match[1] || !context) ) {\r\n\r\n\t\t\t\t// HANDLE: $(html) -> $(array)\r\n\t\t\t\tif ( match[1] ) {\r\n\t\t\t\t\tcontext = context instanceof jQuery ? context[0] : context;\r\n\r\n\t\t\t\t\t// scripts is true for back-compat\r\n\t\t\t\t\tjQuery.merge( this, jQuery.parseHTML(\r\n\t\t\t\t\t\tmatch[1],\r\n\t\t\t\t\t\tcontext && context.nodeType ? context.ownerDocument || context : document,\r\n\t\t\t\t\t\ttrue\r\n\t\t\t\t\t) );\r\n\r\n\t\t\t\t\t// HANDLE: $(html, props)\r\n\t\t\t\t\tif ( rsingleTag.test( match[1] ) && jQuery.isPlainObject( context ) ) {\r\n\t\t\t\t\t\tfor ( match in context ) {\r\n\t\t\t\t\t\t\t// Properties of context are called as methods if possible\r\n\t\t\t\t\t\t\tif ( jQuery.isFunction( this[ match ] ) ) {\r\n\t\t\t\t\t\t\t\tthis[ match ]( context[ match ] );\r\n\r\n\t\t\t\t\t\t\t// ...and otherwise set as attributes\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tthis.attr( match, context[ match ] );\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\treturn this;\r\n\r\n\t\t\t\t// HANDLE: $(#id)\r\n\t\t\t\t} else {\r\n\t\t\t\t\telem = document.getElementById( match[2] );\r\n\r\n\t\t\t\t\t// Check parentNode to catch when Blackberry 4.6 returns\r\n\t\t\t\t\t// nodes that are no longer in the document #6963\r\n\t\t\t\t\tif ( elem && elem.parentNode ) {\r\n\t\t\t\t\t\t// Handle the case where IE and Opera return items\r\n\t\t\t\t\t\t// by name instead of ID\r\n\t\t\t\t\t\tif ( elem.id !== match[2] ) {\r\n\t\t\t\t\t\t\treturn rootjQuery.find( selector );\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t// Otherwise, we inject the element directly into the jQuery object\r\n\t\t\t\t\t\tthis.length = 1;\r\n\t\t\t\t\t\tthis[0] = elem;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tthis.context = document;\r\n\t\t\t\t\tthis.selector = selector;\r\n\t\t\t\t\treturn this;\r\n\t\t\t\t}\r\n\r\n\t\t\t// HANDLE: $(expr, $(...))\r\n\t\t\t} else if ( !context || context.jquery ) {\r\n\t\t\t\treturn ( context || rootjQuery ).find( selector );\r\n\r\n\t\t\t// HANDLE: $(expr, context)\r\n\t\t\t// (which is just equivalent to: $(context).find(expr)\r\n\t\t\t} else {\r\n\t\t\t\treturn this.constructor( context ).find( selector );\r\n\t\t\t}\r\n\r\n\t\t// HANDLE: $(DOMElement)\r\n\t\t} else if ( selector.nodeType ) {\r\n\t\t\tthis.context = this[0] = selector;\r\n\t\t\tthis.length = 1;\r\n\t\t\treturn this;\r\n\r\n\t\t// HANDLE: $(function)\r\n\t\t// Shortcut for document ready\r\n\t\t} else if ( jQuery.isFunction( selector ) ) {\r\n\t\t\treturn rootjQuery.ready( selector );\r\n\t\t}\r\n\r\n\t\tif ( selector.selector !== undefined ) {\r\n\t\t\tthis.selector = selector.selector;\r\n\t\t\tthis.context = selector.context;\r\n\t\t}\r\n\r\n\t\treturn jQuery.makeArray( selector, this );\r\n\t},\r\n\r\n\t// Start with an empty selector\r\n\tselector: \"\",\r\n\r\n\t// The default length of a jQuery object is 0\r\n\tlength: 0,\r\n\r\n\ttoArray: function() {\r\n\t\treturn core_slice.call( this );\r\n\t},\r\n\r\n\t// Get the Nth element in the matched element set OR\r\n\t// Get the whole matched element set as a clean array\r\n\tget: function( num ) {\r\n\t\treturn num == null ?\r\n\r\n\t\t\t// Return a 'clean' array\r\n\t\t\tthis.toArray() :\r\n\r\n\t\t\t// Return just the object\r\n\t\t\t( num < 0 ? this[ this.length + num ] : this[ num ] );\r\n\t},\r\n\r\n\t// Take an array of elements and push it onto the stack\r\n\t// (returning the new matched element set)\r\n\tpushStack: function( elems ) {\r\n\r\n\t\t// Build a new jQuery matched element set\r\n\t\tvar ret = jQuery.merge( this.constructor(), elems );\r\n\r\n\t\t// Add the old object onto the stack (as a reference)\r\n\t\tret.prevObject = this;\r\n\t\tret.context = this.context;\r\n\r\n\t\t// Return the newly-formed element set\r\n\t\treturn ret;\r\n\t},\r\n\r\n\t// Execute a callback for every element in the matched set.\r\n\t// (You can seed the arguments with an array of args, but this is\r\n\t// only used internally.)\r\n\teach: function( callback, args ) {\r\n\t\treturn jQuery.each( this, callback, args );\r\n\t},\r\n\r\n\tready: function( fn ) {\r\n\t\t// Add the callback\r\n\t\tjQuery.ready.promise().done( fn );\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\tslice: function() {\r\n\t\treturn this.pushStack( core_slice.apply( this, arguments ) );\r\n\t},\r\n\r\n\tfirst: function() {\r\n\t\treturn this.eq( 0 );\r\n\t},\r\n\r\n\tlast: function() {\r\n\t\treturn this.eq( -1 );\r\n\t},\r\n\r\n\teq: function( i ) {\r\n\t\tvar len = this.length,\r\n\t\t\tj = +i + ( i < 0 ? len : 0 );\r\n\t\treturn this.pushStack( j >= 0 && j < len ? [ this[j] ] : [] );\r\n\t},\r\n\r\n\tmap: function( callback ) {\r\n\t\treturn this.pushStack( jQuery.map(this, function( elem, i ) {\r\n\t\t\treturn callback.call( elem, i, elem );\r\n\t\t}));\r\n\t},\r\n\r\n\tend: function() {\r\n\t\treturn this.prevObject || this.constructor(null);\r\n\t},\r\n\r\n\t// For internal use only.\r\n\t// Behaves like an Array's method, not like a jQuery method.\r\n\tpush: core_push,\r\n\tsort: [].sort,\r\n\tsplice: [].splice\r\n};\r\n\r\n// Give the init function the jQuery prototype for later instantiation\r\njQuery.fn.init.prototype = jQuery.fn;\r\n\r\njQuery.extend = jQuery.fn.extend = function() {\r\n\tvar src, copyIsArray, copy, name, options, clone,\r\n\t\ttarget = arguments[0] || {},\r\n\t\ti = 1,\r\n\t\tlength = arguments.length,\r\n\t\tdeep = false;\r\n\r\n\t// Handle a deep copy situation\r\n\tif ( typeof target === \"boolean\" ) {\r\n\t\tdeep = target;\r\n\t\ttarget = arguments[1] || {};\r\n\t\t// skip the boolean and the target\r\n\t\ti = 2;\r\n\t}\r\n\r\n\t// Handle case when target is a string or something (possible in deep copy)\r\n\tif ( typeof target !== \"object\" && !jQuery.isFunction(target) ) {\r\n\t\ttarget = {};\r\n\t}\r\n\r\n\t// extend jQuery itself if only one argument is passed\r\n\tif ( length === i ) {\r\n\t\ttarget = this;\r\n\t\t--i;\r\n\t}\r\n\r\n\tfor ( ; i < length; i++ ) {\r\n\t\t// Only deal with non-null/undefined values\r\n\t\tif ( (options = arguments[ i ]) != null ) {\r\n\t\t\t// Extend the base object\r\n\t\t\tfor ( name in options ) {\r\n\t\t\t\tsrc = target[ name ];\r\n\t\t\t\tcopy = options[ name ];\r\n\r\n\t\t\t\t// Prevent never-ending loop\r\n\t\t\t\tif ( target === copy ) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Recurse if we're merging plain objects or arrays\r\n\t\t\t\tif ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) {\r\n\t\t\t\t\tif ( copyIsArray ) {\r\n\t\t\t\t\t\tcopyIsArray = false;\r\n\t\t\t\t\t\tclone = src && jQuery.isArray(src) ? src : [];\r\n\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tclone = src && jQuery.isPlainObject(src) ? src : {};\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// Never move original objects, clone them\r\n\t\t\t\t\ttarget[ name ] = jQuery.extend( deep, clone, copy );\r\n\r\n\t\t\t\t// Don't bring in undefined values\r\n\t\t\t\t} else if ( copy !== undefined ) {\r\n\t\t\t\t\ttarget[ name ] = copy;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t// Return the modified object\r\n\treturn target;\r\n};\r\n\r\njQuery.extend({\r\n\t// Unique for each copy of jQuery on the page\r\n\t// Non-digits removed to match rinlinejQuery\r\n\texpando: \"jQuery\" + ( core_version + Math.random() ).replace( /\\D/g, \"\" ),\r\n\r\n\tnoConflict: function( deep ) {\r\n\t\tif ( window.$ === jQuery ) {\r\n\t\t\twindow.$ = _$;\r\n\t\t}\r\n\r\n\t\tif ( deep && window.jQuery === jQuery ) {\r\n\t\t\twindow.jQuery = _jQuery;\r\n\t\t}\r\n\r\n\t\treturn jQuery;\r\n\t},\r\n\r\n\t// Is the DOM ready to be used? Set to true once it occurs.\r\n\tisReady: false,\r\n\r\n\t// A counter to track how many items to wait for before\r\n\t// the ready event fires. See #6781\r\n\treadyWait: 1,\r\n\r\n\t// Hold (or release) the ready event\r\n\tholdReady: function( hold ) {\r\n\t\tif ( hold ) {\r\n\t\t\tjQuery.readyWait++;\r\n\t\t} else {\r\n\t\t\tjQuery.ready( true );\r\n\t\t}\r\n\t},\r\n\r\n\t// Handle when the DOM is ready\r\n\tready: function( wait ) {\r\n\r\n\t\t// Abort if there are pending holds or we're already ready\r\n\t\tif ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).\r\n\t\tif ( !document.body ) {\r\n\t\t\treturn setTimeout( jQuery.ready );\r\n\t\t}\r\n\r\n\t\t// Remember that the DOM is ready\r\n\t\tjQuery.isReady = true;\r\n\r\n\t\t// If a normal DOM Ready event fired, decrement, and wait if need be\r\n\t\tif ( wait !== true && --jQuery.readyWait > 0 ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// If there are functions bound, to execute\r\n\t\treadyList.resolveWith( document, [ jQuery ] );\r\n\r\n\t\t// Trigger any bound ready events\r\n\t\tif ( jQuery.fn.trigger ) {\r\n\t\t\tjQuery( document ).trigger(\"ready\").off(\"ready\");\r\n\t\t}\r\n\t},\r\n\r\n\t// See test/unit/core.js for details concerning isFunction.\r\n\t// Since version 1.3, DOM methods and functions like alert\r\n\t// aren't supported. They return false on IE (#2968).\r\n\tisFunction: function( obj ) {\r\n\t\treturn jQuery.type(obj) === \"function\";\r\n\t},\r\n\r\n\tisArray: Array.isArray || function( obj ) {\r\n\t\treturn jQuery.type(obj) === \"array\";\r\n\t},\r\n\r\n\tisWindow: function( obj ) {\r\n\t\t/* jshint eqeqeq: false */\r\n\t\treturn obj != null && obj == obj.window;\r\n\t},\r\n\r\n\tisNumeric: function( obj ) {\r\n\t\treturn !isNaN( parseFloat(obj) ) && isFinite( obj );\r\n\t},\r\n\r\n\ttype: function( obj ) {\r\n\t\tif ( obj == null ) {\r\n\t\t\treturn String( obj );\r\n\t\t}\r\n\t\treturn typeof obj === \"object\" || typeof obj === \"function\" ?\r\n\t\t\tclass2type[ core_toString.call(obj) ] || \"object\" :\r\n\t\t\ttypeof obj;\r\n\t},\r\n\r\n\tisPlainObject: function( obj ) {\r\n\t\tvar key;\r\n\r\n\t\t// Must be an Object.\r\n\t\t// Because of IE, we also have to check the presence of the constructor property.\r\n\t\t// Make sure that DOM nodes and window objects don't pass through, as well\r\n\t\tif ( !obj || jQuery.type(obj) !== \"object\" || obj.nodeType || jQuery.isWindow( obj ) ) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\ttry {\r\n\t\t\t// Not own constructor property must be Object\r\n\t\t\tif ( obj.constructor &&\r\n\t\t\t\t!core_hasOwn.call(obj, \"constructor\") &&\r\n\t\t\t\t!core_hasOwn.call(obj.constructor.prototype, \"isPrototypeOf\") ) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t} catch ( e ) {\r\n\t\t\t// IE8,9 Will throw exceptions on certain host objects #9897\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t// Support: IE<9\r\n\t\t// Handle iteration over inherited properties before own properties.\r\n\t\tif ( jQuery.support.ownLast ) {\r\n\t\t\tfor ( key in obj ) {\r\n\t\t\t\treturn core_hasOwn.call( obj, key );\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Own properties are enumerated firstly, so to speed up,\r\n\t\t// if last one is own, then all properties are own.\r\n\t\tfor ( key in obj ) {}\r\n\r\n\t\treturn key === undefined || core_hasOwn.call( obj, key );\r\n\t},\r\n\r\n\tisEmptyObject: function( obj ) {\r\n\t\tvar name;\r\n\t\tfor ( name in obj ) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t},\r\n\r\n\terror: function( msg ) {\r\n\t\tthrow new Error( msg );\r\n\t},\r\n\r\n\t// data: string of html\r\n\t// context (optional): If specified, the fragment will be created in this context, defaults to document\r\n\t// keepScripts (optional): If true, will include scripts passed in the html string\r\n\tparseHTML: function( data, context, keepScripts ) {\r\n\t\tif ( !data || typeof data !== \"string\" ) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\tif ( typeof context === \"boolean\" ) {\r\n\t\t\tkeepScripts = context;\r\n\t\t\tcontext = false;\r\n\t\t}\r\n\t\tcontext = context || document;\r\n\r\n\t\tvar parsed = rsingleTag.exec( data ),\r\n\t\t\tscripts = !keepScripts && [];\r\n\r\n\t\t// Single tag\r\n\t\tif ( parsed ) {\r\n\t\t\treturn [ context.createElement( parsed[1] ) ];\r\n\t\t}\r\n\r\n\t\tparsed = jQuery.buildFragment( [ data ], context, scripts );\r\n\t\tif ( scripts ) {\r\n\t\t\tjQuery( scripts ).remove();\r\n\t\t}\r\n\t\treturn jQuery.merge( [], parsed.childNodes );\r\n\t},\r\n\r\n\tparseJSON: function( data ) {\r\n\t\t// Attempt to parse using the native JSON parser first\r\n\t\tif ( window.JSON && window.JSON.parse ) {\r\n\t\t\treturn window.JSON.parse( data );\r\n\t\t}\r\n\r\n\t\tif ( data === null ) {\r\n\t\t\treturn data;\r\n\t\t}\r\n\r\n\t\tif ( typeof data === \"string\" ) {\r\n\r\n\t\t\t// Make sure leading/trailing whitespace is removed (IE can't handle it)\r\n\t\t\tdata = jQuery.trim( data );\r\n\r\n\t\t\tif ( data ) {\r\n\t\t\t\t// Make sure the incoming data is actual JSON\r\n\t\t\t\t// Logic borrowed from http://json.org/json2.js\r\n\t\t\t\tif ( rvalidchars.test( data.replace( rvalidescape, \"@\" )\r\n\t\t\t\t\t.replace( rvalidtokens, \"]\" )\r\n\t\t\t\t\t.replace( rvalidbraces, \"\")) ) {\r\n\r\n\t\t\t\t\treturn ( new Function( \"return \" + data ) )();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tjQuery.error( \"Invalid JSON: \" + data );\r\n\t},\r\n\r\n\t// Cross-browser xml parsing\r\n\tparseXML: function( data ) {\r\n\t\tvar xml, tmp;\r\n\t\tif ( !data || typeof data !== \"string\" ) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\ttry {\r\n\t\t\tif ( window.DOMParser ) { // Standard\r\n\t\t\t\ttmp = new DOMParser();\r\n\t\t\t\txml = tmp.parseFromString( data , \"text/xml\" );\r\n\t\t\t} else { // IE\r\n\t\t\t\txml = new ActiveXObject( \"Microsoft.XMLDOM\" );\r\n\t\t\t\txml.async = \"false\";\r\n\t\t\t\txml.loadXML( data );\r\n\t\t\t}\r\n\t\t} catch( e ) {\r\n\t\t\txml = undefined;\r\n\t\t}\r\n\t\tif ( !xml || !xml.documentElement || xml.getElementsByTagName( \"parsererror\" ).length ) {\r\n\t\t\tjQuery.error( \"Invalid XML: \" + data );\r\n\t\t}\r\n\t\treturn xml;\r\n\t},\r\n\r\n\tnoop: function() {},\r\n\r\n\t// Evaluates a script in a global context\r\n\t// Workarounds based on findings by Jim Driscoll\r\n\t// http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context\r\n\tglobalEval: function( data ) {\r\n\t\tif ( data && jQuery.trim( data ) ) {\r\n\t\t\t// We use execScript on Internet Explorer\r\n\t\t\t// We use an anonymous function so that context is window\r\n\t\t\t// rather than jQuery in Firefox\r\n\t\t\t( window.execScript || function( data ) {\r\n\t\t\t\twindow[ \"eval\" ].call( window, data );\r\n\t\t\t} )( data );\r\n\t\t}\r\n\t},\r\n\r\n\t// Convert dashed to camelCase; used by the css and data modules\r\n\t// Microsoft forgot to hump their vendor prefix (#9572)\r\n\tcamelCase: function( string ) {\r\n\t\treturn string.replace( rmsPrefix, \"ms-\" ).replace( rdashAlpha, fcamelCase );\r\n\t},\r\n\r\n\tnodeName: function( elem, name ) {\r\n\t\treturn elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();\r\n\t},\r\n\r\n\t// args is for internal usage only\r\n\teach: function( obj, callback, args ) {\r\n\t\tvar value,\r\n\t\t\ti = 0,\r\n\t\t\tlength = obj.length,\r\n\t\t\tisArray = isArraylike( obj );\r\n\r\n\t\tif ( args ) {\r\n\t\t\tif ( isArray ) {\r\n\t\t\t\tfor ( ; i < length; i++ ) {\r\n\t\t\t\t\tvalue = callback.apply( obj[ i ], args );\r\n\r\n\t\t\t\t\tif ( value === false ) {\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tfor ( i in obj ) {\r\n\t\t\t\t\tvalue = callback.apply( obj[ i ], args );\r\n\r\n\t\t\t\t\tif ( value === false ) {\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t// A special, fast, case for the most common use of each\r\n\t\t} else {\r\n\t\t\tif ( isArray ) {\r\n\t\t\t\tfor ( ; i < length; i++ ) {\r\n\t\t\t\t\tvalue = callback.call( obj[ i ], i, obj[ i ] );\r\n\r\n\t\t\t\t\tif ( value === false ) {\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tfor ( i in obj ) {\r\n\t\t\t\t\tvalue = callback.call( obj[ i ], i, obj[ i ] );\r\n\r\n\t\t\t\t\tif ( value === false ) {\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn obj;\r\n\t},\r\n\r\n\t// Use native String.trim function wherever possible\r\n\ttrim: core_trim && !core_trim.call(\"\\uFEFF\\xA0\") ?\r\n\t\tfunction( text ) {\r\n\t\t\treturn text == null ?\r\n\t\t\t\t\"\" :\r\n\t\t\t\tcore_trim.call( text );\r\n\t\t} :\r\n\r\n\t\t// Otherwise use our own trimming functionality\r\n\t\tfunction( text ) {\r\n\t\t\treturn text == null ?\r\n\t\t\t\t\"\" :\r\n\t\t\t\t( text + \"\" ).replace( rtrim, \"\" );\r\n\t\t},\r\n\r\n\t// results is for internal usage only\r\n\tmakeArray: function( arr, results ) {\r\n\t\tvar ret = results || [];\r\n\r\n\t\tif ( arr != null ) {\r\n\t\t\tif ( isArraylike( Object(arr) ) ) {\r\n\t\t\t\tjQuery.merge( ret,\r\n\t\t\t\t\ttypeof arr === \"string\" ?\r\n\t\t\t\t\t[ arr ] : arr\r\n\t\t\t\t);\r\n\t\t\t} else {\r\n\t\t\t\tcore_push.call( ret, arr );\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn ret;\r\n\t},\r\n\r\n\tinArray: function( elem, arr, i ) {\r\n\t\tvar len;\r\n\r\n\t\tif ( arr ) {\r\n\t\t\tif ( core_indexOf ) {\r\n\t\t\t\treturn core_indexOf.call( arr, elem, i );\r\n\t\t\t}\r\n\r\n\t\t\tlen = arr.length;\r\n\t\t\ti = i ? i < 0 ? Math.max( 0, len + i ) : i : 0;\r\n\r\n\t\t\tfor ( ; i < len; i++ ) {\r\n\t\t\t\t// Skip accessing in sparse arrays\r\n\t\t\t\tif ( i in arr && arr[ i ] === elem ) {\r\n\t\t\t\t\treturn i;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn -1;\r\n\t},\r\n\r\n\tmerge: function( first, second ) {\r\n\t\tvar l = second.length,\r\n\t\t\ti = first.length,\r\n\t\t\tj = 0;\r\n\r\n\t\tif ( typeof l === \"number\" ) {\r\n\t\t\tfor ( ; j < l; j++ ) {\r\n\t\t\t\tfirst[ i++ ] = second[ j ];\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\twhile ( second[j] !== undefined ) {\r\n\t\t\t\tfirst[ i++ ] = second[ j++ ];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfirst.length = i;\r\n\r\n\t\treturn first;\r\n\t},\r\n\r\n\tgrep: function( elems, callback, inv ) {\r\n\t\tvar retVal,\r\n\t\t\tret = [],\r\n\t\t\ti = 0,\r\n\t\t\tlength = elems.length;\r\n\t\tinv = !!inv;\r\n\r\n\t\t// Go through the array, only saving the items\r\n\t\t// that pass the validator function\r\n\t\tfor ( ; i < length; i++ ) {\r\n\t\t\tretVal = !!callback( elems[ i ], i );\r\n\t\t\tif ( inv !== retVal ) {\r\n\t\t\t\tret.push( elems[ i ] );\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn ret;\r\n\t},\r\n\r\n\t// arg is for internal usage only\r\n\tmap: function( elems, callback, arg ) {\r\n\t\tvar value,\r\n\t\t\ti = 0,\r\n\t\t\tlength = elems.length,\r\n\t\t\tisArray = isArraylike( elems ),\r\n\t\t\tret = [];\r\n\r\n\t\t// Go through the array, translating each of the items to their\r\n\t\tif ( isArray ) {\r\n\t\t\tfor ( ; i < length; i++ ) {\r\n\t\t\t\tvalue = callback( elems[ i ], i, arg );\r\n\r\n\t\t\t\tif ( value != null ) {\r\n\t\t\t\t\tret[ ret.length ] = value;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t// Go through every key on the object,\r\n\t\t} else {\r\n\t\t\tfor ( i in elems ) {\r\n\t\t\t\tvalue = callback( elems[ i ], i, arg );\r\n\r\n\t\t\t\tif ( value != null ) {\r\n\t\t\t\t\tret[ ret.length ] = value;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Flatten any nested arrays\r\n\t\treturn core_concat.apply( [], ret );\r\n\t},\r\n\r\n\t// A global GUID counter for objects\r\n\tguid: 1,\r\n\r\n\t// Bind a function to a context, optionally partially applying any\r\n\t// arguments.\r\n\tproxy: function( fn, context ) {\r\n\t\tvar args, proxy, tmp;\r\n\r\n\t\tif ( typeof context === \"string\" ) {\r\n\t\t\ttmp = fn[ context ];\r\n\t\t\tcontext = fn;\r\n\t\t\tfn = tmp;\r\n\t\t}\r\n\r\n\t\t// Quick check to determine if target is callable, in the spec\r\n\t\t// this throws a TypeError, but we will just return undefined.\r\n\t\tif ( !jQuery.isFunction( fn ) ) {\r\n\t\t\treturn undefined;\r\n\t\t}\r\n\r\n\t\t// Simulated bind\r\n\t\targs = core_slice.call( arguments, 2 );\r\n\t\tproxy = function() {\r\n\t\t\treturn fn.apply( context || this, args.concat( core_slice.call( arguments ) ) );\r\n\t\t};\r\n\r\n\t\t// Set the guid of unique handler to the same of original handler, so it can be removed\r\n\t\tproxy.guid = fn.guid = fn.guid || jQuery.guid++;\r\n\r\n\t\treturn proxy;\r\n\t},\r\n\r\n\t// Multifunctional method to get and set values of a collection\r\n\t// The value/s can optionally be executed if it's a function\r\n\taccess: function( elems, fn, key, value, chainable, emptyGet, raw ) {\r\n\t\tvar i = 0,\r\n\t\t\tlength = elems.length,\r\n\t\t\tbulk = key == null;\r\n\r\n\t\t// Sets many values\r\n\t\tif ( jQuery.type( key ) === \"object\" ) {\r\n\t\t\tchainable = true;\r\n\t\t\tfor ( i in key ) {\r\n\t\t\t\tjQuery.access( elems, fn, i, key[i], true, emptyGet, raw );\r\n\t\t\t}\r\n\r\n\t\t// Sets one value\r\n\t\t} else if ( value !== undefined ) {\r\n\t\t\tchainable = true;\r\n\r\n\t\t\tif ( !jQuery.isFunction( value ) ) {\r\n\t\t\t\traw = true;\r\n\t\t\t}\r\n\r\n\t\t\tif ( bulk ) {\r\n\t\t\t\t// Bulk operations run against the entire set\r\n\t\t\t\tif ( raw ) {\r\n\t\t\t\t\tfn.call( elems, value );\r\n\t\t\t\t\tfn = null;\r\n\r\n\t\t\t\t// ...except when executing function values\r\n\t\t\t\t} else {\r\n\t\t\t\t\tbulk = fn;\r\n\t\t\t\t\tfn = function( elem, key, value ) {\r\n\t\t\t\t\t\treturn bulk.call( jQuery( elem ), value );\r\n\t\t\t\t\t};\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif ( fn ) {\r\n\t\t\t\tfor ( ; i < length; i++ ) {\r\n\t\t\t\t\tfn( elems[i], key, raw ? value : value.call( elems[i], i, fn( elems[i], key ) ) );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn chainable ?\r\n\t\t\telems :\r\n\r\n\t\t\t// Gets\r\n\t\t\tbulk ?\r\n\t\t\t\tfn.call( elems ) :\r\n\t\t\t\tlength ? fn( elems[0], key ) : emptyGet;\r\n\t},\r\n\r\n\tnow: function() {\r\n\t\treturn ( new Date() ).getTime();\r\n\t},\r\n\r\n\t// A method for quickly swapping in/out CSS properties to get correct calculations.\r\n\t// Note: this method belongs to the css module but it's needed here for the support module.\r\n\t// If support gets modularized, this method should be moved back to the css module.\r\n\tswap: function( elem, options, callback, args ) {\r\n\t\tvar ret, name,\r\n\t\t\told = {};\r\n\r\n\t\t// Remember the old values, and insert the new ones\r\n\t\tfor ( name in options ) {\r\n\t\t\told[ name ] = elem.style[ name ];\r\n\t\t\telem.style[ name ] = options[ name ];\r\n\t\t}\r\n\r\n\t\tret = callback.apply( elem, args || [] );\r\n\r\n\t\t// Revert the old values\r\n\t\tfor ( name in options ) {\r\n\t\t\telem.style[ name ] = old[ name ];\r\n\t\t}\r\n\r\n\t\treturn ret;\r\n\t}\r\n});\r\n\r\njQuery.ready.promise = function( obj ) {\r\n\tif ( !readyList ) {\r\n\r\n\t\treadyList = jQuery.Deferred();\r\n\r\n\t\t// Catch cases where $(document).ready() is called after the browser event has already occurred.\r\n\t\t// we once tried to use readyState \"interactive\" here, but it caused issues like the one\r\n\t\t// discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15\r\n\t\tif ( document.readyState === \"complete\" ) {\r\n\t\t\t// Handle it asynchronously to allow scripts the opportunity to delay ready\r\n\t\t\tsetTimeout( jQuery.ready );\r\n\r\n\t\t// Standards-based browsers support DOMContentLoaded\r\n\t\t} else if ( document.addEventListener ) {\r\n\t\t\t// Use the handy event callback\r\n\t\t\tdocument.addEventListener( \"DOMContentLoaded\", completed, false );\r\n\r\n\t\t\t// A fallback to window.onload, that will always work\r\n\t\t\twindow.addEventListener( \"load\", completed, false );\r\n\r\n\t\t// If IE event model is used\r\n\t\t} else {\r\n\t\t\t// Ensure firing before onload, maybe late but safe also for iframes\r\n\t\t\tdocument.attachEvent( \"onreadystatechange\", completed );\r\n\r\n\t\t\t// A fallback to window.onload, that will always work\r\n\t\t\twindow.attachEvent( \"onload\", completed );\r\n\r\n\t\t\t// If IE and not a frame\r\n\t\t\t// continually check to see if the document is ready\r\n\t\t\tvar top = false;\r\n\r\n\t\t\ttry {\r\n\t\t\t\ttop = window.frameElement == null && document.documentElement;\r\n\t\t\t} catch(e) {}\r\n\r\n\t\t\tif ( top && top.doScroll ) {\r\n\t\t\t\t(function doScrollCheck() {\r\n\t\t\t\t\tif ( !jQuery.isReady ) {\r\n\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t// Use the trick by Diego Perini\r\n\t\t\t\t\t\t\t// http://javascript.nwbox.com/IEContentLoaded/\r\n\t\t\t\t\t\t\ttop.doScroll(\"left\");\r\n\t\t\t\t\t\t} catch(e) {\r\n\t\t\t\t\t\t\treturn setTimeout( doScrollCheck, 50 );\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t// detach all dom ready events\r\n\t\t\t\t\t\tdetach();\r\n\r\n\t\t\t\t\t\t// and execute any waiting functions\r\n\t\t\t\t\t\tjQuery.ready();\r\n\t\t\t\t\t}\r\n\t\t\t\t})();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn readyList.promise( obj );\r\n};\r\n\r\n// Populate the class2type map\r\njQuery.each(\"Boolean Number String Function Array Date RegExp Object Error\".split(\" \"), function(i, name) {\r\n\tclass2type[ \"[object \" + name + \"]\" ] = name.toLowerCase();\r\n});\r\n\r\nfunction isArraylike( obj ) {\r\n\tvar length = obj.length,\r\n\t\ttype = jQuery.type( obj );\r\n\r\n\tif ( jQuery.isWindow( obj ) ) {\r\n\t\treturn false;\r\n\t}\r\n\r\n\tif ( obj.nodeType === 1 && length ) {\r\n\t\treturn true;\r\n\t}\r\n\r\n\treturn type === \"array\" || type !== \"function\" &&\r\n\t\t( length === 0 ||\r\n\t\ttypeof length === \"number\" && length > 0 && ( length - 1 ) in obj );\r\n}\r\n\r\n// All jQuery objects should point back to these\r\nrootjQuery = jQuery(document);\r\n/*!\r\n * Sizzle CSS Selector Engine v1.10.2\r\n * http://sizzlejs.com/\r\n *\r\n * Copyright 2013 jQuery Foundation, Inc. and other contributors\r\n * Released under the MIT license\r\n * http://jquery.org/license\r\n *\r\n * Date: 2013-07-03\r\n */\r\n(function( window, undefined ) {\r\n\r\nvar i,\r\n\tsupport,\r\n\tcachedruns,\r\n\tExpr,\r\n\tgetText,\r\n\tisXML,\r\n\tcompile,\r\n\toutermostContext,\r\n\tsortInput,\r\n\r\n\t// Local document vars\r\n\tsetDocument,\r\n\tdocument,\r\n\tdocElem,\r\n\tdocumentIsHTML,\r\n\trbuggyQSA,\r\n\trbuggyMatches,\r\n\tmatches,\r\n\tcontains,\r\n\r\n\t// Instance-specific data\r\n\texpando = \"sizzle\" + -(new Date()),\r\n\tpreferredDoc = window.document,\r\n\tdirruns = 0,\r\n\tdone = 0,\r\n\tclassCache = createCache(),\r\n\ttokenCache = createCache(),\r\n\tcompilerCache = createCache(),\r\n\thasDuplicate = false,\r\n\tsortOrder = function( a, b ) {\r\n\t\tif ( a === b ) {\r\n\t\t\thasDuplicate = true;\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\treturn 0;\r\n\t},\r\n\r\n\t// General-purpose constants\r\n\tstrundefined = typeof undefined,\r\n\tMAX_NEGATIVE = 1 << 31,\r\n\r\n\t// Instance methods\r\n\thasOwn = ({}).hasOwnProperty,\r\n\tarr = [],\r\n\tpop = arr.pop,\r\n\tpush_native = arr.push,\r\n\tpush = arr.push,\r\n\tslice = arr.slice,\r\n\t// Use a stripped-down indexOf if we can't use a native one\r\n\tindexOf = arr.indexOf || function( elem ) {\r\n\t\tvar i = 0,\r\n\t\t\tlen = this.length;\r\n\t\tfor ( ; i < len; i++ ) {\r\n\t\t\tif ( this[i] === elem ) {\r\n\t\t\t\treturn i;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn -1;\r\n\t},\r\n\r\n\tbooleans = \"checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped\",\r\n\r\n\t// Regular expressions\r\n\r\n\t// Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace\r\n\twhitespace = \"[\\\\x20\\\\t\\\\r\\\\n\\\\f]\",\r\n\t// http://www.w3.org/TR/css3-syntax/#characters\r\n\tcharacterEncoding = \"(?:\\\\\\\\.|[\\\\w-]|[^\\\\x00-\\\\xa0])+\",\r\n\r\n\t// Loosely modeled on CSS identifier characters\r\n\t// An unquoted value should be a CSS identifier http://www.w3.org/TR/css3-selectors/#attribute-selectors\r\n\t// Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier\r\n\tidentifier = characterEncoding.replace( \"w\", \"w#\" ),\r\n\r\n\t// Acceptable operators http://www.w3.org/TR/selectors/#attribute-selectors\r\n\tattributes = \"\\\\[\" + whitespace + \"*(\" + characterEncoding + \")\" + whitespace +\r\n\t\t\"*(?:([*^$|!~]?=)\" + whitespace + \"*(?:(['\\\"])((?:\\\\\\\\.|[^\\\\\\\\])*?)\\\\3|(\" + identifier + \")|)|)\" + whitespace + \"*\\\\]\",\r\n\r\n\t// Prefer arguments quoted,\r\n\t//   then not containing pseudos/brackets,\r\n\t//   then attribute selectors/non-parenthetical expressions,\r\n\t//   then anything else\r\n\t// These preferences are here to reduce the number of selectors\r\n\t//   needing tokenize in the PSEUDO preFilter\r\n\tpseudos = \":(\" + characterEncoding + \")(?:\\\\(((['\\\"])((?:\\\\\\\\.|[^\\\\\\\\])*?)\\\\3|((?:\\\\\\\\.|[^\\\\\\\\()[\\\\]]|\" + attributes.replace( 3, 8 ) + \")*)|.*)\\\\)|)\",\r\n\r\n\t// Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter\r\n\trtrim = new RegExp( \"^\" + whitespace + \"+|((?:^|[^\\\\\\\\])(?:\\\\\\\\.)*)\" + whitespace + \"+$\", \"g\" ),\r\n\r\n\trcomma = new RegExp( \"^\" + whitespace + \"*,\" + whitespace + \"*\" ),\r\n\trcombinators = new RegExp( \"^\" + whitespace + \"*([>+~]|\" + whitespace + \")\" + whitespace + \"*\" ),\r\n\r\n\trsibling = new RegExp( whitespace + \"*[+~]\" ),\r\n\trattributeQuotes = new RegExp( \"=\" + whitespace + \"*([^\\\\]'\\\"]*)\" + whitespace + \"*\\\\]\", \"g\" ),\r\n\r\n\trpseudo = new RegExp( pseudos ),\r\n\tridentifier = new RegExp( \"^\" + identifier + \"$\" ),\r\n\r\n\tmatchExpr = {\r\n\t\t\"ID\": new RegExp( \"^#(\" + characterEncoding + \")\" ),\r\n\t\t\"CLASS\": new RegExp( \"^\\\\.(\" + characterEncoding + \")\" ),\r\n\t\t\"TAG\": new RegExp( \"^(\" + characterEncoding.replace( \"w\", \"w*\" ) + \")\" ),\r\n\t\t\"ATTR\": new RegExp( \"^\" + attributes ),\r\n\t\t\"PSEUDO\": new RegExp( \"^\" + pseudos ),\r\n\t\t\"CHILD\": new RegExp( \"^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\\\(\" + whitespace +\r\n\t\t\t\"*(even|odd|(([+-]|)(\\\\d*)n|)\" + whitespace + \"*(?:([+-]|)\" + whitespace +\r\n\t\t\t\"*(\\\\d+)|))\" + whitespace + \"*\\\\)|)\", \"i\" ),\r\n\t\t\"bool\": new RegExp( \"^(?:\" + booleans + \")$\", \"i\" ),\r\n\t\t// For use in libraries implementing .is()\r\n\t\t// We use this for POS matching in `select`\r\n\t\t\"needsContext\": new RegExp( \"^\" + whitespace + \"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\\\(\" +\r\n\t\t\twhitespace + \"*((?:-\\\\d)?\\\\d*)\" + whitespace + \"*\\\\)|)(?=[^-]|$)\", \"i\" )\r\n\t},\r\n\r\n\trnative = /^[^{]+\\{\\s*\\[native \\w/,\r\n\r\n\t// Easily-parseable/retrievable ID or TAG or CLASS selectors\r\n\trquickExpr = /^(?:#([\\w-]+)|(\\w+)|\\.([\\w-]+))$/,\r\n\r\n\trinputs = /^(?:input|select|textarea|button)$/i,\r\n\trheader = /^h\\d$/i,\r\n\r\n\trescape = /'|\\\\/g,\r\n\r\n\t// CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters\r\n\trunescape = new RegExp( \"\\\\\\\\([\\\\da-f]{1,6}\" + whitespace + \"?|(\" + whitespace + \")|.)\", \"ig\" ),\r\n\tfunescape = function( _, escaped, escapedWhitespace ) {\r\n\t\tvar high = \"0x\" + escaped - 0x10000;\r\n\t\t// NaN means non-codepoint\r\n\t\t// Support: Firefox\r\n\t\t// Workaround erroneous numeric interpretation of +\"0x\"\r\n\t\treturn high !== high || escapedWhitespace ?\r\n\t\t\tescaped :\r\n\t\t\t// BMP codepoint\r\n\t\t\thigh < 0 ?\r\n\t\t\t\tString.fromCharCode( high + 0x10000 ) :\r\n\t\t\t\t// Supplemental Plane codepoint (surrogate pair)\r\n\t\t\t\tString.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );\r\n\t};\r\n\r\n// Optimize for push.apply( _, NodeList )\r\ntry {\r\n\tpush.apply(\r\n\t\t(arr = slice.call( preferredDoc.childNodes )),\r\n\t\tpreferredDoc.childNodes\r\n\t);\r\n\t// Support: Android<4.0\r\n\t// Detect silently failing push.apply\r\n\tarr[ preferredDoc.childNodes.length ].nodeType;\r\n} catch ( e ) {\r\n\tpush = { apply: arr.length ?\r\n\r\n\t\t// Leverage slice if possible\r\n\t\tfunction( target, els ) {\r\n\t\t\tpush_native.apply( target, slice.call(els) );\r\n\t\t} :\r\n\r\n\t\t// Support: IE<9\r\n\t\t// Otherwise append directly\r\n\t\tfunction( target, els ) {\r\n\t\t\tvar j = target.length,\r\n\t\t\t\ti = 0;\r\n\t\t\t// Can't trust NodeList.length\r\n\t\t\twhile ( (target[j++] = els[i++]) ) {}\r\n\t\t\ttarget.length = j - 1;\r\n\t\t}\r\n\t};\r\n}\r\n\r\nfunction Sizzle( selector, context, results, seed ) {\r\n\tvar match, elem, m, nodeType,\r\n\t\t// QSA vars\r\n\t\ti, groups, old, nid, newContext, newSelector;\r\n\r\n\tif ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) {\r\n\t\tsetDocument( context );\r\n\t}\r\n\r\n\tcontext = context || document;\r\n\tresults = results || [];\r\n\r\n\tif ( !selector || typeof selector !== \"string\" ) {\r\n\t\treturn results;\r\n\t}\r\n\r\n\tif ( (nodeType = context.nodeType) !== 1 && nodeType !== 9 ) {\r\n\t\treturn [];\r\n\t}\r\n\r\n\tif ( documentIsHTML && !seed ) {\r\n\r\n\t\t// Shortcuts\r\n\t\tif ( (match = rquickExpr.exec( selector )) ) {\r\n\t\t\t// Speed-up: Sizzle(\"#ID\")\r\n\t\t\tif ( (m = match[1]) ) {\r\n\t\t\t\tif ( nodeType === 9 ) {\r\n\t\t\t\t\telem = context.getElementById( m );\r\n\t\t\t\t\t// Check parentNode to catch when Blackberry 4.6 returns\r\n\t\t\t\t\t// nodes that are no longer in the document #6963\r\n\t\t\t\t\tif ( elem && elem.parentNode ) {\r\n\t\t\t\t\t\t// Handle the case where IE, Opera, and Webkit return items\r\n\t\t\t\t\t\t// by name instead of ID\r\n\t\t\t\t\t\tif ( elem.id === m ) {\r\n\t\t\t\t\t\t\tresults.push( elem );\r\n\t\t\t\t\t\t\treturn results;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\treturn results;\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// Context is not a document\r\n\t\t\t\t\tif ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) &&\r\n\t\t\t\t\t\tcontains( context, elem ) && elem.id === m ) {\r\n\t\t\t\t\t\tresults.push( elem );\r\n\t\t\t\t\t\treturn results;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t// Speed-up: Sizzle(\"TAG\")\r\n\t\t\t} else if ( match[2] ) {\r\n\t\t\t\tpush.apply( results, context.getElementsByTagName( selector ) );\r\n\t\t\t\treturn results;\r\n\r\n\t\t\t// Speed-up: Sizzle(\".CLASS\")\r\n\t\t\t} else if ( (m = match[3]) && support.getElementsByClassName && context.getElementsByClassName ) {\r\n\t\t\t\tpush.apply( results, context.getElementsByClassName( m ) );\r\n\t\t\t\treturn results;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// QSA path\r\n\t\tif ( support.qsa && (!rbuggyQSA || !rbuggyQSA.test( selector )) ) {\r\n\t\t\tnid = old = expando;\r\n\t\t\tnewContext = context;\r\n\t\t\tnewSelector = nodeType === 9 && selector;\r\n\r\n\t\t\t// qSA works strangely on Element-rooted queries\r\n\t\t\t// We can work around this by specifying an extra ID on the root\r\n\t\t\t// and working up from there (Thanks to Andrew Dupont for the technique)\r\n\t\t\t// IE 8 doesn't work on object elements\r\n\t\t\tif ( nodeType === 1 && context.nodeName.toLowerCase() !== \"object\" ) {\r\n\t\t\t\tgroups = tokenize( selector );\r\n\r\n\t\t\t\tif ( (old = context.getAttribute(\"id\")) ) {\r\n\t\t\t\t\tnid = old.replace( rescape, \"\\\\$&\" );\r\n\t\t\t\t} else {\r\n\t\t\t\t\tcontext.setAttribute( \"id\", nid );\r\n\t\t\t\t}\r\n\t\t\t\tnid = \"[id='\" + nid + \"'] \";\r\n\r\n\t\t\t\ti = groups.length;\r\n\t\t\t\twhile ( i-- ) {\r\n\t\t\t\t\tgroups[i] = nid + toSelector( groups[i] );\r\n\t\t\t\t}\r\n\t\t\t\tnewContext = rsibling.test( selector ) && context.parentNode || context;\r\n\t\t\t\tnewSelector = groups.join(\",\");\r\n\t\t\t}\r\n\r\n\t\t\tif ( newSelector ) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tpush.apply( results,\r\n\t\t\t\t\t\tnewContext.querySelectorAll( newSelector )\r\n\t\t\t\t\t);\r\n\t\t\t\t\treturn results;\r\n\t\t\t\t} catch(qsaError) {\r\n\t\t\t\t} finally {\r\n\t\t\t\t\tif ( !old ) {\r\n\t\t\t\t\t\tcontext.removeAttribute(\"id\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t// All others\r\n\treturn select( selector.replace( rtrim, \"$1\" ), context, results, seed );\r\n}\r\n\r\n/**\r\n * Create key-value caches of limited size\r\n * @returns {Function(string, Object)} Returns the Object data after storing it on itself with\r\n *\tproperty name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)\r\n *\tdeleting the oldest entry\r\n */\r\nfunction createCache() {\r\n\tvar keys = [];\r\n\r\n\tfunction cache( key, value ) {\r\n\t\t// Use (key + \" \") to avoid collision with native prototype properties (see Issue #157)\r\n\t\tif ( keys.push( key += \" \" ) > Expr.cacheLength ) {\r\n\t\t\t// Only keep the most recent entries\r\n\t\t\tdelete cache[ keys.shift() ];\r\n\t\t}\r\n\t\treturn (cache[ key ] = value);\r\n\t}\r\n\treturn cache;\r\n}\r\n\r\n/**\r\n * Mark a function for special use by Sizzle\r\n * @param {Function} fn The function to mark\r\n */\r\nfunction markFunction( fn ) {\r\n\tfn[ expando ] = true;\r\n\treturn fn;\r\n}\r\n\r\n/**\r\n * Support testing using an element\r\n * @param {Function} fn Passed the created div and expects a boolean result\r\n */\r\nfunction assert( fn ) {\r\n\tvar div = document.createElement(\"div\");\r\n\r\n\ttry {\r\n\t\treturn !!fn( div );\r\n\t} catch (e) {\r\n\t\treturn false;\r\n\t} finally {\r\n\t\t// Remove from its parent by default\r\n\t\tif ( div.parentNode ) {\r\n\t\t\tdiv.parentNode.removeChild( div );\r\n\t\t}\r\n\t\t// release memory in IE\r\n\t\tdiv = null;\r\n\t}\r\n}\r\n\r\n/**\r\n * Adds the same handler for all of the specified attrs\r\n * @param {String} attrs Pipe-separated list of attributes\r\n * @param {Function} handler The method that will be applied\r\n */\r\nfunction addHandle( attrs, handler ) {\r\n\tvar arr = attrs.split(\"|\"),\r\n\t\ti = attrs.length;\r\n\r\n\twhile ( i-- ) {\r\n\t\tExpr.attrHandle[ arr[i] ] = handler;\r\n\t}\r\n}\r\n\r\n/**\r\n * Checks document order of two siblings\r\n * @param {Element} a\r\n * @param {Element} b\r\n * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b\r\n */\r\nfunction siblingCheck( a, b ) {\r\n\tvar cur = b && a,\r\n\t\tdiff = cur && a.nodeType === 1 && b.nodeType === 1 &&\r\n\t\t\t( ~b.sourceIndex || MAX_NEGATIVE ) -\r\n\t\t\t( ~a.sourceIndex || MAX_NEGATIVE );\r\n\r\n\t// Use IE sourceIndex if available on both nodes\r\n\tif ( diff ) {\r\n\t\treturn diff;\r\n\t}\r\n\r\n\t// Check if b follows a\r\n\tif ( cur ) {\r\n\t\twhile ( (cur = cur.nextSibling) ) {\r\n\t\t\tif ( cur === b ) {\r\n\t\t\t\treturn -1;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\treturn a ? 1 : -1;\r\n}\r\n\r\n/**\r\n * Returns a function to use in pseudos for input types\r\n * @param {String} type\r\n */\r\nfunction createInputPseudo( type ) {\r\n\treturn function( elem ) {\r\n\t\tvar name = elem.nodeName.toLowerCase();\r\n\t\treturn name === \"input\" && elem.type === type;\r\n\t};\r\n}\r\n\r\n/**\r\n * Returns a function to use in pseudos for buttons\r\n * @param {String} type\r\n */\r\nfunction createButtonPseudo( type ) {\r\n\treturn function( elem ) {\r\n\t\tvar name = elem.nodeName.toLowerCase();\r\n\t\treturn (name === \"input\" || name === \"button\") && elem.type === type;\r\n\t};\r\n}\r\n\r\n/**\r\n * Returns a function to use in pseudos for positionals\r\n * @param {Function} fn\r\n */\r\nfunction createPositionalPseudo( fn ) {\r\n\treturn markFunction(function( argument ) {\r\n\t\targument = +argument;\r\n\t\treturn markFunction(function( seed, matches ) {\r\n\t\t\tvar j,\r\n\t\t\t\tmatchIndexes = fn( [], seed.length, argument ),\r\n\t\t\t\ti = matchIndexes.length;\r\n\r\n\t\t\t// Match elements found at the specified indexes\r\n\t\t\twhile ( i-- ) {\r\n\t\t\t\tif ( seed[ (j = matchIndexes[i]) ] ) {\r\n\t\t\t\t\tseed[j] = !(matches[j] = seed[j]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t});\r\n}\r\n\r\n/**\r\n * Detect xml\r\n * @param {Element|Object} elem An element or a document\r\n */\r\nisXML = Sizzle.isXML = function( elem ) {\r\n\t// documentElement is verified for cases where it doesn't yet exist\r\n\t// (such as loading iframes in IE - #4833)\r\n\tvar documentElement = elem && (elem.ownerDocument || elem).documentElement;\r\n\treturn documentElement ? documentElement.nodeName !== \"HTML\" : false;\r\n};\r\n\r\n// Expose support vars for convenience\r\nsupport = Sizzle.support = {};\r\n\r\n/**\r\n * Sets document-related variables once based on the current document\r\n * @param {Element|Object} [doc] An element or document object to use to set the document\r\n * @returns {Object} Returns the current document\r\n */\r\nsetDocument = Sizzle.setDocument = function( node ) {\r\n\tvar doc = node ? node.ownerDocument || node : preferredDoc,\r\n\t\tparent = doc.defaultView;\r\n\r\n\t// If no document and documentElement is available, return\r\n\tif ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) {\r\n\t\treturn document;\r\n\t}\r\n\r\n\t// Set our document\r\n\tdocument = doc;\r\n\tdocElem = doc.documentElement;\r\n\r\n\t// Support tests\r\n\tdocumentIsHTML = !isXML( doc );\r\n\r\n\t// Support: IE>8\r\n\t// If iframe document is assigned to \"document\" variable and if iframe has been reloaded,\r\n\t// IE will throw \"permission denied\" error when accessing \"document\" variable, see jQuery #13936\r\n\t// IE6-8 do not support the defaultView property so parent will be undefined\r\n\tif ( parent && parent.attachEvent && parent !== parent.top ) {\r\n\t\tparent.attachEvent( \"onbeforeunload\", function() {\r\n\t\t\tsetDocument();\r\n\t\t});\r\n\t}\r\n\r\n\t/* Attributes\r\n\t---------------------------------------------------------------------- */\r\n\r\n\t// Support: IE<8\r\n\t// Verify that getAttribute really returns attributes and not properties (excepting IE8 booleans)\r\n\tsupport.attributes = assert(function( div ) {\r\n\t\tdiv.className = \"i\";\r\n\t\treturn !div.getAttribute(\"className\");\r\n\t});\r\n\r\n\t/* getElement(s)By*\r\n\t---------------------------------------------------------------------- */\r\n\r\n\t// Check if getElementsByTagName(\"*\") returns only elements\r\n\tsupport.getElementsByTagName = assert(function( div ) {\r\n\t\tdiv.appendChild( doc.createComment(\"\") );\r\n\t\treturn !div.getElementsByTagName(\"*\").length;\r\n\t});\r\n\r\n\t// Check if getElementsByClassName can be trusted\r\n\tsupport.getElementsByClassName = assert(function( div ) {\r\n\t\tdiv.innerHTML = \"<div class='a'></div><div class='a i'></div>\";\r\n\r\n\t\t// Support: Safari<4\r\n\t\t// Catch class over-caching\r\n\t\tdiv.firstChild.className = \"i\";\r\n\t\t// Support: Opera<10\r\n\t\t// Catch gEBCN failure to find non-leading classes\r\n\t\treturn div.getElementsByClassName(\"i\").length === 2;\r\n\t});\r\n\r\n\t// Support: IE<10\r\n\t// Check if getElementById returns elements by name\r\n\t// The broken getElementById methods don't pick up programatically-set names,\r\n\t// so use a roundabout getElementsByName test\r\n\tsupport.getById = assert(function( div ) {\r\n\t\tdocElem.appendChild( div ).id = expando;\r\n\t\treturn !doc.getElementsByName || !doc.getElementsByName( expando ).length;\r\n\t});\r\n\r\n\t// ID find and filter\r\n\tif ( support.getById ) {\r\n\t\tExpr.find[\"ID\"] = function( id, context ) {\r\n\t\t\tif ( typeof context.getElementById !== strundefined && documentIsHTML ) {\r\n\t\t\t\tvar m = context.getElementById( id );\r\n\t\t\t\t// Check parentNode to catch when Blackberry 4.6 returns\r\n\t\t\t\t// nodes that are no longer in the document #6963\r\n\t\t\t\treturn m && m.parentNode ? [m] : [];\r\n\t\t\t}\r\n\t\t};\r\n\t\tExpr.filter[\"ID\"] = function( id ) {\r\n\t\t\tvar attrId = id.replace( runescape, funescape );\r\n\t\t\treturn function( elem ) {\r\n\t\t\t\treturn elem.getAttribute(\"id\") === attrId;\r\n\t\t\t};\r\n\t\t};\r\n\t} else {\r\n\t\t// Support: IE6/7\r\n\t\t// getElementById is not reliable as a find shortcut\r\n\t\tdelete Expr.find[\"ID\"];\r\n\r\n\t\tExpr.filter[\"ID\"] =  function( id ) {\r\n\t\t\tvar attrId = id.replace( runescape, funescape );\r\n\t\t\treturn function( elem ) {\r\n\t\t\t\tvar node = typeof elem.getAttributeNode !== strundefined && elem.getAttributeNode(\"id\");\r\n\t\t\t\treturn node && node.value === attrId;\r\n\t\t\t};\r\n\t\t};\r\n\t}\r\n\r\n\t// Tag\r\n\tExpr.find[\"TAG\"] = support.getElementsByTagName ?\r\n\t\tfunction( tag, context ) {\r\n\t\t\tif ( typeof context.getElementsByTagName !== strundefined ) {\r\n\t\t\t\treturn context.getElementsByTagName( tag );\r\n\t\t\t}\r\n\t\t} :\r\n\t\tfunction( tag, context ) {\r\n\t\t\tvar elem,\r\n\t\t\t\ttmp = [],\r\n\t\t\t\ti = 0,\r\n\t\t\t\tresults = context.getElementsByTagName( tag );\r\n\r\n\t\t\t// Filter out possible comments\r\n\t\t\tif ( tag === \"*\" ) {\r\n\t\t\t\twhile ( (elem = results[i++]) ) {\r\n\t\t\t\t\tif ( elem.nodeType === 1 ) {\r\n\t\t\t\t\t\ttmp.push( elem );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn tmp;\r\n\t\t\t}\r\n\t\t\treturn results;\r\n\t\t};\r\n\r\n\t// Class\r\n\tExpr.find[\"CLASS\"] = support.getElementsByClassName && function( className, context ) {\r\n\t\tif ( typeof context.getElementsByClassName !== strundefined && documentIsHTML ) {\r\n\t\t\treturn context.getElementsByClassName( className );\r\n\t\t}\r\n\t};\r\n\r\n\t/* QSA/matchesSelector\r\n\t---------------------------------------------------------------------- */\r\n\r\n\t// QSA and matchesSelector support\r\n\r\n\t// matchesSelector(:active) reports false when true (IE9/Opera 11.5)\r\n\trbuggyMatches = [];\r\n\r\n\t// qSa(:focus) reports false when true (Chrome 21)\r\n\t// We allow this because of a bug in IE8/9 that throws an error\r\n\t// whenever `document.activeElement` is accessed on an iframe\r\n\t// So, we allow :focus to pass through QSA all the time to avoid the IE error\r\n\t// See http://bugs.jquery.com/ticket/13378\r\n\trbuggyQSA = [];\r\n\r\n\tif ( (support.qsa = rnative.test( doc.querySelectorAll )) ) {\r\n\t\t// Build QSA regex\r\n\t\t// Regex strategy adopted from Diego Perini\r\n\t\tassert(function( div ) {\r\n\t\t\t// Select is set to empty string on purpose\r\n\t\t\t// This is to test IE's treatment of not explicitly\r\n\t\t\t// setting a boolean content attribute,\r\n\t\t\t// since its presence should be enough\r\n\t\t\t// http://bugs.jquery.com/ticket/12359\r\n\t\t\tdiv.innerHTML = \"<select><option selected=''></option></select>\";\r\n\r\n\t\t\t// Support: IE8\r\n\t\t\t// Boolean attributes and \"value\" are not treated correctly\r\n\t\t\tif ( !div.querySelectorAll(\"[selected]\").length ) {\r\n\t\t\t\trbuggyQSA.push( \"\\\\[\" + whitespace + \"*(?:value|\" + booleans + \")\" );\r\n\t\t\t}\r\n\r\n\t\t\t// Webkit/Opera - :checked should return selected option elements\r\n\t\t\t// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked\r\n\t\t\t// IE8 throws error here and will not see later tests\r\n\t\t\tif ( !div.querySelectorAll(\":checked\").length ) {\r\n\t\t\t\trbuggyQSA.push(\":checked\");\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tassert(function( div ) {\r\n\r\n\t\t\t// Support: Opera 10-12/IE8\r\n\t\t\t// ^= $= *= and empty values\r\n\t\t\t// Should not select anything\r\n\t\t\t// Support: Windows 8 Native Apps\r\n\t\t\t// The type attribute is restricted during .innerHTML assignment\r\n\t\t\tvar input = doc.createElement(\"input\");\r\n\t\t\tinput.setAttribute( \"type\", \"hidden\" );\r\n\t\t\tdiv.appendChild( input ).setAttribute( \"t\", \"\" );\r\n\r\n\t\t\tif ( div.querySelectorAll(\"[t^='']\").length ) {\r\n\t\t\t\trbuggyQSA.push( \"[*^$]=\" + whitespace + \"*(?:''|\\\"\\\")\" );\r\n\t\t\t}\r\n\r\n\t\t\t// FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)\r\n\t\t\t// IE8 throws error here and will not see later tests\r\n\t\t\tif ( !div.querySelectorAll(\":enabled\").length ) {\r\n\t\t\t\trbuggyQSA.push( \":enabled\", \":disabled\" );\r\n\t\t\t}\r\n\r\n\t\t\t// Opera 10-11 does not throw on post-comma invalid pseudos\r\n\t\t\tdiv.querySelectorAll(\"*,:x\");\r\n\t\t\trbuggyQSA.push(\",.*:\");\r\n\t\t});\r\n\t}\r\n\r\n\tif ( (support.matchesSelector = rnative.test( (matches = docElem.webkitMatchesSelector ||\r\n\t\tdocElem.mozMatchesSelector ||\r\n\t\tdocElem.oMatchesSelector ||\r\n\t\tdocElem.msMatchesSelector) )) ) {\r\n\r\n\t\tassert(function( div ) {\r\n\t\t\t// Check to see if it's possible to do matchesSelector\r\n\t\t\t// on a disconnected node (IE 9)\r\n\t\t\tsupport.disconnectedMatch = matches.call( div, \"div\" );\r\n\r\n\t\t\t// This should fail with an exception\r\n\t\t\t// Gecko does not error, returns false instead\r\n\t\t\tmatches.call( div, \"[s!='']:x\" );\r\n\t\t\trbuggyMatches.push( \"!=\", pseudos );\r\n\t\t});\r\n\t}\r\n\r\n\trbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join(\"|\") );\r\n\trbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join(\"|\") );\r\n\r\n\t/* Contains\r\n\t---------------------------------------------------------------------- */\r\n\r\n\t// Element contains another\r\n\t// Purposefully does not implement inclusive descendent\r\n\t// As in, an element does not contain itself\r\n\tcontains = rnative.test( docElem.contains ) || docElem.compareDocumentPosition ?\r\n\t\tfunction( a, b ) {\r\n\t\t\tvar adown = a.nodeType === 9 ? a.documentElement : a,\r\n\t\t\t\tbup = b && b.parentNode;\r\n\t\t\treturn a === bup || !!( bup && bup.nodeType === 1 && (\r\n\t\t\t\tadown.contains ?\r\n\t\t\t\t\tadown.contains( bup ) :\r\n\t\t\t\t\ta.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16\r\n\t\t\t));\r\n\t\t} :\r\n\t\tfunction( a, b ) {\r\n\t\t\tif ( b ) {\r\n\t\t\t\twhile ( (b = b.parentNode) ) {\r\n\t\t\t\t\tif ( b === a ) {\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn false;\r\n\t\t};\r\n\r\n\t/* Sorting\r\n\t---------------------------------------------------------------------- */\r\n\r\n\t// Document order sorting\r\n\tsortOrder = docElem.compareDocumentPosition ?\r\n\tfunction( a, b ) {\r\n\r\n\t\t// Flag for duplicate removal\r\n\t\tif ( a === b ) {\r\n\t\t\thasDuplicate = true;\r\n\t\t\treturn 0;\r\n\t\t}\r\n\r\n\t\tvar compare = b.compareDocumentPosition && a.compareDocumentPosition && a.compareDocumentPosition( b );\r\n\r\n\t\tif ( compare ) {\r\n\t\t\t// Disconnected nodes\r\n\t\t\tif ( compare & 1 ||\r\n\t\t\t\t(!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) {\r\n\r\n\t\t\t\t// Choose the first element that is related to our preferred document\r\n\t\t\t\tif ( a === doc || contains(preferredDoc, a) ) {\r\n\t\t\t\t\treturn -1;\r\n\t\t\t\t}\r\n\t\t\t\tif ( b === doc || contains(preferredDoc, b) ) {\r\n\t\t\t\t\treturn 1;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Maintain original order\r\n\t\t\t\treturn sortInput ?\r\n\t\t\t\t\t( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) :\r\n\t\t\t\t\t0;\r\n\t\t\t}\r\n\r\n\t\t\treturn compare & 4 ? -1 : 1;\r\n\t\t}\r\n\r\n\t\t// Not directly comparable, sort on existence of method\r\n\t\treturn a.compareDocumentPosition ? -1 : 1;\r\n\t} :\r\n\tfunction( a, b ) {\r\n\t\tvar cur,\r\n\t\t\ti = 0,\r\n\t\t\taup = a.parentNode,\r\n\t\t\tbup = b.parentNode,\r\n\t\t\tap = [ a ],\r\n\t\t\tbp = [ b ];\r\n\r\n\t\t// Exit early if the nodes are identical\r\n\t\tif ( a === b ) {\r\n\t\t\thasDuplicate = true;\r\n\t\t\treturn 0;\r\n\r\n\t\t// Parentless nodes are either documents or disconnected\r\n\t\t} else if ( !aup || !bup ) {\r\n\t\t\treturn a === doc ? -1 :\r\n\t\t\t\tb === doc ? 1 :\r\n\t\t\t\taup ? -1 :\r\n\t\t\t\tbup ? 1 :\r\n\t\t\t\tsortInput ?\r\n\t\t\t\t( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) :\r\n\t\t\t\t0;\r\n\r\n\t\t// If the nodes are siblings, we can do a quick check\r\n\t\t} else if ( aup === bup ) {\r\n\t\t\treturn siblingCheck( a, b );\r\n\t\t}\r\n\r\n\t\t// Otherwise we need full lists of their ancestors for comparison\r\n\t\tcur = a;\r\n\t\twhile ( (cur = cur.parentNode) ) {\r\n\t\t\tap.unshift( cur );\r\n\t\t}\r\n\t\tcur = b;\r\n\t\twhile ( (cur = cur.parentNode) ) {\r\n\t\t\tbp.unshift( cur );\r\n\t\t}\r\n\r\n\t\t// Walk down the tree looking for a discrepancy\r\n\t\twhile ( ap[i] === bp[i] ) {\r\n\t\t\ti++;\r\n\t\t}\r\n\r\n\t\treturn i ?\r\n\t\t\t// Do a sibling check if the nodes have a common ancestor\r\n\t\t\tsiblingCheck( ap[i], bp[i] ) :\r\n\r\n\t\t\t// Otherwise nodes in our document sort first\r\n\t\t\tap[i] === preferredDoc ? -1 :\r\n\t\t\tbp[i] === preferredDoc ? 1 :\r\n\t\t\t0;\r\n\t};\r\n\r\n\treturn doc;\r\n};\r\n\r\nSizzle.matches = function( expr, elements ) {\r\n\treturn Sizzle( expr, null, null, elements );\r\n};\r\n\r\nSizzle.matchesSelector = function( elem, expr ) {\r\n\t// Set document vars if needed\r\n\tif ( ( elem.ownerDocument || elem ) !== document ) {\r\n\t\tsetDocument( elem );\r\n\t}\r\n\r\n\t// Make sure that attribute selectors are quoted\r\n\texpr = expr.replace( rattributeQuotes, \"='$1']\" );\r\n\r\n\tif ( support.matchesSelector && documentIsHTML &&\r\n\t\t( !rbuggyMatches || !rbuggyMatches.test( expr ) ) &&\r\n\t\t( !rbuggyQSA     || !rbuggyQSA.test( expr ) ) ) {\r\n\r\n\t\ttry {\r\n\t\t\tvar ret = matches.call( elem, expr );\r\n\r\n\t\t\t// IE 9's matchesSelector returns false on disconnected nodes\r\n\t\t\tif ( ret || support.disconnectedMatch ||\r\n\t\t\t\t\t// As well, disconnected nodes are said to be in a document\r\n\t\t\t\t\t// fragment in IE 9\r\n\t\t\t\t\telem.document && elem.document.nodeType !== 11 ) {\r\n\t\t\t\treturn ret;\r\n\t\t\t}\r\n\t\t} catch(e) {}\r\n\t}\r\n\r\n\treturn Sizzle( expr, document, null, [elem] ).length > 0;\r\n};\r\n\r\nSizzle.contains = function( context, elem ) {\r\n\t// Set document vars if needed\r\n\tif ( ( context.ownerDocument || context ) !== document ) {\r\n\t\tsetDocument( context );\r\n\t}\r\n\treturn contains( context, elem );\r\n};\r\n\r\nSizzle.attr = function( elem, name ) {\r\n\t// Set document vars if needed\r\n\tif ( ( elem.ownerDocument || elem ) !== document ) {\r\n\t\tsetDocument( elem );\r\n\t}\r\n\r\n\tvar fn = Expr.attrHandle[ name.toLowerCase() ],\r\n\t\t// Don't get fooled by Object.prototype properties (jQuery #13807)\r\n\t\tval = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?\r\n\t\t\tfn( elem, name, !documentIsHTML ) :\r\n\t\t\tundefined;\r\n\r\n\treturn val === undefined ?\r\n\t\tsupport.attributes || !documentIsHTML ?\r\n\t\t\telem.getAttribute( name ) :\r\n\t\t\t(val = elem.getAttributeNode(name)) && val.specified ?\r\n\t\t\t\tval.value :\r\n\t\t\t\tnull :\r\n\t\tval;\r\n};\r\n\r\nSizzle.error = function( msg ) {\r\n\tthrow new Error( \"Syntax error, unrecognized expression: \" + msg );\r\n};\r\n\r\n/**\r\n * Document sorting and removing duplicates\r\n * @param {ArrayLike} results\r\n */\r\nSizzle.uniqueSort = function( results ) {\r\n\tvar elem,\r\n\t\tduplicates = [],\r\n\t\tj = 0,\r\n\t\ti = 0;\r\n\r\n\t// Unless we *know* we can detect duplicates, assume their presence\r\n\thasDuplicate = !support.detectDuplicates;\r\n\tsortInput = !support.sortStable && results.slice( 0 );\r\n\tresults.sort( sortOrder );\r\n\r\n\tif ( hasDuplicate ) {\r\n\t\twhile ( (elem = results[i++]) ) {\r\n\t\t\tif ( elem === results[ i ] ) {\r\n\t\t\t\tj = duplicates.push( i );\r\n\t\t\t}\r\n\t\t}\r\n\t\twhile ( j-- ) {\r\n\t\t\tresults.splice( duplicates[ j ], 1 );\r\n\t\t}\r\n\t}\r\n\r\n\treturn results;\r\n};\r\n\r\n/**\r\n * Utility function for retrieving the text value of an array of DOM nodes\r\n * @param {Array|Element} elem\r\n */\r\ngetText = Sizzle.getText = function( elem ) {\r\n\tvar node,\r\n\t\tret = \"\",\r\n\t\ti = 0,\r\n\t\tnodeType = elem.nodeType;\r\n\r\n\tif ( !nodeType ) {\r\n\t\t// If no nodeType, this is expected to be an array\r\n\t\tfor ( ; (node = elem[i]); i++ ) {\r\n\t\t\t// Do not traverse comment nodes\r\n\t\t\tret += getText( node );\r\n\t\t}\r\n\t} else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {\r\n\t\t// Use textContent for elements\r\n\t\t// innerText usage removed for consistency of new lines (see #11153)\r\n\t\tif ( typeof elem.textContent === \"string\" ) {\r\n\t\t\treturn elem.textContent;\r\n\t\t} else {\r\n\t\t\t// Traverse its children\r\n\t\t\tfor ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {\r\n\t\t\t\tret += getText( elem );\r\n\t\t\t}\r\n\t\t}\r\n\t} else if ( nodeType === 3 || nodeType === 4 ) {\r\n\t\treturn elem.nodeValue;\r\n\t}\r\n\t// Do not include comment or processing instruction nodes\r\n\r\n\treturn ret;\r\n};\r\n\r\nExpr = Sizzle.selectors = {\r\n\r\n\t// Can be adjusted by the user\r\n\tcacheLength: 50,\r\n\r\n\tcreatePseudo: markFunction,\r\n\r\n\tmatch: matchExpr,\r\n\r\n\tattrHandle: {},\r\n\r\n\tfind: {},\r\n\r\n\trelative: {\r\n\t\t\">\": { dir: \"parentNode\", first: true },\r\n\t\t\" \": { dir: \"parentNode\" },\r\n\t\t\"+\": { dir: \"previousSibling\", first: true },\r\n\t\t\"~\": { dir: \"previousSibling\" }\r\n\t},\r\n\r\n\tpreFilter: {\r\n\t\t\"ATTR\": function( match ) {\r\n\t\t\tmatch[1] = match[1].replace( runescape, funescape );\r\n\r\n\t\t\t// Move the given value to match[3] whether quoted or unquoted\r\n\t\t\tmatch[3] = ( match[4] || match[5] || \"\" ).replace( runescape, funescape );\r\n\r\n\t\t\tif ( match[2] === \"~=\" ) {\r\n\t\t\t\tmatch[3] = \" \" + match[3] + \" \";\r\n\t\t\t}\r\n\r\n\t\t\treturn match.slice( 0, 4 );\r\n\t\t},\r\n\r\n\t\t\"CHILD\": function( match ) {\r\n\t\t\t/* matches from matchExpr[\"CHILD\"]\r\n\t\t\t\t1 type (only|nth|...)\r\n\t\t\t\t2 what (child|of-type)\r\n\t\t\t\t3 argument (even|odd|\\d*|\\d*n([+-]\\d+)?|...)\r\n\t\t\t\t4 xn-component of xn+y argument ([+-]?\\d*n|)\r\n\t\t\t\t5 sign of xn-component\r\n\t\t\t\t6 x of xn-component\r\n\t\t\t\t7 sign of y-component\r\n\t\t\t\t8 y of y-component\r\n\t\t\t*/\r\n\t\t\tmatch[1] = match[1].toLowerCase();\r\n\r\n\t\t\tif ( match[1].slice( 0, 3 ) === \"nth\" ) {\r\n\t\t\t\t// nth-* requires argument\r\n\t\t\t\tif ( !match[3] ) {\r\n\t\t\t\t\tSizzle.error( match[0] );\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// numeric x and y parameters for Expr.filter.CHILD\r\n\t\t\t\t// remember that false/true cast respectively to 0/1\r\n\t\t\t\tmatch[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === \"even\" || match[3] === \"odd\" ) );\r\n\t\t\t\tmatch[5] = +( ( match[7] + match[8] ) || match[3] === \"odd\" );\r\n\r\n\t\t\t// other types prohibit arguments\r\n\t\t\t} else if ( match[3] ) {\r\n\t\t\t\tSizzle.error( match[0] );\r\n\t\t\t}\r\n\r\n\t\t\treturn match;\r\n\t\t},\r\n\r\n\t\t\"PSEUDO\": function( match ) {\r\n\t\t\tvar excess,\r\n\t\t\t\tunquoted = !match[5] && match[2];\r\n\r\n\t\t\tif ( matchExpr[\"CHILD\"].test( match[0] ) ) {\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\r\n\t\t\t// Accept quoted arguments as-is\r\n\t\t\tif ( match[3] && match[4] !== undefined ) {\r\n\t\t\t\tmatch[2] = match[4];\r\n\r\n\t\t\t// Strip excess characters from unquoted arguments\r\n\t\t\t} else if ( unquoted && rpseudo.test( unquoted ) &&\r\n\t\t\t\t// Get excess from tokenize (recursively)\r\n\t\t\t\t(excess = tokenize( unquoted, true )) &&\r\n\t\t\t\t// advance to the next closing parenthesis\r\n\t\t\t\t(excess = unquoted.indexOf( \")\", unquoted.length - excess ) - unquoted.length) ) {\r\n\r\n\t\t\t\t// excess is a negative index\r\n\t\t\t\tmatch[0] = match[0].slice( 0, excess );\r\n\t\t\t\tmatch[2] = unquoted.slice( 0, excess );\r\n\t\t\t}\r\n\r\n\t\t\t// Return only captures needed by the pseudo filter method (type and argument)\r\n\t\t\treturn match.slice( 0, 3 );\r\n\t\t}\r\n\t},\r\n\r\n\tfilter: {\r\n\r\n\t\t\"TAG\": function( nodeNameSelector ) {\r\n\t\t\tvar nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase();\r\n\t\t\treturn nodeNameSelector === \"*\" ?\r\n\t\t\t\tfunction() { return true; } :\r\n\t\t\t\tfunction( elem ) {\r\n\t\t\t\t\treturn elem.nodeName && elem.nodeName.toLowerCase() === nodeName;\r\n\t\t\t\t};\r\n\t\t},\r\n\r\n\t\t\"CLASS\": function( className ) {\r\n\t\t\tvar pattern = classCache[ className + \" \" ];\r\n\r\n\t\t\treturn pattern ||\r\n\t\t\t\t(pattern = new RegExp( \"(^|\" + whitespace + \")\" + className + \"(\" + whitespace + \"|$)\" )) &&\r\n\t\t\t\tclassCache( className, function( elem ) {\r\n\t\t\t\t\treturn pattern.test( typeof elem.className === \"string\" && elem.className || typeof elem.getAttribute !== strundefined && elem.getAttribute(\"class\") || \"\" );\r\n\t\t\t\t});\r\n\t\t},\r\n\r\n\t\t\"ATTR\": function( name, operator, check ) {\r\n\t\t\treturn function( elem ) {\r\n\t\t\t\tvar result = Sizzle.attr( elem, name );\r\n\r\n\t\t\t\tif ( result == null ) {\r\n\t\t\t\t\treturn operator === \"!=\";\r\n\t\t\t\t}\r\n\t\t\t\tif ( !operator ) {\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tresult += \"\";\r\n\r\n\t\t\t\treturn operator === \"=\" ? result === check :\r\n\t\t\t\t\toperator === \"!=\" ? result !== check :\r\n\t\t\t\t\toperator === \"^=\" ? check && result.indexOf( check ) === 0 :\r\n\t\t\t\t\toperator === \"*=\" ? check && result.indexOf( check ) > -1 :\r\n\t\t\t\t\toperator === \"$=\" ? check && result.slice( -check.length ) === check :\r\n\t\t\t\t\toperator === \"~=\" ? ( \" \" + result + \" \" ).indexOf( check ) > -1 :\r\n\t\t\t\t\toperator === \"|=\" ? result === check || result.slice( 0, check.length + 1 ) === check + \"-\" :\r\n\t\t\t\t\tfalse;\r\n\t\t\t};\r\n\t\t},\r\n\r\n\t\t\"CHILD\": function( type, what, argument, first, last ) {\r\n\t\t\tvar simple = type.slice( 0, 3 ) !== \"nth\",\r\n\t\t\t\tforward = type.slice( -4 ) !== \"last\",\r\n\t\t\t\tofType = what === \"of-type\";\r\n\r\n\t\t\treturn first === 1 && last === 0 ?\r\n\r\n\t\t\t\t// Shortcut for :nth-*(n)\r\n\t\t\t\tfunction( elem ) {\r\n\t\t\t\t\treturn !!elem.parentNode;\r\n\t\t\t\t} :\r\n\r\n\t\t\t\tfunction( elem, context, xml ) {\r\n\t\t\t\t\tvar cache, outerCache, node, diff, nodeIndex, start,\r\n\t\t\t\t\t\tdir = simple !== forward ? \"nextSibling\" : \"previousSibling\",\r\n\t\t\t\t\t\tparent = elem.parentNode,\r\n\t\t\t\t\t\tname = ofType && elem.nodeName.toLowerCase(),\r\n\t\t\t\t\t\tuseCache = !xml && !ofType;\r\n\r\n\t\t\t\t\tif ( parent ) {\r\n\r\n\t\t\t\t\t\t// :(first|last|only)-(child|of-type)\r\n\t\t\t\t\t\tif ( simple ) {\r\n\t\t\t\t\t\t\twhile ( dir ) {\r\n\t\t\t\t\t\t\t\tnode = elem;\r\n\t\t\t\t\t\t\t\twhile ( (node = node[ dir ]) ) {\r\n\t\t\t\t\t\t\t\t\tif ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) {\r\n\t\t\t\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t// Reverse direction for :only-* (if we haven't yet done so)\r\n\t\t\t\t\t\t\t\tstart = dir = type === \"only\" && !start && \"nextSibling\";\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tstart = [ forward ? parent.firstChild : parent.lastChild ];\r\n\r\n\t\t\t\t\t\t// non-xml :nth-child(...) stores cache data on `parent`\r\n\t\t\t\t\t\tif ( forward && useCache ) {\r\n\t\t\t\t\t\t\t// Seek `elem` from a previously-cached index\r\n\t\t\t\t\t\t\touterCache = parent[ expando ] || (parent[ expando ] = {});\r\n\t\t\t\t\t\t\tcache = outerCache[ type ] || [];\r\n\t\t\t\t\t\t\tnodeIndex = cache[0] === dirruns && cache[1];\r\n\t\t\t\t\t\t\tdiff = cache[0] === dirruns && cache[2];\r\n\t\t\t\t\t\t\tnode = nodeIndex && parent.childNodes[ nodeIndex ];\r\n\r\n\t\t\t\t\t\t\twhile ( (node = ++nodeIndex && node && node[ dir ] ||\r\n\r\n\t\t\t\t\t\t\t\t// Fallback to seeking `elem` from the start\r\n\t\t\t\t\t\t\t\t(diff = nodeIndex = 0) || start.pop()) ) {\r\n\r\n\t\t\t\t\t\t\t\t// When found, cache indexes on `parent` and break\r\n\t\t\t\t\t\t\t\tif ( node.nodeType === 1 && ++diff && node === elem ) {\r\n\t\t\t\t\t\t\t\t\touterCache[ type ] = [ dirruns, nodeIndex, diff ];\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t// Use previously-cached element index if available\r\n\t\t\t\t\t\t} else if ( useCache && (cache = (elem[ expando ] || (elem[ expando ] = {}))[ type ]) && cache[0] === dirruns ) {\r\n\t\t\t\t\t\t\tdiff = cache[1];\r\n\r\n\t\t\t\t\t\t// xml :nth-child(...) or :nth-last-child(...) or :nth(-last)?-of-type(...)\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t// Use the same loop as above to seek `elem` from the start\r\n\t\t\t\t\t\t\twhile ( (node = ++nodeIndex && node && node[ dir ] ||\r\n\t\t\t\t\t\t\t\t(diff = nodeIndex = 0) || start.pop()) ) {\r\n\r\n\t\t\t\t\t\t\t\tif ( ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) && ++diff ) {\r\n\t\t\t\t\t\t\t\t\t// Cache the index of each encountered element\r\n\t\t\t\t\t\t\t\t\tif ( useCache ) {\r\n\t\t\t\t\t\t\t\t\t\t(node[ expando ] || (node[ expando ] = {}))[ type ] = [ dirruns, diff ];\r\n\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\tif ( node === elem ) {\r\n\t\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t// Incorporate the offset, then check against cycle size\r\n\t\t\t\t\t\tdiff -= last;\r\n\t\t\t\t\t\treturn diff === first || ( diff % first === 0 && diff / first >= 0 );\r\n\t\t\t\t\t}\r\n\t\t\t\t};\r\n\t\t},\r\n\r\n\t\t\"PSEUDO\": function( pseudo, argument ) {\r\n\t\t\t// pseudo-class names are case-insensitive\r\n\t\t\t// http://www.w3.org/TR/selectors/#pseudo-classes\r\n\t\t\t// Prioritize by case sensitivity in case custom pseudos are added with uppercase letters\r\n\t\t\t// Remember that setFilters inherits from pseudos\r\n\t\t\tvar args,\r\n\t\t\t\tfn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||\r\n\t\t\t\t\tSizzle.error( \"unsupported pseudo: \" + pseudo );\r\n\r\n\t\t\t// The user may use createPseudo to indicate that\r\n\t\t\t// arguments are needed to create the filter function\r\n\t\t\t// just as Sizzle does\r\n\t\t\tif ( fn[ expando ] ) {\r\n\t\t\t\treturn fn( argument );\r\n\t\t\t}\r\n\r\n\t\t\t// But maintain support for old signatures\r\n\t\t\tif ( fn.length > 1 ) {\r\n\t\t\t\targs = [ pseudo, pseudo, \"\", argument ];\r\n\t\t\t\treturn Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?\r\n\t\t\t\t\tmarkFunction(function( seed, matches ) {\r\n\t\t\t\t\t\tvar idx,\r\n\t\t\t\t\t\t\tmatched = fn( seed, argument ),\r\n\t\t\t\t\t\t\ti = matched.length;\r\n\t\t\t\t\t\twhile ( i-- ) {\r\n\t\t\t\t\t\t\tidx = indexOf.call( seed, matched[i] );\r\n\t\t\t\t\t\t\tseed[ idx ] = !( matches[ idx ] = matched[i] );\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}) :\r\n\t\t\t\t\tfunction( elem ) {\r\n\t\t\t\t\t\treturn fn( elem, 0, args );\r\n\t\t\t\t\t};\r\n\t\t\t}\r\n\r\n\t\t\treturn fn;\r\n\t\t}\r\n\t},\r\n\r\n\tpseudos: {\r\n\t\t// Potentially complex pseudos\r\n\t\t\"not\": markFunction(function( selector ) {\r\n\t\t\t// Trim the selector passed to compile\r\n\t\t\t// to avoid treating leading and trailing\r\n\t\t\t// spaces as combinators\r\n\t\t\tvar input = [],\r\n\t\t\t\tresults = [],\r\n\t\t\t\tmatcher = compile( selector.replace( rtrim, \"$1\" ) );\r\n\r\n\t\t\treturn matcher[ expando ] ?\r\n\t\t\t\tmarkFunction(function( seed, matches, context, xml ) {\r\n\t\t\t\t\tvar elem,\r\n\t\t\t\t\t\tunmatched = matcher( seed, null, xml, [] ),\r\n\t\t\t\t\t\ti = seed.length;\r\n\r\n\t\t\t\t\t// Match elements unmatched by `matcher`\r\n\t\t\t\t\twhile ( i-- ) {\r\n\t\t\t\t\t\tif ( (elem = unmatched[i]) ) {\r\n\t\t\t\t\t\t\tseed[i] = !(matches[i] = elem);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}) :\r\n\t\t\t\tfunction( elem, context, xml ) {\r\n\t\t\t\t\tinput[0] = elem;\r\n\t\t\t\t\tmatcher( input, null, xml, results );\r\n\t\t\t\t\treturn !results.pop();\r\n\t\t\t\t};\r\n\t\t}),\r\n\r\n\t\t\"has\": markFunction(function( selector ) {\r\n\t\t\treturn function( elem ) {\r\n\t\t\t\treturn Sizzle( selector, elem ).length > 0;\r\n\t\t\t};\r\n\t\t}),\r\n\r\n\t\t\"contains\": markFunction(function( text ) {\r\n\t\t\treturn function( elem ) {\r\n\t\t\t\treturn ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1;\r\n\t\t\t};\r\n\t\t}),\r\n\r\n\t\t// \"Whether an element is represented by a :lang() selector\r\n\t\t// is based solely on the element's language value\r\n\t\t// being equal to the identifier C,\r\n\t\t// or beginning with the identifier C immediately followed by \"-\".\r\n\t\t// The matching of C against the element's language value is performed case-insensitively.\r\n\t\t// The identifier C does not have to be a valid language name.\"\r\n\t\t// http://www.w3.org/TR/selectors/#lang-pseudo\r\n\t\t\"lang\": markFunction( function( lang ) {\r\n\t\t\t// lang value must be a valid identifier\r\n\t\t\tif ( !ridentifier.test(lang || \"\") ) {\r\n\t\t\t\tSizzle.error( \"unsupported lang: \" + lang );\r\n\t\t\t}\r\n\t\t\tlang = lang.replace( runescape, funescape ).toLowerCase();\r\n\t\t\treturn function( elem ) {\r\n\t\t\t\tvar elemLang;\r\n\t\t\t\tdo {\r\n\t\t\t\t\tif ( (elemLang = documentIsHTML ?\r\n\t\t\t\t\t\telem.lang :\r\n\t\t\t\t\t\telem.getAttribute(\"xml:lang\") || elem.getAttribute(\"lang\")) ) {\r\n\r\n\t\t\t\t\t\telemLang = elemLang.toLowerCase();\r\n\t\t\t\t\t\treturn elemLang === lang || elemLang.indexOf( lang + \"-\" ) === 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t} while ( (elem = elem.parentNode) && elem.nodeType === 1 );\r\n\t\t\t\treturn false;\r\n\t\t\t};\r\n\t\t}),\r\n\r\n\t\t// Miscellaneous\r\n\t\t\"target\": function( elem ) {\r\n\t\t\tvar hash = window.location && window.location.hash;\r\n\t\t\treturn hash && hash.slice( 1 ) === elem.id;\r\n\t\t},\r\n\r\n\t\t\"root\": function( elem ) {\r\n\t\t\treturn elem === docElem;\r\n\t\t},\r\n\r\n\t\t\"focus\": function( elem ) {\r\n\t\t\treturn elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex);\r\n\t\t},\r\n\r\n\t\t// Boolean properties\r\n\t\t\"enabled\": function( elem ) {\r\n\t\t\treturn elem.disabled === false;\r\n\t\t},\r\n\r\n\t\t\"disabled\": function( elem ) {\r\n\t\t\treturn elem.disabled === true;\r\n\t\t},\r\n\r\n\t\t\"checked\": function( elem ) {\r\n\t\t\t// In CSS3, :checked should return both checked and selected elements\r\n\t\t\t// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked\r\n\t\t\tvar nodeName = elem.nodeName.toLowerCase();\r\n\t\t\treturn (nodeName === \"input\" && !!elem.checked) || (nodeName === \"option\" && !!elem.selected);\r\n\t\t},\r\n\r\n\t\t\"selected\": function( elem ) {\r\n\t\t\t// Accessing this property makes selected-by-default\r\n\t\t\t// options in Safari work properly\r\n\t\t\tif ( elem.parentNode ) {\r\n\t\t\t\telem.parentNode.selectedIndex;\r\n\t\t\t}\r\n\r\n\t\t\treturn elem.selected === true;\r\n\t\t},\r\n\r\n\t\t// Contents\r\n\t\t\"empty\": function( elem ) {\r\n\t\t\t// http://www.w3.org/TR/selectors/#empty-pseudo\r\n\t\t\t// :empty is only affected by element nodes and content nodes(including text(3), cdata(4)),\r\n\t\t\t//   not comment, processing instructions, or others\r\n\t\t\t// Thanks to Diego Perini for the nodeName shortcut\r\n\t\t\t//   Greater than \"@\" means alpha characters (specifically not starting with \"#\" or \"?\")\r\n\t\t\tfor ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {\r\n\t\t\t\tif ( elem.nodeName > \"@\" || elem.nodeType === 3 || elem.nodeType === 4 ) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t},\r\n\r\n\t\t\"parent\": function( elem ) {\r\n\t\t\treturn !Expr.pseudos[\"empty\"]( elem );\r\n\t\t},\r\n\r\n\t\t// Element/input types\r\n\t\t\"header\": function( elem ) {\r\n\t\t\treturn rheader.test( elem.nodeName );\r\n\t\t},\r\n\r\n\t\t\"input\": function( elem ) {\r\n\t\t\treturn rinputs.test( elem.nodeName );\r\n\t\t},\r\n\r\n\t\t\"button\": function( elem ) {\r\n\t\t\tvar name = elem.nodeName.toLowerCase();\r\n\t\t\treturn name === \"input\" && elem.type === \"button\" || name === \"button\";\r\n\t\t},\r\n\r\n\t\t\"text\": function( elem ) {\r\n\t\t\tvar attr;\r\n\t\t\t// IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc)\r\n\t\t\t// use getAttribute instead to test this case\r\n\t\t\treturn elem.nodeName.toLowerCase() === \"input\" &&\r\n\t\t\t\telem.type === \"text\" &&\r\n\t\t\t\t( (attr = elem.getAttribute(\"type\")) == null || attr.toLowerCase() === elem.type );\r\n\t\t},\r\n\r\n\t\t// Position-in-collection\r\n\t\t\"first\": createPositionalPseudo(function() {\r\n\t\t\treturn [ 0 ];\r\n\t\t}),\r\n\r\n\t\t\"last\": createPositionalPseudo(function( matchIndexes, length ) {\r\n\t\t\treturn [ length - 1 ];\r\n\t\t}),\r\n\r\n\t\t\"eq\": createPositionalPseudo(function( matchIndexes, length, argument ) {\r\n\t\t\treturn [ argument < 0 ? argument + length : argument ];\r\n\t\t}),\r\n\r\n\t\t\"even\": createPositionalPseudo(function( matchIndexes, length ) {\r\n\t\t\tvar i = 0;\r\n\t\t\tfor ( ; i < length; i += 2 ) {\r\n\t\t\t\tmatchIndexes.push( i );\r\n\t\t\t}\r\n\t\t\treturn matchIndexes;\r\n\t\t}),\r\n\r\n\t\t\"odd\": createPositionalPseudo(function( matchIndexes, length ) {\r\n\t\t\tvar i = 1;\r\n\t\t\tfor ( ; i < length; i += 2 ) {\r\n\t\t\t\tmatchIndexes.push( i );\r\n\t\t\t}\r\n\t\t\treturn matchIndexes;\r\n\t\t}),\r\n\r\n\t\t\"lt\": createPositionalPseudo(function( matchIndexes, length, argument ) {\r\n\t\t\tvar i = argument < 0 ? argument + length : argument;\r\n\t\t\tfor ( ; --i >= 0; ) {\r\n\t\t\t\tmatchIndexes.push( i );\r\n\t\t\t}\r\n\t\t\treturn matchIndexes;\r\n\t\t}),\r\n\r\n\t\t\"gt\": createPositionalPseudo(function( matchIndexes, length, argument ) {\r\n\t\t\tvar i = argument < 0 ? argument + length : argument;\r\n\t\t\tfor ( ; ++i < length; ) {\r\n\t\t\t\tmatchIndexes.push( i );\r\n\t\t\t}\r\n\t\t\treturn matchIndexes;\r\n\t\t})\r\n\t}\r\n};\r\n\r\nExpr.pseudos[\"nth\"] = Expr.pseudos[\"eq\"];\r\n\r\n// Add button/input type pseudos\r\nfor ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {\r\n\tExpr.pseudos[ i ] = createInputPseudo( i );\r\n}\r\nfor ( i in { submit: true, reset: true } ) {\r\n\tExpr.pseudos[ i ] = createButtonPseudo( i );\r\n}\r\n\r\n// Easy API for creating new setFilters\r\nfunction setFilters() {}\r\nsetFilters.prototype = Expr.filters = Expr.pseudos;\r\nExpr.setFilters = new setFilters();\r\n\r\nfunction tokenize( selector, parseOnly ) {\r\n\tvar matched, match, tokens, type,\r\n\t\tsoFar, groups, preFilters,\r\n\t\tcached = tokenCache[ selector + \" \" ];\r\n\r\n\tif ( cached ) {\r\n\t\treturn parseOnly ? 0 : cached.slice( 0 );\r\n\t}\r\n\r\n\tsoFar = selector;\r\n\tgroups = [];\r\n\tpreFilters = Expr.preFilter;\r\n\r\n\twhile ( soFar ) {\r\n\r\n\t\t// Comma and first run\r\n\t\tif ( !matched || (match = rcomma.exec( soFar )) ) {\r\n\t\t\tif ( match ) {\r\n\t\t\t\t// Don't consume trailing commas as valid\r\n\t\t\t\tsoFar = soFar.slice( match[0].length ) || soFar;\r\n\t\t\t}\r\n\t\t\tgroups.push( tokens = [] );\r\n\t\t}\r\n\r\n\t\tmatched = false;\r\n\r\n\t\t// Combinators\r\n\t\tif ( (match = rcombinators.exec( soFar )) ) {\r\n\t\t\tmatched = match.shift();\r\n\t\t\ttokens.push({\r\n\t\t\t\tvalue: matched,\r\n\t\t\t\t// Cast descendant combinators to space\r\n\t\t\t\ttype: match[0].replace( rtrim, \" \" )\r\n\t\t\t});\r\n\t\t\tsoFar = soFar.slice( matched.length );\r\n\t\t}\r\n\r\n\t\t// Filters\r\n\t\tfor ( type in Expr.filter ) {\r\n\t\t\tif ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] ||\r\n\t\t\t\t(match = preFilters[ type ]( match ))) ) {\r\n\t\t\t\tmatched = match.shift();\r\n\t\t\t\ttokens.push({\r\n\t\t\t\t\tvalue: matched,\r\n\t\t\t\t\ttype: type,\r\n\t\t\t\t\tmatches: match\r\n\t\t\t\t});\r\n\t\t\t\tsoFar = soFar.slice( matched.length );\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif ( !matched ) {\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\t// Return the length of the invalid excess\r\n\t// if we're just parsing\r\n\t// Otherwise, throw an error or return tokens\r\n\treturn parseOnly ?\r\n\t\tsoFar.length :\r\n\t\tsoFar ?\r\n\t\t\tSizzle.error( selector ) :\r\n\t\t\t// Cache the tokens\r\n\t\t\ttokenCache( selector, groups ).slice( 0 );\r\n}\r\n\r\nfunction toSelector( tokens ) {\r\n\tvar i = 0,\r\n\t\tlen = tokens.length,\r\n\t\tselector = \"\";\r\n\tfor ( ; i < len; i++ ) {\r\n\t\tselector += tokens[i].value;\r\n\t}\r\n\treturn selector;\r\n}\r\n\r\nfunction addCombinator( matcher, combinator, base ) {\r\n\tvar dir = combinator.dir,\r\n\t\tcheckNonElements = base && dir === \"parentNode\",\r\n\t\tdoneName = done++;\r\n\r\n\treturn combinator.first ?\r\n\t\t// Check against closest ancestor/preceding element\r\n\t\tfunction( elem, context, xml ) {\r\n\t\t\twhile ( (elem = elem[ dir ]) ) {\r\n\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\r\n\t\t\t\t\treturn matcher( elem, context, xml );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} :\r\n\r\n\t\t// Check against all ancestor/preceding elements\r\n\t\tfunction( elem, context, xml ) {\r\n\t\t\tvar data, cache, outerCache,\r\n\t\t\t\tdirkey = dirruns + \" \" + doneName;\r\n\r\n\t\t\t// We can't set arbitrary data on XML nodes, so they don't benefit from dir caching\r\n\t\t\tif ( xml ) {\r\n\t\t\t\twhile ( (elem = elem[ dir ]) ) {\r\n\t\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\r\n\t\t\t\t\t\tif ( matcher( elem, context, xml ) ) {\r\n\t\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\twhile ( (elem = elem[ dir ]) ) {\r\n\t\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\r\n\t\t\t\t\t\touterCache = elem[ expando ] || (elem[ expando ] = {});\r\n\t\t\t\t\t\tif ( (cache = outerCache[ dir ]) && cache[0] === dirkey ) {\r\n\t\t\t\t\t\t\tif ( (data = cache[1]) === true || data === cachedruns ) {\r\n\t\t\t\t\t\t\t\treturn data === true;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tcache = outerCache[ dir ] = [ dirkey ];\r\n\t\t\t\t\t\t\tcache[1] = matcher( elem, context, xml ) || cachedruns;\r\n\t\t\t\t\t\t\tif ( cache[1] === true ) {\r\n\t\t\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n}\r\n\r\nfunction elementMatcher( matchers ) {\r\n\treturn matchers.length > 1 ?\r\n\t\tfunction( elem, context, xml ) {\r\n\t\t\tvar i = matchers.length;\r\n\t\t\twhile ( i-- ) {\r\n\t\t\t\tif ( !matchers[i]( elem, context, xml ) ) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t} :\r\n\t\tmatchers[0];\r\n}\r\n\r\nfunction condense( unmatched, map, filter, context, xml ) {\r\n\tvar elem,\r\n\t\tnewUnmatched = [],\r\n\t\ti = 0,\r\n\t\tlen = unmatched.length,\r\n\t\tmapped = map != null;\r\n\r\n\tfor ( ; i < len; i++ ) {\r\n\t\tif ( (elem = unmatched[i]) ) {\r\n\t\t\tif ( !filter || filter( elem, context, xml ) ) {\r\n\t\t\t\tnewUnmatched.push( elem );\r\n\t\t\t\tif ( mapped ) {\r\n\t\t\t\t\tmap.push( i );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\treturn newUnmatched;\r\n}\r\n\r\nfunction setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {\r\n\tif ( postFilter && !postFilter[ expando ] ) {\r\n\t\tpostFilter = setMatcher( postFilter );\r\n\t}\r\n\tif ( postFinder && !postFinder[ expando ] ) {\r\n\t\tpostFinder = setMatcher( postFinder, postSelector );\r\n\t}\r\n\treturn markFunction(function( seed, results, context, xml ) {\r\n\t\tvar temp, i, elem,\r\n\t\t\tpreMap = [],\r\n\t\t\tpostMap = [],\r\n\t\t\tpreexisting = results.length,\r\n\r\n\t\t\t// Get initial elements from seed or context\r\n\t\t\telems = seed || multipleContexts( selector || \"*\", context.nodeType ? [ context ] : context, [] ),\r\n\r\n\t\t\t// Prefilter to get matcher input, preserving a map for seed-results synchronization\r\n\t\t\tmatcherIn = preFilter && ( seed || !selector ) ?\r\n\t\t\t\tcondense( elems, preMap, preFilter, context, xml ) :\r\n\t\t\t\telems,\r\n\r\n\t\t\tmatcherOut = matcher ?\r\n\t\t\t\t// If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results,\r\n\t\t\t\tpostFinder || ( seed ? preFilter : preexisting || postFilter ) ?\r\n\r\n\t\t\t\t\t// ...intermediate processing is necessary\r\n\t\t\t\t\t[] :\r\n\r\n\t\t\t\t\t// ...otherwise use results directly\r\n\t\t\t\t\tresults :\r\n\t\t\t\tmatcherIn;\r\n\r\n\t\t// Find primary matches\r\n\t\tif ( matcher ) {\r\n\t\t\tmatcher( matcherIn, matcherOut, context, xml );\r\n\t\t}\r\n\r\n\t\t// Apply postFilter\r\n\t\tif ( postFilter ) {\r\n\t\t\ttemp = condense( matcherOut, postMap );\r\n\t\t\tpostFilter( temp, [], context, xml );\r\n\r\n\t\t\t// Un-match failing elements by moving them back to matcherIn\r\n\t\t\ti = temp.length;\r\n\t\t\twhile ( i-- ) {\r\n\t\t\t\tif ( (elem = temp[i]) ) {\r\n\t\t\t\t\tmatcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif ( seed ) {\r\n\t\t\tif ( postFinder || preFilter ) {\r\n\t\t\t\tif ( postFinder ) {\r\n\t\t\t\t\t// Get the final matcherOut by condensing this intermediate into postFinder contexts\r\n\t\t\t\t\ttemp = [];\r\n\t\t\t\t\ti = matcherOut.length;\r\n\t\t\t\t\twhile ( i-- ) {\r\n\t\t\t\t\t\tif ( (elem = matcherOut[i]) ) {\r\n\t\t\t\t\t\t\t// Restore matcherIn since elem is not yet a final match\r\n\t\t\t\t\t\t\ttemp.push( (matcherIn[i] = elem) );\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tpostFinder( null, (matcherOut = []), temp, xml );\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Move matched elements from seed to results to keep them synchronized\r\n\t\t\t\ti = matcherOut.length;\r\n\t\t\t\twhile ( i-- ) {\r\n\t\t\t\t\tif ( (elem = matcherOut[i]) &&\r\n\t\t\t\t\t\t(temp = postFinder ? indexOf.call( seed, elem ) : preMap[i]) > -1 ) {\r\n\r\n\t\t\t\t\t\tseed[temp] = !(results[temp] = elem);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t// Add elements to results, through postFinder if defined\r\n\t\t} else {\r\n\t\t\tmatcherOut = condense(\r\n\t\t\t\tmatcherOut === results ?\r\n\t\t\t\t\tmatcherOut.splice( preexisting, matcherOut.length ) :\r\n\t\t\t\t\tmatcherOut\r\n\t\t\t);\r\n\t\t\tif ( postFinder ) {\r\n\t\t\t\tpostFinder( null, results, matcherOut, xml );\r\n\t\t\t} else {\r\n\t\t\t\tpush.apply( results, matcherOut );\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n}\r\n\r\nfunction matcherFromTokens( tokens ) {\r\n\tvar checkContext, matcher, j,\r\n\t\tlen = tokens.length,\r\n\t\tleadingRelative = Expr.relative[ tokens[0].type ],\r\n\t\timplicitRelative = leadingRelative || Expr.relative[\" \"],\r\n\t\ti = leadingRelative ? 1 : 0,\r\n\r\n\t\t// The foundational matcher ensures that elements are reachable from top-level context(s)\r\n\t\tmatchContext = addCombinator( function( elem ) {\r\n\t\t\treturn elem === checkContext;\r\n\t\t}, implicitRelative, true ),\r\n\t\tmatchAnyContext = addCombinator( function( elem ) {\r\n\t\t\treturn indexOf.call( checkContext, elem ) > -1;\r\n\t\t}, implicitRelative, true ),\r\n\t\tmatchers = [ function( elem, context, xml ) {\r\n\t\t\treturn ( !leadingRelative && ( xml || context !== outermostContext ) ) || (\r\n\t\t\t\t(checkContext = context).nodeType ?\r\n\t\t\t\t\tmatchContext( elem, context, xml ) :\r\n\t\t\t\t\tmatchAnyContext( elem, context, xml ) );\r\n\t\t} ];\r\n\r\n\tfor ( ; i < len; i++ ) {\r\n\t\tif ( (matcher = Expr.relative[ tokens[i].type ]) ) {\r\n\t\t\tmatchers = [ addCombinator(elementMatcher( matchers ), matcher) ];\r\n\t\t} else {\r\n\t\t\tmatcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches );\r\n\r\n\t\t\t// Return special upon seeing a positional matcher\r\n\t\t\tif ( matcher[ expando ] ) {\r\n\t\t\t\t// Find the next relative operator (if any) for proper handling\r\n\t\t\t\tj = ++i;\r\n\t\t\t\tfor ( ; j < len; j++ ) {\r\n\t\t\t\t\tif ( Expr.relative[ tokens[j].type ] ) {\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\treturn setMatcher(\r\n\t\t\t\t\ti > 1 && elementMatcher( matchers ),\r\n\t\t\t\t\ti > 1 && toSelector(\r\n\t\t\t\t\t\t// If the preceding token was a descendant combinator, insert an implicit any-element `*`\r\n\t\t\t\t\t\ttokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === \" \" ? \"*\" : \"\" })\r\n\t\t\t\t\t).replace( rtrim, \"$1\" ),\r\n\t\t\t\t\tmatcher,\r\n\t\t\t\t\ti < j && matcherFromTokens( tokens.slice( i, j ) ),\r\n\t\t\t\t\tj < len && matcherFromTokens( (tokens = tokens.slice( j )) ),\r\n\t\t\t\t\tj < len && toSelector( tokens )\r\n\t\t\t\t);\r\n\t\t\t}\r\n\t\t\tmatchers.push( matcher );\r\n\t\t}\r\n\t}\r\n\r\n\treturn elementMatcher( matchers );\r\n}\r\n\r\nfunction matcherFromGroupMatchers( elementMatchers, setMatchers ) {\r\n\t// A counter to specify which element is currently being matched\r\n\tvar matcherCachedRuns = 0,\r\n\t\tbySet = setMatchers.length > 0,\r\n\t\tbyElement = elementMatchers.length > 0,\r\n\t\tsuperMatcher = function( seed, context, xml, results, expandContext ) {\r\n\t\t\tvar elem, j, matcher,\r\n\t\t\t\tsetMatched = [],\r\n\t\t\t\tmatchedCount = 0,\r\n\t\t\t\ti = \"0\",\r\n\t\t\t\tunmatched = seed && [],\r\n\t\t\t\toutermost = expandContext != null,\r\n\t\t\t\tcontextBackup = outermostContext,\r\n\t\t\t\t// We must always have either seed elements or context\r\n\t\t\t\telems = seed || byElement && Expr.find[\"TAG\"]( \"*\", expandContext && context.parentNode || context ),\r\n\t\t\t\t// Use integer dirruns iff this is the outermost matcher\r\n\t\t\t\tdirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1);\r\n\r\n\t\t\tif ( outermost ) {\r\n\t\t\t\toutermostContext = context !== document && context;\r\n\t\t\t\tcachedruns = matcherCachedRuns;\r\n\t\t\t}\r\n\r\n\t\t\t// Add elements passing elementMatchers directly to results\r\n\t\t\t// Keep `i` a string if there are no elements so `matchedCount` will be \"00\" below\r\n\t\t\tfor ( ; (elem = elems[i]) != null; i++ ) {\r\n\t\t\t\tif ( byElement && elem ) {\r\n\t\t\t\t\tj = 0;\r\n\t\t\t\t\twhile ( (matcher = elementMatchers[j++]) ) {\r\n\t\t\t\t\t\tif ( matcher( elem, context, xml ) ) {\r\n\t\t\t\t\t\t\tresults.push( elem );\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif ( outermost ) {\r\n\t\t\t\t\t\tdirruns = dirrunsUnique;\r\n\t\t\t\t\t\tcachedruns = ++matcherCachedRuns;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Track unmatched elements for set filters\r\n\t\t\t\tif ( bySet ) {\r\n\t\t\t\t\t// They will have gone through all possible matchers\r\n\t\t\t\t\tif ( (elem = !matcher && elem) ) {\r\n\t\t\t\t\t\tmatchedCount--;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// Lengthen the array for every element, matched or not\r\n\t\t\t\t\tif ( seed ) {\r\n\t\t\t\t\t\tunmatched.push( elem );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// Apply set filters to unmatched elements\r\n\t\t\tmatchedCount += i;\r\n\t\t\tif ( bySet && i !== matchedCount ) {\r\n\t\t\t\tj = 0;\r\n\t\t\t\twhile ( (matcher = setMatchers[j++]) ) {\r\n\t\t\t\t\tmatcher( unmatched, setMatched, context, xml );\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif ( seed ) {\r\n\t\t\t\t\t// Reintegrate element matches to eliminate the need for sorting\r\n\t\t\t\t\tif ( matchedCount > 0 ) {\r\n\t\t\t\t\t\twhile ( i-- ) {\r\n\t\t\t\t\t\t\tif ( !(unmatched[i] || setMatched[i]) ) {\r\n\t\t\t\t\t\t\t\tsetMatched[i] = pop.call( results );\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// Discard index placeholder values to get only actual matches\r\n\t\t\t\t\tsetMatched = condense( setMatched );\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Add matches to results\r\n\t\t\t\tpush.apply( results, setMatched );\r\n\r\n\t\t\t\t// Seedless set matches succeeding multiple successful matchers stipulate sorting\r\n\t\t\t\tif ( outermost && !seed && setMatched.length > 0 &&\r\n\t\t\t\t\t( matchedCount + setMatchers.length ) > 1 ) {\r\n\r\n\t\t\t\t\tSizzle.uniqueSort( results );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// Override manipulation of globals by nested matchers\r\n\t\t\tif ( outermost ) {\r\n\t\t\t\tdirruns = dirrunsUnique;\r\n\t\t\t\toutermostContext = contextBackup;\r\n\t\t\t}\r\n\r\n\t\t\treturn unmatched;\r\n\t\t};\r\n\r\n\treturn bySet ?\r\n\t\tmarkFunction( superMatcher ) :\r\n\t\tsuperMatcher;\r\n}\r\n\r\ncompile = Sizzle.compile = function( selector, group /* Internal Use Only */ ) {\r\n\tvar i,\r\n\t\tsetMatchers = [],\r\n\t\telementMatchers = [],\r\n\t\tcached = compilerCache[ selector + \" \" ];\r\n\r\n\tif ( !cached ) {\r\n\t\t// Generate a function of recursive functions that can be used to check each element\r\n\t\tif ( !group ) {\r\n\t\t\tgroup = tokenize( selector );\r\n\t\t}\r\n\t\ti = group.length;\r\n\t\twhile ( i-- ) {\r\n\t\t\tcached = matcherFromTokens( group[i] );\r\n\t\t\tif ( cached[ expando ] ) {\r\n\t\t\t\tsetMatchers.push( cached );\r\n\t\t\t} else {\r\n\t\t\t\telementMatchers.push( cached );\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Cache the compiled function\r\n\t\tcached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) );\r\n\t}\r\n\treturn cached;\r\n};\r\n\r\nfunction multipleContexts( selector, contexts, results ) {\r\n\tvar i = 0,\r\n\t\tlen = contexts.length;\r\n\tfor ( ; i < len; i++ ) {\r\n\t\tSizzle( selector, contexts[i], results );\r\n\t}\r\n\treturn results;\r\n}\r\n\r\nfunction select( selector, context, results, seed ) {\r\n\tvar i, tokens, token, type, find,\r\n\t\tmatch = tokenize( selector );\r\n\r\n\tif ( !seed ) {\r\n\t\t// Try to minimize operations if there is only one group\r\n\t\tif ( match.length === 1 ) {\r\n\r\n\t\t\t// Take a shortcut and set the context if the root selector is an ID\r\n\t\t\ttokens = match[0] = match[0].slice( 0 );\r\n\t\t\tif ( tokens.length > 2 && (token = tokens[0]).type === \"ID\" &&\r\n\t\t\t\t\tsupport.getById && context.nodeType === 9 && documentIsHTML &&\r\n\t\t\t\t\tExpr.relative[ tokens[1].type ] ) {\r\n\r\n\t\t\t\tcontext = ( Expr.find[\"ID\"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0];\r\n\t\t\t\tif ( !context ) {\r\n\t\t\t\t\treturn results;\r\n\t\t\t\t}\r\n\t\t\t\tselector = selector.slice( tokens.shift().value.length );\r\n\t\t\t}\r\n\r\n\t\t\t// Fetch a seed set for right-to-left matching\r\n\t\t\ti = matchExpr[\"needsContext\"].test( selector ) ? 0 : tokens.length;\r\n\t\t\twhile ( i-- ) {\r\n\t\t\t\ttoken = tokens[i];\r\n\r\n\t\t\t\t// Abort if we hit a combinator\r\n\t\t\t\tif ( Expr.relative[ (type = token.type) ] ) {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tif ( (find = Expr.find[ type ]) ) {\r\n\t\t\t\t\t// Search, expanding context for leading sibling combinators\r\n\t\t\t\t\tif ( (seed = find(\r\n\t\t\t\t\t\ttoken.matches[0].replace( runescape, funescape ),\r\n\t\t\t\t\t\trsibling.test( tokens[0].type ) && context.parentNode || context\r\n\t\t\t\t\t)) ) {\r\n\r\n\t\t\t\t\t\t// If seed is empty or no tokens remain, we can return early\r\n\t\t\t\t\t\ttokens.splice( i, 1 );\r\n\t\t\t\t\t\tselector = seed.length && toSelector( tokens );\r\n\t\t\t\t\t\tif ( !selector ) {\r\n\t\t\t\t\t\t\tpush.apply( results, seed );\r\n\t\t\t\t\t\t\treturn results;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t// Compile and execute a filtering function\r\n\t// Provide `match` to avoid retokenization if we modified the selector above\r\n\tcompile( selector, match )(\r\n\t\tseed,\r\n\t\tcontext,\r\n\t\t!documentIsHTML,\r\n\t\tresults,\r\n\t\trsibling.test( selector )\r\n\t);\r\n\treturn results;\r\n}\r\n\r\n// One-time assignments\r\n\r\n// Sort stability\r\nsupport.sortStable = expando.split(\"\").sort( sortOrder ).join(\"\") === expando;\r\n\r\n// Support: Chrome<14\r\n// Always assume duplicates if they aren't passed to the comparison function\r\nsupport.detectDuplicates = hasDuplicate;\r\n\r\n// Initialize against the default document\r\nsetDocument();\r\n\r\n// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27)\r\n// Detached nodes confoundingly follow *each other*\r\nsupport.sortDetached = assert(function( div1 ) {\r\n\t// Should return 1, but returns 4 (following)\r\n\treturn div1.compareDocumentPosition( document.createElement(\"div\") ) & 1;\r\n});\r\n\r\n// Support: IE<8\r\n// Prevent attribute/property \"interpolation\"\r\n// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx\r\nif ( !assert(function( div ) {\r\n\tdiv.innerHTML = \"<a href='#'></a>\";\r\n\treturn div.firstChild.getAttribute(\"href\") === \"#\" ;\r\n}) ) {\r\n\taddHandle( \"type|href|height|width\", function( elem, name, isXML ) {\r\n\t\tif ( !isXML ) {\r\n\t\t\treturn elem.getAttribute( name, name.toLowerCase() === \"type\" ? 1 : 2 );\r\n\t\t}\r\n\t});\r\n}\r\n\r\n// Support: IE<9\r\n// Use defaultValue in place of getAttribute(\"value\")\r\nif ( !support.attributes || !assert(function( div ) {\r\n\tdiv.innerHTML = \"<input/>\";\r\n\tdiv.firstChild.setAttribute( \"value\", \"\" );\r\n\treturn div.firstChild.getAttribute( \"value\" ) === \"\";\r\n}) ) {\r\n\taddHandle( \"value\", function( elem, name, isXML ) {\r\n\t\tif ( !isXML && elem.nodeName.toLowerCase() === \"input\" ) {\r\n\t\t\treturn elem.defaultValue;\r\n\t\t}\r\n\t});\r\n}\r\n\r\n// Support: IE<9\r\n// Use getAttributeNode to fetch booleans when getAttribute lies\r\nif ( !assert(function( div ) {\r\n\treturn div.getAttribute(\"disabled\") == null;\r\n}) ) {\r\n\taddHandle( booleans, function( elem, name, isXML ) {\r\n\t\tvar val;\r\n\t\tif ( !isXML ) {\r\n\t\t\treturn (val = elem.getAttributeNode( name )) && val.specified ?\r\n\t\t\t\tval.value :\r\n\t\t\t\telem[ name ] === true ? name.toLowerCase() : null;\r\n\t\t}\r\n\t});\r\n}\r\n\r\njQuery.find = Sizzle;\r\njQuery.expr = Sizzle.selectors;\r\njQuery.expr[\":\"] = jQuery.expr.pseudos;\r\njQuery.unique = Sizzle.uniqueSort;\r\njQuery.text = Sizzle.getText;\r\njQuery.isXMLDoc = Sizzle.isXML;\r\njQuery.contains = Sizzle.contains;\r\n\r\n\r\n})( window );\r\n// String to Object options format cache\r\nvar optionsCache = {};\r\n\r\n// Convert String-formatted options into Object-formatted ones and store in cache\r\nfunction createOptions( options ) {\r\n\tvar object = optionsCache[ options ] = {};\r\n\tjQuery.each( options.match( core_rnotwhite ) || [], function( _, flag ) {\r\n\t\tobject[ flag ] = true;\r\n\t});\r\n\treturn object;\r\n}\r\n\r\n/*\r\n * Create a callback list using the following parameters:\r\n *\r\n *\toptions: an optional list of space-separated options that will change how\r\n *\t\t\tthe callback list behaves or a more traditional option object\r\n *\r\n * By default a callback list will act like an event callback list and can be\r\n * \"fired\" multiple times.\r\n *\r\n * Possible options:\r\n *\r\n *\tonce:\t\t\twill ensure the callback list can only be fired once (like a Deferred)\r\n *\r\n *\tmemory:\t\t\twill keep track of previous values and will call any callback added\r\n *\t\t\t\t\tafter the list has been fired right away with the latest \"memorized\"\r\n *\t\t\t\t\tvalues (like a Deferred)\r\n *\r\n *\tunique:\t\t\twill ensure a callback can only be added once (no duplicate in the list)\r\n *\r\n *\tstopOnFalse:\tinterrupt callings when a callback returns false\r\n *\r\n */\r\njQuery.Callbacks = function( options ) {\r\n\r\n\t// Convert options from String-formatted to Object-formatted if needed\r\n\t// (we check in cache first)\r\n\toptions = typeof options === \"string\" ?\r\n\t\t( optionsCache[ options ] || createOptions( options ) ) :\r\n\t\tjQuery.extend( {}, options );\r\n\r\n\tvar // Flag to know if list is currently firing\r\n\t\tfiring,\r\n\t\t// Last fire value (for non-forgettable lists)\r\n\t\tmemory,\r\n\t\t// Flag to know if list was already fired\r\n\t\tfired,\r\n\t\t// End of the loop when firing\r\n\t\tfiringLength,\r\n\t\t// Index of currently firing callback (modified by remove if needed)\r\n\t\tfiringIndex,\r\n\t\t// First callback to fire (used internally by add and fireWith)\r\n\t\tfiringStart,\r\n\t\t// Actual callback list\r\n\t\tlist = [],\r\n\t\t// Stack of fire calls for repeatable lists\r\n\t\tstack = !options.once && [],\r\n\t\t// Fire callbacks\r\n\t\tfire = function( data ) {\r\n\t\t\tmemory = options.memory && data;\r\n\t\t\tfired = true;\r\n\t\t\tfiringIndex = firingStart || 0;\r\n\t\t\tfiringStart = 0;\r\n\t\t\tfiringLength = list.length;\r\n\t\t\tfiring = true;\r\n\t\t\tfor ( ; list && firingIndex < firingLength; firingIndex++ ) {\r\n\t\t\t\tif ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false && options.stopOnFalse ) {\r\n\t\t\t\t\tmemory = false; // To prevent further calls using add\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfiring = false;\r\n\t\t\tif ( list ) {\r\n\t\t\t\tif ( stack ) {\r\n\t\t\t\t\tif ( stack.length ) {\r\n\t\t\t\t\t\tfire( stack.shift() );\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if ( memory ) {\r\n\t\t\t\t\tlist = [];\r\n\t\t\t\t} else {\r\n\t\t\t\t\tself.disable();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\t\t// Actual Callbacks object\r\n\t\tself = {\r\n\t\t\t// Add a callback or a collection of callbacks to the list\r\n\t\t\tadd: function() {\r\n\t\t\t\tif ( list ) {\r\n\t\t\t\t\t// First, we save the current length\r\n\t\t\t\t\tvar start = list.length;\r\n\t\t\t\t\t(function add( args ) {\r\n\t\t\t\t\t\tjQuery.each( args, function( _, arg ) {\r\n\t\t\t\t\t\t\tvar type = jQuery.type( arg );\r\n\t\t\t\t\t\t\tif ( type === \"function\" ) {\r\n\t\t\t\t\t\t\t\tif ( !options.unique || !self.has( arg ) ) {\r\n\t\t\t\t\t\t\t\t\tlist.push( arg );\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t} else if ( arg && arg.length && type !== \"string\" ) {\r\n\t\t\t\t\t\t\t\t// Inspect recursively\r\n\t\t\t\t\t\t\t\tadd( arg );\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t})( arguments );\r\n\t\t\t\t\t// Do we need to add the callbacks to the\r\n\t\t\t\t\t// current firing batch?\r\n\t\t\t\t\tif ( firing ) {\r\n\t\t\t\t\t\tfiringLength = list.length;\r\n\t\t\t\t\t// With memory, if we're not firing then\r\n\t\t\t\t\t// we should call right away\r\n\t\t\t\t\t} else if ( memory ) {\r\n\t\t\t\t\t\tfiringStart = start;\r\n\t\t\t\t\t\tfire( memory );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\treturn this;\r\n\t\t\t},\r\n\t\t\t// Remove a callback from the list\r\n\t\t\tremove: function() {\r\n\t\t\t\tif ( list ) {\r\n\t\t\t\t\tjQuery.each( arguments, function( _, arg ) {\r\n\t\t\t\t\t\tvar index;\r\n\t\t\t\t\t\twhile( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {\r\n\t\t\t\t\t\t\tlist.splice( index, 1 );\r\n\t\t\t\t\t\t\t// Handle firing indexes\r\n\t\t\t\t\t\t\tif ( firing ) {\r\n\t\t\t\t\t\t\t\tif ( index <= firingLength ) {\r\n\t\t\t\t\t\t\t\t\tfiringLength--;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif ( index <= firingIndex ) {\r\n\t\t\t\t\t\t\t\t\tfiringIndex--;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t\treturn this;\r\n\t\t\t},\r\n\t\t\t// Check if a given callback is in the list.\r\n\t\t\t// If no argument is given, return whether or not list has callbacks attached.\r\n\t\t\thas: function( fn ) {\r\n\t\t\t\treturn fn ? jQuery.inArray( fn, list ) > -1 : !!( list && list.length );\r\n\t\t\t},\r\n\t\t\t// Remove all callbacks from the list\r\n\t\t\tempty: function() {\r\n\t\t\t\tlist = [];\r\n\t\t\t\tfiringLength = 0;\r\n\t\t\t\treturn this;\r\n\t\t\t},\r\n\t\t\t// Have the list do nothing anymore\r\n\t\t\tdisable: function() {\r\n\t\t\t\tlist = stack = memory = undefined;\r\n\t\t\t\treturn this;\r\n\t\t\t},\r\n\t\t\t// Is it disabled?\r\n\t\t\tdisabled: function() {\r\n\t\t\t\treturn !list;\r\n\t\t\t},\r\n\t\t\t// Lock the list in its current state\r\n\t\t\tlock: function() {\r\n\t\t\t\tstack = undefined;\r\n\t\t\t\tif ( !memory ) {\r\n\t\t\t\t\tself.disable();\r\n\t\t\t\t}\r\n\t\t\t\treturn this;\r\n\t\t\t},\r\n\t\t\t// Is it locked?\r\n\t\t\tlocked: function() {\r\n\t\t\t\treturn !stack;\r\n\t\t\t},\r\n\t\t\t// Call all callbacks with the given context and arguments\r\n\t\t\tfireWith: function( context, args ) {\r\n\t\t\t\tif ( list && ( !fired || stack ) ) {\r\n\t\t\t\t\targs = args || [];\r\n\t\t\t\t\targs = [ context, args.slice ? args.slice() : args ];\r\n\t\t\t\t\tif ( firing ) {\r\n\t\t\t\t\t\tstack.push( args );\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tfire( args );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\treturn this;\r\n\t\t\t},\r\n\t\t\t// Call all the callbacks with the given arguments\r\n\t\t\tfire: function() {\r\n\t\t\t\tself.fireWith( this, arguments );\r\n\t\t\t\treturn this;\r\n\t\t\t},\r\n\t\t\t// To know if the callbacks have already been called at least once\r\n\t\t\tfired: function() {\r\n\t\t\t\treturn !!fired;\r\n\t\t\t}\r\n\t\t};\r\n\r\n\treturn self;\r\n};\r\njQuery.extend({\r\n\r\n\tDeferred: function( func ) {\r\n\t\tvar tuples = [\r\n\t\t\t\t// action, add listener, listener list, final state\r\n\t\t\t\t[ \"resolve\", \"done\", jQuery.Callbacks(\"once memory\"), \"resolved\" ],\r\n\t\t\t\t[ \"reject\", \"fail\", jQuery.Callbacks(\"once memory\"), \"rejected\" ],\r\n\t\t\t\t[ \"notify\", \"progress\", jQuery.Callbacks(\"memory\") ]\r\n\t\t\t],\r\n\t\t\tstate = \"pending\",\r\n\t\t\tpromise = {\r\n\t\t\t\tstate: function() {\r\n\t\t\t\t\treturn state;\r\n\t\t\t\t},\r\n\t\t\t\talways: function() {\r\n\t\t\t\t\tdeferred.done( arguments ).fail( arguments );\r\n\t\t\t\t\treturn this;\r\n\t\t\t\t},\r\n\t\t\t\tthen: function( /* fnDone, fnFail, fnProgress */ ) {\r\n\t\t\t\t\tvar fns = arguments;\r\n\t\t\t\t\treturn jQuery.Deferred(function( newDefer ) {\r\n\t\t\t\t\t\tjQuery.each( tuples, function( i, tuple ) {\r\n\t\t\t\t\t\t\tvar action = tuple[ 0 ],\r\n\t\t\t\t\t\t\t\tfn = jQuery.isFunction( fns[ i ] ) && fns[ i ];\r\n\t\t\t\t\t\t\t// deferred[ done | fail | progress ] for forwarding actions to newDefer\r\n\t\t\t\t\t\t\tdeferred[ tuple[1] ](function() {\r\n\t\t\t\t\t\t\t\tvar returned = fn && fn.apply( this, arguments );\r\n\t\t\t\t\t\t\t\tif ( returned && jQuery.isFunction( returned.promise ) ) {\r\n\t\t\t\t\t\t\t\t\treturned.promise()\r\n\t\t\t\t\t\t\t\t\t\t.done( newDefer.resolve )\r\n\t\t\t\t\t\t\t\t\t\t.fail( newDefer.reject )\r\n\t\t\t\t\t\t\t\t\t\t.progress( newDefer.notify );\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\tnewDefer[ action + \"With\" ]( this === promise ? newDefer.promise() : this, fn ? [ returned ] : arguments );\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\tfns = null;\r\n\t\t\t\t\t}).promise();\r\n\t\t\t\t},\r\n\t\t\t\t// Get a promise for this deferred\r\n\t\t\t\t// If obj is provided, the promise aspect is added to the object\r\n\t\t\t\tpromise: function( obj ) {\r\n\t\t\t\t\treturn obj != null ? jQuery.extend( obj, promise ) : promise;\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tdeferred = {};\r\n\r\n\t\t// Keep pipe for back-compat\r\n\t\tpromise.pipe = promise.then;\r\n\r\n\t\t// Add list-specific methods\r\n\t\tjQuery.each( tuples, function( i, tuple ) {\r\n\t\t\tvar list = tuple[ 2 ],\r\n\t\t\t\tstateString = tuple[ 3 ];\r\n\r\n\t\t\t// promise[ done | fail | progress ] = list.add\r\n\t\t\tpromise[ tuple[1] ] = list.add;\r\n\r\n\t\t\t// Handle state\r\n\t\t\tif ( stateString ) {\r\n\t\t\t\tlist.add(function() {\r\n\t\t\t\t\t// state = [ resolved | rejected ]\r\n\t\t\t\t\tstate = stateString;\r\n\r\n\t\t\t\t// [ reject_list | resolve_list ].disable; progress_list.lock\r\n\t\t\t\t}, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock );\r\n\t\t\t}\r\n\r\n\t\t\t// deferred[ resolve | reject | notify ]\r\n\t\t\tdeferred[ tuple[0] ] = function() {\r\n\t\t\t\tdeferred[ tuple[0] + \"With\" ]( this === deferred ? promise : this, arguments );\r\n\t\t\t\treturn this;\r\n\t\t\t};\r\n\t\t\tdeferred[ tuple[0] + \"With\" ] = list.fireWith;\r\n\t\t});\r\n\r\n\t\t// Make the deferred a promise\r\n\t\tpromise.promise( deferred );\r\n\r\n\t\t// Call given func if any\r\n\t\tif ( func ) {\r\n\t\t\tfunc.call( deferred, deferred );\r\n\t\t}\r\n\r\n\t\t// All done!\r\n\t\treturn deferred;\r\n\t},\r\n\r\n\t// Deferred helper\r\n\twhen: function( subordinate /* , ..., subordinateN */ ) {\r\n\t\tvar i = 0,\r\n\t\t\tresolveValues = core_slice.call( arguments ),\r\n\t\t\tlength = resolveValues.length,\r\n\r\n\t\t\t// the count of uncompleted subordinates\r\n\t\t\tremaining = length !== 1 || ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0,\r\n\r\n\t\t\t// the master Deferred. If resolveValues consist of only a single Deferred, just use that.\r\n\t\t\tdeferred = remaining === 1 ? subordinate : jQuery.Deferred(),\r\n\r\n\t\t\t// Update function for both resolve and progress values\r\n\t\t\tupdateFunc = function( i, contexts, values ) {\r\n\t\t\t\treturn function( value ) {\r\n\t\t\t\t\tcontexts[ i ] = this;\r\n\t\t\t\t\tvalues[ i ] = arguments.length > 1 ? core_slice.call( arguments ) : value;\r\n\t\t\t\t\tif( values === progressValues ) {\r\n\t\t\t\t\t\tdeferred.notifyWith( contexts, values );\r\n\t\t\t\t\t} else if ( !( --remaining ) ) {\r\n\t\t\t\t\t\tdeferred.resolveWith( contexts, values );\r\n\t\t\t\t\t}\r\n\t\t\t\t};\r\n\t\t\t},\r\n\r\n\t\t\tprogressValues, progressContexts, resolveContexts;\r\n\r\n\t\t// add listeners to Deferred subordinates; treat others as resolved\r\n\t\tif ( length > 1 ) {\r\n\t\t\tprogressValues = new Array( length );\r\n\t\t\tprogressContexts = new Array( length );\r\n\t\t\tresolveContexts = new Array( length );\r\n\t\t\tfor ( ; i < length; i++ ) {\r\n\t\t\t\tif ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) {\r\n\t\t\t\t\tresolveValues[ i ].promise()\r\n\t\t\t\t\t\t.done( updateFunc( i, resolveContexts, resolveValues ) )\r\n\t\t\t\t\t\t.fail( deferred.reject )\r\n\t\t\t\t\t\t.progress( updateFunc( i, progressContexts, progressValues ) );\r\n\t\t\t\t} else {\r\n\t\t\t\t\t--remaining;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// if we're not waiting on anything, resolve the master\r\n\t\tif ( !remaining ) {\r\n\t\t\tdeferred.resolveWith( resolveContexts, resolveValues );\r\n\t\t}\r\n\r\n\t\treturn deferred.promise();\r\n\t}\r\n});\r\njQuery.support = (function( support ) {\r\n\r\n\tvar all, a, input, select, fragment, opt, eventName, isSupported, i,\r\n\t\tdiv = document.createElement(\"div\");\r\n\r\n\t// Setup\r\n\tdiv.setAttribute( \"className\", \"t\" );\r\n\tdiv.innerHTML = \"  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>\";\r\n\r\n\t// Finish early in limited (non-browser) environments\r\n\tall = div.getElementsByTagName(\"*\") || [];\r\n\ta = div.getElementsByTagName(\"a\")[ 0 ];\r\n\tif ( !a || !a.style || !all.length ) {\r\n\t\treturn support;\r\n\t}\r\n\r\n\t// First batch of tests\r\n\tselect = document.createElement(\"select\");\r\n\topt = select.appendChild( document.createElement(\"option\") );\r\n\tinput = div.getElementsByTagName(\"input\")[ 0 ];\r\n\r\n\ta.style.cssText = \"top:1px;float:left;opacity:.5\";\r\n\r\n\t// Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7)\r\n\tsupport.getSetAttribute = div.className !== \"t\";\r\n\r\n\t// IE strips leading whitespace when .innerHTML is used\r\n\tsupport.leadingWhitespace = div.firstChild.nodeType === 3;\r\n\r\n\t// Make sure that tbody elements aren't automatically inserted\r\n\t// IE will insert them into empty tables\r\n\tsupport.tbody = !div.getElementsByTagName(\"tbody\").length;\r\n\r\n\t// Make sure that link elements get serialized correctly by innerHTML\r\n\t// This requires a wrapper element in IE\r\n\tsupport.htmlSerialize = !!div.getElementsByTagName(\"link\").length;\r\n\r\n\t// Get the style information from getAttribute\r\n\t// (IE uses .cssText instead)\r\n\tsupport.style = /top/.test( a.getAttribute(\"style\") );\r\n\r\n\t// Make sure that URLs aren't manipulated\r\n\t// (IE normalizes it by default)\r\n\tsupport.hrefNormalized = a.getAttribute(\"href\") === \"/a\";\r\n\r\n\t// Make sure that element opacity exists\r\n\t// (IE uses filter instead)\r\n\t// Use a regex to work around a WebKit issue. See #5145\r\n\tsupport.opacity = /^0.5/.test( a.style.opacity );\r\n\r\n\t// Verify style float existence\r\n\t// (IE uses styleFloat instead of cssFloat)\r\n\tsupport.cssFloat = !!a.style.cssFloat;\r\n\r\n\t// Check the default checkbox/radio value (\"\" on WebKit; \"on\" elsewhere)\r\n\tsupport.checkOn = !!input.value;\r\n\r\n\t// Make sure that a selected-by-default option has a working selected property.\r\n\t// (WebKit defaults to false instead of true, IE too, if it's in an optgroup)\r\n\tsupport.optSelected = opt.selected;\r\n\r\n\t// Tests for enctype support on a form (#6743)\r\n\tsupport.enctype = !!document.createElement(\"form\").enctype;\r\n\r\n\t// Makes sure cloning an html5 element does not cause problems\r\n\t// Where outerHTML is undefined, this still works\r\n\tsupport.html5Clone = document.createElement(\"nav\").cloneNode( true ).outerHTML !== \"<:nav></:nav>\";\r\n\r\n\t// Will be defined later\r\n\tsupport.inlineBlockNeedsLayout = false;\r\n\tsupport.shrinkWrapBlocks = false;\r\n\tsupport.pixelPosition = false;\r\n\tsupport.deleteExpando = true;\r\n\tsupport.noCloneEvent = true;\r\n\tsupport.reliableMarginRight = true;\r\n\tsupport.boxSizingReliable = true;\r\n\r\n\t// Make sure checked status is properly cloned\r\n\tinput.checked = true;\r\n\tsupport.noCloneChecked = input.cloneNode( true ).checked;\r\n\r\n\t// Make sure that the options inside disabled selects aren't marked as disabled\r\n\t// (WebKit marks them as disabled)\r\n\tselect.disabled = true;\r\n\tsupport.optDisabled = !opt.disabled;\r\n\r\n\t// Support: IE<9\r\n\ttry {\r\n\t\tdelete div.test;\r\n\t} catch( e ) {\r\n\t\tsupport.deleteExpando = false;\r\n\t}\r\n\r\n\t// Check if we can trust getAttribute(\"value\")\r\n\tinput = document.createElement(\"input\");\r\n\tinput.setAttribute( \"value\", \"\" );\r\n\tsupport.input = input.getAttribute( \"value\" ) === \"\";\r\n\r\n\t// Check if an input maintains its value after becoming a radio\r\n\tinput.value = \"t\";\r\n\tinput.setAttribute( \"type\", \"radio\" );\r\n\tsupport.radioValue = input.value === \"t\";\r\n\r\n\t// #11217 - WebKit loses check when the name is after the checked attribute\r\n\tinput.setAttribute( \"checked\", \"t\" );\r\n\tinput.setAttribute( \"name\", \"t\" );\r\n\r\n\tfragment = document.createDocumentFragment();\r\n\tfragment.appendChild( input );\r\n\r\n\t// Check if a disconnected checkbox will retain its checked\r\n\t// value of true after appended to the DOM (IE6/7)\r\n\tsupport.appendChecked = input.checked;\r\n\r\n\t// WebKit doesn't clone checked state correctly in fragments\r\n\tsupport.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked;\r\n\r\n\t// Support: IE<9\r\n\t// Opera does not clone events (and typeof div.attachEvent === undefined).\r\n\t// IE9-10 clones events bound via attachEvent, but they don't trigger with .click()\r\n\tif ( div.attachEvent ) {\r\n\t\tdiv.attachEvent( \"onclick\", function() {\r\n\t\t\tsupport.noCloneEvent = false;\r\n\t\t});\r\n\r\n\t\tdiv.cloneNode( true ).click();\r\n\t}\r\n\r\n\t// Support: IE<9 (lack submit/change bubble), Firefox 17+ (lack focusin event)\r\n\t// Beware of CSP restrictions (https://developer.mozilla.org/en/Security/CSP)\r\n\tfor ( i in { submit: true, change: true, focusin: true }) {\r\n\t\tdiv.setAttribute( eventName = \"on\" + i, \"t\" );\r\n\r\n\t\tsupport[ i + \"Bubbles\" ] = eventName in window || div.attributes[ eventName ].expando === false;\r\n\t}\r\n\r\n\tdiv.style.backgroundClip = \"content-box\";\r\n\tdiv.cloneNode( true ).style.backgroundClip = \"\";\r\n\tsupport.clearCloneStyle = div.style.backgroundClip === \"content-box\";\r\n\r\n\t// Support: IE<9\r\n\t// Iteration over object's inherited properties before its own.\r\n\tfor ( i in jQuery( support ) ) {\r\n\t\tbreak;\r\n\t}\r\n\tsupport.ownLast = i !== \"0\";\r\n\r\n\t// Run tests that need a body at doc ready\r\n\tjQuery(function() {\r\n\t\tvar container, marginDiv, tds,\r\n\t\t\tdivReset = \"padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;\",\r\n\t\t\tbody = document.getElementsByTagName(\"body\")[0];\r\n\r\n\t\tif ( !body ) {\r\n\t\t\t// Return for frameset docs that don't have a body\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tcontainer = document.createElement(\"div\");\r\n\t\tcontainer.style.cssText = \"border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px\";\r\n\r\n\t\tbody.appendChild( container ).appendChild( div );\r\n\r\n\t\t// Support: IE8\r\n\t\t// Check if table cells still have offsetWidth/Height when they are set\r\n\t\t// to display:none and there are still other visible table cells in a\r\n\t\t// table row; if so, offsetWidth/Height are not reliable for use when\r\n\t\t// determining if an element has been hidden directly using\r\n\t\t// display:none (it is still safe to use offsets if a parent element is\r\n\t\t// hidden; don safety goggles and see bug #4512 for more information).\r\n\t\tdiv.innerHTML = \"<table><tr><td></td><td>t</td></tr></table>\";\r\n\t\ttds = div.getElementsByTagName(\"td\");\r\n\t\ttds[ 0 ].style.cssText = \"padding:0;margin:0;border:0;display:none\";\r\n\t\tisSupported = ( tds[ 0 ].offsetHeight === 0 );\r\n\r\n\t\ttds[ 0 ].style.display = \"\";\r\n\t\ttds[ 1 ].style.display = \"none\";\r\n\r\n\t\t// Support: IE8\r\n\t\t// Check if empty table cells still have offsetWidth/Height\r\n\t\tsupport.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 );\r\n\r\n\t\t// Check box-sizing and margin behavior.\r\n\t\tdiv.innerHTML = \"\";\r\n\t\tdiv.style.cssText = \"box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;\";\r\n\r\n\t\t// Workaround failing boxSizing test due to offsetWidth returning wrong value\r\n\t\t// with some non-1 values of body zoom, ticket #13543\r\n\t\tjQuery.swap( body, body.style.zoom != null ? { zoom: 1 } : {}, function() {\r\n\t\t\tsupport.boxSizing = div.offsetWidth === 4;\r\n\t\t});\r\n\r\n\t\t// Use window.getComputedStyle because jsdom on node.js will break without it.\r\n\t\tif ( window.getComputedStyle ) {\r\n\t\t\tsupport.pixelPosition = ( window.getComputedStyle( div, null ) || {} ).top !== \"1%\";\r\n\t\t\tsupport.boxSizingReliable = ( window.getComputedStyle( div, null ) || { width: \"4px\" } ).width === \"4px\";\r\n\r\n\t\t\t// Check if div with explicit width and no margin-right incorrectly\r\n\t\t\t// gets computed margin-right based on width of container. (#3333)\r\n\t\t\t// Fails in WebKit before Feb 2011 nightlies\r\n\t\t\t// WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right\r\n\t\t\tmarginDiv = div.appendChild( document.createElement(\"div\") );\r\n\t\t\tmarginDiv.style.cssText = div.style.cssText = divReset;\r\n\t\t\tmarginDiv.style.marginRight = marginDiv.style.width = \"0\";\r\n\t\t\tdiv.style.width = \"1px\";\r\n\r\n\t\t\tsupport.reliableMarginRight =\r\n\t\t\t\t!parseFloat( ( window.getComputedStyle( marginDiv, null ) || {} ).marginRight );\r\n\t\t}\r\n\r\n\t\tif ( typeof div.style.zoom !== core_strundefined ) {\r\n\t\t\t// Support: IE<8\r\n\t\t\t// Check if natively block-level elements act like inline-block\r\n\t\t\t// elements when setting their display to 'inline' and giving\r\n\t\t\t// them layout\r\n\t\t\tdiv.innerHTML = \"\";\r\n\t\t\tdiv.style.cssText = divReset + \"width:1px;padding:1px;display:inline;zoom:1\";\r\n\t\t\tsupport.inlineBlockNeedsLayout = ( div.offsetWidth === 3 );\r\n\r\n\t\t\t// Support: IE6\r\n\t\t\t// Check if elements with layout shrink-wrap their children\r\n\t\t\tdiv.style.display = \"block\";\r\n\t\t\tdiv.innerHTML = \"<div></div>\";\r\n\t\t\tdiv.firstChild.style.width = \"5px\";\r\n\t\t\tsupport.shrinkWrapBlocks = ( div.offsetWidth !== 3 );\r\n\r\n\t\t\tif ( support.inlineBlockNeedsLayout ) {\r\n\t\t\t\t// Prevent IE 6 from affecting layout for positioned elements #11048\r\n\t\t\t\t// Prevent IE from shrinking the body in IE 7 mode #12869\r\n\t\t\t\t// Support: IE<8\r\n\t\t\t\tbody.style.zoom = 1;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tbody.removeChild( container );\r\n\r\n\t\t// Null elements to avoid leaks in IE\r\n\t\tcontainer = div = tds = marginDiv = null;\r\n\t});\r\n\r\n\t// Null elements to avoid leaks in IE\r\n\tall = select = fragment = opt = a = input = null;\r\n\r\n\treturn support;\r\n})({});\r\n\r\nvar rbrace = /(?:\\{[\\s\\S]*\\}|\\[[\\s\\S]*\\])$/,\r\n\trmultiDash = /([A-Z])/g;\r\n\r\nfunction internalData( elem, name, data, pvt /* Internal Use Only */ ){\r\n\tif ( !jQuery.acceptData( elem ) ) {\r\n\t\treturn;\r\n\t}\r\n\r\n\tvar ret, thisCache,\r\n\t\tinternalKey = jQuery.expando,\r\n\r\n\t\t// We have to handle DOM nodes and JS objects differently because IE6-7\r\n\t\t// can't GC object references properly across the DOM-JS boundary\r\n\t\tisNode = elem.nodeType,\r\n\r\n\t\t// Only DOM nodes need the global jQuery cache; JS object data is\r\n\t\t// attached directly to the object so GC can occur automatically\r\n\t\tcache = isNode ? jQuery.cache : elem,\r\n\r\n\t\t// Only defining an ID for JS objects if its cache already exists allows\r\n\t\t// the code to shortcut on the same path as a DOM node with no cache\r\n\t\tid = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey;\r\n\r\n\t// Avoid doing any more work than we need to when trying to get data on an\r\n\t// object that has no data at all\r\n\tif ( (!id || !cache[id] || (!pvt && !cache[id].data)) && data === undefined && typeof name === \"string\" ) {\r\n\t\treturn;\r\n\t}\r\n\r\n\tif ( !id ) {\r\n\t\t// Only DOM nodes need a new unique ID for each element since their data\r\n\t\t// ends up in the global cache\r\n\t\tif ( isNode ) {\r\n\t\t\tid = elem[ internalKey ] = core_deletedIds.pop() || jQuery.guid++;\r\n\t\t} else {\r\n\t\t\tid = internalKey;\r\n\t\t}\r\n\t}\r\n\r\n\tif ( !cache[ id ] ) {\r\n\t\t// Avoid exposing jQuery metadata on plain JS objects when the object\r\n\t\t// is serialized using JSON.stringify\r\n\t\tcache[ id ] = isNode ? {} : { toJSON: jQuery.noop };\r\n\t}\r\n\r\n\t// An object can be passed to jQuery.data instead of a key/value pair; this gets\r\n\t// shallow copied over onto the existing cache\r\n\tif ( typeof name === \"object\" || typeof name === \"function\" ) {\r\n\t\tif ( pvt ) {\r\n\t\t\tcache[ id ] = jQuery.extend( cache[ id ], name );\r\n\t\t} else {\r\n\t\t\tcache[ id ].data = jQuery.extend( cache[ id ].data, name );\r\n\t\t}\r\n\t}\r\n\r\n\tthisCache = cache[ id ];\r\n\r\n\t// jQuery data() is stored in a separate object inside the object's internal data\r\n\t// cache in order to avoid key collisions between internal data and user-defined\r\n\t// data.\r\n\tif ( !pvt ) {\r\n\t\tif ( !thisCache.data ) {\r\n\t\t\tthisCache.data = {};\r\n\t\t}\r\n\r\n\t\tthisCache = thisCache.data;\r\n\t}\r\n\r\n\tif ( data !== undefined ) {\r\n\t\tthisCache[ jQuery.camelCase( name ) ] = data;\r\n\t}\r\n\r\n\t// Check for both converted-to-camel and non-converted data property names\r\n\t// If a data property was specified\r\n\tif ( typeof name === \"string\" ) {\r\n\r\n\t\t// First Try to find as-is property data\r\n\t\tret = thisCache[ name ];\r\n\r\n\t\t// Test for null|undefined property data\r\n\t\tif ( ret == null ) {\r\n\r\n\t\t\t// Try to find the camelCased property\r\n\t\t\tret = thisCache[ jQuery.camelCase( name ) ];\r\n\t\t}\r\n\t} else {\r\n\t\tret = thisCache;\r\n\t}\r\n\r\n\treturn ret;\r\n}\r\n\r\nfunction internalRemoveData( elem, name, pvt ) {\r\n\tif ( !jQuery.acceptData( elem ) ) {\r\n\t\treturn;\r\n\t}\r\n\r\n\tvar thisCache, i,\r\n\t\tisNode = elem.nodeType,\r\n\r\n\t\t// See jQuery.data for more information\r\n\t\tcache = isNode ? jQuery.cache : elem,\r\n\t\tid = isNode ? elem[ jQuery.expando ] : jQuery.expando;\r\n\r\n\t// If there is already no cache entry for this object, there is no\r\n\t// purpose in continuing\r\n\tif ( !cache[ id ] ) {\r\n\t\treturn;\r\n\t}\r\n\r\n\tif ( name ) {\r\n\r\n\t\tthisCache = pvt ? cache[ id ] : cache[ id ].data;\r\n\r\n\t\tif ( thisCache ) {\r\n\r\n\t\t\t// Support array or space separated string names for data keys\r\n\t\t\tif ( !jQuery.isArray( name ) ) {\r\n\r\n\t\t\t\t// try the string as a key before any manipulation\r\n\t\t\t\tif ( name in thisCache ) {\r\n\t\t\t\t\tname = [ name ];\r\n\t\t\t\t} else {\r\n\r\n\t\t\t\t\t// split the camel cased version by spaces unless a key with the spaces exists\r\n\t\t\t\t\tname = jQuery.camelCase( name );\r\n\t\t\t\t\tif ( name in thisCache ) {\r\n\t\t\t\t\t\tname = [ name ];\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tname = name.split(\" \");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t// If \"name\" is an array of keys...\r\n\t\t\t\t// When data is initially created, via (\"key\", \"val\") signature,\r\n\t\t\t\t// keys will be converted to camelCase.\r\n\t\t\t\t// Since there is no way to tell _how_ a key was added, remove\r\n\t\t\t\t// both plain key and camelCase key. #12786\r\n\t\t\t\t// This will only penalize the array argument path.\r\n\t\t\t\tname = name.concat( jQuery.map( name, jQuery.camelCase ) );\r\n\t\t\t}\r\n\r\n\t\t\ti = name.length;\r\n\t\t\twhile ( i-- ) {\r\n\t\t\t\tdelete thisCache[ name[i] ];\r\n\t\t\t}\r\n\r\n\t\t\t// If there is no data left in the cache, we want to continue\r\n\t\t\t// and let the cache object itself get destroyed\r\n\t\t\tif ( pvt ? !isEmptyDataObject(thisCache) : !jQuery.isEmptyObject(thisCache) ) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t// See jQuery.data for more information\r\n\tif ( !pvt ) {\r\n\t\tdelete cache[ id ].data;\r\n\r\n\t\t// Don't destroy the parent cache unless the internal data object\r\n\t\t// had been the only thing left in it\r\n\t\tif ( !isEmptyDataObject( cache[ id ] ) ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t}\r\n\r\n\t// Destroy the cache\r\n\tif ( isNode ) {\r\n\t\tjQuery.cleanData( [ elem ], true );\r\n\r\n\t// Use delete when supported for expandos or `cache` is not a window per isWindow (#10080)\r\n\t/* jshint eqeqeq: false */\r\n\t} else if ( jQuery.support.deleteExpando || cache != cache.window ) {\r\n\t\t/* jshint eqeqeq: true */\r\n\t\tdelete cache[ id ];\r\n\r\n\t// When all else fails, null\r\n\t} else {\r\n\t\tcache[ id ] = null;\r\n\t}\r\n}\r\n\r\njQuery.extend({\r\n\tcache: {},\r\n\r\n\t// The following elements throw uncatchable exceptions if you\r\n\t// attempt to add expando properties to them.\r\n\tnoData: {\r\n\t\t\"applet\": true,\r\n\t\t\"embed\": true,\r\n\t\t// Ban all objects except for Flash (which handle expandos)\r\n\t\t\"object\": \"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\"\r\n\t},\r\n\r\n\thasData: function( elem ) {\r\n\t\telem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ];\r\n\t\treturn !!elem && !isEmptyDataObject( elem );\r\n\t},\r\n\r\n\tdata: function( elem, name, data ) {\r\n\t\treturn internalData( elem, name, data );\r\n\t},\r\n\r\n\tremoveData: function( elem, name ) {\r\n\t\treturn internalRemoveData( elem, name );\r\n\t},\r\n\r\n\t// For internal use only.\r\n\t_data: function( elem, name, data ) {\r\n\t\treturn internalData( elem, name, data, true );\r\n\t},\r\n\r\n\t_removeData: function( elem, name ) {\r\n\t\treturn internalRemoveData( elem, name, true );\r\n\t},\r\n\r\n\t// A method for determining if a DOM node can handle the data expando\r\n\tacceptData: function( elem ) {\r\n\t\t// Do not set data on non-element because it will not be cleared (#8335).\r\n\t\tif ( elem.nodeType && elem.nodeType !== 1 && elem.nodeType !== 9 ) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tvar noData = elem.nodeName && jQuery.noData[ elem.nodeName.toLowerCase() ];\r\n\r\n\t\t// nodes accept data unless otherwise specified; rejection can be conditional\r\n\t\treturn !noData || noData !== true && elem.getAttribute(\"classid\") === noData;\r\n\t}\r\n});\r\n\r\njQuery.fn.extend({\r\n\tdata: function( key, value ) {\r\n\t\tvar attrs, name,\r\n\t\t\tdata = null,\r\n\t\t\ti = 0,\r\n\t\t\telem = this[0];\r\n\r\n\t\t// Special expections of .data basically thwart jQuery.access,\r\n\t\t// so implement the relevant behavior ourselves\r\n\r\n\t\t// Gets all values\r\n\t\tif ( key === undefined ) {\r\n\t\t\tif ( this.length ) {\r\n\t\t\t\tdata = jQuery.data( elem );\r\n\r\n\t\t\t\tif ( elem.nodeType === 1 && !jQuery._data( elem, \"parsedAttrs\" ) ) {\r\n\t\t\t\t\tattrs = elem.attributes;\r\n\t\t\t\t\tfor ( ; i < attrs.length; i++ ) {\r\n\t\t\t\t\t\tname = attrs[i].name;\r\n\r\n\t\t\t\t\t\tif ( name.indexOf(\"data-\") === 0 ) {\r\n\t\t\t\t\t\t\tname = jQuery.camelCase( name.slice(5) );\r\n\r\n\t\t\t\t\t\t\tdataAttr( elem, name, data[ name ] );\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tjQuery._data( elem, \"parsedAttrs\", true );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn data;\r\n\t\t}\r\n\r\n\t\t// Sets multiple values\r\n\t\tif ( typeof key === \"object\" ) {\r\n\t\t\treturn this.each(function() {\r\n\t\t\t\tjQuery.data( this, key );\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn arguments.length > 1 ?\r\n\r\n\t\t\t// Sets one value\r\n\t\t\tthis.each(function() {\r\n\t\t\t\tjQuery.data( this, key, value );\r\n\t\t\t}) :\r\n\r\n\t\t\t// Gets one value\r\n\t\t\t// Try to fetch any internally stored data first\r\n\t\t\telem ? dataAttr( elem, key, jQuery.data( elem, key ) ) : null;\r\n\t},\r\n\r\n\tremoveData: function( key ) {\r\n\t\treturn this.each(function() {\r\n\t\t\tjQuery.removeData( this, key );\r\n\t\t});\r\n\t}\r\n});\r\n\r\nfunction dataAttr( elem, key, data ) {\r\n\t// If nothing was found internally, try to fetch any\r\n\t// data from the HTML5 data-* attribute\r\n\tif ( data === undefined && elem.nodeType === 1 ) {\r\n\r\n\t\tvar name = \"data-\" + key.replace( rmultiDash, \"-$1\" ).toLowerCase();\r\n\r\n\t\tdata = elem.getAttribute( name );\r\n\r\n\t\tif ( typeof data === \"string\" ) {\r\n\t\t\ttry {\r\n\t\t\t\tdata = data === \"true\" ? true :\r\n\t\t\t\t\tdata === \"false\" ? false :\r\n\t\t\t\t\tdata === \"null\" ? null :\r\n\t\t\t\t\t// Only convert to a number if it doesn't change the string\r\n\t\t\t\t\t+data + \"\" === data ? +data :\r\n\t\t\t\t\trbrace.test( data ) ? jQuery.parseJSON( data ) :\r\n\t\t\t\t\t\tdata;\r\n\t\t\t} catch( e ) {}\r\n\r\n\t\t\t// Make sure we set the data so it isn't changed later\r\n\t\t\tjQuery.data( elem, key, data );\r\n\r\n\t\t} else {\r\n\t\t\tdata = undefined;\r\n\t\t}\r\n\t}\r\n\r\n\treturn data;\r\n}\r\n\r\n// checks a cache object for emptiness\r\nfunction isEmptyDataObject( obj ) {\r\n\tvar name;\r\n\tfor ( name in obj ) {\r\n\r\n\t\t// if the public data object is empty, the private is still empty\r\n\t\tif ( name === \"data\" && jQuery.isEmptyObject( obj[name] ) ) {\r\n\t\t\tcontinue;\r\n\t\t}\r\n\t\tif ( name !== \"toJSON\" ) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\treturn true;\r\n}\r\njQuery.extend({\r\n\tqueue: function( elem, type, data ) {\r\n\t\tvar queue;\r\n\r\n\t\tif ( elem ) {\r\n\t\t\ttype = ( type || \"fx\" ) + \"queue\";\r\n\t\t\tqueue = jQuery._data( elem, type );\r\n\r\n\t\t\t// Speed up dequeue by getting out quickly if this is just a lookup\r\n\t\t\tif ( data ) {\r\n\t\t\t\tif ( !queue || jQuery.isArray(data) ) {\r\n\t\t\t\t\tqueue = jQuery._data( elem, type, jQuery.makeArray(data) );\r\n\t\t\t\t} else {\r\n\t\t\t\t\tqueue.push( data );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn queue || [];\r\n\t\t}\r\n\t},\r\n\r\n\tdequeue: function( elem, type ) {\r\n\t\ttype = type || \"fx\";\r\n\r\n\t\tvar queue = jQuery.queue( elem, type ),\r\n\t\t\tstartLength = queue.length,\r\n\t\t\tfn = queue.shift(),\r\n\t\t\thooks = jQuery._queueHooks( elem, type ),\r\n\t\t\tnext = function() {\r\n\t\t\t\tjQuery.dequeue( elem, type );\r\n\t\t\t};\r\n\r\n\t\t// If the fx queue is dequeued, always remove the progress sentinel\r\n\t\tif ( fn === \"inprogress\" ) {\r\n\t\t\tfn = queue.shift();\r\n\t\t\tstartLength--;\r\n\t\t}\r\n\r\n\t\tif ( fn ) {\r\n\r\n\t\t\t// Add a progress sentinel to prevent the fx queue from being\r\n\t\t\t// automatically dequeued\r\n\t\t\tif ( type === \"fx\" ) {\r\n\t\t\t\tqueue.unshift( \"inprogress\" );\r\n\t\t\t}\r\n\r\n\t\t\t// clear up the last queue stop function\r\n\t\t\tdelete hooks.stop;\r\n\t\t\tfn.call( elem, next, hooks );\r\n\t\t}\r\n\r\n\t\tif ( !startLength && hooks ) {\r\n\t\t\thooks.empty.fire();\r\n\t\t}\r\n\t},\r\n\r\n\t// not intended for public consumption - generates a queueHooks object, or returns the current one\r\n\t_queueHooks: function( elem, type ) {\r\n\t\tvar key = type + \"queueHooks\";\r\n\t\treturn jQuery._data( elem, key ) || jQuery._data( elem, key, {\r\n\t\t\tempty: jQuery.Callbacks(\"once memory\").add(function() {\r\n\t\t\t\tjQuery._removeData( elem, type + \"queue\" );\r\n\t\t\t\tjQuery._removeData( elem, key );\r\n\t\t\t})\r\n\t\t});\r\n\t}\r\n});\r\n\r\njQuery.fn.extend({\r\n\tqueue: function( type, data ) {\r\n\t\tvar setter = 2;\r\n\r\n\t\tif ( typeof type !== \"string\" ) {\r\n\t\t\tdata = type;\r\n\t\t\ttype = \"fx\";\r\n\t\t\tsetter--;\r\n\t\t}\r\n\r\n\t\tif ( arguments.length < setter ) {\r\n\t\t\treturn jQuery.queue( this[0], type );\r\n\t\t}\r\n\r\n\t\treturn data === undefined ?\r\n\t\t\tthis :\r\n\t\t\tthis.each(function() {\r\n\t\t\t\tvar queue = jQuery.queue( this, type, data );\r\n\r\n\t\t\t\t// ensure a hooks for this queue\r\n\t\t\t\tjQuery._queueHooks( this, type );\r\n\r\n\t\t\t\tif ( type === \"fx\" && queue[0] !== \"inprogress\" ) {\r\n\t\t\t\t\tjQuery.dequeue( this, type );\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t},\r\n\tdequeue: function( type ) {\r\n\t\treturn this.each(function() {\r\n\t\t\tjQuery.dequeue( this, type );\r\n\t\t});\r\n\t},\r\n\t// Based off of the plugin by Clint Helfers, with permission.\r\n\t// http://blindsignals.com/index.php/2009/07/jquery-delay/\r\n\tdelay: function( time, type ) {\r\n\t\ttime = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;\r\n\t\ttype = type || \"fx\";\r\n\r\n\t\treturn this.queue( type, function( next, hooks ) {\r\n\t\t\tvar timeout = setTimeout( next, time );\r\n\t\t\thooks.stop = function() {\r\n\t\t\t\tclearTimeout( timeout );\r\n\t\t\t};\r\n\t\t});\r\n\t},\r\n\tclearQueue: function( type ) {\r\n\t\treturn this.queue( type || \"fx\", [] );\r\n\t},\r\n\t// Get a promise resolved when queues of a certain type\r\n\t// are emptied (fx is the type by default)\r\n\tpromise: function( type, obj ) {\r\n\t\tvar tmp,\r\n\t\t\tcount = 1,\r\n\t\t\tdefer = jQuery.Deferred(),\r\n\t\t\telements = this,\r\n\t\t\ti = this.length,\r\n\t\t\tresolve = function() {\r\n\t\t\t\tif ( !( --count ) ) {\r\n\t\t\t\t\tdefer.resolveWith( elements, [ elements ] );\r\n\t\t\t\t}\r\n\t\t\t};\r\n\r\n\t\tif ( typeof type !== \"string\" ) {\r\n\t\t\tobj = type;\r\n\t\t\ttype = undefined;\r\n\t\t}\r\n\t\ttype = type || \"fx\";\r\n\r\n\t\twhile( i-- ) {\r\n\t\t\ttmp = jQuery._data( elements[ i ], type + \"queueHooks\" );\r\n\t\t\tif ( tmp && tmp.empty ) {\r\n\t\t\t\tcount++;\r\n\t\t\t\ttmp.empty.add( resolve );\r\n\t\t\t}\r\n\t\t}\r\n\t\tresolve();\r\n\t\treturn defer.promise( obj );\r\n\t}\r\n});\r\nvar nodeHook, boolHook,\r\n\trclass = /[\\t\\r\\n\\f]/g,\r\n\trreturn = /\\r/g,\r\n\trfocusable = /^(?:input|select|textarea|button|object)$/i,\r\n\trclickable = /^(?:a|area)$/i,\r\n\truseDefault = /^(?:checked|selected)$/i,\r\n\tgetSetAttribute = jQuery.support.getSetAttribute,\r\n\tgetSetInput = jQuery.support.input;\r\n\r\njQuery.fn.extend({\r\n\tattr: function( name, value ) {\r\n\t\treturn jQuery.access( this, jQuery.attr, name, value, arguments.length > 1 );\r\n\t},\r\n\r\n\tremoveAttr: function( name ) {\r\n\t\treturn this.each(function() {\r\n\t\t\tjQuery.removeAttr( this, name );\r\n\t\t});\r\n\t},\r\n\r\n\tprop: function( name, value ) {\r\n\t\treturn jQuery.access( this, jQuery.prop, name, value, arguments.length > 1 );\r\n\t},\r\n\r\n\tremoveProp: function( name ) {\r\n\t\tname = jQuery.propFix[ name ] || name;\r\n\t\treturn this.each(function() {\r\n\t\t\t// try/catch handles cases where IE balks (such as removing a property on window)\r\n\t\t\ttry {\r\n\t\t\t\tthis[ name ] = undefined;\r\n\t\t\t\tdelete this[ name ];\r\n\t\t\t} catch( e ) {}\r\n\t\t});\r\n\t},\r\n\r\n\taddClass: function( value ) {\r\n\t\tvar classes, elem, cur, clazz, j,\r\n\t\t\ti = 0,\r\n\t\t\tlen = this.length,\r\n\t\t\tproceed = typeof value === \"string\" && value;\r\n\r\n\t\tif ( jQuery.isFunction( value ) ) {\r\n\t\t\treturn this.each(function( j ) {\r\n\t\t\t\tjQuery( this ).addClass( value.call( this, j, this.className ) );\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tif ( proceed ) {\r\n\t\t\t// The disjunction here is for better compressibility (see removeClass)\r\n\t\t\tclasses = ( value || \"\" ).match( core_rnotwhite ) || [];\r\n\r\n\t\t\tfor ( ; i < len; i++ ) {\r\n\t\t\t\telem = this[ i ];\r\n\t\t\t\tcur = elem.nodeType === 1 && ( elem.className ?\r\n\t\t\t\t\t( \" \" + elem.className + \" \" ).replace( rclass, \" \" ) :\r\n\t\t\t\t\t\" \"\r\n\t\t\t\t);\r\n\r\n\t\t\t\tif ( cur ) {\r\n\t\t\t\t\tj = 0;\r\n\t\t\t\t\twhile ( (clazz = classes[j++]) ) {\r\n\t\t\t\t\t\tif ( cur.indexOf( \" \" + clazz + \" \" ) < 0 ) {\r\n\t\t\t\t\t\t\tcur += clazz + \" \";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telem.className = jQuery.trim( cur );\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\tremoveClass: function( value ) {\r\n\t\tvar classes, elem, cur, clazz, j,\r\n\t\t\ti = 0,\r\n\t\t\tlen = this.length,\r\n\t\t\tproceed = arguments.length === 0 || typeof value === \"string\" && value;\r\n\r\n\t\tif ( jQuery.isFunction( value ) ) {\r\n\t\t\treturn this.each(function( j ) {\r\n\t\t\t\tjQuery( this ).removeClass( value.call( this, j, this.className ) );\r\n\t\t\t});\r\n\t\t}\r\n\t\tif ( proceed ) {\r\n\t\t\tclasses = ( value || \"\" ).match( core_rnotwhite ) || [];\r\n\r\n\t\t\tfor ( ; i < len; i++ ) {\r\n\t\t\t\telem = this[ i ];\r\n\t\t\t\t// This expression is here for better compressibility (see addClass)\r\n\t\t\t\tcur = elem.nodeType === 1 && ( elem.className ?\r\n\t\t\t\t\t( \" \" + elem.className + \" \" ).replace( rclass, \" \" ) :\r\n\t\t\t\t\t\"\"\r\n\t\t\t\t);\r\n\r\n\t\t\t\tif ( cur ) {\r\n\t\t\t\t\tj = 0;\r\n\t\t\t\t\twhile ( (clazz = classes[j++]) ) {\r\n\t\t\t\t\t\t// Remove *all* instances\r\n\t\t\t\t\t\twhile ( cur.indexOf( \" \" + clazz + \" \" ) >= 0 ) {\r\n\t\t\t\t\t\t\tcur = cur.replace( \" \" + clazz + \" \", \" \" );\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telem.className = value ? jQuery.trim( cur ) : \"\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\ttoggleClass: function( value, stateVal ) {\r\n\t\tvar type = typeof value;\r\n\r\n\t\tif ( typeof stateVal === \"boolean\" && type === \"string\" ) {\r\n\t\t\treturn stateVal ? this.addClass( value ) : this.removeClass( value );\r\n\t\t}\r\n\r\n\t\tif ( jQuery.isFunction( value ) ) {\r\n\t\t\treturn this.each(function( i ) {\r\n\t\t\t\tjQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal );\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn this.each(function() {\r\n\t\t\tif ( type === \"string\" ) {\r\n\t\t\t\t// toggle individual class names\r\n\t\t\t\tvar className,\r\n\t\t\t\t\ti = 0,\r\n\t\t\t\t\tself = jQuery( this ),\r\n\t\t\t\t\tclassNames = value.match( core_rnotwhite ) || [];\r\n\r\n\t\t\t\twhile ( (className = classNames[ i++ ]) ) {\r\n\t\t\t\t\t// check each className given, space separated list\r\n\t\t\t\t\tif ( self.hasClass( className ) ) {\r\n\t\t\t\t\t\tself.removeClass( className );\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tself.addClass( className );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t// Toggle whole class name\r\n\t\t\t} else if ( type === core_strundefined || type === \"boolean\" ) {\r\n\t\t\t\tif ( this.className ) {\r\n\t\t\t\t\t// store className if set\r\n\t\t\t\t\tjQuery._data( this, \"__className__\", this.className );\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// If the element has a class name or if we're passed \"false\",\r\n\t\t\t\t// then remove the whole classname (if there was one, the above saved it).\r\n\t\t\t\t// Otherwise bring back whatever was previously saved (if anything),\r\n\t\t\t\t// falling back to the empty string if nothing was stored.\r\n\t\t\t\tthis.className = this.className || value === false ? \"\" : jQuery._data( this, \"__className__\" ) || \"\";\r\n\t\t\t}\r\n\t\t});\r\n\t},\r\n\r\n\thasClass: function( selector ) {\r\n\t\tvar className = \" \" + selector + \" \",\r\n\t\t\ti = 0,\r\n\t\t\tl = this.length;\r\n\t\tfor ( ; i < l; i++ ) {\r\n\t\t\tif ( this[i].nodeType === 1 && (\" \" + this[i].className + \" \").replace(rclass, \" \").indexOf( className ) >= 0 ) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t},\r\n\r\n\tval: function( value ) {\r\n\t\tvar ret, hooks, isFunction,\r\n\t\t\telem = this[0];\r\n\r\n\t\tif ( !arguments.length ) {\r\n\t\t\tif ( elem ) {\r\n\t\t\t\thooks = jQuery.valHooks[ elem.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase() ];\r\n\r\n\t\t\t\tif ( hooks && \"get\" in hooks && (ret = hooks.get( elem, \"value\" )) !== undefined ) {\r\n\t\t\t\t\treturn ret;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tret = elem.value;\r\n\r\n\t\t\t\treturn typeof ret === \"string\" ?\r\n\t\t\t\t\t// handle most common string cases\r\n\t\t\t\t\tret.replace(rreturn, \"\") :\r\n\t\t\t\t\t// handle cases where value is null/undef or number\r\n\t\t\t\t\tret == null ? \"\" : ret;\r\n\t\t\t}\r\n\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tisFunction = jQuery.isFunction( value );\r\n\r\n\t\treturn this.each(function( i ) {\r\n\t\t\tvar val;\r\n\r\n\t\t\tif ( this.nodeType !== 1 ) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tif ( isFunction ) {\r\n\t\t\t\tval = value.call( this, i, jQuery( this ).val() );\r\n\t\t\t} else {\r\n\t\t\t\tval = value;\r\n\t\t\t}\r\n\r\n\t\t\t// Treat null/undefined as \"\"; convert numbers to string\r\n\t\t\tif ( val == null ) {\r\n\t\t\t\tval = \"\";\r\n\t\t\t} else if ( typeof val === \"number\" ) {\r\n\t\t\t\tval += \"\";\r\n\t\t\t} else if ( jQuery.isArray( val ) ) {\r\n\t\t\t\tval = jQuery.map(val, function ( value ) {\r\n\t\t\t\t\treturn value == null ? \"\" : value + \"\";\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\thooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];\r\n\r\n\t\t\t// If set returns undefined, fall back to normal setting\r\n\t\t\tif ( !hooks || !(\"set\" in hooks) || hooks.set( this, val, \"value\" ) === undefined ) {\r\n\t\t\t\tthis.value = val;\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n});\r\n\r\njQuery.extend({\r\n\tvalHooks: {\r\n\t\toption: {\r\n\t\t\tget: function( elem ) {\r\n\t\t\t\t// Use proper attribute retrieval(#6932, #12072)\r\n\t\t\t\tvar val = jQuery.find.attr( elem, \"value\" );\r\n\t\t\t\treturn val != null ?\r\n\t\t\t\t\tval :\r\n\t\t\t\t\telem.text;\r\n\t\t\t}\r\n\t\t},\r\n\t\tselect: {\r\n\t\t\tget: function( elem ) {\r\n\t\t\t\tvar value, option,\r\n\t\t\t\t\toptions = elem.options,\r\n\t\t\t\t\tindex = elem.selectedIndex,\r\n\t\t\t\t\tone = elem.type === \"select-one\" || index < 0,\r\n\t\t\t\t\tvalues = one ? null : [],\r\n\t\t\t\t\tmax = one ? index + 1 : options.length,\r\n\t\t\t\t\ti = index < 0 ?\r\n\t\t\t\t\t\tmax :\r\n\t\t\t\t\t\tone ? index : 0;\r\n\r\n\t\t\t\t// Loop through all the selected options\r\n\t\t\t\tfor ( ; i < max; i++ ) {\r\n\t\t\t\t\toption = options[ i ];\r\n\r\n\t\t\t\t\t// oldIE doesn't update selected after form reset (#2551)\r\n\t\t\t\t\tif ( ( option.selected || i === index ) &&\r\n\t\t\t\t\t\t\t// Don't return options that are disabled or in a disabled optgroup\r\n\t\t\t\t\t\t\t( jQuery.support.optDisabled ? !option.disabled : option.getAttribute(\"disabled\") === null ) &&\r\n\t\t\t\t\t\t\t( !option.parentNode.disabled || !jQuery.nodeName( option.parentNode, \"optgroup\" ) ) ) {\r\n\r\n\t\t\t\t\t\t// Get the specific value for the option\r\n\t\t\t\t\t\tvalue = jQuery( option ).val();\r\n\r\n\t\t\t\t\t\t// We don't need an array for one selects\r\n\t\t\t\t\t\tif ( one ) {\r\n\t\t\t\t\t\t\treturn value;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t// Multi-Selects return an array\r\n\t\t\t\t\t\tvalues.push( value );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn values;\r\n\t\t\t},\r\n\r\n\t\t\tset: function( elem, value ) {\r\n\t\t\t\tvar optionSet, option,\r\n\t\t\t\t\toptions = elem.options,\r\n\t\t\t\t\tvalues = jQuery.makeArray( value ),\r\n\t\t\t\t\ti = options.length;\r\n\r\n\t\t\t\twhile ( i-- ) {\r\n\t\t\t\t\toption = options[ i ];\r\n\t\t\t\t\tif ( (option.selected = jQuery.inArray( jQuery(option).val(), values ) >= 0) ) {\r\n\t\t\t\t\t\toptionSet = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// force browsers to behave consistently when non-matching value is set\r\n\t\t\t\tif ( !optionSet ) {\r\n\t\t\t\t\telem.selectedIndex = -1;\r\n\t\t\t\t}\r\n\t\t\t\treturn values;\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\tattr: function( elem, name, value ) {\r\n\t\tvar hooks, ret,\r\n\t\t\tnType = elem.nodeType;\r\n\r\n\t\t// don't get/set attributes on text, comment and attribute nodes\r\n\t\tif ( !elem || nType === 3 || nType === 8 || nType === 2 ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// Fallback to prop when attributes are not supported\r\n\t\tif ( typeof elem.getAttribute === core_strundefined ) {\r\n\t\t\treturn jQuery.prop( elem, name, value );\r\n\t\t}\r\n\r\n\t\t// All attributes are lowercase\r\n\t\t// Grab necessary hook if one is defined\r\n\t\tif ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {\r\n\t\t\tname = name.toLowerCase();\r\n\t\t\thooks = jQuery.attrHooks[ name ] ||\r\n\t\t\t\t( jQuery.expr.match.bool.test( name ) ? boolHook : nodeHook );\r\n\t\t}\r\n\r\n\t\tif ( value !== undefined ) {\r\n\r\n\t\t\tif ( value === null ) {\r\n\t\t\t\tjQuery.removeAttr( elem, name );\r\n\r\n\t\t\t} else if ( hooks && \"set\" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) {\r\n\t\t\t\treturn ret;\r\n\r\n\t\t\t} else {\r\n\t\t\t\telem.setAttribute( name, value + \"\" );\r\n\t\t\t\treturn value;\r\n\t\t\t}\r\n\r\n\t\t} else if ( hooks && \"get\" in hooks && (ret = hooks.get( elem, name )) !== null ) {\r\n\t\t\treturn ret;\r\n\r\n\t\t} else {\r\n\t\t\tret = jQuery.find.attr( elem, name );\r\n\r\n\t\t\t// Non-existent attributes return null, we normalize to undefined\r\n\t\t\treturn ret == null ?\r\n\t\t\t\tundefined :\r\n\t\t\t\tret;\r\n\t\t}\r\n\t},\r\n\r\n\tremoveAttr: function( elem, value ) {\r\n\t\tvar name, propName,\r\n\t\t\ti = 0,\r\n\t\t\tattrNames = value && value.match( core_rnotwhite );\r\n\r\n\t\tif ( attrNames && elem.nodeType === 1 ) {\r\n\t\t\twhile ( (name = attrNames[i++]) ) {\r\n\t\t\t\tpropName = jQuery.propFix[ name ] || name;\r\n\r\n\t\t\t\t// Boolean attributes get special treatment (#10870)\r\n\t\t\t\tif ( jQuery.expr.match.bool.test( name ) ) {\r\n\t\t\t\t\t// Set corresponding property to false\r\n\t\t\t\t\tif ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) {\r\n\t\t\t\t\t\telem[ propName ] = false;\r\n\t\t\t\t\t// Support: IE<9\r\n\t\t\t\t\t// Also clear defaultChecked/defaultSelected (if appropriate)\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\telem[ jQuery.camelCase( \"default-\" + name ) ] =\r\n\t\t\t\t\t\t\telem[ propName ] = false;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t// See #9699 for explanation of this approach (setting first, then removal)\r\n\t\t\t\t} else {\r\n\t\t\t\t\tjQuery.attr( elem, name, \"\" );\r\n\t\t\t\t}\r\n\r\n\t\t\t\telem.removeAttribute( getSetAttribute ? name : propName );\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\tattrHooks: {\r\n\t\ttype: {\r\n\t\t\tset: function( elem, value ) {\r\n\t\t\t\tif ( !jQuery.support.radioValue && value === \"radio\" && jQuery.nodeName(elem, \"input\") ) {\r\n\t\t\t\t\t// Setting the type on a radio button after the value resets the value in IE6-9\r\n\t\t\t\t\t// Reset value to default in case type is set after value during creation\r\n\t\t\t\t\tvar val = elem.value;\r\n\t\t\t\t\telem.setAttribute( \"type\", value );\r\n\t\t\t\t\tif ( val ) {\r\n\t\t\t\t\t\telem.value = val;\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn value;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\tpropFix: {\r\n\t\t\"for\": \"htmlFor\",\r\n\t\t\"class\": \"className\"\r\n\t},\r\n\r\n\tprop: function( elem, name, value ) {\r\n\t\tvar ret, hooks, notxml,\r\n\t\t\tnType = elem.nodeType;\r\n\r\n\t\t// don't get/set properties on text, comment and attribute nodes\r\n\t\tif ( !elem || nType === 3 || nType === 8 || nType === 2 ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tnotxml = nType !== 1 || !jQuery.isXMLDoc( elem );\r\n\r\n\t\tif ( notxml ) {\r\n\t\t\t// Fix name and attach hooks\r\n\t\t\tname = jQuery.propFix[ name ] || name;\r\n\t\t\thooks = jQuery.propHooks[ name ];\r\n\t\t}\r\n\r\n\t\tif ( value !== undefined ) {\r\n\t\t\treturn hooks && \"set\" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ?\r\n\t\t\t\tret :\r\n\t\t\t\t( elem[ name ] = value );\r\n\r\n\t\t} else {\r\n\t\t\treturn hooks && \"get\" in hooks && (ret = hooks.get( elem, name )) !== null ?\r\n\t\t\t\tret :\r\n\t\t\t\telem[ name ];\r\n\t\t}\r\n\t},\r\n\r\n\tpropHooks: {\r\n\t\ttabIndex: {\r\n\t\t\tget: function( elem ) {\r\n\t\t\t\t// elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set\r\n\t\t\t\t// http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/\r\n\t\t\t\t// Use proper attribute retrieval(#12072)\r\n\t\t\t\tvar tabindex = jQuery.find.attr( elem, \"tabindex\" );\r\n\r\n\t\t\t\treturn tabindex ?\r\n\t\t\t\t\tparseInt( tabindex, 10 ) :\r\n\t\t\t\t\trfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ?\r\n\t\t\t\t\t\t0 :\r\n\t\t\t\t\t\t-1;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n});\r\n\r\n// Hooks for boolean attributes\r\nboolHook = {\r\n\tset: function( elem, value, name ) {\r\n\t\tif ( value === false ) {\r\n\t\t\t// Remove boolean attributes when set to false\r\n\t\t\tjQuery.removeAttr( elem, name );\r\n\t\t} else if ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) {\r\n\t\t\t// IE<8 needs the *property* name\r\n\t\t\telem.setAttribute( !getSetAttribute && jQuery.propFix[ name ] || name, name );\r\n\r\n\t\t// Use defaultChecked and defaultSelected for oldIE\r\n\t\t} else {\r\n\t\t\telem[ jQuery.camelCase( \"default-\" + name ) ] = elem[ name ] = true;\r\n\t\t}\r\n\r\n\t\treturn name;\r\n\t}\r\n};\r\njQuery.each( jQuery.expr.match.bool.source.match( /\\w+/g ), function( i, name ) {\r\n\tvar getter = jQuery.expr.attrHandle[ name ] || jQuery.find.attr;\r\n\r\n\tjQuery.expr.attrHandle[ name ] = getSetInput && getSetAttribute || !ruseDefault.test( name ) ?\r\n\t\tfunction( elem, name, isXML ) {\r\n\t\t\tvar fn = jQuery.expr.attrHandle[ name ],\r\n\t\t\t\tret = isXML ?\r\n\t\t\t\t\tundefined :\r\n\t\t\t\t\t/* jshint eqeqeq: false */\r\n\t\t\t\t\t(jQuery.expr.attrHandle[ name ] = undefined) !=\r\n\t\t\t\t\t\tgetter( elem, name, isXML ) ?\r\n\r\n\t\t\t\t\t\tname.toLowerCase() :\r\n\t\t\t\t\t\tnull;\r\n\t\t\tjQuery.expr.attrHandle[ name ] = fn;\r\n\t\t\treturn ret;\r\n\t\t} :\r\n\t\tfunction( elem, name, isXML ) {\r\n\t\t\treturn isXML ?\r\n\t\t\t\tundefined :\r\n\t\t\t\telem[ jQuery.camelCase( \"default-\" + name ) ] ?\r\n\t\t\t\t\tname.toLowerCase() :\r\n\t\t\t\t\tnull;\r\n\t\t};\r\n});\r\n\r\n// fix oldIE attroperties\r\nif ( !getSetInput || !getSetAttribute ) {\r\n\tjQuery.attrHooks.value = {\r\n\t\tset: function( elem, value, name ) {\r\n\t\t\tif ( jQuery.nodeName( elem, \"input\" ) ) {\r\n\t\t\t\t// Does not return so that setAttribute is also used\r\n\t\t\t\telem.defaultValue = value;\r\n\t\t\t} else {\r\n\t\t\t\t// Use nodeHook if defined (#1954); otherwise setAttribute is fine\r\n\t\t\t\treturn nodeHook && nodeHook.set( elem, value, name );\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n}\r\n\r\n// IE6/7 do not support getting/setting some attributes with get/setAttribute\r\nif ( !getSetAttribute ) {\r\n\r\n\t// Use this for any attribute in IE6/7\r\n\t// This fixes almost every IE6/7 issue\r\n\tnodeHook = {\r\n\t\tset: function( elem, value, name ) {\r\n\t\t\t// Set the existing or create a new attribute node\r\n\t\t\tvar ret = elem.getAttributeNode( name );\r\n\t\t\tif ( !ret ) {\r\n\t\t\t\telem.setAttributeNode(\r\n\t\t\t\t\t(ret = elem.ownerDocument.createAttribute( name ))\r\n\t\t\t\t);\r\n\t\t\t}\r\n\r\n\t\t\tret.value = value += \"\";\r\n\r\n\t\t\t// Break association with cloned elements by also using setAttribute (#9646)\r\n\t\t\treturn name === \"value\" || value === elem.getAttribute( name ) ?\r\n\t\t\t\tvalue :\r\n\t\t\t\tundefined;\r\n\t\t}\r\n\t};\r\n\tjQuery.expr.attrHandle.id = jQuery.expr.attrHandle.name = jQuery.expr.attrHandle.coords =\r\n\t\t// Some attributes are constructed with empty-string values when not defined\r\n\t\tfunction( elem, name, isXML ) {\r\n\t\t\tvar ret;\r\n\t\t\treturn isXML ?\r\n\t\t\t\tundefined :\r\n\t\t\t\t(ret = elem.getAttributeNode( name )) && ret.value !== \"\" ?\r\n\t\t\t\t\tret.value :\r\n\t\t\t\t\tnull;\r\n\t\t};\r\n\tjQuery.valHooks.button = {\r\n\t\tget: function( elem, name ) {\r\n\t\t\tvar ret = elem.getAttributeNode( name );\r\n\t\t\treturn ret && ret.specified ?\r\n\t\t\t\tret.value :\r\n\t\t\t\tundefined;\r\n\t\t},\r\n\t\tset: nodeHook.set\r\n\t};\r\n\r\n\t// Set contenteditable to false on removals(#10429)\r\n\t// Setting to empty string throws an error as an invalid value\r\n\tjQuery.attrHooks.contenteditable = {\r\n\t\tset: function( elem, value, name ) {\r\n\t\t\tnodeHook.set( elem, value === \"\" ? false : value, name );\r\n\t\t}\r\n\t};\r\n\r\n\t// Set width and height to auto instead of 0 on empty string( Bug #8150 )\r\n\t// This is for removals\r\n\tjQuery.each([ \"width\", \"height\" ], function( i, name ) {\r\n\t\tjQuery.attrHooks[ name ] = {\r\n\t\t\tset: function( elem, value ) {\r\n\t\t\t\tif ( value === \"\" ) {\r\n\t\t\t\t\telem.setAttribute( name, \"auto\" );\r\n\t\t\t\t\treturn value;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\t});\r\n}\r\n\r\n\r\n// Some attributes require a special call on IE\r\n// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx\r\nif ( !jQuery.support.hrefNormalized ) {\r\n\t// href/src property should get the full normalized URL (#10299/#12915)\r\n\tjQuery.each([ \"href\", \"src\" ], function( i, name ) {\r\n\t\tjQuery.propHooks[ name ] = {\r\n\t\t\tget: function( elem ) {\r\n\t\t\t\treturn elem.getAttribute( name, 4 );\r\n\t\t\t}\r\n\t\t};\r\n\t});\r\n}\r\n\r\nif ( !jQuery.support.style ) {\r\n\tjQuery.attrHooks.style = {\r\n\t\tget: function( elem ) {\r\n\t\t\t// Return undefined in the case of empty string\r\n\t\t\t// Note: IE uppercases css property names, but if we were to .toLowerCase()\r\n\t\t\t// .cssText, that would destroy case senstitivity in URL's, like in \"background\"\r\n\t\t\treturn elem.style.cssText || undefined;\r\n\t\t},\r\n\t\tset: function( elem, value ) {\r\n\t\t\treturn ( elem.style.cssText = value + \"\" );\r\n\t\t}\r\n\t};\r\n}\r\n\r\n// Safari mis-reports the default selected property of an option\r\n// Accessing the parent's selectedIndex property fixes it\r\nif ( !jQuery.support.optSelected ) {\r\n\tjQuery.propHooks.selected = {\r\n\t\tget: function( elem ) {\r\n\t\t\tvar parent = elem.parentNode;\r\n\r\n\t\t\tif ( parent ) {\r\n\t\t\t\tparent.selectedIndex;\r\n\r\n\t\t\t\t// Make sure that it also works with optgroups, see #5701\r\n\t\t\t\tif ( parent.parentNode ) {\r\n\t\t\t\t\tparent.parentNode.selectedIndex;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn null;\r\n\t\t}\r\n\t};\r\n}\r\n\r\njQuery.each([\r\n\t\"tabIndex\",\r\n\t\"readOnly\",\r\n\t\"maxLength\",\r\n\t\"cellSpacing\",\r\n\t\"cellPadding\",\r\n\t\"rowSpan\",\r\n\t\"colSpan\",\r\n\t\"useMap\",\r\n\t\"frameBorder\",\r\n\t\"contentEditable\"\r\n], function() {\r\n\tjQuery.propFix[ this.toLowerCase() ] = this;\r\n});\r\n\r\n// IE6/7 call enctype encoding\r\nif ( !jQuery.support.enctype ) {\r\n\tjQuery.propFix.enctype = \"encoding\";\r\n}\r\n\r\n// Radios and checkboxes getter/setter\r\njQuery.each([ \"radio\", \"checkbox\" ], function() {\r\n\tjQuery.valHooks[ this ] = {\r\n\t\tset: function( elem, value ) {\r\n\t\t\tif ( jQuery.isArray( value ) ) {\r\n\t\t\t\treturn ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 );\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\tif ( !jQuery.support.checkOn ) {\r\n\t\tjQuery.valHooks[ this ].get = function( elem ) {\r\n\t\t\t// Support: Webkit\r\n\t\t\t// \"\" is returned instead of \"on\" if a value isn't specified\r\n\t\t\treturn elem.getAttribute(\"value\") === null ? \"on\" : elem.value;\r\n\t\t};\r\n\t}\r\n});\r\nvar rformElems = /^(?:input|select|textarea)$/i,\r\n\trkeyEvent = /^key/,\r\n\trmouseEvent = /^(?:mouse|contextmenu)|click/,\r\n\trfocusMorph = /^(?:focusinfocus|focusoutblur)$/,\r\n\trtypenamespace = /^([^.]*)(?:\\.(.+)|)$/;\r\n\r\nfunction returnTrue() {\r\n\treturn true;\r\n}\r\n\r\nfunction returnFalse() {\r\n\treturn false;\r\n}\r\n\r\nfunction safeActiveElement() {\r\n\ttry {\r\n\t\treturn document.activeElement;\r\n\t} catch ( err ) { }\r\n}\r\n\r\n/*\r\n * Helper functions for managing events -- not part of the public interface.\r\n * Props to Dean Edwards' addEvent library for many of the ideas.\r\n */\r\njQuery.event = {\r\n\r\n\tglobal: {},\r\n\r\n\tadd: function( elem, types, handler, data, selector ) {\r\n\t\tvar tmp, events, t, handleObjIn,\r\n\t\t\tspecial, eventHandle, handleObj,\r\n\t\t\thandlers, type, namespaces, origType,\r\n\t\t\telemData = jQuery._data( elem );\r\n\r\n\t\t// Don't attach events to noData or text/comment nodes (but allow plain objects)\r\n\t\tif ( !elemData ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// Caller can pass in an object of custom data in lieu of the handler\r\n\t\tif ( handler.handler ) {\r\n\t\t\thandleObjIn = handler;\r\n\t\t\thandler = handleObjIn.handler;\r\n\t\t\tselector = handleObjIn.selector;\r\n\t\t}\r\n\r\n\t\t// Make sure that the handler has a unique ID, used to find/remove it later\r\n\t\tif ( !handler.guid ) {\r\n\t\t\thandler.guid = jQuery.guid++;\r\n\t\t}\r\n\r\n\t\t// Init the element's event structure and main handler, if this is the first\r\n\t\tif ( !(events = elemData.events) ) {\r\n\t\t\tevents = elemData.events = {};\r\n\t\t}\r\n\t\tif ( !(eventHandle = elemData.handle) ) {\r\n\t\t\teventHandle = elemData.handle = function( e ) {\r\n\t\t\t\t// Discard the second event of a jQuery.event.trigger() and\r\n\t\t\t\t// when an event is called after a page has unloaded\r\n\t\t\t\treturn typeof jQuery !== core_strundefined && (!e || jQuery.event.triggered !== e.type) ?\r\n\t\t\t\t\tjQuery.event.dispatch.apply( eventHandle.elem, arguments ) :\r\n\t\t\t\t\tundefined;\r\n\t\t\t};\r\n\t\t\t// Add elem as a property of the handle fn to prevent a memory leak with IE non-native events\r\n\t\t\teventHandle.elem = elem;\r\n\t\t}\r\n\r\n\t\t// Handle multiple events separated by a space\r\n\t\ttypes = ( types || \"\" ).match( core_rnotwhite ) || [\"\"];\r\n\t\tt = types.length;\r\n\t\twhile ( t-- ) {\r\n\t\t\ttmp = rtypenamespace.exec( types[t] ) || [];\r\n\t\t\ttype = origType = tmp[1];\r\n\t\t\tnamespaces = ( tmp[2] || \"\" ).split( \".\" ).sort();\r\n\r\n\t\t\t// There *must* be a type, no attaching namespace-only handlers\r\n\t\t\tif ( !type ) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\t// If event changes its type, use the special event handlers for the changed type\r\n\t\t\tspecial = jQuery.event.special[ type ] || {};\r\n\r\n\t\t\t// If selector defined, determine special event api type, otherwise given type\r\n\t\t\ttype = ( selector ? special.delegateType : special.bindType ) || type;\r\n\r\n\t\t\t// Update special based on newly reset type\r\n\t\t\tspecial = jQuery.event.special[ type ] || {};\r\n\r\n\t\t\t// handleObj is passed to all event handlers\r\n\t\t\thandleObj = jQuery.extend({\r\n\t\t\t\ttype: type,\r\n\t\t\t\torigType: origType,\r\n\t\t\t\tdata: data,\r\n\t\t\t\thandler: handler,\r\n\t\t\t\tguid: handler.guid,\r\n\t\t\t\tselector: selector,\r\n\t\t\t\tneedsContext: selector && jQuery.expr.match.needsContext.test( selector ),\r\n\t\t\t\tnamespace: namespaces.join(\".\")\r\n\t\t\t}, handleObjIn );\r\n\r\n\t\t\t// Init the event handler queue if we're the first\r\n\t\t\tif ( !(handlers = events[ type ]) ) {\r\n\t\t\t\thandlers = events[ type ] = [];\r\n\t\t\t\thandlers.delegateCount = 0;\r\n\r\n\t\t\t\t// Only use addEventListener/attachEvent if the special events handler returns false\r\n\t\t\t\tif ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) {\r\n\t\t\t\t\t// Bind the global event handler to the element\r\n\t\t\t\t\tif ( elem.addEventListener ) {\r\n\t\t\t\t\t\telem.addEventListener( type, eventHandle, false );\r\n\r\n\t\t\t\t\t} else if ( elem.attachEvent ) {\r\n\t\t\t\t\t\telem.attachEvent( \"on\" + type, eventHandle );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif ( special.add ) {\r\n\t\t\t\tspecial.add.call( elem, handleObj );\r\n\r\n\t\t\t\tif ( !handleObj.handler.guid ) {\r\n\t\t\t\t\thandleObj.handler.guid = handler.guid;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// Add to the element's handler list, delegates in front\r\n\t\t\tif ( selector ) {\r\n\t\t\t\thandlers.splice( handlers.delegateCount++, 0, handleObj );\r\n\t\t\t} else {\r\n\t\t\t\thandlers.push( handleObj );\r\n\t\t\t}\r\n\r\n\t\t\t// Keep track of which events have ever been used, for event optimization\r\n\t\t\tjQuery.event.global[ type ] = true;\r\n\t\t}\r\n\r\n\t\t// Nullify elem to prevent memory leaks in IE\r\n\t\telem = null;\r\n\t},\r\n\r\n\t// Detach an event or set of events from an element\r\n\tremove: function( elem, types, handler, selector, mappedTypes ) {\r\n\t\tvar j, handleObj, tmp,\r\n\t\t\torigCount, t, events,\r\n\t\t\tspecial, handlers, type,\r\n\t\t\tnamespaces, origType,\r\n\t\t\telemData = jQuery.hasData( elem ) && jQuery._data( elem );\r\n\r\n\t\tif ( !elemData || !(events = elemData.events) ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// Once for each type.namespace in types; type may be omitted\r\n\t\ttypes = ( types || \"\" ).match( core_rnotwhite ) || [\"\"];\r\n\t\tt = types.length;\r\n\t\twhile ( t-- ) {\r\n\t\t\ttmp = rtypenamespace.exec( types[t] ) || [];\r\n\t\t\ttype = origType = tmp[1];\r\n\t\t\tnamespaces = ( tmp[2] || \"\" ).split( \".\" ).sort();\r\n\r\n\t\t\t// Unbind all events (on this namespace, if provided) for the element\r\n\t\t\tif ( !type ) {\r\n\t\t\t\tfor ( type in events ) {\r\n\t\t\t\t\tjQuery.event.remove( elem, type + types[ t ], handler, selector, true );\r\n\t\t\t\t}\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tspecial = jQuery.event.special[ type ] || {};\r\n\t\t\ttype = ( selector ? special.delegateType : special.bindType ) || type;\r\n\t\t\thandlers = events[ type ] || [];\r\n\t\t\ttmp = tmp[2] && new RegExp( \"(^|\\\\.)\" + namespaces.join(\"\\\\.(?:.*\\\\.|)\") + \"(\\\\.|$)\" );\r\n\r\n\t\t\t// Remove matching events\r\n\t\t\torigCount = j = handlers.length;\r\n\t\t\twhile ( j-- ) {\r\n\t\t\t\thandleObj = handlers[ j ];\r\n\r\n\t\t\t\tif ( ( mappedTypes || origType === handleObj.origType ) &&\r\n\t\t\t\t\t( !handler || handler.guid === handleObj.guid ) &&\r\n\t\t\t\t\t( !tmp || tmp.test( handleObj.namespace ) ) &&\r\n\t\t\t\t\t( !selector || selector === handleObj.selector || selector === \"**\" && handleObj.selector ) ) {\r\n\t\t\t\t\thandlers.splice( j, 1 );\r\n\r\n\t\t\t\t\tif ( handleObj.selector ) {\r\n\t\t\t\t\t\thandlers.delegateCount--;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif ( special.remove ) {\r\n\t\t\t\t\t\tspecial.remove.call( elem, handleObj );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// Remove generic event handler if we removed something and no more handlers exist\r\n\t\t\t// (avoids potential for endless recursion during removal of special event handlers)\r\n\t\t\tif ( origCount && !handlers.length ) {\r\n\t\t\t\tif ( !special.teardown || special.teardown.call( elem, namespaces, elemData.handle ) === false ) {\r\n\t\t\t\t\tjQuery.removeEvent( elem, type, elemData.handle );\r\n\t\t\t\t}\r\n\r\n\t\t\t\tdelete events[ type ];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Remove the expando if it's no longer used\r\n\t\tif ( jQuery.isEmptyObject( events ) ) {\r\n\t\t\tdelete elemData.handle;\r\n\r\n\t\t\t// removeData also checks for emptiness and clears the expando if empty\r\n\t\t\t// so use it instead of delete\r\n\t\t\tjQuery._removeData( elem, \"events\" );\r\n\t\t}\r\n\t},\r\n\r\n\ttrigger: function( event, data, elem, onlyHandlers ) {\r\n\t\tvar handle, ontype, cur,\r\n\t\t\tbubbleType, special, tmp, i,\r\n\t\t\teventPath = [ elem || document ],\r\n\t\t\ttype = core_hasOwn.call( event, \"type\" ) ? event.type : event,\r\n\t\t\tnamespaces = core_hasOwn.call( event, \"namespace\" ) ? event.namespace.split(\".\") : [];\r\n\r\n\t\tcur = tmp = elem = elem || document;\r\n\r\n\t\t// Don't do events on text and comment nodes\r\n\t\tif ( elem.nodeType === 3 || elem.nodeType === 8 ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// focus/blur morphs to focusin/out; ensure we're not firing them right now\r\n\t\tif ( rfocusMorph.test( type + jQuery.event.triggered ) ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif ( type.indexOf(\".\") >= 0 ) {\r\n\t\t\t// Namespaced trigger; create a regexp to match event type in handle()\r\n\t\t\tnamespaces = type.split(\".\");\r\n\t\t\ttype = namespaces.shift();\r\n\t\t\tnamespaces.sort();\r\n\t\t}\r\n\t\tontype = type.indexOf(\":\") < 0 && \"on\" + type;\r\n\r\n\t\t// Caller can pass in a jQuery.Event object, Object, or just an event type string\r\n\t\tevent = event[ jQuery.expando ] ?\r\n\t\t\tevent :\r\n\t\t\tnew jQuery.Event( type, typeof event === \"object\" && event );\r\n\r\n\t\t// Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true)\r\n\t\tevent.isTrigger = onlyHandlers ? 2 : 3;\r\n\t\tevent.namespace = namespaces.join(\".\");\r\n\t\tevent.namespace_re = event.namespace ?\r\n\t\t\tnew RegExp( \"(^|\\\\.)\" + namespaces.join(\"\\\\.(?:.*\\\\.|)\") + \"(\\\\.|$)\" ) :\r\n\t\t\tnull;\r\n\r\n\t\t// Clean up the event in case it is being reused\r\n\t\tevent.result = undefined;\r\n\t\tif ( !event.target ) {\r\n\t\t\tevent.target = elem;\r\n\t\t}\r\n\r\n\t\t// Clone any incoming data and prepend the event, creating the handler arg list\r\n\t\tdata = data == null ?\r\n\t\t\t[ event ] :\r\n\t\t\tjQuery.makeArray( data, [ event ] );\r\n\r\n\t\t// Allow special events to draw outside the lines\r\n\t\tspecial = jQuery.event.special[ type ] || {};\r\n\t\tif ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// Determine event propagation path in advance, per W3C events spec (#9951)\r\n\t\t// Bubble up to document, then to window; watch for a global ownerDocument var (#9724)\r\n\t\tif ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) {\r\n\r\n\t\t\tbubbleType = special.delegateType || type;\r\n\t\t\tif ( !rfocusMorph.test( bubbleType + type ) ) {\r\n\t\t\t\tcur = cur.parentNode;\r\n\t\t\t}\r\n\t\t\tfor ( ; cur; cur = cur.parentNode ) {\r\n\t\t\t\teventPath.push( cur );\r\n\t\t\t\ttmp = cur;\r\n\t\t\t}\r\n\r\n\t\t\t// Only add window if we got to document (e.g., not plain obj or detached DOM)\r\n\t\t\tif ( tmp === (elem.ownerDocument || document) ) {\r\n\t\t\t\teventPath.push( tmp.defaultView || tmp.parentWindow || window );\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Fire handlers on the event path\r\n\t\ti = 0;\r\n\t\twhile ( (cur = eventPath[i++]) && !event.isPropagationStopped() ) {\r\n\r\n\t\t\tevent.type = i > 1 ?\r\n\t\t\t\tbubbleType :\r\n\t\t\t\tspecial.bindType || type;\r\n\r\n\t\t\t// jQuery handler\r\n\t\t\thandle = ( jQuery._data( cur, \"events\" ) || {} )[ event.type ] && jQuery._data( cur, \"handle\" );\r\n\t\t\tif ( handle ) {\r\n\t\t\t\thandle.apply( cur, data );\r\n\t\t\t}\r\n\r\n\t\t\t// Native handler\r\n\t\t\thandle = ontype && cur[ ontype ];\r\n\t\t\tif ( handle && jQuery.acceptData( cur ) && handle.apply && handle.apply( cur, data ) === false ) {\r\n\t\t\t\tevent.preventDefault();\r\n\t\t\t}\r\n\t\t}\r\n\t\tevent.type = type;\r\n\r\n\t\t// If nobody prevented the default action, do it now\r\n\t\tif ( !onlyHandlers && !event.isDefaultPrevented() ) {\r\n\r\n\t\t\tif ( (!special._default || special._default.apply( eventPath.pop(), data ) === false) &&\r\n\t\t\t\tjQuery.acceptData( elem ) ) {\r\n\r\n\t\t\t\t// Call a native DOM method on the target with the same name name as the event.\r\n\t\t\t\t// Can't use an .isFunction() check here because IE6/7 fails that test.\r\n\t\t\t\t// Don't do default actions on window, that's where global variables be (#6170)\r\n\t\t\t\tif ( ontype && elem[ type ] && !jQuery.isWindow( elem ) ) {\r\n\r\n\t\t\t\t\t// Don't re-trigger an onFOO event when we call its FOO() method\r\n\t\t\t\t\ttmp = elem[ ontype ];\r\n\r\n\t\t\t\t\tif ( tmp ) {\r\n\t\t\t\t\t\telem[ ontype ] = null;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// Prevent re-triggering of the same event, since we already bubbled it above\r\n\t\t\t\t\tjQuery.event.triggered = type;\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\telem[ type ]();\r\n\t\t\t\t\t} catch ( e ) {\r\n\t\t\t\t\t\t// IE<9 dies on focus/blur to hidden element (#1486,#12518)\r\n\t\t\t\t\t\t// only reproducible on winXP IE8 native, not IE9 in IE8 mode\r\n\t\t\t\t\t}\r\n\t\t\t\t\tjQuery.event.triggered = undefined;\r\n\r\n\t\t\t\t\tif ( tmp ) {\r\n\t\t\t\t\t\telem[ ontype ] = tmp;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn event.result;\r\n\t},\r\n\r\n\tdispatch: function( event ) {\r\n\r\n\t\t// Make a writable jQuery.Event from the native event object\r\n\t\tevent = jQuery.event.fix( event );\r\n\r\n\t\tvar i, ret, handleObj, matched, j,\r\n\t\t\thandlerQueue = [],\r\n\t\t\targs = core_slice.call( arguments ),\r\n\t\t\thandlers = ( jQuery._data( this, \"events\" ) || {} )[ event.type ] || [],\r\n\t\t\tspecial = jQuery.event.special[ event.type ] || {};\r\n\r\n\t\t// Use the fix-ed jQuery.Event rather than the (read-only) native event\r\n\t\targs[0] = event;\r\n\t\tevent.delegateTarget = this;\r\n\r\n\t\t// Call the preDispatch hook for the mapped type, and let it bail if desired\r\n\t\tif ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// Determine handlers\r\n\t\thandlerQueue = jQuery.event.handlers.call( this, event, handlers );\r\n\r\n\t\t// Run delegates first; they may want to stop propagation beneath us\r\n\t\ti = 0;\r\n\t\twhile ( (matched = handlerQueue[ i++ ]) && !event.isPropagationStopped() ) {\r\n\t\t\tevent.currentTarget = matched.elem;\r\n\r\n\t\t\tj = 0;\r\n\t\t\twhile ( (handleObj = matched.handlers[ j++ ]) && !event.isImmediatePropagationStopped() ) {\r\n\r\n\t\t\t\t// Triggered event must either 1) have no namespace, or\r\n\t\t\t\t// 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace).\r\n\t\t\t\tif ( !event.namespace_re || event.namespace_re.test( handleObj.namespace ) ) {\r\n\r\n\t\t\t\t\tevent.handleObj = handleObj;\r\n\t\t\t\t\tevent.data = handleObj.data;\r\n\r\n\t\t\t\t\tret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler )\r\n\t\t\t\t\t\t\t.apply( matched.elem, args );\r\n\r\n\t\t\t\t\tif ( ret !== undefined ) {\r\n\t\t\t\t\t\tif ( (event.result = ret) === false ) {\r\n\t\t\t\t\t\t\tevent.preventDefault();\r\n\t\t\t\t\t\t\tevent.stopPropagation();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Call the postDispatch hook for the mapped type\r\n\t\tif ( special.postDispatch ) {\r\n\t\t\tspecial.postDispatch.call( this, event );\r\n\t\t}\r\n\r\n\t\treturn event.result;\r\n\t},\r\n\r\n\thandlers: function( event, handlers ) {\r\n\t\tvar sel, handleObj, matches, i,\r\n\t\t\thandlerQueue = [],\r\n\t\t\tdelegateCount = handlers.delegateCount,\r\n\t\t\tcur = event.target;\r\n\r\n\t\t// Find delegate handlers\r\n\t\t// Black-hole SVG <use> instance trees (#13180)\r\n\t\t// Avoid non-left-click bubbling in Firefox (#3861)\r\n\t\tif ( delegateCount && cur.nodeType && (!event.button || event.type !== \"click\") ) {\r\n\r\n\t\t\t/* jshint eqeqeq: false */\r\n\t\t\tfor ( ; cur != this; cur = cur.parentNode || this ) {\r\n\t\t\t\t/* jshint eqeqeq: true */\r\n\r\n\t\t\t\t// Don't check non-elements (#13208)\r\n\t\t\t\t// Don't process clicks on disabled elements (#6911, #8165, #11382, #11764)\r\n\t\t\t\tif ( cur.nodeType === 1 && (cur.disabled !== true || event.type !== \"click\") ) {\r\n\t\t\t\t\tmatches = [];\r\n\t\t\t\t\tfor ( i = 0; i < delegateCount; i++ ) {\r\n\t\t\t\t\t\thandleObj = handlers[ i ];\r\n\r\n\t\t\t\t\t\t// Don't conflict with Object.prototype properties (#13203)\r\n\t\t\t\t\t\tsel = handleObj.selector + \" \";\r\n\r\n\t\t\t\t\t\tif ( matches[ sel ] === undefined ) {\r\n\t\t\t\t\t\t\tmatches[ sel ] = handleObj.needsContext ?\r\n\t\t\t\t\t\t\t\tjQuery( sel, this ).index( cur ) >= 0 :\r\n\t\t\t\t\t\t\t\tjQuery.find( sel, this, null, [ cur ] ).length;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif ( matches[ sel ] ) {\r\n\t\t\t\t\t\t\tmatches.push( handleObj );\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif ( matches.length ) {\r\n\t\t\t\t\t\thandlerQueue.push({ elem: cur, handlers: matches });\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Add the remaining (directly-bound) handlers\r\n\t\tif ( delegateCount < handlers.length ) {\r\n\t\t\thandlerQueue.push({ elem: this, handlers: handlers.slice( delegateCount ) });\r\n\t\t}\r\n\r\n\t\treturn handlerQueue;\r\n\t},\r\n\r\n\tfix: function( event ) {\r\n\t\tif ( event[ jQuery.expando ] ) {\r\n\t\t\treturn event;\r\n\t\t}\r\n\r\n\t\t// Create a writable copy of the event object and normalize some properties\r\n\t\tvar i, prop, copy,\r\n\t\t\ttype = event.type,\r\n\t\t\toriginalEvent = event,\r\n\t\t\tfixHook = this.fixHooks[ type ];\r\n\r\n\t\tif ( !fixHook ) {\r\n\t\t\tthis.fixHooks[ type ] = fixHook =\r\n\t\t\t\trmouseEvent.test( type ) ? this.mouseHooks :\r\n\t\t\t\trkeyEvent.test( type ) ? this.keyHooks :\r\n\t\t\t\t{};\r\n\t\t}\r\n\t\tcopy = fixHook.props ? this.props.concat( fixHook.props ) : this.props;\r\n\r\n\t\tevent = new jQuery.Event( originalEvent );\r\n\r\n\t\ti = copy.length;\r\n\t\twhile ( i-- ) {\r\n\t\t\tprop = copy[ i ];\r\n\t\t\tevent[ prop ] = originalEvent[ prop ];\r\n\t\t}\r\n\r\n\t\t// Support: IE<9\r\n\t\t// Fix target property (#1925)\r\n\t\tif ( !event.target ) {\r\n\t\t\tevent.target = originalEvent.srcElement || document;\r\n\t\t}\r\n\r\n\t\t// Support: Chrome 23+, Safari?\r\n\t\t// Target should not be a text node (#504, #13143)\r\n\t\tif ( event.target.nodeType === 3 ) {\r\n\t\t\tevent.target = event.target.parentNode;\r\n\t\t}\r\n\r\n\t\t// Support: IE<9\r\n\t\t// For mouse/key events, metaKey==false if it's undefined (#3368, #11328)\r\n\t\tevent.metaKey = !!event.metaKey;\r\n\r\n\t\treturn fixHook.filter ? fixHook.filter( event, originalEvent ) : event;\r\n\t},\r\n\r\n\t// Includes some event props shared by KeyEvent and MouseEvent\r\n\tprops: \"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which\".split(\" \"),\r\n\r\n\tfixHooks: {},\r\n\r\n\tkeyHooks: {\r\n\t\tprops: \"char charCode key keyCode\".split(\" \"),\r\n\t\tfilter: function( event, original ) {\r\n\r\n\t\t\t// Add which for key events\r\n\t\t\tif ( event.which == null ) {\r\n\t\t\t\tevent.which = original.charCode != null ? original.charCode : original.keyCode;\r\n\t\t\t}\r\n\r\n\t\t\treturn event;\r\n\t\t}\r\n\t},\r\n\r\n\tmouseHooks: {\r\n\t\tprops: \"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement\".split(\" \"),\r\n\t\tfilter: function( event, original ) {\r\n\t\t\tvar body, eventDoc, doc,\r\n\t\t\t\tbutton = original.button,\r\n\t\t\t\tfromElement = original.fromElement;\r\n\r\n\t\t\t// Calculate pageX/Y if missing and clientX/Y available\r\n\t\t\tif ( event.pageX == null && original.clientX != null ) {\r\n\t\t\t\teventDoc = event.target.ownerDocument || document;\r\n\t\t\t\tdoc = eventDoc.documentElement;\r\n\t\t\t\tbody = eventDoc.body;\r\n\r\n\t\t\t\tevent.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 );\r\n\t\t\t\tevent.pageY = original.clientY + ( doc && doc.scrollTop  || body && body.scrollTop  || 0 ) - ( doc && doc.clientTop  || body && body.clientTop  || 0 );\r\n\t\t\t}\r\n\r\n\t\t\t// Add relatedTarget, if necessary\r\n\t\t\tif ( !event.relatedTarget && fromElement ) {\r\n\t\t\t\tevent.relatedTarget = fromElement === event.target ? original.toElement : fromElement;\r\n\t\t\t}\r\n\r\n\t\t\t// Add which for click: 1 === left; 2 === middle; 3 === right\r\n\t\t\t// Note: button is not normalized, so don't use it\r\n\t\t\tif ( !event.which && button !== undefined ) {\r\n\t\t\t\tevent.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) );\r\n\t\t\t}\r\n\r\n\t\t\treturn event;\r\n\t\t}\r\n\t},\r\n\r\n\tspecial: {\r\n\t\tload: {\r\n\t\t\t// Prevent triggered image.load events from bubbling to window.load\r\n\t\t\tnoBubble: true\r\n\t\t},\r\n\t\tfocus: {\r\n\t\t\t// Fire native event if possible so blur/focus sequence is correct\r\n\t\t\ttrigger: function() {\r\n\t\t\t\tif ( this !== safeActiveElement() && this.focus ) {\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tthis.focus();\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t} catch ( e ) {\r\n\t\t\t\t\t\t// Support: IE<9\r\n\t\t\t\t\t\t// If we error on focus to hidden element (#1486, #12518),\r\n\t\t\t\t\t\t// let .trigger() run the handlers\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tdelegateType: \"focusin\"\r\n\t\t},\r\n\t\tblur: {\r\n\t\t\ttrigger: function() {\r\n\t\t\t\tif ( this === safeActiveElement() && this.blur ) {\r\n\t\t\t\t\tthis.blur();\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tdelegateType: \"focusout\"\r\n\t\t},\r\n\t\tclick: {\r\n\t\t\t// For checkbox, fire native event so checked state will be right\r\n\t\t\ttrigger: function() {\r\n\t\t\t\tif ( jQuery.nodeName( this, \"input\" ) && this.type === \"checkbox\" && this.click ) {\r\n\t\t\t\t\tthis.click();\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t},\r\n\r\n\t\t\t// For cross-browser consistency, don't fire native .click() on links\r\n\t\t\t_default: function( event ) {\r\n\t\t\t\treturn jQuery.nodeName( event.target, \"a\" );\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tbeforeunload: {\r\n\t\t\tpostDispatch: function( event ) {\r\n\r\n\t\t\t\t// Even when returnValue equals to undefined Firefox will still show alert\r\n\t\t\t\tif ( event.result !== undefined ) {\r\n\t\t\t\t\tevent.originalEvent.returnValue = event.result;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\tsimulate: function( type, elem, event, bubble ) {\r\n\t\t// Piggyback on a donor event to simulate a different one.\r\n\t\t// Fake originalEvent to avoid donor's stopPropagation, but if the\r\n\t\t// simulated event prevents default then we do the same on the donor.\r\n\t\tvar e = jQuery.extend(\r\n\t\t\tnew jQuery.Event(),\r\n\t\t\tevent,\r\n\t\t\t{\r\n\t\t\t\ttype: type,\r\n\t\t\t\tisSimulated: true,\r\n\t\t\t\toriginalEvent: {}\r\n\t\t\t}\r\n\t\t);\r\n\t\tif ( bubble ) {\r\n\t\t\tjQuery.event.trigger( e, null, elem );\r\n\t\t} else {\r\n\t\t\tjQuery.event.dispatch.call( elem, e );\r\n\t\t}\r\n\t\tif ( e.isDefaultPrevented() ) {\r\n\t\t\tevent.preventDefault();\r\n\t\t}\r\n\t}\r\n};\r\n\r\njQuery.removeEvent = document.removeEventListener ?\r\n\tfunction( elem, type, handle ) {\r\n\t\tif ( elem.removeEventListener ) {\r\n\t\t\telem.removeEventListener( type, handle, false );\r\n\t\t}\r\n\t} :\r\n\tfunction( elem, type, handle ) {\r\n\t\tvar name = \"on\" + type;\r\n\r\n\t\tif ( elem.detachEvent ) {\r\n\r\n\t\t\t// #8545, #7054, preventing memory leaks for custom events in IE6-8\r\n\t\t\t// detachEvent needed property on element, by name of that event, to properly expose it to GC\r\n\t\t\tif ( typeof elem[ name ] === core_strundefined ) {\r\n\t\t\t\telem[ name ] = null;\r\n\t\t\t}\r\n\r\n\t\t\telem.detachEvent( name, handle );\r\n\t\t}\r\n\t};\r\n\r\njQuery.Event = function( src, props ) {\r\n\t// Allow instantiation without the 'new' keyword\r\n\tif ( !(this instanceof jQuery.Event) ) {\r\n\t\treturn new jQuery.Event( src, props );\r\n\t}\r\n\r\n\t// Event object\r\n\tif ( src && src.type ) {\r\n\t\tthis.originalEvent = src;\r\n\t\tthis.type = src.type;\r\n\r\n\t\t// Events bubbling up the document may have been marked as prevented\r\n\t\t// by a handler lower down the tree; reflect the correct value.\r\n\t\tthis.isDefaultPrevented = ( src.defaultPrevented || src.returnValue === false ||\r\n\t\t\tsrc.getPreventDefault && src.getPreventDefault() ) ? returnTrue : returnFalse;\r\n\r\n\t// Event type\r\n\t} else {\r\n\t\tthis.type = src;\r\n\t}\r\n\r\n\t// Put explicitly provided properties onto the event object\r\n\tif ( props ) {\r\n\t\tjQuery.extend( this, props );\r\n\t}\r\n\r\n\t// Create a timestamp if incoming event doesn't have one\r\n\tthis.timeStamp = src && src.timeStamp || jQuery.now();\r\n\r\n\t// Mark it as fixed\r\n\tthis[ jQuery.expando ] = true;\r\n};\r\n\r\n// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding\r\n// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html\r\njQuery.Event.prototype = {\r\n\tisDefaultPrevented: returnFalse,\r\n\tisPropagationStopped: returnFalse,\r\n\tisImmediatePropagationStopped: returnFalse,\r\n\r\n\tpreventDefault: function() {\r\n\t\tvar e = this.originalEvent;\r\n\r\n\t\tthis.isDefaultPrevented = returnTrue;\r\n\t\tif ( !e ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// If preventDefault exists, run it on the original event\r\n\t\tif ( e.preventDefault ) {\r\n\t\t\te.preventDefault();\r\n\r\n\t\t// Support: IE\r\n\t\t// Otherwise set the returnValue property of the original event to false\r\n\t\t} else {\r\n\t\t\te.returnValue = false;\r\n\t\t}\r\n\t},\r\n\tstopPropagation: function() {\r\n\t\tvar e = this.originalEvent;\r\n\r\n\t\tthis.isPropagationStopped = returnTrue;\r\n\t\tif ( !e ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t// If stopPropagation exists, run it on the original event\r\n\t\tif ( e.stopPropagation ) {\r\n\t\t\te.stopPropagation();\r\n\t\t}\r\n\r\n\t\t// Support: IE\r\n\t\t// Set the cancelBubble property of the original event to true\r\n\t\te.cancelBubble = true;\r\n\t},\r\n\tstopImmediatePropagation: function() {\r\n\t\tthis.isImmediatePropagationStopped = returnTrue;\r\n\t\tthis.stopPropagation();\r\n\t}\r\n};\r\n\r\n// Create mouseenter/leave events using mouseover/out and event-time checks\r\njQuery.each({\r\n\tmouseenter: \"mouseover\",\r\n\tmouseleave: \"mouseout\"\r\n}, function( orig, fix ) {\r\n\tjQuery.event.special[ orig ] = {\r\n\t\tdelegateType: fix,\r\n\t\tbindType: fix,\r\n\r\n\t\thandle: function( event ) {\r\n\t\t\tvar ret,\r\n\t\t\t\ttarget = this,\r\n\t\t\t\trelated = event.relatedTarget,\r\n\t\t\t\thandleObj = event.handleObj;\r\n\r\n\t\t\t// For mousenter/leave call the handler if related is outside the target.\r\n\t\t\t// NB: No relatedTarget if the mouse left/entered the browser window\r\n\t\t\tif ( !related || (related !== target && !jQuery.contains( target, related )) ) {\r\n\t\t\t\tevent.type = handleObj.origType;\r\n\t\t\t\tret = handleObj.handler.apply( this, arguments );\r\n\t\t\t\tevent.type = fix;\r\n\t\t\t}\r\n\t\t\treturn ret;\r\n\t\t}\r\n\t};\r\n});\r\n\r\n// IE submit delegation\r\nif ( !jQuery.support.submitBubbles ) {\r\n\r\n\tjQuery.event.special.submit = {\r\n\t\tsetup: function() {\r\n\t\t\t// Only need this for delegated form submit events\r\n\t\t\tif ( jQuery.nodeName( this, \"form\" ) ) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\r\n\t\t\t// Lazy-add a submit handler when a descendant form may potentially be submitted\r\n\t\t\tjQuery.event.add( this, \"click._submit keypress._submit\", function( e ) {\r\n\t\t\t\t// Node name check avoids a VML-related crash in IE (#9807)\r\n\t\t\t\tvar elem = e.target,\r\n\t\t\t\t\tform = jQuery.nodeName( elem, \"input\" ) || jQuery.nodeName( elem, \"button\" ) ? elem.form : undefined;\r\n\t\t\t\tif ( form && !jQuery._data( form, \"submitBubbles\" ) ) {\r\n\t\t\t\t\tjQuery.event.add( form, \"submit._submit\", function( event ) {\r\n\t\t\t\t\t\tevent._submit_bubble = true;\r\n\t\t\t\t\t});\r\n\t\t\t\t\tjQuery._data( form, \"submitBubbles\", true );\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t// return undefined since we don't need an event listener\r\n\t\t},\r\n\r\n\t\tpostDispatch: function( event ) {\r\n\t\t\t// If form was submitted by the user, bubble the event up the tree\r\n\t\t\tif ( event._submit_bubble ) {\r\n\t\t\t\tdelete event._submit_bubble;\r\n\t\t\t\tif ( this.parentNode && !event.isTrigger ) {\r\n\t\t\t\t\tjQuery.event.simulate( \"submit\", this.parentNode, event, true );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tteardown: function() {\r\n\t\t\t// Only need this for delegated form submit events\r\n\t\t\tif ( jQuery.nodeName( this, \"form\" ) ) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\r\n\t\t\t// Remove delegated handlers; cleanData eventually reaps submit handlers attached above\r\n\t\t\tjQuery.event.remove( this, \"._submit\" );\r\n\t\t}\r\n\t};\r\n}\r\n\r\n// IE change delegation and checkbox/radio fix\r\nif ( !jQuery.support.changeBubbles ) {\r\n\r\n\tjQuery.event.special.change = {\r\n\r\n\t\tsetup: function() {\r\n\r\n\t\t\tif ( rformElems.test( this.nodeName ) ) {\r\n\t\t\t\t// IE doesn't fire change on a check/radio until blur; trigger it on click\r\n\t\t\t\t// after a propertychange. Eat the blur-change in special.change.handle.\r\n\t\t\t\t// This still fires onchange a second time for check/radio after blur.\r\n\t\t\t\tif ( this.type === \"checkbox\" || this.type === \"radio\" ) {\r\n\t\t\t\t\tjQuery.event.add( this, \"propertychange._change\", function( event ) {\r\n\t\t\t\t\t\tif ( event.originalEvent.propertyName === \"checked\" ) {\r\n\t\t\t\t\t\t\tthis._just_changed = true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t\tjQuery.event.add( this, \"click._change\", function( event ) {\r\n\t\t\t\t\t\tif ( this._just_changed && !event.isTrigger ) {\r\n\t\t\t\t\t\t\tthis._just_changed = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t// Allow triggered, simulated change events (#11500)\r\n\t\t\t\t\t\tjQuery.event.simulate( \"change\", this, event, true );\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t// Delegated event; lazy-add a change handler on descendant inputs\r\n\t\t\tjQuery.event.add( this, \"beforeactivate._change\", function( e ) {\r\n\t\t\t\tvar elem = e.target;\r\n\r\n\t\t\t\tif ( rformElems.test( elem.nodeName ) && !jQuery._data( elem, \"changeBubbles\" ) ) {\r\n\t\t\t\t\tjQuery.event.add( elem, \"change._change\", function( event ) {\r\n\t\t\t\t\t\tif ( this.parentNode && !event.isSimulated && !event.isTrigger ) {\r\n\t\t\t\t\t\t\tjQuery.event.simulate( \"change\", this.parentNode, event, true );\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t\tjQuery._data( elem, \"changeBubbles\", true );\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t},\r\n\r\n\t\thandle: function( event ) {\r\n\t\t\tvar elem = event.target;\r\n\r\n\t\t\t// Swallow native change events from checkbox/radio, we already triggered them above\r\n\t\t\tif ( this !== elem || event.isSimulated || event.isTrigger || (elem.type !== \"radio\" && elem.type !== \"checkbox\") ) {\r\n\t\t\t\treturn event.handleObj.handler.apply( this, arguments );\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tteardown: function() {\r\n\t\t\tjQuery.event.remove( this, \"._change\" );\r\n\r\n\t\t\treturn !rformElems.test( this.nodeName );\r\n\t\t}\r\n\t};\r\n}\r\n\r\n// Create \"bubbling\" focus and blur events\r\nif ( !jQuery.support.focusinBubbles ) {\r\n\tjQuery.each({ focus: \"focusin\", blur: \"focusout\" }, function( orig, fix ) {\r\n\r\n\t\t// Attach a single capturing handler while someone wants focusin/focusout\r\n\t\tvar attaches = 0,\r\n\t\t\thandler = function( event ) {\r\n\t\t\t\tjQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true );\r\n\t\t\t};\r\n\r\n\t\tjQuery.event.special[ fix ] = {\r\n\t\t\tsetup: function() {\r\n\t\t\t\tif ( attaches++ === 0 ) {\r\n\t\t\t\t\tdocument.addEventListener( orig, handler, true );\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tteardown: function() {\r\n\t\t\t\tif ( --attaches === 0 ) {\r\n\t\t\t\t\tdocument.removeEventListener( orig, handler, true );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\t});\r\n}\r\n\r\njQuery.fn.extend({\r\n\r\n\ton: function( types, selector, data, fn, /*INTERNAL*/ one ) {\r\n\t\tvar type, origFn;\r\n\r\n\t\t// Types can be a map of types/handlers\r\n\t\tif ( typeof types === \"object\" ) {\r\n\t\t\t// ( types-Object, selector, data )\r\n\t\t\tif ( typeof selector !== \"string\" ) {\r\n\t\t\t\t// ( types-Object, data )\r\n\t\t\t\tdata = data || selector;\r\n\t\t\t\tselector = undefined;\r\n\t\t\t}\r\n\t\t\tfor ( type in types ) {\r\n\t\t\t\tthis.on( type, selector, data, types[ type ], one );\r\n\t\t\t}\r\n\t\t\treturn this;\r\n\t\t}\r\n\r\n\t\tif ( data == null && fn == null ) {\r\n\t\t\t// ( types, fn )\r\n\t\t\tfn = selector;\r\n\t\t\tdata = selector = undefined;\r\n\t\t} else if ( fn == null ) {\r\n\t\t\tif ( typeof selector === \"string\" ) {\r\n\t\t\t\t// ( types, selector, fn )\r\n\t\t\t\tfn = data;\r\n\t\t\t\tdata = undefined;\r\n\t\t\t} else {\r\n\t\t\t\t// ( types, data, fn )\r\n\t\t\t\tfn = data;\r\n\t\t\t\tdata = selector;\r\n\t\t\t\tselector = undefined;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif ( fn === false ) {\r\n\t\t\tfn = returnFalse;\r\n\t\t} else if ( !fn ) {\r\n\t\t\treturn this;\r\n\t\t}\r\n\r\n\t\tif ( one === 1 ) {\r\n\t\t\torigFn = fn;\r\n\t\t\tfn = function( event ) {\r\n\t\t\t\t// Can use an empty set, since event contains the info\r\n\t\t\t\tjQuery().off( event );\r\n\t\t\t\treturn origFn.apply( this, arguments );\r\n\t\t\t};\r\n\t\t\t// Use same guid so caller can remove using origFn\r\n\t\t\tfn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );\r\n\t\t}\r\n\t\treturn this.each( function() {\r\n\t\t\tjQuery.event.add( this, types, fn, data, selector );\r\n\t\t});\r\n\t},\r\n\tone: function( types, selector, data, fn ) {\r\n\t\treturn this.on( types, selector, data, fn, 1 );\r\n\t},\r\n\toff: function( types, selector, fn ) {\r\n\t\tvar handleObj, type;\r\n\t\tif ( types && types.preventDefault && types.handleObj ) {\r\n\t\t\t// ( event )  dispatched jQuery.Event\r\n\t\t\thandleObj = types.handleObj;\r\n\t\t\tjQuery( types.delegateTarget ).off(\r\n\t\t\t\thandleObj.namespace ? handleObj.origType + \".\" + handleObj.namespace : handleObj.origType,\r\n\t\t\t\thandleObj.selector,\r\n\t\t\t\thandleObj.handler\r\n\t\t\t);\r\n\t\t\treturn this;\r\n\t\t}\r\n\t\tif ( typeof types === \"object\" ) {\r\n\t\t\t// ( types-object [, selector] )\r\n\t\t\tfor ( type in types ) {\r\n\t\t\t\tthis.off( type, selector, types[ type ] );\r\n\t\t\t}\r\n\t\t\treturn this;\r\n\t\t}\r\n\t\tif ( selector === false || typeof selector === \"function\" ) {\r\n\t\t\t// ( types [, fn] )\r\n\t\t\tfn = selector;\r\n\t\t\tselector = undefined;\r\n\t\t}\r\n\t\tif ( fn === false ) {\r\n\t\t\tfn = returnFalse;\r\n\t\t}\r\n\t\treturn this.each(function() {\r\n\t\t\tjQuery.event.remove( this, types, fn, selector );\r\n\t\t});\r\n\t},\r\n\r\n\ttrigger: function( type, data ) {\r\n\t\treturn this.each(function() {\r\n\t\t\tjQuery.event.trigger( type, data, this );\r\n\t\t});\r\n\t},\r\n\ttriggerHandler: function( type, data ) {\r\n\t\tvar elem = this[0];\r\n\t\tif ( elem ) {\r\n\t\t\treturn jQuery.event.trigger( type, data, elem, true );\r\n\t\t}\r\n\t}\r\n});\r\nvar isSimple = /^.[^:#\\[\\.,]*$/,\r\n\trparentsprev = /^(?:parents|prev(?:Until|All))/,\r\n\trneedsContext = jQuery.expr.match.needsContext,\r\n\t// methods guaranteed to produce a unique set when starting from a unique set\r\n\tguaranteedUnique = {\r\n\t\tchildren: true,\r\n\t\tcontents: true,\r\n\t\tnext: true,\r\n\t\tprev: true\r\n\t};\r\n\r\njQuery.fn.extend({\r\n\tfind: function( selector ) {\r\n\t\tvar i,\r\n\t\t\tret = [],\r\n\t\t\tself = this,\r\n\t\t\tlen = self.length;\r\n\r\n\t\tif ( typeof selector !== \"string\" ) {\r\n\t\t\treturn this.pushStack( jQuery( selector ).filter(function() {\r\n\t\t\t\tfor ( i = 0; i < len; i++ ) {\r\n\t\t\t\t\tif ( jQuery.contains( self[ i ], this ) ) {\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}) );\r\n\t\t}\r\n\r\n\t\tfor ( i = 0; i < len; i++ ) {\r\n\t\t\tjQuery.find( selector, self[ i ], ret );\r\n\t\t}\r\n\r\n\t\t// Needed because $( selector, context ) becomes $( context ).find( selector )\r\n\t\tret = this.pushStack( len > 1 ? jQuery.unique( ret ) : ret );\r\n\t\tret.selector = this.selector ? this.selector + \" \" + selector : selector;\r\n\t\treturn ret;\r\n\t},\r\n\r\n\thas: function( target ) {\r\n\t\tvar i,\r\n\t\t\ttargets = jQuery( target, this ),\r\n\t\t\tlen = targets.length;\r\n\r\n\t\treturn this.filter(function() {\r\n\t\t\tfor ( i = 0; i < len; i++ ) {\r\n\t\t\t\tif ( jQuery.contains( this, targets[i] ) ) {\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t},\r\n\r\n\tnot: function( selector ) {\r\n\t\treturn this.pushStack( winnow(this, selector || [], true) );\r\n\t},\r\n\r\n\tfilter: function( selector ) {\r\n\t\treturn this.pushStack( winnow(this, selector || [], false) );\r\n\t},\r\n\r\n\tis: function( selector ) {\r\n\t\treturn !!winnow(\r\n\t\t\tthis,\r\n\r\n\t\t\t// If this is a positional/relative selector, check membership in the returned set\r\n\t\t\t// so $(\"p:first\").is(\"p:last\") won't return true for a doc with two \"p\".\r\n\t\t\ttypeof selector === \"string\" && rneedsContext.test( selector ) ?\r\n\t\t\t\tjQuery( selector ) :\r\n\t\t\t\tselector || [],\r\n\t\t\tfalse\r\n\t\t).length;\r\n\t},\r\n\r\n\tclosest: function( selectors, context ) {\r\n\t\tvar cur,\r\n\t\t\ti = 0,\r\n\t\t\tl = this.length,\r\n\t\t\tret = [],\r\n\t\t\tpos = rneedsContext.test( selectors ) || typeof selectors !== \"string\" ?\r\n\t\t\t\tjQuery( selectors, context || this.context ) :\r\n\t\t\t\t0;\r\n\r\n\t\tfor ( ; i < l; i++ ) {\r\n\t\t\tfor ( cur = this[i]; cur && cur !== context; cur = cur.parentNode ) {\r\n\t\t\t\t// Always skip document fragments\r\n\t\t\t\tif ( cur.nodeType < 11 && (pos ?\r\n\t\t\t\t\tpos.index(cur) > -1 :\r\n\r\n\t\t\t\t\t// Don't pass non-elements to Sizzle\r\n\t\t\t\t\tcur.nodeType === 1 &&\r\n\t\t\t\t\t\tjQuery.find.matchesSelector(cur, selectors)) ) {\r\n\r\n\t\t\t\t\tcur = ret.push( cur );\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn this.pushStack( ret.length > 1 ? jQuery.unique( ret ) : ret );\r\n\t},\r\n\r\n\t// Determine the position of an element within\r\n\t// the matched set of elements\r\n\tindex: function( elem ) {\r\n\r\n\t\t// No argument, return index in parent\r\n\t\tif ( !elem ) {\r\n\t\t\treturn ( this[0] && this[0].parentNode ) ? this.first().prevAll().length : -1;\r\n\t\t}\r\n\r\n\t\t// index in selector\r\n\t\tif ( typeof elem === \"string\" ) {\r\n\t\t\treturn jQuery.inArray( this[0], jQuery( elem ) );\r\n\t\t}\r\n\r\n\t\t// Locate the position of the desired element\r\n\t\treturn jQuery.inArray(\r\n\t\t\t// If it receives a jQuery object, the first element is used\r\n\t\t\telem.jquery ? elem[0] : elem, this );\r\n\t},\r\n\r\n\tadd: function( selector, context ) {\r\n\t\tvar set = typeof selector === \"string\" ?\r\n\t\t\t\tjQuery( selector, context ) :\r\n\t\t\t\tjQuery.makeArray( selector && selector.nodeType ? [ selector ] : selector ),\r\n\t\t\tall = jQuery.merge( this.get(), set );\r\n\r\n\t\treturn this.pushStack( jQuery.unique(all) );\r\n\t},\r\n\r\n\taddBack: function( selector ) {\r\n\t\treturn this.add( selector == null ?\r\n\t\t\tthis.prevObject : this.prevObject.filter(selector)\r\n\t\t);\r\n\t}\r\n});\r\n\r\nfunction sibling( cur, dir ) {\r\n\tdo {\r\n\t\tcur = cur[ dir ];\r\n\t} while ( cur && cur.nodeType !== 1 );\r\n\r\n\treturn cur;\r\n}\r\n\r\njQuery.each({\r\n\tparent: function( elem ) {\r\n\t\tvar parent = elem.parentNode;\r\n\t\treturn parent && parent.nodeType !== 11 ? parent : null;\r\n\t},\r\n\tparents: function( elem ) {\r\n\t\treturn jQuery.dir( elem, \"parentNode\" );\r\n\t},\r\n\tparentsUntil: function( elem, i, until ) {\r\n\t\treturn jQuery.dir( elem, \"parentNode\", until );\r\n\t},\r\n\tnext: function( elem ) {\r\n\t\treturn sibling( elem, \"nextSibling\" );\r\n\t},\r\n\tprev: function( elem ) {\r\n\t\treturn sibling( elem, \"previousSibling\" );\r\n\t},\r\n\tnextAll: function( elem ) {\r\n\t\treturn jQuery.dir( elem, \"nextSibling\" );\r\n\t},\r\n\tprevAll: function( elem ) {\r\n\t\treturn jQuery.dir( elem, \"previousSibling\" );\r\n\t},\r\n\tnextUntil: function( elem, i, until ) {\r\n\t\treturn jQuery.dir( elem, \"nextSibling\", until );\r\n\t},\r\n\tprevUntil: function( elem, i, until ) {\r\n\t\treturn jQuery.dir( elem, \"previousSibling\", until );\r\n\t},\r\n\tsiblings: function( elem ) {\r\n\t\treturn jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem );\r\n\t},\r\n\tchildren: function( elem ) {\r\n\t\treturn jQuery.sibling( elem.firstChild );\r\n\t},\r\n\tcontents: function( elem ) {\r\n\t\treturn jQuery.nodeName( elem, \"iframe\" ) ?\r\n\t\t\telem.contentDocument || elem.contentWindow.document :\r\n\t\t\tjQuery.merge( [], elem.childNodes );\r\n\t}\r\n}, function( name, fn ) {\r\n\tjQuery.fn[ name ] = function( until, selector ) {\r\n\t\tvar ret = jQuery.map( this, fn, until );\r\n\r\n\t\tif ( name.slice( -5 ) !== \"Until\" ) {\r\n\t\t\tselector = until;\r\n\t\t}\r\n\r\n\t\tif ( selector && typeof selector === \"string\" ) {\r\n\t\t\tret = jQuery.filter( selector, ret );\r\n\t\t}\r\n\r\n\t\tif ( this.length > 1 ) {\r\n\t\t\t// Remove duplicates\r\n\t\t\tif ( !guaranteedUnique[ name ] ) {\r\n\t\t\t\tret = jQuery.unique( ret );\r\n\t\t\t}\r\n\r\n\t\t\t// Reverse order for parents* and prev-derivatives\r\n\t\t\tif ( rparentsprev.test( name ) ) {\r\n\t\t\t\tret = ret.reverse();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn this.pushStack( ret );\r\n\t};\r\n});\r\n\r\njQuery.extend({\r\n\tfilter: function( expr, elems, not ) {\r\n\t\tvar elem = elems[ 0 ];\r\n\r\n\t\tif ( not ) {\r\n\t\t\texpr = \":not(\" + expr + \")\";\r\n\t\t}\r\n\r\n\t\treturn elems.length === 1 && elem.nodeType === 1 ?\r\n\t\t\tjQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [] :\r\n\t\t\tjQuery.find.matches( expr, jQuery.grep( elems, function( elem ) {\r\n\t\t\t\treturn elem.nodeType === 1;\r\n\t\t\t}));\r\n\t},\r\n\r\n\tdir: function( elem, dir, until ) {\r\n\t\tvar matched = [],\r\n\t\t\tcur = elem[ dir ];\r\n\r\n\t\twhile ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) {\r\n\t\t\tif ( cur.nodeType === 1 ) {\r\n\t\t\t\tmatched.push( cur );\r\n\t\t\t}\r\n\t\t\tcur = cur[dir];\r\n\t\t}\r\n\t\treturn matched;\r\n\t},\r\n\r\n\tsibling: function( n, elem ) {\r\n\t\tvar r = [];\r\n\r\n\t\tfor ( ; n; n = n.nextSibling ) {\r\n\t\t\tif ( n.nodeType === 1 && n !== elem ) {\r\n\t\t\t\tr.push( n );\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn r;\r\n\t}\r\n});\r\n\r\n// Implement the identical functionality for filter and not\r\nfunction winnow( elements, qualifier, not ) {\r\n\tif ( jQuery.isFunction( qualifier ) ) {\r\n\t\treturn jQuery.grep( elements, function( elem, i ) {\r\n\t\t\t/* jshint -W018 */\r\n\t\t\treturn !!qualifier.call( elem, i, elem ) !== not;\r\n\t\t});\r\n\r\n\t}\r\n\r\n\tif ( qualifier.nodeType ) {\r\n\t\treturn jQuery.grep( elements, function( elem ) {\r\n\t\t\treturn ( elem === qualifier ) !== not;\r\n\t\t});\r\n\r\n\t}\r\n\r\n\tif ( typeof qualifier === \"string\" ) {\r\n\t\tif ( isSimple.test( qualifier ) ) {\r\n\t\t\treturn jQuery.filter( qualifier, elements, not );\r\n\t\t}\r\n\r\n\t\tqualifier = jQuery.filter( qualifier, elements );\r\n\t}\r\n\r\n\treturn jQuery.grep( elements, function( elem ) {\r\n\t\treturn ( jQuery.inArray( elem, qualifier ) >= 0 ) !== not;\r\n\t});\r\n}\r\nfunction createSafeFragment( document ) {\r\n\tvar list = nodeNames.split( \"|\" ),\r\n\t\tsafeFrag = document.createDocumentFragment();\r\n\r\n\tif ( safeFrag.createElement ) {\r\n\t\twhile ( list.length ) {\r\n\t\t\tsafeFrag.createElement(\r\n\t\t\t\tlist.pop()\r\n\t\t\t);\r\n\t\t}\r\n\t}\r\n\treturn safeFrag;\r\n}\r\n\r\nvar nodeNames = \"abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|\" +\r\n\t\t\"header|hgroup|mark|meter|nav|output|progress|section|summary|time|video\",\r\n\trinlinejQuery = / jQuery\\d+=\"(?:null|\\d+)\"/g,\r\n\trnoshimcache = new RegExp(\"<(?:\" + nodeNames + \")[\\\\s/>]\", \"i\"),\r\n\trleadingWhitespace = /^\\s+/,\r\n\trxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\\w:]+)[^>]*)\\/>/gi,\r\n\trtagName = /<([\\w:]+)/,\r\n\trtbody = /<tbody/i,\r\n\trhtml = /<|&#?\\w+;/,\r\n\trnoInnerhtml = /<(?:script|style|link)/i,\r\n\tmanipulation_rcheckableType = /^(?:checkbox|radio)$/i,\r\n\t// checked=\"checked\" or checked\r\n\trchecked = /checked\\s*(?:[^=]|=\\s*.checked.)/i,\r\n\trscriptType = /^$|\\/(?:java|ecma)script/i,\r\n\trscriptTypeMasked = /^true\\/(.*)/,\r\n\trcleanScript = /^\\s*<!(?:\\[CDATA\\[|--)|(?:\\]\\]|--)>\\s*$/g,\r\n\r\n\t// We have to close these tags to support XHTML (#13200)\r\n\twrapMap = {\r\n\t\toption: [ 1, \"<select multiple='multiple'>\", \"</select>\" ],\r\n\t\tlegend: [ 1, \"<fieldset>\", \"</fieldset>\" ],\r\n\t\tarea: [ 1, \"<map>\", \"</map>\" ],\r\n\t\tparam: [ 1, \"<object>\", \"</object>\" ],\r\n\t\tthead: [ 1, \"<table>\", \"</table>\" ],\r\n\t\ttr: [ 2, \"<table><tbody>\", \"</tbody></table>\" ],\r\n\t\tcol: [ 2, \"<table><tbody></tbody><colgroup>\", \"</colgroup></table>\" ],\r\n\t\ttd: [ 3, \"<table><tbody><tr>\", \"</tr></tbody></table>\" ],\r\n\r\n\t\t// IE6-8 can't serialize link, script, style, or any html5 (NoScope) tags,\r\n\t\t// unless wrapped in a div with non-breaking characters in front of it.\r\n\t\t_default: jQuery.support.htmlSerialize ? [ 0, \"\", \"\" ] : [ 1, \"X<div>\", \"</div>\"  ]\r\n\t},\r\n\tsafeFragment = createSafeFragment( document ),\r\n\tfragmentDiv = safeFragment.appendChild( document.createElement(\"div\") );\r\n\r\nwrapMap.optgroup = wrapMap.option;\r\nwrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;\r\nwrapMap.th = wrapMap.td;\r\n\r\njQuery.fn.extend({\r\n\ttext: function( value ) {\r\n\t\treturn jQuery.access( this, function( value ) {\r\n\t\t\treturn value === undefined ?\r\n\t\t\t\tjQuery.text( this ) :\r\n\t\t\t\tthis.empty().append( ( this[0] && this[0].ownerDocument || document ).createTextNode( value ) );\r\n\t\t}, null, value, arguments.length );\r\n\t},\r\n\r\n\tappend: function() {\r\n\t\treturn this.domManip( arguments, function( elem ) {\r\n\t\t\tif ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {\r\n\t\t\t\tvar target = manipulationTarget( this, elem );\r\n\t\t\t\ttarget.appendChild( elem );\r\n\t\t\t}\r\n\t\t});\r\n\t},\r\n\r\n\tprepend: function() {\r\n\t\treturn this.domManip( arguments, function( elem ) {\r\n\t\t\tif ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {\r\n\t\t\t\tvar target = manipulationTarget( this, elem );\r\n\t\t\t\ttarget.insertBefore( elem, target.firstChild );\r\n\t\t\t}\r\n\t\t});\r\n\t},\r\n\r\n\tbefore: function() {\r\n\t\treturn this.domManip( arguments, function( elem ) {\r\n\t\t\tif ( this.parentNode ) {\r\n\t\t\t\tthis.parentNode.insertBefore( elem, this );\r\n\t\t\t}\r\n\t\t});\r\n\t},\r\n\r\n\tafter: function() {\r\n\t\treturn this.domManip( arguments, function( elem ) {\r\n\t\t\tif ( this.parentNode ) {\r\n\t\t\t\tthis.parentNode.insertBefore( elem, this.nextSibling );\r\n\t\t\t}\r\n\t\t});\r\n\t},\r\n\r\n\t// keepData is for internal use only--do not document\r\n\tremove: function( selector, keepData ) {\r\n\t\tvar elem,\r\n\t\t\telems = selector ? jQuery.filter( selector, this ) : this,\r\n\t\t\ti = 0;\r\n\r\n\t\tfor ( ; (elem = elems[i]) != null; i++ ) {\r\n\r\n\t\t\tif ( !keepData && elem.nodeType === 1 ) {\r\n\t\t\t\tjQuery.cleanData( getAll( elem ) );\r\n\t\t\t}\r\n\r\n\t\t\tif ( elem.parentNode ) {\r\n\t\t\t\tif ( keepData && jQuery.contains( elem.ownerDocument, elem ) ) {\r\n\t\t\t\t\tsetGlobalEval( getAll( elem, \"script\" ) );\r\n\t\t\t\t}\r\n\t\t\t\telem.parentNode.removeChild( elem );\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\tempty: function() {\r\n\t\tvar elem,\r\n\t\t\ti = 0;\r\n\r\n\t\tfor ( ; (elem = this[i]) != null; i++ ) {\r\n\t\t\t// Remove element nodes and prevent memory leaks\r\n\t\t\tif ( elem.nodeType === 1 ) {\r\n\t\t\t\tjQuery.cleanData( getAll( elem, false ) );\r\n\t\t\t}\r\n\r\n\t\t\t// Remove any remaining nodes\r\n\t\t\twhile ( elem.firstChild ) {\r\n\t\t\t\telem.removeChild( elem.firstChild );\r\n\t\t\t}\r\n\r\n\t\t\t// If this is a select, ensure that it displays empty (#12336)\r\n\t\t\t// Support: IE<9\r\n\t\t\tif ( elem.options && jQuery.nodeName( elem, \"select\" ) ) {\r\n\t\t\t\telem.options.length = 0;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\tclone: function( dataAndEvents, deepDataAndEvents ) {\r\n\t\tdataAndEvents = dataAndEvents == null ? false : dataAndEvents;\r\n\t\tdeepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;\r\n\r\n\t\treturn this.map( function () {\r\n\t\t\treturn jQuery.clone( this, dataAndEvents, deepDataAndEvents );\r\n\t\t});\r\n\t},\r\n\r\n\thtml: function( value ) {\r\n\t\treturn jQuery.access( this, function( value ) {\r\n\t\t\tvar elem = this[0] || {},\r\n\t\t\t\ti = 0,\r\n\t\t\t\tl = this.length;\r\n\r\n\t\t\tif ( value === undefined ) {\r\n\t\t\t\treturn elem.nodeType === 1 ?\r\n\t\t\t\t\telem.innerHTML.replace( rinlinejQuery, \"\" ) :\r\n\t\t\t\t\tundefined;\r\n\t\t\t}\r\n\r\n\t\t\t// See if we can take a shortcut and just use innerHTML\r\n\t\t\tif ( typeof value === \"string\" && !rnoInnerhtml.test( value ) &&\r\n\t\t\t\t( jQuery.support.htmlSerialize || !rnoshimcache.test( value )  ) &&\r\n\t\t\t\t( jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value ) ) &&\r\n\t\t\t\t!wrapMap[ ( rtagName.exec( value ) || [\"\", \"\"] )[1].toLowerCase() ] ) {\r\n\r\n\t\t\t\tvalue = value.replace( rxhtmlTag, \"<$1></$2>\" );\r\n\r\n\t\t\t\ttry {\r\n\t\t\t\t\tfor (; i < l; i++ ) {\r\n\t\t\t\t\t\t// Remove element nodes and prevent memory leaks\r\n\t\t\t\t\t\telem = this[i] || {};\r\n\t\t\t\t\t\tif ( elem.nodeType === 1 ) {\r\n\t\t\t\t\t\t\tjQuery.cleanData( getAll( elem, false ) );\r\n\t\t\t\t\t\t\telem.innerHTML = value;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\telem = 0;\r\n\r\n\t\t\t\t// If using innerHTML throws an exception, use the fallback method\r\n\t\t\t\t} catch(e) {}\r\n\t\t\t}\r\n\r\n\t\t\tif ( elem ) {\r\n\t\t\t\tthis.empty().append( value );\r\n\t\t\t}\r\n\t\t}, null, value, arguments.length );\r\n\t},\r\n\r\n\treplaceWith: function() {\r\n\t\tvar\r\n\t\t\t// Snapshot the DOM in case .domManip sweeps something relevant into its fragment\r\n\t\t\targs = jQuery.map( this, function( elem ) {\r\n\t\t\t\treturn [ elem.nextSibling, elem.parentNode ];\r\n\t\t\t}),\r\n\t\t\ti = 0;\r\n\r\n\t\t// Make the changes, replacing each context element with the new content\r\n\t\tthis.domManip( arguments, function( elem ) {\r\n\t\t\tvar next = args[ i++ ],\r\n\t\t\t\tparent = args[ i++ ];\r\n\r\n\t\t\tif ( parent ) {\r\n\t\t\t\t// Don't use the snapshot next if it has moved (#13810)\r\n\t\t\t\tif ( next && next.parentNode !== parent ) {\r\n\t\t\t\t\tnext = this.nextSibling;\r\n\t\t\t\t}\r\n\t\t\t\tjQuery( this ).remove();\r\n\t\t\t\tparent.insertBefore( elem, next );\r\n\t\t\t}\r\n\t\t// Allow new content to include elements from the context set\r\n\t\t}, true );\r\n\r\n\t\t// Force removal if there was no new content (e.g., from empty arguments)\r\n\t\treturn i ? this : this.remove();\r\n\t},\r\n\r\n\tdetach: function( selector ) {\r\n\t\treturn this.remove( selector, true );\r\n\t},\r\n\r\n\tdomManip: function( args, callback, allowIntersection ) {\r\n\r\n\t\t// Flatten any nested arrays\r\n\t\targs = core_concat.apply( [], args );\r\n\r\n\t\tvar first, node, hasScripts,\r\n\t\t\tscripts, doc, fragment,\r\n\t\t\ti = 0,\r\n\t\t\tl = this.length,\r\n\t\t\tset = this,\r\n\t\t\tiNoClone = l - 1,\r\n\t\t\tvalue = args[0],\r\n\t\t\tisFunction = jQuery.isFunction( value );\r\n\r\n\t\t// We can't cloneNode fragments that contain checked, in WebKit\r\n\t\tif ( isFunction || !( l <= 1 || typeof value !== \"string\" || jQuery.support.checkClone || !rchecked.test( value ) ) ) {\r\n\t\t\treturn this.each(function( index ) {\r\n\t\t\t\tvar self = set.eq( index );\r\n\t\t\t\tif ( isFunction ) {\r\n\t\t\t\t\targs[0] = value.call( this, index, self.html() );\r\n\t\t\t\t}\r\n\t\t\t\tself.domManip( args, callback, allowIntersection );\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tif ( l ) {\r\n\t\t\tfragment = jQuery.buildFragment( args, this[ 0 ].ownerDocument, false, !allowIntersection && this );\r\n\t\t\tfirst = fragment.firstChild;\r\n\r\n\t\t\tif ( fragment.childNodes.length === 1 ) {\r\n\t\t\t\tfragment = first;\r\n\t\t\t}\r\n\r\n\t\t\tif ( first ) {\r\n\t\t\t\tscripts = jQuery.map( getAll( fragment, \"script\" ), disableScript );\r\n\t\t\t\thasScripts = scripts.length;\r\n\r\n\t\t\t\t// Use the original fragment for the last item instead of the first because it can end up\r\n\t\t\t\t// being emptied incorrectly in certain situations (#8070).\r\n\t\t\t\tfor ( ; i < l; i++ ) {\r\n\t\t\t\t\tnode = fragment;\r\n\r\n\t\t\t\t\tif ( i !== iNoClone ) {\r\n\t\t\t\t\t\tnode = jQuery.clone( node, true, true );\r\n\r\n\t\t\t\t\t\t// Keep references to cloned scripts for later restoration\r\n\t\t\t\t\t\tif ( hasScripts ) {\r\n\t\t\t\t\t\t\tjQuery.merge( scripts, getAll( node, \"script\" ) );\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tcallback.call( this[i], node, i );\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif ( hasScripts ) {\r\n\t\t\t\t\tdoc = scripts[ scripts.length - 1 ].ownerDocument;\r\n\r\n\t\t\t\t\t// Reenable scripts\r\n\t\t\t\t\tjQuery.map( scripts, restoreScript );\r\n\r\n\t\t\t\t\t// Evaluate executable scripts on first document insertion\r\n\t\t\t\t\tfor ( i = 0; i < hasScripts; i++ ) {\r\n\t\t\t\t\t\tnode = scripts[ i ];\r\n\t\t\t\t\t\tif ( rscriptType.test( node.type || \"\" ) &&\r\n\t\t\t\t\t\t\t!jQuery._data( node, \"globalEval\" ) && jQuery.contains( doc, node ) ) {\r\n\r\n\t\t\t\t\t\t\tif ( node.src ) {\r\n\t\t\t\t\t\t\t\t// Hope ajax is available...\r\n\t\t\t\t\t\t\t\tjQuery._evalUrl( node.src );\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tjQuery.globalEval( ( node.text || node.textContent || node.innerHTML || \"\" ).replace( rcleanScript, \"\" ) );\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Fix #11809: Avoid leaking memory\r\n\t\t\t\tfragment = first = null;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t}\r\n});\r\n\r\n// Support: IE<8\r\n// Manipulating tables requires a tbody\r\nfunction manipulationTarget( elem, content ) {\r\n\treturn jQuery.nodeName( elem, \"table\" ) &&\r\n\t\tjQuery.nodeName( content.nodeType === 1 ? content : content.firstChild, \"tr\" ) ?\r\n\r\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\r\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\r\n\t\telem;\r\n}\r\n\r\n// Replace/restore the type attribute of script elements for safe DOM manipulation\r\nfunction disableScript( elem ) {\r\n\telem.type = (jQuery.find.attr( elem, \"type\" ) !== null) + \"/\" + elem.type;\r\n\treturn elem;\r\n}\r\nfunction restoreScript( elem ) {\r\n\tvar match = rscriptTypeMasked.exec( elem.type );\r\n\tif ( match ) {\r\n\t\telem.type = match[1];\r\n\t} else {\r\n\t\telem.removeAttribute(\"type\");\r\n\t}\r\n\treturn elem;\r\n}\r\n\r\n// Mark scripts as having already been evaluated\r\nfunction setGlobalEval( elems, refElements ) {\r\n\tvar elem,\r\n\t\ti = 0;\r\n\tfor ( ; (elem = elems[i]) != null; i++ ) {\r\n\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\r\n\t}\r\n}\r\n\r\nfunction cloneCopyEvent( src, dest ) {\r\n\r\n\tif ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) {\r\n\t\treturn;\r\n\t}\r\n\r\n\tvar type, i, l,\r\n\t\toldData = jQuery._data( src ),\r\n\t\tcurData = jQuery._data( dest, oldData ),\r\n\t\tevents = oldData.events;\r\n\r\n\tif ( events ) {\r\n\t\tdelete curData.handle;\r\n\t\tcurData.events = {};\r\n\r\n\t\tfor ( type in events ) {\r\n\t\t\tfor ( i = 0, l = events[ type ].length; i < l; i++ ) {\r\n\t\t\t\tjQuery.event.add( dest, type, events[ type ][ i ] );\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t// make the cloned public data object a copy from the original\r\n\tif ( curData.data ) {\r\n\t\tcurData.data = jQuery.extend( {}, curData.data );\r\n\t}\r\n}\r\n\r\nfunction fixCloneNodeIssues( src, dest ) {\r\n\tvar nodeName, e, data;\r\n\r\n\t// We do not need to do anything for non-Elements\r\n\tif ( dest.nodeType !== 1 ) {\r\n\t\treturn;\r\n\t}\r\n\r\n\tnodeName = dest.nodeName.toLowerCase();\r\n\r\n\t// IE6-8 copies events bound via attachEvent when using cloneNode.\r\n\tif ( !jQuery.support.noCloneEvent && dest[ jQuery.expando ] ) {\r\n\t\tdata = jQuery._data( dest );\r\n\r\n\t\tfor ( e in data.events ) {\r\n\t\t\tjQuery.removeEvent( dest, e, data.handle );\r\n\t\t}\r\n\r\n\t\t// Event data gets referenced instead of copied if the expando gets copied too\r\n\t\tdest.removeAttribute( jQuery.expando );\r\n\t}\r\n\r\n\t// IE blanks contents when cloning scripts, and tries to evaluate newly-set text\r\n\tif ( nodeName === \"script\" && dest.text !== src.text ) {\r\n\t\tdisableScript( dest ).text = src.text;\r\n\t\trestoreScript( dest );\r\n\r\n\t// IE6-10 improperly clones children of object elements using classid.\r\n\t// IE10 throws NoModificationAllowedError if parent is null, #12132.\r\n\t} else if ( nodeName === \"object\" ) {\r\n\t\tif ( dest.parentNode ) {\r\n\t\t\tdest.outerHTML = src.outerHTML;\r\n\t\t}\r\n\r\n\t\t// This path appears unavoidable for IE9. When cloning an object\r\n\t\t// element in IE9, the outerHTML strategy above is not sufficient.\r\n\t\t// If the src has innerHTML and the destination does not,\r\n\t\t// copy the src.innerHTML into the dest.innerHTML. #10324\r\n\t\tif ( jQuery.support.html5Clone && ( src.innerHTML && !jQuery.trim(dest.innerHTML) ) ) {\r\n\t\t\tdest.innerHTML = src.innerHTML;\r\n\t\t}\r\n\r\n\t} else if ( nodeName === \"input\" && manipulation_rcheckableType.test( src.type ) ) {\r\n\t\t// IE6-8 fails to persist the checked state of a cloned checkbox\r\n\t\t// or radio button. Worse, IE6-7 fail to give the cloned element\r\n\t\t// a checked appearance if the defaultChecked value isn't also set\r\n\r\n\t\tdest.defaultChecked = dest.checked = src.checked;\r\n\r\n\t\t// IE6-7 get confused and end up setting the value of a cloned\r\n\t\t// checkbox/radio button to an empty string instead of \"on\"\r\n\t\tif ( dest.value !== src.value ) {\r\n\t\t\tdest.value = src.value;\r\n\t\t}\r\n\r\n\t// IE6-8 fails to return the selected option to the default selected\r\n\t// state when cloning options\r\n\t} else if ( nodeName === \"option\" ) {\r\n\t\tdest.defaultSelected = dest.selected = src.defaultSelected;\r\n\r\n\t// IE6-8 fails to set the defaultValue to the correct value when\r\n\t// cloning other types of input fields\r\n\t} else if ( nodeName === \"input\" || nodeName === \"textarea\" ) {\r\n\t\tdest.defaultValue = src.defaultValue;\r\n\t}\r\n}\r\n\r\njQuery.each({\r\n\tappendTo: \"append\",\r\n\tprependTo: \"prepend\",\r\n\tinsertBefore: \"before\",\r\n\tinsertAfter: \"after\",\r\n\treplaceAll: \"replaceWith\"\r\n}, function( name, original ) {\r\n\tjQuery.fn[ name ] = function( selector ) {\r\n\t\tvar elems,\r\n\t\t\ti = 0,\r\n\t\t\tret = [],\r\n\t\t\tinsert = jQuery( selector ),\r\n\t\t\tlast = insert.length - 1;\r\n\r\n\t\tfor ( ; i <= last; i++ ) {\r\n\t\t\telems = i === last ? this : this.clone(true);\r\n\t\t\tjQuery( insert[i] )[ original ]( elems );\r\n\r\n\t\t\t// Modern browsers can apply jQuery collections as arrays, but oldIE needs a .get()\r\n\t\t\tcore_push.apply( ret, elems.get() );\r\n\t\t}\r\n\r\n\t\treturn this.pushStack( ret );\r\n\t};\r\n});\r\n\r\nfunction getAll( context, tag ) {\r\n\tvar elems, elem,\r\n\t\ti = 0,\r\n\t\tfound = typeof context.getElementsByTagName !== core_strundefined ? context.getElementsByTagName( tag || \"*\" ) :\r\n\t\t\ttypeof context.querySelectorAll !== core_strundefined ? context.querySelectorAll( tag || \"*\" ) :\r\n\t\t\tundefined;\r\n\r\n\tif ( !found ) {\r\n\t\tfor ( found = [], elems = context.childNodes || context; (elem = elems[i]) != null; i++ ) {\r\n\t\t\tif ( !tag || jQuery.nodeName( elem, tag ) ) {\r\n\t\t\t\tfound.push( elem );\r\n\t\t\t} else {\r\n\t\t\t\tjQuery.merge( found, getAll( elem, tag ) );\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\treturn tag === undefined || tag && jQuery.nodeName( context, tag ) ?\r\n\t\tjQuery.merge( [ context ], found ) :\r\n\t\tfound;\r\n}\r\n\r\n// Used in buildFragment, fixes the defaultChecked property\r\nfunction fixDefaultChecked( elem ) {\r\n\tif ( manipulation_rcheckableType.test( elem.type ) ) {\r\n\t\telem.defaultChecked = elem.checked;\r\n\t}\r\n}\r\n\r\njQuery.extend({\r\n\tclone: function( elem, dataAndEvents, deepDataAndEvents ) {\r\n\t\tvar destElements, node, clone, i, srcElements,\r\n\t\t\tinPage = jQuery.contains( elem.ownerDocument, elem );\r\n\r\n\t\tif ( jQuery.support.html5Clone || jQuery.isXMLDoc(elem) || !rnoshimcache.test( \"<\" + elem.nodeName + \">\" ) ) {\r\n\t\t\tclone = elem.cloneNode( true );\r\n\r\n\t\t// IE<=8 does not properly clone detached, unknown element nodes\r\n\t\t} else {\r\n\t\t\tfragmentDiv.innerHTML = elem.outerHTML;\r\n\t\t\tfragmentDiv.removeChild( clone = fragmentDiv.firstChild );\r\n\t\t}\r\n\r\n\t\tif ( (!jQuery.support.noCloneEvent || !jQuery.support.noCloneChecked) &&\r\n\t\t\t\t(elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem) ) {\r\n\r\n\t\t\t// We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2\r\n\t\t\tdestElements = getAll( clone );\r\n\t\t\tsrcElements = getAll( elem );\r\n\r\n\t\t\t// Fix all IE cloning issues\r\n\t\t\tfor ( i = 0; (node = srcElements[i]) != null; ++i ) {\r\n\t\t\t\t// Ensure that the destination node is not null; Fixes #9587\r\n\t\t\t\tif ( destElements[i] ) {\r\n\t\t\t\t\tfixCloneNodeIssues( node, destElements[i] );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Copy the events from the original to the clone\r\n\t\tif ( dataAndEvents ) {\r\n\t\t\tif ( deepDataAndEvents ) {\r\n\t\t\t\tsrcElements = srcElements || getAll( elem );\r\n\t\t\t\tdestElements = destElements || getAll( clone );\r\n\r\n\t\t\t\tfor ( i = 0; (node = srcElements[i]) != null; i++ ) {\r\n\t\t\t\t\tcloneCopyEvent( node, destElements[i] );\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tcloneCopyEvent( elem, clone );\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Preserve script evaluation history\r\n\t\tdestElements = getAll( clone, \"script\" );\r\n\t\tif ( destElements.length > 0 ) {\r\n\t\t\tsetGlobalEval( destElements, !inPage && getAll( elem, \"script\" ) );\r\n\t\t}\r\n\r\n\t\tdestElements = srcElements = node = null;\r\n\r\n\t\t// Return the cloned set\r\n\t\treturn clone;\r\n\t},\r\n\r\n\tbuildFragment: function( elems, context, scripts, selection ) {\r\n\t\tvar j, elem, contains,\r\n\t\t\ttmp, tag, tbody, wrap,\r\n\t\t\tl = elems.length,\r\n\r\n\t\t\t// Ensure a safe fragment\r\n\t\t\tsafe = createSafeFragment( context ),\r\n\r\n\t\t\tnodes = [],\r\n\t\t\ti = 0;\r\n\r\n\t\tfor ( ; i < l; i++ ) {\r\n\t\t\telem = elems[ i ];\r\n\r\n\t\t\tif ( elem || elem === 0 ) {\r\n\r\n\t\t\t\t// Add nodes directly\r\n\t\t\t\tif ( jQuery.type( elem ) === \"object\" ) {\r\n\t\t\t\t\tjQuery.merge( nodes, elem.nodeType ? [ elem ] : elem );\r\n\r\n\t\t\t\t// Convert non-html into a text node\r\n\t\t\t\t} else if ( !rhtml.test( elem ) ) {\r\n\t\t\t\t\tnodes.push( context.createTextNode( elem ) );\r\n\r\n\t\t\t\t// Convert html into DOM nodes\r\n\t\t\t\t} else {\r\n\t\t\t\t\ttmp = tmp || safe.appendChild( context.createElement(\"div\") );\r\n\r\n\t\t\t\t\t// Deserialize a standard representation\r\n\t\t\t\t\ttag = ( rtagName.exec( elem ) || [\"\", \"\"] )[1].toLowerCase();\r\n\t\t\t\t\twrap = wrapMap[ tag ] || wrapMap._default;\r\n\r\n\t\t\t\t\ttmp.innerHTML = wrap[1] + elem.replace( rxhtmlTag, \"<$1></$2>\" ) + wrap[2];\r\n\r\n\t\t\t\t\t// Descend through wrappers to the right content\r\n\t\t\t\t\tj = wrap[0];\r\n\t\t\t\t\twhile ( j-- ) {\r\n\t\t\t\t\t\ttmp = tmp.lastChild;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// Manually add leading whitespace removed by IE\r\n\t\t\t\t\tif ( !jQuery.support.leadingWhitespace && rleadingWhitespace.test( elem ) ) {\r\n\t\t\t\t\t\tnodes.push( context.createTextNode( rleadingWhitespace.exec( elem )[0] ) );\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// Remove IE's autoinserted <tbody> from table fragments\r\n\t\t\t\t\tif ( !jQuery.support.tbody ) {\r\n\r\n\t\t\t\t\t\t// String was a <table>, *may* have spurious <tbody>\r\n\t\t\t\t\t\telem = tag === \"table\" && !rtbody.test( elem ) ?\r\n\t\t\t\t\t\t\ttmp.firstChild :\r\n\r\n\t\t\t\t\t\t\t// String was a bare <thead> or <tfoot>\r\n\t\t\t\t\t\t\twrap[1] === \"<table>\" && !rtbody.test( elem ) ?\r\n\t\t\t\t\t\t\t\ttmp :\r\n\t\t\t\t\t\t\t\t0;\r\n\r\n\t\t\t\t\t\tj = elem && elem.childNodes.length;\r\n\t\t\t\t\t\twhile ( j-- ) {\r\n\t\t\t\t\t\t\tif ( jQuery.nodeName( (tbody = elem.childNodes[j]), \"tbody\" ) && !tbody.childNodes.length ) {\r\n\t\t\t\t\t\t\t\telem.removeChild( tbody );\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tjQuery.merge( nodes, tmp.childNodes );\r\n\r\n\t\t\t\t\t// Fix #12392 for WebKit and IE > 9\r\n\t\t\t\t\ttmp.textContent = \"\";\r\n\r\n\t\t\t\t\t// Fix #12392 for oldIE\r\n\t\t\t\t\twhile ( tmp.firstChild ) {\r\n\t\t\t\t\t\ttmp.removeChild( tmp.firstChild );\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// Remember the top-level container for proper cleanup\r\n\t\t\t\t\ttmp = safe.lastChild;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Fix #11356: Clear elements from fragment\r\n\t\tif ( tmp ) {\r\n\t\t\tsafe.removeChild( tmp );\r\n\t\t}\r\n\r\n\t\t// Reset defaultChecked for any radios and checkboxes\r\n\t\t// about to be appended to the DOM in IE 6/7 (#8060)\r\n\t\tif ( !jQuery.support.appendChecked ) {\r\n\t\t\tjQuery.grep( getAll( nodes, \"input\" ), fixDefaultChecked );\r\n\t\t}\r\n\r\n\t\ti = 0;\r\n\t\twhile ( (elem = nodes[ i++ ]) ) {\r\n\r\n\t\t\t// #4087 - If origin and destination elements are the same, and this is\r\n\t\t\t// that element, do not do anything\r\n\t\t\tif ( selection && jQuery.inArray( elem, selection ) !== -1 ) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tcontains = jQuery.contains( elem.ownerDocument, elem );\r\n\r\n\t\t\t// Append to fragment\r\n\t\t\ttmp = getAll( safe.appendChild( elem ), \"script\" );\r\n\r\n\t\t\t// Preserve script evaluation history\r\n\t\t\tif ( contains ) {\r\n\t\t\t\tsetGlobalEval( tmp );\r\n\t\t\t}\r\n\r\n\t\t\t// Capture executables\r\n\t\t\tif ( scripts ) {\r\n\t\t\t\tj = 0;\r\n\t\t\t\twhile ( (elem = tmp[ j++ ]) ) {\r\n\t\t\t\t\tif ( rscriptType.test( elem.type || \"\" ) ) {\r\n\t\t\t\t\t\tscripts.push( elem );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\ttmp = null;\r\n\r\n\t\treturn safe;\r\n\t},\r\n\r\n\tcleanData: function( elems, /* internal */ acceptData ) {\r\n\t\tvar elem, type, id, data,\r\n\t\t\ti = 0,\r\n\t\t\tinternalKey = jQuery.expando,\r\n\t\t\tcache = jQuery.cache,\r\n\t\t\tdeleteExpando = jQuery.support.deleteExpando,\r\n\t\t\tspecial = jQuery.event.special;\r\n\r\n\t\tfor ( ; (elem = elems[i]) != null; i++ ) {\r\n\r\n\t\t\tif ( acceptData || jQuery.acceptData( elem ) ) {\r\n\r\n\t\t\t\tid = elem[ internalKey ];\r\n\t\t\t\tdata = id && cache[ id ];\r\n\r\n\t\t\t\tif ( data ) {\r\n\t\t\t\t\tif ( data.events ) {\r\n\t\t\t\t\t\tfor ( type in data.events ) {\r\n\t\t\t\t\t\t\tif ( special[ type ] ) {\r\n\t\t\t\t\t\t\t\tjQuery.event.remove( elem, type );\r\n\r\n\t\t\t\t\t\t\t// This is a shortcut to avoid jQuery.event.remove's overhead\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tjQuery.removeEvent( elem, type, data.handle );\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// Remove cache only if it was not already removed by jQuery.event.remove\r\n\t\t\t\t\tif ( cache[ id ] ) {\r\n\r\n\t\t\t\t\t\tdelete cache[ id ];\r\n\r\n\t\t\t\t\t\t// IE does not allow us to delete expando properties from nodes,\r\n\t\t\t\t\t\t// nor does it have a removeAttribute function on Document nodes;\r\n\t\t\t\t\t\t// we must handle all of these cases\r\n\t\t\t\t\t\tif ( deleteExpando ) {\r\n\t\t\t\t\t\t\tdelete elem[ internalKey ];\r\n\r\n\t\t\t\t\t\t} else if ( typeof elem.removeAttribute !== core_strundefined ) {\r\n\t\t\t\t\t\t\telem.removeAttribute( internalKey );\r\n\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\telem[ internalKey ] = null;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tcore_deletedIds.push( id );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\t_evalUrl: function( url ) {\r\n\t\treturn jQuery.ajax({\r\n\t\t\turl: url,\r\n\t\t\ttype: \"GET\",\r\n\t\t\tdataType: \"script\",\r\n\t\t\tasync: false,\r\n\t\t\tglobal: false,\r\n\t\t\t\"throws\": true\r\n\t\t});\r\n\t}\r\n});\r\njQuery.fn.extend({\r\n\twrapAll: function( html ) {\r\n\t\tif ( jQuery.isFunction( html ) ) {\r\n\t\t\treturn this.each(function(i) {\r\n\t\t\t\tjQuery(this).wrapAll( html.call(this, i) );\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tif ( this[0] ) {\r\n\t\t\t// The elements to wrap the target around\r\n\t\t\tvar wrap = jQuery( html, this[0].ownerDocument ).eq(0).clone(true);\r\n\r\n\t\t\tif ( this[0].parentNode ) {\r\n\t\t\t\twrap.insertBefore( this[0] );\r\n\t\t\t}\r\n\r\n\t\t\twrap.map(function() {\r\n\t\t\t\tvar elem = this;\r\n\r\n\t\t\t\twhile ( elem.firstChild && elem.firstChild.nodeType === 1 ) {\r\n\t\t\t\t\telem = elem.firstChild;\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn elem;\r\n\t\t\t}).append( this );\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\twrapInner: function( html ) {\r\n\t\tif ( jQuery.isFunction( html ) ) {\r\n\t\t\treturn this.each(function(i) {\r\n\t\t\t\tjQuery(this).wrapInner( html.call(this, i) );\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn this.each(function() {\r\n\t\t\tvar self = jQuery( this ),\r\n\t\t\t\tcontents = self.contents();\r\n\r\n\t\t\tif ( contents.length ) {\r\n\t\t\t\tcontents.wrapAll( html );\r\n\r\n\t\t\t} else {\r\n\t\t\t\tself.append( html );\r\n\t\t\t}\r\n\t\t});\r\n\t},\r\n\r\n\twrap: function( html ) {\r\n\t\tvar isFunction = jQuery.isFunction( html );\r\n\r\n\t\treturn this.each(function(i) {\r\n\t\t\tjQuery( this ).wrapAll( isFunction ? html.call(this, i) : html );\r\n\t\t});\r\n\t},\r\n\r\n\tunwrap: function() {\r\n\t\treturn this.parent().each(function() {\r\n\t\t\tif ( !jQuery.nodeName( this, \"body\" ) ) {\r\n\t\t\t\tjQuery( this ).replaceWith( this.childNodes );\r\n\t\t\t}\r\n\t\t}).end();\r\n\t}\r\n});\r\nvar iframe, getStyles, curCSS,\r\n\tralpha = /alpha\\([^)]*\\)/i,\r\n\tropacity = /opacity\\s*=\\s*([^)]*)/,\r\n\trposition = /^(top|right|bottom|left)$/,\r\n\t// swappable if display is none or starts with table except \"table\", \"table-cell\", or \"table-caption\"\r\n\t// see here for display values: https://developer.mozilla.org/en-US/docs/CSS/display\r\n\trdisplayswap = /^(none|table(?!-c[ea]).+)/,\r\n\trmargin = /^margin/,\r\n\trnumsplit = new RegExp( \"^(\" + core_pnum + \")(.*)$\", \"i\" ),\r\n\trnumnonpx = new RegExp( \"^(\" + core_pnum + \")(?!px)[a-z%]+$\", \"i\" ),\r\n\trrelNum = new RegExp( \"^([+-])=(\" + core_pnum + \")\", \"i\" ),\r\n\telemdisplay = { BODY: \"block\" },\r\n\r\n\tcssShow = { position: \"absolute\", visibility: \"hidden\", display: \"block\" },\r\n\tcssNormalTransform = {\r\n\t\tletterSpacing: 0,\r\n\t\tfontWeight: 400\r\n\t},\r\n\r\n\tcssExpand = [ \"Top\", \"Right\", \"Bottom\", \"Left\" ],\r\n\tcssPrefixes = [ \"Webkit\", \"O\", \"Moz\", \"ms\" ];\r\n\r\n// return a css property mapped to a potentially vendor prefixed property\r\nfunction vendorPropName( style, name ) {\r\n\r\n\t// shortcut for names that are not vendor prefixed\r\n\tif ( name in style ) {\r\n\t\treturn name;\r\n\t}\r\n\r\n\t// check for vendor prefixed names\r\n\tvar capName = name.charAt(0).toUpperCase() + name.slice(1),\r\n\t\torigName = name,\r\n\t\ti = cssPrefixes.length;\r\n\r\n\twhile ( i-- ) {\r\n\t\tname = cssPrefixes[ i ] + capName;\r\n\t\tif ( name in style ) {\r\n\t\t\treturn name;\r\n\t\t}\r\n\t}\r\n\r\n\treturn origName;\r\n}\r\n\r\nfunction isHidden( elem, el ) {\r\n\t// isHidden might be called from jQuery#filter function;\r\n\t// in that case, element will be second argument\r\n\telem = el || elem;\r\n\treturn jQuery.css( elem, \"display\" ) === \"none\" || !jQuery.contains( elem.ownerDocument, elem );\r\n}\r\n\r\nfunction showHide( elements, show ) {\r\n\tvar display, elem, hidden,\r\n\t\tvalues = [],\r\n\t\tindex = 0,\r\n\t\tlength = elements.length;\r\n\r\n\tfor ( ; index < length; index++ ) {\r\n\t\telem = elements[ index ];\r\n\t\tif ( !elem.style ) {\r\n\t\t\tcontinue;\r\n\t\t}\r\n\r\n\t\tvalues[ index ] = jQuery._data( elem, \"olddisplay\" );\r\n\t\tdisplay = elem.style.display;\r\n\t\tif ( show ) {\r\n\t\t\t// Reset the inline display of this element to learn if it is\r\n\t\t\t// being hidden by cascaded rules or not\r\n\t\t\tif ( !values[ index ] && display === \"none\" ) {\r\n\t\t\t\telem.style.display = \"\";\r\n\t\t\t}\r\n\r\n\t\t\t// Set elements which have been overridden with display: none\r\n\t\t\t// in a stylesheet to whatever the default browser style is\r\n\t\t\t// for such an element\r\n\t\t\tif ( elem.style.display === \"\" && isHidden( elem ) ) {\r\n\t\t\t\tvalues[ index ] = jQuery._data( elem, \"olddisplay\", css_defaultDisplay(elem.nodeName) );\r\n\t\t\t}\r\n\t\t} else {\r\n\r\n\t\t\tif ( !values[ index ] ) {\r\n\t\t\t\thidden = isHidden( elem );\r\n\r\n\t\t\t\tif ( display && display !== \"none\" || !hidden ) {\r\n\t\t\t\t\tjQuery._data( elem, \"olddisplay\", hidden ? display : jQuery.css( elem, \"display\" ) );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t// Set the display of most of the elements in a second loop\r\n\t// to avoid the constant reflow\r\n\tfor ( index = 0; index < length; index++ ) {\r\n\t\telem = elements[ index ];\r\n\t\tif ( !elem.style ) {\r\n\t\t\tcontinue;\r\n\t\t}\r\n\t\tif ( !show || elem.style.display === \"none\" || elem.style.display === \"\" ) {\r\n\t\t\telem.style.display = show ? values[ index ] || \"\" : \"none\";\r\n\t\t}\r\n\t}\r\n\r\n\treturn elements;\r\n}\r\n\r\njQuery.fn.extend({\r\n\tcss: function( name, value ) {\r\n\t\treturn jQuery.access( this, function( elem, name, value ) {\r\n\t\t\tvar len, styles,\r\n\t\t\t\tmap = {},\r\n\t\t\t\ti = 0;\r\n\r\n\t\t\tif ( jQuery.isArray( name ) ) {\r\n\t\t\t\tstyles = getStyles( elem );\r\n\t\t\t\tlen = name.length;\r\n\r\n\t\t\t\tfor ( ; i < len; i++ ) {\r\n\t\t\t\t\tmap[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles );\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn map;\r\n\t\t\t}\r\n\r\n\t\t\treturn value !== undefined ?\r\n\t\t\t\tjQuery.style( elem, name, value ) :\r\n\t\t\t\tjQuery.css( elem, name );\r\n\t\t}, name, value, arguments.length > 1 );\r\n\t},\r\n\tshow: function() {\r\n\t\treturn showHide( this, true );\r\n\t},\r\n\thide: function() {\r\n\t\treturn showHide( this );\r\n\t},\r\n\ttoggle: function( state ) {\r\n\t\tif ( typeof state === \"boolean\" ) {\r\n\t\t\treturn state ? this.show() : this.hide();\r\n\t\t}\r\n\r\n\t\treturn this.each(function() {\r\n\t\t\tif ( isHidden( this ) ) {\r\n\t\t\t\tjQuery( this ).show();\r\n\t\t\t} else {\r\n\t\t\t\tjQuery( this ).hide();\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n});\r\n\r\njQuery.extend({\r\n\t// Add in style property hooks for overriding the default\r\n\t// behavior of getting and setting a style property\r\n\tcssHooks: {\r\n\t\topacity: {\r\n\t\t\tget: function( elem, computed ) {\r\n\t\t\t\tif ( computed ) {\r\n\t\t\t\t\t// We should always get a number back from opacity\r\n\t\t\t\t\tvar ret = curCSS( elem, \"opacity\" );\r\n\t\t\t\t\treturn ret === \"\" ? \"1\" : ret;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\t// Don't automatically add \"px\" to these possibly-unitless properties\r\n\tcssNumber: {\r\n\t\t\"columnCount\": true,\r\n\t\t\"fillOpacity\": true,\r\n\t\t\"fontWeight\": true,\r\n\t\t\"lineHeight\": true,\r\n\t\t\"opacity\": true,\r\n\t\t\"order\": true,\r\n\t\t\"orphans\": true,\r\n\t\t\"widows\": true,\r\n\t\t\"zIndex\": true,\r\n\t\t\"zoom\": true\r\n\t},\r\n\r\n\t// Add in properties whose names you wish to fix before\r\n\t// setting or getting the value\r\n\tcssProps: {\r\n\t\t// normalize float css property\r\n\t\t\"float\": jQuery.support.cssFloat ? \"cssFloat\" : \"styleFloat\"\r\n\t},\r\n\r\n\t// Get and set the style property on a DOM Node\r\n\tstyle: function( elem, name, value, extra ) {\r\n\t\t// Don't set styles on text and comment nodes\r\n\t\tif ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// Make sure that we're working with the right name\r\n\t\tvar ret, type, hooks,\r\n\t\t\torigName = jQuery.camelCase( name ),\r\n\t\t\tstyle = elem.style;\r\n\r\n\t\tname = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( style, origName ) );\r\n\r\n\t\t// gets hook for the prefixed version\r\n\t\t// followed by the unprefixed version\r\n\t\thooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];\r\n\r\n\t\t// Check if we're setting a value\r\n\t\tif ( value !== undefined ) {\r\n\t\t\ttype = typeof value;\r\n\r\n\t\t\t// convert relative number strings (+= or -=) to relative numbers. #7345\r\n\t\t\tif ( type === \"string\" && (ret = rrelNum.exec( value )) ) {\r\n\t\t\t\tvalue = ( ret[1] + 1 ) * ret[2] + parseFloat( jQuery.css( elem, name ) );\r\n\t\t\t\t// Fixes bug #9237\r\n\t\t\t\ttype = \"number\";\r\n\t\t\t}\r\n\r\n\t\t\t// Make sure that NaN and null values aren't set. See: #7116\r\n\t\t\tif ( value == null || type === \"number\" && isNaN( value ) ) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t// If a number was passed in, add 'px' to the (except for certain CSS properties)\r\n\t\t\tif ( type === \"number\" && !jQuery.cssNumber[ origName ] ) {\r\n\t\t\t\tvalue += \"px\";\r\n\t\t\t}\r\n\r\n\t\t\t// Fixes #8908, it can be done more correctly by specifing setters in cssHooks,\r\n\t\t\t// but it would mean to define eight (for every problematic property) identical functions\r\n\t\t\tif ( !jQuery.support.clearCloneStyle && value === \"\" && name.indexOf(\"background\") === 0 ) {\r\n\t\t\t\tstyle[ name ] = \"inherit\";\r\n\t\t\t}\r\n\r\n\t\t\t// If a hook was provided, use that value, otherwise just set the specified value\r\n\t\t\tif ( !hooks || !(\"set\" in hooks) || (value = hooks.set( elem, value, extra )) !== undefined ) {\r\n\r\n\t\t\t\t// Wrapped to prevent IE from throwing errors when 'invalid' values are provided\r\n\t\t\t\t// Fixes bug #5509\r\n\t\t\t\ttry {\r\n\t\t\t\t\tstyle[ name ] = value;\r\n\t\t\t\t} catch(e) {}\r\n\t\t\t}\r\n\r\n\t\t} else {\r\n\t\t\t// If a hook was provided get the non-computed value from there\r\n\t\t\tif ( hooks && \"get\" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) {\r\n\t\t\t\treturn ret;\r\n\t\t\t}\r\n\r\n\t\t\t// Otherwise just get the value from the style object\r\n\t\t\treturn style[ name ];\r\n\t\t}\r\n\t},\r\n\r\n\tcss: function( elem, name, extra, styles ) {\r\n\t\tvar num, val, hooks,\r\n\t\t\torigName = jQuery.camelCase( name );\r\n\r\n\t\t// Make sure that we're working with the right name\r\n\t\tname = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( elem.style, origName ) );\r\n\r\n\t\t// gets hook for the prefixed version\r\n\t\t// followed by the unprefixed version\r\n\t\thooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];\r\n\r\n\t\t// If a hook was provided get the computed value from there\r\n\t\tif ( hooks && \"get\" in hooks ) {\r\n\t\t\tval = hooks.get( elem, true, extra );\r\n\t\t}\r\n\r\n\t\t// Otherwise, if a way to get the computed value exists, use that\r\n\t\tif ( val === undefined ) {\r\n\t\t\tval = curCSS( elem, name, styles );\r\n\t\t}\r\n\r\n\t\t//convert \"normal\" to computed value\r\n\t\tif ( val === \"normal\" && name in cssNormalTransform ) {\r\n\t\t\tval = cssNormalTransform[ name ];\r\n\t\t}\r\n\r\n\t\t// Return, converting to number if forced or a qualifier was provided and val looks numeric\r\n\t\tif ( extra === \"\" || extra ) {\r\n\t\t\tnum = parseFloat( val );\r\n\t\t\treturn extra === true || jQuery.isNumeric( num ) ? num || 0 : val;\r\n\t\t}\r\n\t\treturn val;\r\n\t}\r\n});\r\n\r\n// NOTE: we've included the \"window\" in window.getComputedStyle\r\n// because jsdom on node.js will break without it.\r\nif ( window.getComputedStyle ) {\r\n\tgetStyles = function( elem ) {\r\n\t\treturn window.getComputedStyle( elem, null );\r\n\t};\r\n\r\n\tcurCSS = function( elem, name, _computed ) {\r\n\t\tvar width, minWidth, maxWidth,\r\n\t\t\tcomputed = _computed || getStyles( elem ),\r\n\r\n\t\t\t// getPropertyValue is only needed for .css('filter') in IE9, see #12537\r\n\t\t\tret = computed ? computed.getPropertyValue( name ) || computed[ name ] : undefined,\r\n\t\t\tstyle = elem.style;\r\n\r\n\t\tif ( computed ) {\r\n\r\n\t\t\tif ( ret === \"\" && !jQuery.contains( elem.ownerDocument, elem ) ) {\r\n\t\t\t\tret = jQuery.style( elem, name );\r\n\t\t\t}\r\n\r\n\t\t\t// A tribute to the \"awesome hack by Dean Edwards\"\r\n\t\t\t// Chrome < 17 and Safari 5.0 uses \"computed value\" instead of \"used value\" for margin-right\r\n\t\t\t// Safari 5.1.7 (at least) returns percentage for a larger set of values, but width seems to be reliably pixels\r\n\t\t\t// this is against the CSSOM draft spec: http://dev.w3.org/csswg/cssom/#resolved-values\r\n\t\t\tif ( rnumnonpx.test( ret ) && rmargin.test( name ) ) {\r\n\r\n\t\t\t\t// Remember the original values\r\n\t\t\t\twidth = style.width;\r\n\t\t\t\tminWidth = style.minWidth;\r\n\t\t\t\tmaxWidth = style.maxWidth;\r\n\r\n\t\t\t\t// Put in the new values to get a computed value out\r\n\t\t\t\tstyle.minWidth = style.maxWidth = style.width = ret;\r\n\t\t\t\tret = computed.width;\r\n\r\n\t\t\t\t// Revert the changed values\r\n\t\t\t\tstyle.width = width;\r\n\t\t\t\tstyle.minWidth = minWidth;\r\n\t\t\t\tstyle.maxWidth = maxWidth;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn ret;\r\n\t};\r\n} else if ( document.documentElement.currentStyle ) {\r\n\tgetStyles = function( elem ) {\r\n\t\treturn elem.currentStyle;\r\n\t};\r\n\r\n\tcurCSS = function( elem, name, _computed ) {\r\n\t\tvar left, rs, rsLeft,\r\n\t\t\tcomputed = _computed || getStyles( elem ),\r\n\t\t\tret = computed ? computed[ name ] : undefined,\r\n\t\t\tstyle = elem.style;\r\n\r\n\t\t// Avoid setting ret to empty string here\r\n\t\t// so we don't default to auto\r\n\t\tif ( ret == null && style && style[ name ] ) {\r\n\t\t\tret = style[ name ];\r\n\t\t}\r\n\r\n\t\t// From the awesome hack by Dean Edwards\r\n\t\t// http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291\r\n\r\n\t\t// If we're not dealing with a regular pixel number\r\n\t\t// but a number that has a weird ending, we need to convert it to pixels\r\n\t\t// but not position css attributes, as those are proportional to the parent element instead\r\n\t\t// and we can't measure the parent instead because it might trigger a \"stacking dolls\" problem\r\n\t\tif ( rnumnonpx.test( ret ) && !rposition.test( name ) ) {\r\n\r\n\t\t\t// Remember the original values\r\n\t\t\tleft = style.left;\r\n\t\t\trs = elem.runtimeStyle;\r\n\t\t\trsLeft = rs && rs.left;\r\n\r\n\t\t\t// Put in the new values to get a computed value out\r\n\t\t\tif ( rsLeft ) {\r\n\t\t\t\trs.left = elem.currentStyle.left;\r\n\t\t\t}\r\n\t\t\tstyle.left = name === \"fontSize\" ? \"1em\" : ret;\r\n\t\t\tret = style.pixelLeft + \"px\";\r\n\r\n\t\t\t// Revert the changed values\r\n\t\t\tstyle.left = left;\r\n\t\t\tif ( rsLeft ) {\r\n\t\t\t\trs.left = rsLeft;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn ret === \"\" ? \"auto\" : ret;\r\n\t};\r\n}\r\n\r\nfunction setPositiveNumber( elem, value, subtract ) {\r\n\tvar matches = rnumsplit.exec( value );\r\n\treturn matches ?\r\n\t\t// Guard against undefined \"subtract\", e.g., when used as in cssHooks\r\n\t\tMath.max( 0, matches[ 1 ] - ( subtract || 0 ) ) + ( matches[ 2 ] || \"px\" ) :\r\n\t\tvalue;\r\n}\r\n\r\nfunction augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) {\r\n\tvar i = extra === ( isBorderBox ? \"border\" : \"content\" ) ?\r\n\t\t// If we already have the right measurement, avoid augmentation\r\n\t\t4 :\r\n\t\t// Otherwise initialize for horizontal or vertical properties\r\n\t\tname === \"width\" ? 1 : 0,\r\n\r\n\t\tval = 0;\r\n\r\n\tfor ( ; i < 4; i += 2 ) {\r\n\t\t// both box models exclude margin, so add it if we want it\r\n\t\tif ( extra === \"margin\" ) {\r\n\t\t\tval += jQuery.css( elem, extra + cssExpand[ i ], true, styles );\r\n\t\t}\r\n\r\n\t\tif ( isBorderBox ) {\r\n\t\t\t// border-box includes padding, so remove it if we want content\r\n\t\t\tif ( extra === \"content\" ) {\r\n\t\t\t\tval -= jQuery.css( elem, \"padding\" + cssExpand[ i ], true, styles );\r\n\t\t\t}\r\n\r\n\t\t\t// at this point, extra isn't border nor margin, so remove border\r\n\t\t\tif ( extra !== \"margin\" ) {\r\n\t\t\t\tval -= jQuery.css( elem, \"border\" + cssExpand[ i ] + \"Width\", true, styles );\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t// at this point, extra isn't content, so add padding\r\n\t\t\tval += jQuery.css( elem, \"padding\" + cssExpand[ i ], true, styles );\r\n\r\n\t\t\t// at this point, extra isn't content nor padding, so add border\r\n\t\t\tif ( extra !== \"padding\" ) {\r\n\t\t\t\tval += jQuery.css( elem, \"border\" + cssExpand[ i ] + \"Width\", true, styles );\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\treturn val;\r\n}\r\n\r\nfunction getWidthOrHeight( elem, name, extra ) {\r\n\r\n\t// Start with offset property, which is equivalent to the border-box value\r\n\tvar valueIsBorderBox = true,\r\n\t\tval = name === \"width\" ? elem.offsetWidth : elem.offsetHeight,\r\n\t\tstyles = getStyles( elem ),\r\n\t\tisBorderBox = jQuery.support.boxSizing && jQuery.css( elem, \"boxSizing\", false, styles ) === \"border-box\";\r\n\r\n\t// some non-html elements return undefined for offsetWidth, so check for null/undefined\r\n\t// svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285\r\n\t// MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668\r\n\tif ( val <= 0 || val == null ) {\r\n\t\t// Fall back to computed then uncomputed css if necessary\r\n\t\tval = curCSS( elem, name, styles );\r\n\t\tif ( val < 0 || val == null ) {\r\n\t\t\tval = elem.style[ name ];\r\n\t\t}\r\n\r\n\t\t// Computed unit is not pixels. Stop here and return.\r\n\t\tif ( rnumnonpx.test(val) ) {\r\n\t\t\treturn val;\r\n\t\t}\r\n\r\n\t\t// we need the check for style in case a browser which returns unreliable values\r\n\t\t// for getComputedStyle silently falls back to the reliable elem.style\r\n\t\tvalueIsBorderBox = isBorderBox && ( jQuery.support.boxSizingReliable || val === elem.style[ name ] );\r\n\r\n\t\t// Normalize \"\", auto, and prepare for extra\r\n\t\tval = parseFloat( val ) || 0;\r\n\t}\r\n\r\n\t// use the active box-sizing model to add/subtract irrelevant styles\r\n\treturn ( val +\r\n\t\taugmentWidthOrHeight(\r\n\t\t\telem,\r\n\t\t\tname,\r\n\t\t\textra || ( isBorderBox ? \"border\" : \"content\" ),\r\n\t\t\tvalueIsBorderBox,\r\n\t\t\tstyles\r\n\t\t)\r\n\t) + \"px\";\r\n}\r\n\r\n// Try to determine the default display value of an element\r\nfunction css_defaultDisplay( nodeName ) {\r\n\tvar doc = document,\r\n\t\tdisplay = elemdisplay[ nodeName ];\r\n\r\n\tif ( !display ) {\r\n\t\tdisplay = actualDisplay( nodeName, doc );\r\n\r\n\t\t// If the simple way fails, read from inside an iframe\r\n\t\tif ( display === \"none\" || !display ) {\r\n\t\t\t// Use the already-created iframe if possible\r\n\t\t\tiframe = ( iframe ||\r\n\t\t\t\tjQuery(\"<iframe frameborder='0' width='0' height='0'/>\")\r\n\t\t\t\t.css( \"cssText\", \"display:block !important\" )\r\n\t\t\t).appendTo( doc.documentElement );\r\n\r\n\t\t\t// Always write a new HTML skeleton so Webkit and Firefox don't choke on reuse\r\n\t\t\tdoc = ( iframe[0].contentWindow || iframe[0].contentDocument ).document;\r\n\t\t\tdoc.write(\"<!doctype html><html><body>\");\r\n\t\t\tdoc.close();\r\n\r\n\t\t\tdisplay = actualDisplay( nodeName, doc );\r\n\t\t\tiframe.detach();\r\n\t\t}\r\n\r\n\t\t// Store the correct default display\r\n\t\telemdisplay[ nodeName ] = display;\r\n\t}\r\n\r\n\treturn display;\r\n}\r\n\r\n// Called ONLY from within css_defaultDisplay\r\nfunction actualDisplay( name, doc ) {\r\n\tvar elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ),\r\n\t\tdisplay = jQuery.css( elem[0], \"display\" );\r\n\telem.remove();\r\n\treturn display;\r\n}\r\n\r\njQuery.each([ \"height\", \"width\" ], function( i, name ) {\r\n\tjQuery.cssHooks[ name ] = {\r\n\t\tget: function( elem, computed, extra ) {\r\n\t\t\tif ( computed ) {\r\n\t\t\t\t// certain elements can have dimension info if we invisibly show them\r\n\t\t\t\t// however, it must have a current display style that would benefit from this\r\n\t\t\t\treturn elem.offsetWidth === 0 && rdisplayswap.test( jQuery.css( elem, \"display\" ) ) ?\r\n\t\t\t\t\tjQuery.swap( elem, cssShow, function() {\r\n\t\t\t\t\t\treturn getWidthOrHeight( elem, name, extra );\r\n\t\t\t\t\t}) :\r\n\t\t\t\t\tgetWidthOrHeight( elem, name, extra );\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tset: function( elem, value, extra ) {\r\n\t\t\tvar styles = extra && getStyles( elem );\r\n\t\t\treturn setPositiveNumber( elem, value, extra ?\r\n\t\t\t\taugmentWidthOrHeight(\r\n\t\t\t\t\telem,\r\n\t\t\t\t\tname,\r\n\t\t\t\t\textra,\r\n\t\t\t\t\tjQuery.support.boxSizing && jQuery.css( elem, \"boxSizing\", false, styles ) === \"border-box\",\r\n\t\t\t\t\tstyles\r\n\t\t\t\t) : 0\r\n\t\t\t);\r\n\t\t}\r\n\t};\r\n});\r\n\r\nif ( !jQuery.support.opacity ) {\r\n\tjQuery.cssHooks.opacity = {\r\n\t\tget: function( elem, computed ) {\r\n\t\t\t// IE uses filters for opacity\r\n\t\t\treturn ropacity.test( (computed && elem.currentStyle ? elem.currentStyle.filter : elem.style.filter) || \"\" ) ?\r\n\t\t\t\t( 0.01 * parseFloat( RegExp.$1 ) ) + \"\" :\r\n\t\t\t\tcomputed ? \"1\" : \"\";\r\n\t\t},\r\n\r\n\t\tset: function( elem, value ) {\r\n\t\t\tvar style = elem.style,\r\n\t\t\t\tcurrentStyle = elem.currentStyle,\r\n\t\t\t\topacity = jQuery.isNumeric( value ) ? \"alpha(opacity=\" + value * 100 + \")\" : \"\",\r\n\t\t\t\tfilter = currentStyle && currentStyle.filter || style.filter || \"\";\r\n\r\n\t\t\t// IE has trouble with opacity if it does not have layout\r\n\t\t\t// Force it by setting the zoom level\r\n\t\t\tstyle.zoom = 1;\r\n\r\n\t\t\t// if setting opacity to 1, and no other filters exist - attempt to remove filter attribute #6652\r\n\t\t\t// if value === \"\", then remove inline opacity #12685\r\n\t\t\tif ( ( value >= 1 || value === \"\" ) &&\r\n\t\t\t\t\tjQuery.trim( filter.replace( ralpha, \"\" ) ) === \"\" &&\r\n\t\t\t\t\tstyle.removeAttribute ) {\r\n\r\n\t\t\t\t// Setting style.filter to null, \"\" & \" \" still leave \"filter:\" in the cssText\r\n\t\t\t\t// if \"filter:\" is present at all, clearType is disabled, we want to avoid this\r\n\t\t\t\t// style.removeAttribute is IE Only, but so apparently is this code path...\r\n\t\t\t\tstyle.removeAttribute( \"filter\" );\r\n\r\n\t\t\t\t// if there is no filter style applied in a css rule or unset inline opacity, we are done\r\n\t\t\t\tif ( value === \"\" || currentStyle && !currentStyle.filter ) {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// otherwise, set new filter values\r\n\t\t\tstyle.filter = ralpha.test( filter ) ?\r\n\t\t\t\tfilter.replace( ralpha, opacity ) :\r\n\t\t\t\tfilter + \" \" + opacity;\r\n\t\t}\r\n\t};\r\n}\r\n\r\n// These hooks cannot be added until DOM ready because the support test\r\n// for it is not run until after DOM ready\r\njQuery(function() {\r\n\tif ( !jQuery.support.reliableMarginRight ) {\r\n\t\tjQuery.cssHooks.marginRight = {\r\n\t\t\tget: function( elem, computed ) {\r\n\t\t\t\tif ( computed ) {\r\n\t\t\t\t\t// WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right\r\n\t\t\t\t\t// Work around by temporarily setting element display to inline-block\r\n\t\t\t\t\treturn jQuery.swap( elem, { \"display\": \"inline-block\" },\r\n\t\t\t\t\t\tcurCSS, [ elem, \"marginRight\" ] );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\t}\r\n\r\n\t// Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084\r\n\t// getComputedStyle returns percent when specified for top/left/bottom/right\r\n\t// rather than make the css module depend on the offset module, we just check for it here\r\n\tif ( !jQuery.support.pixelPosition && jQuery.fn.position ) {\r\n\t\tjQuery.each( [ \"top\", \"left\" ], function( i, prop ) {\r\n\t\t\tjQuery.cssHooks[ prop ] = {\r\n\t\t\t\tget: function( elem, computed ) {\r\n\t\t\t\t\tif ( computed ) {\r\n\t\t\t\t\t\tcomputed = curCSS( elem, prop );\r\n\t\t\t\t\t\t// if curCSS returns percentage, fallback to offset\r\n\t\t\t\t\t\treturn rnumnonpx.test( computed ) ?\r\n\t\t\t\t\t\t\tjQuery( elem ).position()[ prop ] + \"px\" :\r\n\t\t\t\t\t\t\tcomputed;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t};\r\n\t\t});\r\n\t}\r\n\r\n});\r\n\r\nif ( jQuery.expr && jQuery.expr.filters ) {\r\n\tjQuery.expr.filters.hidden = function( elem ) {\r\n\t\t// Support: Opera <= 12.12\r\n\t\t// Opera reports offsetWidths and offsetHeights less than zero on some elements\r\n\t\treturn elem.offsetWidth <= 0 && elem.offsetHeight <= 0 ||\r\n\t\t\t(!jQuery.support.reliableHiddenOffsets && ((elem.style && elem.style.display) || jQuery.css( elem, \"display\" )) === \"none\");\r\n\t};\r\n\r\n\tjQuery.expr.filters.visible = function( elem ) {\r\n\t\treturn !jQuery.expr.filters.hidden( elem );\r\n\t};\r\n}\r\n\r\n// These hooks are used by animate to expand properties\r\njQuery.each({\r\n\tmargin: \"\",\r\n\tpadding: \"\",\r\n\tborder: \"Width\"\r\n}, function( prefix, suffix ) {\r\n\tjQuery.cssHooks[ prefix + suffix ] = {\r\n\t\texpand: function( value ) {\r\n\t\t\tvar i = 0,\r\n\t\t\t\texpanded = {},\r\n\r\n\t\t\t\t// assumes a single number if not a string\r\n\t\t\t\tparts = typeof value === \"string\" ? value.split(\" \") : [ value ];\r\n\r\n\t\t\tfor ( ; i < 4; i++ ) {\r\n\t\t\t\texpanded[ prefix + cssExpand[ i ] + suffix ] =\r\n\t\t\t\t\tparts[ i ] || parts[ i - 2 ] || parts[ 0 ];\r\n\t\t\t}\r\n\r\n\t\t\treturn expanded;\r\n\t\t}\r\n\t};\r\n\r\n\tif ( !rmargin.test( prefix ) ) {\r\n\t\tjQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber;\r\n\t}\r\n});\r\nvar r20 = /%20/g,\r\n\trbracket = /\\[\\]$/,\r\n\trCRLF = /\\r?\\n/g,\r\n\trsubmitterTypes = /^(?:submit|button|image|reset|file)$/i,\r\n\trsubmittable = /^(?:input|select|textarea|keygen)/i;\r\n\r\njQuery.fn.extend({\r\n\tserialize: function() {\r\n\t\treturn jQuery.param( this.serializeArray() );\r\n\t},\r\n\tserializeArray: function() {\r\n\t\treturn this.map(function(){\r\n\t\t\t// Can add propHook for \"elements\" to filter or add form elements\r\n\t\t\tvar elements = jQuery.prop( this, \"elements\" );\r\n\t\t\treturn elements ? jQuery.makeArray( elements ) : this;\r\n\t\t})\r\n\t\t.filter(function(){\r\n\t\t\tvar type = this.type;\r\n\t\t\t// Use .is(\":disabled\") so that fieldset[disabled] works\r\n\t\t\treturn this.name && !jQuery( this ).is( \":disabled\" ) &&\r\n\t\t\t\trsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) &&\r\n\t\t\t\t( this.checked || !manipulation_rcheckableType.test( type ) );\r\n\t\t})\r\n\t\t.map(function( i, elem ){\r\n\t\t\tvar val = jQuery( this ).val();\r\n\r\n\t\t\treturn val == null ?\r\n\t\t\t\tnull :\r\n\t\t\t\tjQuery.isArray( val ) ?\r\n\t\t\t\t\tjQuery.map( val, function( val ){\r\n\t\t\t\t\t\treturn { name: elem.name, value: val.replace( rCRLF, \"\\r\\n\" ) };\r\n\t\t\t\t\t}) :\r\n\t\t\t\t\t{ name: elem.name, value: val.replace( rCRLF, \"\\r\\n\" ) };\r\n\t\t}).get();\r\n\t}\r\n});\r\n\r\n//Serialize an array of form elements or a set of\r\n//key/values into a query string\r\njQuery.param = function( a, traditional ) {\r\n\tvar prefix,\r\n\t\ts = [],\r\n\t\tadd = function( key, value ) {\r\n\t\t\t// If value is a function, invoke it and return its value\r\n\t\t\tvalue = jQuery.isFunction( value ) ? value() : ( value == null ? \"\" : value );\r\n\t\t\ts[ s.length ] = encodeURIComponent( key ) + \"=\" + encodeURIComponent( value );\r\n\t\t};\r\n\r\n\t// Set traditional to true for jQuery <= 1.3.2 behavior.\r\n\tif ( traditional === undefined ) {\r\n\t\ttraditional = jQuery.ajaxSettings && jQuery.ajaxSettings.traditional;\r\n\t}\r\n\r\n\t// If an array was passed in, assume that it is an array of form elements.\r\n\tif ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {\r\n\t\t// Serialize the form elements\r\n\t\tjQuery.each( a, function() {\r\n\t\t\tadd( this.name, this.value );\r\n\t\t});\r\n\r\n\t} else {\r\n\t\t// If traditional, encode the \"old\" way (the way 1.3.2 or older\r\n\t\t// did it), otherwise encode params recursively.\r\n\t\tfor ( prefix in a ) {\r\n\t\t\tbuildParams( prefix, a[ prefix ], traditional, add );\r\n\t\t}\r\n\t}\r\n\r\n\t// Return the resulting serialization\r\n\treturn s.join( \"&\" ).replace( r20, \"+\" );\r\n};\r\n\r\nfunction buildParams( prefix, obj, traditional, add ) {\r\n\tvar name;\r\n\r\n\tif ( jQuery.isArray( obj ) ) {\r\n\t\t// Serialize array item.\r\n\t\tjQuery.each( obj, function( i, v ) {\r\n\t\t\tif ( traditional || rbracket.test( prefix ) ) {\r\n\t\t\t\t// Treat each array item as a scalar.\r\n\t\t\t\tadd( prefix, v );\r\n\r\n\t\t\t} else {\r\n\t\t\t\t// Item is non-scalar (array or object), encode its numeric index.\r\n\t\t\t\tbuildParams( prefix + \"[\" + ( typeof v === \"object\" ? i : \"\" ) + \"]\", v, traditional, add );\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t} else if ( !traditional && jQuery.type( obj ) === \"object\" ) {\r\n\t\t// Serialize object item.\r\n\t\tfor ( name in obj ) {\r\n\t\t\tbuildParams( prefix + \"[\" + name + \"]\", obj[ name ], traditional, add );\r\n\t\t}\r\n\r\n\t} else {\r\n\t\t// Serialize scalar item.\r\n\t\tadd( prefix, obj );\r\n\t}\r\n}\r\njQuery.each( (\"blur focus focusin focusout load resize scroll unload click dblclick \" +\r\n\t\"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave \" +\r\n\t\"change select submit keydown keypress keyup error contextmenu\").split(\" \"), function( i, name ) {\r\n\r\n\t// Handle event binding\r\n\tjQuery.fn[ name ] = function( data, fn ) {\r\n\t\treturn arguments.length > 0 ?\r\n\t\t\tthis.on( name, null, data, fn ) :\r\n\t\t\tthis.trigger( name );\r\n\t};\r\n});\r\n\r\njQuery.fn.extend({\r\n\thover: function( fnOver, fnOut ) {\r\n\t\treturn this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );\r\n\t},\r\n\r\n\tbind: function( types, data, fn ) {\r\n\t\treturn this.on( types, null, data, fn );\r\n\t},\r\n\tunbind: function( types, fn ) {\r\n\t\treturn this.off( types, null, fn );\r\n\t},\r\n\r\n\tdelegate: function( selector, types, data, fn ) {\r\n\t\treturn this.on( types, selector, data, fn );\r\n\t},\r\n\tundelegate: function( selector, types, fn ) {\r\n\t\t// ( namespace ) or ( selector, types [, fn] )\r\n\t\treturn arguments.length === 1 ? this.off( selector, \"**\" ) : this.off( types, selector || \"**\", fn );\r\n\t}\r\n});\r\nvar\r\n\t// Document location\r\n\tajaxLocParts,\r\n\tajaxLocation,\r\n\tajax_nonce = jQuery.now(),\r\n\r\n\tajax_rquery = /\\?/,\r\n\trhash = /#.*$/,\r\n\trts = /([?&])_=[^&]*/,\r\n\trheaders = /^(.*?):[ \\t]*([^\\r\\n]*)\\r?$/mg, // IE leaves an \\r character at EOL\r\n\t// #7653, #8125, #8152: local protocol detection\r\n\trlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,\r\n\trnoContent = /^(?:GET|HEAD)$/,\r\n\trprotocol = /^\\/\\//,\r\n\trurl = /^([\\w.+-]+:)(?:\\/\\/([^\\/?#:]*)(?::(\\d+)|)|)/,\r\n\r\n\t// Keep a copy of the old load method\r\n\t_load = jQuery.fn.load,\r\n\r\n\t/* Prefilters\r\n\t * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)\r\n\t * 2) These are called:\r\n\t *    - BEFORE asking for a transport\r\n\t *    - AFTER param serialization (s.data is a string if s.processData is true)\r\n\t * 3) key is the dataType\r\n\t * 4) the catchall symbol \"*\" can be used\r\n\t * 5) execution will start with transport dataType and THEN continue down to \"*\" if needed\r\n\t */\r\n\tprefilters = {},\r\n\r\n\t/* Transports bindings\r\n\t * 1) key is the dataType\r\n\t * 2) the catchall symbol \"*\" can be used\r\n\t * 3) selection will start with transport dataType and THEN go to \"*\" if needed\r\n\t */\r\n\ttransports = {},\r\n\r\n\t// Avoid comment-prolog char sequence (#10098); must appease lint and evade compression\r\n\tallTypes = \"*/\".concat(\"*\");\r\n\r\n// #8138, IE may throw an exception when accessing\r\n// a field from window.location if document.domain has been set\r\ntry {\r\n\tajaxLocation = location.href;\r\n} catch( e ) {\r\n\t// Use the href attribute of an A element\r\n\t// since IE will modify it given document.location\r\n\tajaxLocation = document.createElement( \"a\" );\r\n\tajaxLocation.href = \"\";\r\n\tajaxLocation = ajaxLocation.href;\r\n}\r\n\r\n// Segment location into parts\r\najaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || [];\r\n\r\n// Base \"constructor\" for jQuery.ajaxPrefilter and jQuery.ajaxTransport\r\nfunction addToPrefiltersOrTransports( structure ) {\r\n\r\n\t// dataTypeExpression is optional and defaults to \"*\"\r\n\treturn function( dataTypeExpression, func ) {\r\n\r\n\t\tif ( typeof dataTypeExpression !== \"string\" ) {\r\n\t\t\tfunc = dataTypeExpression;\r\n\t\t\tdataTypeExpression = \"*\";\r\n\t\t}\r\n\r\n\t\tvar dataType,\r\n\t\t\ti = 0,\r\n\t\t\tdataTypes = dataTypeExpression.toLowerCase().match( core_rnotwhite ) || [];\r\n\r\n\t\tif ( jQuery.isFunction( func ) ) {\r\n\t\t\t// For each dataType in the dataTypeExpression\r\n\t\t\twhile ( (dataType = dataTypes[i++]) ) {\r\n\t\t\t\t// Prepend if requested\r\n\t\t\t\tif ( dataType[0] === \"+\" ) {\r\n\t\t\t\t\tdataType = dataType.slice( 1 ) || \"*\";\r\n\t\t\t\t\t(structure[ dataType ] = structure[ dataType ] || []).unshift( func );\r\n\r\n\t\t\t\t// Otherwise append\r\n\t\t\t\t} else {\r\n\t\t\t\t\t(structure[ dataType ] = structure[ dataType ] || []).push( func );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n}\r\n\r\n// Base inspection function for prefilters and transports\r\nfunction inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\r\n\r\n\tvar inspected = {},\r\n\t\tseekingTransport = ( structure === transports );\r\n\r\n\tfunction inspect( dataType ) {\r\n\t\tvar selected;\r\n\t\tinspected[ dataType ] = true;\r\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\r\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\r\n\t\t\tif( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\r\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\r\n\t\t\t\tinspect( dataTypeOrTransport );\r\n\t\t\t\treturn false;\r\n\t\t\t} else if ( seekingTransport ) {\r\n\t\t\t\treturn !( selected = dataTypeOrTransport );\r\n\t\t\t}\r\n\t\t});\r\n\t\treturn selected;\r\n\t}\r\n\r\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\r\n}\r\n\r\n// A special extend for ajax options\r\n// that takes \"flat\" options (not to be deep extended)\r\n// Fixes #9887\r\nfunction ajaxExtend( target, src ) {\r\n\tvar deep, key,\r\n\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\r\n\r\n\tfor ( key in src ) {\r\n\t\tif ( src[ key ] !== undefined ) {\r\n\t\t\t( flatOptions[ key ] ? target : ( deep || (deep = {}) ) )[ key ] = src[ key ];\r\n\t\t}\r\n\t}\r\n\tif ( deep ) {\r\n\t\tjQuery.extend( true, target, deep );\r\n\t}\r\n\r\n\treturn target;\r\n}\r\n\r\njQuery.fn.load = function( url, params, callback ) {\r\n\tif ( typeof url !== \"string\" && _load ) {\r\n\t\treturn _load.apply( this, arguments );\r\n\t}\r\n\r\n\tvar selector, response, type,\r\n\t\tself = this,\r\n\t\toff = url.indexOf(\" \");\r\n\r\n\tif ( off >= 0 ) {\r\n\t\tselector = url.slice( off, url.length );\r\n\t\turl = url.slice( 0, off );\r\n\t}\r\n\r\n\t// If it's a function\r\n\tif ( jQuery.isFunction( params ) ) {\r\n\r\n\t\t// We assume that it's the callback\r\n\t\tcallback = params;\r\n\t\tparams = undefined;\r\n\r\n\t// Otherwise, build a param string\r\n\t} else if ( params && typeof params === \"object\" ) {\r\n\t\ttype = \"POST\";\r\n\t}\r\n\r\n\t// If we have elements to modify, make the request\r\n\tif ( self.length > 0 ) {\r\n\t\tjQuery.ajax({\r\n\t\t\turl: url,\r\n\r\n\t\t\t// if \"type\" variable is undefined, then \"GET\" method will be used\r\n\t\t\ttype: type,\r\n\t\t\tdataType: \"html\",\r\n\t\t\tdata: params\r\n\t\t}).done(function( responseText ) {\r\n\r\n\t\t\t// Save response for use in complete callback\r\n\t\t\tresponse = arguments;\r\n\r\n\t\t\tself.html( selector ?\r\n\r\n\t\t\t\t// If a selector was specified, locate the right elements in a dummy div\r\n\t\t\t\t// Exclude scripts to avoid IE 'Permission Denied' errors\r\n\t\t\t\tjQuery(\"<div>\").append( jQuery.parseHTML( responseText ) ).find( selector ) :\r\n\r\n\t\t\t\t// Otherwise use the full result\r\n\t\t\t\tresponseText );\r\n\r\n\t\t}).complete( callback && function( jqXHR, status ) {\r\n\t\t\tself.each( callback, response || [ jqXHR.responseText, status, jqXHR ] );\r\n\t\t});\r\n\t}\r\n\r\n\treturn this;\r\n};\r\n\r\n// Attach a bunch of functions for handling common AJAX events\r\njQuery.each( [ \"ajaxStart\", \"ajaxStop\", \"ajaxComplete\", \"ajaxError\", \"ajaxSuccess\", \"ajaxSend\" ], function( i, type ){\r\n\tjQuery.fn[ type ] = function( fn ){\r\n\t\treturn this.on( type, fn );\r\n\t};\r\n});\r\n\r\njQuery.extend({\r\n\r\n\t// Counter for holding the number of active queries\r\n\tactive: 0,\r\n\r\n\t// Last-Modified header cache for next request\r\n\tlastModified: {},\r\n\tetag: {},\r\n\r\n\tajaxSettings: {\r\n\t\turl: ajaxLocation,\r\n\t\ttype: \"GET\",\r\n\t\tisLocal: rlocalProtocol.test( ajaxLocParts[ 1 ] ),\r\n\t\tglobal: true,\r\n\t\tprocessData: true,\r\n\t\tasync: true,\r\n\t\tcontentType: \"application/x-www-form-urlencoded; charset=UTF-8\",\r\n\t\t/*\r\n\t\ttimeout: 0,\r\n\t\tdata: null,\r\n\t\tdataType: null,\r\n\t\tusername: null,\r\n\t\tpassword: null,\r\n\t\tcache: null,\r\n\t\tthrows: false,\r\n\t\ttraditional: false,\r\n\t\theaders: {},\r\n\t\t*/\r\n\r\n\t\taccepts: {\r\n\t\t\t\"*\": allTypes,\r\n\t\t\ttext: \"text/plain\",\r\n\t\t\thtml: \"text/html\",\r\n\t\t\txml: \"application/xml, text/xml\",\r\n\t\t\tjson: \"application/json, text/javascript\"\r\n\t\t},\r\n\r\n\t\tcontents: {\r\n\t\t\txml: /xml/,\r\n\t\t\thtml: /html/,\r\n\t\t\tjson: /json/\r\n\t\t},\r\n\r\n\t\tresponseFields: {\r\n\t\t\txml: \"responseXML\",\r\n\t\t\ttext: \"responseText\",\r\n\t\t\tjson: \"responseJSON\"\r\n\t\t},\r\n\r\n\t\t// Data converters\r\n\t\t// Keys separate source (or catchall \"*\") and destination types with a single space\r\n\t\tconverters: {\r\n\r\n\t\t\t// Convert anything to text\r\n\t\t\t\"* text\": String,\r\n\r\n\t\t\t// Text to html (true = no transformation)\r\n\t\t\t\"text html\": true,\r\n\r\n\t\t\t// Evaluate text as a json expression\r\n\t\t\t\"text json\": jQuery.parseJSON,\r\n\r\n\t\t\t// Parse text as xml\r\n\t\t\t\"text xml\": jQuery.parseXML\r\n\t\t},\r\n\r\n\t\t// For options that shouldn't be deep extended:\r\n\t\t// you can add your own custom options here if\r\n\t\t// and when you create one that shouldn't be\r\n\t\t// deep extended (see ajaxExtend)\r\n\t\tflatOptions: {\r\n\t\t\turl: true,\r\n\t\t\tcontext: true\r\n\t\t}\r\n\t},\r\n\r\n\t// Creates a full fledged settings object into target\r\n\t// with both ajaxSettings and settings fields.\r\n\t// If target is omitted, writes into ajaxSettings.\r\n\tajaxSetup: function( target, settings ) {\r\n\t\treturn settings ?\r\n\r\n\t\t\t// Building a settings object\r\n\t\t\tajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) :\r\n\r\n\t\t\t// Extending ajaxSettings\r\n\t\t\tajaxExtend( jQuery.ajaxSettings, target );\r\n\t},\r\n\r\n\tajaxPrefilter: addToPrefiltersOrTransports( prefilters ),\r\n\tajaxTransport: addToPrefiltersOrTransports( transports ),\r\n\r\n\t// Main method\r\n\tajax: function( url, options ) {\r\n\r\n\t\t// If url is an object, simulate pre-1.5 signature\r\n\t\tif ( typeof url === \"object\" ) {\r\n\t\t\toptions = url;\r\n\t\t\turl = undefined;\r\n\t\t}\r\n\r\n\t\t// Force options to be an object\r\n\t\toptions = options || {};\r\n\r\n\t\tvar // Cross-domain detection vars\r\n\t\t\tparts,\r\n\t\t\t// Loop variable\r\n\t\t\ti,\r\n\t\t\t// URL without anti-cache param\r\n\t\t\tcacheURL,\r\n\t\t\t// Response headers as string\r\n\t\t\tresponseHeadersString,\r\n\t\t\t// timeout handle\r\n\t\t\ttimeoutTimer,\r\n\r\n\t\t\t// To know if global events are to be dispatched\r\n\t\t\tfireGlobals,\r\n\r\n\t\t\ttransport,\r\n\t\t\t// Response headers\r\n\t\t\tresponseHeaders,\r\n\t\t\t// Create the final options object\r\n\t\t\ts = jQuery.ajaxSetup( {}, options ),\r\n\t\t\t// Callbacks context\r\n\t\t\tcallbackContext = s.context || s,\r\n\t\t\t// Context for global events is callbackContext if it is a DOM node or jQuery collection\r\n\t\t\tglobalEventContext = s.context && ( callbackContext.nodeType || callbackContext.jquery ) ?\r\n\t\t\t\tjQuery( callbackContext ) :\r\n\t\t\t\tjQuery.event,\r\n\t\t\t// Deferreds\r\n\t\t\tdeferred = jQuery.Deferred(),\r\n\t\t\tcompleteDeferred = jQuery.Callbacks(\"once memory\"),\r\n\t\t\t// Status-dependent callbacks\r\n\t\t\tstatusCode = s.statusCode || {},\r\n\t\t\t// Headers (they are sent all at once)\r\n\t\t\trequestHeaders = {},\r\n\t\t\trequestHeadersNames = {},\r\n\t\t\t// The jqXHR state\r\n\t\t\tstate = 0,\r\n\t\t\t// Default abort message\r\n\t\t\tstrAbort = \"canceled\",\r\n\t\t\t// Fake xhr\r\n\t\t\tjqXHR = {\r\n\t\t\t\treadyState: 0,\r\n\r\n\t\t\t\t// Builds headers hashtable if needed\r\n\t\t\t\tgetResponseHeader: function( key ) {\r\n\t\t\t\t\tvar match;\r\n\t\t\t\t\tif ( state === 2 ) {\r\n\t\t\t\t\t\tif ( !responseHeaders ) {\r\n\t\t\t\t\t\t\tresponseHeaders = {};\r\n\t\t\t\t\t\t\twhile ( (match = rheaders.exec( responseHeadersString )) ) {\r\n\t\t\t\t\t\t\t\tresponseHeaders[ match[1].toLowerCase() ] = match[ 2 ];\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tmatch = responseHeaders[ key.toLowerCase() ];\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn match == null ? null : match;\r\n\t\t\t\t},\r\n\r\n\t\t\t\t// Raw string\r\n\t\t\t\tgetAllResponseHeaders: function() {\r\n\t\t\t\t\treturn state === 2 ? responseHeadersString : null;\r\n\t\t\t\t},\r\n\r\n\t\t\t\t// Caches the header\r\n\t\t\t\tsetRequestHeader: function( name, value ) {\r\n\t\t\t\t\tvar lname = name.toLowerCase();\r\n\t\t\t\t\tif ( !state ) {\r\n\t\t\t\t\t\tname = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name;\r\n\t\t\t\t\t\trequestHeaders[ name ] = value;\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn this;\r\n\t\t\t\t},\r\n\r\n\t\t\t\t// Overrides response content-type header\r\n\t\t\t\toverrideMimeType: function( type ) {\r\n\t\t\t\t\tif ( !state ) {\r\n\t\t\t\t\t\ts.mimeType = type;\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn this;\r\n\t\t\t\t},\r\n\r\n\t\t\t\t// Status-dependent callbacks\r\n\t\t\t\tstatusCode: function( map ) {\r\n\t\t\t\t\tvar code;\r\n\t\t\t\t\tif ( map ) {\r\n\t\t\t\t\t\tif ( state < 2 ) {\r\n\t\t\t\t\t\t\tfor ( code in map ) {\r\n\t\t\t\t\t\t\t\t// Lazy-add the new callback in a way that preserves old ones\r\n\t\t\t\t\t\t\t\tstatusCode[ code ] = [ statusCode[ code ], map[ code ] ];\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t// Execute the appropriate callbacks\r\n\t\t\t\t\t\t\tjqXHR.always( map[ jqXHR.status ] );\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn this;\r\n\t\t\t\t},\r\n\r\n\t\t\t\t// Cancel the request\r\n\t\t\t\tabort: function( statusText ) {\r\n\t\t\t\t\tvar finalText = statusText || strAbort;\r\n\t\t\t\t\tif ( transport ) {\r\n\t\t\t\t\t\ttransport.abort( finalText );\r\n\t\t\t\t\t}\r\n\t\t\t\t\tdone( 0, finalText );\r\n\t\t\t\t\treturn this;\r\n\t\t\t\t}\r\n\t\t\t};\r\n\r\n\t\t// Attach deferreds\r\n\t\tdeferred.promise( jqXHR ).complete = completeDeferred.add;\r\n\t\tjqXHR.success = jqXHR.done;\r\n\t\tjqXHR.error = jqXHR.fail;\r\n\r\n\t\t// Remove hash character (#7531: and string promotion)\r\n\t\t// Add protocol if not provided (#5866: IE7 issue with protocol-less urls)\r\n\t\t// Handle falsy url in the settings object (#10093: consistency with old signature)\r\n\t\t// We also use the url parameter if available\r\n\t\ts.url = ( ( url || s.url || ajaxLocation ) + \"\" ).replace( rhash, \"\" ).replace( rprotocol, ajaxLocParts[ 1 ] + \"//\" );\r\n\r\n\t\t// Alias method option to type as per ticket #12004\r\n\t\ts.type = options.method || options.type || s.method || s.type;\r\n\r\n\t\t// Extract dataTypes list\r\n\t\ts.dataTypes = jQuery.trim( s.dataType || \"*\" ).toLowerCase().match( core_rnotwhite ) || [\"\"];\r\n\r\n\t\t// A cross-domain request is in order when we have a protocol:host:port mismatch\r\n\t\tif ( s.crossDomain == null ) {\r\n\t\t\tparts = rurl.exec( s.url.toLowerCase() );\r\n\t\t\ts.crossDomain = !!( parts &&\r\n\t\t\t\t( parts[ 1 ] !== ajaxLocParts[ 1 ] || parts[ 2 ] !== ajaxLocParts[ 2 ] ||\r\n\t\t\t\t\t( parts[ 3 ] || ( parts[ 1 ] === \"http:\" ? \"80\" : \"443\" ) ) !==\r\n\t\t\t\t\t\t( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === \"http:\" ? \"80\" : \"443\" ) ) )\r\n\t\t\t);\r\n\t\t}\r\n\r\n\t\t// Convert data if not already a string\r\n\t\tif ( s.data && s.processData && typeof s.data !== \"string\" ) {\r\n\t\t\ts.data = jQuery.param( s.data, s.traditional );\r\n\t\t}\r\n\r\n\t\t// Apply prefilters\r\n\t\tinspectPrefiltersOrTransports( prefilters, s, options, jqXHR );\r\n\r\n\t\t// If request was aborted inside a prefilter, stop there\r\n\t\tif ( state === 2 ) {\r\n\t\t\treturn jqXHR;\r\n\t\t}\r\n\r\n\t\t// We can fire global events as of now if asked to\r\n\t\tfireGlobals = s.global;\r\n\r\n\t\t// Watch for a new set of requests\r\n\t\tif ( fireGlobals && jQuery.active++ === 0 ) {\r\n\t\t\tjQuery.event.trigger(\"ajaxStart\");\r\n\t\t}\r\n\r\n\t\t// Uppercase the type\r\n\t\ts.type = s.type.toUpperCase();\r\n\r\n\t\t// Determine if request has content\r\n\t\ts.hasContent = !rnoContent.test( s.type );\r\n\r\n\t\t// Save the URL in case we're toying with the If-Modified-Since\r\n\t\t// and/or If-None-Match header later on\r\n\t\tcacheURL = s.url;\r\n\r\n\t\t// More options handling for requests with no content\r\n\t\tif ( !s.hasContent ) {\r\n\r\n\t\t\t// If data is available, append data to url\r\n\t\t\tif ( s.data ) {\r\n\t\t\t\tcacheURL = ( s.url += ( ajax_rquery.test( cacheURL ) ? \"&\" : \"?\" ) + s.data );\r\n\t\t\t\t// #9682: remove data so that it's not used in an eventual retry\r\n\t\t\t\tdelete s.data;\r\n\t\t\t}\r\n\r\n\t\t\t// Add anti-cache in url if needed\r\n\t\t\tif ( s.cache === false ) {\r\n\t\t\t\ts.url = rts.test( cacheURL ) ?\r\n\r\n\t\t\t\t\t// If there is already a '_' parameter, set its value\r\n\t\t\t\t\tcacheURL.replace( rts, \"$1_=\" + ajax_nonce++ ) :\r\n\r\n\t\t\t\t\t// Otherwise add one to the end\r\n\t\t\t\t\tcacheURL + ( ajax_rquery.test( cacheURL ) ? \"&\" : \"?\" ) + \"_=\" + ajax_nonce++;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.\r\n\t\tif ( s.ifModified ) {\r\n\t\t\tif ( jQuery.lastModified[ cacheURL ] ) {\r\n\t\t\t\tjqXHR.setRequestHeader( \"If-Modified-Since\", jQuery.lastModified[ cacheURL ] );\r\n\t\t\t}\r\n\t\t\tif ( jQuery.etag[ cacheURL ] ) {\r\n\t\t\t\tjqXHR.setRequestHeader( \"If-None-Match\", jQuery.etag[ cacheURL ] );\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Set the correct header, if data is being sent\r\n\t\tif ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {\r\n\t\t\tjqXHR.setRequestHeader( \"Content-Type\", s.contentType );\r\n\t\t}\r\n\r\n\t\t// Set the Accepts header for the server, depending on the dataType\r\n\t\tjqXHR.setRequestHeader(\r\n\t\t\t\"Accept\",\r\n\t\t\ts.dataTypes[ 0 ] && s.accepts[ s.dataTypes[0] ] ?\r\n\t\t\t\ts.accepts[ s.dataTypes[0] ] + ( s.dataTypes[ 0 ] !== \"*\" ? \", \" + allTypes + \"; q=0.01\" : \"\" ) :\r\n\t\t\t\ts.accepts[ \"*\" ]\r\n\t\t);\r\n\r\n\t\t// Check for headers option\r\n\t\tfor ( i in s.headers ) {\r\n\t\t\tjqXHR.setRequestHeader( i, s.headers[ i ] );\r\n\t\t}\r\n\r\n\t\t// Allow custom headers/mimetypes and early abort\r\n\t\tif ( s.beforeSend && ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) {\r\n\t\t\t// Abort if not done already and return\r\n\t\t\treturn jqXHR.abort();\r\n\t\t}\r\n\r\n\t\t// aborting is no longer a cancellation\r\n\t\tstrAbort = \"abort\";\r\n\r\n\t\t// Install callbacks on deferreds\r\n\t\tfor ( i in { success: 1, error: 1, complete: 1 } ) {\r\n\t\t\tjqXHR[ i ]( s[ i ] );\r\n\t\t}\r\n\r\n\t\t// Get transport\r\n\t\ttransport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );\r\n\r\n\t\t// If no transport, we auto-abort\r\n\t\tif ( !transport ) {\r\n\t\t\tdone( -1, \"No Transport\" );\r\n\t\t} else {\r\n\t\t\tjqXHR.readyState = 1;\r\n\r\n\t\t\t// Send global event\r\n\t\t\tif ( fireGlobals ) {\r\n\t\t\t\tglobalEventContext.trigger( \"ajaxSend\", [ jqXHR, s ] );\r\n\t\t\t}\r\n\t\t\t// Timeout\r\n\t\t\tif ( s.async && s.timeout > 0 ) {\r\n\t\t\t\ttimeoutTimer = setTimeout(function() {\r\n\t\t\t\t\tjqXHR.abort(\"timeout\");\r\n\t\t\t\t}, s.timeout );\r\n\t\t\t}\r\n\r\n\t\t\ttry {\r\n\t\t\t\tstate = 1;\r\n\t\t\t\ttransport.send( requestHeaders, done );\r\n\t\t\t} catch ( e ) {\r\n\t\t\t\t// Propagate exception as error if not done\r\n\t\t\t\tif ( state < 2 ) {\r\n\t\t\t\t\tdone( -1, e );\r\n\t\t\t\t// Simply rethrow otherwise\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthrow e;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Callback for when everything is done\r\n\t\tfunction done( status, nativeStatusText, responses, headers ) {\r\n\t\t\tvar isSuccess, success, error, response, modified,\r\n\t\t\t\tstatusText = nativeStatusText;\r\n\r\n\t\t\t// Called once\r\n\t\t\tif ( state === 2 ) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t// State is \"done\" now\r\n\t\t\tstate = 2;\r\n\r\n\t\t\t// Clear timeout if it exists\r\n\t\t\tif ( timeoutTimer ) {\r\n\t\t\t\tclearTimeout( timeoutTimer );\r\n\t\t\t}\r\n\r\n\t\t\t// Dereference transport for early garbage collection\r\n\t\t\t// (no matter how long the jqXHR object will be used)\r\n\t\t\ttransport = undefined;\r\n\r\n\t\t\t// Cache response headers\r\n\t\t\tresponseHeadersString = headers || \"\";\r\n\r\n\t\t\t// Set readyState\r\n\t\t\tjqXHR.readyState = status > 0 ? 4 : 0;\r\n\r\n\t\t\t// Determine if successful\r\n\t\t\tisSuccess = status >= 200 && status < 300 || status === 304;\r\n\r\n\t\t\t// Get response data\r\n\t\t\tif ( responses ) {\r\n\t\t\t\tresponse = ajaxHandleResponses( s, jqXHR, responses );\r\n\t\t\t}\r\n\r\n\t\t\t// Convert no matter what (that way responseXXX fields are always set)\r\n\t\t\tresponse = ajaxConvert( s, response, jqXHR, isSuccess );\r\n\r\n\t\t\t// If successful, handle type chaining\r\n\t\t\tif ( isSuccess ) {\r\n\r\n\t\t\t\t// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.\r\n\t\t\t\tif ( s.ifModified ) {\r\n\t\t\t\t\tmodified = jqXHR.getResponseHeader(\"Last-Modified\");\r\n\t\t\t\t\tif ( modified ) {\r\n\t\t\t\t\t\tjQuery.lastModified[ cacheURL ] = modified;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tmodified = jqXHR.getResponseHeader(\"etag\");\r\n\t\t\t\t\tif ( modified ) {\r\n\t\t\t\t\t\tjQuery.etag[ cacheURL ] = modified;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// if no content\r\n\t\t\t\tif ( status === 204 || s.type === \"HEAD\" ) {\r\n\t\t\t\t\tstatusText = \"nocontent\";\r\n\r\n\t\t\t\t// if not modified\r\n\t\t\t\t} else if ( status === 304 ) {\r\n\t\t\t\t\tstatusText = \"notmodified\";\r\n\r\n\t\t\t\t// If we have data, let's convert it\r\n\t\t\t\t} else {\r\n\t\t\t\t\tstatusText = response.state;\r\n\t\t\t\t\tsuccess = response.data;\r\n\t\t\t\t\terror = response.error;\r\n\t\t\t\t\tisSuccess = !error;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t// We extract error from statusText\r\n\t\t\t\t// then normalize statusText and status for non-aborts\r\n\t\t\t\terror = statusText;\r\n\t\t\t\tif ( status || !statusText ) {\r\n\t\t\t\t\tstatusText = \"error\";\r\n\t\t\t\t\tif ( status < 0 ) {\r\n\t\t\t\t\t\tstatus = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// Set data for the fake xhr object\r\n\t\t\tjqXHR.status = status;\r\n\t\t\tjqXHR.statusText = ( nativeStatusText || statusText ) + \"\";\r\n\r\n\t\t\t// Success/Error\r\n\t\t\tif ( isSuccess ) {\r\n\t\t\t\tdeferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );\r\n\t\t\t} else {\r\n\t\t\t\tdeferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );\r\n\t\t\t}\r\n\r\n\t\t\t// Status-dependent callbacks\r\n\t\t\tjqXHR.statusCode( statusCode );\r\n\t\t\tstatusCode = undefined;\r\n\r\n\t\t\tif ( fireGlobals ) {\r\n\t\t\t\tglobalEventContext.trigger( isSuccess ? \"ajaxSuccess\" : \"ajaxError\",\r\n\t\t\t\t\t[ jqXHR, s, isSuccess ? success : error ] );\r\n\t\t\t}\r\n\r\n\t\t\t// Complete\r\n\t\t\tcompleteDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );\r\n\r\n\t\t\tif ( fireGlobals ) {\r\n\t\t\t\tglobalEventContext.trigger( \"ajaxComplete\", [ jqXHR, s ] );\r\n\t\t\t\t// Handle the global AJAX counter\r\n\t\t\t\tif ( !( --jQuery.active ) ) {\r\n\t\t\t\t\tjQuery.event.trigger(\"ajaxStop\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn jqXHR;\r\n\t},\r\n\r\n\tgetJSON: function( url, data, callback ) {\r\n\t\treturn jQuery.get( url, data, callback, \"json\" );\r\n\t},\r\n\r\n\tgetScript: function( url, callback ) {\r\n\t\treturn jQuery.get( url, undefined, callback, \"script\" );\r\n\t}\r\n});\r\n\r\njQuery.each( [ \"get\", \"post\" ], function( i, method ) {\r\n\tjQuery[ method ] = function( url, data, callback, type ) {\r\n\t\t// shift arguments if data argument was omitted\r\n\t\tif ( jQuery.isFunction( data ) ) {\r\n\t\t\ttype = type || callback;\r\n\t\t\tcallback = data;\r\n\t\t\tdata = undefined;\r\n\t\t}\r\n\r\n\t\treturn jQuery.ajax({\r\n\t\t\turl: url,\r\n\t\t\ttype: method,\r\n\t\t\tdataType: type,\r\n\t\t\tdata: data,\r\n\t\t\tsuccess: callback\r\n\t\t});\r\n\t};\r\n});\r\n\r\n/* Handles responses to an ajax request:\r\n * - finds the right dataType (mediates between content-type and expected dataType)\r\n * - returns the corresponding response\r\n */\r\nfunction ajaxHandleResponses( s, jqXHR, responses ) {\r\n\tvar firstDataType, ct, finalDataType, type,\r\n\t\tcontents = s.contents,\r\n\t\tdataTypes = s.dataTypes;\r\n\r\n\t// Remove auto dataType and get content-type in the process\r\n\twhile( dataTypes[ 0 ] === \"*\" ) {\r\n\t\tdataTypes.shift();\r\n\t\tif ( ct === undefined ) {\r\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\r\n\t\t}\r\n\t}\r\n\r\n\t// Check if we're dealing with a known content-type\r\n\tif ( ct ) {\r\n\t\tfor ( type in contents ) {\r\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\r\n\t\t\t\tdataTypes.unshift( type );\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t// Check to see if we have a response for the expected dataType\r\n\tif ( dataTypes[ 0 ] in responses ) {\r\n\t\tfinalDataType = dataTypes[ 0 ];\r\n\t} else {\r\n\t\t// Try convertible dataTypes\r\n\t\tfor ( type in responses ) {\r\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\r\n\t\t\t\tfinalDataType = type;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tif ( !firstDataType ) {\r\n\t\t\t\tfirstDataType = type;\r\n\t\t\t}\r\n\t\t}\r\n\t\t// Or just use first one\r\n\t\tfinalDataType = finalDataType || firstDataType;\r\n\t}\r\n\r\n\t// If we found a dataType\r\n\t// We add the dataType to the list if needed\r\n\t// and return the corresponding response\r\n\tif ( finalDataType ) {\r\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\r\n\t\t\tdataTypes.unshift( finalDataType );\r\n\t\t}\r\n\t\treturn responses[ finalDataType ];\r\n\t}\r\n}\r\n\r\n/* Chain conversions given the request and the original response\r\n * Also sets the responseXXX fields on the jqXHR instance\r\n */\r\nfunction ajaxConvert( s, response, jqXHR, isSuccess ) {\r\n\tvar conv2, current, conv, tmp, prev,\r\n\t\tconverters = {},\r\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\r\n\t\tdataTypes = s.dataTypes.slice();\r\n\r\n\t// Create converters map with lowercased keys\r\n\tif ( dataTypes[ 1 ] ) {\r\n\t\tfor ( conv in s.converters ) {\r\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\r\n\t\t}\r\n\t}\r\n\r\n\tcurrent = dataTypes.shift();\r\n\r\n\t// Convert to each sequential dataType\r\n\twhile ( current ) {\r\n\r\n\t\tif ( s.responseFields[ current ] ) {\r\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\r\n\t\t}\r\n\r\n\t\t// Apply the dataFilter if provided\r\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\r\n\t\t\tresponse = s.dataFilter( response, s.dataType );\r\n\t\t}\r\n\r\n\t\tprev = current;\r\n\t\tcurrent = dataTypes.shift();\r\n\r\n\t\tif ( current ) {\r\n\r\n\t\t\t// There's only work to do if current dataType is non-auto\r\n\t\t\tif ( current === \"*\" ) {\r\n\r\n\t\t\t\tcurrent = prev;\r\n\r\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\r\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\r\n\r\n\t\t\t\t// Seek a direct converter\r\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\r\n\r\n\t\t\t\t// If none found, seek a pair\r\n\t\t\t\tif ( !conv ) {\r\n\t\t\t\t\tfor ( conv2 in converters ) {\r\n\r\n\t\t\t\t\t\t// If conv2 outputs current\r\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\r\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\r\n\r\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\r\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\r\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\r\n\t\t\t\t\t\t\tif ( conv ) {\r\n\t\t\t\t\t\t\t\t// Condense equivalence converters\r\n\t\t\t\t\t\t\t\tif ( conv === true ) {\r\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\r\n\r\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\r\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\r\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\r\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Apply converter (if not an equivalence)\r\n\t\t\t\tif ( conv !== true ) {\r\n\r\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\r\n\t\t\t\t\tif ( conv && s[ \"throws\" ] ) {\r\n\t\t\t\t\t\tresponse = conv( response );\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\tresponse = conv( response );\r\n\t\t\t\t\t\t} catch ( e ) {\r\n\t\t\t\t\t\t\treturn { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\treturn { state: \"success\", data: response };\r\n}\r\n// Install script dataType\r\njQuery.ajaxSetup({\r\n\taccepts: {\r\n\t\tscript: \"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript\"\r\n\t},\r\n\tcontents: {\r\n\t\tscript: /(?:java|ecma)script/\r\n\t},\r\n\tconverters: {\r\n\t\t\"text script\": function( text ) {\r\n\t\t\tjQuery.globalEval( text );\r\n\t\t\treturn text;\r\n\t\t}\r\n\t}\r\n});\r\n\r\n// Handle cache's special case and global\r\njQuery.ajaxPrefilter( \"script\", function( s ) {\r\n\tif ( s.cache === undefined ) {\r\n\t\ts.cache = false;\r\n\t}\r\n\tif ( s.crossDomain ) {\r\n\t\ts.type = \"GET\";\r\n\t\ts.global = false;\r\n\t}\r\n});\r\n\r\n// Bind script tag hack transport\r\njQuery.ajaxTransport( \"script\", function(s) {\r\n\r\n\t// This transport only deals with cross domain requests\r\n\tif ( s.crossDomain ) {\r\n\r\n\t\tvar script,\r\n\t\t\thead = document.head || jQuery(\"head\")[0] || document.documentElement;\r\n\r\n\t\treturn {\r\n\r\n\t\t\tsend: function( _, callback ) {\r\n\r\n\t\t\t\tscript = document.createElement(\"script\");\r\n\r\n\t\t\t\tscript.async = true;\r\n\r\n\t\t\t\tif ( s.scriptCharset ) {\r\n\t\t\t\t\tscript.charset = s.scriptCharset;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tscript.src = s.url;\r\n\r\n\t\t\t\t// Attach handlers for all browsers\r\n\t\t\t\tscript.onload = script.onreadystatechange = function( _, isAbort ) {\r\n\r\n\t\t\t\t\tif ( isAbort || !script.readyState || /loaded|complete/.test( script.readyState ) ) {\r\n\r\n\t\t\t\t\t\t// Handle memory leak in IE\r\n\t\t\t\t\t\tscript.onload = script.onreadystatechange = null;\r\n\r\n\t\t\t\t\t\t// Remove the script\r\n\t\t\t\t\t\tif ( script.parentNode ) {\r\n\t\t\t\t\t\t\tscript.parentNode.removeChild( script );\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t// Dereference the script\r\n\t\t\t\t\t\tscript = null;\r\n\r\n\t\t\t\t\t\t// Callback if not abort\r\n\t\t\t\t\t\tif ( !isAbort ) {\r\n\t\t\t\t\t\t\tcallback( 200, \"success\" );\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t};\r\n\r\n\t\t\t\t// Circumvent IE6 bugs with base elements (#2709 and #4378) by prepending\r\n\t\t\t\t// Use native DOM manipulation to avoid our domManip AJAX trickery\r\n\t\t\t\thead.insertBefore( script, head.firstChild );\r\n\t\t\t},\r\n\r\n\t\t\tabort: function() {\r\n\t\t\t\tif ( script ) {\r\n\t\t\t\t\tscript.onload( undefined, true );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\t}\r\n});\r\nvar oldCallbacks = [],\r\n\trjsonp = /(=)\\?(?=&|$)|\\?\\?/;\r\n\r\n// Default jsonp settings\r\njQuery.ajaxSetup({\r\n\tjsonp: \"callback\",\r\n\tjsonpCallback: function() {\r\n\t\tvar callback = oldCallbacks.pop() || ( jQuery.expando + \"_\" + ( ajax_nonce++ ) );\r\n\t\tthis[ callback ] = true;\r\n\t\treturn callback;\r\n\t}\r\n});\r\n\r\n// Detect, normalize options and install callbacks for jsonp requests\r\njQuery.ajaxPrefilter( \"json jsonp\", function( s, originalSettings, jqXHR ) {\r\n\r\n\tvar callbackName, overwritten, responseContainer,\r\n\t\tjsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ?\r\n\t\t\t\"url\" :\r\n\t\t\ttypeof s.data === \"string\" && !( s.contentType || \"\" ).indexOf(\"application/x-www-form-urlencoded\") && rjsonp.test( s.data ) && \"data\"\r\n\t\t);\r\n\r\n\t// Handle iff the expected data type is \"jsonp\" or we have a parameter to set\r\n\tif ( jsonProp || s.dataTypes[ 0 ] === \"jsonp\" ) {\r\n\r\n\t\t// Get callback name, remembering preexisting value associated with it\r\n\t\tcallbackName = s.jsonpCallback = jQuery.isFunction( s.jsonpCallback ) ?\r\n\t\t\ts.jsonpCallback() :\r\n\t\t\ts.jsonpCallback;\r\n\r\n\t\t// Insert callback into url or form data\r\n\t\tif ( jsonProp ) {\r\n\t\t\ts[ jsonProp ] = s[ jsonProp ].replace( rjsonp, \"$1\" + callbackName );\r\n\t\t} else if ( s.jsonp !== false ) {\r\n\t\t\ts.url += ( ajax_rquery.test( s.url ) ? \"&\" : \"?\" ) + s.jsonp + \"=\" + callbackName;\r\n\t\t}\r\n\r\n\t\t// Use data converter to retrieve json after script execution\r\n\t\ts.converters[\"script json\"] = function() {\r\n\t\t\tif ( !responseContainer ) {\r\n\t\t\t\tjQuery.error( callbackName + \" was not called\" );\r\n\t\t\t}\r\n\t\t\treturn responseContainer[ 0 ];\r\n\t\t};\r\n\r\n\t\t// force json dataType\r\n\t\ts.dataTypes[ 0 ] = \"json\";\r\n\r\n\t\t// Install callback\r\n\t\toverwritten = window[ callbackName ];\r\n\t\twindow[ callbackName ] = function() {\r\n\t\t\tresponseContainer = arguments;\r\n\t\t};\r\n\r\n\t\t// Clean-up function (fires after converters)\r\n\t\tjqXHR.always(function() {\r\n\t\t\t// Restore preexisting value\r\n\t\t\twindow[ callbackName ] = overwritten;\r\n\r\n\t\t\t// Save back as free\r\n\t\t\tif ( s[ callbackName ] ) {\r\n\t\t\t\t// make sure that re-using the options doesn't screw things around\r\n\t\t\t\ts.jsonpCallback = originalSettings.jsonpCallback;\r\n\r\n\t\t\t\t// save the callback name for future use\r\n\t\t\t\toldCallbacks.push( callbackName );\r\n\t\t\t}\r\n\r\n\t\t\t// Call if it was a function and we have a response\r\n\t\t\tif ( responseContainer && jQuery.isFunction( overwritten ) ) {\r\n\t\t\t\toverwritten( responseContainer[ 0 ] );\r\n\t\t\t}\r\n\r\n\t\t\tresponseContainer = overwritten = undefined;\r\n\t\t});\r\n\r\n\t\t// Delegate to script\r\n\t\treturn \"script\";\r\n\t}\r\n});\r\nvar xhrCallbacks, xhrSupported,\r\n\txhrId = 0,\r\n\t// #5280: Internet Explorer will keep connections alive if we don't abort on unload\r\n\txhrOnUnloadAbort = window.ActiveXObject && function() {\r\n\t\t// Abort all pending requests\r\n\t\tvar key;\r\n\t\tfor ( key in xhrCallbacks ) {\r\n\t\t\txhrCallbacks[ key ]( undefined, true );\r\n\t\t}\r\n\t};\r\n\r\n// Functions to create xhrs\r\nfunction createStandardXHR() {\r\n\ttry {\r\n\t\treturn new window.XMLHttpRequest();\r\n\t} catch( e ) {}\r\n}\r\n\r\nfunction createActiveXHR() {\r\n\ttry {\r\n\t\treturn new window.ActiveXObject(\"Microsoft.XMLHTTP\");\r\n\t} catch( e ) {}\r\n}\r\n\r\n// Create the request object\r\n// (This is still attached to ajaxSettings for backward compatibility)\r\njQuery.ajaxSettings.xhr = window.ActiveXObject ?\r\n\t/* Microsoft failed to properly\r\n\t * implement the XMLHttpRequest in IE7 (can't request local files),\r\n\t * so we use the ActiveXObject when it is available\r\n\t * Additionally XMLHttpRequest can be disabled in IE7/IE8 so\r\n\t * we need a fallback.\r\n\t */\r\n\tfunction() {\r\n\t\treturn !this.isLocal && createStandardXHR() || createActiveXHR();\r\n\t} :\r\n\t// For all other browsers, use the standard XMLHttpRequest object\r\n\tcreateStandardXHR;\r\n\r\n// Determine support properties\r\nxhrSupported = jQuery.ajaxSettings.xhr();\r\njQuery.support.cors = !!xhrSupported && ( \"withCredentials\" in xhrSupported );\r\nxhrSupported = jQuery.support.ajax = !!xhrSupported;\r\n\r\n// Create transport if the browser can provide an xhr\r\nif ( xhrSupported ) {\r\n\r\n\tjQuery.ajaxTransport(function( s ) {\r\n\t\t// Cross domain only allowed if supported through XMLHttpRequest\r\n\t\tif ( !s.crossDomain || jQuery.support.cors ) {\r\n\r\n\t\t\tvar callback;\r\n\r\n\t\t\treturn {\r\n\t\t\t\tsend: function( headers, complete ) {\r\n\r\n\t\t\t\t\t// Get a new xhr\r\n\t\t\t\t\tvar handle, i,\r\n\t\t\t\t\t\txhr = s.xhr();\r\n\r\n\t\t\t\t\t// Open the socket\r\n\t\t\t\t\t// Passing null username, generates a login popup on Opera (#2865)\r\n\t\t\t\t\tif ( s.username ) {\r\n\t\t\t\t\t\txhr.open( s.type, s.url, s.async, s.username, s.password );\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\txhr.open( s.type, s.url, s.async );\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// Apply custom fields if provided\r\n\t\t\t\t\tif ( s.xhrFields ) {\r\n\t\t\t\t\t\tfor ( i in s.xhrFields ) {\r\n\t\t\t\t\t\t\txhr[ i ] = s.xhrFields[ i ];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// Override mime type if needed\r\n\t\t\t\t\tif ( s.mimeType && xhr.overrideMimeType ) {\r\n\t\t\t\t\t\txhr.overrideMimeType( s.mimeType );\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// X-Requested-With header\r\n\t\t\t\t\t// For cross-domain requests, seeing as conditions for a preflight are\r\n\t\t\t\t\t// akin to a jigsaw puzzle, we simply never set it to be sure.\r\n\t\t\t\t\t// (it can always be set on a per-request basis or even using ajaxSetup)\r\n\t\t\t\t\t// For same-domain requests, won't change header if already provided.\r\n\t\t\t\t\tif ( !s.crossDomain && !headers[\"X-Requested-With\"] ) {\r\n\t\t\t\t\t\theaders[\"X-Requested-With\"] = \"XMLHttpRequest\";\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// Need an extra try/catch for cross domain requests in Firefox 3\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tfor ( i in headers ) {\r\n\t\t\t\t\t\t\txhr.setRequestHeader( i, headers[ i ] );\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} catch( err ) {}\r\n\r\n\t\t\t\t\t// Do send the request\r\n\t\t\t\t\t// This may raise an exception which is actually\r\n\t\t\t\t\t// handled in jQuery.ajax (so no try/catch here)\r\n\t\t\t\t\txhr.send( ( s.hasContent && s.data ) || null );\r\n\r\n\t\t\t\t\t// Listener\r\n\t\t\t\t\tcallback = function( _, isAbort ) {\r\n\t\t\t\t\t\tvar status, responseHeaders, statusText, responses;\r\n\r\n\t\t\t\t\t\t// Firefox throws exceptions when accessing properties\r\n\t\t\t\t\t\t// of an xhr when a network error occurred\r\n\t\t\t\t\t\t// http://helpful.knobs-dials.com/index.php/Component_returned_failure_code:_0x80040111_(NS_ERROR_NOT_AVAILABLE)\r\n\t\t\t\t\t\ttry {\r\n\r\n\t\t\t\t\t\t\t// Was never called and is aborted or complete\r\n\t\t\t\t\t\t\tif ( callback && ( isAbort || xhr.readyState === 4 ) ) {\r\n\r\n\t\t\t\t\t\t\t\t// Only called once\r\n\t\t\t\t\t\t\t\tcallback = undefined;\r\n\r\n\t\t\t\t\t\t\t\t// Do not keep as active anymore\r\n\t\t\t\t\t\t\t\tif ( handle ) {\r\n\t\t\t\t\t\t\t\t\txhr.onreadystatechange = jQuery.noop;\r\n\t\t\t\t\t\t\t\t\tif ( xhrOnUnloadAbort ) {\r\n\t\t\t\t\t\t\t\t\t\tdelete xhrCallbacks[ handle ];\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t// If it's an abort\r\n\t\t\t\t\t\t\t\tif ( isAbort ) {\r\n\t\t\t\t\t\t\t\t\t// Abort it manually if needed\r\n\t\t\t\t\t\t\t\t\tif ( xhr.readyState !== 4 ) {\r\n\t\t\t\t\t\t\t\t\t\txhr.abort();\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\tresponses = {};\r\n\t\t\t\t\t\t\t\t\tstatus = xhr.status;\r\n\t\t\t\t\t\t\t\t\tresponseHeaders = xhr.getAllResponseHeaders();\r\n\r\n\t\t\t\t\t\t\t\t\t// When requesting binary data, IE6-9 will throw an exception\r\n\t\t\t\t\t\t\t\t\t// on any attempt to access responseText (#11426)\r\n\t\t\t\t\t\t\t\t\tif ( typeof xhr.responseText === \"string\" ) {\r\n\t\t\t\t\t\t\t\t\t\tresponses.text = xhr.responseText;\r\n\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t// Firefox throws an exception when accessing\r\n\t\t\t\t\t\t\t\t\t// statusText for faulty cross-domain requests\r\n\t\t\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\t\t\tstatusText = xhr.statusText;\r\n\t\t\t\t\t\t\t\t\t} catch( e ) {\r\n\t\t\t\t\t\t\t\t\t\t// We normalize with Webkit giving an empty statusText\r\n\t\t\t\t\t\t\t\t\t\tstatusText = \"\";\r\n\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t// Filter status for non standard behaviors\r\n\r\n\t\t\t\t\t\t\t\t\t// If the request is local and we have data: assume a success\r\n\t\t\t\t\t\t\t\t\t// (success with no data won't get notified, that's the best we\r\n\t\t\t\t\t\t\t\t\t// can do given current implementations)\r\n\t\t\t\t\t\t\t\t\tif ( !status && s.isLocal && !s.crossDomain ) {\r\n\t\t\t\t\t\t\t\t\t\tstatus = responses.text ? 200 : 404;\r\n\t\t\t\t\t\t\t\t\t// IE - #1450: sometimes returns 1223 when it should be 204\r\n\t\t\t\t\t\t\t\t\t} else if ( status === 1223 ) {\r\n\t\t\t\t\t\t\t\t\t\tstatus = 204;\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} catch( firefoxAccessException ) {\r\n\t\t\t\t\t\t\tif ( !isAbort ) {\r\n\t\t\t\t\t\t\t\tcomplete( -1, firefoxAccessException );\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t// Call complete if needed\r\n\t\t\t\t\t\tif ( responses ) {\r\n\t\t\t\t\t\t\tcomplete( status, statusText, responses, responseHeaders );\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t};\r\n\r\n\t\t\t\t\tif ( !s.async ) {\r\n\t\t\t\t\t\t// if we're in sync mode we fire the callback\r\n\t\t\t\t\t\tcallback();\r\n\t\t\t\t\t} else if ( xhr.readyState === 4 ) {\r\n\t\t\t\t\t\t// (IE6 & IE7) if it's in cache and has been\r\n\t\t\t\t\t\t// retrieved directly we need to fire the callback\r\n\t\t\t\t\t\tsetTimeout( callback );\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\thandle = ++xhrId;\r\n\t\t\t\t\t\tif ( xhrOnUnloadAbort ) {\r\n\t\t\t\t\t\t\t// Create the active xhrs callbacks list if needed\r\n\t\t\t\t\t\t\t// and attach the unload handler\r\n\t\t\t\t\t\t\tif ( !xhrCallbacks ) {\r\n\t\t\t\t\t\t\t\txhrCallbacks = {};\r\n\t\t\t\t\t\t\t\tjQuery( window ).unload( xhrOnUnloadAbort );\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t// Add to list of active xhrs callbacks\r\n\t\t\t\t\t\t\txhrCallbacks[ handle ] = callback;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\txhr.onreadystatechange = callback;\r\n\t\t\t\t\t}\r\n\t\t\t\t},\r\n\r\n\t\t\t\tabort: function() {\r\n\t\t\t\t\tif ( callback ) {\r\n\t\t\t\t\t\tcallback( undefined, true );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t};\r\n\t\t}\r\n\t});\r\n}\r\nvar fxNow, timerId,\r\n\trfxtypes = /^(?:toggle|show|hide)$/,\r\n\trfxnum = new RegExp( \"^(?:([+-])=|)(\" + core_pnum + \")([a-z%]*)$\", \"i\" ),\r\n\trrun = /queueHooks$/,\r\n\tanimationPrefilters = [ defaultPrefilter ],\r\n\ttweeners = {\r\n\t\t\"*\": [function( prop, value ) {\r\n\t\t\tvar tween = this.createTween( prop, value ),\r\n\t\t\t\ttarget = tween.cur(),\r\n\t\t\t\tparts = rfxnum.exec( value ),\r\n\t\t\t\tunit = parts && parts[ 3 ] || ( jQuery.cssNumber[ prop ] ? \"\" : \"px\" ),\r\n\r\n\t\t\t\t// Starting value computation is required for potential unit mismatches\r\n\t\t\t\tstart = ( jQuery.cssNumber[ prop ] || unit !== \"px\" && +target ) &&\r\n\t\t\t\t\trfxnum.exec( jQuery.css( tween.elem, prop ) ),\r\n\t\t\t\tscale = 1,\r\n\t\t\t\tmaxIterations = 20;\r\n\r\n\t\t\tif ( start && start[ 3 ] !== unit ) {\r\n\t\t\t\t// Trust units reported by jQuery.css\r\n\t\t\t\tunit = unit || start[ 3 ];\r\n\r\n\t\t\t\t// Make sure we update the tween properties later on\r\n\t\t\t\tparts = parts || [];\r\n\r\n\t\t\t\t// Iteratively approximate from a nonzero starting point\r\n\t\t\t\tstart = +target || 1;\r\n\r\n\t\t\t\tdo {\r\n\t\t\t\t\t// If previous iteration zeroed out, double until we get *something*\r\n\t\t\t\t\t// Use a string for doubling factor so we don't accidentally see scale as unchanged below\r\n\t\t\t\t\tscale = scale || \".5\";\r\n\r\n\t\t\t\t\t// Adjust and apply\r\n\t\t\t\t\tstart = start / scale;\r\n\t\t\t\t\tjQuery.style( tween.elem, prop, start + unit );\r\n\r\n\t\t\t\t// Update scale, tolerating zero or NaN from tween.cur()\r\n\t\t\t\t// And breaking the loop if scale is unchanged or perfect, or if we've just had enough\r\n\t\t\t\t} while ( scale !== (scale = tween.cur() / target) && scale !== 1 && --maxIterations );\r\n\t\t\t}\r\n\r\n\t\t\t// Update tween properties\r\n\t\t\tif ( parts ) {\r\n\t\t\t\tstart = tween.start = +start || +target || 0;\r\n\t\t\t\ttween.unit = unit;\r\n\t\t\t\t// If a +=/-= token was provided, we're doing a relative animation\r\n\t\t\t\ttween.end = parts[ 1 ] ?\r\n\t\t\t\t\tstart + ( parts[ 1 ] + 1 ) * parts[ 2 ] :\r\n\t\t\t\t\t+parts[ 2 ];\r\n\t\t\t}\r\n\r\n\t\t\treturn tween;\r\n\t\t}]\r\n\t};\r\n\r\n// Animations created synchronously will run synchronously\r\nfunction createFxNow() {\r\n\tsetTimeout(function() {\r\n\t\tfxNow = undefined;\r\n\t});\r\n\treturn ( fxNow = jQuery.now() );\r\n}\r\n\r\nfunction createTween( value, prop, animation ) {\r\n\tvar tween,\r\n\t\tcollection = ( tweeners[ prop ] || [] ).concat( tweeners[ \"*\" ] ),\r\n\t\tindex = 0,\r\n\t\tlength = collection.length;\r\n\tfor ( ; index < length; index++ ) {\r\n\t\tif ( (tween = collection[ index ].call( animation, prop, value )) ) {\r\n\r\n\t\t\t// we're done with this property\r\n\t\t\treturn tween;\r\n\t\t}\r\n\t}\r\n}\r\n\r\nfunction Animation( elem, properties, options ) {\r\n\tvar result,\r\n\t\tstopped,\r\n\t\tindex = 0,\r\n\t\tlength = animationPrefilters.length,\r\n\t\tdeferred = jQuery.Deferred().always( function() {\r\n\t\t\t// don't match elem in the :animated selector\r\n\t\t\tdelete tick.elem;\r\n\t\t}),\r\n\t\ttick = function() {\r\n\t\t\tif ( stopped ) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\tvar currentTime = fxNow || createFxNow(),\r\n\t\t\t\tremaining = Math.max( 0, animation.startTime + animation.duration - currentTime ),\r\n\t\t\t\t// archaic crash bug won't allow us to use 1 - ( 0.5 || 0 ) (#12497)\r\n\t\t\t\ttemp = remaining / animation.duration || 0,\r\n\t\t\t\tpercent = 1 - temp,\r\n\t\t\t\tindex = 0,\r\n\t\t\t\tlength = animation.tweens.length;\r\n\r\n\t\t\tfor ( ; index < length ; index++ ) {\r\n\t\t\t\tanimation.tweens[ index ].run( percent );\r\n\t\t\t}\r\n\r\n\t\t\tdeferred.notifyWith( elem, [ animation, percent, remaining ]);\r\n\r\n\t\t\tif ( percent < 1 && length ) {\r\n\t\t\t\treturn remaining;\r\n\t\t\t} else {\r\n\t\t\t\tdeferred.resolveWith( elem, [ animation ] );\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t},\r\n\t\tanimation = deferred.promise({\r\n\t\t\telem: elem,\r\n\t\t\tprops: jQuery.extend( {}, properties ),\r\n\t\t\topts: jQuery.extend( true, { specialEasing: {} }, options ),\r\n\t\t\toriginalProperties: properties,\r\n\t\t\toriginalOptions: options,\r\n\t\t\tstartTime: fxNow || createFxNow(),\r\n\t\t\tduration: options.duration,\r\n\t\t\ttweens: [],\r\n\t\t\tcreateTween: function( prop, end ) {\r\n\t\t\t\tvar tween = jQuery.Tween( elem, animation.opts, prop, end,\r\n\t\t\t\t\t\tanimation.opts.specialEasing[ prop ] || animation.opts.easing );\r\n\t\t\t\tanimation.tweens.push( tween );\r\n\t\t\t\treturn tween;\r\n\t\t\t},\r\n\t\t\tstop: function( gotoEnd ) {\r\n\t\t\t\tvar index = 0,\r\n\t\t\t\t\t// if we are going to the end, we want to run all the tweens\r\n\t\t\t\t\t// otherwise we skip this part\r\n\t\t\t\t\tlength = gotoEnd ? animation.tweens.length : 0;\r\n\t\t\t\tif ( stopped ) {\r\n\t\t\t\t\treturn this;\r\n\t\t\t\t}\r\n\t\t\t\tstopped = true;\r\n\t\t\t\tfor ( ; index < length ; index++ ) {\r\n\t\t\t\t\tanimation.tweens[ index ].run( 1 );\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// resolve when we played the last frame\r\n\t\t\t\t// otherwise, reject\r\n\t\t\t\tif ( gotoEnd ) {\r\n\t\t\t\t\tdeferred.resolveWith( elem, [ animation, gotoEnd ] );\r\n\t\t\t\t} else {\r\n\t\t\t\t\tdeferred.rejectWith( elem, [ animation, gotoEnd ] );\r\n\t\t\t\t}\r\n\t\t\t\treturn this;\r\n\t\t\t}\r\n\t\t}),\r\n\t\tprops = animation.props;\r\n\r\n\tpropFilter( props, animation.opts.specialEasing );\r\n\r\n\tfor ( ; index < length ; index++ ) {\r\n\t\tresult = animationPrefilters[ index ].call( animation, elem, props, animation.opts );\r\n\t\tif ( result ) {\r\n\t\t\treturn result;\r\n\t\t}\r\n\t}\r\n\r\n\tjQuery.map( props, createTween, animation );\r\n\r\n\tif ( jQuery.isFunction( animation.opts.start ) ) {\r\n\t\tanimation.opts.start.call( elem, animation );\r\n\t}\r\n\r\n\tjQuery.fx.timer(\r\n\t\tjQuery.extend( tick, {\r\n\t\t\telem: elem,\r\n\t\t\tanim: animation,\r\n\t\t\tqueue: animation.opts.queue\r\n\t\t})\r\n\t);\r\n\r\n\t// attach callbacks from options\r\n\treturn animation.progress( animation.opts.progress )\r\n\t\t.done( animation.opts.done, animation.opts.complete )\r\n\t\t.fail( animation.opts.fail )\r\n\t\t.always( animation.opts.always );\r\n}\r\n\r\nfunction propFilter( props, specialEasing ) {\r\n\tvar index, name, easing, value, hooks;\r\n\r\n\t// camelCase, specialEasing and expand cssHook pass\r\n\tfor ( index in props ) {\r\n\t\tname = jQuery.camelCase( index );\r\n\t\teasing = specialEasing[ name ];\r\n\t\tvalue = props[ index ];\r\n\t\tif ( jQuery.isArray( value ) ) {\r\n\t\t\teasing = value[ 1 ];\r\n\t\t\tvalue = props[ index ] = value[ 0 ];\r\n\t\t}\r\n\r\n\t\tif ( index !== name ) {\r\n\t\t\tprops[ name ] = value;\r\n\t\t\tdelete props[ index ];\r\n\t\t}\r\n\r\n\t\thooks = jQuery.cssHooks[ name ];\r\n\t\tif ( hooks && \"expand\" in hooks ) {\r\n\t\t\tvalue = hooks.expand( value );\r\n\t\t\tdelete props[ name ];\r\n\r\n\t\t\t// not quite $.extend, this wont overwrite keys already present.\r\n\t\t\t// also - reusing 'index' from above because we have the correct \"name\"\r\n\t\t\tfor ( index in value ) {\r\n\t\t\t\tif ( !( index in props ) ) {\r\n\t\t\t\t\tprops[ index ] = value[ index ];\r\n\t\t\t\t\tspecialEasing[ index ] = easing;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tspecialEasing[ name ] = easing;\r\n\t\t}\r\n\t}\r\n}\r\n\r\njQuery.Animation = jQuery.extend( Animation, {\r\n\r\n\ttweener: function( props, callback ) {\r\n\t\tif ( jQuery.isFunction( props ) ) {\r\n\t\t\tcallback = props;\r\n\t\t\tprops = [ \"*\" ];\r\n\t\t} else {\r\n\t\t\tprops = props.split(\" \");\r\n\t\t}\r\n\r\n\t\tvar prop,\r\n\t\t\tindex = 0,\r\n\t\t\tlength = props.length;\r\n\r\n\t\tfor ( ; index < length ; index++ ) {\r\n\t\t\tprop = props[ index ];\r\n\t\t\ttweeners[ prop ] = tweeners[ prop ] || [];\r\n\t\t\ttweeners[ prop ].unshift( callback );\r\n\t\t}\r\n\t},\r\n\r\n\tprefilter: function( callback, prepend ) {\r\n\t\tif ( prepend ) {\r\n\t\t\tanimationPrefilters.unshift( callback );\r\n\t\t} else {\r\n\t\t\tanimationPrefilters.push( callback );\r\n\t\t}\r\n\t}\r\n});\r\n\r\nfunction defaultPrefilter( elem, props, opts ) {\r\n\t/* jshint validthis: true */\r\n\tvar prop, value, toggle, tween, hooks, oldfire,\r\n\t\tanim = this,\r\n\t\torig = {},\r\n\t\tstyle = elem.style,\r\n\t\thidden = elem.nodeType && isHidden( elem ),\r\n\t\tdataShow = jQuery._data( elem, \"fxshow\" );\r\n\r\n\t// handle queue: false promises\r\n\tif ( !opts.queue ) {\r\n\t\thooks = jQuery._queueHooks( elem, \"fx\" );\r\n\t\tif ( hooks.unqueued == null ) {\r\n\t\t\thooks.unqueued = 0;\r\n\t\t\toldfire = hooks.empty.fire;\r\n\t\t\thooks.empty.fire = function() {\r\n\t\t\t\tif ( !hooks.unqueued ) {\r\n\t\t\t\t\toldfire();\r\n\t\t\t\t}\r\n\t\t\t};\r\n\t\t}\r\n\t\thooks.unqueued++;\r\n\r\n\t\tanim.always(function() {\r\n\t\t\t// doing this makes sure that the complete handler will be called\r\n\t\t\t// before this completes\r\n\t\t\tanim.always(function() {\r\n\t\t\t\thooks.unqueued--;\r\n\t\t\t\tif ( !jQuery.queue( elem, \"fx\" ).length ) {\r\n\t\t\t\t\thooks.empty.fire();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t});\r\n\t}\r\n\r\n\t// height/width overflow pass\r\n\tif ( elem.nodeType === 1 && ( \"height\" in props || \"width\" in props ) ) {\r\n\t\t// Make sure that nothing sneaks out\r\n\t\t// Record all 3 overflow attributes because IE does not\r\n\t\t// change the overflow attribute when overflowX and\r\n\t\t// overflowY are set to the same value\r\n\t\topts.overflow = [ style.overflow, style.overflowX, style.overflowY ];\r\n\r\n\t\t// Set display property to inline-block for height/width\r\n\t\t// animations on inline elements that are having width/height animated\r\n\t\tif ( jQuery.css( elem, \"display\" ) === \"inline\" &&\r\n\t\t\t\tjQuery.css( elem, \"float\" ) === \"none\" ) {\r\n\r\n\t\t\t// inline-level elements accept inline-block;\r\n\t\t\t// block-level elements need to be inline with layout\r\n\t\t\tif ( !jQuery.support.inlineBlockNeedsLayout || css_defaultDisplay( elem.nodeName ) === \"inline\" ) {\r\n\t\t\t\tstyle.display = \"inline-block\";\r\n\r\n\t\t\t} else {\r\n\t\t\t\tstyle.zoom = 1;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tif ( opts.overflow ) {\r\n\t\tstyle.overflow = \"hidden\";\r\n\t\tif ( !jQuery.support.shrinkWrapBlocks ) {\r\n\t\t\tanim.always(function() {\r\n\t\t\t\tstyle.overflow = opts.overflow[ 0 ];\r\n\t\t\t\tstyle.overflowX = opts.overflow[ 1 ];\r\n\t\t\t\tstyle.overflowY = opts.overflow[ 2 ];\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t// show/hide pass\r\n\tfor ( prop in props ) {\r\n\t\tvalue = props[ prop ];\r\n\t\tif ( rfxtypes.exec( value ) ) {\r\n\t\t\tdelete props[ prop ];\r\n\t\t\ttoggle = toggle || value === \"toggle\";\r\n\t\t\tif ( value === ( hidden ? \"hide\" : \"show\" ) ) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\torig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop );\r\n\t\t}\r\n\t}\r\n\r\n\tif ( !jQuery.isEmptyObject( orig ) ) {\r\n\t\tif ( dataShow ) {\r\n\t\t\tif ( \"hidden\" in dataShow ) {\r\n\t\t\t\thidden = dataShow.hidden;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tdataShow = jQuery._data( elem, \"fxshow\", {} );\r\n\t\t}\r\n\r\n\t\t// store state if its toggle - enables .stop().toggle() to \"reverse\"\r\n\t\tif ( toggle ) {\r\n\t\t\tdataShow.hidden = !hidden;\r\n\t\t}\r\n\t\tif ( hidden ) {\r\n\t\t\tjQuery( elem ).show();\r\n\t\t} else {\r\n\t\t\tanim.done(function() {\r\n\t\t\t\tjQuery( elem ).hide();\r\n\t\t\t});\r\n\t\t}\r\n\t\tanim.done(function() {\r\n\t\t\tvar prop;\r\n\t\t\tjQuery._removeData( elem, \"fxshow\" );\r\n\t\t\tfor ( prop in orig ) {\r\n\t\t\t\tjQuery.style( elem, prop, orig[ prop ] );\r\n\t\t\t}\r\n\t\t});\r\n\t\tfor ( prop in orig ) {\r\n\t\t\ttween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim );\r\n\r\n\t\t\tif ( !( prop in dataShow ) ) {\r\n\t\t\t\tdataShow[ prop ] = tween.start;\r\n\t\t\t\tif ( hidden ) {\r\n\t\t\t\t\ttween.end = tween.start;\r\n\t\t\t\t\ttween.start = prop === \"width\" || prop === \"height\" ? 1 : 0;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\nfunction Tween( elem, options, prop, end, easing ) {\r\n\treturn new Tween.prototype.init( elem, options, prop, end, easing );\r\n}\r\njQuery.Tween = Tween;\r\n\r\nTween.prototype = {\r\n\tconstructor: Tween,\r\n\tinit: function( elem, options, prop, end, easing, unit ) {\r\n\t\tthis.elem = elem;\r\n\t\tthis.prop = prop;\r\n\t\tthis.easing = easing || \"swing\";\r\n\t\tthis.options = options;\r\n\t\tthis.start = this.now = this.cur();\r\n\t\tthis.end = end;\r\n\t\tthis.unit = unit || ( jQuery.cssNumber[ prop ] ? \"\" : \"px\" );\r\n\t},\r\n\tcur: function() {\r\n\t\tvar hooks = Tween.propHooks[ this.prop ];\r\n\r\n\t\treturn hooks && hooks.get ?\r\n\t\t\thooks.get( this ) :\r\n\t\t\tTween.propHooks._default.get( this );\r\n\t},\r\n\trun: function( percent ) {\r\n\t\tvar eased,\r\n\t\t\thooks = Tween.propHooks[ this.prop ];\r\n\r\n\t\tif ( this.options.duration ) {\r\n\t\t\tthis.pos = eased = jQuery.easing[ this.easing ](\r\n\t\t\t\tpercent, this.options.duration * percent, 0, 1, this.options.duration\r\n\t\t\t);\r\n\t\t} else {\r\n\t\t\tthis.pos = eased = percent;\r\n\t\t}\r\n\t\tthis.now = ( this.end - this.start ) * eased + this.start;\r\n\r\n\t\tif ( this.options.step ) {\r\n\t\t\tthis.options.step.call( this.elem, this.now, this );\r\n\t\t}\r\n\r\n\t\tif ( hooks && hooks.set ) {\r\n\t\t\thooks.set( this );\r\n\t\t} else {\r\n\t\t\tTween.propHooks._default.set( this );\r\n\t\t}\r\n\t\treturn this;\r\n\t}\r\n};\r\n\r\nTween.prototype.init.prototype = Tween.prototype;\r\n\r\nTween.propHooks = {\r\n\t_default: {\r\n\t\tget: function( tween ) {\r\n\t\t\tvar result;\r\n\r\n\t\t\tif ( tween.elem[ tween.prop ] != null &&\r\n\t\t\t\t(!tween.elem.style || tween.elem.style[ tween.prop ] == null) ) {\r\n\t\t\t\treturn tween.elem[ tween.prop ];\r\n\t\t\t}\r\n\r\n\t\t\t// passing an empty string as a 3rd parameter to .css will automatically\r\n\t\t\t// attempt a parseFloat and fallback to a string if the parse fails\r\n\t\t\t// so, simple values such as \"10px\" are parsed to Float.\r\n\t\t\t// complex values such as \"rotate(1rad)\" are returned as is.\r\n\t\t\tresult = jQuery.css( tween.elem, tween.prop, \"\" );\r\n\t\t\t// Empty strings, null, undefined and \"auto\" are converted to 0.\r\n\t\t\treturn !result || result === \"auto\" ? 0 : result;\r\n\t\t},\r\n\t\tset: function( tween ) {\r\n\t\t\t// use step hook for back compat - use cssHook if its there - use .style if its\r\n\t\t\t// available and use plain properties where available\r\n\t\t\tif ( jQuery.fx.step[ tween.prop ] ) {\r\n\t\t\t\tjQuery.fx.step[ tween.prop ]( tween );\r\n\t\t\t} else if ( tween.elem.style && ( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null || jQuery.cssHooks[ tween.prop ] ) ) {\r\n\t\t\t\tjQuery.style( tween.elem, tween.prop, tween.now + tween.unit );\r\n\t\t\t} else {\r\n\t\t\t\ttween.elem[ tween.prop ] = tween.now;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n};\r\n\r\n// Support: IE <=9\r\n// Panic based approach to setting things on disconnected nodes\r\n\r\nTween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {\r\n\tset: function( tween ) {\r\n\t\tif ( tween.elem.nodeType && tween.elem.parentNode ) {\r\n\t\t\ttween.elem[ tween.prop ] = tween.now;\r\n\t\t}\r\n\t}\r\n};\r\n\r\njQuery.each([ \"toggle\", \"show\", \"hide\" ], function( i, name ) {\r\n\tvar cssFn = jQuery.fn[ name ];\r\n\tjQuery.fn[ name ] = function( speed, easing, callback ) {\r\n\t\treturn speed == null || typeof speed === \"boolean\" ?\r\n\t\t\tcssFn.apply( this, arguments ) :\r\n\t\t\tthis.animate( genFx( name, true ), speed, easing, callback );\r\n\t};\r\n});\r\n\r\njQuery.fn.extend({\r\n\tfadeTo: function( speed, to, easing, callback ) {\r\n\r\n\t\t// show any hidden elements after setting opacity to 0\r\n\t\treturn this.filter( isHidden ).css( \"opacity\", 0 ).show()\r\n\r\n\t\t\t// animate to the value specified\r\n\t\t\t.end().animate({ opacity: to }, speed, easing, callback );\r\n\t},\r\n\tanimate: function( prop, speed, easing, callback ) {\r\n\t\tvar empty = jQuery.isEmptyObject( prop ),\r\n\t\t\toptall = jQuery.speed( speed, easing, callback ),\r\n\t\t\tdoAnimation = function() {\r\n\t\t\t\t// Operate on a copy of prop so per-property easing won't be lost\r\n\t\t\t\tvar anim = Animation( this, jQuery.extend( {}, prop ), optall );\r\n\r\n\t\t\t\t// Empty animations, or finishing resolves immediately\r\n\t\t\t\tif ( empty || jQuery._data( this, \"finish\" ) ) {\r\n\t\t\t\t\tanim.stop( true );\r\n\t\t\t\t}\r\n\t\t\t};\r\n\t\t\tdoAnimation.finish = doAnimation;\r\n\r\n\t\treturn empty || optall.queue === false ?\r\n\t\t\tthis.each( doAnimation ) :\r\n\t\t\tthis.queue( optall.queue, doAnimation );\r\n\t},\r\n\tstop: function( type, clearQueue, gotoEnd ) {\r\n\t\tvar stopQueue = function( hooks ) {\r\n\t\t\tvar stop = hooks.stop;\r\n\t\t\tdelete hooks.stop;\r\n\t\t\tstop( gotoEnd );\r\n\t\t};\r\n\r\n\t\tif ( typeof type !== \"string\" ) {\r\n\t\t\tgotoEnd = clearQueue;\r\n\t\t\tclearQueue = type;\r\n\t\t\ttype = undefined;\r\n\t\t}\r\n\t\tif ( clearQueue && type !== false ) {\r\n\t\t\tthis.queue( type || \"fx\", [] );\r\n\t\t}\r\n\r\n\t\treturn this.each(function() {\r\n\t\t\tvar dequeue = true,\r\n\t\t\t\tindex = type != null && type + \"queueHooks\",\r\n\t\t\t\ttimers = jQuery.timers,\r\n\t\t\t\tdata = jQuery._data( this );\r\n\r\n\t\t\tif ( index ) {\r\n\t\t\t\tif ( data[ index ] && data[ index ].stop ) {\r\n\t\t\t\t\tstopQueue( data[ index ] );\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tfor ( index in data ) {\r\n\t\t\t\t\tif ( data[ index ] && data[ index ].stop && rrun.test( index ) ) {\r\n\t\t\t\t\t\tstopQueue( data[ index ] );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tfor ( index = timers.length; index--; ) {\r\n\t\t\t\tif ( timers[ index ].elem === this && (type == null || timers[ index ].queue === type) ) {\r\n\t\t\t\t\ttimers[ index ].anim.stop( gotoEnd );\r\n\t\t\t\t\tdequeue = false;\r\n\t\t\t\t\ttimers.splice( index, 1 );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// start the next in the queue if the last step wasn't forced\r\n\t\t\t// timers currently will call their complete callbacks, which will dequeue\r\n\t\t\t// but only if they were gotoEnd\r\n\t\t\tif ( dequeue || !gotoEnd ) {\r\n\t\t\t\tjQuery.dequeue( this, type );\r\n\t\t\t}\r\n\t\t});\r\n\t},\r\n\tfinish: function( type ) {\r\n\t\tif ( type !== false ) {\r\n\t\t\ttype = type || \"fx\";\r\n\t\t}\r\n\t\treturn this.each(function() {\r\n\t\t\tvar index,\r\n\t\t\t\tdata = jQuery._data( this ),\r\n\t\t\t\tqueue = data[ type + \"queue\" ],\r\n\t\t\t\thooks = data[ type + \"queueHooks\" ],\r\n\t\t\t\ttimers = jQuery.timers,\r\n\t\t\t\tlength = queue ? queue.length : 0;\r\n\r\n\t\t\t// enable finishing flag on private data\r\n\t\t\tdata.finish = true;\r\n\r\n\t\t\t// empty the queue first\r\n\t\t\tjQuery.queue( this, type, [] );\r\n\r\n\t\t\tif ( hooks && hooks.stop ) {\r\n\t\t\t\thooks.stop.call( this, true );\r\n\t\t\t}\r\n\r\n\t\t\t// look for any active animations, and finish them\r\n\t\t\tfor ( index = timers.length; index--; ) {\r\n\t\t\t\tif ( timers[ index ].elem === this && timers[ index ].queue === type ) {\r\n\t\t\t\t\ttimers[ index ].anim.stop( true );\r\n\t\t\t\t\ttimers.splice( index, 1 );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// look for any animations in the old queue and finish them\r\n\t\t\tfor ( index = 0; index < length; index++ ) {\r\n\t\t\t\tif ( queue[ index ] && queue[ index ].finish ) {\r\n\t\t\t\t\tqueue[ index ].finish.call( this );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// turn off finishing flag\r\n\t\t\tdelete data.finish;\r\n\t\t});\r\n\t}\r\n});\r\n\r\n// Generate parameters to create a standard animation\r\nfunction genFx( type, includeWidth ) {\r\n\tvar which,\r\n\t\tattrs = { height: type },\r\n\t\ti = 0;\r\n\r\n\t// if we include width, step value is 1 to do all cssExpand values,\r\n\t// if we don't include width, step value is 2 to skip over Left and Right\r\n\tincludeWidth = includeWidth? 1 : 0;\r\n\tfor( ; i < 4 ; i += 2 - includeWidth ) {\r\n\t\twhich = cssExpand[ i ];\r\n\t\tattrs[ \"margin\" + which ] = attrs[ \"padding\" + which ] = type;\r\n\t}\r\n\r\n\tif ( includeWidth ) {\r\n\t\tattrs.opacity = attrs.width = type;\r\n\t}\r\n\r\n\treturn attrs;\r\n}\r\n\r\n// Generate shortcuts for custom animations\r\njQuery.each({\r\n\tslideDown: genFx(\"show\"),\r\n\tslideUp: genFx(\"hide\"),\r\n\tslideToggle: genFx(\"toggle\"),\r\n\tfadeIn: { opacity: \"show\" },\r\n\tfadeOut: { opacity: \"hide\" },\r\n\tfadeToggle: { opacity: \"toggle\" }\r\n}, function( name, props ) {\r\n\tjQuery.fn[ name ] = function( speed, easing, callback ) {\r\n\t\treturn this.animate( props, speed, easing, callback );\r\n\t};\r\n});\r\n\r\njQuery.speed = function( speed, easing, fn ) {\r\n\tvar opt = speed && typeof speed === \"object\" ? jQuery.extend( {}, speed ) : {\r\n\t\tcomplete: fn || !fn && easing ||\r\n\t\t\tjQuery.isFunction( speed ) && speed,\r\n\t\tduration: speed,\r\n\t\teasing: fn && easing || easing && !jQuery.isFunction( easing ) && easing\r\n\t};\r\n\r\n\topt.duration = jQuery.fx.off ? 0 : typeof opt.duration === \"number\" ? opt.duration :\r\n\t\topt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default;\r\n\r\n\t// normalize opt.queue - true/undefined/null -> \"fx\"\r\n\tif ( opt.queue == null || opt.queue === true ) {\r\n\t\topt.queue = \"fx\";\r\n\t}\r\n\r\n\t// Queueing\r\n\topt.old = opt.complete;\r\n\r\n\topt.complete = function() {\r\n\t\tif ( jQuery.isFunction( opt.old ) ) {\r\n\t\t\topt.old.call( this );\r\n\t\t}\r\n\r\n\t\tif ( opt.queue ) {\r\n\t\t\tjQuery.dequeue( this, opt.queue );\r\n\t\t}\r\n\t};\r\n\r\n\treturn opt;\r\n};\r\n\r\njQuery.easing = {\r\n\tlinear: function( p ) {\r\n\t\treturn p;\r\n\t},\r\n\tswing: function( p ) {\r\n\t\treturn 0.5 - Math.cos( p*Math.PI ) / 2;\r\n\t}\r\n};\r\n\r\njQuery.timers = [];\r\njQuery.fx = Tween.prototype.init;\r\njQuery.fx.tick = function() {\r\n\tvar timer,\r\n\t\ttimers = jQuery.timers,\r\n\t\ti = 0;\r\n\r\n\tfxNow = jQuery.now();\r\n\r\n\tfor ( ; i < timers.length; i++ ) {\r\n\t\ttimer = timers[ i ];\r\n\t\t// Checks the timer has not already been removed\r\n\t\tif ( !timer() && timers[ i ] === timer ) {\r\n\t\t\ttimers.splice( i--, 1 );\r\n\t\t}\r\n\t}\r\n\r\n\tif ( !timers.length ) {\r\n\t\tjQuery.fx.stop();\r\n\t}\r\n\tfxNow = undefined;\r\n};\r\n\r\njQuery.fx.timer = function( timer ) {\r\n\tif ( timer() && jQuery.timers.push( timer ) ) {\r\n\t\tjQuery.fx.start();\r\n\t}\r\n};\r\n\r\njQuery.fx.interval = 13;\r\n\r\njQuery.fx.start = function() {\r\n\tif ( !timerId ) {\r\n\t\ttimerId = setInterval( jQuery.fx.tick, jQuery.fx.interval );\r\n\t}\r\n};\r\n\r\njQuery.fx.stop = function() {\r\n\tclearInterval( timerId );\r\n\ttimerId = null;\r\n};\r\n\r\njQuery.fx.speeds = {\r\n\tslow: 600,\r\n\tfast: 200,\r\n\t// Default speed\r\n\t_default: 400\r\n};\r\n\r\n// Back Compat <1.8 extension point\r\njQuery.fx.step = {};\r\n\r\nif ( jQuery.expr && jQuery.expr.filters ) {\r\n\tjQuery.expr.filters.animated = function( elem ) {\r\n\t\treturn jQuery.grep(jQuery.timers, function( fn ) {\r\n\t\t\treturn elem === fn.elem;\r\n\t\t}).length;\r\n\t};\r\n}\r\njQuery.fn.offset = function( options ) {\r\n\tif ( arguments.length ) {\r\n\t\treturn options === undefined ?\r\n\t\t\tthis :\r\n\t\t\tthis.each(function( i ) {\r\n\t\t\t\tjQuery.offset.setOffset( this, options, i );\r\n\t\t\t});\r\n\t}\r\n\r\n\tvar docElem, win,\r\n\t\tbox = { top: 0, left: 0 },\r\n\t\telem = this[ 0 ],\r\n\t\tdoc = elem && elem.ownerDocument;\r\n\r\n\tif ( !doc ) {\r\n\t\treturn;\r\n\t}\r\n\r\n\tdocElem = doc.documentElement;\r\n\r\n\t// Make sure it's not a disconnected DOM node\r\n\tif ( !jQuery.contains( docElem, elem ) ) {\r\n\t\treturn box;\r\n\t}\r\n\r\n\t// If we don't have gBCR, just use 0,0 rather than error\r\n\t// BlackBerry 5, iOS 3 (original iPhone)\r\n\tif ( typeof elem.getBoundingClientRect !== core_strundefined ) {\r\n\t\tbox = elem.getBoundingClientRect();\r\n\t}\r\n\twin = getWindow( doc );\r\n\treturn {\r\n\t\ttop: box.top  + ( win.pageYOffset || docElem.scrollTop )  - ( docElem.clientTop  || 0 ),\r\n\t\tleft: box.left + ( win.pageXOffset || docElem.scrollLeft ) - ( docElem.clientLeft || 0 )\r\n\t};\r\n};\r\n\r\njQuery.offset = {\r\n\r\n\tsetOffset: function( elem, options, i ) {\r\n\t\tvar position = jQuery.css( elem, \"position\" );\r\n\r\n\t\t// set position first, in-case top/left are set even on static elem\r\n\t\tif ( position === \"static\" ) {\r\n\t\t\telem.style.position = \"relative\";\r\n\t\t}\r\n\r\n\t\tvar curElem = jQuery( elem ),\r\n\t\t\tcurOffset = curElem.offset(),\r\n\t\t\tcurCSSTop = jQuery.css( elem, \"top\" ),\r\n\t\t\tcurCSSLeft = jQuery.css( elem, \"left\" ),\r\n\t\t\tcalculatePosition = ( position === \"absolute\" || position === \"fixed\" ) && jQuery.inArray(\"auto\", [curCSSTop, curCSSLeft]) > -1,\r\n\t\t\tprops = {}, curPosition = {}, curTop, curLeft;\r\n\r\n\t\t// need to be able to calculate position if either top or left is auto and position is either absolute or fixed\r\n\t\tif ( calculatePosition ) {\r\n\t\t\tcurPosition = curElem.position();\r\n\t\t\tcurTop = curPosition.top;\r\n\t\t\tcurLeft = curPosition.left;\r\n\t\t} else {\r\n\t\t\tcurTop = parseFloat( curCSSTop ) || 0;\r\n\t\t\tcurLeft = parseFloat( curCSSLeft ) || 0;\r\n\t\t}\r\n\r\n\t\tif ( jQuery.isFunction( options ) ) {\r\n\t\t\toptions = options.call( elem, i, curOffset );\r\n\t\t}\r\n\r\n\t\tif ( options.top != null ) {\r\n\t\t\tprops.top = ( options.top - curOffset.top ) + curTop;\r\n\t\t}\r\n\t\tif ( options.left != null ) {\r\n\t\t\tprops.left = ( options.left - curOffset.left ) + curLeft;\r\n\t\t}\r\n\r\n\t\tif ( \"using\" in options ) {\r\n\t\t\toptions.using.call( elem, props );\r\n\t\t} else {\r\n\t\t\tcurElem.css( props );\r\n\t\t}\r\n\t}\r\n};\r\n\r\n\r\njQuery.fn.extend({\r\n\r\n\tposition: function() {\r\n\t\tif ( !this[ 0 ] ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar offsetParent, offset,\r\n\t\t\tparentOffset = { top: 0, left: 0 },\r\n\t\t\telem = this[ 0 ];\r\n\r\n\t\t// fixed elements are offset from window (parentOffset = {top:0, left: 0}, because it is it's only offset parent\r\n\t\tif ( jQuery.css( elem, \"position\" ) === \"fixed\" ) {\r\n\t\t\t// we assume that getBoundingClientRect is available when computed position is fixed\r\n\t\t\toffset = elem.getBoundingClientRect();\r\n\t\t} else {\r\n\t\t\t// Get *real* offsetParent\r\n\t\t\toffsetParent = this.offsetParent();\r\n\r\n\t\t\t// Get correct offsets\r\n\t\t\toffset = this.offset();\r\n\t\t\tif ( !jQuery.nodeName( offsetParent[ 0 ], \"html\" ) ) {\r\n\t\t\t\tparentOffset = offsetParent.offset();\r\n\t\t\t}\r\n\r\n\t\t\t// Add offsetParent borders\r\n\t\t\tparentOffset.top  += jQuery.css( offsetParent[ 0 ], \"borderTopWidth\", true );\r\n\t\t\tparentOffset.left += jQuery.css( offsetParent[ 0 ], \"borderLeftWidth\", true );\r\n\t\t}\r\n\r\n\t\t// Subtract parent offsets and element margins\r\n\t\t// note: when an element has margin: auto the offsetLeft and marginLeft\r\n\t\t// are the same in Safari causing offset.left to incorrectly be 0\r\n\t\treturn {\r\n\t\t\ttop:  offset.top  - parentOffset.top - jQuery.css( elem, \"marginTop\", true ),\r\n\t\t\tleft: offset.left - parentOffset.left - jQuery.css( elem, \"marginLeft\", true)\r\n\t\t};\r\n\t},\r\n\r\n\toffsetParent: function() {\r\n\t\treturn this.map(function() {\r\n\t\t\tvar offsetParent = this.offsetParent || docElem;\r\n\t\t\twhile ( offsetParent && ( !jQuery.nodeName( offsetParent, \"html\" ) && jQuery.css( offsetParent, \"position\") === \"static\" ) ) {\r\n\t\t\t\toffsetParent = offsetParent.offsetParent;\r\n\t\t\t}\r\n\t\t\treturn offsetParent || docElem;\r\n\t\t});\r\n\t}\r\n});\r\n\r\n\r\n// Create scrollLeft and scrollTop methods\r\njQuery.each( {scrollLeft: \"pageXOffset\", scrollTop: \"pageYOffset\"}, function( method, prop ) {\r\n\tvar top = /Y/.test( prop );\r\n\r\n\tjQuery.fn[ method ] = function( val ) {\r\n\t\treturn jQuery.access( this, function( elem, method, val ) {\r\n\t\t\tvar win = getWindow( elem );\r\n\r\n\t\t\tif ( val === undefined ) {\r\n\t\t\t\treturn win ? (prop in win) ? win[ prop ] :\r\n\t\t\t\t\twin.document.documentElement[ method ] :\r\n\t\t\t\t\telem[ method ];\r\n\t\t\t}\r\n\r\n\t\t\tif ( win ) {\r\n\t\t\t\twin.scrollTo(\r\n\t\t\t\t\t!top ? val : jQuery( win ).scrollLeft(),\r\n\t\t\t\t\ttop ? val : jQuery( win ).scrollTop()\r\n\t\t\t\t);\r\n\r\n\t\t\t} else {\r\n\t\t\t\telem[ method ] = val;\r\n\t\t\t}\r\n\t\t}, method, val, arguments.length, null );\r\n\t};\r\n});\r\n\r\nfunction getWindow( elem ) {\r\n\treturn jQuery.isWindow( elem ) ?\r\n\t\telem :\r\n\t\telem.nodeType === 9 ?\r\n\t\t\telem.defaultView || elem.parentWindow :\r\n\t\t\tfalse;\r\n}\r\n// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods\r\njQuery.each( { Height: \"height\", Width: \"width\" }, function( name, type ) {\r\n\tjQuery.each( { padding: \"inner\" + name, content: type, \"\": \"outer\" + name }, function( defaultExtra, funcName ) {\r\n\t\t// margin is only for outerHeight, outerWidth\r\n\t\tjQuery.fn[ funcName ] = function( margin, value ) {\r\n\t\t\tvar chainable = arguments.length && ( defaultExtra || typeof margin !== \"boolean\" ),\r\n\t\t\t\textra = defaultExtra || ( margin === true || value === true ? \"margin\" : \"border\" );\r\n\r\n\t\t\treturn jQuery.access( this, function( elem, type, value ) {\r\n\t\t\t\tvar doc;\r\n\r\n\t\t\t\tif ( jQuery.isWindow( elem ) ) {\r\n\t\t\t\t\t// As of 5/8/2012 this will yield incorrect results for Mobile Safari, but there\r\n\t\t\t\t\t// isn't a whole lot we can do. See pull request at this URL for discussion:\r\n\t\t\t\t\t// https://github.com/jquery/jquery/pull/764\r\n\t\t\t\t\treturn elem.document.documentElement[ \"client\" + name ];\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Get document width or height\r\n\t\t\t\tif ( elem.nodeType === 9 ) {\r\n\t\t\t\t\tdoc = elem.documentElement;\r\n\r\n\t\t\t\t\t// Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height], whichever is greatest\r\n\t\t\t\t\t// unfortunately, this causes bug #3838 in IE6/8 only, but there is currently no good, small way to fix it.\r\n\t\t\t\t\treturn Math.max(\r\n\t\t\t\t\t\telem.body[ \"scroll\" + name ], doc[ \"scroll\" + name ],\r\n\t\t\t\t\t\telem.body[ \"offset\" + name ], doc[ \"offset\" + name ],\r\n\t\t\t\t\t\tdoc[ \"client\" + name ]\r\n\t\t\t\t\t);\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn value === undefined ?\r\n\t\t\t\t\t// Get width or height on the element, requesting but not forcing parseFloat\r\n\t\t\t\t\tjQuery.css( elem, type, extra ) :\r\n\r\n\t\t\t\t\t// Set width or height on the element\r\n\t\t\t\t\tjQuery.style( elem, type, value, extra );\r\n\t\t\t}, type, chainable ? margin : undefined, chainable, null );\r\n\t\t};\r\n\t});\r\n});\r\n// Limit scope pollution from any deprecated API\r\n// (function() {\r\n\r\n// The number of elements contained in the matched element set\r\njQuery.fn.size = function() {\r\n\treturn this.length;\r\n};\r\n\r\njQuery.fn.andSelf = jQuery.fn.addBack;\r\n\r\n// })();\r\nif ( typeof module === \"object\" && module && typeof module.exports === \"object\" ) {\r\n\t// Expose jQuery as module.exports in loaders that implement the Node\r\n\t// module pattern (including browserify). Do not create the global, since\r\n\t// the user will be storing it themselves locally, and globals are frowned\r\n\t// upon in the Node module world.\r\n\tmodule.exports = jQuery;\r\n} else {\r\n\t// Otherwise expose jQuery to the global object as usual\r\n\twindow.jQuery = window.$ = jQuery;\r\n\r\n\t// Register as a named AMD module, since jQuery can be concatenated with other\r\n\t// files that may use define, but not via a proper concatenation script that\r\n\t// understands anonymous AMD modules. A named AMD is safest and most robust\r\n\t// way to register. Lowercase jquery is used because AMD module names are\r\n\t// derived from file names, and jQuery is normally delivered in a lowercase\r\n\t// file name. Do this after creating the global so that if an AMD module wants\r\n\t// to call noConflict to hide this version of jQuery, it will work.\r\n\tif ( typeof define === \"function\" && define.amd ) {\r\n\t\tdefine( \"jquery\", [], function () { return jQuery; } );\r\n\t}\r\n}\r\n\r\n})( window );\r\n"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.REST.SocialMedia/AccountManagement.EntryPoint/vendor/js/underscore.js",
    "content": "// Underscore.js 1.4.4\r\n// ===================\r\n\r\n// > http://underscorejs.org\r\n// > (c) 2009-2013 Jeremy Ashkenas, DocumentCloud Inc.\r\n// > Underscore may be freely distributed under the MIT license.\r\n\r\n// Baseline setup\r\n// --------------\r\n(function() {\r\n\r\n  // Establish the root object, `window` in the browser, or `global` on the server.\r\n  var root = this;\r\n\r\n  // Save the previous value of the `_` variable.\r\n  var previousUnderscore = root._;\r\n\r\n  // Establish the object that gets returned to break out of a loop iteration.\r\n  var breaker = {};\r\n\r\n  // Save bytes in the minified (but not gzipped) version:\r\n  var ArrayProto = Array.prototype, ObjProto = Object.prototype, FuncProto = Function.prototype;\r\n\r\n  // Create quick reference variables for speed access to core prototypes.\r\n  var push             = ArrayProto.push,\r\n      slice            = ArrayProto.slice,\r\n      concat           = ArrayProto.concat,\r\n      toString         = ObjProto.toString,\r\n      hasOwnProperty   = ObjProto.hasOwnProperty;\r\n\r\n  // All **ECMAScript 5** native function implementations that we hope to use\r\n  // are declared here.\r\n  var\r\n    nativeForEach      = ArrayProto.forEach,\r\n    nativeMap          = ArrayProto.map,\r\n    nativeReduce       = ArrayProto.reduce,\r\n    nativeReduceRight  = ArrayProto.reduceRight,\r\n    nativeFilter       = ArrayProto.filter,\r\n    nativeEvery        = ArrayProto.every,\r\n    nativeSome         = ArrayProto.some,\r\n    nativeIndexOf      = ArrayProto.indexOf,\r\n    nativeLastIndexOf  = ArrayProto.lastIndexOf,\r\n    nativeIsArray      = Array.isArray,\r\n    nativeKeys         = Object.keys,\r\n    nativeBind         = FuncProto.bind;\r\n\r\n  // Create a safe reference to the Underscore object for use below.\r\n  var _ = function(obj) {\r\n    if (obj instanceof _) return obj;\r\n    if (!(this instanceof _)) return new _(obj);\r\n    this._wrapped = obj;\r\n  };\r\n\r\n  // Export the Underscore object for **Node.js**, with\r\n  // backwards-compatibility for the old `require()` API. If we're in\r\n  // the browser, add `_` as a global object via a string identifier,\r\n  // for Closure Compiler \"advanced\" mode.\r\n  if (typeof exports !== 'undefined') {\r\n    if (typeof module !== 'undefined' && module.exports) {\r\n      exports = module.exports = _;\r\n    }\r\n    exports._ = _;\r\n  } else {\r\n    root._ = _;\r\n  }\r\n\r\n  // Current version.\r\n  _.VERSION = '1.4.4';\r\n\r\n  // Collection Functions\r\n  // --------------------\r\n\r\n  // The cornerstone, an `each` implementation, aka `forEach`.\r\n  // Handles objects with the built-in `forEach`, arrays, and raw objects.\r\n  // Delegates to **ECMAScript 5**'s native `forEach` if available.\r\n  var each = _.each = _.forEach = function(obj, iterator, context) {\r\n    if (obj == null) return;\r\n    if (nativeForEach && obj.forEach === nativeForEach) {\r\n      obj.forEach(iterator, context);\r\n    } else if (obj.length === +obj.length) {\r\n      for (var i = 0, l = obj.length; i < l; i++) {\r\n        if (iterator.call(context, obj[i], i, obj) === breaker) return;\r\n      }\r\n    } else {\r\n      for (var key in obj) {\r\n        if (_.has(obj, key)) {\r\n          if (iterator.call(context, obj[key], key, obj) === breaker) return;\r\n        }\r\n      }\r\n    }\r\n  };\r\n\r\n  // Return the results of applying the iterator to each element.\r\n  // Delegates to **ECMAScript 5**'s native `map` if available.\r\n  _.map = _.collect = function(obj, iterator, context) {\r\n    var results = [];\r\n    if (obj == null) return results;\r\n    if (nativeMap && obj.map === nativeMap) return obj.map(iterator, context);\r\n    each(obj, function(value, index, list) {\r\n      results[results.length] = iterator.call(context, value, index, list);\r\n    });\r\n    return results;\r\n  };\r\n\r\n  var reduceError = 'Reduce of empty array with no initial value';\r\n\r\n  // **Reduce** builds up a single result from a list of values, aka `inject`,\r\n  // or `foldl`. Delegates to **ECMAScript 5**'s native `reduce` if available.\r\n  _.reduce = _.foldl = _.inject = function(obj, iterator, memo, context) {\r\n    var initial = arguments.length > 2;\r\n    if (obj == null) obj = [];\r\n    if (nativeReduce && obj.reduce === nativeReduce) {\r\n      if (context) iterator = _.bind(iterator, context);\r\n      return initial ? obj.reduce(iterator, memo) : obj.reduce(iterator);\r\n    }\r\n    each(obj, function(value, index, list) {\r\n      if (!initial) {\r\n        memo = value;\r\n        initial = true;\r\n      } else {\r\n        memo = iterator.call(context, memo, value, index, list);\r\n      }\r\n    });\r\n    if (!initial) throw new TypeError(reduceError);\r\n    return memo;\r\n  };\r\n\r\n  // The right-associative version of reduce, also known as `foldr`.\r\n  // Delegates to **ECMAScript 5**'s native `reduceRight` if available.\r\n  _.reduceRight = _.foldr = function(obj, iterator, memo, context) {\r\n    var initial = arguments.length > 2;\r\n    if (obj == null) obj = [];\r\n    if (nativeReduceRight && obj.reduceRight === nativeReduceRight) {\r\n      if (context) iterator = _.bind(iterator, context);\r\n      return initial ? obj.reduceRight(iterator, memo) : obj.reduceRight(iterator);\r\n    }\r\n    var length = obj.length;\r\n    if (length !== +length) {\r\n      var keys = _.keys(obj);\r\n      length = keys.length;\r\n    }\r\n    each(obj, function(value, index, list) {\r\n      index = keys ? keys[--length] : --length;\r\n      if (!initial) {\r\n        memo = obj[index];\r\n        initial = true;\r\n      } else {\r\n        memo = iterator.call(context, memo, obj[index], index, list);\r\n      }\r\n    });\r\n    if (!initial) throw new TypeError(reduceError);\r\n    return memo;\r\n  };\r\n\r\n  // Return the first value which passes a truth test. Aliased as `detect`.\r\n  _.find = _.detect = function(obj, iterator, context) {\r\n    var result;\r\n    any(obj, function(value, index, list) {\r\n      if (iterator.call(context, value, index, list)) {\r\n        result = value;\r\n        return true;\r\n      }\r\n    });\r\n    return result;\r\n  };\r\n\r\n  // Return all the elements that pass a truth test.\r\n  // Delegates to **ECMAScript 5**'s native `filter` if available.\r\n  // Aliased as `select`.\r\n  _.filter = _.select = function(obj, iterator, context) {\r\n    var results = [];\r\n    if (obj == null) return results;\r\n    if (nativeFilter && obj.filter === nativeFilter) return obj.filter(iterator, context);\r\n    each(obj, function(value, index, list) {\r\n      if (iterator.call(context, value, index, list)) results[results.length] = value;\r\n    });\r\n    return results;\r\n  };\r\n\r\n  // Return all the elements for which a truth test fails.\r\n  _.reject = function(obj, iterator, context) {\r\n    return _.filter(obj, function(value, index, list) {\r\n      return !iterator.call(context, value, index, list);\r\n    }, context);\r\n  };\r\n\r\n  // Determine whether all of the elements match a truth test.\r\n  // Delegates to **ECMAScript 5**'s native `every` if available.\r\n  // Aliased as `all`.\r\n  _.every = _.all = function(obj, iterator, context) {\r\n    iterator || (iterator = _.identity);\r\n    var result = true;\r\n    if (obj == null) return result;\r\n    if (nativeEvery && obj.every === nativeEvery) return obj.every(iterator, context);\r\n    each(obj, function(value, index, list) {\r\n      if (!(result = result && iterator.call(context, value, index, list))) return breaker;\r\n    });\r\n    return !!result;\r\n  };\r\n\r\n  // Determine if at least one element in the object matches a truth test.\r\n  // Delegates to **ECMAScript 5**'s native `some` if available.\r\n  // Aliased as `any`.\r\n  var any = _.some = _.any = function(obj, iterator, context) {\r\n    iterator || (iterator = _.identity);\r\n    var result = false;\r\n    if (obj == null) return result;\r\n    if (nativeSome && obj.some === nativeSome) return obj.some(iterator, context);\r\n    each(obj, function(value, index, list) {\r\n      if (result || (result = iterator.call(context, value, index, list))) return breaker;\r\n    });\r\n    return !!result;\r\n  };\r\n\r\n  // Determine if the array or object contains a given value (using `===`).\r\n  // Aliased as `include`.\r\n  _.contains = _.include = function(obj, target) {\r\n    if (obj == null) return false;\r\n    if (nativeIndexOf && obj.indexOf === nativeIndexOf) return obj.indexOf(target) != -1;\r\n    return any(obj, function(value) {\r\n      return value === target;\r\n    });\r\n  };\r\n\r\n  // Invoke a method (with arguments) on every item in a collection.\r\n  _.invoke = function(obj, method) {\r\n    var args = slice.call(arguments, 2);\r\n    var isFunc = _.isFunction(method);\r\n    return _.map(obj, function(value) {\r\n      return (isFunc ? method : value[method]).apply(value, args);\r\n    });\r\n  };\r\n\r\n  // Convenience version of a common use case of `map`: fetching a property.\r\n  _.pluck = function(obj, key) {\r\n    return _.map(obj, function(value){ return value[key]; });\r\n  };\r\n\r\n  // Convenience version of a common use case of `filter`: selecting only objects\r\n  // containing specific `key:value` pairs.\r\n  _.where = function(obj, attrs, first) {\r\n    if (_.isEmpty(attrs)) return first ? null : [];\r\n    return _[first ? 'find' : 'filter'](obj, function(value) {\r\n      for (var key in attrs) {\r\n        if (attrs[key] !== value[key]) return false;\r\n      }\r\n      return true;\r\n    });\r\n  };\r\n\r\n  // Convenience version of a common use case of `find`: getting the first object\r\n  // containing specific `key:value` pairs.\r\n  _.findWhere = function(obj, attrs) {\r\n    return _.where(obj, attrs, true);\r\n  };\r\n\r\n  // Return the maximum element or (element-based computation).\r\n  // Can't optimize arrays of integers longer than 65,535 elements.\r\n  // See: https://bugs.webkit.org/show_bug.cgi?id=80797\r\n  _.max = function(obj, iterator, context) {\r\n    if (!iterator && _.isArray(obj) && obj[0] === +obj[0] && obj.length < 65535) {\r\n      return Math.max.apply(Math, obj);\r\n    }\r\n    if (!iterator && _.isEmpty(obj)) return -Infinity;\r\n    var result = {computed : -Infinity, value: -Infinity};\r\n    each(obj, function(value, index, list) {\r\n      var computed = iterator ? iterator.call(context, value, index, list) : value;\r\n      computed >= result.computed && (result = {value : value, computed : computed});\r\n    });\r\n    return result.value;\r\n  };\r\n\r\n  // Return the minimum element (or element-based computation).\r\n  _.min = function(obj, iterator, context) {\r\n    if (!iterator && _.isArray(obj) && obj[0] === +obj[0] && obj.length < 65535) {\r\n      return Math.min.apply(Math, obj);\r\n    }\r\n    if (!iterator && _.isEmpty(obj)) return Infinity;\r\n    var result = {computed : Infinity, value: Infinity};\r\n    each(obj, function(value, index, list) {\r\n      var computed = iterator ? iterator.call(context, value, index, list) : value;\r\n      computed < result.computed && (result = {value : value, computed : computed});\r\n    });\r\n    return result.value;\r\n  };\r\n\r\n  // Shuffle an array.\r\n  _.shuffle = function(obj) {\r\n    var rand;\r\n    var index = 0;\r\n    var shuffled = [];\r\n    each(obj, function(value) {\r\n      rand = _.random(index++);\r\n      shuffled[index - 1] = shuffled[rand];\r\n      shuffled[rand] = value;\r\n    });\r\n    return shuffled;\r\n  };\r\n\r\n  // An internal function to generate lookup iterators.\r\n  var lookupIterator = function(value) {\r\n    return _.isFunction(value) ? value : function(obj){ return obj[value]; };\r\n  };\r\n\r\n  // Sort the object's values by a criterion produced by an iterator.\r\n  _.sortBy = function(obj, value, context) {\r\n    var iterator = lookupIterator(value);\r\n    return _.pluck(_.map(obj, function(value, index, list) {\r\n      return {\r\n        value : value,\r\n        index : index,\r\n        criteria : iterator.call(context, value, index, list)\r\n      };\r\n    }).sort(function(left, right) {\r\n      var a = left.criteria;\r\n      var b = right.criteria;\r\n      if (a !== b) {\r\n        if (a > b || a === void 0) return 1;\r\n        if (a < b || b === void 0) return -1;\r\n      }\r\n      return left.index < right.index ? -1 : 1;\r\n    }), 'value');\r\n  };\r\n\r\n  // An internal function used for aggregate \"group by\" operations.\r\n  var group = function(obj, value, context, behavior) {\r\n    var result = {};\r\n    var iterator = lookupIterator(value || _.identity);\r\n    each(obj, function(value, index) {\r\n      var key = iterator.call(context, value, index, obj);\r\n      behavior(result, key, value);\r\n    });\r\n    return result;\r\n  };\r\n\r\n  // Groups the object's values by a criterion. Pass either a string attribute\r\n  // to group by, or a function that returns the criterion.\r\n  _.groupBy = function(obj, value, context) {\r\n    return group(obj, value, context, function(result, key, value) {\r\n      (_.has(result, key) ? result[key] : (result[key] = [])).push(value);\r\n    });\r\n  };\r\n\r\n  // Counts instances of an object that group by a certain criterion. Pass\r\n  // either a string attribute to count by, or a function that returns the\r\n  // criterion.\r\n  _.countBy = function(obj, value, context) {\r\n    return group(obj, value, context, function(result, key) {\r\n      if (!_.has(result, key)) result[key] = 0;\r\n      result[key]++;\r\n    });\r\n  };\r\n\r\n  // Use a comparator function to figure out the smallest index at which\r\n  // an object should be inserted so as to maintain order. Uses binary search.\r\n  _.sortedIndex = function(array, obj, iterator, context) {\r\n    iterator = iterator == null ? _.identity : lookupIterator(iterator);\r\n    var value = iterator.call(context, obj);\r\n    var low = 0, high = array.length;\r\n    while (low < high) {\r\n      var mid = (low + high) >>> 1;\r\n      iterator.call(context, array[mid]) < value ? low = mid + 1 : high = mid;\r\n    }\r\n    return low;\r\n  };\r\n\r\n  // Safely convert anything iterable into a real, live array.\r\n  _.toArray = function(obj) {\r\n    if (!obj) return [];\r\n    if (_.isArray(obj)) return slice.call(obj);\r\n    if (obj.length === +obj.length) return _.map(obj, _.identity);\r\n    return _.values(obj);\r\n  };\r\n\r\n  // Return the number of elements in an object.\r\n  _.size = function(obj) {\r\n    if (obj == null) return 0;\r\n    return (obj.length === +obj.length) ? obj.length : _.keys(obj).length;\r\n  };\r\n\r\n  // Array Functions\r\n  // ---------------\r\n\r\n  // Get the first element of an array. Passing **n** will return the first N\r\n  // values in the array. Aliased as `head` and `take`. The **guard** check\r\n  // allows it to work with `_.map`.\r\n  _.first = _.head = _.take = function(array, n, guard) {\r\n    if (array == null) return void 0;\r\n    return (n != null) && !guard ? slice.call(array, 0, n) : array[0];\r\n  };\r\n\r\n  // Returns everything but the last entry of the array. Especially useful on\r\n  // the arguments object. Passing **n** will return all the values in\r\n  // the array, excluding the last N. The **guard** check allows it to work with\r\n  // `_.map`.\r\n  _.initial = function(array, n, guard) {\r\n    return slice.call(array, 0, array.length - ((n == null) || guard ? 1 : n));\r\n  };\r\n\r\n  // Get the last element of an array. Passing **n** will return the last N\r\n  // values in the array. The **guard** check allows it to work with `_.map`.\r\n  _.last = function(array, n, guard) {\r\n    if (array == null) return void 0;\r\n    if ((n != null) && !guard) {\r\n      return slice.call(array, Math.max(array.length - n, 0));\r\n    } else {\r\n      return array[array.length - 1];\r\n    }\r\n  };\r\n\r\n  // Returns everything but the first entry of the array. Aliased as `tail` and `drop`.\r\n  // Especially useful on the arguments object. Passing an **n** will return\r\n  // the rest N values in the array. The **guard**\r\n  // check allows it to work with `_.map`.\r\n  _.rest = _.tail = _.drop = function(array, n, guard) {\r\n    return slice.call(array, (n == null) || guard ? 1 : n);\r\n  };\r\n\r\n  // Trim out all falsy values from an array.\r\n  _.compact = function(array) {\r\n    return _.filter(array, _.identity);\r\n  };\r\n\r\n  // Internal implementation of a recursive `flatten` function.\r\n  var flatten = function(input, shallow, output) {\r\n    each(input, function(value) {\r\n      if (_.isArray(value)) {\r\n        shallow ? push.apply(output, value) : flatten(value, shallow, output);\r\n      } else {\r\n        output.push(value);\r\n      }\r\n    });\r\n    return output;\r\n  };\r\n\r\n  // Return a completely flattened version of an array.\r\n  _.flatten = function(array, shallow) {\r\n    return flatten(array, shallow, []);\r\n  };\r\n\r\n  // Return a version of the array that does not contain the specified value(s).\r\n  _.without = function(array) {\r\n    return _.difference(array, slice.call(arguments, 1));\r\n  };\r\n\r\n  // Produce a duplicate-free version of the array. If the array has already\r\n  // been sorted, you have the option of using a faster algorithm.\r\n  // Aliased as `unique`.\r\n  _.uniq = _.unique = function(array, isSorted, iterator, context) {\r\n    if (_.isFunction(isSorted)) {\r\n      context = iterator;\r\n      iterator = isSorted;\r\n      isSorted = false;\r\n    }\r\n    var initial = iterator ? _.map(array, iterator, context) : array;\r\n    var results = [];\r\n    var seen = [];\r\n    each(initial, function(value, index) {\r\n      if (isSorted ? (!index || seen[seen.length - 1] !== value) : !_.contains(seen, value)) {\r\n        seen.push(value);\r\n        results.push(array[index]);\r\n      }\r\n    });\r\n    return results;\r\n  };\r\n\r\n  // Produce an array that contains the union: each distinct element from all of\r\n  // the passed-in arrays.\r\n  _.union = function() {\r\n    return _.uniq(concat.apply(ArrayProto, arguments));\r\n  };\r\n\r\n  // Produce an array that contains every item shared between all the\r\n  // passed-in arrays.\r\n  _.intersection = function(array) {\r\n    var rest = slice.call(arguments, 1);\r\n    return _.filter(_.uniq(array), function(item) {\r\n      return _.every(rest, function(other) {\r\n        return _.indexOf(other, item) >= 0;\r\n      });\r\n    });\r\n  };\r\n\r\n  // Take the difference between one array and a number of other arrays.\r\n  // Only the elements present in just the first array will remain.\r\n  _.difference = function(array) {\r\n    var rest = concat.apply(ArrayProto, slice.call(arguments, 1));\r\n    return _.filter(array, function(value){ return !_.contains(rest, value); });\r\n  };\r\n\r\n  // Zip together multiple lists into a single array -- elements that share\r\n  // an index go together.\r\n  _.zip = function() {\r\n    var args = slice.call(arguments);\r\n    var length = _.max(_.pluck(args, 'length'));\r\n    var results = new Array(length);\r\n    for (var i = 0; i < length; i++) {\r\n      results[i] = _.pluck(args, \"\" + i);\r\n    }\r\n    return results;\r\n  };\r\n\r\n  // Converts lists into objects. Pass either a single array of `[key, value]`\r\n  // pairs, or two parallel arrays of the same length -- one of keys, and one of\r\n  // the corresponding values.\r\n  _.object = function(list, values) {\r\n    if (list == null) return {};\r\n    var result = {};\r\n    for (var i = 0, l = list.length; i < l; i++) {\r\n      if (values) {\r\n        result[list[i]] = values[i];\r\n      } else {\r\n        result[list[i][0]] = list[i][1];\r\n      }\r\n    }\r\n    return result;\r\n  };\r\n\r\n  // If the browser doesn't supply us with indexOf (I'm looking at you, **MSIE**),\r\n  // we need this function. Return the position of the first occurrence of an\r\n  // item in an array, or -1 if the item is not included in the array.\r\n  // Delegates to **ECMAScript 5**'s native `indexOf` if available.\r\n  // If the array is large and already in sort order, pass `true`\r\n  // for **isSorted** to use binary search.\r\n  _.indexOf = function(array, item, isSorted) {\r\n    if (array == null) return -1;\r\n    var i = 0, l = array.length;\r\n    if (isSorted) {\r\n      if (typeof isSorted == 'number') {\r\n        i = (isSorted < 0 ? Math.max(0, l + isSorted) : isSorted);\r\n      } else {\r\n        i = _.sortedIndex(array, item);\r\n        return array[i] === item ? i : -1;\r\n      }\r\n    }\r\n    if (nativeIndexOf && array.indexOf === nativeIndexOf) return array.indexOf(item, isSorted);\r\n    for (; i < l; i++) if (array[i] === item) return i;\r\n    return -1;\r\n  };\r\n\r\n  // Delegates to **ECMAScript 5**'s native `lastIndexOf` if available.\r\n  _.lastIndexOf = function(array, item, from) {\r\n    if (array == null) return -1;\r\n    var hasIndex = from != null;\r\n    if (nativeLastIndexOf && array.lastIndexOf === nativeLastIndexOf) {\r\n      return hasIndex ? array.lastIndexOf(item, from) : array.lastIndexOf(item);\r\n    }\r\n    var i = (hasIndex ? from : array.length);\r\n    while (i--) if (array[i] === item) return i;\r\n    return -1;\r\n  };\r\n\r\n  // Generate an integer Array containing an arithmetic progression. A port of\r\n  // the native Python `range()` function. See\r\n  // [the Python documentation](http://docs.python.org/library/functions.html#range).\r\n  _.range = function(start, stop, step) {\r\n    if (arguments.length <= 1) {\r\n      stop = start || 0;\r\n      start = 0;\r\n    }\r\n    step = arguments[2] || 1;\r\n\r\n    var len = Math.max(Math.ceil((stop - start) / step), 0);\r\n    var idx = 0;\r\n    var range = new Array(len);\r\n\r\n    while(idx < len) {\r\n      range[idx++] = start;\r\n      start += step;\r\n    }\r\n\r\n    return range;\r\n  };\r\n\r\n  // Function (ahem) Functions\r\n  // ------------------\r\n\r\n  // Create a function bound to a given object (assigning `this`, and arguments,\r\n  // optionally). Delegates to **ECMAScript 5**'s native `Function.bind` if\r\n  // available.\r\n  _.bind = function(func, context) {\r\n    if (func.bind === nativeBind && nativeBind) return nativeBind.apply(func, slice.call(arguments, 1));\r\n    var args = slice.call(arguments, 2);\r\n    return function() {\r\n      return func.apply(context, args.concat(slice.call(arguments)));\r\n    };\r\n  };\r\n\r\n  // Partially apply a function by creating a version that has had some of its\r\n  // arguments pre-filled, without changing its dynamic `this` context.\r\n  _.partial = function(func) {\r\n    var args = slice.call(arguments, 1);\r\n    return function() {\r\n      return func.apply(this, args.concat(slice.call(arguments)));\r\n    };\r\n  };\r\n\r\n  // Bind all of an object's methods to that object. Useful for ensuring that\r\n  // all callbacks defined on an object belong to it.\r\n  _.bindAll = function(obj) {\r\n    var funcs = slice.call(arguments, 1);\r\n    if (funcs.length === 0) funcs = _.functions(obj);\r\n    each(funcs, function(f) { obj[f] = _.bind(obj[f], obj); });\r\n    return obj;\r\n  };\r\n\r\n  // Memoize an expensive function by storing its results.\r\n  _.memoize = function(func, hasher) {\r\n    var memo = {};\r\n    hasher || (hasher = _.identity);\r\n    return function() {\r\n      var key = hasher.apply(this, arguments);\r\n      return _.has(memo, key) ? memo[key] : (memo[key] = func.apply(this, arguments));\r\n    };\r\n  };\r\n\r\n  // Delays a function for the given number of milliseconds, and then calls\r\n  // it with the arguments supplied.\r\n  _.delay = function(func, wait) {\r\n    var args = slice.call(arguments, 2);\r\n    return setTimeout(function(){ return func.apply(null, args); }, wait);\r\n  };\r\n\r\n  // Defers a function, scheduling it to run after the current call stack has\r\n  // cleared.\r\n  _.defer = function(func) {\r\n    return _.delay.apply(_, [func, 1].concat(slice.call(arguments, 1)));\r\n  };\r\n\r\n  // Returns a function, that, when invoked, will only be triggered at most once\r\n  // during a given window of time.\r\n  _.throttle = function(func, wait) {\r\n    var context, args, timeout, result;\r\n    var previous = 0;\r\n    var later = function() {\r\n      previous = new Date;\r\n      timeout = null;\r\n      result = func.apply(context, args);\r\n    };\r\n    return function() {\r\n      var now = new Date;\r\n      var remaining = wait - (now - previous);\r\n      context = this;\r\n      args = arguments;\r\n      if (remaining <= 0) {\r\n        clearTimeout(timeout);\r\n        timeout = null;\r\n        previous = now;\r\n        result = func.apply(context, args);\r\n      } else if (!timeout) {\r\n        timeout = setTimeout(later, remaining);\r\n      }\r\n      return result;\r\n    };\r\n  };\r\n\r\n  // Returns a function, that, as long as it continues to be invoked, will not\r\n  // be triggered. The function will be called after it stops being called for\r\n  // N milliseconds. If `immediate` is passed, trigger the function on the\r\n  // leading edge, instead of the trailing.\r\n  _.debounce = function(func, wait, immediate) {\r\n    var timeout, result;\r\n    return function() {\r\n      var context = this, args = arguments;\r\n      var later = function() {\r\n        timeout = null;\r\n        if (!immediate) result = func.apply(context, args);\r\n      };\r\n      var callNow = immediate && !timeout;\r\n      clearTimeout(timeout);\r\n      timeout = setTimeout(later, wait);\r\n      if (callNow) result = func.apply(context, args);\r\n      return result;\r\n    };\r\n  };\r\n\r\n  // Returns a function that will be executed at most one time, no matter how\r\n  // often you call it. Useful for lazy initialization.\r\n  _.once = function(func) {\r\n    var ran = false, memo;\r\n    return function() {\r\n      if (ran) return memo;\r\n      ran = true;\r\n      memo = func.apply(this, arguments);\r\n      func = null;\r\n      return memo;\r\n    };\r\n  };\r\n\r\n  // Returns the first function passed as an argument to the second,\r\n  // allowing you to adjust arguments, run code before and after, and\r\n  // conditionally execute the original function.\r\n  _.wrap = function(func, wrapper) {\r\n    return function() {\r\n      var args = [func];\r\n      push.apply(args, arguments);\r\n      return wrapper.apply(this, args);\r\n    };\r\n  };\r\n\r\n  // Returns a function that is the composition of a list of functions, each\r\n  // consuming the return value of the function that follows.\r\n  _.compose = function() {\r\n    var funcs = arguments;\r\n    return function() {\r\n      var args = arguments;\r\n      for (var i = funcs.length - 1; i >= 0; i--) {\r\n        args = [funcs[i].apply(this, args)];\r\n      }\r\n      return args[0];\r\n    };\r\n  };\r\n\r\n  // Returns a function that will only be executed after being called N times.\r\n  _.after = function(times, func) {\r\n    if (times <= 0) return func();\r\n    return function() {\r\n      if (--times < 1) {\r\n        return func.apply(this, arguments);\r\n      }\r\n    };\r\n  };\r\n\r\n  // Object Functions\r\n  // ----------------\r\n\r\n  // Retrieve the names of an object's properties.\r\n  // Delegates to **ECMAScript 5**'s native `Object.keys`\r\n  _.keys = nativeKeys || function(obj) {\r\n    if (obj !== Object(obj)) throw new TypeError('Invalid object');\r\n    var keys = [];\r\n    for (var key in obj) if (_.has(obj, key)) keys[keys.length] = key;\r\n    return keys;\r\n  };\r\n\r\n  // Retrieve the values of an object's properties.\r\n  _.values = function(obj) {\r\n    var values = [];\r\n    for (var key in obj) if (_.has(obj, key)) values.push(obj[key]);\r\n    return values;\r\n  };\r\n\r\n  // Convert an object into a list of `[key, value]` pairs.\r\n  _.pairs = function(obj) {\r\n    var pairs = [];\r\n    for (var key in obj) if (_.has(obj, key)) pairs.push([key, obj[key]]);\r\n    return pairs;\r\n  };\r\n\r\n  // Invert the keys and values of an object. The values must be serializable.\r\n  _.invert = function(obj) {\r\n    var result = {};\r\n    for (var key in obj) if (_.has(obj, key)) result[obj[key]] = key;\r\n    return result;\r\n  };\r\n\r\n  // Return a sorted list of the function names available on the object.\r\n  // Aliased as `methods`\r\n  _.functions = _.methods = function(obj) {\r\n    var names = [];\r\n    for (var key in obj) {\r\n      if (_.isFunction(obj[key])) names.push(key);\r\n    }\r\n    return names.sort();\r\n  };\r\n\r\n  // Extend a given object with all the properties in passed-in object(s).\r\n  _.extend = function(obj) {\r\n    each(slice.call(arguments, 1), function(source) {\r\n      if (source) {\r\n        for (var prop in source) {\r\n          obj[prop] = source[prop];\r\n        }\r\n      }\r\n    });\r\n    return obj;\r\n  };\r\n\r\n  // Return a copy of the object only containing the whitelisted properties.\r\n  _.pick = function(obj) {\r\n    var copy = {};\r\n    var keys = concat.apply(ArrayProto, slice.call(arguments, 1));\r\n    each(keys, function(key) {\r\n      if (key in obj) copy[key] = obj[key];\r\n    });\r\n    return copy;\r\n  };\r\n\r\n   // Return a copy of the object without the blacklisted properties.\r\n  _.omit = function(obj) {\r\n    var copy = {};\r\n    var keys = concat.apply(ArrayProto, slice.call(arguments, 1));\r\n    for (var key in obj) {\r\n      if (!_.contains(keys, key)) copy[key] = obj[key];\r\n    }\r\n    return copy;\r\n  };\r\n\r\n  // Fill in a given object with default properties.\r\n  _.defaults = function(obj) {\r\n    each(slice.call(arguments, 1), function(source) {\r\n      if (source) {\r\n        for (var prop in source) {\r\n          if (obj[prop] == null) obj[prop] = source[prop];\r\n        }\r\n      }\r\n    });\r\n    return obj;\r\n  };\r\n\r\n  // Create a (shallow-cloned) duplicate of an object.\r\n  _.clone = function(obj) {\r\n    if (!_.isObject(obj)) return obj;\r\n    return _.isArray(obj) ? obj.slice() : _.extend({}, obj);\r\n  };\r\n\r\n  // Invokes interceptor with the obj, and then returns obj.\r\n  // The primary purpose of this method is to \"tap into\" a method chain, in\r\n  // order to perform operations on intermediate results within the chain.\r\n  _.tap = function(obj, interceptor) {\r\n    interceptor(obj);\r\n    return obj;\r\n  };\r\n\r\n  // Internal recursive comparison function for `isEqual`.\r\n  var eq = function(a, b, aStack, bStack) {\r\n    // Identical objects are equal. `0 === -0`, but they aren't identical.\r\n    // See the Harmony `egal` proposal: http://wiki.ecmascript.org/doku.php?id=harmony:egal.\r\n    if (a === b) return a !== 0 || 1 / a == 1 / b;\r\n    // A strict comparison is necessary because `null == undefined`.\r\n    if (a == null || b == null) return a === b;\r\n    // Unwrap any wrapped objects.\r\n    if (a instanceof _) a = a._wrapped;\r\n    if (b instanceof _) b = b._wrapped;\r\n    // Compare `[[Class]]` names.\r\n    var className = toString.call(a);\r\n    if (className != toString.call(b)) return false;\r\n    switch (className) {\r\n      // Strings, numbers, dates, and booleans are compared by value.\r\n      case '[object String]':\r\n        // Primitives and their corresponding object wrappers are equivalent; thus, `\"5\"` is\r\n        // equivalent to `new String(\"5\")`.\r\n        return a == String(b);\r\n      case '[object Number]':\r\n        // `NaN`s are equivalent, but non-reflexive. An `egal` comparison is performed for\r\n        // other numeric values.\r\n        return a != +a ? b != +b : (a == 0 ? 1 / a == 1 / b : a == +b);\r\n      case '[object Date]':\r\n      case '[object Boolean]':\r\n        // Coerce dates and booleans to numeric primitive values. Dates are compared by their\r\n        // millisecond representations. Note that invalid dates with millisecond representations\r\n        // of `NaN` are not equivalent.\r\n        return +a == +b;\r\n      // RegExps are compared by their source patterns and flags.\r\n      case '[object RegExp]':\r\n        return a.source == b.source &&\r\n               a.global == b.global &&\r\n               a.multiline == b.multiline &&\r\n               a.ignoreCase == b.ignoreCase;\r\n    }\r\n    if (typeof a != 'object' || typeof b != 'object') return false;\r\n    // Assume equality for cyclic structures. The algorithm for detecting cyclic\r\n    // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`.\r\n    var length = aStack.length;\r\n    while (length--) {\r\n      // Linear search. Performance is inversely proportional to the number of\r\n      // unique nested structures.\r\n      if (aStack[length] == a) return bStack[length] == b;\r\n    }\r\n    // Add the first object to the stack of traversed objects.\r\n    aStack.push(a);\r\n    bStack.push(b);\r\n    var size = 0, result = true;\r\n    // Recursively compare objects and arrays.\r\n    if (className == '[object Array]') {\r\n      // Compare array lengths to determine if a deep comparison is necessary.\r\n      size = a.length;\r\n      result = size == b.length;\r\n      if (result) {\r\n        // Deep compare the contents, ignoring non-numeric properties.\r\n        while (size--) {\r\n          if (!(result = eq(a[size], b[size], aStack, bStack))) break;\r\n        }\r\n      }\r\n    } else {\r\n      // Objects with different constructors are not equivalent, but `Object`s\r\n      // from different frames are.\r\n      var aCtor = a.constructor, bCtor = b.constructor;\r\n      if (aCtor !== bCtor && !(_.isFunction(aCtor) && (aCtor instanceof aCtor) &&\r\n                               _.isFunction(bCtor) && (bCtor instanceof bCtor))) {\r\n        return false;\r\n      }\r\n      // Deep compare objects.\r\n      for (var key in a) {\r\n        if (_.has(a, key)) {\r\n          // Count the expected number of properties.\r\n          size++;\r\n          // Deep compare each member.\r\n          if (!(result = _.has(b, key) && eq(a[key], b[key], aStack, bStack))) break;\r\n        }\r\n      }\r\n      // Ensure that both objects contain the same number of properties.\r\n      if (result) {\r\n        for (key in b) {\r\n          if (_.has(b, key) && !(size--)) break;\r\n        }\r\n        result = !size;\r\n      }\r\n    }\r\n    // Remove the first object from the stack of traversed objects.\r\n    aStack.pop();\r\n    bStack.pop();\r\n    return result;\r\n  };\r\n\r\n  // Perform a deep comparison to check if two objects are equal.\r\n  _.isEqual = function(a, b) {\r\n    return eq(a, b, [], []);\r\n  };\r\n\r\n  // Is a given array, string, or object empty?\r\n  // An \"empty\" object has no enumerable own-properties.\r\n  _.isEmpty = function(obj) {\r\n    if (obj == null) return true;\r\n    if (_.isArray(obj) || _.isString(obj)) return obj.length === 0;\r\n    for (var key in obj) if (_.has(obj, key)) return false;\r\n    return true;\r\n  };\r\n\r\n  // Is a given value a DOM element?\r\n  _.isElement = function(obj) {\r\n    return !!(obj && obj.nodeType === 1);\r\n  };\r\n\r\n  // Is a given value an array?\r\n  // Delegates to ECMA5's native Array.isArray\r\n  _.isArray = nativeIsArray || function(obj) {\r\n    return toString.call(obj) == '[object Array]';\r\n  };\r\n\r\n  // Is a given variable an object?\r\n  _.isObject = function(obj) {\r\n    return obj === Object(obj);\r\n  };\r\n\r\n  // Add some isType methods: isArguments, isFunction, isString, isNumber, isDate, isRegExp.\r\n  each(['Arguments', 'Function', 'String', 'Number', 'Date', 'RegExp'], function(name) {\r\n    _['is' + name] = function(obj) {\r\n      return toString.call(obj) == '[object ' + name + ']';\r\n    };\r\n  });\r\n\r\n  // Define a fallback version of the method in browsers (ahem, IE), where\r\n  // there isn't any inspectable \"Arguments\" type.\r\n  if (!_.isArguments(arguments)) {\r\n    _.isArguments = function(obj) {\r\n      return !!(obj && _.has(obj, 'callee'));\r\n    };\r\n  }\r\n\r\n  // Optimize `isFunction` if appropriate.\r\n  if (typeof (/./) !== 'function') {\r\n    _.isFunction = function(obj) {\r\n      return typeof obj === 'function';\r\n    };\r\n  }\r\n\r\n  // Is a given object a finite number?\r\n  _.isFinite = function(obj) {\r\n    return isFinite(obj) && !isNaN(parseFloat(obj));\r\n  };\r\n\r\n  // Is the given value `NaN`? (NaN is the only number which does not equal itself).\r\n  _.isNaN = function(obj) {\r\n    return _.isNumber(obj) && obj != +obj;\r\n  };\r\n\r\n  // Is a given value a boolean?\r\n  _.isBoolean = function(obj) {\r\n    return obj === true || obj === false || toString.call(obj) == '[object Boolean]';\r\n  };\r\n\r\n  // Is a given value equal to null?\r\n  _.isNull = function(obj) {\r\n    return obj === null;\r\n  };\r\n\r\n  // Is a given variable undefined?\r\n  _.isUndefined = function(obj) {\r\n    return obj === void 0;\r\n  };\r\n\r\n  // Shortcut function for checking if an object has a given property directly\r\n  // on itself (in other words, not on a prototype).\r\n  _.has = function(obj, key) {\r\n    return hasOwnProperty.call(obj, key);\r\n  };\r\n\r\n  // Utility Functions\r\n  // -----------------\r\n\r\n  // Run Underscore.js in *noConflict* mode, returning the `_` variable to its\r\n  // previous owner. Returns a reference to the Underscore object.\r\n  _.noConflict = function() {\r\n    root._ = previousUnderscore;\r\n    return this;\r\n  };\r\n\r\n  // Keep the identity function around for default iterators.\r\n  _.identity = function(value) {\r\n    return value;\r\n  };\r\n\r\n  // Run a function **n** times.\r\n  _.times = function(n, iterator, context) {\r\n    var accum = Array(n);\r\n    for (var i = 0; i < n; i++) accum[i] = iterator.call(context, i);\r\n    return accum;\r\n  };\r\n\r\n  // Return a random integer between min and max (inclusive).\r\n  _.random = function(min, max) {\r\n    if (max == null) {\r\n      max = min;\r\n      min = 0;\r\n    }\r\n    return min + Math.floor(Math.random() * (max - min + 1));\r\n  };\r\n\r\n  // List of HTML entities for escaping.\r\n  var entityMap = {\r\n    escape: {\r\n      '&': '&amp;',\r\n      '<': '&lt;',\r\n      '>': '&gt;',\r\n      '\"': '&quot;',\r\n      \"'\": '&#x27;',\r\n      '/': '&#x2F;'\r\n    }\r\n  };\r\n  entityMap.unescape = _.invert(entityMap.escape);\r\n\r\n  // Regexes containing the keys and values listed immediately above.\r\n  var entityRegexes = {\r\n    escape:   new RegExp('[' + _.keys(entityMap.escape).join('') + ']', 'g'),\r\n    unescape: new RegExp('(' + _.keys(entityMap.unescape).join('|') + ')', 'g')\r\n  };\r\n\r\n  // Functions for escaping and unescaping strings to/from HTML interpolation.\r\n  _.each(['escape', 'unescape'], function(method) {\r\n    _[method] = function(string) {\r\n      if (string == null) return '';\r\n      return ('' + string).replace(entityRegexes[method], function(match) {\r\n        return entityMap[method][match];\r\n      });\r\n    };\r\n  });\r\n\r\n  // If the value of the named property is a function then invoke it;\r\n  // otherwise, return it.\r\n  _.result = function(object, property) {\r\n    if (object == null) return null;\r\n    var value = object[property];\r\n    return _.isFunction(value) ? value.call(object) : value;\r\n  };\r\n\r\n  // Add your own custom functions to the Underscore object.\r\n  _.mixin = function(obj) {\r\n    each(_.functions(obj), function(name){\r\n      var func = _[name] = obj[name];\r\n      _.prototype[name] = function() {\r\n        var args = [this._wrapped];\r\n        push.apply(args, arguments);\r\n        return result.call(this, func.apply(_, args));\r\n      };\r\n    });\r\n  };\r\n\r\n  // Generate a unique integer id (unique within the entire client session).\r\n  // Useful for temporary DOM ids.\r\n  var idCounter = 0;\r\n  _.uniqueId = function(prefix) {\r\n    var id = ++idCounter + '';\r\n    return prefix ? prefix + id : id;\r\n  };\r\n\r\n  // By default, Underscore uses ERB-style template delimiters, change the\r\n  // following template settings to use alternative delimiters.\r\n  _.templateSettings = {\r\n    evaluate    : /<%([\\s\\S]+?)%>/g,\r\n    interpolate : /<%=([\\s\\S]+?)%>/g,\r\n    escape      : /<%-([\\s\\S]+?)%>/g\r\n  };\r\n\r\n  // When customizing `templateSettings`, if you don't want to define an\r\n  // interpolation, evaluation or escaping regex, we need one that is\r\n  // guaranteed not to match.\r\n  var noMatch = /(.)^/;\r\n\r\n  // Certain characters need to be escaped so that they can be put into a\r\n  // string literal.\r\n  var escapes = {\r\n    \"'\":      \"'\",\r\n    '\\\\':     '\\\\',\r\n    '\\r':     'r',\r\n    '\\n':     'n',\r\n    '\\t':     't',\r\n    '\\u2028': 'u2028',\r\n    '\\u2029': 'u2029'\r\n  };\r\n\r\n  var escaper = /\\\\|'|\\r|\\n|\\t|\\u2028|\\u2029/g;\r\n\r\n  // JavaScript micro-templating, similar to John Resig's implementation.\r\n  // Underscore templating handles arbitrary delimiters, preserves whitespace,\r\n  // and correctly escapes quotes within interpolated code.\r\n  _.template = function(text, data, settings) {\r\n    var render;\r\n    settings = _.defaults({}, settings, _.templateSettings);\r\n\r\n    // Combine delimiters into one regular expression via alternation.\r\n    var matcher = new RegExp([\r\n      (settings.escape || noMatch).source,\r\n      (settings.interpolate || noMatch).source,\r\n      (settings.evaluate || noMatch).source\r\n    ].join('|') + '|$', 'g');\r\n\r\n    // Compile the template source, escaping string literals appropriately.\r\n    var index = 0;\r\n    var source = \"__p+='\";\r\n    text.replace(matcher, function(match, escape, interpolate, evaluate, offset) {\r\n      source += text.slice(index, offset)\r\n        .replace(escaper, function(match) { return '\\\\' + escapes[match]; });\r\n\r\n      if (escape) {\r\n        source += \"'+\\n((__t=(\" + escape + \"))==null?'':_.escape(__t))+\\n'\";\r\n      }\r\n      if (interpolate) {\r\n        source += \"'+\\n((__t=(\" + interpolate + \"))==null?'':__t)+\\n'\";\r\n      }\r\n      if (evaluate) {\r\n        source += \"';\\n\" + evaluate + \"\\n__p+='\";\r\n      }\r\n      index = offset + match.length;\r\n      return match;\r\n    });\r\n    source += \"';\\n\";\r\n\r\n    // If a variable is not specified, place data values in local scope.\r\n    if (!settings.variable) source = 'with(obj||{}){\\n' + source + '}\\n';\r\n\r\n    source = \"var __t,__p='',__j=Array.prototype.join,\" +\r\n      \"print=function(){__p+=__j.call(arguments,'');};\\n\" +\r\n      source + \"return __p;\\n\";\r\n\r\n    try {\r\n      render = new Function(settings.variable || 'obj', '_', source);\r\n    } catch (e) {\r\n      e.source = source;\r\n      throw e;\r\n    }\r\n\r\n    if (data) return render(data, _);\r\n    var template = function(data) {\r\n      return render.call(this, data, _);\r\n    };\r\n\r\n    // Provide the compiled function source as a convenience for precompilation.\r\n    template.source = 'function(' + (settings.variable || 'obj') + '){\\n' + source + '}';\r\n\r\n    return template;\r\n  };\r\n\r\n  // Add a \"chain\" function, which will delegate to the wrapper.\r\n  _.chain = function(obj) {\r\n    return _(obj).chain();\r\n  };\r\n\r\n  // OOP\r\n  // ---------------\r\n  // If Underscore is called as a function, it returns a wrapped object that\r\n  // can be used OO-style. This wrapper holds altered versions of all the\r\n  // underscore functions. Wrapped objects may be chained.\r\n\r\n  // Helper function to continue chaining intermediate results.\r\n  var result = function(obj) {\r\n    return this._chain ? _(obj).chain() : obj;\r\n  };\r\n\r\n  // Add all of the Underscore functions to the wrapper object.\r\n  _.mixin(_);\r\n\r\n  // Add all mutator Array functions to the wrapper.\r\n  each(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(name) {\r\n    var method = ArrayProto[name];\r\n    _.prototype[name] = function() {\r\n      var obj = this._wrapped;\r\n      method.apply(obj, arguments);\r\n      if ((name == 'shift' || name == 'splice') && obj.length === 0) delete obj[0];\r\n      return result.call(this, obj);\r\n    };\r\n  });\r\n\r\n  // Add all accessor Array functions to the wrapper.\r\n  each(['concat', 'join', 'slice'], function(name) {\r\n    var method = ArrayProto[name];\r\n    _.prototype[name] = function() {\r\n      return result.call(this, method.apply(this._wrapped, arguments));\r\n    };\r\n  });\r\n\r\n  _.extend(_.prototype, {\r\n\r\n    // Start chaining a wrapped Underscore object.\r\n    chain: function() {\r\n      this._chain = true;\r\n      return this;\r\n    },\r\n\r\n    // Extracts the result from a wrapped and chained object.\r\n    value: function() {\r\n      return this._wrapped;\r\n    }\r\n\r\n  });\r\n\r\n}).call(this);\r\n"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.REST.SocialMedia/AccountManagement.EntryPoint/vendor/js/uritemplates.js",
    "content": "/*\r\nUriTemplates Template Processor - Version: @VERSION - Dated: @DATE\r\n(c) marc.portier@gmail.com - 2011-2012\r\nLicensed under ALPv2 \r\n*/\r\n\r\n;\r\nvar uritemplate = (function() {\r\n\r\n// Below are the functions we originally used from jQuery. \r\n// The implementations below are often more naive then what is inside jquery, but they suffice for our needs.\r\n \r\nfunction isFunction(fn) {\r\n    return typeof fn == 'function';\r\n}\r\n \r\nfunction isEmptyObject (obj) {\r\n    for(var name in obj){\r\n        return false;\r\n    }\r\n    return true;\r\n}\r\n \r\nfunction extend(base, newprops) {\r\n    for (var name in newprops) {\r\n        base[name] = newprops[name];\r\n    }\r\n    return base;\r\n}\r\n\r\n/**\r\n * Create a runtime cache around retrieved values from the context.\r\n * This allows for dynamic (function) results to be kept the same for multiple \r\n * occuring expansions within one template.\r\n * Note: Uses key-value tupples to be able to cache null values as well.\r\n */\r\n //TODO move this into prep-processing\r\nfunction CachingContext(context) {\r\n    this.raw = context;\r\n    this.cache = {};\r\n}\r\nCachingContext.prototype.get = function(key) {\r\n    var val = this.lookupRaw(key);\r\n    var result = val;\r\n    \r\n    if (isFunction(val)) { // check function-result-cache\r\n        var tupple = this.cache[key];\r\n        if (tupple !== null && tupple !== undefined) { \r\n            result = tupple.val;\r\n        } else {\r\n            result = val(this.raw);\r\n            this.cache[key] = {key: key, val: result}; \r\n            // NOTE: by storing tupples we make sure a null return is validly consistent too in expansions\r\n        }\r\n    }\r\n    return result;\r\n};\r\n\r\nCachingContext.prototype.lookupRaw = function(key) {\r\n    return CachingContext.lookup(this, this.raw, key);\r\n};\r\n\r\nCachingContext.lookup = function(me, context, key) {\r\n    var result = context[key];\r\n    if (result !== undefined) {\r\n        return result;\r\n    } else {\r\n        var keyparts = key.split('.');\r\n        var i = 0, keysplits = keyparts.length - 1;\r\n        for (i = 0; i<keysplits; i++) {\r\n            var leadKey = keyparts.slice(0, keysplits - i).join('.');\r\n            var trailKey = keyparts.slice(-i-1).join('.');\r\n            var leadContext = context[leadKey];\r\n            if (leadContext !== undefined) {\r\n                return CachingContext.lookup(me, leadContext, trailKey);\r\n            }\r\n        }\r\n        return undefined;\r\n    }\r\n};\r\n\r\n\r\nfunction UriTemplate(set) {\r\n    this.set = set;\r\n}\r\n\r\nUriTemplate.prototype.expand = function(context) {\r\n    var cache = new CachingContext(context);\r\n    var res = \"\";\r\n    var i = 0, cnt = this.set.length;\r\n    for (i = 0; i<cnt; i++ ) {\r\n        res += this.set[i].expand(cache);\r\n    }\r\n    return res;\r\n};\r\n\r\n//TODO: change since draft-0.6 about characters in literals\r\n/* extract:\r\nThe characters outside of expressions in a URI Template string are intended to be copied literally to the URI-reference if the character is allowed in a URI (reserved / unreserved / pct-encoded) or, if not allowed, copied to the URI-reference in its UTF-8 pct-encoded form.\r\n*/\r\nfunction Literal(txt ) {\r\n    this.txt = txt;\r\n}\r\n\r\nLiteral.prototype.expand = function() {\r\n    return this.txt;\r\n};\r\n\r\n\r\n\r\nvar RESERVEDCHARS_RE = new RegExp(\"[:/?#\\\\[\\\\]@!$&()*+,;=']\",\"g\");\r\nfunction encodeNormal(val) {\r\n    return encodeURIComponent(val).replace(RESERVEDCHARS_RE, function(s) {return escape(s);} );\r\n}\r\n\r\n//var SELECTEDCHARS_RE = new RegExp(\"[]\",\"g\");\r\nfunction encodeReserved(val) {\r\n    //return encodeURI(val).replace(SELECTEDCHARS_RE, function(s) {return escape(s)} );\r\n    return encodeURI(val); // no need for additional replace if selected-chars is empty\r\n}\r\n\r\n\r\nfunction addUnNamed(name, key, val) {\r\n    return key + (key.length > 0 ? \"=\" : \"\") + val;\r\n}\r\n\r\nfunction addNamed(name, key, val, noName) {\r\n    noName = noName || false;\r\n    if (noName) { name = \"\"; }\r\n    \r\n    if (!key || key.length === 0)  {\r\n        key = name;\r\n    }\r\n    return key + (key.length > 0 ? \"=\" : \"\") + val;\r\n}\r\n\r\nfunction addLabeled(name, key, val, noName) {\r\n    noName = noName || false;\r\n    if (noName) { name = \"\"; }\r\n    \r\n    if (!key || key.length === 0)  {\r\n        key = name;\r\n    }\r\n    return key + (key.length > 0 && val ? \"=\" : \"\") + val;\r\n}\r\n\r\n\r\nvar simpleConf = { \r\n    prefix : \"\",     joiner : \",\",     encode : encodeNormal,    builder : addUnNamed\r\n};\r\nvar reservedConf = { \r\n    prefix : \"\",     joiner : \",\",     encode : encodeReserved,  builder : addUnNamed\r\n};\r\nvar fragmentConf = { \r\n    prefix : \"#\",    joiner : \",\",     encode : encodeReserved,  builder : addUnNamed\r\n};\r\nvar pathParamConf = { \r\n    prefix : \";\",    joiner : \";\",     encode : encodeNormal,    builder : addLabeled\r\n};\r\nvar formParamConf = { \r\n    prefix : \"?\",    joiner : \"&\",     encode : encodeNormal,    builder : addNamed\r\n};\r\nvar formContinueConf = { \r\n    prefix : \"&\",    joiner : \"&\",     encode : encodeNormal,    builder : addNamed\r\n};\r\nvar pathHierarchyConf = { \r\n    prefix : \"/\",    joiner : \"/\",     encode : encodeNormal,    builder : addUnNamed\r\n};\r\nvar labelConf = { \r\n    prefix : \".\",    joiner : \".\",     encode : encodeNormal,    builder : addUnNamed\r\n};\r\n\r\n\r\nfunction Expression(conf, vars ) {\r\n    extend(this, conf);\r\n    this.vars = vars;\r\n}\r\n\r\nExpression.build = function(ops, vars) {\r\n    var conf;\r\n    switch(ops) {\r\n        case ''  : conf = simpleConf; break;\r\n        case '+' : conf = reservedConf; break;\r\n        case '#' : conf = fragmentConf; break;\r\n        case ';' : conf = pathParamConf; break;\r\n        case '?' : conf = formParamConf; break;\r\n        case '&' : conf = formContinueConf; break;\r\n        case '/' : conf = pathHierarchyConf; break;\r\n        case '.' : conf = labelConf; break;\r\n        default  : throw \"Unexpected operator: '\"+ops+\"'\"; \r\n    }\r\n    return new Expression(conf, vars);\r\n};\r\n\r\nExpression.prototype.expand = function(context) {\r\n    var joiner = this.prefix;\r\n    var nextjoiner = this.joiner;\r\n    var buildSegment = this.builder;\r\n    var res = \"\";\r\n    var i = 0, cnt = this.vars.length;\r\n    \r\n    for (i = 0 ; i< cnt; i++) {\r\n        var varspec = this.vars[i];\r\n        varspec.addValues(context, this.encode, function(key, val, noName) {\r\n            var segm = buildSegment(varspec.name, key, val, noName);\r\n            if (segm !== null && segm !== undefined) {\r\n                res += joiner + segm;\r\n                joiner = nextjoiner;\r\n            }\r\n        });\r\n    }\r\n    return res;\r\n};\r\n\r\n\r\n\r\nvar UNBOUND = {};\r\n\r\n/** \r\n * Helper class to help grow a string of (possibly encoded) parts until limit is reached\r\n */\r\nfunction Buffer(limit) {\r\n    this.str = \"\";\r\n    if (limit === UNBOUND) {\r\n        this.appender = Buffer.UnboundAppend;\r\n    } else {\r\n        this.len = 0;\r\n        this.limit = limit; \r\n        this.appender = Buffer.BoundAppend;\r\n    }\r\n}\r\n\r\nBuffer.prototype.append = function(part, encoder) {\r\n    return this.appender(this, part, encoder);\r\n};\r\n\r\nBuffer.UnboundAppend = function(me, part, encoder) {\r\n    part = encoder ? encoder(part) : part;\r\n    me.str += part;\r\n    return me;\r\n};\r\n\r\nBuffer.BoundAppend = function(me, part, encoder) {\r\n    part = part.substring(0, me.limit - me.len);\r\n    me.len += part.length;\r\n    \r\n    part = encoder ? encoder(part) : part;\r\n    me.str += part;\r\n    return me;\r\n};\r\n\r\n\r\nfunction arrayToString(arr, encoder, maxLength) {\r\n    var buffer = new Buffer(maxLength);    \r\n    var joiner = \"\";\r\n\r\n    var i = 0, cnt = arr.length;\r\n    for (i=0; i<cnt; i++) {\r\n        if (arr[i] !== null && arr[i] !== undefined) {\r\n            buffer.append(joiner).append(arr[i], encoder);\r\n            joiner = \",\";\r\n        }\r\n    }\r\n    return buffer.str;\r\n}\r\n\r\nfunction objectToString(obj, encoder, maxLength) {\r\n    var buffer = new Buffer(maxLength);    \r\n    var joiner = \"\";\r\n    var k;\r\n\r\n    for (k in obj) {\r\n        if (obj.hasOwnProperty(k) ) {\r\n            if (obj[k] !== null && obj[k] !== undefined) {\r\n                buffer.append(joiner + k + ',').append(obj[k], encoder);\r\n                joiner = \",\";\r\n            }\r\n        }\r\n    }\r\n    return buffer.str;\r\n}\r\n\r\n\r\nfunction simpleValueHandler(me, val, valprops, encoder, adder) {\r\n    var result;\r\n    \r\n    if (valprops.isArr) {\r\n        result = arrayToString(val, encoder, me.maxLength);\r\n    } else if (valprops.isObj) {\r\n        result = objectToString(val, encoder, me.maxLength);\r\n    } else {\r\n        var buffer = new Buffer(me.maxLength);\r\n        result = buffer.append(val, encoder).str;\r\n    }       \r\n    \r\n    adder(\"\", result);\r\n}\r\n\r\nfunction explodeValueHandler(me, val, valprops, encoder, adder) {\r\n    if (valprops.isArr) {\r\n        var i = 0, cnt = val.length;\r\n        for (i = 0; i<cnt; i++) {\r\n            adder(\"\", encoder(val[i]) );\r\n        }\r\n    } else if (valprops.isObj) {\r\n        var k;\r\n        for (k in val) {\r\n            if (val.hasOwnProperty(k)) {\r\n                adder(k, encoder(val[k]) );\r\n            }\r\n        }\r\n    } else { // explode-requested, but single value\r\n        adder(\"\", encoder(val));\r\n    }\r\n}\r\n\r\nfunction valueProperties(val) {\r\n    var isArr = false;\r\n    var isObj = false;\r\n    var isUndef = true;  //note: \"\" is empty but not undef\r\n    \r\n    if (val !== null && val !== undefined) {\r\n        isArr = (val.constructor === Array);\r\n        isObj = (val.constructor === Object);\r\n        isUndef = (isArr && val.length === 0) || (isObj && isEmptyObject(val));\r\n    } \r\n    \r\n    return {isArr: isArr, isObj: isObj, isUndef: isUndef};\r\n}\r\n\r\n\r\nfunction VarSpec (name, vhfn, nums) {\r\n    this.name = unescape(name); \r\n    this.valueHandler = vhfn;\r\n    this.maxLength = nums;\r\n}\r\n\r\n\r\nVarSpec.build = function(name, expl, part, nums) {\r\n    var valueHandler, valueModifier;\r\n    \r\n    if (!!expl) { //interprete as boolean\r\n        valueHandler = explodeValueHandler;\r\n    } else {\r\n        valueHandler = simpleValueHandler;\r\n    }\r\n    \r\n    if (!part) {\r\n        nums = UNBOUND;\r\n    }\r\n    \r\n    return new VarSpec(name, valueHandler, nums);\r\n};\r\n\r\n\r\nVarSpec.prototype.addValues = function(context, encoder, adder) {\r\n    var val = context.get(this.name);\r\n    var valprops = valueProperties(val);\r\n    if (valprops.isUndef) { return; } // ignore empty values \r\n    this.valueHandler(this, val, valprops, encoder, adder);\r\n};\r\n    \r\n    \r\n\r\n//----------------------------------------------parsing logic\r\n// How each varspec should look like\r\nvar VARSPEC_RE=/([^*:]*)((\\*)|(:)([0-9]+))?/;\r\n\r\nvar match2varspec = function(m) {\r\n    var name = m[1];\r\n    var expl = m[3];\r\n    var part = m[4];\r\n    var nums = parseInt(m[5], 10);\r\n    \r\n    return VarSpec.build(name, expl, part, nums);\r\n};\r\n\r\n\r\n// Splitting varspecs in list with:\r\nvar LISTSEP=\",\";\r\n\r\n// How each template should look like\r\nvar TEMPL_RE=/(\\{([+#.;?&\\/])?(([^.*:,{}|@!=$()][^*:,{}$()]*)(\\*|:([0-9]+))?(,([^.*:,{}][^*:,{}]*)(\\*|:([0-9]+))?)*)\\})/g;\r\n// Note: reserved operators: |!@ are left out of the regexp in order to make those templates degrade into literals \r\n// (as expected by the spec - see tests.html \"reserved operators\")\r\n\r\n\r\nvar match2expression = function(m) {\r\n    var expr = m[0];\r\n    var ops = m[2] || '';\r\n    var vars = m[3].split(LISTSEP);\r\n    var i = 0, len = vars.length;\r\n    for (i = 0; i<len; i++) {\r\n        var match;\r\n        if ( (match = vars[i].match(VARSPEC_RE)) === null) {\r\n            throw \"unexpected parse error in varspec: \" + vars[i];\r\n        }\r\n        vars[i] = match2varspec(match);\r\n    }\r\n    \r\n    return Expression.build(ops, vars);\r\n};\r\n\r\n\r\nvar pushLiteralSubstr = function(set, src, from, to) {\r\n    if (from < to) {\r\n        var literal = src.substr(from, to - from);\r\n        set.push(new Literal(literal));\r\n    }\r\n};\r\n\r\nvar parse = function(str) {\r\n    var lastpos = 0;\r\n    var comp = [];\r\n        \r\n    var match;\r\n    var pattern = TEMPL_RE;\r\n    pattern.lastIndex = 0; // just to be sure\r\n    while ((match = pattern.exec(str)) !== null) {\r\n        var newpos = match.index;\r\n        pushLiteralSubstr(comp, str, lastpos, newpos);\r\n        \r\n        comp.push(match2expression(match));\r\n        lastpos = pattern.lastIndex;\r\n    }\r\n    pushLiteralSubstr(comp, str, lastpos, str.length);\r\n\r\n    return new UriTemplate(comp);\r\n};\r\n\r\n\r\n//-------------------------------------------comments and ideas\r\n\r\n//TODO: consider building cache of previously parsed uris or even parsed expressions?\r\n\r\nreturn parse;\r\n\r\n}());\r\n"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.REST.SocialMedia/AccountManagement.RegularAccounts.BeganFollowing/AccountManagement.RegularAccounts.BeganFollowing.csproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Project ToolsVersion=\"12.0\" DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\r\n  <Import Project=\"$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props\" Condition=\"Exists('$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props')\" />\r\n  <PropertyGroup>\r\n    <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>\r\n    <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>\r\n    <ProductVersion>\r\n    </ProductVersion>\r\n    <SchemaVersion>2.0</SchemaVersion>\r\n    <ProjectGuid>{8F0F2B7C-755A-468A-836C-8F2101BE8046}</ProjectGuid>\r\n    <ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>\r\n    <OutputType>Library</OutputType>\r\n    <AppDesignerFolder>Properties</AppDesignerFolder>\r\n    <RootNamespace>AccountManagement.RegularAccounts.BeganFollowing</RootNamespace>\r\n    <AssemblyName>AccountManagement.RegularAccounts.BeganFollowing</AssemblyName>\r\n    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r\n    <UseIISExpress>true</UseIISExpress>\r\n    <IISExpressSSLPort />\r\n    <IISExpressAnonymousAuthentication />\r\n    <IISExpressWindowsAuthentication />\r\n    <IISExpressUseClassicPipelineMode />\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' \">\r\n    <DebugSymbols>true</DebugSymbols>\r\n    <DebugType>full</DebugType>\r\n    <Optimize>false</Optimize>\r\n    <OutputPath>bin\\</OutputPath>\r\n    <DefineConstants>DEBUG;TRACE</DefineConstants>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <WarningLevel>4</WarningLevel>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' \">\r\n    <DebugType>pdbonly</DebugType>\r\n    <Optimize>true</Optimize>\r\n    <OutputPath>bin\\</OutputPath>\r\n    <DefineConstants>TRACE</DefineConstants>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <WarningLevel>4</WarningLevel>\r\n  </PropertyGroup>\r\n  <ItemGroup>\r\n    <Reference Include=\"EventStore.ClientAPI\">\r\n      <HintPath>..\\packages\\EventStore.Client.2.0.2\\lib\\net40\\EventStore.ClientAPI.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"Microsoft.CSharp\" />\r\n    <Reference Include=\"System.Net.Http\" />\r\n    <Reference Include=\"System.Net.Http.Formatting, Version=5.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL\">\r\n      <SpecificVersion>False</SpecificVersion>\r\n      <HintPath>..\\packages\\Microsoft.AspNet.WebApi.Client.5.1.1\\lib\\net45\\System.Net.Http.Formatting.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"System.ServiceModel\" />\r\n    <Reference Include=\"System.Web.Cors\">\r\n      <HintPath>..\\packages\\Microsoft.AspNet.Cors.5.1.1\\lib\\net45\\System.Web.Cors.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"System.Web.DynamicData\" />\r\n    <Reference Include=\"System.Web.Entity\" />\r\n    <Reference Include=\"System.Web.ApplicationServices\" />\r\n    <Reference Include=\"System.ComponentModel.DataAnnotations\" />\r\n    <Reference Include=\"System\" />\r\n    <Reference Include=\"System.Data\" />\r\n    <Reference Include=\"System.Core\" />\r\n    <Reference Include=\"System.Data.DataSetExtensions\" />\r\n    <Reference Include=\"System.Web.Extensions\" />\r\n    <Reference Include=\"System.Web.Http, Version=5.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL\">\r\n      <SpecificVersion>False</SpecificVersion>\r\n      <HintPath>..\\packages\\Microsoft.AspNet.WebApi.Core.5.1.1\\lib\\net45\\System.Web.Http.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"System.Web.Http.Cors\">\r\n      <HintPath>..\\packages\\Microsoft.AspNet.WebApi.Cors.5.1.1\\lib\\net45\\System.Web.Http.Cors.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"System.Xml.Linq\" />\r\n    <Reference Include=\"System.Drawing\" />\r\n    <Reference Include=\"System.Web\" />\r\n    <Reference Include=\"System.Xml\" />\r\n    <Reference Include=\"System.Configuration\" />\r\n    <Reference Include=\"System.Web.Services\" />\r\n    <Reference Include=\"System.EnterpriseServices\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <Reference Include=\"Newtonsoft.Json\">\r\n      <HintPath>..\\packages\\Newtonsoft.Json.5.0.6\\lib\\net45\\Newtonsoft.Json.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"System.Web.Http.WebHost\">\r\n      <HintPath>..\\packages\\Microsoft.AspNet.WebApi.WebHost.5.0.0\\lib\\net45\\System.Web.Http.WebHost.dll</HintPath>\r\n    </Reference>\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <Content Include=\"Global.asax\" />\r\n    <Content Include=\"Web.config\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <Compile Include=\"App_Start\\EnableCorsAttribute.cs\" />\r\n    <Compile Include=\"App_Start\\WebApiConfig.cs\" />\r\n    <Compile Include=\"Controllers\\BeganFollowingController.cs\" />\r\n    <Compile Include=\"Global.asax.cs\">\r\n      <DependentUpon>Global.asax</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Properties\\AssemblyInfo.cs\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <Content Include=\"packages.config\" />\r\n    <None Include=\"Web.Debug.config\">\r\n      <DependentUpon>Web.config</DependentUpon>\r\n    </None>\r\n    <None Include=\"Web.Release.config\">\r\n      <DependentUpon>Web.config</DependentUpon>\r\n    </None>\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <Folder Include=\"App_Data\\\" />\r\n    <Folder Include=\"Models\\\" />\r\n  </ItemGroup>\r\n  <PropertyGroup>\r\n    <VisualStudioVersion Condition=\"'$(VisualStudioVersion)' == ''\">10.0</VisualStudioVersion>\r\n    <VSToolsPath Condition=\"'$(VSToolsPath)' == ''\">$(MSBuildExtensionsPath32)\\Microsoft\\VisualStudio\\v$(VisualStudioVersion)</VSToolsPath>\r\n  </PropertyGroup>\r\n  <Import Project=\"$(MSBuildBinPath)\\Microsoft.CSharp.targets\" />\r\n  <Import Project=\"$(VSToolsPath)\\WebApplications\\Microsoft.WebApplication.targets\" Condition=\"'$(VSToolsPath)' != ''\" />\r\n  <Import Project=\"$(MSBuildExtensionsPath32)\\Microsoft\\VisualStudio\\v10.0\\WebApplications\\Microsoft.WebApplication.targets\" Condition=\"false\" />\r\n  <ProjectExtensions>\r\n    <VisualStudio>\r\n      <FlavorProperties GUID=\"{349c5851-65df-11da-9384-00065b846f21}\">\r\n        <WebProjectProperties>\r\n          <UseIIS>True</UseIIS>\r\n          <AutoAssignPort>True</AutoAssignPort>\r\n          <DevelopmentServerPort>2277</DevelopmentServerPort>\r\n          <DevelopmentServerVPath>/</DevelopmentServerVPath>\r\n          <IISUrl>http://localhost:4102/</IISUrl>\r\n          <NTLMAuthentication>False</NTLMAuthentication>\r\n          <UseCustomServer>False</UseCustomServer>\r\n          <CustomServerUrl>\r\n          </CustomServerUrl>\r\n          <SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>\r\n        </WebProjectProperties>\r\n      </FlavorProperties>\r\n    </VisualStudio>\r\n  </ProjectExtensions>\r\n  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \r\n       Other similar extension points exist, see Microsoft.Common.targets.\r\n  <Target Name=\"BeforeBuild\">\r\n  </Target>\r\n  <Target Name=\"AfterBuild\">\r\n  </Target>\r\n  -->\r\n</Project>"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.REST.SocialMedia/AccountManagement.RegularAccounts.BeganFollowing/App_Start/EnableCorsAttribute.cs",
    "content": "﻿"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.REST.SocialMedia/AccountManagement.RegularAccounts.BeganFollowing/App_Start/WebApiConfig.cs",
    "content": "﻿using System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Web.Http;\r\nusing System.Web.Http.Cors;\r\n\r\nnamespace AccountManagement.RegularAccounts.BeganFollowing\r\n{\r\n    public static class WebApiConfig\r\n    {\r\n        public static void Register(HttpConfiguration config)\r\n        {\r\n            var cors = new EnableCorsAttribute(\"*\", \"*\", \"*\");\r\n            config.EnableCors(cors);\r\n            // Web API configuration and services\r\n\r\n            // Web API routes\r\n            config.MapHttpAttributeRoutes();\r\n\r\n            config.Routes.MapHttpRoute(\r\n                name: \"Began Following\",\r\n                routeTemplate: \"accountmanagement/beganfollowing\",\r\n                defaults: new { controller = \"BeganFollowing\", action = \"Feed\" }\r\n            );\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.REST.SocialMedia/AccountManagement.RegularAccounts.BeganFollowing/Controllers/BeganFollowingController.cs",
    "content": "﻿using System.Net;\r\nusing System.Net.Http;\r\nusing System.Web.Http;\r\nusing System.ServiceModel.Syndication;\r\nusing System.Xml;\r\nusing System.Text;\r\nusing System.IO;\r\nusing EventStore.ClientAPI;\r\nusing Newtonsoft.Json;\r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\n\r\nnamespace AccountManageent.RegularAccounts.BeganFollowing\r\n{\r\n    public class BeganFollowingController : ApiController\r\n    {\r\n        private const string BeganFollowingBaseUrl = \"http://localhost:4102/\";\r\n\r\n        [HttpGet]\r\n        public HttpResponseMessage Feed()\r\n        {\r\n            // create feed\r\n            var feedUri = new Uri(BeganFollowingBaseUrl + \"beganfollowing\");\r\n            var feed = new SyndicationFeed(\r\n\"BeganFollowing\", \"Began following domain events\", feedUri\r\n         );\r\n            feed.Authors.Add(\r\nnew SyndicationPerson(\"accountManagementBC@WroxPPPDDD.com\")\r\n     );\r\n            feed.Items = EventRetriever.RecentEvents(\"BeganFollowing\")\r\n     .Select(MapToFeedItem);\r\n\r\n            // set feed as response - always atom+xml - no HAL\r\n            var response = new HttpResponseMessage(HttpStatusCode.OK);\r\n            response.Content = new StringContent(\r\n        GetFeedContent(feed), Encoding.UTF8, \"application/atom+xml\"\r\n     );\r\n            return response;\r\n        }\r\n\r\n        private string GetFeedContent(SyndicationFeed feed)\r\n        {\r\n            using (var sw = new StringWriter())\r\n            using (var xw = XmlWriter.Create(sw))\r\n            {\r\n                feed.GetAtom10Formatter().WriteTo(xw);\r\n                xw.Flush();\r\n\r\n                return sw.ToString();\r\n            }\r\n        }\r\n\r\n        private SyndicationItem MapToFeedItem(ResolvedEvent ev)\r\n        {\r\n            return new SyndicationItem(\r\n                \"BeganFollowingEvent\",\r\n                Encoding.UTF8.GetString(ev.Event.Data),\r\n  new Uri(RequestContext.Url.Content(\"/beganfollowing/\" +\r\n    ev.Event.EventId)),\r\n  ev.Event.EventId.ToString(),\r\n                DateTime.Now // Event store client does not return timestamp yet\r\n            );\r\n        }\r\n    }\r\n\r\n    public static class EventRetriever\r\n    {\r\n        private static IPEndPoint defaultEsEndpoint = new IPEndPoint(IPAddress.Loopback, 1113);\r\n        private static IEventStoreConnection esConn = EventStoreConnection.Create(defaultEsEndpoint);\r\n\r\n        static EventRetriever()\r\n        {\r\n            esConn.Connect();\r\n        }\r\n\r\n        public static IEnumerable<ResolvedEvent> RecentEvents(string stream)\r\n        {\r\n            var results = esConn.ReadStreamEventsForward(stream, 0, 20, false);\r\n            return results.Events;\r\n        }\r\n    }\r\n\r\n}\r\n"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.REST.SocialMedia/AccountManagement.RegularAccounts.BeganFollowing/Global.asax",
    "content": "﻿<%@ Application Codebehind=\"Global.asax.cs\" Inherits=\"AccountManagement.RegularAccounts.BeganFollowing.WebApiApplication\" Language=\"C#\" %>\r\n"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.REST.SocialMedia/AccountManagement.RegularAccounts.BeganFollowing/Global.asax.cs",
    "content": "﻿using System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Web;\r\nusing System.Web.Http;\r\nusing System.Web.Routing;\r\n\r\nnamespace AccountManagement.RegularAccounts.BeganFollowing\r\n{\r\n    public class WebApiApplication : System.Web.HttpApplication\r\n    {\r\n        protected void Application_Start()\r\n        {\r\n            GlobalConfiguration.Configure(WebApiConfig.Register);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.REST.SocialMedia/AccountManagement.RegularAccounts.BeganFollowing/Properties/AssemblyInfo.cs",
    "content": "﻿using System.Reflection;\r\nusing System.Runtime.CompilerServices;\r\nusing System.Runtime.InteropServices;\r\n\r\n// General Information about an assembly is controlled through the following \r\n// set of attributes. Change these attribute values to modify the information\r\n// associated with an assembly.\r\n[assembly: AssemblyTitle(\"AccountManagement.RegularAccounts.BeganFollowing\")]\r\n[assembly: AssemblyDescription(\"\")]\r\n[assembly: AssemblyConfiguration(\"\")]\r\n[assembly: AssemblyCompany(\"\")]\r\n[assembly: AssemblyProduct(\"AccountManagement.RegularAccounts.BeganFollowing\")]\r\n[assembly: AssemblyCopyright(\"Copyright ©  2014\")]\r\n[assembly: AssemblyTrademark(\"\")]\r\n[assembly: AssemblyCulture(\"\")]\r\n\r\n// Setting ComVisible to false makes the types in this assembly not visible \r\n// to COM components.  If you need to access a type in this assembly from \r\n// COM, set the ComVisible attribute to true on that type.\r\n[assembly: ComVisible(false)]\r\n\r\n// The following GUID is for the ID of the typelib if this project is exposed to COM\r\n[assembly: Guid(\"7c1bbac3-ebe4-457f-bb1d-87e0688c4896\")]\r\n\r\n// Version information for an assembly consists of the following four values:\r\n//\r\n//      Major Version\r\n//      Minor Version \r\n//      Build Number\r\n//      Revision\r\n//\r\n// You can specify all the values or you can default the Revision and Build Numbers \r\n// by using the '*' as shown below:\r\n[assembly: AssemblyVersion(\"1.0.0.0\")]\r\n[assembly: AssemblyFileVersion(\"1.0.0.0\")]\r\n"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.REST.SocialMedia/AccountManagement.RegularAccounts.BeganFollowing/Web.Debug.config",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n\r\n<!-- For more information on using web.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 -->\r\n\r\n<configuration xmlns:xdt=\"http://schemas.microsoft.com/XML-Document-Transform\">\r\n  <!--\r\n    In the example below, the \"SetAttributes\" transform will change the value of \r\n    \"connectionString\" to use \"ReleaseSQLServer\" only when the \"Match\" locator \r\n    finds an attribute \"name\" that has a value of \"MyDB\".\r\n    \r\n    <connectionStrings>\r\n      <add name=\"MyDB\" \r\n        connectionString=\"Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True\" \r\n        xdt:Transform=\"SetAttributes\" xdt:Locator=\"Match(name)\"/>\r\n    </connectionStrings>\r\n  -->\r\n  <system.web>\r\n    <!--\r\n      In the example below, the \"Replace\" transform will replace the entire \r\n      <customErrors> section of your web.config file.\r\n      Note that because there is only one customErrors section under the \r\n      <system.web> node, there is no need to use the \"xdt:Locator\" attribute.\r\n      \r\n      <customErrors defaultRedirect=\"GenericError.htm\"\r\n        mode=\"RemoteOnly\" xdt:Transform=\"Replace\">\r\n        <error statusCode=\"500\" redirect=\"InternalError.htm\"/>\r\n      </customErrors>\r\n    -->\r\n  </system.web>\r\n</configuration>"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.REST.SocialMedia/AccountManagement.RegularAccounts.BeganFollowing/Web.Release.config",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n\r\n<!-- For more information on using web.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 -->\r\n\r\n<configuration xmlns:xdt=\"http://schemas.microsoft.com/XML-Document-Transform\">\r\n  <!--\r\n    In the example below, the \"SetAttributes\" transform will change the value of \r\n    \"connectionString\" to use \"ReleaseSQLServer\" only when the \"Match\" locator \r\n    finds an attribute \"name\" that has a value of \"MyDB\".\r\n    \r\n    <connectionStrings>\r\n      <add name=\"MyDB\" \r\n        connectionString=\"Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True\" \r\n        xdt:Transform=\"SetAttributes\" xdt:Locator=\"Match(name)\"/>\r\n    </connectionStrings>\r\n  -->\r\n  <system.web>\r\n    <compilation xdt:Transform=\"RemoveAttributes(debug)\" />\r\n    <!--\r\n      In the example below, the \"Replace\" transform will replace the entire \r\n      <customErrors> section of your web.config file.\r\n      Note that because there is only one customErrors section under the \r\n      <system.web> node, there is no need to use the \"xdt:Locator\" attribute.\r\n      \r\n      <customErrors defaultRedirect=\"GenericError.htm\"\r\n        mode=\"RemoteOnly\" xdt:Transform=\"Replace\">\r\n        <error statusCode=\"500\" redirect=\"InternalError.htm\"/>\r\n      </customErrors>\r\n    -->\r\n  </system.web>\r\n</configuration>"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.REST.SocialMedia/AccountManagement.RegularAccounts.BeganFollowing/Web.config",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<!--\r\n  For more information on how to configure your ASP.NET application, please visit\r\n  http://go.microsoft.com/fwlink/?LinkId=301879\r\n  -->\r\n<configuration>\r\n  <appSettings>\r\n  </appSettings>\r\n  <system.web>\r\n    <compilation debug=\"true\" targetFramework=\"4.5\"/>\r\n    <httpRuntime targetFramework=\"4.5\"/>\r\n  </system.web>\r\n  \r\n<system.webServer>\r\n    <handlers>\r\n      <remove name=\"ExtensionlessUrlHandler-Integrated-4.0\"/>\r\n      <remove name=\"OPTIONSVerbHandler\"/>\r\n      <remove name=\"TRACEVerbHandler\"/>\r\n      <add name=\"ExtensionlessUrlHandler-Integrated-4.0\" path=\"*.\" verb=\"*\" type=\"System.Web.Handlers.TransferRequestHandler\" preCondition=\"integratedMode,runtimeVersionv4.0\"/>\r\n    </handlers>\r\n  </system.webServer>\t<runtime>\r\n\t\t<assemblyBinding xmlns=\"urn:schemas-microsoft-com:asm.v1\">\r\n\t\t\t<dependentAssembly>\r\n\t\t\t\t<assemblyIdentity name=\"System.Web.Http\" publicKeyToken=\"31BF3856AD364E35\" culture=\"neutral\"/>\r\n\t\t\t\t<bindingRedirect oldVersion=\"0.0.0.0-5.1.0.0\" newVersion=\"5.1.0.0\"/>\r\n\t\t\t</dependentAssembly>\r\n\t\t\t<dependentAssembly>\r\n\t\t\t\t<assemblyIdentity name=\"System.Net.Http.Formatting\" publicKeyToken=\"31BF3856AD364E35\" culture=\"neutral\"/>\r\n\t\t\t\t<bindingRedirect oldVersion=\"0.0.0.0-5.1.0.0\" newVersion=\"5.1.0.0\"/>\r\n\t\t\t</dependentAssembly>\r\n\t\t</assemblyBinding>\r\n\t</runtime>\r\n</configuration>\r\n"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.REST.SocialMedia/AccountManagement.RegularAccounts.BeganFollowing/packages.config",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<packages>\r\n  <package id=\"EventStore.Client\" version=\"2.0.2\" targetFramework=\"net45\" />\r\n  <package id=\"Microsoft.AspNet.Cors\" version=\"5.1.1\" targetFramework=\"net45\" />\r\n  <package id=\"Microsoft.AspNet.WebApi\" version=\"5.0.0\" targetFramework=\"net45\" />\r\n  <package id=\"Microsoft.AspNet.WebApi.Client\" version=\"5.1.1\" targetFramework=\"net45\" />\r\n  <package id=\"Microsoft.AspNet.WebApi.Core\" version=\"5.1.1\" targetFramework=\"net45\" />\r\n  <package id=\"Microsoft.AspNet.WebApi.Cors\" version=\"5.1.1\" targetFramework=\"net45\" />\r\n  <package id=\"Microsoft.AspNet.WebApi.WebHost\" version=\"5.0.0\" targetFramework=\"net45\" />\r\n  <package id=\"Newtonsoft.Json\" version=\"5.0.6\" targetFramework=\"net45\" />\r\n</packages>"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.REST.SocialMedia/Discovery.Reccommendations.Followers/BeganFollowingPollingFeedConsumer.cs",
    "content": "﻿using System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Net;\r\nusing System.ServiceModel.Syndication;\r\nusing System.Text;\r\nusing System.Threading;\r\nusing ServiceStack.Text;\r\nusing System.Xml.Linq;\r\nusing System.IO;\r\nusing System.Xml;\r\n\r\nnamespace Discovery.Reccommendations.Followers\r\n{\r\n    public class BeganFollowingPollingFeedConsumer\r\n    {\r\n        const string EntryPointUrl = \"http://localhost:4100/accountmanagement\";\r\n\r\n        private static string LastEventIdProcessed;\r\n\r\n        public static void Main(string[] args)\r\n        {\r\n            // probably not a production quality implementation\r\n            while (true)\r\n            {\r\n                FetchAndProcessNextBatchOfEvents();\r\n                Thread.Sleep(1000);\r\n            }\r\n\r\n        }\r\n\r\n        private static void FetchAndProcessNextBatchOfEvents()\r\n        {\r\n            var atomFeed = FetchFeed();\r\n            var ups = GetUnprocessedEvents(atomFeed.Items.ToList());\r\n\r\n            if (ups.Any())\r\n                ProcessEvents(ups);\r\n            else\r\n                Console.WriteLine(\"No new events to  process\");\r\n        }\r\n\r\n        private static SyndicationFeed FetchFeed()\r\n        {\r\n            using(var wc = new WebClient())\r\n            {\r\n                // get the feed URI from the entry point resource\r\n                var rawEp = wc.DownloadString(EntryPointUrl);\r\n                var hal = JsonSerializer.DeserializeFromString<HALResource>(rawEp);\r\n                var feedUrl = hal._links[\"beganfollowing\"].href;\r\n\r\n                // parse a strongly-typed syndication feed\r\n                var rawFeed = wc.DownloadString(feedUrl);\r\n                var feedXmlReader = XDocument.Parse(rawFeed).CreateReader();\r\n                return SyndicationFeed.Load(feedXmlReader);\r\n            };\r\n        }\r\n\r\n        private static List<SyndicationItem> GetUnprocessedEvents(List<SyndicationItem> events)\r\n        {\r\n            var lastProcessed = events.SingleOrDefault(s => s.Id == LastEventIdProcessed);\r\n            var indexOfLastProcessedEvent = events.IndexOf(lastProcessed);\r\n\r\n            return events.Skip(indexOfLastProcessedEvent + 1).ToList();\r\n        }\r\n\r\n        private static void ProcessEvents(List<SyndicationItem> events)\r\n        {\r\n            foreach (var ev in events)\r\n            {\r\n                var evnt = ParseEvent(ev.Content);\r\n                Console.WriteLine(\"Processing event: \" + evnt.AccountId + \" - \" + evnt.FollowerId);\r\n                // Your domain rules here\r\n                LastEventIdProcessed = ev.Id;\r\n            }\r\n        }\r\n\r\n        private static BeganFollowing ParseEvent(SyndicationContent content)\r\n        {\r\n            // reference to servicestack.text\r\n            var jsonString = ParseFeedContent(content);\r\n            var bf = JsonSerializer.DeserializeFromString<BeganFollowing>(jsonString);\r\n            return bf;\r\n        }\r\n\r\n        private static string ParseFeedContent(SyndicationContent syndicationContent)\r\n        {\r\n            using (var sw = new StringWriter())\r\n            using (var xw = XmlWriter.Create(sw))\r\n            {\r\n                syndicationContent.WriteTo(xw, \"BF\", \"BF\");\r\n                xw.Flush();\r\n\r\n                return XDocument.Parse(sw.ToString()).Root.Value;\r\n            }\r\n        }\r\n    }\r\n\r\n    public class HALResource\r\n    {\r\n        public Dictionary<string, Link> _links { get; set; }\r\n    }\r\n\r\n    public class Link\r\n    {\r\n        public string href { get; set; }\r\n    }\r\n\r\n    public class BeganFollowing\r\n    {\r\n        public string AccountId { get; set; }\r\n        public string FollowerId { get; set; }\r\n    }\r\n\r\n}\r\n"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.REST.SocialMedia/Discovery.Reccommendations.Followers/Discovery.Reccommendations.Followers.csproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Project ToolsVersion=\"12.0\" DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\r\n  <Import Project=\"$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props\" Condition=\"Exists('$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props')\" />\r\n  <PropertyGroup>\r\n    <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>\r\n    <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>\r\n    <ProjectGuid>{FC59B0E6-E709-4440-A857-E9C7F6A6CB8D}</ProjectGuid>\r\n    <OutputType>Exe</OutputType>\r\n    <AppDesignerFolder>Properties</AppDesignerFolder>\r\n    <RootNamespace>Discovery.Reccommendations.Followers</RootNamespace>\r\n    <AssemblyName>Discovery.Reccommendations.Followers</AssemblyName>\r\n    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r\n    <FileAlignment>512</FileAlignment>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' \">\r\n    <DebugSymbols>true</DebugSymbols>\r\n    <DebugType>full</DebugType>\r\n    <Optimize>false</Optimize>\r\n    <OutputPath>bin\\Debug\\</OutputPath>\r\n    <DefineConstants>DEBUG;TRACE</DefineConstants>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <WarningLevel>4</WarningLevel>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' \">\r\n    <DebugType>pdbonly</DebugType>\r\n    <Optimize>true</Optimize>\r\n    <OutputPath>bin\\Release\\</OutputPath>\r\n    <DefineConstants>TRACE</DefineConstants>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <WarningLevel>4</WarningLevel>\r\n  </PropertyGroup>\r\n  <PropertyGroup>\r\n    <StartupObject />\r\n  </PropertyGroup>\r\n  <ItemGroup>\r\n    <Reference Include=\"Newtonsoft.Json\">\r\n      <HintPath>..\\packages\\Newtonsoft.Json.4.5.11\\lib\\net40\\Newtonsoft.Json.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"ServiceStack.Text\">\r\n      <HintPath>..\\packages\\ServiceStack.Text.4.0.15\\lib\\net40\\ServiceStack.Text.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"System\" />\r\n    <Reference Include=\"System.Core\" />\r\n    <Reference Include=\"System.ServiceModel\" />\r\n    <Reference Include=\"System.Xml.Linq\" />\r\n    <Reference Include=\"System.Data.DataSetExtensions\" />\r\n    <Reference Include=\"Microsoft.CSharp\" />\r\n    <Reference Include=\"System.Data\" />\r\n    <Reference Include=\"System.Xml\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <Compile Include=\"BeganFollowingPollingFeedConsumer.cs\" />\r\n    <Compile Include=\"Properties\\AssemblyInfo.cs\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <None Include=\"packages.config\" />\r\n  </ItemGroup>\r\n  <Import Project=\"$(MSBuildToolsPath)\\Microsoft.CSharp.targets\" />\r\n  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \r\n       Other similar extension points exist, see Microsoft.Common.targets.\r\n  <Target Name=\"BeforeBuild\">\r\n  </Target>\r\n  <Target Name=\"AfterBuild\">\r\n  </Target>\r\n  -->\r\n</Project>"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.REST.SocialMedia/Discovery.Reccommendations.Followers/Properties/AssemblyInfo.cs",
    "content": "﻿using System.Reflection;\r\nusing System.Runtime.CompilerServices;\r\nusing System.Runtime.InteropServices;\r\n\r\n// General Information about an assembly is controlled through the following \r\n// set of attributes. Change these attribute values to modify the information\r\n// associated with an assembly.\r\n[assembly: AssemblyTitle(\"Discovery.Reccommendations.Followers\")]\r\n[assembly: AssemblyDescription(\"\")]\r\n[assembly: AssemblyConfiguration(\"\")]\r\n[assembly: AssemblyCompany(\"\")]\r\n[assembly: AssemblyProduct(\"Discovery.Reccommendations.Followers\")]\r\n[assembly: AssemblyCopyright(\"Copyright ©  2014\")]\r\n[assembly: AssemblyTrademark(\"\")]\r\n[assembly: AssemblyCulture(\"\")]\r\n\r\n// Setting ComVisible to false makes the types in this assembly not visible \r\n// to COM components.  If you need to access a type in this assembly from \r\n// COM, set the ComVisible attribute to true on that type.\r\n[assembly: ComVisible(false)]\r\n\r\n// The following GUID is for the ID of the typelib if this project is exposed to COM\r\n[assembly: Guid(\"88bd278e-c021-41ae-a3ab-474d98776aa6\")]\r\n\r\n// Version information for an assembly consists of the following four values:\r\n//\r\n//      Major Version\r\n//      Minor Version \r\n//      Build Number\r\n//      Revision\r\n//\r\n// You can specify all the values or you can default the Build and Revision Numbers \r\n// by using the '*' as shown below:\r\n// [assembly: AssemblyVersion(\"1.0.*\")]\r\n[assembly: AssemblyVersion(\"1.0.0.0\")]\r\n[assembly: AssemblyFileVersion(\"1.0.0.0\")]\r\n"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.REST.SocialMedia/Discovery.Reccommendations.Followers/packages.config",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<packages>\r\n  <package id=\"Newtonsoft.Json\" version=\"4.5.11\" targetFramework=\"net45\" />\r\n  <package id=\"ServiceStack.Text\" version=\"4.0.15\" targetFramework=\"net45\" />\r\n</packages>"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.REST.SocialMedia/PPPDDD.REST.SocialMedia.sln",
    "content": "﻿\nMicrosoft Visual Studio Solution File, Format Version 12.00\n# Visual Studio Express 2013 for Web\nVisualStudioVersion = 12.0.30723.0\nMinimumVisualStudioVersion = 10.0.40219.1\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"AccountManagement.EntryPoint.Api\", \"AccountManagement.EntryPoint\\AccountManagement.EntryPoint.Api.csproj\", \"{66644357-5B60-4E85-9615-5378D400C18D}\"\nEndProject\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"AccountManagement.Accounts.Api\", \"AccountManagement.Accounts.Api\\AccountManagement.Accounts.Api.csproj\", \"{F9B8D9B8-C9C7-4F8B-A75B-39B28A8E7F55}\"\nEndProject\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"AccountManagement.RegularAccounts.BeganFollowing\", \"AccountManagement.RegularAccounts.BeganFollowing\\AccountManagement.RegularAccounts.BeganFollowing.csproj\", \"{8F0F2B7C-755A-468A-836C-8F2101BE8046}\"\nEndProject\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"Discovery.Reccommendations.Followers\", \"Discovery.Reccommendations.Followers\\Discovery.Reccommendations.Followers.csproj\", \"{FC59B0E6-E709-4440-A857-E9C7F6A6CB8D}\"\nEndProject\nProject(\"{2150E333-8FDC-42A3-9474-1A3956D46DE8}\") = \"Account Management Context\", \"Account Management Context\", \"{06F29165-64CB-4F97-A514-9BCEE718EFB8}\"\nEndProject\nProject(\"{2150E333-8FDC-42A3-9474-1A3956D46DE8}\") = \"Discovery Context\", \"Discovery Context\", \"{28CD0E81-04F4-4A5F-A9BB-E2460693833C}\"\nEndProject\nGlobal\n\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\n\t\tDebug|Any CPU = Debug|Any CPU\n\t\tRelease|Any CPU = Release|Any CPU\n\tEndGlobalSection\n\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\n\t\t{66644357-5B60-4E85-9615-5378D400C18D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{66644357-5B60-4E85-9615-5378D400C18D}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{66644357-5B60-4E85-9615-5378D400C18D}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{66644357-5B60-4E85-9615-5378D400C18D}.Release|Any CPU.Build.0 = Release|Any CPU\n\t\t{F9B8D9B8-C9C7-4F8B-A75B-39B28A8E7F55}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{F9B8D9B8-C9C7-4F8B-A75B-39B28A8E7F55}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{F9B8D9B8-C9C7-4F8B-A75B-39B28A8E7F55}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{F9B8D9B8-C9C7-4F8B-A75B-39B28A8E7F55}.Release|Any CPU.Build.0 = Release|Any CPU\n\t\t{8F0F2B7C-755A-468A-836C-8F2101BE8046}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{8F0F2B7C-755A-468A-836C-8F2101BE8046}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{8F0F2B7C-755A-468A-836C-8F2101BE8046}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{8F0F2B7C-755A-468A-836C-8F2101BE8046}.Release|Any CPU.Build.0 = Release|Any CPU\n\t\t{FC59B0E6-E709-4440-A857-E9C7F6A6CB8D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{FC59B0E6-E709-4440-A857-E9C7F6A6CB8D}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{FC59B0E6-E709-4440-A857-E9C7F6A6CB8D}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{FC59B0E6-E709-4440-A857-E9C7F6A6CB8D}.Release|Any CPU.Build.0 = Release|Any CPU\n\tEndGlobalSection\n\tGlobalSection(SolutionProperties) = preSolution\n\t\tHideSolutionNode = FALSE\n\tEndGlobalSection\n\tGlobalSection(NestedProjects) = preSolution\n\t\t{66644357-5B60-4E85-9615-5378D400C18D} = {06F29165-64CB-4F97-A514-9BCEE718EFB8}\n\t\t{F9B8D9B8-C9C7-4F8B-A75B-39B28A8E7F55} = {06F29165-64CB-4F97-A514-9BCEE718EFB8}\n\t\t{8F0F2B7C-755A-468A-836C-8F2101BE8046} = {06F29165-64CB-4F97-A514-9BCEE718EFB8}\n\t\t{FC59B0E6-E709-4440-A857-E9C7F6A6CB8D} = {28CD0E81-04F4-4A5F-A9BB-E2460693833C}\n\tEndGlobalSection\nEndGlobal\n"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.SOAP.SocialMedia/AccountManagement/AccountManagement.csproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Project ToolsVersion=\"12.0\" DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\r\n  <Import Project=\"$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props\" Condition=\"Exists('$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props')\" />\r\n  <PropertyGroup>\r\n    <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>\r\n    <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>\r\n    <ProductVersion>\r\n    </ProductVersion>\r\n    <SchemaVersion>2.0</SchemaVersion>\r\n    <ProjectGuid>{C6E52CD8-14E4-49E4-B35F-1C927D14C7D6}</ProjectGuid>\r\n    <ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>\r\n    <OutputType>Library</OutputType>\r\n    <AppDesignerFolder>Properties</AppDesignerFolder>\r\n    <RootNamespace>AccountManagement</RootNamespace>\r\n    <AssemblyName>AccountManagement</AssemblyName>\r\n    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r\n    <WcfConfigValidationEnabled>True</WcfConfigValidationEnabled>\r\n    <UseIISExpress>true</UseIISExpress>\r\n    <IISExpressSSLPort />\r\n    <IISExpressAnonymousAuthentication />\r\n    <IISExpressWindowsAuthentication />\r\n    <IISExpressUseClassicPipelineMode />\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' \">\r\n    <DebugSymbols>true</DebugSymbols>\r\n    <DebugType>full</DebugType>\r\n    <Optimize>false</Optimize>\r\n    <OutputPath>bin\\</OutputPath>\r\n    <DefineConstants>DEBUG;TRACE</DefineConstants>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <WarningLevel>4</WarningLevel>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' \">\r\n    <DebugType>pdbonly</DebugType>\r\n    <Optimize>true</Optimize>\r\n    <OutputPath>bin\\</OutputPath>\r\n    <DefineConstants>TRACE</DefineConstants>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <WarningLevel>4</WarningLevel>\r\n  </PropertyGroup>\r\n  <ItemGroup>\r\n    <Reference Include=\"Microsoft.CSharp\" />\r\n    <Reference Include=\"System.Web.DynamicData\" />\r\n    <Reference Include=\"System.Web.Entity\" />\r\n    <Reference Include=\"System.Web.ApplicationServices\" />\r\n    <Reference Include=\"System\" />\r\n    <Reference Include=\"System.Configuration\" />\r\n    <Reference Include=\"System.Core\" />\r\n    <Reference Include=\"System.Data\" />\r\n    <Reference Include=\"System.Drawing\" />\r\n    <Reference Include=\"System.EnterpriseServices\" />\r\n    <Reference Include=\"System.Runtime.Serialization\" />\r\n    <Reference Include=\"System.ServiceModel\" />\r\n    <Reference Include=\"System.ServiceModel.Web\" />\r\n    <Reference Include=\"System.Web\" />\r\n    <Reference Include=\"System.Web.Extensions\" />\r\n    <Reference Include=\"System.Web.Services\" />\r\n    <Reference Include=\"System.Xml\" />\r\n    <Reference Include=\"System.Xml.Linq\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <Content Include=\"FollowerDirectory.svc\" />\r\n    <Content Include=\"Web.config\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <Compile Include=\"FollowerDirectory.svc.cs\">\r\n      <DependentUpon>FollowerDirectory.svc</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"IFollowerDirectory.cs\" />\r\n    <Compile Include=\"Properties\\AssemblyInfo.cs\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <Folder Include=\"App_Data\\\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <None Include=\"Web.Debug.config\">\r\n      <DependentUpon>Web.config</DependentUpon>\r\n    </None>\r\n    <None Include=\"Web.Release.config\">\r\n      <DependentUpon>Web.config</DependentUpon>\r\n    </None>\r\n  </ItemGroup>\r\n  <PropertyGroup>\r\n    <VisualStudioVersion Condition=\"'$(VisualStudioVersion)' == ''\">10.0</VisualStudioVersion>\r\n    <VSToolsPath Condition=\"'$(VSToolsPath)' == ''\">$(MSBuildExtensionsPath32)\\Microsoft\\VisualStudio\\v$(VisualStudioVersion)</VSToolsPath>\r\n  </PropertyGroup>\r\n  <Import Project=\"$(MSBuildBinPath)\\Microsoft.CSharp.targets\" />\r\n  <Import Project=\"$(VSToolsPath)\\WebApplications\\Microsoft.WebApplication.targets\" Condition=\"'$(VSToolsPath)' != ''\" />\r\n  <Import Project=\"$(MSBuildExtensionsPath32)\\Microsoft\\VisualStudio\\v10.0\\WebApplications\\Microsoft.WebApplication.targets\" Condition=\"false\" />\r\n  <ProjectExtensions>\r\n    <VisualStudio>\r\n      <FlavorProperties GUID=\"{349c5851-65df-11da-9384-00065b846f21}\">\r\n        <WebProjectProperties>\r\n          <UseIIS>True</UseIIS>\r\n          <AutoAssignPort>True</AutoAssignPort>\r\n          <DevelopmentServerPort>1215</DevelopmentServerPort>\r\n          <DevelopmentServerVPath>/</DevelopmentServerVPath>\r\n          <IISUrl>http://localhost:3100/</IISUrl>\r\n          <NTLMAuthentication>False</NTLMAuthentication>\r\n          <UseCustomServer>False</UseCustomServer>\r\n          <CustomServerUrl>\r\n          </CustomServerUrl>\r\n          <SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>\r\n        </WebProjectProperties>\r\n      </FlavorProperties>\r\n    </VisualStudio>\r\n  </ProjectExtensions>\r\n  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \r\n       Other similar extension points exist, see Microsoft.Common.targets.\r\n  <Target Name=\"BeforeBuild\">\r\n  </Target>\r\n  <Target Name=\"AfterBuild\">\r\n  </Target>\r\n  -->\r\n</Project>"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.SOAP.SocialMedia/AccountManagement/FollowerDirectory.svc",
    "content": "﻿<%@ ServiceHost Language=\"C#\" Debug=\"true\" Service=\"AccountManagement.FollowerDirectory\" CodeBehind=\"FollowerDirectory.svc.cs\" %>\r\n"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.SOAP.SocialMedia/AccountManagement/FollowerDirectory.svc.cs",
    "content": "﻿using System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Runtime.Serialization;\r\nusing System.ServiceModel;\r\n\r\nnamespace AccountManagement\r\n{\r\n    public class FollowerDirectory : IFollowerDirectory\r\n    {\r\n        public List<Follower> FindUsersFollowers(string accountId)\r\n        {\r\n            return GenerateDummyFollowers().ToList();\r\n        }\r\n\r\n        private IEnumerable<Follower> GenerateDummyFollowers()\r\n        {\r\n            for (int i = 0; i < 10; i++)\r\n            {\r\n                yield return new Follower\r\n                {\r\n                    FollowerId = \"follower_\" + i,\r\n                    FollowerName = \"happy follower \" + i,\r\n                    SocialTags = new List<string> { \"programming\", \"DDD\", \"Psychology\" },\r\n                };\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.SOAP.SocialMedia/AccountManagement/IFollowerDirectory.cs",
    "content": "﻿using System;\r\nusing System.Collections.Generic;\r\nusing System.Runtime.Serialization;\r\nusing System.ServiceModel;\r\n\r\nnamespace AccountManagement\r\n{\r\n    [ServiceContract]\r\n    public interface IFollowerDirectory\r\n    {\r\n        [OperationContract]\r\n        List<Follower> FindUsersFollowers(string accountId);\r\n    }\r\n\r\n    public class Follower\r\n    {\r\n        public string FollowerId { get; set; }\r\n\r\n        public string FollowerName { get; set; }\r\n\r\n        public List<string> SocialTags { get; set; }\r\n    }\r\n}\r\n"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.SOAP.SocialMedia/AccountManagement/Properties/AssemblyInfo.cs",
    "content": "﻿using System.Reflection;\r\nusing System.Runtime.CompilerServices;\r\nusing System.Runtime.InteropServices;\r\n\r\n// General Information about an assembly is controlled through the following \r\n// set of attributes. Change these attribute values to modify the information\r\n// associated with an assembly.\r\n[assembly: AssemblyTitle(\"AccountManagement\")]\r\n[assembly: AssemblyDescription(\"\")]\r\n[assembly: AssemblyConfiguration(\"\")]\r\n[assembly: AssemblyCompany(\"\")]\r\n[assembly: AssemblyProduct(\"AccountManagement\")]\r\n[assembly: AssemblyCopyright(\"Copyright ©  2014\")]\r\n[assembly: AssemblyTrademark(\"\")]\r\n[assembly: AssemblyCulture(\"\")]\r\n\r\n// Setting ComVisible to false makes the types in this assembly not visible \r\n// to COM components.  If you need to access a type in this assembly from \r\n// COM, set the ComVisible attribute to true on that type.\r\n[assembly: ComVisible(false)]\r\n\r\n// The following GUID is for the ID of the typelib if this project is exposed to COM\r\n[assembly: Guid(\"745fce01-148e-4ab6-a07a-e908c32c8c7e\")]\r\n\r\n// Version information for an assembly consists of the following four values:\r\n//\r\n//      Major Version\r\n//      Minor Version \r\n//      Build Number\r\n//      Revision\r\n//\r\n// You can specify all the values or you can default the Revision and Build Numbers \r\n// by using the '*' as shown below:\r\n// [assembly: AssemblyVersion(\"1.0.*\")]\r\n[assembly: AssemblyVersion(\"1.0.0.0\")]\r\n[assembly: AssemblyFileVersion(\"1.0.0.0\")]\r\n"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.SOAP.SocialMedia/AccountManagement/Web.Debug.config",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n\r\n<!-- For more information on using web.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 -->\r\n\r\n<configuration xmlns:xdt=\"http://schemas.microsoft.com/XML-Document-Transform\">\r\n  <!--\r\n    In the example below, the \"SetAttributes\" transform will change the value of \r\n    \"connectionString\" to use \"ReleaseSQLServer\" only when the \"Match\" locator \r\n    finds an attribute \"name\" that has a value of \"MyDB\".\r\n    \r\n    <connectionStrings>\r\n      <add name=\"MyDB\" \r\n        connectionString=\"Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True\" \r\n        xdt:Transform=\"SetAttributes\" xdt:Locator=\"Match(name)\"/>\r\n    </connectionStrings>\r\n  -->\r\n  <system.web>\r\n    <!--\r\n      In the example below, the \"Replace\" transform will replace the entire \r\n      <customErrors> section of your web.config file.\r\n      Note that because there is only one customErrors section under the \r\n      <system.web> node, there is no need to use the \"xdt:Locator\" attribute.\r\n      \r\n      <customErrors defaultRedirect=\"GenericError.htm\"\r\n        mode=\"RemoteOnly\" xdt:Transform=\"Replace\">\r\n        <error statusCode=\"500\" redirect=\"InternalError.htm\"/>\r\n      </customErrors>\r\n    -->\r\n  </system.web>\r\n</configuration>"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.SOAP.SocialMedia/AccountManagement/Web.Release.config",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n\r\n<!-- For more information on using web.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 -->\r\n\r\n<configuration xmlns:xdt=\"http://schemas.microsoft.com/XML-Document-Transform\">\r\n  <!--\r\n    In the example below, the \"SetAttributes\" transform will change the value of \r\n    \"connectionString\" to use \"ReleaseSQLServer\" only when the \"Match\" locator \r\n    finds an attribute \"name\" that has a value of \"MyDB\".\r\n    \r\n    <connectionStrings>\r\n      <add name=\"MyDB\" \r\n        connectionString=\"Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True\" \r\n        xdt:Transform=\"SetAttributes\" xdt:Locator=\"Match(name)\"/>\r\n    </connectionStrings>\r\n  -->\r\n  <system.web>\r\n    <compilation xdt:Transform=\"RemoveAttributes(debug)\" />\r\n    <!--\r\n      In the example below, the \"Replace\" transform will replace the entire \r\n      <customErrors> section of your web.config file.\r\n      Note that because there is only one customErrors section under the \r\n      <system.web> node, there is no need to use the \"xdt:Locator\" attribute.\r\n      \r\n      <customErrors defaultRedirect=\"GenericError.htm\"\r\n        mode=\"RemoteOnly\" xdt:Transform=\"Replace\">\r\n        <error statusCode=\"500\" redirect=\"InternalError.htm\"/>\r\n      </customErrors>\r\n    -->\r\n  </system.web>\r\n</configuration>"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.SOAP.SocialMedia/AccountManagement/Web.config",
    "content": "﻿<?xml version=\"1.0\"?>\r\n<configuration>\r\n\r\n  <appSettings>\r\n    <add key=\"aspnet:UseTaskFriendlySynchronizationContext\" value=\"true\" />\r\n  </appSettings>\r\n  <system.web>\r\n    <compilation debug=\"true\" targetFramework=\"4.5\" />\r\n    <httpRuntime targetFramework=\"4.5\"/>\r\n  </system.web>\r\n  <system.serviceModel>\r\n    <behaviors>\r\n      <serviceBehaviors>\r\n        <behavior>\r\n          <!-- To avoid disclosing metadata information, set the values below to false before deployment -->\r\n          <serviceMetadata httpGetEnabled=\"true\" httpsGetEnabled=\"true\"/>\r\n          <!-- To receive exception details in faults for debugging purposes, set the value below to true.  Set to false before deployment to avoid disclosing exception information -->\r\n          <serviceDebug includeExceptionDetailInFaults=\"false\"/>\r\n        </behavior>\r\n      </serviceBehaviors>\r\n    </behaviors>\r\n    <protocolMapping>\r\n        <add binding=\"basicHttpsBinding\" scheme=\"https\" />\r\n    </protocolMapping>    \r\n    <serviceHostingEnvironment aspNetCompatibilityEnabled=\"true\" multipleSiteBindingsEnabled=\"true\" />\r\n  </system.serviceModel>\r\n  <system.webServer>\r\n    <modules runAllManagedModulesForAllRequests=\"true\"/>\r\n    <!--\r\n        To browse web app root directory during debugging, set the value below to true.\r\n        Set to false before deployment to avoid disclosing web app folder information.\r\n      -->\r\n    <directoryBrowse enabled=\"true\"/>\r\n  </system.webServer>\r\n\r\n</configuration>\r\n"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.SOAP.SocialMedia/Discovery/Discovery.csproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Project ToolsVersion=\"12.0\" DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\r\n  <Import Project=\"$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props\" Condition=\"Exists('$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props')\" />\r\n  <PropertyGroup>\r\n    <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>\r\n    <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>\r\n    <ProductVersion>\r\n    </ProductVersion>\r\n    <SchemaVersion>2.0</SchemaVersion>\r\n    <ProjectGuid>{89E0E5EC-0910-4DEB-B2A2-7B3C85C15092}</ProjectGuid>\r\n    <ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>\r\n    <OutputType>Library</OutputType>\r\n    <AppDesignerFolder>Properties</AppDesignerFolder>\r\n    <RootNamespace>Discovery</RootNamespace>\r\n    <AssemblyName>Discovery</AssemblyName>\r\n    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r\n    <WcfConfigValidationEnabled>True</WcfConfigValidationEnabled>\r\n    <UseIISExpress>true</UseIISExpress>\r\n    <IISExpressSSLPort />\r\n    <IISExpressAnonymousAuthentication />\r\n    <IISExpressWindowsAuthentication />\r\n    <IISExpressUseClassicPipelineMode />\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' \">\r\n    <DebugSymbols>true</DebugSymbols>\r\n    <DebugType>full</DebugType>\r\n    <Optimize>false</Optimize>\r\n    <OutputPath>bin\\</OutputPath>\r\n    <DefineConstants>DEBUG;TRACE</DefineConstants>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <WarningLevel>4</WarningLevel>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' \">\r\n    <DebugType>pdbonly</DebugType>\r\n    <Optimize>true</Optimize>\r\n    <OutputPath>bin\\</OutputPath>\r\n    <DefineConstants>TRACE</DefineConstants>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <WarningLevel>4</WarningLevel>\r\n  </PropertyGroup>\r\n  <ItemGroup>\r\n    <Reference Include=\"Microsoft.CSharp\" />\r\n    <Reference Include=\"System.Web.DynamicData\" />\r\n    <Reference Include=\"System.Web.Entity\" />\r\n    <Reference Include=\"System.Web.ApplicationServices\" />\r\n    <Reference Include=\"System\" />\r\n    <Reference Include=\"System.Configuration\" />\r\n    <Reference Include=\"System.Core\" />\r\n    <Reference Include=\"System.Data\" />\r\n    <Reference Include=\"System.Drawing\" />\r\n    <Reference Include=\"System.EnterpriseServices\" />\r\n    <Reference Include=\"System.Runtime.Serialization\" />\r\n    <Reference Include=\"System.ServiceModel\" />\r\n    <Reference Include=\"System.ServiceModel.Web\" />\r\n    <Reference Include=\"System.Web\" />\r\n    <Reference Include=\"System.Web.Extensions\" />\r\n    <Reference Include=\"System.Web.Services\" />\r\n    <Reference Include=\"System.Xml\" />\r\n    <Reference Include=\"System.Xml.Linq\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <Content Include=\"Recommender.svc\" />\r\n    <Content Include=\"Service References\\AccountManagement\\Discovery.AccountManagement.Follower.datasource\">\r\n      <DependentUpon>Reference.svcmap</DependentUpon>\r\n    </Content>\r\n    <None Include=\"Service References\\AccountManagement\\FollowerDirectory.disco\" />\r\n    <None Include=\"Service References\\AccountManagement\\configuration91.svcinfo\" />\r\n    <None Include=\"Service References\\AccountManagement\\configuration.svcinfo\" />\r\n    <None Include=\"Service References\\AccountManagement\\Reference.svcmap\">\r\n      <Generator>WCF Proxy Generator</Generator>\r\n      <LastGenOutput>Reference.cs</LastGenOutput>\r\n    </None>\r\n    <Content Include=\"Web.config\" />\r\n    <None Include=\"Service References\\AccountManagement\\FollowerDirectory2.xsd\" />\r\n    <None Include=\"Service References\\AccountManagement\\FollowerDirectory3.xsd\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <Compile Include=\"IRecommender.cs\" />\r\n    <Compile Include=\"Properties\\AssemblyInfo.cs\" />\r\n    <Compile Include=\"Recommender.svc.cs\">\r\n      <DependentUpon>Recommender.svc</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Service References\\AccountManagement\\Reference.cs\">\r\n      <AutoGen>True</AutoGen>\r\n      <DesignTime>True</DesignTime>\r\n      <DependentUpon>Reference.svcmap</DependentUpon>\r\n    </Compile>\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <Folder Include=\"App_Data\\\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <None Include=\"Service References\\AccountManagement\\FollowerDirectory.wsdl\" />\r\n    <None Include=\"Service References\\AccountManagement\\FollowerDirectory.xsd\" />\r\n    <None Include=\"Service References\\AccountManagement\\FollowerDirectory1.xsd\" />\r\n    <None Include=\"Web.Debug.config\">\r\n      <DependentUpon>Web.config</DependentUpon>\r\n    </None>\r\n    <None Include=\"Web.Release.config\">\r\n      <DependentUpon>Web.config</DependentUpon>\r\n    </None>\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <WCFMetadata Include=\"Service References\\\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <WCFMetadataStorage Include=\"Service References\\AccountManagement\\\" />\r\n  </ItemGroup>\r\n  <PropertyGroup>\r\n    <VisualStudioVersion Condition=\"'$(VisualStudioVersion)' == ''\">10.0</VisualStudioVersion>\r\n    <VSToolsPath Condition=\"'$(VSToolsPath)' == ''\">$(MSBuildExtensionsPath32)\\Microsoft\\VisualStudio\\v$(VisualStudioVersion)</VSToolsPath>\r\n  </PropertyGroup>\r\n  <Import Project=\"$(MSBuildBinPath)\\Microsoft.CSharp.targets\" />\r\n  <Import Project=\"$(VSToolsPath)\\WebApplications\\Microsoft.WebApplication.targets\" Condition=\"'$(VSToolsPath)' != ''\" />\r\n  <Import Project=\"$(MSBuildExtensionsPath32)\\Microsoft\\VisualStudio\\v10.0\\WebApplications\\Microsoft.WebApplication.targets\" Condition=\"false\" />\r\n  <ProjectExtensions>\r\n    <VisualStudio>\r\n      <FlavorProperties GUID=\"{349c5851-65df-11da-9384-00065b846f21}\">\r\n        <WebProjectProperties>\r\n          <UseIIS>True</UseIIS>\r\n          <AutoAssignPort>True</AutoAssignPort>\r\n          <DevelopmentServerPort>1116</DevelopmentServerPort>\r\n          <DevelopmentServerVPath>/</DevelopmentServerVPath>\r\n          <IISUrl>http://localhost:1116/</IISUrl>\r\n          <NTLMAuthentication>False</NTLMAuthentication>\r\n          <UseCustomServer>False</UseCustomServer>\r\n          <CustomServerUrl>\r\n          </CustomServerUrl>\r\n          <SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>\r\n        </WebProjectProperties>\r\n      </FlavorProperties>\r\n    </VisualStudio>\r\n  </ProjectExtensions>\r\n  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \r\n       Other similar extension points exist, see Microsoft.Common.targets.\r\n  <Target Name=\"BeforeBuild\">\r\n  </Target>\r\n  <Target Name=\"AfterBuild\">\r\n  </Target>\r\n  -->\r\n</Project>"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.SOAP.SocialMedia/Discovery/IRecommender.cs",
    "content": "﻿using System;\r\nusing System.Collections.Generic;\r\nusing System.Runtime.Serialization;\r\nusing System.ServiceModel;\r\n\r\nnamespace Discovery\r\n{\r\n    [ServiceContract]\r\n    public interface IRecommender\r\n    {\r\n        [OperationContract]\r\n        List<string> GetRecommendedUsers(string accountId);\r\n    }\r\n}\r\n"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.SOAP.SocialMedia/Discovery/Properties/AssemblyInfo.cs",
    "content": "﻿using System.Reflection;\r\nusing System.Runtime.CompilerServices;\r\nusing System.Runtime.InteropServices;\r\n\r\n// General Information about an assembly is controlled through the following \r\n// set of attributes. Change these attribute values to modify the information\r\n// associated with an assembly.\r\n[assembly: AssemblyTitle(\"Discovery\")]\r\n[assembly: AssemblyDescription(\"\")]\r\n[assembly: AssemblyConfiguration(\"\")]\r\n[assembly: AssemblyCompany(\"\")]\r\n[assembly: AssemblyProduct(\"Discovery\")]\r\n[assembly: AssemblyCopyright(\"Copyright ©  2014\")]\r\n[assembly: AssemblyTrademark(\"\")]\r\n[assembly: AssemblyCulture(\"\")]\r\n\r\n// Setting ComVisible to false makes the types in this assembly not visible \r\n// to COM components.  If you need to access a type in this assembly from \r\n// COM, set the ComVisible attribute to true on that type.\r\n[assembly: ComVisible(false)]\r\n\r\n// The following GUID is for the ID of the typelib if this project is exposed to COM\r\n[assembly: Guid(\"e99a259f-2e12-4f4b-9806-b04815f46101\")]\r\n\r\n// Version information for an assembly consists of the following four values:\r\n//\r\n//      Major Version\r\n//      Minor Version \r\n//      Build Number\r\n//      Revision\r\n//\r\n// You can specify all the values or you can default the Revision and Build Numbers \r\n// by using the '*' as shown below:\r\n// [assembly: AssemblyVersion(\"1.0.*\")]\r\n[assembly: AssemblyVersion(\"1.0.0.0\")]\r\n[assembly: AssemblyFileVersion(\"1.0.0.0\")]\r\n"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.SOAP.SocialMedia/Discovery/Recommender.svc",
    "content": "﻿<%@ ServiceHost Language=\"C#\" Debug=\"true\" Service=\"Discovery.Recommender\" CodeBehind=\"Recommender.svc.cs\" %>\r\n"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.SOAP.SocialMedia/Discovery/Recommender.svc.cs",
    "content": "﻿using System;\r\nusing System.Linq;\r\nusing System.Collections.Generic;\r\nusing Discovery.AccountManagement;\r\n\r\nnamespace Discovery\r\n{\r\n    public class Recommender : IRecommender\r\n    {\r\n        public List<string> GetRecommendedUsers(string accountId)\r\n        {\r\n            var accountManagementBC = new AccountManagement.FollowerDirectoryClient();\r\n            var followers = accountManagementBC.FindUsersFollowers(accountId);\r\n            return FindRecommendedUsersBasedOnSocialTags(followers);\r\n        }\r\n\r\n        private List<string> FindRecommendedUsersBasedOnSocialTags(Follower[] followers)\r\n        {\r\n            /*\r\n             * Real system would look at the users tags and find \r\n             * popular accounts with similar tags by making more \r\n             * RPC calls.\r\n             */\r\n            var tags = followers.SelectMany(f => f.SocialTags).Distinct();\r\n            return tags.Select(t => t + \"_user_1\").ToList();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.SOAP.SocialMedia/Discovery/Service References/AccountManagement/Discovery.AccountManagement.Follower.datasource",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<!--\r\n    This file is automatically generated by Visual Studio .Net. It is \r\n    used to store generic object data source configuration information.  \r\n    Renaming the file extension or editing the content of this file may   \r\n    cause the file to be unrecognizable by the program.\r\n-->\r\n<GenericObjectDataSource DisplayName=\"Follower\" Version=\"1.0\" xmlns=\"urn:schemas-microsoft-com:xml-msdatasource\">\r\n   <TypeInfo>Discovery.AccountManagement.Follower, Service References.AccountManagement.Reference.cs, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</TypeInfo>\r\n</GenericObjectDataSource>"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.SOAP.SocialMedia/Discovery/Service References/AccountManagement/FollowerDirectory.disco",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<discovery xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns=\"http://schemas.xmlsoap.org/disco/\">\r\n  <contractRef ref=\"http://localhost:3100/FollowerDirectory.svc?wsdl\" docRef=\"http://localhost:3100/FollowerDirectory.svc\" xmlns=\"http://schemas.xmlsoap.org/disco/scl/\" />\r\n</discovery>"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.SOAP.SocialMedia/Discovery/Service References/AccountManagement/FollowerDirectory.wsdl",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<wsdl:definitions xmlns:wsap=\"http://schemas.xmlsoap.org/ws/2004/08/addressing/policy\" xmlns:wsa10=\"http://www.w3.org/2005/08/addressing\" xmlns:tns=\"http://tempuri.org/\" xmlns:msc=\"http://schemas.microsoft.com/ws/2005/12/wsdl/contract\" xmlns:soapenc=\"http://schemas.xmlsoap.org/soap/encoding/\" xmlns:wsx=\"http://schemas.xmlsoap.org/ws/2004/09/mex\" xmlns:wsp=\"http://schemas.xmlsoap.org/ws/2004/09/policy\" xmlns:wsam=\"http://www.w3.org/2007/05/addressing/metadata\" xmlns:wsa=\"http://schemas.xmlsoap.org/ws/2004/08/addressing\" xmlns:soap12=\"http://schemas.xmlsoap.org/wsdl/soap12/\" xmlns:wsaw=\"http://www.w3.org/2006/05/addressing/wsdl\" xmlns:soap=\"http://schemas.xmlsoap.org/wsdl/soap/\" xmlns:wsu=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" name=\"FollowerDirectory\" targetNamespace=\"http://tempuri.org/\" xmlns:wsdl=\"http://schemas.xmlsoap.org/wsdl/\">\r\n  <wsdl:types>\r\n    <xsd:schema targetNamespace=\"http://tempuri.org/Imports\">\r\n      <xsd:import schemaLocation=\"http://localhost:3100/FollowerDirectory.svc?xsd=xsd0\" namespace=\"http://tempuri.org/\" />\r\n      <xsd:import schemaLocation=\"http://localhost:3100/FollowerDirectory.svc?xsd=xsd1\" namespace=\"http://schemas.microsoft.com/2003/10/Serialization/\" />\r\n      <xsd:import schemaLocation=\"http://localhost:3100/FollowerDirectory.svc?xsd=xsd2\" namespace=\"http://schemas.datacontract.org/2004/07/AccountManagement\" />\r\n      <xsd:import schemaLocation=\"http://localhost:3100/FollowerDirectory.svc?xsd=xsd3\" namespace=\"http://schemas.microsoft.com/2003/10/Serialization/Arrays\" />\r\n    </xsd:schema>\r\n  </wsdl:types>\r\n  <wsdl:message name=\"IFollowerDirectory_FindUsersFollowers_InputMessage\">\r\n    <wsdl:part name=\"parameters\" element=\"tns:FindUsersFollowers\" />\r\n  </wsdl:message>\r\n  <wsdl:message name=\"IFollowerDirectory_FindUsersFollowers_OutputMessage\">\r\n    <wsdl:part name=\"parameters\" element=\"tns:FindUsersFollowersResponse\" />\r\n  </wsdl:message>\r\n  <wsdl:portType name=\"IFollowerDirectory\">\r\n    <wsdl:operation name=\"FindUsersFollowers\">\r\n      <wsdl:input wsaw:Action=\"http://tempuri.org/IFollowerDirectory/FindUsersFollowers\" message=\"tns:IFollowerDirectory_FindUsersFollowers_InputMessage\" />\r\n      <wsdl:output wsaw:Action=\"http://tempuri.org/IFollowerDirectory/FindUsersFollowersResponse\" message=\"tns:IFollowerDirectory_FindUsersFollowers_OutputMessage\" />\r\n    </wsdl:operation>\r\n  </wsdl:portType>\r\n  <wsdl:binding name=\"BasicHttpBinding_IFollowerDirectory\" type=\"tns:IFollowerDirectory\">\r\n    <soap:binding transport=\"http://schemas.xmlsoap.org/soap/http\" />\r\n    <wsdl:operation name=\"FindUsersFollowers\">\r\n      <soap:operation soapAction=\"http://tempuri.org/IFollowerDirectory/FindUsersFollowers\" style=\"document\" />\r\n      <wsdl:input>\r\n        <soap:body use=\"literal\" />\r\n      </wsdl:input>\r\n      <wsdl:output>\r\n        <soap:body use=\"literal\" />\r\n      </wsdl:output>\r\n    </wsdl:operation>\r\n  </wsdl:binding>\r\n  <wsdl:service name=\"FollowerDirectory\">\r\n    <wsdl:port name=\"BasicHttpBinding_IFollowerDirectory\" binding=\"tns:BasicHttpBinding_IFollowerDirectory\">\r\n      <soap:address location=\"http://localhost:3100/FollowerDirectory.svc\" />\r\n    </wsdl:port>\r\n  </wsdl:service>\r\n</wsdl:definitions>"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.SOAP.SocialMedia/Discovery/Service References/AccountManagement/FollowerDirectory.xsd",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<xs:schema xmlns:tns=\"http://schemas.datacontract.org/2004/07/AccountManagement\" elementFormDefault=\"qualified\" targetNamespace=\"http://schemas.datacontract.org/2004/07/AccountManagement\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\">\r\n  <xs:import schemaLocation=\"http://localhost:3100/FollowerDirectory.svc?xsd=xsd3\" namespace=\"http://schemas.microsoft.com/2003/10/Serialization/Arrays\" />\r\n  <xs:complexType name=\"ArrayOfFollower\">\r\n    <xs:sequence>\r\n      <xs:element minOccurs=\"0\" maxOccurs=\"unbounded\" name=\"Follower\" nillable=\"true\" type=\"tns:Follower\" />\r\n    </xs:sequence>\r\n  </xs:complexType>\r\n  <xs:element name=\"ArrayOfFollower\" nillable=\"true\" type=\"tns:ArrayOfFollower\" />\r\n  <xs:complexType name=\"Follower\">\r\n    <xs:sequence>\r\n      <xs:element minOccurs=\"0\" name=\"FollowerId\" nillable=\"true\" type=\"xs:string\" />\r\n      <xs:element minOccurs=\"0\" name=\"FollowerName\" nillable=\"true\" type=\"xs:string\" />\r\n      <xs:element xmlns:q1=\"http://schemas.microsoft.com/2003/10/Serialization/Arrays\" minOccurs=\"0\" name=\"SocialTags\" nillable=\"true\" type=\"q1:ArrayOfstring\" />\r\n    </xs:sequence>\r\n  </xs:complexType>\r\n  <xs:element name=\"Follower\" nillable=\"true\" type=\"tns:Follower\" />\r\n</xs:schema>"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.SOAP.SocialMedia/Discovery/Service References/AccountManagement/FollowerDirectory1.xsd",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<xs:schema xmlns:tns=\"http://schemas.microsoft.com/2003/10/Serialization/\" attributeFormDefault=\"qualified\" elementFormDefault=\"qualified\" targetNamespace=\"http://schemas.microsoft.com/2003/10/Serialization/\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\">\r\n  <xs:element name=\"anyType\" nillable=\"true\" type=\"xs:anyType\" />\r\n  <xs:element name=\"anyURI\" nillable=\"true\" type=\"xs:anyURI\" />\r\n  <xs:element name=\"base64Binary\" nillable=\"true\" type=\"xs:base64Binary\" />\r\n  <xs:element name=\"boolean\" nillable=\"true\" type=\"xs:boolean\" />\r\n  <xs:element name=\"byte\" nillable=\"true\" type=\"xs:byte\" />\r\n  <xs:element name=\"dateTime\" nillable=\"true\" type=\"xs:dateTime\" />\r\n  <xs:element name=\"decimal\" nillable=\"true\" type=\"xs:decimal\" />\r\n  <xs:element name=\"double\" nillable=\"true\" type=\"xs:double\" />\r\n  <xs:element name=\"float\" nillable=\"true\" type=\"xs:float\" />\r\n  <xs:element name=\"int\" nillable=\"true\" type=\"xs:int\" />\r\n  <xs:element name=\"long\" nillable=\"true\" type=\"xs:long\" />\r\n  <xs:element name=\"QName\" nillable=\"true\" type=\"xs:QName\" />\r\n  <xs:element name=\"short\" nillable=\"true\" type=\"xs:short\" />\r\n  <xs:element name=\"string\" nillable=\"true\" type=\"xs:string\" />\r\n  <xs:element name=\"unsignedByte\" nillable=\"true\" type=\"xs:unsignedByte\" />\r\n  <xs:element name=\"unsignedInt\" nillable=\"true\" type=\"xs:unsignedInt\" />\r\n  <xs:element name=\"unsignedLong\" nillable=\"true\" type=\"xs:unsignedLong\" />\r\n  <xs:element name=\"unsignedShort\" nillable=\"true\" type=\"xs:unsignedShort\" />\r\n  <xs:element name=\"char\" nillable=\"true\" type=\"tns:char\" />\r\n  <xs:simpleType name=\"char\">\r\n    <xs:restriction base=\"xs:int\" />\r\n  </xs:simpleType>\r\n  <xs:element name=\"duration\" nillable=\"true\" type=\"tns:duration\" />\r\n  <xs:simpleType name=\"duration\">\r\n    <xs:restriction base=\"xs:duration\">\r\n      <xs:pattern value=\"\\-?P(\\d*D)?(T(\\d*H)?(\\d*M)?(\\d*(\\.\\d*)?S)?)?\" />\r\n      <xs:minInclusive value=\"-P10675199DT2H48M5.4775808S\" />\r\n      <xs:maxInclusive value=\"P10675199DT2H48M5.4775807S\" />\r\n    </xs:restriction>\r\n  </xs:simpleType>\r\n  <xs:element name=\"guid\" nillable=\"true\" type=\"tns:guid\" />\r\n  <xs:simpleType name=\"guid\">\r\n    <xs:restriction base=\"xs:string\">\r\n      <xs:pattern value=\"[\\da-fA-F]{8}-[\\da-fA-F]{4}-[\\da-fA-F]{4}-[\\da-fA-F]{4}-[\\da-fA-F]{12}\" />\r\n    </xs:restriction>\r\n  </xs:simpleType>\r\n  <xs:attribute name=\"FactoryType\" type=\"xs:QName\" />\r\n  <xs:attribute name=\"Id\" type=\"xs:ID\" />\r\n  <xs:attribute name=\"Ref\" type=\"xs:IDREF\" />\r\n</xs:schema>"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.SOAP.SocialMedia/Discovery/Service References/AccountManagement/FollowerDirectory2.xsd",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<xs:schema xmlns:tns=\"http://schemas.microsoft.com/2003/10/Serialization/Arrays\" elementFormDefault=\"qualified\" targetNamespace=\"http://schemas.microsoft.com/2003/10/Serialization/Arrays\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\">\r\n  <xs:complexType name=\"ArrayOfstring\">\r\n    <xs:sequence>\r\n      <xs:element minOccurs=\"0\" maxOccurs=\"unbounded\" name=\"string\" nillable=\"true\" type=\"xs:string\" />\r\n    </xs:sequence>\r\n  </xs:complexType>\r\n  <xs:element name=\"ArrayOfstring\" nillable=\"true\" type=\"tns:ArrayOfstring\" />\r\n</xs:schema>"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.SOAP.SocialMedia/Discovery/Service References/AccountManagement/FollowerDirectory3.xsd",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<xs:schema xmlns:tns=\"http://tempuri.org/\" elementFormDefault=\"qualified\" targetNamespace=\"http://tempuri.org/\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\">\r\n  <xs:import schemaLocation=\"http://localhost:3100/FollowerDirectory.svc?xsd=xsd2\" namespace=\"http://schemas.datacontract.org/2004/07/AccountManagement\" />\r\n  <xs:element name=\"FindUsersFollowers\">\r\n    <xs:complexType>\r\n      <xs:sequence>\r\n        <xs:element minOccurs=\"0\" name=\"accountId\" nillable=\"true\" type=\"xs:string\" />\r\n      </xs:sequence>\r\n    </xs:complexType>\r\n  </xs:element>\r\n  <xs:element name=\"FindUsersFollowersResponse\">\r\n    <xs:complexType>\r\n      <xs:sequence>\r\n        <xs:element xmlns:q1=\"http://schemas.datacontract.org/2004/07/AccountManagement\" minOccurs=\"0\" name=\"FindUsersFollowersResult\" nillable=\"true\" type=\"q1:ArrayOfFollower\" />\r\n      </xs:sequence>\r\n    </xs:complexType>\r\n  </xs:element>\r\n</xs:schema>"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.SOAP.SocialMedia/Discovery/Service References/AccountManagement/Reference.cs",
    "content": "﻿//------------------------------------------------------------------------------\r\n// <auto-generated>\r\n//     This code was generated by a tool.\r\n//     Runtime Version:4.0.30319.34011\r\n//\r\n//     Changes to this file may cause incorrect behavior and will be lost if\r\n//     the code is regenerated.\r\n// </auto-generated>\r\n//------------------------------------------------------------------------------\r\n\r\nnamespace Discovery.AccountManagement {\r\n    using System.Runtime.Serialization;\r\n    using System;\r\n    \r\n    \r\n    [System.Diagnostics.DebuggerStepThroughAttribute()]\r\n    [System.CodeDom.Compiler.GeneratedCodeAttribute(\"System.Runtime.Serialization\", \"4.0.0.0\")]\r\n    [System.Runtime.Serialization.DataContractAttribute(Name=\"Follower\", Namespace=\"http://schemas.datacontract.org/2004/07/AccountManagement\")]\r\n    [System.SerializableAttribute()]\r\n    public partial class Follower : object, System.Runtime.Serialization.IExtensibleDataObject, System.ComponentModel.INotifyPropertyChanged {\r\n        \r\n        [System.NonSerializedAttribute()]\r\n        private System.Runtime.Serialization.ExtensionDataObject extensionDataField;\r\n        \r\n        [System.Runtime.Serialization.OptionalFieldAttribute()]\r\n        private string FollowerIdField;\r\n        \r\n        [System.Runtime.Serialization.OptionalFieldAttribute()]\r\n        private string FollowerNameField;\r\n        \r\n        [System.Runtime.Serialization.OptionalFieldAttribute()]\r\n        private string[] SocialTagsField;\r\n        \r\n        [global::System.ComponentModel.BrowsableAttribute(false)]\r\n        public System.Runtime.Serialization.ExtensionDataObject ExtensionData {\r\n            get {\r\n                return this.extensionDataField;\r\n            }\r\n            set {\r\n                this.extensionDataField = value;\r\n            }\r\n        }\r\n        \r\n        [System.Runtime.Serialization.DataMemberAttribute()]\r\n        public string FollowerId {\r\n            get {\r\n                return this.FollowerIdField;\r\n            }\r\n            set {\r\n                if ((object.ReferenceEquals(this.FollowerIdField, value) != true)) {\r\n                    this.FollowerIdField = value;\r\n                    this.RaisePropertyChanged(\"FollowerId\");\r\n                }\r\n            }\r\n        }\r\n        \r\n        [System.Runtime.Serialization.DataMemberAttribute()]\r\n        public string FollowerName {\r\n            get {\r\n                return this.FollowerNameField;\r\n            }\r\n            set {\r\n                if ((object.ReferenceEquals(this.FollowerNameField, value) != true)) {\r\n                    this.FollowerNameField = value;\r\n                    this.RaisePropertyChanged(\"FollowerName\");\r\n                }\r\n            }\r\n        }\r\n        \r\n        [System.Runtime.Serialization.DataMemberAttribute()]\r\n        public string[] SocialTags {\r\n            get {\r\n                return this.SocialTagsField;\r\n            }\r\n            set {\r\n                if ((object.ReferenceEquals(this.SocialTagsField, value) != true)) {\r\n                    this.SocialTagsField = value;\r\n                    this.RaisePropertyChanged(\"SocialTags\");\r\n                }\r\n            }\r\n        }\r\n        \r\n        public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;\r\n        \r\n        protected void RaisePropertyChanged(string propertyName) {\r\n            System.ComponentModel.PropertyChangedEventHandler propertyChanged = this.PropertyChanged;\r\n            if ((propertyChanged != null)) {\r\n                propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName));\r\n            }\r\n        }\r\n    }\r\n    \r\n    [System.CodeDom.Compiler.GeneratedCodeAttribute(\"System.ServiceModel\", \"4.0.0.0\")]\r\n    [System.ServiceModel.ServiceContractAttribute(ConfigurationName=\"AccountManagement.IFollowerDirectory\")]\r\n    public interface IFollowerDirectory {\r\n        \r\n        [System.ServiceModel.OperationContractAttribute(Action=\"http://tempuri.org/IFollowerDirectory/FindUsersFollowers\", ReplyAction=\"http://tempuri.org/IFollowerDirectory/FindUsersFollowersResponse\")]\r\n        Discovery.AccountManagement.Follower[] FindUsersFollowers(string accountId);\r\n        \r\n        [System.ServiceModel.OperationContractAttribute(Action=\"http://tempuri.org/IFollowerDirectory/FindUsersFollowers\", ReplyAction=\"http://tempuri.org/IFollowerDirectory/FindUsersFollowersResponse\")]\r\n        System.Threading.Tasks.Task<Discovery.AccountManagement.Follower[]> FindUsersFollowersAsync(string accountId);\r\n    }\r\n    \r\n    [System.CodeDom.Compiler.GeneratedCodeAttribute(\"System.ServiceModel\", \"4.0.0.0\")]\r\n    public interface IFollowerDirectoryChannel : Discovery.AccountManagement.IFollowerDirectory, System.ServiceModel.IClientChannel {\r\n    }\r\n    \r\n    [System.Diagnostics.DebuggerStepThroughAttribute()]\r\n    [System.CodeDom.Compiler.GeneratedCodeAttribute(\"System.ServiceModel\", \"4.0.0.0\")]\r\n    public partial class FollowerDirectoryClient : System.ServiceModel.ClientBase<Discovery.AccountManagement.IFollowerDirectory>, Discovery.AccountManagement.IFollowerDirectory {\r\n        \r\n        public FollowerDirectoryClient() {\r\n        }\r\n        \r\n        public FollowerDirectoryClient(string endpointConfigurationName) : \r\n                base(endpointConfigurationName) {\r\n        }\r\n        \r\n        public FollowerDirectoryClient(string endpointConfigurationName, string remoteAddress) : \r\n                base(endpointConfigurationName, remoteAddress) {\r\n        }\r\n        \r\n        public FollowerDirectoryClient(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) : \r\n                base(endpointConfigurationName, remoteAddress) {\r\n        }\r\n        \r\n        public FollowerDirectoryClient(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) : \r\n                base(binding, remoteAddress) {\r\n        }\r\n        \r\n        public Discovery.AccountManagement.Follower[] FindUsersFollowers(string accountId) {\r\n            return base.Channel.FindUsersFollowers(accountId);\r\n        }\r\n        \r\n        public System.Threading.Tasks.Task<Discovery.AccountManagement.Follower[]> FindUsersFollowersAsync(string accountId) {\r\n            return base.Channel.FindUsersFollowersAsync(accountId);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.SOAP.SocialMedia/Discovery/Service References/AccountManagement/Reference.svcmap",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<ReferenceGroup xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" ID=\"ea8f9dcc-d2d4-40de-bc30-b0009feb01c5\" xmlns=\"urn:schemas-microsoft-com:xml-wcfservicemap\">\r\n  <ClientOptions>\r\n    <GenerateAsynchronousMethods>false</GenerateAsynchronousMethods>\r\n    <GenerateTaskBasedAsynchronousMethod>true</GenerateTaskBasedAsynchronousMethod>\r\n    <EnableDataBinding>true</EnableDataBinding>\r\n    <ExcludedTypes />\r\n    <ImportXmlTypes>false</ImportXmlTypes>\r\n    <GenerateInternalTypes>false</GenerateInternalTypes>\r\n    <GenerateMessageContracts>false</GenerateMessageContracts>\r\n    <NamespaceMappings />\r\n    <CollectionMappings />\r\n    <GenerateSerializableTypes>true</GenerateSerializableTypes>\r\n    <Serializer>Auto</Serializer>\r\n    <UseSerializerForFaults>true</UseSerializerForFaults>\r\n    <ReferenceAllAssemblies>true</ReferenceAllAssemblies>\r\n    <ReferencedAssemblies />\r\n    <ReferencedDataContractTypes />\r\n    <ServiceContractMappings />\r\n  </ClientOptions>\r\n  <MetadataSources>\r\n    <MetadataSource Address=\"http://localhost:3100/FollowerDirectory.svc\" Protocol=\"http\" SourceId=\"1\" />\r\n  </MetadataSources>\r\n  <Metadata>\r\n    <MetadataFile FileName=\"FollowerDirectory.xsd\" MetadataType=\"Schema\" ID=\"746555dc-5e15-4053-bf3a-ab352c92bb5c\" SourceId=\"1\" SourceUrl=\"http://localhost:3100/FollowerDirectory.svc?xsd=xsd2\" />\r\n    <MetadataFile FileName=\"FollowerDirectory.wsdl\" MetadataType=\"Wsdl\" ID=\"4759b466-8efc-4aa3-8aa9-d762a571edef\" SourceId=\"1\" SourceUrl=\"http://localhost:3100/FollowerDirectory.svc?wsdl\" />\r\n    <MetadataFile FileName=\"FollowerDirectory1.xsd\" MetadataType=\"Schema\" ID=\"31f8dab8-9c5c-4167-9d30-af579d1d1a1c\" SourceId=\"1\" SourceUrl=\"http://localhost:3100/FollowerDirectory.svc?xsd=xsd1\" />\r\n    <MetadataFile FileName=\"FollowerDirectory.disco\" MetadataType=\"Disco\" ID=\"18e7a042-6928-4f9c-8ca1-8e6114626826\" SourceId=\"1\" SourceUrl=\"http://localhost:3100/FollowerDirectory.svc?disco\" />\r\n    <MetadataFile FileName=\"FollowerDirectory2.xsd\" MetadataType=\"Schema\" ID=\"229e27f1-b33f-4c27-bace-11b376e44133\" SourceId=\"1\" SourceUrl=\"http://localhost:3100/FollowerDirectory.svc?xsd=xsd3\" />\r\n    <MetadataFile FileName=\"FollowerDirectory3.xsd\" MetadataType=\"Schema\" ID=\"a6466f23-d2b5-4a60-829c-5ba95646cf99\" SourceId=\"1\" SourceUrl=\"http://localhost:3100/FollowerDirectory.svc?xsd=xsd0\" />\r\n  </Metadata>\r\n  <Extensions>\r\n    <ExtensionFile FileName=\"configuration91.svcinfo\" Name=\"configuration91.svcinfo\" />\r\n    <ExtensionFile FileName=\"configuration.svcinfo\" Name=\"configuration.svcinfo\" />\r\n  </Extensions>\r\n</ReferenceGroup>"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.SOAP.SocialMedia/Discovery/Service References/AccountManagement/configuration.svcinfo",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<configurationSnapshot xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns=\"urn:schemas-microsoft-com:xml-wcfconfigurationsnapshot\">\r\n  <behaviors />\r\n  <bindings>\r\n    <binding digest=\"System.ServiceModel.Configuration.BasicHttpBindingElement, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089:&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-16&quot;?&gt;&lt;Data name=&quot;BasicHttpBinding_IFollowerDirectory&quot; /&gt;\" bindingType=\"basicHttpBinding\" name=\"BasicHttpBinding_IFollowerDirectory\" />\r\n  </bindings>\r\n  <endpoints>\r\n    <endpoint normalizedDigest=\"&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-16&quot;?&gt;&lt;Data address=&quot;http://localhost:3100/FollowerDirectory.svc&quot; binding=&quot;basicHttpBinding&quot; bindingConfiguration=&quot;BasicHttpBinding_IFollowerDirectory&quot; contract=&quot;AccountManagement.IFollowerDirectory&quot; name=&quot;BasicHttpBinding_IFollowerDirectory&quot; /&gt;\" digest=\"&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-16&quot;?&gt;&lt;Data address=&quot;http://localhost:3100/FollowerDirectory.svc&quot; binding=&quot;basicHttpBinding&quot; bindingConfiguration=&quot;BasicHttpBinding_IFollowerDirectory&quot; contract=&quot;AccountManagement.IFollowerDirectory&quot; name=&quot;BasicHttpBinding_IFollowerDirectory&quot; /&gt;\" contractName=\"AccountManagement.IFollowerDirectory\" name=\"BasicHttpBinding_IFollowerDirectory\" />\r\n  </endpoints>\r\n</configurationSnapshot>"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.SOAP.SocialMedia/Discovery/Service References/AccountManagement/configuration91.svcinfo",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<SavedWcfConfigurationInformation xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" Version=\"9.1\" CheckSum=\"cLvX2JblOKnOktGjk1cDaRuivPY=\">\r\n  <bindingConfigurations>\r\n    <bindingConfiguration bindingType=\"basicHttpBinding\" name=\"BasicHttpBinding_IFollowerDirectory\">\r\n      <properties>\r\n        <property path=\"/name\" isComplexType=\"false\" isExplicitlyDefined=\"true\" clrType=\"System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\">\r\n          <serializedValue>BasicHttpBinding_IFollowerDirectory</serializedValue>\r\n        </property>\r\n        <property path=\"/closeTimeout\" isComplexType=\"false\" isExplicitlyDefined=\"true\" clrType=\"System.TimeSpan, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\">\r\n          <serializedValue />\r\n        </property>\r\n        <property path=\"/openTimeout\" isComplexType=\"false\" isExplicitlyDefined=\"true\" clrType=\"System.TimeSpan, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\">\r\n          <serializedValue />\r\n        </property>\r\n        <property path=\"/receiveTimeout\" isComplexType=\"false\" isExplicitlyDefined=\"true\" clrType=\"System.TimeSpan, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\">\r\n          <serializedValue />\r\n        </property>\r\n        <property path=\"/sendTimeout\" isComplexType=\"false\" isExplicitlyDefined=\"true\" clrType=\"System.TimeSpan, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\">\r\n          <serializedValue />\r\n        </property>\r\n        <property path=\"/allowCookies\" isComplexType=\"false\" isExplicitlyDefined=\"true\" clrType=\"System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\">\r\n          <serializedValue />\r\n        </property>\r\n        <property path=\"/bypassProxyOnLocal\" isComplexType=\"false\" isExplicitlyDefined=\"true\" clrType=\"System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\">\r\n          <serializedValue />\r\n        </property>\r\n        <property path=\"/hostNameComparisonMode\" isComplexType=\"false\" isExplicitlyDefined=\"false\" clrType=\"System.ServiceModel.HostNameComparisonMode, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\">\r\n          <serializedValue>StrongWildcard</serializedValue>\r\n        </property>\r\n        <property path=\"/maxBufferPoolSize\" isComplexType=\"false\" isExplicitlyDefined=\"true\" clrType=\"System.Int64, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\">\r\n          <serializedValue />\r\n        </property>\r\n        <property path=\"/maxBufferSize\" isComplexType=\"false\" isExplicitlyDefined=\"false\" clrType=\"System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\">\r\n          <serializedValue>65536</serializedValue>\r\n        </property>\r\n        <property path=\"/maxReceivedMessageSize\" isComplexType=\"false\" isExplicitlyDefined=\"true\" clrType=\"System.Int64, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\">\r\n          <serializedValue />\r\n        </property>\r\n        <property path=\"/proxyAddress\" isComplexType=\"false\" isExplicitlyDefined=\"false\" clrType=\"System.Uri, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\">\r\n          <serializedValue />\r\n        </property>\r\n        <property path=\"/readerQuotas\" isComplexType=\"true\" isExplicitlyDefined=\"false\" clrType=\"System.ServiceModel.Configuration.XmlDictionaryReaderQuotasElement, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\">\r\n          <serializedValue>System.ServiceModel.Configuration.XmlDictionaryReaderQuotasElement</serializedValue>\r\n        </property>\r\n        <property path=\"/readerQuotas/maxDepth\" isComplexType=\"false\" isExplicitlyDefined=\"false\" clrType=\"System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\">\r\n          <serializedValue>0</serializedValue>\r\n        </property>\r\n        <property path=\"/readerQuotas/maxStringContentLength\" isComplexType=\"false\" isExplicitlyDefined=\"false\" clrType=\"System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\">\r\n          <serializedValue>0</serializedValue>\r\n        </property>\r\n        <property path=\"/readerQuotas/maxArrayLength\" isComplexType=\"false\" isExplicitlyDefined=\"false\" clrType=\"System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\">\r\n          <serializedValue>0</serializedValue>\r\n        </property>\r\n        <property path=\"/readerQuotas/maxBytesPerRead\" isComplexType=\"false\" isExplicitlyDefined=\"false\" clrType=\"System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\">\r\n          <serializedValue>0</serializedValue>\r\n        </property>\r\n        <property path=\"/readerQuotas/maxNameTableCharCount\" isComplexType=\"false\" isExplicitlyDefined=\"false\" clrType=\"System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\">\r\n          <serializedValue>0</serializedValue>\r\n        </property>\r\n        <property path=\"/textEncoding\" isComplexType=\"false\" isExplicitlyDefined=\"false\" clrType=\"System.Text.Encoding, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\">\r\n          <serializedValue>System.Text.UTF8Encoding</serializedValue>\r\n        </property>\r\n        <property path=\"/transferMode\" isComplexType=\"false\" isExplicitlyDefined=\"false\" clrType=\"System.ServiceModel.TransferMode, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\">\r\n          <serializedValue>Buffered</serializedValue>\r\n        </property>\r\n        <property path=\"/useDefaultWebProxy\" isComplexType=\"false\" isExplicitlyDefined=\"true\" clrType=\"System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\">\r\n          <serializedValue />\r\n        </property>\r\n        <property path=\"/messageEncoding\" isComplexType=\"false\" isExplicitlyDefined=\"false\" clrType=\"System.ServiceModel.WSMessageEncoding, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\">\r\n          <serializedValue>Text</serializedValue>\r\n        </property>\r\n        <property path=\"/security\" isComplexType=\"true\" isExplicitlyDefined=\"false\" clrType=\"System.ServiceModel.Configuration.BasicHttpSecurityElement, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\">\r\n          <serializedValue>System.ServiceModel.Configuration.BasicHttpSecurityElement</serializedValue>\r\n        </property>\r\n        <property path=\"/security/mode\" isComplexType=\"false\" isExplicitlyDefined=\"false\" clrType=\"System.ServiceModel.BasicHttpSecurityMode, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\">\r\n          <serializedValue>None</serializedValue>\r\n        </property>\r\n        <property path=\"/security/transport\" isComplexType=\"true\" isExplicitlyDefined=\"false\" clrType=\"System.ServiceModel.Configuration.HttpTransportSecurityElement, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\">\r\n          <serializedValue>System.ServiceModel.Configuration.HttpTransportSecurityElement</serializedValue>\r\n        </property>\r\n        <property path=\"/security/transport/clientCredentialType\" isComplexType=\"false\" isExplicitlyDefined=\"false\" clrType=\"System.ServiceModel.HttpClientCredentialType, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\">\r\n          <serializedValue>None</serializedValue>\r\n        </property>\r\n        <property path=\"/security/transport/proxyCredentialType\" isComplexType=\"false\" isExplicitlyDefined=\"false\" clrType=\"System.ServiceModel.HttpProxyCredentialType, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\">\r\n          <serializedValue>None</serializedValue>\r\n        </property>\r\n        <property path=\"/security/transport/extendedProtectionPolicy\" isComplexType=\"true\" isExplicitlyDefined=\"false\" clrType=\"System.Security.Authentication.ExtendedProtection.Configuration.ExtendedProtectionPolicyElement, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\">\r\n          <serializedValue>System.Security.Authentication.ExtendedProtection.Configuration.ExtendedProtectionPolicyElement</serializedValue>\r\n        </property>\r\n        <property path=\"/security/transport/extendedProtectionPolicy/policyEnforcement\" isComplexType=\"false\" isExplicitlyDefined=\"false\" clrType=\"System.Security.Authentication.ExtendedProtection.PolicyEnforcement, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\">\r\n          <serializedValue>Never</serializedValue>\r\n        </property>\r\n        <property path=\"/security/transport/extendedProtectionPolicy/protectionScenario\" isComplexType=\"false\" isExplicitlyDefined=\"false\" clrType=\"System.Security.Authentication.ExtendedProtection.ProtectionScenario, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\">\r\n          <serializedValue>TransportSelected</serializedValue>\r\n        </property>\r\n        <property path=\"/security/transport/extendedProtectionPolicy/customServiceNames\" isComplexType=\"true\" isExplicitlyDefined=\"false\" clrType=\"System.Security.Authentication.ExtendedProtection.Configuration.ServiceNameElementCollection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\">\r\n          <serializedValue>(Collection)</serializedValue>\r\n        </property>\r\n        <property path=\"/security/transport/realm\" isComplexType=\"false\" isExplicitlyDefined=\"false\" clrType=\"System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\">\r\n          <serializedValue />\r\n        </property>\r\n        <property path=\"/security/message\" isComplexType=\"true\" isExplicitlyDefined=\"false\" clrType=\"System.ServiceModel.Configuration.BasicHttpMessageSecurityElement, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\">\r\n          <serializedValue>System.ServiceModel.Configuration.BasicHttpMessageSecurityElement</serializedValue>\r\n        </property>\r\n        <property path=\"/security/message/clientCredentialType\" isComplexType=\"false\" isExplicitlyDefined=\"false\" clrType=\"System.ServiceModel.BasicHttpMessageCredentialType, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\">\r\n          <serializedValue>UserName</serializedValue>\r\n        </property>\r\n        <property path=\"/security/message/algorithmSuite\" isComplexType=\"false\" isExplicitlyDefined=\"false\" clrType=\"System.ServiceModel.Security.SecurityAlgorithmSuite, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\">\r\n          <serializedValue>Default</serializedValue>\r\n        </property>\r\n      </properties>\r\n    </bindingConfiguration>\r\n  </bindingConfigurations>\r\n  <endpoints>\r\n    <endpoint name=\"BasicHttpBinding_IFollowerDirectory\" contract=\"AccountManagement.IFollowerDirectory\" bindingType=\"basicHttpBinding\" address=\"http://localhost:3100/FollowerDirectory.svc\" bindingConfiguration=\"BasicHttpBinding_IFollowerDirectory\">\r\n      <properties>\r\n        <property path=\"/address\" isComplexType=\"false\" isExplicitlyDefined=\"true\" clrType=\"System.Uri, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\">\r\n          <serializedValue>http://localhost:3100/FollowerDirectory.svc</serializedValue>\r\n        </property>\r\n        <property path=\"/behaviorConfiguration\" isComplexType=\"false\" isExplicitlyDefined=\"false\" clrType=\"System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\">\r\n          <serializedValue />\r\n        </property>\r\n        <property path=\"/binding\" isComplexType=\"false\" isExplicitlyDefined=\"true\" clrType=\"System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\">\r\n          <serializedValue>basicHttpBinding</serializedValue>\r\n        </property>\r\n        <property path=\"/bindingConfiguration\" isComplexType=\"false\" isExplicitlyDefined=\"true\" clrType=\"System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\">\r\n          <serializedValue>BasicHttpBinding_IFollowerDirectory</serializedValue>\r\n        </property>\r\n        <property path=\"/contract\" isComplexType=\"false\" isExplicitlyDefined=\"true\" clrType=\"System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\">\r\n          <serializedValue>AccountManagement.IFollowerDirectory</serializedValue>\r\n        </property>\r\n        <property path=\"/headers\" isComplexType=\"true\" isExplicitlyDefined=\"false\" clrType=\"System.ServiceModel.Configuration.AddressHeaderCollectionElement, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\">\r\n          <serializedValue>System.ServiceModel.Configuration.AddressHeaderCollectionElement</serializedValue>\r\n        </property>\r\n        <property path=\"/headers/headers\" isComplexType=\"false\" isExplicitlyDefined=\"true\" clrType=\"System.ServiceModel.Channels.AddressHeaderCollection, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\">\r\n          <serializedValue>&lt;Header /&gt;</serializedValue>\r\n        </property>\r\n        <property path=\"/identity\" isComplexType=\"true\" isExplicitlyDefined=\"false\" clrType=\"System.ServiceModel.Configuration.IdentityElement, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\">\r\n          <serializedValue>System.ServiceModel.Configuration.IdentityElement</serializedValue>\r\n        </property>\r\n        <property path=\"/identity/userPrincipalName\" isComplexType=\"true\" isExplicitlyDefined=\"false\" clrType=\"System.ServiceModel.Configuration.UserPrincipalNameElement, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\">\r\n          <serializedValue>System.ServiceModel.Configuration.UserPrincipalNameElement</serializedValue>\r\n        </property>\r\n        <property path=\"/identity/userPrincipalName/value\" isComplexType=\"false\" isExplicitlyDefined=\"false\" clrType=\"System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\">\r\n          <serializedValue />\r\n        </property>\r\n        <property path=\"/identity/servicePrincipalName\" isComplexType=\"true\" isExplicitlyDefined=\"false\" clrType=\"System.ServiceModel.Configuration.ServicePrincipalNameElement, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\">\r\n          <serializedValue>System.ServiceModel.Configuration.ServicePrincipalNameElement</serializedValue>\r\n        </property>\r\n        <property path=\"/identity/servicePrincipalName/value\" isComplexType=\"false\" isExplicitlyDefined=\"false\" clrType=\"System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\">\r\n          <serializedValue />\r\n        </property>\r\n        <property path=\"/identity/dns\" isComplexType=\"true\" isExplicitlyDefined=\"false\" clrType=\"System.ServiceModel.Configuration.DnsElement, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\">\r\n          <serializedValue>System.ServiceModel.Configuration.DnsElement</serializedValue>\r\n        </property>\r\n        <property path=\"/identity/dns/value\" isComplexType=\"false\" isExplicitlyDefined=\"false\" clrType=\"System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\">\r\n          <serializedValue />\r\n        </property>\r\n        <property path=\"/identity/rsa\" isComplexType=\"true\" isExplicitlyDefined=\"false\" clrType=\"System.ServiceModel.Configuration.RsaElement, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\">\r\n          <serializedValue>System.ServiceModel.Configuration.RsaElement</serializedValue>\r\n        </property>\r\n        <property path=\"/identity/rsa/value\" isComplexType=\"false\" isExplicitlyDefined=\"false\" clrType=\"System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\">\r\n          <serializedValue />\r\n        </property>\r\n        <property path=\"/identity/certificate\" isComplexType=\"true\" isExplicitlyDefined=\"false\" clrType=\"System.ServiceModel.Configuration.CertificateElement, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\">\r\n          <serializedValue>System.ServiceModel.Configuration.CertificateElement</serializedValue>\r\n        </property>\r\n        <property path=\"/identity/certificate/encodedValue\" isComplexType=\"false\" isExplicitlyDefined=\"false\" clrType=\"System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\">\r\n          <serializedValue />\r\n        </property>\r\n        <property path=\"/identity/certificateReference\" isComplexType=\"true\" isExplicitlyDefined=\"false\" clrType=\"System.ServiceModel.Configuration.CertificateReferenceElement, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\">\r\n          <serializedValue>System.ServiceModel.Configuration.CertificateReferenceElement</serializedValue>\r\n        </property>\r\n        <property path=\"/identity/certificateReference/storeName\" isComplexType=\"false\" isExplicitlyDefined=\"false\" clrType=\"System.Security.Cryptography.X509Certificates.StoreName, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\">\r\n          <serializedValue>My</serializedValue>\r\n        </property>\r\n        <property path=\"/identity/certificateReference/storeLocation\" isComplexType=\"false\" isExplicitlyDefined=\"false\" clrType=\"System.Security.Cryptography.X509Certificates.StoreLocation, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\">\r\n          <serializedValue>LocalMachine</serializedValue>\r\n        </property>\r\n        <property path=\"/identity/certificateReference/x509FindType\" isComplexType=\"false\" isExplicitlyDefined=\"false\" clrType=\"System.Security.Cryptography.X509Certificates.X509FindType, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\">\r\n          <serializedValue>FindBySubjectDistinguishedName</serializedValue>\r\n        </property>\r\n        <property path=\"/identity/certificateReference/findValue\" isComplexType=\"false\" isExplicitlyDefined=\"false\" clrType=\"System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\">\r\n          <serializedValue />\r\n        </property>\r\n        <property path=\"/identity/certificateReference/isChainIncluded\" isComplexType=\"false\" isExplicitlyDefined=\"false\" clrType=\"System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\">\r\n          <serializedValue>False</serializedValue>\r\n        </property>\r\n        <property path=\"/name\" isComplexType=\"false\" isExplicitlyDefined=\"true\" clrType=\"System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\">\r\n          <serializedValue>BasicHttpBinding_IFollowerDirectory</serializedValue>\r\n        </property>\r\n        <property path=\"/kind\" isComplexType=\"false\" isExplicitlyDefined=\"false\" clrType=\"System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\">\r\n          <serializedValue />\r\n        </property>\r\n        <property path=\"/endpointConfiguration\" isComplexType=\"false\" isExplicitlyDefined=\"false\" clrType=\"System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\">\r\n          <serializedValue />\r\n        </property>\r\n      </properties>\r\n    </endpoint>\r\n  </endpoints>\r\n</SavedWcfConfigurationInformation>"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.SOAP.SocialMedia/Discovery/Web.Debug.config",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n\r\n<!-- For more information on using web.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 -->\r\n\r\n<configuration xmlns:xdt=\"http://schemas.microsoft.com/XML-Document-Transform\">\r\n  <!--\r\n    In the example below, the \"SetAttributes\" transform will change the value of \r\n    \"connectionString\" to use \"ReleaseSQLServer\" only when the \"Match\" locator \r\n    finds an attribute \"name\" that has a value of \"MyDB\".\r\n    \r\n    <connectionStrings>\r\n      <add name=\"MyDB\" \r\n        connectionString=\"Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True\" \r\n        xdt:Transform=\"SetAttributes\" xdt:Locator=\"Match(name)\"/>\r\n    </connectionStrings>\r\n  -->\r\n  <system.web>\r\n    <!--\r\n      In the example below, the \"Replace\" transform will replace the entire \r\n      <customErrors> section of your web.config file.\r\n      Note that because there is only one customErrors section under the \r\n      <system.web> node, there is no need to use the \"xdt:Locator\" attribute.\r\n      \r\n      <customErrors defaultRedirect=\"GenericError.htm\"\r\n        mode=\"RemoteOnly\" xdt:Transform=\"Replace\">\r\n        <error statusCode=\"500\" redirect=\"InternalError.htm\"/>\r\n      </customErrors>\r\n    -->\r\n  </system.web>\r\n</configuration>"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.SOAP.SocialMedia/Discovery/Web.Release.config",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n\r\n<!-- For more information on using web.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 -->\r\n\r\n<configuration xmlns:xdt=\"http://schemas.microsoft.com/XML-Document-Transform\">\r\n  <!--\r\n    In the example below, the \"SetAttributes\" transform will change the value of \r\n    \"connectionString\" to use \"ReleaseSQLServer\" only when the \"Match\" locator \r\n    finds an attribute \"name\" that has a value of \"MyDB\".\r\n    \r\n    <connectionStrings>\r\n      <add name=\"MyDB\" \r\n        connectionString=\"Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True\" \r\n        xdt:Transform=\"SetAttributes\" xdt:Locator=\"Match(name)\"/>\r\n    </connectionStrings>\r\n  -->\r\n  <system.web>\r\n    <compilation xdt:Transform=\"RemoveAttributes(debug)\" />\r\n    <!--\r\n      In the example below, the \"Replace\" transform will replace the entire \r\n      <customErrors> section of your web.config file.\r\n      Note that because there is only one customErrors section under the \r\n      <system.web> node, there is no need to use the \"xdt:Locator\" attribute.\r\n      \r\n      <customErrors defaultRedirect=\"GenericError.htm\"\r\n        mode=\"RemoteOnly\" xdt:Transform=\"Replace\">\r\n        <error statusCode=\"500\" redirect=\"InternalError.htm\"/>\r\n      </customErrors>\r\n    -->\r\n  </system.web>\r\n</configuration>"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.SOAP.SocialMedia/Discovery/Web.config",
    "content": "﻿<?xml version=\"1.0\"?>\r\n<configuration>\r\n\r\n  <appSettings>\r\n    <add key=\"aspnet:UseTaskFriendlySynchronizationContext\" value=\"true\" />\r\n  </appSettings>\r\n  <system.web>\r\n    <compilation debug=\"true\" targetFramework=\"4.5\" />\r\n    <httpRuntime targetFramework=\"4.5\"/>\r\n  </system.web>\r\n  <system.serviceModel>\r\n    <bindings>\r\n      <basicHttpBinding>\r\n        <binding name=\"BasicHttpBinding_IFollowerDirectory\" />\r\n      </basicHttpBinding>\r\n    </bindings>\r\n    <client>\r\n      <endpoint address=\"http://localhost:3100/FollowerDirectory.svc\"\r\n        binding=\"basicHttpBinding\" bindingConfiguration=\"BasicHttpBinding_IFollowerDirectory\"\r\n        contract=\"AccountManagement.IFollowerDirectory\" name=\"BasicHttpBinding_IFollowerDirectory\" />\r\n    </client>\r\n    <behaviors>\r\n      <serviceBehaviors>\r\n        <behavior>\r\n          <!-- To avoid disclosing metadata information, set the values below to false before deployment -->\r\n          <serviceMetadata httpGetEnabled=\"true\" httpsGetEnabled=\"true\"/>\r\n          <!-- To receive exception details in faults for debugging purposes, set the value below to true.  Set to false before deployment to avoid disclosing exception information -->\r\n          <serviceDebug includeExceptionDetailInFaults=\"false\"/>\r\n        </behavior>\r\n      </serviceBehaviors>\r\n    </behaviors>\r\n    <protocolMapping>\r\n        <add binding=\"basicHttpsBinding\" scheme=\"https\" />\r\n    </protocolMapping>    \r\n    <serviceHostingEnvironment aspNetCompatibilityEnabled=\"true\" multipleSiteBindingsEnabled=\"true\" />\r\n  </system.serviceModel>\r\n  <system.webServer>\r\n    <modules runAllManagedModulesForAllRequests=\"true\"/>\r\n    <!--\r\n        To browse web app root directory during debugging, set the value below to true.\r\n        Set to false before deployment to avoid disclosing web app folder information.\r\n      -->\r\n    <directoryBrowse enabled=\"true\"/>\r\n  </system.webServer>\r\n\r\n</configuration>\r\n"
  },
  {
    "path": "13 - Integrating Via Http and Rest/PPPDDD.SOAP.SocialMedia/PPPDDD.SOAP.SocialMedia.sln",
    "content": "﻿\nMicrosoft Visual Studio Solution File, Format Version 12.00\n# Visual Studio Express 2013 for Web\nVisualStudioVersion = 12.0.30723.0\nMinimumVisualStudioVersion = 10.0.40219.1\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"AccountManagement\", \"AccountManagement\\AccountManagement.csproj\", \"{C6E52CD8-14E4-49E4-B35F-1C927D14C7D6}\"\nEndProject\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"Discovery\", \"Discovery\\Discovery.csproj\", \"{89E0E5EC-0910-4DEB-B2A2-7B3C85C15092}\"\n\tProjectSection(ProjectDependencies) = postProject\n\t\t{C6E52CD8-14E4-49E4-B35F-1C927D14C7D6} = {C6E52CD8-14E4-49E4-B35F-1C927D14C7D6}\n\tEndProjectSection\nEndProject\nProject(\"{2150E333-8FDC-42A3-9474-1A3956D46DE8}\") = \"Account Management Context\", \"Account Management Context\", \"{03081BDB-6E10-41F4-9BDA-06AA04547666}\"\nEndProject\nProject(\"{2150E333-8FDC-42A3-9474-1A3956D46DE8}\") = \"Discovery Context\", \"Discovery Context\", \"{BE69D4C1-76B4-4BEA-96FE-04101989DE65}\"\nEndProject\nGlobal\n\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\n\t\tDebug|Any CPU = Debug|Any CPU\n\t\tRelease|Any CPU = Release|Any CPU\n\tEndGlobalSection\n\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\n\t\t{C6E52CD8-14E4-49E4-B35F-1C927D14C7D6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{C6E52CD8-14E4-49E4-B35F-1C927D14C7D6}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{C6E52CD8-14E4-49E4-B35F-1C927D14C7D6}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{C6E52CD8-14E4-49E4-B35F-1C927D14C7D6}.Release|Any CPU.Build.0 = Release|Any CPU\n\t\t{89E0E5EC-0910-4DEB-B2A2-7B3C85C15092}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{89E0E5EC-0910-4DEB-B2A2-7B3C85C15092}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{89E0E5EC-0910-4DEB-B2A2-7B3C85C15092}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{89E0E5EC-0910-4DEB-B2A2-7B3C85C15092}.Release|Any CPU.Build.0 = Release|Any CPU\n\tEndGlobalSection\n\tGlobalSection(SolutionProperties) = preSolution\n\t\tHideSolutionNode = FALSE\n\tEndGlobalSection\n\tGlobalSection(NestedProjects) = preSolution\n\t\t{C6E52CD8-14E4-49E4-B35F-1C927D14C7D6} = {03081BDB-6E10-41F4-9BDA-06AA04547666}\n\t\t{89E0E5EC-0910-4DEB-B2A2-7B3C85C15092} = {BE69D4C1-76B4-4BEA-96FE-04101989DE65}\n\tEndGlobalSection\nEndGlobal\n"
  },
  {
    "path": "13 - Integrating Via Http and Rest/README.md",
    "content": "PPPDDD\n======\n\nSample code for the book Principles, Practices and Patterns of Domain-Driven Design. From the book http://www.amazon.com/Professional-Domain-Driven-Design-Patterns/dp/1118714709/\n"
  },
  {
    "path": "14 - Introducing Domain Modelling Patterns and Best Practices/README.md",
    "content": "PPPDDD\n======\n\nSample code for the book Principles, Practices and Patterns of Domain-Driven Design. From the book http://www.amazon.com/Professional-Domain-Driven-Design-Patterns/dp/1118714709/\n"
  },
  {
    "path": "15 - Value Objects/Examples/BankAccount/BankAccount.cs",
    "content": "﻿using System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Text;\r\nusing System.Threading.Tasks;\r\n\r\nnamespace Examples.BankAccount\r\n{\r\n    // Entity\r\n    public class BankAccount\r\n    {\r\n        public BankAccount(Guid id)\r\n        {\r\n            this.Id = id;\r\n        }\r\n\r\n        public Guid Id { get; private set; }\r\n\r\n        public Money Balance { get; private set; }\r\n\r\n        // ...\r\n    }\r\n}\r\n"
  },
  {
    "path": "15 - Value Objects/Examples/Examples.csproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"12.0\" DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <Import Project=\"$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props\" Condition=\"Exists('$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props')\" />\n  <PropertyGroup>\n    <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>\n    <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>\n    <ProjectGuid>{A394B517-C5C1-4891-A484-5753E875AF88}</ProjectGuid>\n    <OutputType>Library</OutputType>\n    <AppDesignerFolder>Properties</AppDesignerFolder>\n    <RootNamespace>Examples</RootNamespace>\n    <AssemblyName>Examples</AssemblyName>\n    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\n    <FileAlignment>512</FileAlignment>\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' \">\n    <DebugSymbols>true</DebugSymbols>\n    <DebugType>full</DebugType>\n    <Optimize>false</Optimize>\n    <OutputPath>bin\\Debug\\</OutputPath>\n    <DefineConstants>DEBUG;TRACE</DefineConstants>\n    <ErrorReport>prompt</ErrorReport>\n    <WarningLevel>4</WarningLevel>\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' \">\n    <DebugType>pdbonly</DebugType>\n    <Optimize>true</Optimize>\n    <OutputPath>bin\\Release\\</OutputPath>\n    <DefineConstants>TRACE</DefineConstants>\n    <ErrorReport>prompt</ErrorReport>\n    <WarningLevel>4</WarningLevel>\n  </PropertyGroup>\n  <ItemGroup>\n    <Reference Include=\"FluentNHibernate\">\n      <HintPath>..\\packages\\FluentNHibernate.1.4.0.0\\lib\\net35\\FluentNHibernate.dll</HintPath>\n    </Reference>\n    <Reference Include=\"Iesi.Collections\">\n      <HintPath>..\\packages\\Iesi.Collections.3.2.0.4000\\lib\\Net35\\Iesi.Collections.dll</HintPath>\n    </Reference>\n    <Reference Include=\"NHibernate\">\n      <HintPath>..\\packages\\NHibernate.3.3.4.4000\\lib\\Net35\\NHibernate.dll</HintPath>\n    </Reference>\n    <Reference Include=\"System\" />\n    <Reference Include=\"System.ComponentModel.DataAnnotations\" />\n    <Reference Include=\"System.Core\" />\n    <Reference Include=\"System.Xml.Linq\" />\n    <Reference Include=\"System.Data.DataSetExtensions\" />\n    <Reference Include=\"Microsoft.CSharp\" />\n    <Reference Include=\"System.Data\" />\n    <Reference Include=\"System.Xml\" />\n  </ItemGroup>\n  <ItemGroup>\n    <Compile Include=\"Model\\BankAccount.cs\" />\n    <Compile Include=\"Model\\Meters.cs\" />\n    <Compile Include=\"Model\\Customer.cs\" />\n    <Compile Include=\"Model\\MicroTypes.cs\" />\n    <Compile Include=\"Model\\Money.cs\" />\n    <Compile Include=\"Model\\Name.cs\" />\n    <Compile Include=\"Properties\\AssemblyInfo.cs\" />\n    <Compile Include=\"Model\\ValueObject.cs\" />\n  </ItemGroup>\n  <ItemGroup>\n    <None Include=\"app.config\" />\n    <None Include=\"packages.config\" />\n  </ItemGroup>\n  <ItemGroup>\n    <Folder Include=\"Application\\\" />\n    <Folder Include=\"Infrastructure\\\" />\n  </ItemGroup>\n  <Import Project=\"$(MSBuildToolsPath)\\Microsoft.CSharp.targets\" />\n  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \n       Other similar extension points exist, see Microsoft.Common.targets.\n  <Target Name=\"BeforeBuild\">\n  </Target>\n  <Target Name=\"AfterBuild\">\n  </Target>\n  -->\n</Project>"
  },
  {
    "path": "15 - Value Objects/Examples/Model/BankAccount.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace Examples\n{\n    // Entity\n    public class BankAccount\n    {\n        public BankAccount(Guid id, Money startingBalance)\n        {\n            this.Id = id;\n            this.Balance = startingBalance;\n        }\n\n        public Guid Id { get; private set; }\n\n        public Money Balance { get; private set; }\n\n        // ..\n    }\n\n    // Value Object\n    public class Money\n    {\n        public Money(int amount, Currency currency)\n        {\n            this.Amount = amount;\n            this.Currency = currency;\n        }\n\n        private int Amount { get; set; }\n\n        private Currency Currency { get; set; }\n\n        // ..\n    }\n\n    public enum Currency \n    {\n        Dollars,\n        Pounds,\n    }\n}\n"
  },
  {
    "path": "15 - Value Objects/Examples/Model/Customer.cs",
    "content": "﻿using Examples;\nusing System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace Examples\n{\n    // Entity\n    public class Customer\n    {\n        public Customer(Guid id)\n        {\n            this.Id = id;\n        }\n\n        public Guid Id { get; private set; }\n\n        public IEnumerable<PhoneNumber> PhoneNumbers { get; set; }\n\n        // ..\n    }\n\n    public class PhoneNumber : ValueObject<PhoneNumber>\n    {\n        public readonly string Number;\n\n        public PhoneNumber(string number)\n        {\n            this.Number = number;\n        }\n\n        protected override IEnumerable<object> GetAttributesToIncludeInEqualityCheck()\n        {\n            return new object[] { Number };\n        }\n\n        // ..\n    }\n}\n\nnamespace CustomerWithAddressBook\n{\n    // Entity\n    public class Customer\n    {\n        public Customer(Guid id)\n        {\n            this.Id = id;\n        }\n\n        public Guid Id { get; private set; }\n\n        public PhoneBook PhoneNumbers { get; set; }\n\n        // ..\n    }\n\n    public class PhoneBook : ValueObject<PhoneBook>\n    {\n        public readonly PhoneNumber HomeNumber;\n        public readonly PhoneNumber MobileNumber;\n        public readonly PhoneNumber WorkNumber;\n\n        public PhoneBook(PhoneNumber homeNum, PhoneNumber mobileNum, PhoneNumber workNum)\n        {\n            this.HomeNumber = homeNum;\n            this.MobileNumber = mobileNum;\n            this.WorkNumber = workNum;\n        }\n\n        protected override IEnumerable<object> GetAttributesToIncludeInEqualityCheck()\n        {\n            return new object[] { HomeNumber, MobileNumber, WorkNumber };\n        }\n    }\n\n    public class PhoneNumber : ValueObject<PhoneNumber>\n    {\n        public readonly string Number;\n\n        public PhoneNumber(string number)\n        {\n            this.Number = number;\n        }\n\n        protected override IEnumerable<object> GetAttributesToIncludeInEqualityCheck()\n        {\n            return new object[] { Number };\n        }\n\n        // ..\n    }\n}\n"
  },
  {
    "path": "15 - Value Objects/Examples/Model/Meters.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace Examples\n{\n    // Value Object\n    public class Meters\n    {\n        public Meters(decimal distanceInMeters)\n        {\n            if (distanceInMeters < (decimal)0.0)\n                throw new DistancesInMetersCannotBeNegative();\n\n            this.DistanceInMeters = distanceInMeters;\n        }\n\n        protected decimal DistanceInMeters { get; private set; }\n\n        public Yards ToYards()\n        {\n            return new Yards(DistanceInMeters * (decimal)1.0936133);\n        }\n\n        public Kilometers ToKilometers()\n        {\n            return new Kilometers(DistanceInMeters / 1000);\n        }\n\n        public Meters Add(Meters meters)\n        {\n            return new Meters(this.DistanceInMeters + meters.DistanceInMeters);\n        }\n\n        public bool IsLongerThan(Meters meters)\n        {\n            return this.DistanceInMeters > meters.DistanceInMeters;\n        }\n\n        public override bool Equals(object obj)\n        {\n            var m = obj as Meters;\n            if (m == null) return false;\n\n            return ToTwoDecimalPlaces(m.DistanceInMeters) == ToTwoDecimalPlaces(DistanceInMeters);\n        }\n\n        private decimal ToTwoDecimalPlaces(decimal distanceInMeters)\n        {\n            return Math.Round(distanceInMeters, 2, MidpointRounding.AwayFromZero);\n        }\n    }\n\n    public class Yards\n    {\n        public Yards(decimal distanceInYards)\n        {\n\n        }\n\n        // ...\n    }\n\n    public class Kilometers\n    {\n        public Kilometers(decimal distainceInKillometers)\n        {\n\n        }\n\n        // ...\n    }\n\n    public class DistancesInMetersCannotBeNegative : Exception { }\n\n    namespace MetersWithBaseClass\n    {\n        public class Meters : ValueObject<Meters>\n        {\n            public Meters(decimal distanceInMeters)\n            {\n                if (distanceInMeters < (decimal)0.0)\n                    throw new DistancesInMetersCannotBeNegative();\n\n                this.DistanceInMeters = distanceInMeters;\n            }\n\n            protected decimal DistanceInMeters { get; private set; }\n\n            public Yards ToYards()\n            {\n                return new Yards(DistanceInMeters * (decimal)1.0936133);\n            }\n\n            public Kilometers ToKilometers()\n            {\n                return new Kilometers(DistanceInMeters / 1000);\n            }\n\n            public Meters Add(Meters meters)\n            {\n                return new Meters(this.DistanceInMeters + meters.DistanceInMeters);\n            }\n\n            public bool IsLongerThan(Meters meters)\n            {\n                return this.DistanceInMeters > meters.DistanceInMeters;\n            }\n\n            protected override IEnumerable<object> GetAttributesToIncludeInEqualityCheck()\n            {\n                return new List<Object> { DistanceInMeters };\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "15 - Value Objects/Examples/Model/MicroTypes.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace Examples\n{\n    // Domain service that operates on Value Objects\n    public class OvertimeCalculator\n    {\n        public OvertimeHours Calculate(HoursWorked worked, ContractedHours contracted)\n        {\n            var overtimeHours = worked.Hours - contracted.Hours;\n            return new OvertimeHours(overtimeHours);\n        }\n    }\n\n    public class Hours : ValueObject<Hours>\n    {\n        public readonly int Amount;\n\n        public Hours(int amount)\n        {\n            this.Amount = amount;\n        }\n\n        public static Hours operator - (Hours left, Hours right)\n        {\n            return new Hours(left.Amount - right.Amount);\n        }\n\n        protected override IEnumerable<object> GetAttributesToIncludeInEqualityCheck()\n        {\n            return new object[] { Amount };\n        }\n    }\n\n    // Micro Types that wrap existing types for contextual clarity\n    public class HoursWorked : ValueObject<HoursWorked>\n    {\n        public readonly Hours Hours;\n\n        public HoursWorked(Hours hours)\n        {\n            this.Hours = hours;\n        }\n\n        protected override IEnumerable<object> GetAttributesToIncludeInEqualityCheck()\n        {\n            return new object[] { Hours };\n        }\n    }\n\n    public class ContractedHours : ValueObject<ContractedHours>\n    {\n        public readonly Hours Hours;\n\n        public ContractedHours(Hours hours)\n        {\n            this.Hours = hours;\n        }\n\n        protected override IEnumerable<object> GetAttributesToIncludeInEqualityCheck()\n        {\n            return new object[] { Hours };\n        }\n    }\n\n    public class OvertimeHours : ValueObject<OvertimeHours>\n    {\n        public readonly Hours Hours;\n\n        public OvertimeHours(Hours hours)\n        {\n            this.Hours = hours;\n        }\n\n        protected override IEnumerable<object> GetAttributesToIncludeInEqualityCheck()\n        {\n            return new object[] { Hours };\n        }\n    }\n}\n"
  },
  {
    "path": "15 - Value Objects/Examples/Model/Money.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace Examples\n{\n    namespace BasicMoney\n    {\n        public class Money : ValueObject<Money>\n        {\n            protected readonly decimal Value;\n\n            public Money()\n                : this(0m)\n            {\n            }\n\n            public Money(decimal value)\n            {\n                Value = value;\n            }\n\n            public Money Add(Money money)\n            {\n                return new Money(Value + money.Value);\n            }\n\n            public Money Subtract(Money money)\n            {\n                return new Money(Value - money.Value);\n            }\n\n            protected override IEnumerable<object> GetAttributesToIncludeInEqualityCheck()\n            {\n                return new List<Object>() { Value };\n            }\n        }\n    }\n\n    namespace CombiningMoney\n    {\n        public class Money : ValueObject<Money>\n        {\n            protected readonly decimal Value;\n\n            public Money()\n                : this(0m)\n            {\n            }\n\n            public Money(decimal value)\n            {\n                Value = value;\n            }\n\n            public Money Add(Money money)\n            {\n                return new Money(Value + money.Value);\n            }\n\n            public Money Subtract(Money money)\n            {\n                return new Money(Value - money.Value);\n            }\n\n            protected override IEnumerable<object> GetAttributesToIncludeInEqualityCheck()\n            {\n                return new List<Object>() { Value };\n            }\n\n            public static Money operator +(Money left, Money right)\n            {\n                return new Money(left.Value + right.Value);\n            }\n\n            public static Money operator -(Money left, Money right)\n            {\n                return new Money(left.Value - right.Value);\n            }\n        }\n    }\n\n    namespace SelfValidating\n    {\n        public class Money : ValueObject<Money>\n        {\n            protected readonly decimal Value;\n            public Money()\n                : this(0m)\n            {\n            }\n\n            public Money(decimal value)\n            {\n                Validate(value);\n\n                Value = value;\n            }\n\n            private void Validate(decimal value)\n            {\n                if (value % 0.01m != 0)\n                    throw new MoreThanTwoDecimalPlacesInMoneyValueException();\n\n                if (value < 0)\n                    throw new MoneyCannotBeANegativeValueException();\n            }\n\n            public Money Add(Money money)\n            {\n                return new Money(Value + money.Value);\n            }\n\n            protected override IEnumerable<object> GetAttributesToIncludeInEqualityCheck()\n            {\n                return new List<Object>() { Value };\n            }\n\n\n            public static Money Create(int amount)\n            {\n                if (amount % 0.01m != 0)\n                    throw new MoreThanTwoDecimalPlacesInMoneyValueException();\n\n                if (amount < 0)\n                    throw new MoneyCannotBeANegativeValueException();\n\n                return new Money(amount);\n            }\n        }\n\n        public class MoreThanTwoDecimalPlacesInMoneyValueException : Exception\n        {\n        }\n\n        public class MoneyCannotBeANegativeValueException : Exception\n        {\n        }\n    }\n}\n   \n"
  },
  {
    "path": "15 - Value Objects/Examples/Model/Name.cs",
    "content": "﻿using Examples;\nusing FluentNHibernate.Mapping;\nusing NHibernate;\nusing NHibernate.SqlTypes;\nusing NHibernate.UserTypes;\nusing System;\nusing System.Collections.Generic;\nusing System.Data;\nusing System.Data.Common;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\nusing System.Xml;\n\nnamespace Examples\n{\n    public class Name : ValueObject<Name>\n    {\n        public readonly string firstName;\n        public readonly string surname;\n\n        public Name(string firstName, string surname)\n        {\n            Check.that(firstName.is_not_empty()).on_constraint_failure(() =>\n            {\n                throw new ApplicationException(\"You must specify a first name.\");\n            });\n\n            Check.that(surname.is_not_empty()).on_constraint_failure(() =>\n            {\n                throw new ApplicationException(\"You must specify a surname.\");\n            });\n\n            this.firstName = firstName;\n            this.surname = surname;\n        }\n\n        protected override IEnumerable<object> GetAttributesToIncludeInEqualityCheck()\n        {\n            return new object[] { firstName, surname };\n        }\n    }\n\n    public static class StringExtensions\n    {\n        public static bool is_not_empty(this String string_to_check)\n        {\n            return !String.IsNullOrEmpty(string_to_check);\n        }\n    }\n\n    public class CheckConstraint\n    {\n        private readonly bool _assertion;\n\n        public CheckConstraint(bool assertion)\n        {\n            _assertion = assertion;\n        }\n\n        public void on_constraint_failure(Action onFailure)\n        {\n            if (!_assertion) onFailure();\n        }\n    }\n\n    public sealed class Check\n    {\n        public static CheckConstraint that(bool assertion)\n        {\n            return new CheckConstraint(assertion);\n        }\n    }\n}\n\nnamespace NameWithPersistence\n{\n    public class Customer\n    {\n        public Customer()\n        {\n            // Required by NHibernate\n        }\n\n        public Customer(Guid id, Name name)\n        {\n            this.Id = id;\n            this.Name = name;\n        }\n\n        // Virtual for NHibernate\n        public virtual Guid Id { get; protected set; }\n\n        public virtual Name Name { get; protected set; }\n    }\n\n    public class Name : ValueObject<Name>\n    {\n        public Name(string firstName, string surname)\n        {\n            this.FirstName = firstName;\n            this.Surname = surname;\n        }\n\n        public string FirstName { get; protected set; }\n\n        public string Surname { get; protected set; }\n\n        protected override IEnumerable<object> GetAttributesToIncludeInEqualityCheck()\n        {\n            return new object[] { FirstName, Surname };\n        }\n\n        public override string ToString()\n        {\n            return String.Format(\n                \"firstName:{0};;surname:{1}\", FirstName, Surname\n            );\n        }\n    }\n }\n\nnamespace NameWithPersistenceNormalized\n{\n    public class Customer\n    {\n        protected Customer()\n        {\n            // for NHibernate only\n        }\n\n        public Customer(Guid id, Name name)\n        {\n            this.Id = id;\n            this.Name = name;\n        }\n\n        public virtual Guid Id { get; protected set; }\n\n        public virtual Name Name { get; protected set; }\n\n        // ...\n    }\n\n    public class Name : ValueObject<Name>\n    {\n        protected Name()\n        {\n            // Required by NHibernate\n        }\n\n        public Name(string firstName, string surname)\n        {\n            this.FirstName = firstName;\n            this.Surname = surname;\n        }\n\n        public string FirstName { get; protected set; }\n\n        public string Surname { get; protected set; }\n\n        protected override IEnumerable<object> GetAttributesToIncludeInEqualityCheck()\n        {\n            return new object[] { FirstName, Surname };\n        }\n\n    }\n}\n"
  },
  {
    "path": "15 - Value Objects/Examples/Model/ValueObject.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace Examples\n{\n    public abstract class ValueObject<T> where T : ValueObject<T>\n    {\n        protected abstract IEnumerable<object> GetAttributesToIncludeInEqualityCheck();\n\n        public override bool Equals(object other)\n        {\n            return Equals(other as T);\n        }\n\n        public virtual bool Equals(T other)\n        {\n            if (other == null)\n            {\n                return false;\n            }\n            return GetAttributesToIncludeInEqualityCheck().SequenceEqual(other.GetAttributesToIncludeInEqualityCheck());\n        }\n\n        public static bool operator ==(ValueObject<T> left, ValueObject<T> right)\n        {\n            return Equals(left, right);\n        }\n\n        public static bool operator !=(ValueObject<T> left, ValueObject<T> right)\n        {\n            return !(left == right);\n        }\n\n        public override int GetHashCode()\n        {\n            int hash = 17;\n            foreach (var obj in this.GetAttributesToIncludeInEqualityCheck())\n                hash = hash * 31 + (obj == null ? 0 : obj.GetHashCode());\n\n            return hash;\n        }\n    }\n}\n"
  },
  {
    "path": "15 - Value Objects/Examples/Properties/AssemblyInfo.cs",
    "content": "﻿using System.Reflection;\r\nusing System.Runtime.CompilerServices;\r\nusing System.Runtime.InteropServices;\r\n\r\n// General Information about an assembly is controlled through the following \r\n// set of attributes. Change these attribute values to modify the information\r\n// associated with an assembly.\r\n[assembly: AssemblyTitle(\"Examples\")]\r\n[assembly: AssemblyDescription(\"\")]\r\n[assembly: AssemblyConfiguration(\"\")]\r\n[assembly: AssemblyCompany(\"\")]\r\n[assembly: AssemblyProduct(\"Examples\")]\r\n[assembly: AssemblyCopyright(\"Copyright ©  2014\")]\r\n[assembly: AssemblyTrademark(\"\")]\r\n[assembly: AssemblyCulture(\"\")]\r\n\r\n// Setting ComVisible to false makes the types in this assembly not visible \r\n// to COM components.  If you need to access a type in this assembly from \r\n// COM, set the ComVisible attribute to true on that type.\r\n[assembly: ComVisible(false)]\r\n\r\n// The following GUID is for the ID of the typelib if this project is exposed to COM\r\n[assembly: Guid(\"1c93027f-a317-4ed6-8dee-715ae38d03f6\")]\r\n\r\n// Version information for an assembly consists of the following four values:\r\n//\r\n//      Major Version\r\n//      Minor Version \r\n//      Build Number\r\n//      Revision\r\n//\r\n// You can specify all the values or you can default the Build and Revision Numbers \r\n// by using the '*' as shown below:\r\n// [assembly: AssemblyVersion(\"1.0.*\")]\r\n[assembly: AssemblyVersion(\"1.0.0.0\")]\r\n[assembly: AssemblyFileVersion(\"1.0.0.0\")]\r\n"
  },
  {
    "path": "15 - Value Objects/Examples/app.config",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<configuration>\r\n  <configSections>\r\n    \r\n    <section name=\"entityFramework\" type=\"System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\" requirePermission=\"false\" />\r\n  </configSections>\r\n  \r\n  <entityFramework>\r\n    <defaultConnectionFactory type=\"System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework\" />\r\n    <providers>\r\n      <provider invariantName=\"System.Data.SqlClient\" type=\"System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer\" />\r\n      <provider invariantName=\"System.Data.SQLite.EF6\" type=\"System.Data.SQLite.EF6.SQLiteProviderServices, System.Data.SQLite.EF6\" />\r\n    </providers>\r\n  </entityFramework>\r\n</configuration>"
  },
  {
    "path": "15 - Value Objects/Examples/packages.config",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<packages>\r\n  <package id=\"FluentNHibernate\" version=\"1.4.0.0\" targetFramework=\"net45\" />\r\n  <package id=\"Iesi.Collections\" version=\"3.2.0.4000\" targetFramework=\"net45\" />\r\n  <package id=\"NHibernate\" version=\"3.3.4.4000\" targetFramework=\"net45\" />\r\n</packages>"
  },
  {
    "path": "15 - Value Objects/PPPDDD.Chap16.ValueObjects.sln",
    "content": "﻿\r\nMicrosoft Visual Studio Solution File, Format Version 12.00\r\n# Visual Studio Express 2013 for Web\r\nVisualStudioVersion = 12.0.21005.1\r\nMinimumVisualStudioVersion = 10.0.40219.1\r\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"Examples\", \"Examples\\Examples.csproj\", \"{A394B517-C5C1-4891-A484-5753E875AF88}\"\r\nEndProject\r\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"Tests\", \"Tests\\Tests\\Tests.csproj\", \"{C7F74BD0-0CBB-47AC-8964-47D8C8E516FD}\"\r\nEndProject\r\nGlobal\r\n\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\r\n\t\tDebug|Any CPU = Debug|Any CPU\r\n\t\tRelease|Any CPU = Release|Any CPU\r\n\tEndGlobalSection\r\n\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\r\n\t\t{A394B517-C5C1-4891-A484-5753E875AF88}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r\n\t\t{A394B517-C5C1-4891-A484-5753E875AF88}.Debug|Any CPU.Build.0 = Debug|Any CPU\r\n\t\t{A394B517-C5C1-4891-A484-5753E875AF88}.Release|Any CPU.ActiveCfg = Release|Any CPU\r\n\t\t{A394B517-C5C1-4891-A484-5753E875AF88}.Release|Any CPU.Build.0 = Release|Any CPU\r\n\t\t{C7F74BD0-0CBB-47AC-8964-47D8C8E516FD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r\n\t\t{C7F74BD0-0CBB-47AC-8964-47D8C8E516FD}.Debug|Any CPU.Build.0 = Debug|Any CPU\r\n\t\t{C7F74BD0-0CBB-47AC-8964-47D8C8E516FD}.Release|Any CPU.ActiveCfg = Release|Any CPU\r\n\t\t{C7F74BD0-0CBB-47AC-8964-47D8C8E516FD}.Release|Any CPU.Build.0 = Release|Any CPU\r\n\tEndGlobalSection\r\n\tGlobalSection(SolutionProperties) = preSolution\r\n\t\tHideSolutionNode = FALSE\r\n\tEndGlobalSection\r\nEndGlobal\r\n"
  },
  {
    "path": "15 - Value Objects/README.md",
    "content": "PPPDDD\n======\n\nSample code for the book Principles, Practices and Patterns of Domain-Driven Design. From the book http://www.amazon.com/Professional-Domain-Driven-Design-Patterns/dp/1118714709/\n"
  },
  {
    "path": "15 - Value Objects/Tests/Tests/Combining_money_tests.cs",
    "content": "﻿using Microsoft.VisualStudio.TestTools.UnitTesting;\r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Text;\r\nusing System.Threading.Tasks;\r\nusing Examples.CombiningMoney;\r\n\r\nnamespace Tests\r\n{\r\n    [TestClass]\r\n    public class Combining_money_tests\r\n    {\r\n        [TestMethod]\r\n        public void Money_supports_native_addition_syntax()\r\n        {\r\n            var m = new Money(200);\r\n            var m2 = new Money(300);\r\n\r\n            var combined = m + m2;\r\n\r\n            Assert.AreEqual(new Money(500), combined);\r\n        }\r\n\r\n        [TestMethod]\r\n        public void Money_supports_native_subtraction_syntax()\r\n        {\r\n            var m = new Money(50);\r\n            var m2 = new Money(49);\r\n\r\n            var combined = m - m2;\r\n\r\n            Assert.AreEqual(new Money(1), combined);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "15 - Value Objects/Tests/Tests/DateTime_immutability_tests.cs",
    "content": "﻿using Microsoft.VisualStudio.TestTools.UnitTesting;\r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Text;\r\nusing System.Threading.Tasks;\r\n\r\nnamespace Tests\r\n{\r\n    [TestClass]\r\n    public class DateTime_immutability_tests\r\n    {\r\n        [TestMethod]\r\n        public void AddMonths_creates_new_immutable_DateTime()\r\n        {\r\n            var jan1st = new DateTime(2014, 01, 01);\r\n            var feb1st = jan1st.AddMonths(1);\r\n\r\n            // first object remains unchanged\r\n            Assert.AreEqual(new DateTime(2014, 01, 01), jan1st);\r\n\r\n            // second object is a new immutable instance\r\n            Assert.AreEqual(new DateTime(2014, 02, 01), feb1st);\r\n        }\r\n\r\n        [TestMethod]\r\n        public void AddYears_creates_new_immutable_DateTime()\r\n        {\r\n            var jan2014 = new DateTime(2014, 01, 01);\r\n            var jan2015 = jan2014.AddYears(1);\r\n            var jan2016 = jan2015.AddYears(1);\r\n\r\n            // first object remains unchanged\r\n            Assert.AreEqual(new DateTime(2014, 01, 01), jan2014);\r\n\r\n            // second object remains unchanged\r\n            Assert.AreEqual(new DateTime(2015, 01, 01), jan2015);\r\n\r\n            Assert.AreEqual(new DateTime(2016, 01, 01), jan2016);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "15 - Value Objects/Tests/Tests/Denormalized_persistence_example.cs",
    "content": "﻿using System;\nusing Microsoft.VisualStudio.TestTools.UnitTesting;\nusing NHibernate;\nusing FluentNHibernate.Cfg;\nusing NameWithPersistence;\nusing FluentNHibernate.Cfg.Db;\nusing NHibernate.Cfg;\nusing System.IO;\nusing NHibernate.Tool.hbm2ddl;\nusing FluentNHibernate.Mapping;\nusing NHibernate.UserTypes;\nusing System.Data;\nusing NHibernate.SqlTypes;\n\nnamespace Tests\n{\n    [TestClass]\n    public class Denormalized_persistence_example\n    {\n        ISession session = CreateSession();\n\n        [TestMethod]\n        public void Persisting_denormalized_value_objects()\n        {\n            Guid id = Guid.NewGuid();\n\n            NHibernateTransaction(session => \n            {\n                var name = new Name(\"Kevin\", \"Kingston\");\n                var customer = new Customer(id,  name);\n                session.Save(customer, id);\n            });\n\n            NHibernateTransaction(session =>\n            {\n                var customer = session.Get<Customer>(id);\n\n                var name = new Name(\"Kevin\", \"Kingston\");\n                Assert.AreEqual(name, customer.Name);\n            });\n        }\n\n        private void NHibernateTransaction(Action<ISession> action)\n        {\n            using (var transaction = session.BeginTransaction())\n            {\n                action(session);\n                transaction.Commit();\n            };\n        }\n\n        // See fluent NHibernate docs for more info: https://github.com/jagregory/fluent-nhibernate/wiki/Getting-started\n        private static ISession CreateSession()\n        {\n            Configuration configuration = null;\n\n            // Manually configuring Map. NHibernate supports conventions and advanced features as well\n            var factory = Fluently.Configure()\n                           .Mappings(x => x.FluentMappings.Add(typeof(CustomerMap)))\n                           .Database(SQLiteConfiguration.Standard.InMemory().ShowSql())\n                           .ExposeConfiguration(cfg => configuration = cfg)\n                           .BuildSessionFactory();\n\n            var session = factory.OpenSession();\n\n            BuildSchema(configuration, session);\n\n            return session;\n        }\n\n        private static void BuildSchema(Configuration config, ISession session)\n        {\n            new SchemaExport(config).Execute(true, true, false, session.Connection, null);\n        }\n    }\n\n    // Fluent NHibernate mapping class\n    public class CustomerMap : ClassMap<Customer>\n    {\n        public CustomerMap()\n        {\n            Id(x => x.Id);\n            Map(x => x.Name).CustomType<NameValueObjectPersister>();\n        }\n    }\n\n\n    // NHibernate customisation for custom mapping logic\n    public class NameValueObjectPersister : IUserType\n    {\n        private const int MaxPersistedLength = 100;\n\n        public SqlType[] SqlTypes\n        {\n            get\n            {\n                SqlType[] types = new SqlType[1];\n                types[0] = new SqlType(DbType.String);\n                return types;\n            }\n        }\n\n        public Type ReturnedType\n        {\n            get { return typeof(Name); }\n        }\n\n        public bool IsMutable\n        {\n            get { return false; }\n        }\n\n        public int GetHashCode(object x)\n        {\n            if (x == null)\n            {\n                return 0;\n            }\n            return x.GetHashCode();\n        }\n\n        public object NullSafeGet(IDataReader rs, string[] names, object owner)\n        {\n            object storageRepresenation = NHibernateUtil.String.NullSafeGet(rs, names[0]);\n            if (storageRepresenation == null)\n            {\n                return null;\n            }\n\n            // storage representation format: firstName:{X};;surName:{Y}\n            var parts = storageRepresenation.ToString().Split(new[] { \";;\" }, StringSplitOptions.None);\n            var firstName = parts[0].Split(':')[1];\n            var surName = parts[1].Split(':')[1];\n\n            return new Name(firstName, surName);\n        }\n\n        public void NullSafeSet(IDbCommand cmd, object value, int index)\n        {\n            var parameter = (IDataParameter)cmd.Parameters[index];\n            if (value == null)\n            {\n                parameter.Value = DBNull.Value;\n            }\n            else\n            {\n                parameter.Value = value.ToString();\n            }\n        }\n\n        public object DeepCopy(object value)\n        {\n            // we can ignore it...\n            return value;\n        }\n\n        public object Replace(object original, object target, object owner)\n        {\n            // we can ignore it...\n            return original;\n        }\n\n        public object Assemble(object cached, object owner)\n        {\n            // we can ignore it...\n            return cached;\n        }\n\n        public object Disassemble(object value)\n        {\n            // we can ignore it...\n            return value;\n        }\n\n        bool IUserType.Equals(object x, object y)\n        {\n            return x.Equals(y);\n        }\n    }\n\n}\n"
  },
  {
    "path": "15 - Value Objects/Tests/Tests/Meters_equality_tests.cs",
    "content": "﻿using System;\nusing Microsoft.VisualStudio.TestTools.UnitTesting;\nusing Examples;\n\nnamespace Tests\n{\n    [TestClass]\n    public class Meters_equality_tests\n    {\n        [TestMethod]\n        public void Same_distances_are_equal_even_if_different_references()\n        {\n            var oneMeter = new Meters((decimal)1);\n            var oneMeterX = new Meters((decimal)1);\n            Assert.AreEqual(oneMeter, oneMeterX);\n\n            var fiftyPoint25 = new Meters((decimal)50.25);\n            var fiftyPoint25X = new Meters((decimal)50.25);\n            Assert.AreEqual(fiftyPoint25, fiftyPoint25X);\n        }\n\n        [TestMethod]\n        public void Same_distances_are_equal_even_if_different_references_with_base()\n        {\n            var oneMeter = new Examples.MetersWithBaseClass.Meters((decimal)11.22);\n            var oneMeterX = new Examples.MetersWithBaseClass.Meters((decimal)11.22);\n            Assert.AreEqual(oneMeter, oneMeterX);\n\n            var fiftyMeters = new Examples.MetersWithBaseClass.Meters(50);\n            var fiftyMetersX = new Examples.MetersWithBaseClass.Meters(50);\n            Assert.AreEqual(fiftyMeters, fiftyMetersX);\n        }\n    }\n}\n"
  },
  {
    "path": "15 - Value Objects/Tests/Tests/Micro_types_example_tests.cs",
    "content": "﻿using Examples;\r\nusing Microsoft.VisualStudio.TestTools.UnitTesting;\r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Text;\r\nusing System.Threading.Tasks;\r\n\r\nnamespace Tests\r\n{\r\n    [TestClass]\r\n    public class Micro_types_example_tests\r\n    {\r\n        [TestMethod]\r\n        public void Calculates_overtime_hours_as_hours_additional_to_contracted()\r\n        {\r\n            var hoursWorked = new Hours(40);\r\n            var contractedHours = new Hours(35);\r\n\r\n            // wrap with Micro Types for contextual explicitness\r\n            var hoursWorkedx = new HoursWorked(hoursWorked);\r\n            var contractedHoursx = new ContractedHours(contractedHours);\r\n\r\n            var fiveHours = new Hours(5);\r\n            var fiveHoursOvertime = new OvertimeHours(fiveHours);\r\n\r\n            var result = new OvertimeCalculator().Calculate(hoursWorkedx, contractedHoursx);\r\n            Assert.AreEqual(fiveHoursOvertime, result);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "15 - Value Objects/Tests/Tests/Name_validation_tests.cs",
    "content": "﻿using Examples;\r\nusing Microsoft.VisualStudio.TestTools.UnitTesting;\r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Text;\r\nusing System.Threading.Tasks;\r\n\r\nnamespace Tests\r\n{\r\n    [TestClass]\r\n    public class Name_validation_tests\r\n    {\r\n        [TestMethod]\r\n        public void First_names_cannot_be_empty()\r\n        {\r\n            try\r\n            {\r\n                var name = new Name(\"\", \"Torvalds\");\r\n            }\r\n            catch (ApplicationException e)\r\n            {\r\n                Assert.AreEqual(\"You must specify a first name.\", e.Message);\r\n                return;\r\n            }\r\n\r\n            Assert.Fail(\"No ApplicationException was thrown\");\r\n        }\r\n\r\n        [TestMethod]\r\n        public void Surnames_cannot_be_empty()\r\n        {\r\n            try\r\n            {\r\n                var name = new Name(\"Linus\", \"\");\r\n            }\r\n            catch (ApplicationException e)\r\n            {\r\n                Assert.AreEqual(\"You must specify a surname.\", e.Message);\r\n                return;\r\n            }\r\n\r\n            Assert.Fail(\"No ApplicationException was thrown\");\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "15 - Value Objects/Tests/Tests/Normalized_persistence_example.cs",
    "content": "﻿using FluentNHibernate.Cfg;\nusing FluentNHibernate.Cfg.Db;\nusing FluentNHibernate.Mapping;\nusing Microsoft.VisualStudio.TestTools.UnitTesting;\nusing NHibernate;\nusing NHibernate.Cfg;\nusing NHibernate.Tool.hbm2ddl;\nusing System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\nusing NameWithPersistenceNormalized;\nnamespace Tests\n{\n    [TestClass]\n    public class Normalized_persistence_example\n    {\n        ISession session = CreateSession();\n        \n        [TestMethod]\n        public void Persisting_normalized_value_objects()\n        {\n            Guid id = Guid.NewGuid();\n\n            NHibernateTransaction(session =>\n            {\n                var name = new Name(\"Kevin\", \"Kingston\");\n                var customer = new Customer(id, name);\n                session.Save(customer, id);\n            });\n\n            NHibernateTransaction(session =>\n            {\n                var customer = session.Get<Customer>(id);\n\n                var name = new Name(\"Kevin\", \"Kingston\");\n                Assert.AreEqual(name, customer.Name);\n            });\n        }\n\n        private void NHibernateTransaction(Action<ISession> action)\n        {\n            using (var transaction = session.BeginTransaction())\n            {\n                action(session);\n                transaction.Commit();\n            };\n        }\n\n        // See fluent NHibernate docs for more info: https://github.com/jagregory/fluent-nhibernate/wiki/Getting-started\n        private static ISession CreateSession()\n        {\n            Configuration configuration = null;\n\n            // Manually configuring Map. NHibernate supports conventions and advanced features as well\n            var factory = Fluently.Configure()\n                           .Mappings(x => x.FluentMappings.Add(typeof(CustomerNormalizedMap)))\n                           .Database(SQLiteConfiguration.Standard.InMemory().ShowSql())\n                           .ExposeConfiguration(cfg => configuration = cfg)\n                           .BuildSessionFactory();\n\n            var session = factory.OpenSession();\n\n            BuildSchema(configuration, session);\n\n            return session;\n        }\n\n        private static void BuildSchema(Configuration config, ISession session)\n        {\n            new SchemaExport(config).Execute(true, true, false, session.Connection, null);\n        }\n    }\n}\n\n// Fluent NHibernate mapping class\npublic class CustomerNormalizedMap : ClassMap<Customer>\n{\n    public CustomerNormalizedMap()\n    {\n        Id(x => x.Id);\n\n        // Create a separate table for the Value Object\n        Join(\"CustomerName\", join =>\n        {\n            join.KeyColumn(\"Id\");\n            join.Component(x => x.Name, c =>\n            {\n                c.Map(x => x.FirstName);\n                c.Map(x => x.Surname);\n            });\n        });\n    }\n}\n\n\n"
  },
  {
    "path": "15 - Value Objects/Tests/Tests/Persistence_format_examples.cs",
    "content": "﻿using Microsoft.VisualStudio.TestTools.UnitTesting;\r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Text;\r\nusing System.Threading.Tasks;\r\nusing NameWithPersistence;\r\n\r\nnamespace Tests\r\n{\r\n    [TestClass]\r\n    public class Persistence_format_examples\r\n    {\r\n        [TestMethod]\r\n        public void Each_value_has_a_unique_representation()\r\n        {\r\n            var sallySmith = new Name(\"Sally\", \"Smith\");\r\n            Assert.AreEqual(\"firstName:Sally;;surname:Smith\", sallySmith.ToString());\r\n\r\n            var billyJean = new Name(\"Billy\", \"Jean\");\r\n            Assert.AreEqual(\"firstName:Billy;;surname:Jean\", billyJean.ToString());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "15 - Value Objects/Tests/Tests/Properties/AssemblyInfo.cs",
    "content": "﻿using System.Reflection;\r\nusing System.Runtime.CompilerServices;\r\nusing System.Runtime.InteropServices;\r\n\r\n// General Information about an assembly is controlled through the following \r\n// set of attributes. Change these attribute values to modify the information\r\n// associated with an assembly.\r\n[assembly: AssemblyTitle(\"Tests\")]\r\n[assembly: AssemblyDescription(\"\")]\r\n[assembly: AssemblyConfiguration(\"\")]\r\n[assembly: AssemblyCompany(\"\")]\r\n[assembly: AssemblyProduct(\"Tests\")]\r\n[assembly: AssemblyCopyright(\"Copyright ©  2014\")]\r\n[assembly: AssemblyTrademark(\"\")]\r\n[assembly: AssemblyCulture(\"\")]\r\n\r\n// Setting ComVisible to false makes the types in this assembly not visible \r\n// to COM components.  If you need to access a type in this assembly from \r\n// COM, set the ComVisible attribute to true on that type.\r\n[assembly: ComVisible(false)]\r\n\r\n// The following GUID is for the ID of the typelib if this project is exposed to COM\r\n[assembly: Guid(\"1f4ea8ac-6d49-4ae7-b6fd-a196b12c1711\")]\r\n\r\n// Version information for an assembly consists of the following four values:\r\n//\r\n//      Major Version\r\n//      Minor Version \r\n//      Build Number\r\n//      Revision\r\n//\r\n// You can specify all the values or you can default the Build and Revision Numbers \r\n// by using the '*' as shown below:\r\n// [assembly: AssemblyVersion(\"1.0.*\")]\r\n[assembly: AssemblyVersion(\"1.0.0.0\")]\r\n[assembly: AssemblyFileVersion(\"1.0.0.0\")]\r\n"
  },
  {
    "path": "15 - Value Objects/Tests/Tests/Tests.csproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"12.0\" DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <PropertyGroup>\n    <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>\n    <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>\n    <ProjectGuid>{C7F74BD0-0CBB-47AC-8964-47D8C8E516FD}</ProjectGuid>\n    <OutputType>Library</OutputType>\n    <AppDesignerFolder>Properties</AppDesignerFolder>\n    <RootNamespace>Tests</RootNamespace>\n    <AssemblyName>Tests</AssemblyName>\n    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\n    <FileAlignment>512</FileAlignment>\n    <ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>\n    <VisualStudioVersion Condition=\"'$(VisualStudioVersion)' == ''\">10.0</VisualStudioVersion>\n    <VSToolsPath Condition=\"'$(VSToolsPath)' == ''\">$(MSBuildExtensionsPath32)\\Microsoft\\VisualStudio\\v$(VisualStudioVersion)</VSToolsPath>\n    <ReferencePath>$(ProgramFiles)\\Common Files\\microsoft shared\\VSTT\\$(VisualStudioVersion)\\UITestExtensionPackages</ReferencePath>\n    <IsCodedUITest>False</IsCodedUITest>\n    <TestProjectType>UnitTest</TestProjectType>\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' \">\n    <DebugSymbols>true</DebugSymbols>\n    <DebugType>full</DebugType>\n    <Optimize>false</Optimize>\n    <OutputPath>bin\\Debug\\</OutputPath>\n    <DefineConstants>DEBUG;TRACE</DefineConstants>\n    <ErrorReport>prompt</ErrorReport>\n    <WarningLevel>4</WarningLevel>\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' \">\n    <DebugType>pdbonly</DebugType>\n    <Optimize>true</Optimize>\n    <OutputPath>bin\\Release\\</OutputPath>\n    <DefineConstants>TRACE</DefineConstants>\n    <ErrorReport>prompt</ErrorReport>\n    <WarningLevel>4</WarningLevel>\n  </PropertyGroup>\n  <ItemGroup>\n    <Reference Include=\"EntityFramework\">\n      <HintPath>..\\..\\packages\\EntityFramework.6.1.1\\lib\\net45\\EntityFramework.dll</HintPath>\n    </Reference>\n    <Reference Include=\"EntityFramework.SqlServer\">\n      <HintPath>..\\..\\packages\\EntityFramework.6.1.1\\lib\\net45\\EntityFramework.SqlServer.dll</HintPath>\n    </Reference>\n    <Reference Include=\"FluentNHibernate, Version=1.4.0.0, Culture=neutral, PublicKeyToken=8aa435e3cb308880, processorArchitecture=MSIL\">\n      <SpecificVersion>False</SpecificVersion>\n      <HintPath>..\\..\\packages\\FluentNHibernate.1.4.0.0\\lib\\net35\\FluentNHibernate.dll</HintPath>\n    </Reference>\n    <Reference Include=\"Iesi.Collections, Version=1.0.1.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL\">\n      <SpecificVersion>False</SpecificVersion>\n      <HintPath>..\\..\\packages\\Iesi.Collections.3.2.0.4000\\lib\\Net35\\Iesi.Collections.dll</HintPath>\n    </Reference>\n    <Reference Include=\"NHibernate, Version=3.3.1.4000, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL\">\n      <SpecificVersion>False</SpecificVersion>\n      <HintPath>..\\..\\packages\\NHibernate.3.3.4.4000\\lib\\Net35\\NHibernate.dll</HintPath>\n    </Reference>\n    <Reference Include=\"System\" />\n    <Reference Include=\"System.ComponentModel.DataAnnotations\" />\n    <Reference Include=\"System.Data\" />\n    <Reference Include=\"System.Data.DataSetExtensions\" />\n    <Reference Include=\"System.Data.SQLite\">\n      <HintPath>..\\..\\packages\\System.Data.SQLite.Core.1.0.94.0\\lib\\net45\\System.Data.SQLite.dll</HintPath>\n    </Reference>\n    <Reference Include=\"System.Data.SQLite.EF6\">\n      <HintPath>..\\..\\packages\\System.Data.SQLite.EF6.1.0.94.0\\lib\\net45\\System.Data.SQLite.EF6.dll</HintPath>\n    </Reference>\n    <Reference Include=\"System.Data.SQLite.Linq\">\n      <HintPath>..\\..\\packages\\System.Data.SQLite.Linq.1.0.94.1\\lib\\net45\\System.Data.SQLite.Linq.dll</HintPath>\n    </Reference>\n  </ItemGroup>\n  <Choose>\n    <When Condition=\"('$(VisualStudioVersion)' == '10.0' or '$(VisualStudioVersion)' == '') and '$(TargetFrameworkVersion)' == 'v3.5'\">\n      <ItemGroup>\n        <Reference Include=\"Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL\" />\n      </ItemGroup>\n    </When>\n    <Otherwise>\n      <ItemGroup>\n        <Reference Include=\"Microsoft.VisualStudio.QualityTools.UnitTestFramework\" />\n      </ItemGroup>\n    </Otherwise>\n  </Choose>\n  <ItemGroup>\n    <Compile Include=\"Meters_equality_tests.cs\" />\n    <Compile Include=\"Combining_money_tests.cs\" />\n    <Compile Include=\"DateTime_immutability_tests.cs\" />\n    <Compile Include=\"Micro_types_example_tests.cs\" />\n    <Compile Include=\"Name_validation_tests.cs\" />\n    <Compile Include=\"Denormalized_persistence_example.cs\" />\n    <Compile Include=\"Normalized_persistence_example.cs\" />\n    <Compile Include=\"Persistence_format_examples.cs\" />\n    <Compile Include=\"Properties\\AssemblyInfo.cs\" />\n    <Compile Include=\"TimeSpan_factory_method_tests.cs\" />\n  </ItemGroup>\n  <ItemGroup>\n    <ProjectReference Include=\"..\\..\\Examples\\Examples.csproj\">\n      <Project>{a394b517-c5c1-4891-a484-5753e875af88}</Project>\n      <Name>Examples</Name>\n    </ProjectReference>\n  </ItemGroup>\n  <ItemGroup>\n    <None Include=\"app.config\" />\n    <None Include=\"packages.config\" />\n  </ItemGroup>\n  <Choose>\n    <When Condition=\"'$(VisualStudioVersion)' == '10.0' And '$(IsCodedUITest)' == 'True'\">\n      <ItemGroup>\n        <Reference Include=\"Microsoft.VisualStudio.QualityTools.CodedUITestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL\">\n          <Private>False</Private>\n        </Reference>\n        <Reference Include=\"Microsoft.VisualStudio.TestTools.UITest.Common, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL\">\n          <Private>False</Private>\n        </Reference>\n        <Reference Include=\"Microsoft.VisualStudio.TestTools.UITest.Extension, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL\">\n          <Private>False</Private>\n        </Reference>\n        <Reference Include=\"Microsoft.VisualStudio.TestTools.UITesting, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL\">\n          <Private>False</Private>\n        </Reference>\n      </ItemGroup>\n    </When>\n  </Choose>\n  <Import Project=\"$(VSToolsPath)\\TeamTest\\Microsoft.TestTools.targets\" Condition=\"Exists('$(VSToolsPath)\\TeamTest\\Microsoft.TestTools.targets')\" />\n  <Import Project=\"$(MSBuildToolsPath)\\Microsoft.CSharp.targets\" />\n  <Import Project=\"..\\..\\packages\\System.Data.SQLite.Core.1.0.94.0\\build\\net45\\System.Data.SQLite.Core.targets\" Condition=\"Exists('..\\..\\packages\\System.Data.SQLite.Core.1.0.94.0\\build\\net45\\System.Data.SQLite.Core.targets')\" />\n  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \n       Other similar extension points exist, see Microsoft.Common.targets.\n  <Target Name=\"BeforeBuild\">\n  </Target>\n  <Target Name=\"AfterBuild\">\n  </Target>\n  -->\n</Project>"
  },
  {
    "path": "15 - Value Objects/Tests/Tests/TimeSpan_factory_method_tests.cs",
    "content": "﻿using Microsoft.VisualStudio.TestTools.UnitTesting;\r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Text;\r\nusing System.Threading.Tasks;\r\n\r\nnamespace Tests\r\n{\r\n    [TestClass]\r\n    public class TimeSpan_factory_method_tests\r\n    {\r\n        [TestMethod]\r\n        public void TimeSpan_factory_methods()\r\n        {\r\n            var sixDays = TimeSpan.FromDays(6);\r\n            var threeHours = TimeSpan.FromHours(3);\r\n            var twoMillis = TimeSpan.FromMilliseconds(2);\r\n\r\n            var sixDaysx = new TimeSpan(6, 0, 0, 0, 0);\r\n            var threeHoursx = new TimeSpan(0, 3, 0, 0, 0);\r\n            var twoMillisx = new TimeSpan(0, 0, 0, 0, 2);\r\n\r\n            Assert.AreEqual(sixDays, sixDaysx);\r\n            Assert.AreEqual(threeHours, threeHoursx);\r\n            Assert.AreEqual(twoMillis, twoMillisx);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "15 - Value Objects/Tests/Tests/app.config",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<configuration>\n  <configSections>\n    <section name=\"entityFramework\" type=\"System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\" requirePermission=\"false\" />\n    <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->\n  </configSections>\n  <entityFramework>\n    <defaultConnectionFactory type=\"System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework\" />\n    <providers>\n      <provider invariantName=\"System.Data.SqlClient\" type=\"System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer\" />\n      <provider invariantName=\"System.Data.SQLite.EF6\" type=\"System.Data.SQLite.EF6.SQLiteProviderServices, System.Data.SQLite.EF6\" />\n    </providers>\n  </entityFramework>\n  <system.data>\n    <!--\n        NOTE: The extra \"remove\" element below is to prevent the design-time\n              support components within EF6 from selecting the legacy ADO.NET\n              provider for SQLite (i.e. the one without any EF6 support).  It\n              appears to only consider the first ADO.NET provider in the list\n              within the resulting \"app.config\" or \"web.config\" file.\n    -->\n    <DbProviderFactories>\n      <add name=\"SQLite Data Provider\" invariant=\"System.Data.SQLite\" description=\".NET Framework Data Provider for SQLite\" type=\"System.Data.SQLite.SQLiteFactory, System.Data.SQLite\" />\n      <remove invariant=\"System.Data.SQLite\" />\n      <remove invariant=\"System.Data.SQLite.EF6\" />\n      <add name=\"SQLite Data Provider (Entity Framework 6)\" invariant=\"System.Data.SQLite.EF6\" description=\".NET Framework Data Provider for SQLite (Entity Framework 6)\" type=\"System.Data.SQLite.EF6.SQLiteProviderFactory, System.Data.SQLite.EF6\" />\n    </DbProviderFactories>\n  </system.data>\n</configuration>"
  },
  {
    "path": "15 - Value Objects/Tests/Tests/packages.config",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<packages>\n  <package id=\"EntityFramework\" version=\"6.1.1\" targetFramework=\"net45\" />\n  <package id=\"FluentNHibernate\" version=\"1.4.0.0\" targetFramework=\"net45\" />\n  <package id=\"Iesi.Collections\" version=\"3.2.0.4000\" targetFramework=\"net45\" />\n  <package id=\"NHibernate\" version=\"3.3.4.4000\" targetFramework=\"net45\" />\n  <package id=\"System.Data.SQLite\" version=\"1.0.94.1\" targetFramework=\"net45\" />\n  <package id=\"System.Data.SQLite.Core\" version=\"1.0.94.0\" targetFramework=\"net45\" />\n  <package id=\"System.Data.SQLite.EF6\" version=\"1.0.94.0\" targetFramework=\"net45\" />\n  <package id=\"System.Data.SQLite.Linq\" version=\"1.0.94.1\" targetFramework=\"net45\" />\n</packages>"
  },
  {
    "path": "15 - Value Objects/Tests/Tests.sln",
    "content": "﻿\r\nMicrosoft Visual Studio Solution File, Format Version 12.00\r\n# Visual Studio Express 2013 for Web\r\nVisualStudioVersion = 12.0.21005.1\r\nMinimumVisualStudioVersion = 10.0.40219.1\r\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"Tests\", \"Tests\\Tests.csproj\", \"{C7F74BD0-0CBB-47AC-8964-47D8C8E516FD}\"\r\nEndProject\r\nGlobal\r\n\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\r\n\t\tDebug|Any CPU = Debug|Any CPU\r\n\t\tRelease|Any CPU = Release|Any CPU\r\n\tEndGlobalSection\r\n\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\r\n\t\t{C7F74BD0-0CBB-47AC-8964-47D8C8E516FD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r\n\t\t{C7F74BD0-0CBB-47AC-8964-47D8C8E516FD}.Debug|Any CPU.Build.0 = Debug|Any CPU\r\n\t\t{C7F74BD0-0CBB-47AC-8964-47D8C8E516FD}.Release|Any CPU.ActiveCfg = Release|Any CPU\r\n\t\t{C7F74BD0-0CBB-47AC-8964-47D8C8E516FD}.Release|Any CPU.Build.0 = Release|Any CPU\r\n\tEndGlobalSection\r\n\tGlobalSection(SolutionProperties) = preSolution\r\n\t\tHideSolutionNode = FALSE\r\n\tEndGlobalSection\r\nEndGlobal\r\n"
  },
  {
    "path": "16 - Entities/PPPDDDChap17.Entities.Examples/Customer.cs",
    "content": "﻿using System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Text;\r\nusing System.Threading.Tasks;\r\n\r\nnamespace PPPDDDChap17.Entities.Examples\r\n{\r\n    namespace BloatedCustomer\r\n    {\r\n        public class Customer\r\n        {\r\n            public Customer(Guid id, AddressBook addresses, Orders orderHistory, PaymentDetails paymentDetails, LoyaltySummary loyalty)\r\n            {\r\n                this.Id = id;\r\n                this.Addresses = addresses;\r\n                this.OrderHistory = orderHistory;\r\n                this.PaymentDetails = paymentDetails;\r\n                this.Loyalty = loyalty;\r\n            }\r\n\r\n            public Guid Id { get; private set;}\r\n\r\n            public AddressBook Addresses { get; private set; }\r\n\r\n            public Orders OrderHistory { get; private set; }\r\n\r\n            public PaymentDetails PaymentDetails { get; private set; }\r\n\r\n            public LoyaltySummary Loyalty { get; private set; }\r\n        }\r\n    }\r\n\r\n    namespace DistributionAwareCustomer\r\n    {\r\n        namespace MarketingBoundedContext\r\n        {\r\n            public class Loyalty\r\n            {\r\n                // ..\r\n\r\n                public Guid CustomerId { get; private set; }\r\n\r\n                public LoyaltySummary Loyalty { get; private set; }\r\n\r\n                // ..\r\n            }\r\n        }\r\n\r\n        namespace AccountsBoundedContext\r\n        {\r\n            public class CustomerOrderHistory\r\n            {\r\n                // ..\r\n\r\n                public Guid CustomerId { get; private set; }\r\n\r\n                public Orders Orders { get; private set; }\r\n\r\n                // ..\r\n            }\r\n        }\r\n\r\n        namespace BillingBoundedContext\r\n        {\r\n            public class PaymentDetails\r\n            {\r\n                public Guid CustomerId { get; private set; }\r\n\r\n                public CardDetails Default { get; private set; }\r\n\r\n                public CardDetails Alternate { get; private set; }\r\n\r\n                // ..\r\n            }\r\n        }\r\n\r\n    }\r\n\r\n    // Classes below are bare minimum to support example of Customer above spanning multiple contexts\r\n\r\n        public class AddressBook\r\n        {\r\n            public Address Home { get; private set; }\r\n\r\n            public Address Work { get; private set; }\r\n\r\n            // ..\r\n        }\r\n\r\n        public class Address {}\r\n\r\n        public class Orders\r\n        {\r\n            private IEnumerable<Order> orders;\r\n\r\n            public Orders(IEnumerable<Order> orders)\r\n            {\r\n                this.orders = orders;\r\n            }\r\n\r\n            // ..\r\n        }\r\n\r\n        public class Order\r\n        {\r\n            public Guid Id { get; private set; }\r\n\r\n            // ..\r\n        }\r\n\r\n        public class PaymentDetails\r\n        {\r\n            public CardDetails DefaultPayment { get; private set; }\r\n\r\n            public CardDetails AlternatePayment { get; private set; }\r\n        }\r\n\r\n        public class CardDetails\r\n        {\r\n            public Guid Id { get; private set;}\r\n\r\n            public string Number { get; private set; }\r\n\r\n            public string SecurityCode { get; private set; }\r\n        }\r\n\r\n        public class LoyaltySummary\r\n        {\r\n            public LoyaltyStatus Status { get; private set; }\r\n\r\n            public int Points { get; private set; }\r\n        }\r\n\r\n        public enum LoyaltyStatus\r\n        {\r\n            Gold,\r\n            Silver,\r\n            Bronze\r\n        }\r\n\r\n}\r\n"
  },
  {
    "path": "16 - Entities/PPPDDDChap17.Entities.Examples/Model/Book.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace PPPDDDChap17.Entities.Examples\n{\n    // Entity\n    public class Book\n    {\n        public Book(ISBN isbn)\n        {\n            this.ISBN = isbn;\n            this.Id = isbn.Number;\n        }\n\n        public string Id { get; private set; }\n\n        public ISBN ISBN { get; private set; }\n    }\n\n    // Simplified Value Object - see chapter 16 for robust implementations\n    public class ISBN\n    {\n        public ISBN(string isbn)\n        {\n            Validate(isbn);\n\n            this.Number = isbn;\n        }\n\n        public string Number { get; set; }\n\n        private void Validate(string isbn)\n        {\n            if (isbn.Length != 13 && isbn.Length != 10)\n                throw new Exception(\"ISBN must be 10  or 13 digits long\");\n\n            int outValue = 0;\n            foreach (char c in isbn)\n            {\n                if (!int.TryParse(c.ToString(), out outValue))\n                    throw new Exception(\"ISBNs must contain only digits\");\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "16 - Entities/PPPDDDChap17.Entities.Examples/Model/Dice.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace PPPDDDChap17.Entities.Examples\n{\n    namespace WithSideEffect\n    {\n        public class Dice\n        {\n            private Random r = new Random();\n\n            public Dice(Guid id)\n            {\n                this.Id = id;\n            }\n\n            public Guid Id { get; private set; }\n\n            // Bad: looks like a query, but changes every time\n            public int Value()\n            {\n                return r.Next(1, 7);\n            }\n\n            // ..\n        }\n    }\n\n    namespace SideEffectFree\n    {\n        public class Dice\n        {\n            private Random r = new Random();\n\n            public Dice(Guid id)\n            {\n                this.Id = id;\n            }\n\n            public Guid Id { get; private set; }\n\n            // Good: does not change each time called\n            public int Value { get; private set; }\n\n            // Good: sounds like a command - side-effect expected\n            public void Roll()\n            {\n                Value = r.Next(1, 7);\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "16 - Entities/PPPDDDChap17.Entities.Examples/Model/FlightBooking.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace PPPDDDChap17.Entities.Examples\n{\n    // Validating new departure date would occur prior to Reschedule() being called\n\n    public class FlightBooking\n    {\n        private bool confirmed = false;\n\n        public FlightBooking(Guid id, DateTime departureDate, Guid customerId)\n        {\n            if (id == null)\n                throw new IdMissing();\n\n            if (departureDate == null)\n                throw new DepartureDateMissing();\n\n            if (customerId == null)\n                throw new CustomerIdMissing();\n\n            this.Id = id;\n            this.DepartureDate = departureDate;\n            this.CustomerId = customerId;\n        }\n\n        public Guid Id { get; private set; }\n\n        public DateTime DepartureDate { get; private set; }\n\n        public Guid CustomerId { get; private set; }\n\n        public void Reschedule(DateTime newDeparture)\n        {\n            if (confirmed) throw new RescheduleRejected();\n\n            this.DepartureDate = newDeparture;\n        }\n\n        public void Confirm()\n        {\n            this.confirmed = true;\n        }\n    }\n\n    public class IdMissing : Exception {}\n\n    public class DepartureDateMissing : Exception { }\n\n    public class CustomerIdMissing : Exception { }\n\n    public class RescheduleRejected : Exception { }\n\n    namespace ValidationWithSpecifications\n    {\n        public class FlightBooking\n        {\n            Specification<FlightBooking> ffSpec = new FrequentFlyersCanRescheduleAfterBookingConfirmation();\n            Specification<FlightBooking> ndSpec = new NoDepartureReschedulingAfterBookingConfirmation();\n            Specification<FlightBooking> spec;\n\n            public FlightBooking(Guid Id, DateTime departureDate, Guid customerId, CustomerStatus customerStatus)\n            {\n                this.Id = Id;\n                this.DepartureDate = departureDate;\n                this.CustomerId = customerId;\n                this.CustomerStatus = customerStatus;\n                this.Confirmed = false;\n                spec = ffSpec.Or(ndSpec);\n            }\n\n            public Guid Id { get; private set; }\n\n            public DateTime DepartureDate { get; private set; }\n\n            public Guid CustomerId { get; private set; }\n\n            public bool Confirmed { get; private set; }\n\n            public CustomerStatus CustomerStatus { get; private set; }\n\n            public void Reschedule(DateTime newDeparture)\n            {\n                if (!spec.IsSatisfiedBy(this)) throw new RescheduleRejected();\n\n                this.DepartureDate = newDeparture;\n            }\n\n            public void Confirm()\n            {\n                this.Confirmed = true;\n            }\n        }\n\n        public class NoDepartureReschedulingAfterBookingConfirmation : Specification<FlightBooking>\n        {\n            public override bool IsSatisfiedBy(FlightBooking booking)\n            {\n                return !booking.Confirmed;\n            }\n        }\n\n        public class FrequentFlyersCanRescheduleAfterBookingConfirmation : Specification<FlightBooking>\n        {\n            public override bool IsSatisfiedBy(FlightBooking booking)\n            {\n                return booking.CustomerStatus == CustomerStatus.FrequentFlyer\n                    || booking.CustomerStatus == CustomerStatus.Gold;\n            }\n        }\n\n        public class OrSpecification<T> : Specification<T>\n        {\n            private Specification<T> first;\n            private Specification<T> second;\n\n            public OrSpecification(Specification<T> first, Specification<T> second)\n            {\n                this.first = first;\n                this.second = second;\n            }\n\n            public override bool IsSatisfiedBy(T entity)\n            {\n                return first.IsSatisfiedBy(entity) || second.IsSatisfiedBy(entity);\n            }\n        }\n\n        public abstract class Specification<T> \n        {\n            public Specification<T> Or(Specification<T> specification)\n            {\n                return new OrSpecification<T>(this, specification);\n            }\n\n            public abstract bool IsSatisfiedBy(T entity);\n\n        }\n\n        public enum CustomerStatus\n        {\n            Regular,\n            FrequentFlyer,\n            Gold\n        }\n    }\n}\n"
  },
  {
    "path": "16 - Entities/PPPDDDChap17.Entities.Examples/Model/GlobalCounter.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace PPPDDDChap17.Entities.Examples\n{\n    public static class RandomEntityFactory\n    {\n        private static long lastId = 0;\n\n        public static RandomEntity CreateEntity()\n        {\n            return new RandomEntity(++lastId);\n        }\n    }\n\n    public class RandomEntity\n    {\n        public RandomEntity(long Id)\n        {\n            this.Id = Id;\n        }\n\n        public long Id { get; private set; }\n    }\n}\n"
  },
  {
    "path": "16 - Entities/PPPDDDChap17.Entities.Examples/Model/HolidayBooking.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace PPPDDDChap17.Entities.Examples\n{\n    public class HolidayBooking\n    {\n        public HolidayBooking(int travelerId, DateTime firstNight, DateTime lastNight, DateTime booked)\n        {\n            // validate\n\n            this.TravelerId = travelerId;\n            this.FirstNight = firstNight;\n            this.LastNight = lastNight;\n            this.Booked = booked;\n            this.Id = GenerateId(travelerId, firstNight, lastNight, booked);\n        }\n\n        public string Id { get; private set; }\n\n        public int TravelerId { get; private set; }\n\n        public DateTime FirstNight { get; private set; }\n\n        public DateTime LastNight { get; private set; }\n\n        public DateTime Booked { get; private set; }\n\n        // This could be pulled out into a factory and passed in based on contextual needs\n        private string GenerateId(int travelerId, DateTime firstNight, DateTime lastNight, DateTime booked)\n        {\n            return string.Format(\n                \"{0}-{1}-{2}-{3}\",\n                travelerId, ToIdFormat(firstNight), ToIdFormat(lastNight), ToIdFormat(booked)\n            );\n        }\n\n        private string ToIdFormat(DateTime date)\n        {\n            return date.ToString(\"yyyy/MM/dd\");\n        }\n\n        // ..\n    }\n\n    namespace PushingBehaviorToValueObject\n    {\n        public class HolidayBooking\n        {\n            public HolidayBooking(int travelerId, Stay stay, DateTime booked)\n            {\n                this.TravelerId = travelerId;\n                this.Stay = stay;\n                this.Booked = booked;\n                this.Id = GenerateId(travelerId, stay.FirstNight, stay.LastNight, booked);\n            }\n\n            public string Id { get; private set; }\n\n            public int TravelerId { get; private set; }\n\n            public Stay Stay { get; private set; }\n\n            public DateTime Booked { get; private set; }\n\n            private string GenerateId(int travelerId, DateTime firstNight, DateTime lastNight, DateTime booked)\n            {\n                return string.Format(\n                    \"{0}-{1}-{2}-{3}\",\n                    travelerId, ToIdFormat(firstNight), ToIdFormat(lastNight), ToIdFormat(booked)\n                );\n            }\n\n            private string ToIdFormat(DateTime date)\n            {\n                return date.ToString(\"yyyy/MM/dd\");\n            }\n\n        }\n\n        // value object\n        public class Stay\n        {\n            public Stay(DateTime firstNight, DateTime lastNight)\n            {\n                if (firstNight > lastNight)\n                    throw new FirstNightOfStayCannotBeAfterLastNight();\n\n                if (DoesNotMeetMinimumStayDuration(firstNight, LastNight))\n                    throw new StayDoesNotMeetMinimumDuration();\n\n                this.FirstNight = firstNight;\n                this.LastNight = lastNight;\n            }\n\n            public DateTime FirstNight { get; private set; }\n\n            public DateTime LastNight { get; private set; }\n\n            private bool DoesNotMeetMinimumStayDuration(DateTime firstNight, DateTime lastNight)\n            {\n                return (lastNight - firstNight) < TimeSpan.FromDays(3);\n            }\n        }\n\n        public class FirstNightOfStayCannotBeAfterLastNight : Exception { }\n\n        public class StayDoesNotMeetMinimumDuration : Exception { }\n    }\n}\n"
  },
  {
    "path": "16 - Entities/PPPDDDChap17.Entities.Examples/Model/Hotel.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace PPPDDDChap17.Entities.Examples\n{\n    public class Hotel\n    {\n        public Hotel(Guid id, HotelAvailability initialAvailability, HotelRoomSummary rooms)\n        {\n            EnforceInvariants(rooms);\n            this.Id = id;\n            this.Availability = initialAvailability;\n            this.Rooms = rooms;\n        }\n\n        private void EnforceInvariants(HotelRoomSummary rooms)\n        {\n            if (rooms.NumberOfSingleRooms < 1 && \n                rooms.NumberOfDoubleRooms < 1 && \n                rooms.NumberOfFamilyRooms < 1)\n                throw new HotelsMustHaveRooms();\n        }\n\n        public Guid Id { get; private set; }\n\n        public HotelAvailability Availability { get; private set; }\n\n        public HotelRoomSummary Rooms { get; private set; }\n        \n        // Other responsiblities: facilities, events, staff details\n    }\n\n    // Value Object - see chapter 16 for full-feature Value Objects\n    public class HotelAvailability\n    {\n        public HotelAvailability(RoomAvailability singleRooms, RoomAvailability doubleRooms,\n            RoomAvailability FamilyRooms)\n        {\n            this.SingleRooms = singleRooms;\n            this.DoubleRooms = doubleRooms;\n            this.FamilyRooms = FamilyRooms;\n        }\n\n        // These are private so encapsulated. Only Hotel.Availability is accessible from outside the Entity\n        private RoomAvailability SingleRooms { get; set; }\n\n        private RoomAvailability DoubleRooms { get; set; }\n\n        private RoomAvailability FamilyRooms { get; set; }\n\n        public bool HasSingleRoomAvailability(DateTime start, DateTime end)\n        {\n            return GetSingleRoomAvailability(start, end) != null;\n        }\n\n        public bool HasDoubleRoomAvailability(DateTime start, DateTime end)\n        {\n            return GetDoubleRoomAvailability(start, end) != null;\n        }\n\n        public bool HasFamilyRoomAvailability(DateTime start, DateTime end)\n        {\n            return GetFamilyRoomAvailability(start, end) != null;\n        }\n\n        public Money GetSingleRoomPriceFor(DateTime start, DateTime end)\n        {\n            return GetSingleRoomAvailability(start, end).PricePerNight;\n        }\n\n        public Money GetDoubleRoomPriceFor(DateTime start, DateTime end)\n        {\n            return GetDoubleRoomAvailability(start, end).PricePerNight;\n        }\n\n        public Money GetFamilyRoomPriceFor(DateTime start, DateTime end)\n        {\n            return GetFamilyRoomAvailability(start, end).PricePerNight;\n        }\n\n        private AvailableBookingSlot GetSingleRoomAvailability(DateTime start, DateTime end)\n        {\n            return SingleRooms.Dates.SingleOrDefault(dr => dr.Start <= start && dr.End >= end);\n        }\n\n        private AvailableBookingSlot GetDoubleRoomAvailability(DateTime start, DateTime end)\n        {\n            return DoubleRooms.Dates.SingleOrDefault(dr => dr.Start <= start && dr.End >= end);\n        }\n\n        private AvailableBookingSlot GetFamilyRoomAvailability(DateTime start, DateTime end)\n        {\n            return FamilyRooms.Dates.SingleOrDefault(dr => dr.Start <= start && dr.End >= end);\n        }\n\n    }\n\n    public class RoomAvailability\n    {\n        public IEnumerable<AvailableBookingSlot> Dates { get; private set; }\n    }\n\n    public class AvailableBookingSlot\n    {\n        public AvailableBookingSlot(DateTime start, DateTime end)\n        {\n            this.Start = start;\n            this.End = end;\n        }\n\n        public DateTime Start { get; private set; }\n\n        public DateTime End { get; private set; }\n\n        public Money PricePerNight { get; private set; }\n\n        public int Rooms { get; private set; }\n    }\n\n    // See chapter 16 full a full Money Value Object implementation\n    public class Money \n    {\n        protected readonly decimal Value;\n\n        public Money()\n            : this(0m)\n        {\n        }\n\n        public Money(decimal value)\n        {\n            Value = value;\n        }\n    }\n\n    public class HotelRoomSummary\n    {\n        public HotelRoomSummary(int singleRooms, int doubleRooms, int familyRooms)\n        {\n            this.NumberOfSingleRooms = singleRooms;\n            this.NumberOfDoubleRooms = doubleRooms;\n            this.NumberOfFamilyRooms = familyRooms;\n        }\n\n        public int NumberOfSingleRooms { get; private set; }\n\n        public int NumberOfDoubleRooms { get; private set; }\n\n        public int NumberOfFamilyRooms { get; private set; }\n    }\n\n    public class HotelsMustHaveRooms : Exception { }\n}\n\n"
  },
  {
    "path": "16 - Entities/PPPDDDChap17.Entities.Examples/Model/OnlineTakeawayOrder.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace PPPDDDChap17.Entities.Examples\n{\n    namespace WithExplicitModelling\n    {\n        public class InKitchenOnlineTakeawayOrder\n        {\n            public InKitchenOnlineTakeawayOrder(Guid id, Address address)\n            {\n                this.Id = id;\n                this.Address = address;\n            }\n\n            public Guid Id { get; private set; }\n\n            public Address Address { get; private set; }\n\n            // Only contains methods it actually impelements\n            // returns new state so that clients have to be aware of it\n            public InOvenOnlineTakeawayOrder Cook()\n            {\n                // ..\n                return new InOvenOnlineTakeawayOrder(this.Id, this.Address);\n            }\n        }\n\n        public class InOvenOnlineTakeawayOrder\n        {\n            public InOvenOnlineTakeawayOrder(Guid id, Address address)\n            {\n                this.Id = id;\n                this.Address = address;\n            }\n\n            public Guid Id { get; private set; }\n\n            public Address Address { get; private set; }\n\n            public CookedOnlineTakeawayOrder TakeOutOfOven()\n            {\n                // ..\n                return new CookedOnlineTakeawayOrder(this.Id, this.Address);\n            }\n        }\n\n        public class CookedOnlineTakeawayOrder\n        {\n            public CookedOnlineTakeawayOrder(Guid id, Address address)\n            {\n                this.Id = id;\n                this.Address = address;\n            }\n\n            public Guid Id { get; private set; }\n\n            public Address Address { get; private set; }\n\n            public OutForDeliveryOnlineTakeawayOrder Package()\n            {\n                // ..\n                return new OutForDeliveryOnlineTakeawayOrder(this.Id, this.Address);\n            }\n        }\n\n        public class OutForDeliveryOnlineTakeawayOrder\n        {\n            public OutForDeliveryOnlineTakeawayOrder(Guid id, Address address)\n            {\n                this.Id = id;\n                this.Address = address;\n            }\n\n            public Guid Id { get; private set; }\n\n            public Address Address { get; private set; }\n\n            public void Deliver()\n            {\n                // ..\n            }\n        }\n            \n    }\n    namespace WithNoisyStatePattern\n    {\n        public class OnlineTakeawayOrder\n        {\n            private IOnlineTakeawayOrderState state;\n\n            public OnlineTakeawayOrder(Guid id, Address address)\n            {\n                this.Id = id;\n                this.Address = address;\n                this.state = new InKitchenQueue(this);\n            }\n\n            public Guid Id { get; private set; }\n\n            public Address Address { get; private set; }\n\n            public void Cook()\n            {\n                state = state.Cook();\n            }\n\n            public void TakeOutOfOven()\n            {\n                state = state.TakeOutOfOven();\n            }\n\n            public void Package()\n            {\n                state = state.Package();\n            }\n\n            public void Deliver()\n            {\n                state = state.Deliver();\n            }\n        }\n\n        public interface IOnlineTakeawayOrderState\n        {\n            IOnlineTakeawayOrderState Cook();\n\n            IOnlineTakeawayOrderState TakeOutOfOven();\n\n            IOnlineTakeawayOrderState Package();\n\n            IOnlineTakeawayOrderState Deliver();\n        }\n\n        public class InKitchenQueue : IOnlineTakeawayOrderState\n        {\n            private OnlineTakeawayOrder order;\n\n            public InKitchenQueue(OnlineTakeawayOrder order)\n            {\n                this.order = order;\n            }\n\n            public IOnlineTakeawayOrderState Cook()\n            {\n                // handle this scenario accordingly\n                return new InOven(order);\n            }\n\n            public IOnlineTakeawayOrderState TakeOutOfOven()\n            {\n                throw new ActionNotPermittedInThisState();\n            }\n\n            public IOnlineTakeawayOrderState Package()\n            {\n                throw new ActionNotPermittedInThisState();\n            }\n\n            public IOnlineTakeawayOrderState Deliver()\n            {\n                throw new ActionNotPermittedInThisState();\n            }\n        }\n\n        public class InOven : IOnlineTakeawayOrderState\n        {\n            private OnlineTakeawayOrder order;\n\n            public InOven(OnlineTakeawayOrder order)\n            {\n                this.order = order;\n            }\n\n            public IOnlineTakeawayOrderState Cook()\n            {\n                throw new ActionNotPermittedInThisState();\n            }\n\n            public IOnlineTakeawayOrderState TakeOutOfOven()\n            {\n                // handle this scenario accordingly\n                return new Cooked(order);\n            }\n\n            public IOnlineTakeawayOrderState Package()\n            {\n                throw new ActionNotPermittedInThisState();\n            }\n\n            public IOnlineTakeawayOrderState Deliver()\n            {\n                throw new ActionNotPermittedInThisState();\n            }\n        }\n\n        public class Cooked : IOnlineTakeawayOrderState\n        {\n            private OnlineTakeawayOrder order;\n\n            public Cooked(OnlineTakeawayOrder order)\n            {\n                this.order = order;\n            }\n\n            public IOnlineTakeawayOrderState Cook()\n            {\n                throw new ActionNotPermittedInThisState();\n            }\n\n            public IOnlineTakeawayOrderState TakeOutOfOven()\n            {\n                throw new ActionNotPermittedInThisState();\n            }\n\n            public IOnlineTakeawayOrderState Package()\n            {\n                // handle this scenario accordingly\n                return new OutForDelivery(order);\n            }\n\n            public IOnlineTakeawayOrderState Deliver()\n            {\n                throw new ActionNotPermittedInThisState();\n            }\n        }\n\n        public class OutForDelivery : IOnlineTakeawayOrderState\n        {\n            private OnlineTakeawayOrder order;\n\n            public OutForDelivery(OnlineTakeawayOrder order)\n            {\n                this.order = order;\n            }\n\n            public IOnlineTakeawayOrderState Cook()\n            {\n                throw new ActionNotPermittedInThisState();\n            }\n\n            public IOnlineTakeawayOrderState TakeOutOfOven()\n            {\n                throw new ActionNotPermittedInThisState();\n            }\n\n            public IOnlineTakeawayOrderState Package()\n            {\n                throw new ActionNotPermittedInThisState();\n            }\n\n            public IOnlineTakeawayOrderState Deliver()\n            {\n                // handle this scenario accordingly\n                return new Delivered(order);\n            }\n        }\n\n        public class Delivered : IOnlineTakeawayOrderState\n        {\n            private OnlineTakeawayOrder order;\n\n            public Delivered(OnlineTakeawayOrder order)\n            {\n                this.order = order;\n            }\n\n            public IOnlineTakeawayOrderState Cook()\n            {\n                throw new ActionNotPermittedInThisState();\n            }\n\n            public IOnlineTakeawayOrderState TakeOutOfOven()\n            {\n                throw new ActionNotPermittedInThisState();\n            }\n\n            public IOnlineTakeawayOrderState Package()\n            {\n                throw new ActionNotPermittedInThisState();\n            }\n\n            public IOnlineTakeawayOrderState Deliver()\n            {\n                throw new ActionNotPermittedInThisState();\n            }\n        }\n\n        public class ActionNotPermittedInThisState : Exception { }\n    }\n\n    // See chapter 16 for proper Value Object examples\n    public class Address\n    {\n        public string PhoneNumber { get; private set; }\n\n        public string HouseNameOrNumber { get; private set; }\n\n        public string Code { get; private set; }\n    }\n}\n"
  },
  {
    "path": "16 - Entities/PPPDDDChap17.Entities.Examples/Model/SoccerMatch.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace PPPDDDChap17.Entities.Examples\n{\n    namespace DataFocused\n    {\n        // This is a poorly-designed class. It exposes only data - leading to an anaemic domain model\n        // In addition, logic for calculating the winner could be erroneously duplicated\n        // in other parts of the application\n        public class SoccerCupMatch\n        {\n            public SoccerCupMatch(Guid id, Scores team1Scores, Scores team2Scores)\n            {\n                if (id == null)\n                    throw new ArgumentNullException(\"Soccer cup match ID cannot be null\");\n\n                if (team1Scores == null)\n                    throw new ArgumentNullException(\"Team 1 scores cannot be null\");\n\n                if (team2Scores == null)\n                    throw new ArgumentNullException(\"Team 2 scores cannot be null\");\n\n                this.ID = id;\n                this.Team1Scores = team1Scores;\n                this.Team2Scores = team2Scores;\n            }\n\n            public Guid ID { get; private set; }\n\n            public Scores Team1Scores { get; set; }\n\n            public Scores Team2Scores { get; set; }\n        }\n    }\n    \n    namespace BehaviorFocused\n    {\n        public class SoccerCupMatch\n        {\n            public SoccerCupMatch(Guid id, Scores team1Scores, Scores team2Scores)\n            {\n                if (id == null)\n                    throw new ArgumentNullException(\"Soccer cup match ID cannot be null\");\n\n                if (team1Scores == null)\n                    throw new ArgumentNullException(\"Team 1 scores cannot be null\");\n\n                if (team2Scores == null)\n                    throw new ArgumentNullException(\"Team 2 scores cannot be null\");\n\n                this.ID = id;\n                this.Team1Scores = team1Scores;\n                this.Team2Scores = team2Scores;\n            }\n\n            public Guid ID { get; private set; }\n\n            private Scores Team1Scores { get; set; }\n\n            private Scores Team2Scores { get; set; }\n\n            public Scores WinningTeamScores\n            {\n                get\n                {\n                    if (Team1Scores.TotalScore > Team2Scores.TotalScore) \n                        return Team1Scores;\n\n                    if (Team2Scores.TotalScore > Team1Scores.TotalScore) \n                        return Team2Scores;\n\n                    var awayGoalsWinner = FindWinnerUsingAwayGoalsRule();\n                    if (awayGoalsWinner == null)\n                        return FindWinnerOfPenaltyShootout();\n                    else \n                        return awayGoalsWinner;\n                }\n            }\n\n            private Scores FindWinnerUsingAwayGoalsRule()\n            {\n                if (Team1Scores.AwayLegGoals > Team2Scores.AwayLegGoals)\n                    return Team1Scores;\n\n                if (Team2Scores.AwayLegGoals > Team1Scores.AwayLegGoals)\n                    return Team2Scores;\n\n                // The scores were exactly the same so no away goals winners\n                return null;\n            }\n\n            private Scores FindWinnerOfPenaltyShootout()\n            {\n                if (Team1Scores.ShootoutScore > Team2Scores.ShootoutScore)\n                    return Team1Scores;\n\n                if (Team2Scores.ShootoutScore > Team1Scores.ShootoutScore)\n                    return Team2Scores;\n\n                throw new ThereWasNoPenaltyShootout();\n            }\n        }\n    }\n\n    public class Scores\n    {\n        public Scores(Guid teamId, int homeLegGoals, int awayLegGoals, int shootoutScore)\n        {\n            this.TeamID = teamId;\n            this.HomeLegGoals = homeLegGoals;\n            this.AwayLegGoals = awayLegGoals;\n            this.ShootoutScore = shootoutScore;\n        }\n\n        public Guid TeamID { get; private set; }\n\n        public int HomeLegGoals { get; private set; }\n\n        public int AwayLegGoals { get; private set; }\n\n        public int ShootoutScore { get; private set; }\n\n        public int TotalScore \n        {\n            get \n            {\n                return HomeLegGoals + AwayLegGoals;\n            }\n        }\n    }\n\n    public class ThereWasNoPenaltyShootout : Exception { }\n\n}\n"
  },
  {
    "path": "16 - Entities/PPPDDDChap17.Entities.Examples/Model/Vehicle.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace PPPDDDChap17.Entities.Examples\n{\n    // Factory used for example - not mandatory\n    public static class VehicleFactory\n    {\n        public static Vehicle CreateVehicle()\n        {\n            var id = Guid.NewGuid();\n            return new Vehicle(id);\n        }\n    }\n    \n    public class Vehicle\n    {\n        public Vehicle(Guid id)\n        {\n            this.Id = id;\n        }\n\n        public Guid Id { get; private set; }\n    }\n}\n"
  },
  {
    "path": "16 - Entities/PPPDDDChap17.Entities.Examples/PPPDDDChap17.Entities.Examples.csproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"12.0\" DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <Import Project=\"$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props\" Condition=\"Exists('$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props')\" />\n  <PropertyGroup>\n    <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>\n    <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>\n    <ProjectGuid>{CF5DC1DC-18B2-44EC-B316-BBDC78816F7B}</ProjectGuid>\n    <OutputType>Library</OutputType>\n    <AppDesignerFolder>Properties</AppDesignerFolder>\n    <RootNamespace>PPPDDDChap17.Entities.Examples</RootNamespace>\n    <AssemblyName>PPPDDDChap17.Entities.Examples</AssemblyName>\n    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\n    <FileAlignment>512</FileAlignment>\n    <SolutionDir Condition=\"$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'\">..\\</SolutionDir>\n    <RestorePackages>true</RestorePackages>\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' \">\n    <DebugSymbols>true</DebugSymbols>\n    <DebugType>full</DebugType>\n    <Optimize>false</Optimize>\n    <OutputPath>bin\\Debug\\</OutputPath>\n    <DefineConstants>DEBUG;TRACE</DefineConstants>\n    <ErrorReport>prompt</ErrorReport>\n    <WarningLevel>4</WarningLevel>\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' \">\n    <DebugType>pdbonly</DebugType>\n    <Optimize>true</Optimize>\n    <OutputPath>bin\\Release\\</OutputPath>\n    <DefineConstants>TRACE</DefineConstants>\n    <ErrorReport>prompt</ErrorReport>\n    <WarningLevel>4</WarningLevel>\n  </PropertyGroup>\n  <ItemGroup>\n    <Reference Include=\"FluentNHibernate\">\n      <HintPath>..\\packages\\FluentNHibernate.1.4.0.0\\lib\\net35\\FluentNHibernate.dll</HintPath>\n    </Reference>\n    <Reference Include=\"Iesi.Collections\">\n      <HintPath>..\\packages\\Iesi.Collections.4.0.1.4000\\lib\\net40\\Iesi.Collections.dll</HintPath>\n    </Reference>\n    <Reference Include=\"NHibernate\">\n      <HintPath>..\\packages\\NHibernate.4.0.0.4000\\lib\\net40\\NHibernate.dll</HintPath>\n    </Reference>\n    <Reference Include=\"System\" />\n    <Reference Include=\"System.Core\" />\n    <Reference Include=\"System.Xml.Linq\" />\n    <Reference Include=\"System.Data.DataSetExtensions\" />\n    <Reference Include=\"Microsoft.CSharp\" />\n    <Reference Include=\"System.Data\" />\n    <Reference Include=\"System.Xml\" />\n  </ItemGroup>\n  <ItemGroup>\n    <Compile Include=\"Model\\Book.cs\" />\n    <Compile Include=\"Model\\Dice.cs\" />\n    <Compile Include=\"Model\\FlightBooking.cs\" />\n    <Compile Include=\"Model\\GlobalCounter.cs\" />\n    <Compile Include=\"Model\\HolidayBooking.cs\" />\n    <Compile Include=\"Model\\Hotel.cs\" />\n    <Compile Include=\"Model\\OnlineTakeawayOrder.cs\" />\n    <Compile Include=\"Properties\\AssemblyInfo.cs\" />\n    <Compile Include=\"Model\\SoccerMatch.cs\" />\n    <Compile Include=\"Model\\Vehicle.cs\" />\n  </ItemGroup>\n  <ItemGroup>\n    <None Include=\"packages.config\" />\n  </ItemGroup>\n  <ItemGroup>\n    <Folder Include=\"Application\\\" />\n    <Folder Include=\"Infrastructure\\\" />\n  </ItemGroup>\n  <Import Project=\"$(MSBuildToolsPath)\\Microsoft.CSharp.targets\" />\n  <Import Project=\"$(SolutionDir)\\.nuget\\NuGet.targets\" Condition=\"Exists('$(SolutionDir)\\.nuget\\NuGet.targets')\" />\n  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \n       Other similar extension points exist, see Microsoft.Common.targets.\n  <Target Name=\"BeforeBuild\">\n  </Target>\n  <Target Name=\"AfterBuild\">\n  </Target>\n  -->\n</Project>"
  },
  {
    "path": "16 - Entities/PPPDDDChap17.Entities.Examples/Properties/AssemblyInfo.cs",
    "content": "﻿using System.Reflection;\r\nusing System.Runtime.CompilerServices;\r\nusing System.Runtime.InteropServices;\r\n\r\n// General Information about an assembly is controlled through the following \r\n// set of attributes. Change these attribute values to modify the information\r\n// associated with an assembly.\r\n[assembly: AssemblyTitle(\"PPPDDDChap17.Entities.Examples\")]\r\n[assembly: AssemblyDescription(\"\")]\r\n[assembly: AssemblyConfiguration(\"\")]\r\n[assembly: AssemblyCompany(\"\")]\r\n[assembly: AssemblyProduct(\"PPPDDDChap17.Entities.Examples\")]\r\n[assembly: AssemblyCopyright(\"Copyright ©  2014\")]\r\n[assembly: AssemblyTrademark(\"\")]\r\n[assembly: AssemblyCulture(\"\")]\r\n\r\n// Setting ComVisible to false makes the types in this assembly not visible \r\n// to COM components.  If you need to access a type in this assembly from \r\n// COM, set the ComVisible attribute to true on that type.\r\n[assembly: ComVisible(false)]\r\n\r\n// The following GUID is for the ID of the typelib if this project is exposed to COM\r\n[assembly: Guid(\"33e2a572-fc8c-4228-a363-40ffd76afca0\")]\r\n\r\n// Version information for an assembly consists of the following four values:\r\n//\r\n//      Major Version\r\n//      Minor Version \r\n//      Build Number\r\n//      Revision\r\n//\r\n// You can specify all the values or you can default the Build and Revision Numbers \r\n// by using the '*' as shown below:\r\n// [assembly: AssemblyVersion(\"1.0.*\")]\r\n[assembly: AssemblyVersion(\"1.0.0.0\")]\r\n[assembly: AssemblyFileVersion(\"1.0.0.0\")]\r\n"
  },
  {
    "path": "16 - Entities/PPPDDDChap17.Entities.Examples/packages.config",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<packages>\r\n  <package id=\"FluentNHibernate\" version=\"1.4.0.0\" targetFramework=\"net45\" />\r\n  <package id=\"Iesi.Collections\" version=\"4.0.1.4000\" targetFramework=\"net45\" />\r\n  <package id=\"NHibernate\" version=\"4.0.0.4000\" targetFramework=\"net45\" />\r\n</packages>"
  },
  {
    "path": "16 - Entities/PPPDDDChap17.Entities.Tests/BookTests.cs",
    "content": "﻿using System;\r\nusing Microsoft.VisualStudio.TestTools.UnitTesting;\r\nusing PPPDDDChap17.Entities.Examples;\r\n\r\nnamespace PPPDDDChap17.Entities.Tests\r\n{\r\n    [TestClass]\r\n    public class BookTests\r\n    {\r\n        [TestMethod]\r\n        public void Books_identity_is_its_ISBN()\r\n        {\r\n            var isbnForThisBook = \"9781118714706\";\r\n            var isbn = new ISBN(isbnForThisBook);\r\n\r\n            var book = new Book(isbn);\r\n\r\n            Assert.AreEqual(isbn, book.ISBN);\r\n            Assert.AreEqual(isbnForThisBook, book.Id);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "16 - Entities/PPPDDDChap17.Entities.Tests/DatastoreIdGenerationExample.cs",
    "content": "﻿using System;\nusing Microsoft.VisualStudio.TestTools.UnitTesting;\nusing NHibernate;\nusing FluentNHibernate.Cfg;\nusing FluentNHibernate.Cfg.Db;\nusing NHibernate.Cfg;\nusing NHibernate.Tool.hbm2ddl;\nusing FluentNHibernate.Mapping;\nusing PPPDDDChap17.Entities.Examples;\nusing System.IO;\n\nnamespace PPPDDDChap17.Entities.Tests\n{\n    [TestClass]\n    public class DatastoreIdGenerationExample\n    {\n        ISession session = CreateSession();\n\n        [TestMethod]\n        public void Id_is_set_by_datastore_via_ORM()\n        {\n            var entity1 = new IdTestEntity();\n            var entity2 = new IdTestEntity();\n\n            // initially no id\n            Assert.AreEqual(0, entity1.Id);\n            Assert.AreEqual(0, entity2.Id);\n\n            NHibernateTransaction(session =>\n            {\n                session.Save(entity1);\n                session.Save(entity2);\n            });\n\n            // id will have been set via NHibernate\n            Assert.AreEqual(1, entity1.Id);\n            Assert.AreEqual(2, entity2.Id);\n        }\n\n        private void NHibernateTransaction(Action<ISession> action)\n        {\n            using (var transaction = session.BeginTransaction())\n            {\n                action(session);\n                transaction.Commit();\n            };\n        }\n\n        // See fluent NHibernate docs for more info: https://github.com/jagregory/fluent-nhibernate/wiki/Getting-started\n        private static ISession CreateSession()\n        {\n            Configuration configuration = null;\n\n            // Manually configuring Map. NHibernate supports conventions and advanced features as well\n            var factory = Fluently.Configure()\n                           .Mappings(x => x.FluentMappings.Add(typeof(IdTestEntityMap)))\n                           .Database(SQLiteConfiguration.Standard.InMemory().ShowSql())\n                           .ExposeConfiguration(cfg => configuration = cfg)\n                           .BuildSessionFactory();\n\n            var session = factory.OpenSession();\n\n            BuildSchema(configuration, session);\n\n            return session;\n        }\n\n        private static void BuildSchema(Configuration config, ISession session)\n        {\n            new SchemaExport(config).Execute(true, true, false, session.Connection, null);\n        }\n    }\n\n    public class IdTestEntity\n    {\n        public virtual int Id { get; protected set; }\n    }\n\n    // Fluent NHibernate mapping class\n    public class IdTestEntityMap : ClassMap<IdTestEntity>\n    {\n        public IdTestEntityMap()\n        {\n            Id(x => x.Id);\n        }\n    }\n}\n"
  },
  {
    "path": "16 - Entities/PPPDDDChap17.Entities.Tests/FlightBookingTests.cs",
    "content": "﻿using System;\nusing Microsoft.VisualStudio.TestTools.UnitTesting;\nusing PPPDDDChap17.Entities.Examples;\n\nnamespace PPPDDDChap17.Entities.Tests\n{\n    [TestClass]\n    public class FlightBookingTests\n    {\n        [TestMethod]\n        public void Departure_date_can_be_rescheduled_whilst_pending_confirmation_from_airline()\n        {\n            var id = Guid.NewGuid();\n            var customerId = Guid.NewGuid();\n            var initialDeparture = new DateTime(2015, 04, 22);\n            var booking = new FlightBooking(id, initialDeparture, customerId);\n\n            var rescheduledDeparture = new DateTime(2015, 04, 23);\n            booking.Reschedule(rescheduledDeparture);\n\n            Assert.AreEqual(rescheduledDeparture, booking.DepartureDate);\n        }\n\n        [TestMethod]\n        public void Departure_date_cannot_be_rescheduled_after_booking_confirmed_by_airline()\n        {\n            var id = Guid.NewGuid();\n            var customerId = Guid.NewGuid();\n            var initialDeparture = new DateTime(2015, 04, 22);\n            var booking = new FlightBooking(id, initialDeparture, customerId);\n\n            booking.Confirm();\n\n            var rescheduledDeparture = new DateTime(2015, 04, 23);\n\n            try\n            {\n                booking.Reschedule(rescheduledDeparture);\n            }\n            catch (RescheduleRejected rr)\n            {\n                // Exception was thrown so test should pass\n                return;\n            }\n\n            Assert.Fail(\"Reschedule was not rejected\");\n        }\n    }\n}\n"
  },
  {
    "path": "16 - Entities/PPPDDDChap17.Entities.Tests/GlobalCounterTest.cs",
    "content": "﻿using System;\r\nusing Microsoft.VisualStudio.TestTools.UnitTesting;\r\nusing PPPDDDChap17.Entities.Examples;\r\n\r\nnamespace PPPDDDChap17.Entities.Tests\r\n{\r\n    [TestClass]\r\n    public class GlobalCounterTest\r\n    {\r\n        [TestMethod]\r\n        public void Each_new_entity_gets_the_next_sequential_Id()\r\n        {\r\n            var entity1 = RandomEntityFactory.CreateEntity();\r\n            var entity2 = RandomEntityFactory.CreateEntity();\r\n            var entity3 = RandomEntityFactory.CreateEntity();\r\n\r\n            Assert.AreEqual(1, entity1.Id);\r\n            Assert.AreEqual(2, entity2.Id);\r\n            Assert.AreEqual(3, entity3.Id);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "16 - Entities/PPPDDDChap17.Entities.Tests/HolidayBookingTest.cs",
    "content": "﻿using Microsoft.VisualStudio.TestTools.UnitTesting;\r\nusing PPPDDDChap17.Entities.Examples;\r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Text;\r\nusing System.Threading.Tasks;\r\n\r\nnamespace PPPDDDChap17.Entities.Tests\r\n{\r\n    [TestClass]\r\n    public class HolidayBookingTest\r\n    {\r\n        [TestMethod]\r\n        public void Id_is_an_amalgamation_of_travelerId_and_dates()\r\n        {\r\n            var travelerId = 44563;\r\n            var firstNight = new DateTime(2014, 07, 01);\r\n            var lastNight = new DateTime(2014, 07, 14);\r\n            var booked = new DateTime(2013, 09, 24);\r\n\r\n            var booking = new HolidayBooking(travelerId, firstNight, lastNight, booked);\r\n\r\n            var idForHoliday = \"44563-2014/07/01-2014/07/14-2013/09/24\";\r\n            Assert.AreEqual(idForHoliday, booking.Id);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "16 - Entities/PPPDDDChap17.Entities.Tests/HotelTests.cs",
    "content": "﻿using System;\r\nusing Microsoft.VisualStudio.TestTools.UnitTesting;\r\nusing PPPDDDChap17.Entities.Examples;\r\n\r\nnamespace PPPDDDChap17.Entities.Tests\r\n{\r\n    [TestClass]\r\n    public class HotelTests\r\n    {\r\n        [TestMethod]\r\n        public void Hotels_must_have_rooms_else_they_are_not_hotels()\r\n        {\r\n            var id = Guid.NewGuid();\r\n            var availability = new HotelAvailability(null, null, null);\r\n            \r\n            try\r\n            {\r\n                var rooms = new HotelRoomSummary(0, 0, 0);\r\n                new Hotel(id, availability, rooms);\r\n            }\r\n            catch (HotelsMustHaveRooms hmr)\r\n            {\r\n                // if exception is thrown test passes\r\n                return;\r\n            }\r\n\r\n            Assert.Fail(\"Hotels must have rooms invariant not enforced\");\r\n            \r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "16 - Entities/PPPDDDChap17.Entities.Tests/PPPDDDChap17.Entities.Tests.csproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"12.0\" DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <PropertyGroup>\n    <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>\n    <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>\n    <ProjectGuid>{B3AA7490-CD64-432D-8994-05CC8BD12D3B}</ProjectGuid>\n    <OutputType>Library</OutputType>\n    <AppDesignerFolder>Properties</AppDesignerFolder>\n    <RootNamespace>PPPDDDChap17.Entities.Tests</RootNamespace>\n    <AssemblyName>PPPDDDChap17.Entities.Tests</AssemblyName>\n    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\n    <FileAlignment>512</FileAlignment>\n    <ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>\n    <VisualStudioVersion Condition=\"'$(VisualStudioVersion)' == ''\">10.0</VisualStudioVersion>\n    <VSToolsPath Condition=\"'$(VSToolsPath)' == ''\">$(MSBuildExtensionsPath32)\\Microsoft\\VisualStudio\\v$(VisualStudioVersion)</VSToolsPath>\n    <ReferencePath>$(ProgramFiles)\\Common Files\\microsoft shared\\VSTT\\$(VisualStudioVersion)\\UITestExtensionPackages</ReferencePath>\n    <IsCodedUITest>False</IsCodedUITest>\n    <TestProjectType>UnitTest</TestProjectType>\n    <SolutionDir Condition=\"$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'\">..\\</SolutionDir>\n    <RestorePackages>true</RestorePackages>\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' \">\n    <DebugSymbols>true</DebugSymbols>\n    <DebugType>full</DebugType>\n    <Optimize>false</Optimize>\n    <OutputPath>bin\\Debug\\</OutputPath>\n    <DefineConstants>DEBUG;TRACE</DefineConstants>\n    <ErrorReport>prompt</ErrorReport>\n    <WarningLevel>4</WarningLevel>\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' \">\n    <DebugType>pdbonly</DebugType>\n    <Optimize>true</Optimize>\n    <OutputPath>bin\\Release\\</OutputPath>\n    <DefineConstants>TRACE</DefineConstants>\n    <ErrorReport>prompt</ErrorReport>\n    <WarningLevel>4</WarningLevel>\n  </PropertyGroup>\n  <ItemGroup>\n    <Reference Include=\"EntityFramework\">\n      <HintPath>..\\packages\\EntityFramework.6.1.1\\lib\\net45\\EntityFramework.dll</HintPath>\n    </Reference>\n    <Reference Include=\"EntityFramework.SqlServer\">\n      <HintPath>..\\packages\\EntityFramework.6.1.1\\lib\\net45\\EntityFramework.SqlServer.dll</HintPath>\n    </Reference>\n    <Reference Include=\"FluentNHibernate\">\n      <HintPath>..\\packages\\FluentNHibernate.1.4.0.0\\lib\\net35\\FluentNHibernate.dll</HintPath>\n    </Reference>\n    <Reference Include=\"Iesi.Collections\">\n      <HintPath>..\\packages\\Iesi.Collections.4.0.1.4000\\lib\\net40\\Iesi.Collections.dll</HintPath>\n    </Reference>\n    <Reference Include=\"NHibernate\">\n      <HintPath>..\\packages\\NHibernate.4.0.0.4000\\lib\\net40\\NHibernate.dll</HintPath>\n    </Reference>\n    <Reference Include=\"System\" />\n    <Reference Include=\"System.ComponentModel.DataAnnotations\" />\n    <Reference Include=\"System.Data\" />\n    <Reference Include=\"System.Data.SQLite\">\n      <HintPath>..\\packages\\System.Data.SQLite.Core.1.0.94.0\\lib\\net45\\System.Data.SQLite.dll</HintPath>\n    </Reference>\n    <Reference Include=\"System.Data.SQLite.EF6\">\n      <HintPath>..\\packages\\System.Data.SQLite.EF6.1.0.94.0\\lib\\net45\\System.Data.SQLite.EF6.dll</HintPath>\n    </Reference>\n    <Reference Include=\"System.Data.SQLite.Linq\">\n      <HintPath>..\\packages\\System.Data.SQLite.Linq.1.0.94.1\\lib\\net45\\System.Data.SQLite.Linq.dll</HintPath>\n    </Reference>\n  </ItemGroup>\n  <Choose>\n    <When Condition=\"('$(VisualStudioVersion)' == '10.0' or '$(VisualStudioVersion)' == '') and '$(TargetFrameworkVersion)' == 'v3.5'\">\n      <ItemGroup>\n        <Reference Include=\"Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL\" />\n      </ItemGroup>\n    </When>\n    <Otherwise>\n      <ItemGroup>\n        <Reference Include=\"Microsoft.VisualStudio.QualityTools.UnitTestFramework\" />\n      </ItemGroup>\n    </Otherwise>\n  </Choose>\n  <ItemGroup>\n    <Compile Include=\"BookTests.cs\" />\n    <Compile Include=\"DatastoreIdGenerationExample.cs\" />\n    <Compile Include=\"FlightBookingTests.cs\" />\n    <Compile Include=\"HolidayBookingTest.cs\" />\n    <Compile Include=\"Properties\\AssemblyInfo.cs\" />\n    <Compile Include=\"GlobalCounterTest.cs\" />\n  </ItemGroup>\n  <ItemGroup>\n    <ProjectReference Include=\"..\\PPPDDDChap17.Entities.Examples\\PPPDDDChap17.Entities.Examples.csproj\">\n      <Project>{cf5dc1dc-18b2-44ec-b316-bbdc78816f7b}</Project>\n      <Name>PPPDDDChap17.Entities.Examples</Name>\n    </ProjectReference>\n  </ItemGroup>\n  <ItemGroup>\n    <None Include=\"app.config\" />\n    <None Include=\"packages.config\" />\n  </ItemGroup>\n  <Choose>\n    <When Condition=\"'$(VisualStudioVersion)' == '10.0' And '$(IsCodedUITest)' == 'True'\">\n      <ItemGroup>\n        <Reference Include=\"Microsoft.VisualStudio.QualityTools.CodedUITestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL\">\n          <Private>False</Private>\n        </Reference>\n        <Reference Include=\"Microsoft.VisualStudio.TestTools.UITest.Common, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL\">\n          <Private>False</Private>\n        </Reference>\n        <Reference Include=\"Microsoft.VisualStudio.TestTools.UITest.Extension, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL\">\n          <Private>False</Private>\n        </Reference>\n        <Reference Include=\"Microsoft.VisualStudio.TestTools.UITesting, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL\">\n          <Private>False</Private>\n        </Reference>\n      </ItemGroup>\n    </When>\n  </Choose>\n  <Import Project=\"$(VSToolsPath)\\TeamTest\\Microsoft.TestTools.targets\" Condition=\"Exists('$(VSToolsPath)\\TeamTest\\Microsoft.TestTools.targets')\" />\n  <Import Project=\"$(MSBuildToolsPath)\\Microsoft.CSharp.targets\" />\n  <Import Project=\"$(SolutionDir)\\.nuget\\NuGet.targets\" Condition=\"Exists('$(SolutionDir)\\.nuget\\NuGet.targets')\" />\n  <Import Project=\"..\\packages\\System.Data.SQLite.Core.1.0.94.0\\build\\net45\\System.Data.SQLite.Core.targets\" Condition=\"Exists('..\\packages\\System.Data.SQLite.Core.1.0.94.0\\build\\net45\\System.Data.SQLite.Core.targets')\" />\n  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \n       Other similar extension points exist, see Microsoft.Common.targets.\n  <Target Name=\"BeforeBuild\">\n  </Target>\n  <Target Name=\"AfterBuild\">\n  </Target>\n  -->\n</Project>"
  },
  {
    "path": "16 - Entities/PPPDDDChap17.Entities.Tests/Properties/AssemblyInfo.cs",
    "content": "﻿using System.Reflection;\r\nusing System.Runtime.CompilerServices;\r\nusing System.Runtime.InteropServices;\r\n\r\n// General Information about an assembly is controlled through the following \r\n// set of attributes. Change these attribute values to modify the information\r\n// associated with an assembly.\r\n[assembly: AssemblyTitle(\"PPPDDDChap17.Entities.Tests\")]\r\n[assembly: AssemblyDescription(\"\")]\r\n[assembly: AssemblyConfiguration(\"\")]\r\n[assembly: AssemblyCompany(\"\")]\r\n[assembly: AssemblyProduct(\"PPPDDDChap17.Entities.Tests\")]\r\n[assembly: AssemblyCopyright(\"Copyright ©  2014\")]\r\n[assembly: AssemblyTrademark(\"\")]\r\n[assembly: AssemblyCulture(\"\")]\r\n\r\n// Setting ComVisible to false makes the types in this assembly not visible \r\n// to COM components.  If you need to access a type in this assembly from \r\n// COM, set the ComVisible attribute to true on that type.\r\n[assembly: ComVisible(false)]\r\n\r\n// The following GUID is for the ID of the typelib if this project is exposed to COM\r\n[assembly: Guid(\"f3981475-7d42-4ba0-8a9c-d8193eaba961\")]\r\n\r\n// Version information for an assembly consists of the following four values:\r\n//\r\n//      Major Version\r\n//      Minor Version \r\n//      Build Number\r\n//      Revision\r\n//\r\n// You can specify all the values or you can default the Build and Revision Numbers \r\n// by using the '*' as shown below:\r\n// [assembly: AssemblyVersion(\"1.0.*\")]\r\n[assembly: AssemblyVersion(\"1.0.0.0\")]\r\n[assembly: AssemblyFileVersion(\"1.0.0.0\")]\r\n"
  },
  {
    "path": "16 - Entities/PPPDDDChap17.Entities.Tests/app.config",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<configuration>\n  <configSections>\n    <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->\n    <section name=\"entityFramework\" type=\"System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\" requirePermission=\"false\" />\n  </configSections>\n  <runtime>\n    <assemblyBinding xmlns=\"urn:schemas-microsoft-com:asm.v1\">\n      <dependentAssembly>\n        <assemblyIdentity name=\"NHibernate\" publicKeyToken=\"aa95f207798dfdb4\" culture=\"neutral\" />\n        <bindingRedirect oldVersion=\"0.0.0.0-4.0.0.4000\" newVersion=\"4.0.0.4000\" />\n      </dependentAssembly>\n      <dependentAssembly>\n        <assemblyIdentity name=\"Iesi.Collections\" publicKeyToken=\"aa95f207798dfdb4\" culture=\"neutral\" />\n        <bindingRedirect oldVersion=\"0.0.0.0-4.0.0.0\" newVersion=\"4.0.0.0\" />\n      </dependentAssembly>\n    </assemblyBinding>\n  </runtime>\n  <system.data>\n    <!--\n        NOTE: The extra \"remove\" element below is to prevent the design-time\n              support components within EF6 from selecting the legacy ADO.NET\n              provider for SQLite (i.e. the one without any EF6 support).  It\n              appears to only consider the first ADO.NET provider in the list\n              within the resulting \"app.config\" or \"web.config\" file.\n    -->\n    <DbProviderFactories>\n      <add name=\"SQLite Data Provider\" invariant=\"System.Data.SQLite\" description=\".NET Framework Data Provider for SQLite\" type=\"System.Data.SQLite.SQLiteFactory, System.Data.SQLite\" />\n      <remove invariant=\"System.Data.SQLite\" />\n      <remove invariant=\"System.Data.SQLite.EF6\" />\n      <add name=\"SQLite Data Provider (Entity Framework 6)\" invariant=\"System.Data.SQLite.EF6\" description=\".NET Framework Data Provider for SQLite (Entity Framework 6)\" type=\"System.Data.SQLite.EF6.SQLiteProviderFactory, System.Data.SQLite.EF6\" />\n    </DbProviderFactories>\n  </system.data>\n  <entityFramework>\n    <defaultConnectionFactory type=\"System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework\">\n      <parameters>\n        <parameter value=\"v11.0\" />\n      </parameters>\n    </defaultConnectionFactory>\n    <providers>\n      <provider invariantName=\"System.Data.SqlClient\" type=\"System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer\" />\n      <provider invariantName=\"System.Data.SQLite.EF6\" type=\"System.Data.SQLite.EF6.SQLiteProviderServices, System.Data.SQLite.EF6\" />\n    </providers>\n  </entityFramework>\n</configuration>"
  },
  {
    "path": "16 - Entities/PPPDDDChap17.Entities.Tests/packages.config",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<packages>\n  <package id=\"EntityFramework\" version=\"6.1.1\" targetFramework=\"net45\" />\n  <package id=\"FluentNHibernate\" version=\"1.4.0.0\" targetFramework=\"net45\" />\n  <package id=\"Iesi.Collections\" version=\"4.0.1.4000\" targetFramework=\"net45\" />\n  <package id=\"NHibernate\" version=\"4.0.0.4000\" targetFramework=\"net45\" />\n  <package id=\"System.Data.SQLite\" version=\"1.0.94.1\" targetFramework=\"net45\" />\n  <package id=\"System.Data.SQLite.Core\" version=\"1.0.94.0\" targetFramework=\"net45\" />\n  <package id=\"System.Data.SQLite.EF6\" version=\"1.0.94.0\" targetFramework=\"net45\" />\n  <package id=\"System.Data.SQLite.Linq\" version=\"1.0.94.1\" targetFramework=\"net45\" />\n</packages>"
  },
  {
    "path": "16 - Entities/PPPDDDChap17.Entities.sln",
    "content": "﻿\r\nMicrosoft Visual Studio Solution File, Format Version 12.00\r\n# Visual Studio Express 2013 for Web\r\nVisualStudioVersion = 12.0.21005.1\r\nMinimumVisualStudioVersion = 10.0.40219.1\r\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"PPPDDDChap17.Entities.Examples\", \"PPPDDDChap17.Entities.Examples\\PPPDDDChap17.Entities.Examples.csproj\", \"{CF5DC1DC-18B2-44EC-B316-BBDC78816F7B}\"\r\nEndProject\r\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"PPPDDDChap17.Entities.Tests\", \"PPPDDDChap17.Entities.Tests\\PPPDDDChap17.Entities.Tests.csproj\", \"{B3AA7490-CD64-432D-8994-05CC8BD12D3B}\"\r\nEndProject\r\nProject(\"{2150E333-8FDC-42A3-9474-1A3956D46DE8}\") = \".nuget\", \".nuget\", \"{C929FF31-B54E-4E2F-9025-AF2268B0C208}\"\r\n\tProjectSection(SolutionItems) = preProject\r\n\t\t.nuget\\NuGet.Config = .nuget\\NuGet.Config\r\n\t\t.nuget\\NuGet.exe = .nuget\\NuGet.exe\r\n\t\t.nuget\\NuGet.targets = .nuget\\NuGet.targets\r\n\tEndProjectSection\r\nEndProject\r\nGlobal\r\n\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\r\n\t\tDebug|Any CPU = Debug|Any CPU\r\n\t\tRelease|Any CPU = Release|Any CPU\r\n\tEndGlobalSection\r\n\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\r\n\t\t{CF5DC1DC-18B2-44EC-B316-BBDC78816F7B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r\n\t\t{CF5DC1DC-18B2-44EC-B316-BBDC78816F7B}.Debug|Any CPU.Build.0 = Debug|Any CPU\r\n\t\t{CF5DC1DC-18B2-44EC-B316-BBDC78816F7B}.Release|Any CPU.ActiveCfg = Release|Any CPU\r\n\t\t{CF5DC1DC-18B2-44EC-B316-BBDC78816F7B}.Release|Any CPU.Build.0 = Release|Any CPU\r\n\t\t{B3AA7490-CD64-432D-8994-05CC8BD12D3B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r\n\t\t{B3AA7490-CD64-432D-8994-05CC8BD12D3B}.Debug|Any CPU.Build.0 = Debug|Any CPU\r\n\t\t{B3AA7490-CD64-432D-8994-05CC8BD12D3B}.Release|Any CPU.ActiveCfg = Release|Any CPU\r\n\t\t{B3AA7490-CD64-432D-8994-05CC8BD12D3B}.Release|Any CPU.Build.0 = Release|Any CPU\r\n\tEndGlobalSection\r\n\tGlobalSection(SolutionProperties) = preSolution\r\n\t\tHideSolutionNode = FALSE\r\n\tEndGlobalSection\r\nEndGlobal\r\n"
  },
  {
    "path": "16 - Entities/README.md",
    "content": "PPPDDD\n======\n\nSample code for the book Principles, Practices and Patterns of Domain-Driven Design. From the book http://www.amazon.com/Professional-Domain-Driven-Design-Patterns/dp/1118714709/\n"
  },
  {
    "path": "17 - Domain Services/PPPDDDChap18.DomainServices/Insurance/Application/MultiMemberInsurancePremium.cs",
    "content": "﻿using PPPDDDChap18.DomainServices.Insurance.Model;\nusing System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace PPPDDDChap18.DomainServices.Insurance.Application\n{\n    // Application Service\n    public class MultiMemberInsurancePremium\n    {\n        private IPolicyRepository policyRepository;\n        private IMemberRepository memberRepository;\n\n        // Domain Service\n        private IMultiMemberPremiumCalculator calculator;\n\n        public MultiMemberInsurancePremium(IPolicyRepository policyRepository, IMemberRepository memberRepository,\n            IMultiMemberPremiumCalculator calculator)\n        {\n            this.policyRepository = policyRepository;\n            this.memberRepository = memberRepository;\n            this.calculator = calculator;\n        }\n\n        public Quote GetQuote(int policyId, IEnumerable<int> memberIds)\n        {\n            var existingMainPolicy = policyRepository.Get(policyId);\n            var additionalMembers = memberRepository.Get(memberIds);\n            // pass entities into Domain Service\n            var multiMemberQuote = calculator.CalculatePremium(existingMainPolicy, additionalMembers);\n\n            return multiMemberQuote;\n        }\n    }\n}\n"
  },
  {
    "path": "17 - Domain Services/PPPDDDChap18.DomainServices/Insurance/Model/IMemberRepository.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace PPPDDDChap18.DomainServices.Insurance.Model\n{\n    public interface IMemberRepository\n    {\n        IEnumerable<Member> Get(IEnumerable<int> memberIds);\n    }\n}\n"
  },
  {
    "path": "17 - Domain Services/PPPDDDChap18.DomainServices/Insurance/Model/IMultiMemberPremiumCalculator.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace PPPDDDChap18.DomainServices.Insurance.Model\n{\n    // Domain Service interface\n    public interface IMultiMemberPremiumCalculator\n    {\n        Quote CalculatePremium(Policy mainPolicy, IEnumerable<Member> additionalMembers);\n    }\n}\n"
  },
  {
    "path": "17 - Domain Services/PPPDDDChap18.DomainServices/Insurance/Model/IPolicyRepository.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace PPPDDDChap18.DomainServices.Insurance.Model\n{\n    public interface IPolicyRepository\n    {\n        Policy Get(int policyId);\n    }\n\n}\n"
  },
  {
    "path": "17 - Domain Services/PPPDDDChap18.DomainServices/Insurance/Model/Member.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace PPPDDDChap18.DomainServices.Insurance.Model\n{\n    public class Member\n    {\n        public Guid Id { get; protected set; }\n\n        // ...\n    }\n}\n"
  },
  {
    "path": "17 - Domain Services/PPPDDDChap18.DomainServices/Insurance/Model/Policy.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace PPPDDDChap18.DomainServices.Insurance.Model\n{\n    public class Policy\n    {\n        public Guid Id { get; protected set; }\n\n        // ...\n    }\n}\n"
  },
  {
    "path": "17 - Domain Services/PPPDDDChap18.DomainServices/Insurance/Model/Quote.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace PPPDDDChap18.DomainServices.Insurance.Model\n{\n    public class Quote\n    {\n        // ...\n    }\n}\n"
  },
  {
    "path": "17 - Domain Services/PPPDDDChap18.DomainServices/OnlineDating/Model/BloodType.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace PPPDDDChap18.DomainServices.OnlineDating.Model\n{\n    // value object\n    public class BloodType\n    {\n        // ...\n    }\n}\n"
  },
  {
    "path": "17 - Domain Services/PPPDDDChap18.DomainServices/OnlineDating/Model/CompatibilityRating.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace PPPDDDChap18.DomainServices.OnlineDating.Model\n{\n    public class CompatibilityRating\n    {\n        public CompatibilityRating Boost(CompatibilityRating rating)\n        {\n            // ..\n            return null;\n        }\n\n        // ..\n    }\n}\n"
  },
  {
    "path": "17 - Domain Services/PPPDDDChap18.DomainServices/OnlineDating/Model/LoveSeeker.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace PPPDDDChap18.DomainServices.OnlineDating.Model\n{\n    // entity\n    public class LoveSeeker\n    {\n        public Guid Id { get; protected set; }\n\n        public BloodType BloodType { get; private set; }\n\n        // ...\n    }\n}\n"
  },
  {
    "path": "17 - Domain Services/PPPDDDChap18.DomainServices/OnlineDating/Model/RomanceOMeter.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace PPPDDDChap18.DomainServices.OnlineDating.Model\n{\n    // Domain Service - part of Ubiquitous Language\n    public class RomanceOMeter\n    {\n        // stateless - collaborators are allowed, though\n\n        // behavior-only\n        public CompatibilityRating AssessCompatibility(LoveSeeker seeker1, LoveSeeker seeker2)\n        {\n            var rating = new CompatibilityRating();\n\n            // orchestrate Entities:\n            // compare dating history, blood type, lifestyle etc\n            if (seeker1.BloodType == seeker2.BloodType)\n            {\n                rating = rating.Boost(CompatibilityRating(250));\n            }\n\n            // ..\n\n            // return another Domain Object (Value Object in this case)\n            return rating;\n        }\n\n        private CompatibilityRating CompatibilityRating(int value)\n        {\n            // ...\n            return new CompatibilityRating();\n        }\n    }\n}\n"
  },
  {
    "path": "17 - Domain Services/PPPDDDChap18.DomainServices/OnlineGaming/WithDomainServices/Model/Competitor.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace PPPDDDChap18.DomainServices.OnlineGaming.WithDomainServices.Model\n{\n    public class Competitor\n    {\n        public Guid Id { get; protected set; }\n\n        public string GamerTag { get; protected set; }\n\n        public Score Score { get; set; }\n\n        public Ranking WorldRanking { get; set; }\n    }\n}\n"
  },
  {
    "path": "17 - Domain Services/PPPDDDChap18.DomainServices/OnlineGaming/WithDomainServices/Model/IGame.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace PPPDDDChap18.DomainServices.OnlineGaming.WithDomainServices.Model\n{\n    public interface IGame\n    {\n        IEnumerable<Competitor> Winners { get; }\n\n        IEnumerable<Competitor> Losers { get; }\n    }\n}\n"
  },
  {
    "path": "17 - Domain Services/PPPDDDChap18.DomainServices/OnlineGaming/WithDomainServices/Model/IGameRewardPolicy.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace PPPDDDChap18.DomainServices.OnlineGaming.WithDomainServices.Model\n{\n    // Domain Service interface - part of ubiquitous language\n    public interface IGamingRewardPolicy\n    {\n        void Apply(IGame game);\n    }\n}\n"
  },
  {
    "path": "17 - Domain Services/PPPDDDChap18.DomainServices/OnlineGaming/WithDomainServices/Model/IGameScoringPolicy.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace PPPDDDChap18.DomainServices.OnlineGaming.WithDomainServices.Model\n{\n    // Domain Service interface - part of ubiquitous language\n    public interface IGamingScorePolicy\n    {\n        void Apply(IGame game);\n    }\n}\n"
  },
  {
    "path": "17 - Domain Services/PPPDDDChap18.DomainServices/OnlineGaming/WithDomainServices/Model/IScoreFinder.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace PPPDDDChap18.DomainServices.OnlineGaming.WithDomainServices.Model\n{\n    // repository\n    public interface IScoreFinder\n    {\n        Score FindTopScore(IGame game, int resultNumber);\n    }\n}\n"
  },
  {
    "path": "17 - Domain Services/PPPDDDChap18.DomainServices/OnlineGaming/WithDomainServices/Model/OnlineDeathmatch.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace PPPDDDChap18.DomainServices.OnlineGaming.WithDomainServices.Model\n{\n    public class OnlineDeathmatch : IGame\n    {\n        private Competitor player1;\n        private Competitor player2;\n\n        // Domain Services\n        private IEnumerable<IGamingScorePolicy> scorers;\n        private IEnumerable<IGamingRewardPolicy> rewarders;\n\n        private List<Competitor> winners = new List<Competitor>();\n        private IList<Competitor> losers = new List<Competitor>();\n\n        public OnlineDeathmatch(Competitor player1, Competitor player2, Guid id,\n            IEnumerable<IGamingScorePolicy> scorers, IEnumerable<IGamingRewardPolicy> rewarders)\n        {\n            this.player1 = player1;\n            this.player2 = player2;\n            this.Id = id;\n            this.scorers = scorers;\n            this.rewarders = rewarders;\n        }\n\n        public Guid Id { get; protected set; }\n\n        public IEnumerable<Competitor> Winners { get { return winners; } }\n\n        public IEnumerable<Competitor> Losers { get { return losers; } }\n\n        public void CommenceBattle()\n        {\n            // ...\n\n            // battle completes\n\n            // would actually be based on game result\n            this.winners.Add(player1);\n            this.losers.Add(player2);\n\n            UpdateScoresAndRewards();\n        }\n\n        private void UpdateScoresAndRewards()\n        {\n            foreach (var scorer in scorers)\n            {\n                scorer.Apply(this);\n            }\n\n            foreach (var rewarder in rewarders)\n            {\n                rewarder.Apply(this);\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "17 - Domain Services/PPPDDDChap18.DomainServices/OnlineGaming/WithDomainServices/Model/Ranking.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace PPPDDDChap18.DomainServices.OnlineGaming.WithDomainServices.Model\n{\n    public class Ranking\n    {\n        // ...\n    }\n}\n"
  },
  {
    "path": "17 - Domain Services/PPPDDDChap18.DomainServices/OnlineGaming/WithDomainServices/Model/Score.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace PPPDDDChap18.DomainServices.OnlineGaming.WithDomainServices.Model\n{\n    public class Score\n    {\n        public int Value { get; private set; }\n\n        public Score(int value)\n        {\n            this.Value = value;\n        }\n\n        public Score Add(Score amount)\n        {\n            return new Score(this.Value + amount.Value);\n        }\n\n        public Score Subtract(Score amount)\n        {\n            return new Score(this.Value - amount.Value);\n        }\n    }\n}\n"
  },
  {
    "path": "17 - Domain Services/PPPDDDChap18.DomainServices/OnlineGaming/WithoutDomainServices/Model/Competitor.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace PPPDDDChap18.DomainServices.OnlineGaming.WithoutDomainServices.Model\n{\n    public class Competitor\n    {\n        public Guid Id { get; protected set; }\n\n        public string GamerTag { get; protected set; }\n\n        public Score Score { get; set; }\n\n        public Ranking WorldRanking { get; set; }\n    }\n}\n"
  },
  {
    "path": "17 - Domain Services/PPPDDDChap18.DomainServices/OnlineGaming/WithoutDomainServices/Model/OnlineDeathmatch.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace PPPDDDChap18.DomainServices.OnlineGaming.WithoutDomainServices.Model\n{\n    // contains hard-coded logicy for applying scores and rewards - does not use a domain service\n    public class OnlineDeathmatch\n    {\n        private Competitor player1;\n        private Competitor player2;\n\n        public OnlineDeathmatch(Competitor player1, Competitor player2, Guid id)\n        {\n            this.player1 = player1;\n            this.player2 = player2;\n            this.Id = id;\n        }\n\n        public Guid Id { get; protected set; }\n\n        public void CommenceBattle()\n        {\n            // ...\n\n            // battle completes\n\n            // would actually be based on game result\n            var winner = player1;\n            var loser = player2;\n\n            UpdateScoresAndRewards(winner, loser);\n        }\n\n        private void UpdateScoresAndRewards(Competitor winner, Competitor loser)\n        {\n            // real system uses rankings, history, bonus points, in-game actions \n            // seasonal promotions, marketing campaigns\n            winner.Score = winner.Score.Add(new Score(200));\n            loser.Score = loser.Score.Subtract(new Score(200));\n        }\n    }\n}\n"
  },
  {
    "path": "17 - Domain Services/PPPDDDChap18.DomainServices/OnlineGaming/WithoutDomainServices/Model/Ranking.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace PPPDDDChap18.DomainServices.OnlineGaming.WithoutDomainServices.Model\n{\n    public class Ranking\n    {\n        // ...\n    }\n}\n"
  },
  {
    "path": "17 - Domain Services/PPPDDDChap18.DomainServices/OnlineGaming/WithoutDomainServices/Model/Score.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace PPPDDDChap18.DomainServices.OnlineGaming.WithoutDomainServices.Model\n{\n    public class Score\n    {\n        public int Value { get; private set; }\n\n        public Score(int value)\n        {\n            this.Value = value;\n        }\n\n        public Score Add(Score amount)\n        {\n            return new Score(this.Value + amount.Value);\n        }\n\n        public Score Subtract(Score amount)\n        {\n            return new Score(this.Value - amount.Value);\n        }\n    }\n}\n"
  },
  {
    "path": "17 - Domain Services/PPPDDDChap18.DomainServices/PPPDDDChap18.DomainServices.csproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"12.0\" DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <Import Project=\"$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props\" Condition=\"Exists('$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props')\" />\n  <PropertyGroup>\n    <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>\n    <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>\n    <ProjectGuid>{C1649772-2738-4989-B34C-CB9558BA0529}</ProjectGuid>\n    <OutputType>Library</OutputType>\n    <AppDesignerFolder>Properties</AppDesignerFolder>\n    <RootNamespace>PPPDDDChap18.DomainServices</RootNamespace>\n    <AssemblyName>PPPDDDChap18.DomainServices</AssemblyName>\n    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\n    <FileAlignment>512</FileAlignment>\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' \">\n    <DebugSymbols>true</DebugSymbols>\n    <DebugType>full</DebugType>\n    <Optimize>false</Optimize>\n    <OutputPath>bin\\Debug\\</OutputPath>\n    <DefineConstants>DEBUG;TRACE</DefineConstants>\n    <ErrorReport>prompt</ErrorReport>\n    <WarningLevel>4</WarningLevel>\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' \">\n    <DebugType>pdbonly</DebugType>\n    <Optimize>true</Optimize>\n    <OutputPath>bin\\Release\\</OutputPath>\n    <DefineConstants>TRACE</DefineConstants>\n    <ErrorReport>prompt</ErrorReport>\n    <WarningLevel>4</WarningLevel>\n  </PropertyGroup>\n  <ItemGroup>\n    <Reference Include=\"System\" />\n    <Reference Include=\"System.Core\" />\n    <Reference Include=\"System.Xml.Linq\" />\n    <Reference Include=\"System.Data.DataSetExtensions\" />\n    <Reference Include=\"Microsoft.CSharp\" />\n    <Reference Include=\"System.Data\" />\n    <Reference Include=\"System.Xml\" />\n  </ItemGroup>\n  <ItemGroup>\n    <Compile Include=\"Insurance\\Application\\MultiMemberInsurancePremium.cs\" />\n    <Compile Include=\"Insurance\\Model\\IMemberRepository.cs\" />\n    <Compile Include=\"Insurance\\Model\\IMultiMemberPremiumCalculator.cs\" />\n    <Compile Include=\"Insurance\\Model\\IPolicyRepository.cs\" />\n    <Compile Include=\"Insurance\\Model\\Member.cs\" />\n    <Compile Include=\"Insurance\\Model\\Policy.cs\" />\n    <Compile Include=\"Insurance\\Model\\Quote.cs\" />\n    <Compile Include=\"RestaurantBooking\\Model\\BookingDetails.cs\" />\n    <Compile Include=\"RestaurantBooking\\Model\\Customer.cs\" />\n    <Compile Include=\"RestaurantBooking\\Model\\DomainEvents.cs\" />\n    <Compile Include=\"RestaurantBooking\\Model\\Handlers\\NotifyRestaurantOnCustomerBookingConfirmation.cs\" />\n    <Compile Include=\"RestaurantBooking\\Model\\IHandleEvents.cs\" />\n    <Compile Include=\"RestaurantBooking\\Model\\Restaurant.cs\" />\n    <Compile Include=\"RestaurantBooking\\Model\\RestaurantBooking.cs\" />\n    <Compile Include=\"RestaurantBooking\\Model\\Events\\BookingConfirmedByCustomer.cs\" />\n    <Compile Include=\"OnlineDating\\Model\\BloodType.cs\" />\n    <Compile Include=\"OnlineDating\\Model\\CompatibilityRating.cs\" />\n    <Compile Include=\"OnlineDating\\Model\\LoveSeeker.cs\" />\n    <Compile Include=\"OnlineDating\\Model\\RomanceOMeter.cs\" />\n    <Compile Include=\"OnlineGaming\\WithDomainServices\\Model\\Competitor.cs\" />\n    <Compile Include=\"OnlineGaming\\WithDomainServices\\Model\\IGame.cs\" />\n    <Compile Include=\"OnlineGaming\\WithDomainServices\\Model\\IGameRewardPolicy.cs\" />\n    <Compile Include=\"OnlineGaming\\WithDomainServices\\Model\\IGameScoringPolicy.cs\" />\n    <Compile Include=\"OnlineGaming\\WithDomainServices\\Model\\IScoreFinder.cs\" />\n    <Compile Include=\"OnlineGaming\\WithDomainServices\\Model\\OnlineDeathmatch.cs\" />\n    <Compile Include=\"OnlineGaming\\WithDomainServices\\Model\\Ranking.cs\" />\n    <Compile Include=\"OnlineGaming\\WithDomainServices\\Model\\Score.cs\" />\n    <Compile Include=\"OnlineGaming\\WithoutDomainServices\\Model\\Competitor.cs\" />\n    <Compile Include=\"OnlineGaming\\WithoutDomainServices\\Model\\OnlineDeathmatch.cs\" />\n    <Compile Include=\"OnlineGaming\\WithoutDomainServices\\Model\\Ranking.cs\" />\n    <Compile Include=\"OnlineGaming\\WithoutDomainServices\\Model\\Score.cs\" />\n    <Compile Include=\"Properties\\AssemblyInfo.cs\" />\n    <Compile Include=\"RestaurantBooking\\Model\\RestaurantBookingFactory.cs\" />\n    <Compile Include=\"RestaurantBooking\\Model\\RestaurantBookingRepository.cs\" />\n    <Compile Include=\"RestaurantBooking\\Model\\RestaurantNotifier.cs\" />\n    <Compile Include=\"Shipping\\Application\\ShippingRouteFinder.cs\" />\n    <Compile Include=\"Shipping\\Model\\IShippingRouteFinder.cs\" />\n  </ItemGroup>\n  <ItemGroup>\n    <Folder Include=\"Insurance\\Infrastructure\\\" />\n    <Folder Include=\"OnlineDating\\Application\\\" />\n    <Folder Include=\"OnlineDating\\Infrastructure\\\" />\n    <Folder Include=\"OnlineGaming\\WithDomainServices\\Application\\\" />\n    <Folder Include=\"OnlineGaming\\WithDomainServices\\Infrastructure\\\" />\n    <Folder Include=\"OnlineGaming\\WithoutDomainServices\\Application\\\" />\n    <Folder Include=\"OnlineGaming\\WithoutDomainServices\\Infrastructure\\\" />\n    <Folder Include=\"RestaurantBooking\\Application\\\" />\n    <Folder Include=\"RestaurantBooking\\Infrastructure\\\" />\n    <Folder Include=\"Shipping\\Infrastructure\\\" />\n  </ItemGroup>\n  <Import Project=\"$(MSBuildToolsPath)\\Microsoft.CSharp.targets\" />\n  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \n       Other similar extension points exist, see Microsoft.Common.targets.\n  <Target Name=\"BeforeBuild\">\n  </Target>\n  <Target Name=\"AfterBuild\">\n  </Target>\n  -->\n</Project>"
  },
  {
    "path": "17 - Domain Services/PPPDDDChap18.DomainServices/Properties/AssemblyInfo.cs",
    "content": "﻿using System.Reflection;\r\nusing System.Runtime.CompilerServices;\r\nusing System.Runtime.InteropServices;\r\n\r\n// General Information about an assembly is controlled through the following \r\n// set of attributes. Change these attribute values to modify the information\r\n// associated with an assembly.\r\n[assembly: AssemblyTitle(\"PPPDDDChap18.DomainServices\")]\r\n[assembly: AssemblyDescription(\"\")]\r\n[assembly: AssemblyConfiguration(\"\")]\r\n[assembly: AssemblyCompany(\"\")]\r\n[assembly: AssemblyProduct(\"PPPDDDChap18.DomainServices\")]\r\n[assembly: AssemblyCopyright(\"Copyright ©  2014\")]\r\n[assembly: AssemblyTrademark(\"\")]\r\n[assembly: AssemblyCulture(\"\")]\r\n\r\n// Setting ComVisible to false makes the types in this assembly not visible \r\n// to COM components.  If you need to access a type in this assembly from \r\n// COM, set the ComVisible attribute to true on that type.\r\n[assembly: ComVisible(false)]\r\n\r\n// The following GUID is for the ID of the typelib if this project is exposed to COM\r\n[assembly: Guid(\"eb9b34f5-5d03-44f0-af42-9386ddd56cfb\")]\r\n\r\n// Version information for an assembly consists of the following four values:\r\n//\r\n//      Major Version\r\n//      Minor Version \r\n//      Build Number\r\n//      Revision\r\n//\r\n// You can specify all the values or you can default the Build and Revision Numbers \r\n// by using the '*' as shown below:\r\n// [assembly: AssemblyVersion(\"1.0.*\")]\r\n[assembly: AssemblyVersion(\"1.0.0.0\")]\r\n[assembly: AssemblyFileVersion(\"1.0.0.0\")]\r\n"
  },
  {
    "path": "17 - Domain Services/PPPDDDChap18.DomainServices/RestaurantBooking/Model/BookingDetails.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace PPPDDDChap18.DomainServices.RestaurantBooking.Model\n{\n    // value object\n    public class BookingDetails\n    {\n        public DateTime When { get; private set; }\n\n        public int NumberOfDiners { get; private set; }\n\n        // ...\n    }\n}\n"
  },
  {
    "path": "17 - Domain Services/PPPDDDChap18.DomainServices/RestaurantBooking/Model/Customer.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace PPPDDDChap18.DomainServices.RestaurantBooking.Model\n{\n    // Entity\n    public class Customer\n    {\n        public Guid Id { get; protected set; }\n\n        // ..\n    }\n}\n"
  },
  {
    "path": "17 - Domain Services/PPPDDDChap18.DomainServices/RestaurantBooking/Model/DomainEvents.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace PPPDDDChap18.DomainServices.RestaurantBooking.Model\n{\n    /// <summary>\n    /// Domain Events class from http://www.udidahan.com/2008/08/25/domain-events-take-2/\n    /// </summary>\n    public static class DomainEvents\n    {\n        [ThreadStatic]\n        private static List<Delegate> _actions;\n        private static List<Delegate> Actions\n        {\n            get\n            {\n                if (_actions == null)\n                {\n                    _actions = new List<Delegate>();\n                }\n                return _actions;\n            }\n        }\n\n        public static IDisposable Register<T>(Action<T> callback)\n        {\n            Actions.Add(callback);\n\n            return new DomainEventRegistrationRemover(() => Actions.Remove(callback));\n        }\n\n        public static void Raise<T>(T eventArgs)\n        {\n            foreach (Delegate action in Actions)\n            {\n                Action<T> typedAction = action as Action<T>;\n                if (typedAction != null)\n                {\n                    typedAction(eventArgs);\n                }\n            }\n        }\n\n        private sealed class DomainEventRegistrationRemover : IDisposable\n        {\n            private readonly Action _callOnDispose;\n\n            public DomainEventRegistrationRemover(Action toCall)\n            {\n                _callOnDispose = toCall;\n            }\n\n            public void Dispose()\n            {\n                _callOnDispose();\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "17 - Domain Services/PPPDDDChap18.DomainServices/RestaurantBooking/Model/Events/BookingConfirmedByCustomer.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace PPPDDDChap18.DomainServices.RestaurantBooking.Model\n{\n    public class BookingConfirmedByCustomer\n    {\n        private DomainEventsAlternative.RestaurantBooking restaurantBooking;\n\n        public BookingConfirmedByCustomer(RestaurantBooking booking)\n        {\n            this.RestaurantBooking = booking;\n        }\n\n        public BookingConfirmedByCustomer(DomainEventsAlternative.RestaurantBooking restaurantBooking)\n        {\n            // TODO: Complete member initialization\n            this.restaurantBooking = restaurantBooking;\n        }\n\n        public RestaurantBooking RestaurantBooking { get; private set; }\n    }\n}\n"
  },
  {
    "path": "17 - Domain Services/PPPDDDChap18.DomainServices/RestaurantBooking/Model/Handlers/NotifyRestaurantOnCustomerBookingConfirmation.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace PPPDDDChap18.DomainServices.RestaurantBooking.Model.Handlers\n{\n    // Domain Event Handler\n    public class NotifyRestaurantOnCustomerBookingConfirmation : IHandleEvents<BookingConfirmedByCustomer>\n    {\n        private IRestaurantNotifier restaurantNotifier;\n\n        public NotifyRestaurantOnCustomerBookingConfirmation(IRestaurantNotifier restaurantNotifier)\n        {\n            this.restaurantNotifier = restaurantNotifier;\n        }\n\n        public void Handle(BookingConfirmedByCustomer @event)\n        {\n            // now the restaurant does not control it's own state as much\n            var booking = @event.RestaurantBooking;\n\n            /* Confirmed would need to be made public for this approach to work\n            booking.Confirmed = restaurantNotifier.NotifyBookingConfirmation(booking.Restaurant,\n                booking.Customer, booking.Id, booking.BookingDetails);\n             */\n        }\n    }\n}\n"
  },
  {
    "path": "17 - Domain Services/PPPDDDChap18.DomainServices/RestaurantBooking/Model/IHandleEvents.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace PPPDDDChap18.DomainServices.RestaurantBooking.Model\n{\n    interface IHandleEvents<T>\n    {\n    }\n}\n"
  },
  {
    "path": "17 - Domain Services/PPPDDDChap18.DomainServices/RestaurantBooking/Model/Restaurant.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace PPPDDDChap18.DomainServices.RestaurantBooking.Model\n{\n    // Entity\n    public class Restaurant\n    {\n        public Guid Id { get; protected set; }\n\n        // ..\n    }\n}\n"
  },
  {
    "path": "17 - Domain Services/PPPDDDChap18.DomainServices/RestaurantBooking/Model/RestaurantBooking.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace PPPDDDChap18.DomainServices.RestaurantBooking.Model\n{\n    public class RestaurantBooking\n    {\n        // see entities chapter for options when injecting services\n        private IRestaurantNotifier restaurantNotifier = null;\n\n        public Guid Id { get; protected set; }\n\n        public Restaurant Restaurant { get; protected set; }\n\n        public Customer Customer { get; protected set; }\n\n        public BookingDetails BookingDetails { get; protected set;}\n\n        public bool Confirmed { get; protected set; }\n\n        // Entity behavior that depends on a Domain Service (see alternative implementations below)\n        public void ConfirmBooking()\n        {\n            // ..\n\n            // restaurantNotifier is the Domain Service\n            // but how can it be available in this scope? especially when an ORM is involved?\n            Confirmed = restaurantNotifier.NotifyBookingConfirmation(Restaurant, Customer, Id, BookingDetails);\n\n            // ..\n        }\n       \n        // ..\n    }\n\n    namespace DoubleDispatchAlternative\n    {\n        // Entity\n        public class RestaurantBooking\n        {\n            // see entities chapter for options when injecting services\n            private IRestaurantNotifier restaurantNotifier = null;\n\n            public Guid Id { get; protected set; }\n\n            public Restaurant Restaurant { get; protected set; }\n\n            public Customer Customer { get; protected set; }\n\n            public BookingDetails BookingDetails { get; protected set; }\n\n            public bool Confirmed { get; protected set; }\n\n            public void ConfirmBooking(IRestaurantNotifier restaurantNotifier)\n            {\n                // ..\n\n                Confirmed = restaurantNotifier.NotifyBookingConfirmation(Restaurant, Customer, Id, BookingDetails);\n\n                // ..\n            }\n        }\n    }\n\n    namespace DomainEventsAlternative\n    {\n        // Entity\n        public class RestaurantBooking\n        {\n            // see entities chapter for options when injecting services\n            private IRestaurantNotifier restaurantNotifier = null;\n\n            public Guid Id { get; protected set; }\n\n            public Restaurant Restaurant { get; protected set; }\n\n            public Customer Customer { get; protected set; }\n\n            public BookingDetails BookingDetails { get; protected set; }\n\n            public bool Confirmed { get; protected set; }\n\n            public void ConfirmBooking()\n             {\n                 // ..\n         \n                 DomainEvents.Raise(new BookingConfirmedByCustomer(this));\n            \n                 // ..\n             }\n\n            // ..\n        }\n    }\n\n}\n"
  },
  {
    "path": "17 - Domain Services/PPPDDDChap18.DomainServices/RestaurantBooking/Model/RestaurantBookingFactory.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace PPPDDDChap18.DomainServices.RestaurantBooking.Model\n{\n    public static class RestaurantBookingFactory\n    {\n        // Initial object - no ORM to worry about here\n        // but will this approach be compatible with an ORM?\n        public static RestaurantBooking CreateBooking(Restaurant restaurant, Customer customer, BookingDetails details)\n        {\n            var id = Guid.NewGuid();\n            var notifier = new RestaurantNotifier();\n            \n            // Redesign RestaurantBooking entity to suit this style of construction\n            //return new RestaurantBooking(restaurant, customer, details, id, notifier);\n\n            return null;\n        }\n    }\n}\n"
  },
  {
    "path": "17 - Domain Services/PPPDDDChap18.DomainServices/RestaurantBooking/Model/RestaurantBookingRepository.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace PPPDDDChap18.DomainServices.RestaurantBooking.Model\n{\n    /*\n    public class RestaurantBookingRepository\n    {\n        // interface provided by ORM\n        private ISession session;\n\n        public RestaurantBookingRepository(ISession session)\n        {\n            this.session = session;\n        }\n\n        public RestaurantBooking Get(Guid restaurantBookingId)\n        {\n            // first phase of construnction handled by ORM\n            var booking = session.Load<RestaurantBooking>(restaurantBookingId);\n\n            // second phase of construction manually handled\n            booking.Init(new RestaurantNotifier());\n            // booking.Notifier = new RestaurantNotifier();\n        }\n    }\n     */\n}\n"
  },
  {
    "path": "17 - Domain Services/PPPDDDChap18.DomainServices/RestaurantBooking/Model/RestaurantNotifier.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace PPPDDDChap18.DomainServices.RestaurantBooking.Model\n{\n    // Domain Service\n    public class RestaurantNotifier : IRestaurantNotifier\n    {\n\n        public bool NotifyBookingConfirmation(Restaurant Restaurant, Customer Customer, Guid Id, BookingDetails BookingDetails)\n        {\n            throw new NotImplementedException();\n        }\n    }\n\n    public interface IRestaurantNotifier\n    {\n        bool NotifyBookingConfirmation(Restaurant Restaurant, Customer Customer, Guid Id, BookingDetails BookingDetails);\n    }\n}\n"
  },
  {
    "path": "17 - Domain Services/PPPDDDChap18.DomainServices/Shipping/Application/ShippingRouteFinder.cs",
    "content": "﻿using PPPDDDChap18.DomainServices.Shipping.Model;\nusing System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace PPPDDDChap18.DomainServices.Shipping.Application\n{\n    // implementation of Domain Service - this would live in the Service Layer\n    public class ShippingRouteFinder : IShippingRouteFinder\n    {\n        public Route FindFastestRoute(Location departing, Location destination, DateTime departureDate)\n        {\n            // this method makes HTTP call; best to keep out of the domain\n            var response = QueryRoutingApi(departing, destination, departureDate);\n\n            var route = ParseRoute(response);\n\n            return route;\n        }\n\n        private String QueryRoutingApi(Location departing, Location destination, DateTime departureDate)\n        {\n            // http calls etc\n            return null;\n        }\n\n        private Route ParseRoute(String apiResponse)\n        {\n            return null;\n        }\n    }\n}\n"
  },
  {
    "path": "17 - Domain Services/PPPDDDChap18.DomainServices/Shipping/Model/IShippingRouteFinder.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace PPPDDDChap18.DomainServices.Shipping.Model\n{\n    // interface for Domain Service - this would live in the Domain Model\n    // this is the \"contract\"\n    public interface IShippingRouteFinder\n    {\n        Route FindFastestRoute(Location departing, Location destination, DateTime departureDate);\n    }\n\n    public class Route\n    {\n        // ...\n    }\n\n    public class Location\n    {\n        // ...\n    }\n}\n"
  },
  {
    "path": "17 - Domain Services/PPPDDDChap18.DomainServices.sln",
    "content": "﻿\r\nMicrosoft Visual Studio Solution File, Format Version 12.00\r\n# Visual Studio Express 2013 for Web\r\nVisualStudioVersion = 12.0.21005.1\r\nMinimumVisualStudioVersion = 10.0.40219.1\r\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"PPPDDDChap18.DomainServices\", \"PPPDDDChap18.DomainServices\\PPPDDDChap18.DomainServices.csproj\", \"{C1649772-2738-4989-B34C-CB9558BA0529}\"\r\nEndProject\r\nGlobal\r\n\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\r\n\t\tDebug|Any CPU = Debug|Any CPU\r\n\t\tRelease|Any CPU = Release|Any CPU\r\n\tEndGlobalSection\r\n\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\r\n\t\t{C1649772-2738-4989-B34C-CB9558BA0529}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r\n\t\t{C1649772-2738-4989-B34C-CB9558BA0529}.Debug|Any CPU.Build.0 = Debug|Any CPU\r\n\t\t{C1649772-2738-4989-B34C-CB9558BA0529}.Release|Any CPU.ActiveCfg = Release|Any CPU\r\n\t\t{C1649772-2738-4989-B34C-CB9558BA0529}.Release|Any CPU.Build.0 = Release|Any CPU\r\n\tEndGlobalSection\r\n\tGlobalSection(SolutionProperties) = preSolution\r\n\t\tHideSolutionNode = FALSE\r\n\tEndGlobalSection\r\nEndGlobal\r\n"
  },
  {
    "path": "17 - Domain Services/README.md",
    "content": "PPPDDD\n======\n\nSample code for the book Principles, Practices and Patterns of Domain-Driven Design. From the book http://www.amazon.com/Professional-Domain-Driven-Design-Patterns/dp/1118714709/\n"
  },
  {
    "path": "18 - Domain Events/.nuget/NuGet.Config",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<configuration>\n  <solution>\n    <add key=\"disableSourceControlIntegration\" value=\"true\" />\n  </solution>\n</configuration>"
  },
  {
    "path": "18 - Domain Events/.nuget/NuGet.targets",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n    <PropertyGroup>\n        <SolutionDir Condition=\"$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'\">$(MSBuildProjectDirectory)\\..\\</SolutionDir>\n\n        <!-- Enable the restore command to run before builds -->\n        <RestorePackages Condition=\"  '$(RestorePackages)' == '' \">false</RestorePackages>\n\n        <!-- Property that enables building a package from a project -->\n        <BuildPackage Condition=\" '$(BuildPackage)' == '' \">false</BuildPackage>\n\n        <!-- Determines if package restore consent is required to restore packages -->\n        <RequireRestoreConsent Condition=\" '$(RequireRestoreConsent)' != 'false' \">true</RequireRestoreConsent>\n\n        <!-- Download NuGet.exe if it does not already exist -->\n        <DownloadNuGetExe Condition=\" '$(DownloadNuGetExe)' == '' \">false</DownloadNuGetExe>\n    </PropertyGroup>\n\n    <ItemGroup Condition=\" '$(PackageSources)' == '' \">\n        <!-- Package sources used to restore packages. By default, registered sources under %APPDATA%\\NuGet\\NuGet.Config will be used -->\n        <!-- The official NuGet package source (https://www.nuget.org/api/v2/) will be excluded if package sources are specified and it does not appear in the list -->\n        <!--\n            <PackageSource Include=\"https://www.nuget.org/api/v2/\" />\n            <PackageSource Include=\"https://my-nuget-source/nuget/\" />\n        -->\n    </ItemGroup>\n\n    <PropertyGroup Condition=\" '$(OS)' == 'Windows_NT'\">\n        <!-- Windows specific commands -->\n        <NuGetToolsPath>$([System.IO.Path]::Combine($(SolutionDir), \".nuget\"))</NuGetToolsPath>\n    </PropertyGroup>\n\n    <PropertyGroup Condition=\" '$(OS)' != 'Windows_NT'\">\n        <!-- We need to launch nuget.exe with the mono command if we're not on windows -->\n        <NuGetToolsPath>$(SolutionDir).nuget</NuGetToolsPath>\n    </PropertyGroup>\n\n    <PropertyGroup>\n        <PackagesProjectConfig Condition=\" '$(OS)' == 'Windows_NT'\">$(MSBuildProjectDirectory)\\packages.$(MSBuildProjectName.Replace(' ', '_')).config</PackagesProjectConfig>\n        <PackagesProjectConfig Condition=\" '$(OS)' != 'Windows_NT'\">$(MSBuildProjectDirectory)\\packages.$(MSBuildProjectName).config</PackagesProjectConfig>\n    </PropertyGroup>\n\n    <PropertyGroup>\n      <PackagesConfig Condition=\"Exists('$(MSBuildProjectDirectory)\\packages.config')\">$(MSBuildProjectDirectory)\\packages.config</PackagesConfig>\n      <PackagesConfig Condition=\"Exists('$(PackagesProjectConfig)')\">$(PackagesProjectConfig)</PackagesConfig>\n    </PropertyGroup>\n    \n    <PropertyGroup>\n        <!-- NuGet command -->\n        <NuGetExePath Condition=\" '$(NuGetExePath)' == '' \">$(NuGetToolsPath)\\NuGet.exe</NuGetExePath>\n        <PackageSources Condition=\" $(PackageSources) == '' \">@(PackageSource)</PackageSources>\n\n        <NuGetCommand Condition=\" '$(OS)' == 'Windows_NT'\">\"$(NuGetExePath)\"</NuGetCommand>\n        <NuGetCommand Condition=\" '$(OS)' != 'Windows_NT' \">mono --runtime=v4.0.30319 \"$(NuGetExePath)\"</NuGetCommand>\n\n        <PackageOutputDir Condition=\"$(PackageOutputDir) == ''\">$(TargetDir.Trim('\\\\'))</PackageOutputDir>\n\n        <RequireConsentSwitch Condition=\" $(RequireRestoreConsent) == 'true' \">-RequireConsent</RequireConsentSwitch>\n        <NonInteractiveSwitch Condition=\" '$(VisualStudioVersion)' != '' AND '$(OS)' == 'Windows_NT' \">-NonInteractive</NonInteractiveSwitch>\n\n        <PaddedSolutionDir Condition=\" '$(OS)' == 'Windows_NT'\">\"$(SolutionDir) \"</PaddedSolutionDir>\n        <PaddedSolutionDir Condition=\" '$(OS)' != 'Windows_NT' \">\"$(SolutionDir)\"</PaddedSolutionDir>\n\n        <!-- Commands -->\n        <RestoreCommand>$(NuGetCommand) install \"$(PackagesConfig)\" -source \"$(PackageSources)\"  $(NonInteractiveSwitch) $(RequireConsentSwitch) -solutionDir $(PaddedSolutionDir)</RestoreCommand>\n        <BuildCommand>$(NuGetCommand) pack \"$(ProjectPath)\" -Properties \"Configuration=$(Configuration);Platform=$(Platform)\" $(NonInteractiveSwitch) -OutputDirectory \"$(PackageOutputDir)\" -symbols</BuildCommand>\n\n        <!-- We need to ensure packages are restored prior to assembly resolve -->\n        <BuildDependsOn Condition=\"$(RestorePackages) == 'true'\">\n            RestorePackages;\n            $(BuildDependsOn);\n        </BuildDependsOn>\n\n        <!-- Make the build depend on restore packages -->\n        <BuildDependsOn Condition=\"$(BuildPackage) == 'true'\">\n            $(BuildDependsOn);\n            BuildPackage;\n        </BuildDependsOn>\n    </PropertyGroup>\n\n    <Target Name=\"CheckPrerequisites\">\n        <!-- Raise an error if we're unable to locate nuget.exe  -->\n        <Error Condition=\"'$(DownloadNuGetExe)' != 'true' AND !Exists('$(NuGetExePath)')\" Text=\"Unable to locate '$(NuGetExePath)'\" />\n        <!--\n        Take advantage of MsBuild's build dependency tracking to make sure that we only ever download nuget.exe once.\n        This effectively acts as a lock that makes sure that the download operation will only happen once and all\n        parallel builds will have to wait for it to complete.\n        -->\n        <MsBuild Targets=\"_DownloadNuGet\" Projects=\"$(MSBuildThisFileFullPath)\" Properties=\"Configuration=NOT_IMPORTANT;DownloadNuGetExe=$(DownloadNuGetExe)\" />\n    </Target>\n\n    <Target Name=\"_DownloadNuGet\">\n        <DownloadNuGet OutputFilename=\"$(NuGetExePath)\" Condition=\" '$(DownloadNuGetExe)' == 'true' AND !Exists('$(NuGetExePath)')\" />\n    </Target>\n\n    <Target Name=\"RestorePackages\" DependsOnTargets=\"CheckPrerequisites\">        \n        <Exec Command=\"$(RestoreCommand)\"\n              Condition=\"'$(OS)' != 'Windows_NT' And Exists('$(PackagesConfig)')\" />\n\n        <Exec Command=\"$(RestoreCommand)\"\n              LogStandardErrorAsError=\"true\"\n              Condition=\"'$(OS)' == 'Windows_NT' And Exists('$(PackagesConfig)')\" />\n    </Target>\n\n    <Target Name=\"BuildPackage\" DependsOnTargets=\"CheckPrerequisites\">\n        <Exec Command=\"$(BuildCommand)\"\n              Condition=\" '$(OS)' != 'Windows_NT' \" />\n\n        <Exec Command=\"$(BuildCommand)\"\n              LogStandardErrorAsError=\"true\"\n              Condition=\" '$(OS)' == 'Windows_NT' \" />\n    </Target>\n\n    <UsingTask TaskName=\"DownloadNuGet\" TaskFactory=\"CodeTaskFactory\" AssemblyFile=\"$(MSBuildToolsPath)\\Microsoft.Build.Tasks.v4.0.dll\">\n        <ParameterGroup>\n            <OutputFilename ParameterType=\"System.String\" Required=\"true\" />\n        </ParameterGroup>\n        <Task>\n            <Reference Include=\"System.Core\" />\n            <Using Namespace=\"System\" />\n            <Using Namespace=\"System.IO\" />\n            <Using Namespace=\"System.Net\" />\n            <Using Namespace=\"Microsoft.Build.Framework\" />\n            <Using Namespace=\"Microsoft.Build.Utilities\" />\n            <Code Type=\"Fragment\" Language=\"cs\">\n                <![CDATA[\n                try {\n                    OutputFilename = Path.GetFullPath(OutputFilename);\n\n                    Log.LogMessage(\"Downloading latest version of NuGet.exe...\");\n                    WebClient webClient = new WebClient();\n                    webClient.DownloadFile(\"https://www.nuget.org/nuget.exe\", OutputFilename);\n\n                    return true;\n                }\n                catch (Exception ex) {\n                    Log.LogErrorFromException(ex);\n                    return false;\n                }\n            ]]>\n            </Code>\n        </Task>\n    </UsingTask>\n</Project>\n"
  },
  {
    "path": "18 - Domain Events/DomainEvents.OnlineTakeawayStore.sln",
    "content": "﻿\nMicrosoft Visual Studio Solution File, Format Version 12.00\n# Visual Studio Express 2013 for Web\nVisualStudioVersion = 12.0.21005.1\nMinimumVisualStudioVersion = 10.0.40219.1\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"OnlineTakeawayStore.Tests\", \"OnlineTakeawayStore.Tests\\OnlineTakeawayStore.Tests.csproj\", \"{198900DA-2709-4229-8550-90D75E8A90E0}\"\nEndProject\nProject(\"{2150E333-8FDC-42A3-9474-1A3956D46DE8}\") = \".nuget\", \".nuget\", \"{D88E7BA8-BB6D-42CF-B1CB-53791C383A5A}\"\n\tProjectSection(SolutionItems) = preProject\n\t\t.nuget\\NuGet.Config = .nuget\\NuGet.Config\n\t\t.nuget\\NuGet.exe = .nuget\\NuGet.exe\n\t\t.nuget\\NuGet.targets = .nuget\\NuGet.targets\n\tEndProjectSection\nEndProject\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"OnlineTakeawayStore.ReturnEvents\", \"OnlineTakeawayStore.ReturnEvents\\OnlineTakeawayStore.ReturnEvents.csproj\", \"{13F72F5A-A233-4903-A685-76BC1CE87F49}\"\nEndProject\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"OnlineTakeawayStore.StaticDomainEvents\", \"OnlineTakeawayStore.StaticDomainEvents\\OnlineTakeawayStore.StaticDomainEvents.csproj\", \"{203BA48C-4EBB-480B-B01D-E7E7D7E60A96}\"\nEndProject\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"OnlineTakeawayStore.NativeEvents\", \"OnlineTakeawayStore.NativeEvents\\OnlineTakeawayStore.NativeEvents.csproj\", \"{8145FB74-F2DB-468C-A7BA-7A9EC391B9A4}\"\nEndProject\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"OnlineTakeawayStore.NServiceBus\", \"OnlineTakeawayStore.NServiceBus\\OnlineTakeawayStore.NServiceBus.csproj\", \"{A3D84A0A-D018-4CC7-94E5-9A334C83587E}\"\nEndProject\nGlobal\n\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\n\t\tDebug|Any CPU = Debug|Any CPU\n\t\tRelease|Any CPU = Release|Any CPU\n\tEndGlobalSection\n\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\n\t\t{198900DA-2709-4229-8550-90D75E8A90E0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{198900DA-2709-4229-8550-90D75E8A90E0}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{198900DA-2709-4229-8550-90D75E8A90E0}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{198900DA-2709-4229-8550-90D75E8A90E0}.Release|Any CPU.Build.0 = Release|Any CPU\n\t\t{13F72F5A-A233-4903-A685-76BC1CE87F49}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{13F72F5A-A233-4903-A685-76BC1CE87F49}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{13F72F5A-A233-4903-A685-76BC1CE87F49}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{13F72F5A-A233-4903-A685-76BC1CE87F49}.Release|Any CPU.Build.0 = Release|Any CPU\n\t\t{203BA48C-4EBB-480B-B01D-E7E7D7E60A96}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{203BA48C-4EBB-480B-B01D-E7E7D7E60A96}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{203BA48C-4EBB-480B-B01D-E7E7D7E60A96}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{203BA48C-4EBB-480B-B01D-E7E7D7E60A96}.Release|Any CPU.Build.0 = Release|Any CPU\n\t\t{8145FB74-F2DB-468C-A7BA-7A9EC391B9A4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{8145FB74-F2DB-468C-A7BA-7A9EC391B9A4}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{8145FB74-F2DB-468C-A7BA-7A9EC391B9A4}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{8145FB74-F2DB-468C-A7BA-7A9EC391B9A4}.Release|Any CPU.Build.0 = Release|Any CPU\n\t\t{A3D84A0A-D018-4CC7-94E5-9A334C83587E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{A3D84A0A-D018-4CC7-94E5-9A334C83587E}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{A3D84A0A-D018-4CC7-94E5-9A334C83587E}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{A3D84A0A-D018-4CC7-94E5-9A334C83587E}.Release|Any CPU.Build.0 = Release|Any CPU\n\tEndGlobalSection\n\tGlobalSection(SolutionProperties) = preSolution\n\t\tHideSolutionNode = FALSE\n\tEndGlobalSection\nEndGlobal\n"
  },
  {
    "path": "18 - Domain Events/OnlineTakeawayStore.NServiceBus/App.config",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>\n<configuration>\n  <configSections>\n    <section name=\"MessageForwardingInCaseOfFaultConfig\" type=\"NServiceBus.Config.MessageForwardingInCaseOfFaultConfig, NServiceBus.Core\" />\n    <section name=\"UnicastBusConfig\" type=\"NServiceBus.Config.UnicastBusConfig, NServiceBus.Core\" />\n    <section name=\"AuditConfig\" type=\"NServiceBus.Config.AuditConfig, NServiceBus.Core\" />\n  </configSections>\n  <!--<MessageForwardingInCaseOfFaultConfig \n    ErrorQueue=\"The queue to which errors will be forwarded.\" />-->\n  <MessageForwardingInCaseOfFaultConfig ErrorQueue=\"error\" />\n  <!--<UnicastBusConfig \n    DistributorControlAddress=\"The address for sending control messages to the distributor.\"\n    DistributorDataAddress=\"The distributor's data address, used as the return address of messages sent by this endpoint.\"\n    TimeoutManagerAddress=\"The address that the timeout manager will use to send and receive messages.\" >\n    <MessageEndpointMappings>\n      To register all message types defined in an assembly:\n      <add Assembly=\"assembly\" Endpoint=\"queue@machinename\" />\n      \n      To register all message types defined in an assembly with a specific namespace (it does not include sub namespaces):\n      <add Assembly=\"assembly\" Namespace=\"namespace\" Endpoint=\"queue@machinename\" />\n      \n      To register a specific type in an assembly:\n      <add Assembly=\"assembly\" Type=\"type fullname (http://msdn.microsoft.com/en-us/library/system.type.fullname.aspx)\" Endpoint=\"queue@machinename\" />\n    </MessageEndpointMappings>\n  </UnicastBusConfig>-->\n  <UnicastBusConfig>\n    <MessageEndpointMappings />\n  </UnicastBusConfig>\n  <!--<AuditConfig \n    QueueName=\"The address to which messages received will be forwarded.\"\n    OverrideTimeToBeReceived=\"The time to be received set on forwarded messages, specified as a timespan see http://msdn.microsoft.com/en-us/library/vstudio/se73z7b9.aspx\"  />-->\n  <AuditConfig QueueName=\"audit\" />\n</configuration>"
  },
  {
    "path": "18 - Domain Events/OnlineTakeawayStore.NServiceBus/Application/ConfirmDeliveryOfOrder.cs",
    "content": "﻿using NServiceBus;\nusing OnlineTakeawayStore.NativeEvents.Application.Events;\nusing OnlineTakeawayStore.NServiceBus.Model;\nusing OnlineTakeawayStore.NServiceBus.Model.Events;\nusing System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace OnlineTakeawayStore.NServiceBusApplication.Application\n{\n    public class ConfirmDeliveryOfOrder\n    {\n        private IOrderRepository orderRepository;\n\n        public ConfirmDeliveryOfOrder(IOrderRepository orderRepository)\n        {\n            this.orderRepository = orderRepository;\n        }\n\n        public void Confirm(DateTime timeThatPizzaWasDelivered, Guid orderId)\n        {\n            var order = orderRepository.FindBy(orderId);\n            order.ConfirmReceipt(timeThatPizzaWasDelivered);\n        }\n    }\n\n    // Automatically found by NServiceBus (due to inheriting IHandleMessages<T>\n    public class RefundOnDeliveryGuaranteeFailureHandler : IHandleMessages<DeliveryGuaranteeFailed>\n    {\n        // Injected by NServiceBus\n        public IBus Bus { get; set; }\n\n        public void Handle(DeliveryGuaranteeFailed message)\n        {\n            // handle internal event and publish external event to other bounded contexts\n            Bus.Send(new RefundDueToLateDelivery() { OrderId = message.Order.Id });\n        }\n    }\n\n}\n"
  },
  {
    "path": "18 - Domain Events/OnlineTakeawayStore.NServiceBus/Application/Events/RefundDueToLateDelivery.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace OnlineTakeawayStore.NativeEvents.Application.Events\n{\n    public class RefundDueToLateDelivery\n    {\n        public Guid OrderId { get; set; }\n    }\n}\n"
  },
  {
    "path": "18 - Domain Events/OnlineTakeawayStore.NServiceBus/Infrastructure/EndpointConfig.cs",
    "content": "using NServiceBus;\n\nnamespace OnlineTakeawayStore.NServiceBus\n{\n\n\t/*\n\t\tThis class configures this endpoint as a Server. More information about how to configure the NServiceBus host\n\t\tcan be found here: http://particular.net/articles/the-nservicebus-host\n\t*/\n\tpublic class EndpointConfig : IConfigureThisEndpoint, IWantCustomInitialization,\n        AsA_Publisher, AsA_Server\n    {\n        public void Init()\n        {\n            Configure.With()\n                    .DefiningEventsAs(t => t.Namespace != null\n                          && t.Namespace.Contains(\"Events\"));\n\n        }\n\n    }\n\n    public class DependencyRegistration : INeedInitialization\n    {\n        public void Init()\n        {\n            // dependency injection configuration goes here\n            //Configure.Instance.Configurer.ConfigureComponent<T>(DependencyLifecycle.SingleInstance);\n        }\n    }\n}\n"
  },
  {
    "path": "18 - Domain Events/OnlineTakeawayStore.NServiceBus/Model/Events/DeliveryGuaranteeFailed.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace OnlineTakeawayStore.NServiceBus.Model.Events\n{\n    public class DeliveryGuaranteeFailed\n    {\n        public DeliveryGuaranteeFailed(OrderForDelivery order)\n        {\n            Order = order;\n        }\n\n        public OrderForDelivery Order { get; private set; }\n    }\n}\n"
  },
  {
    "path": "18 - Domain Events/OnlineTakeawayStore.NServiceBus/Model/FoodDeliveryOrderSteps.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace OnlineTakeawayStore.NServiceBus.Model\n{\n    enum FoodDeliveryOrderSteps\n    {\n        Pending,\n        Delivered\n    }\n}\n"
  },
  {
    "path": "18 - Domain Events/OnlineTakeawayStore.NServiceBus/Model/IDeliveryGuaranteeOffer.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace OnlineTakeawayStore.NServiceBus.Model\n{\n    public interface IDeliveryGuaranteeOffer\n    {\n        bool IsNotSatisfiedBy(DateTime timeOfOrderBeingPlaced, DateTime timeThatPizzaWasDelivered);\n    }\n}\n"
  },
  {
    "path": "18 - Domain Events/OnlineTakeawayStore.NServiceBus/Model/IOrderRepository.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace OnlineTakeawayStore.NServiceBus.Model\n{\n    public interface IOrderRepository\n    {\n        OrderForDelivery FindBy(Guid id);\n    }\n}\n"
  },
  {
    "path": "18 - Domain Events/OnlineTakeawayStore.NServiceBus/Model/OrderForDelivery.cs",
    "content": "﻿using NServiceBus;\nusing OnlineTakeawayStore.NServiceBus.Model;\nusing OnlineTakeawayStore.NServiceBus.Model.Events;\nusing System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace OnlineTakeawayStore.NServiceBus.Model\n{\n    public class OrderForDelivery\n    {\n        public Guid Id { get; private set; }\n        private DateTime TimeOfOrderBeingPlaced { get; set; }\n        private DateTime TimeThatPizzaWasDelivered { get; set; }\n        private FoodDeliveryOrderSteps Status { get; set; }\n        private IDeliveryGuaranteeOffer DeliveryGuaranteeOffer { get; set; }\n        private IBus Bus { get; set; }\n\n        public OrderForDelivery(Guid id, Guid customerId, Guid restuarantId, List<int> menuItemIds, DateTime timeOfOrderBeingPlaced, IBus bus)\n        {\n            Id = id;\n            TimeOfOrderBeingPlaced = timeOfOrderBeingPlaced;\n            Status = FoodDeliveryOrderSteps.Pending;\n            Bus = bus;\n        }\n\n        public void ConfirmReceipt(DateTime timeThatPizzaWasDelivered)\n        {\n            if (Status != FoodDeliveryOrderSteps.Delivered)\n            {\n                TimeThatPizzaWasDelivered = timeThatPizzaWasDelivered;\n                Status = FoodDeliveryOrderSteps.Delivered;\n                if (DeliveryGuaranteeOffer.IsNotSatisfiedBy(TimeOfOrderBeingPlaced, TimeThatPizzaWasDelivered))\n                {\n                    Bus.InMemory.Raise(new DeliveryGuaranteeFailed(this));\n                }\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "18 - Domain Events/OnlineTakeawayStore.NServiceBus/OnlineTakeawayStore.NServiceBus.csproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"12.0\" DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <Import Project=\"$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props\" Condition=\"Exists('$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props')\" />\n  <PropertyGroup>\n    <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>\n    <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>\n    <ProjectGuid>{A3D84A0A-D018-4CC7-94E5-9A334C83587E}</ProjectGuid>\n    <OutputType>Library</OutputType>\n    <AppDesignerFolder>Properties</AppDesignerFolder>\n    <RootNamespace>OnlineTakeawayStore.NServiceBus</RootNamespace>\n    <AssemblyName>OnlineTakeawayStore.NServiceBus</AssemblyName>\n    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\n    <FileAlignment>512</FileAlignment>\n    <SolutionDir Condition=\"$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'\">..\\..\\</SolutionDir>\n    <RestorePackages>true</RestorePackages>\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' \">\n    <DebugSymbols>true</DebugSymbols>\n    <DebugType>full</DebugType>\n    <Optimize>false</Optimize>\n    <OutputPath>bin\\Debug\\</OutputPath>\n    <DefineConstants>DEBUG;TRACE</DefineConstants>\n    <ErrorReport>prompt</ErrorReport>\n    <WarningLevel>4</WarningLevel>\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' \">\n    <DebugType>pdbonly</DebugType>\n    <Optimize>true</Optimize>\n    <OutputPath>bin\\Release\\</OutputPath>\n    <DefineConstants>TRACE</DefineConstants>\n    <ErrorReport>prompt</ErrorReport>\n    <WarningLevel>4</WarningLevel>\n  </PropertyGroup>\n  <ItemGroup>\n    <Reference Include=\"NServiceBus\">\n      <HintPath>..\\packages\\NServiceBus.Interfaces.4.3.3\\lib\\net40\\NServiceBus.dll</HintPath>\n    </Reference>\n    <Reference Include=\"NServiceBus.Core\">\n      <HintPath>..\\packages\\NServiceBus.4.3.3\\lib\\net40\\NServiceBus.Core.dll</HintPath>\n    </Reference>\n    <Reference Include=\"NServiceBus.Host\">\n      <HintPath>..\\packages\\NServiceBus.Host.4.3.3\\lib\\net40\\NServiceBus.Host.exe</HintPath>\n    </Reference>\n    <Reference Include=\"System\" />\n    <Reference Include=\"System.Core\" />\n    <Reference Include=\"System.Xml.Linq\" />\n    <Reference Include=\"System.Data.DataSetExtensions\" />\n    <Reference Include=\"Microsoft.CSharp\" />\n    <Reference Include=\"System.Data\" />\n    <Reference Include=\"System.Xml\" />\n  </ItemGroup>\n  <ItemGroup>\n    <Compile Include=\"Application\\ConfirmDeliveryOfOrder.cs\" />\n    <Compile Include=\"Application\\Events\\RefundDueToLateDelivery.cs\" />\n    <Compile Include=\"Infrastructure\\EndpointConfig.cs\" />\n    <Compile Include=\"Model\\Events\\DeliveryGuaranteeFailed.cs\" />\n    <Compile Include=\"Model\\FoodDeliveryOrderSteps.cs\" />\n    <Compile Include=\"Model\\IDeliveryGuaranteeOffer.cs\" />\n    <Compile Include=\"Model\\IOrderRepository.cs\" />\n    <Compile Include=\"Model\\OrderForDelivery.cs\" />\n    <Compile Include=\"Properties\\AssemblyInfo.cs\" />\n  </ItemGroup>\n  <ItemGroup>\n    <None Include=\"App.config\" />\n    <None Include=\"packages.config\" />\n  </ItemGroup>\n  <ItemGroup />\n  <Import Project=\"$(MSBuildToolsPath)\\Microsoft.CSharp.targets\" />\n  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \n       Other similar extension points exist, see Microsoft.Common.targets.\n  <Target Name=\"BeforeBuild\">\n  </Target>\n  <Target Name=\"AfterBuild\">\n  </Target>\n  -->\n  <PropertyGroup>\n    <StartAction>Program</StartAction>\n    <StartProgram>$(ProjectDir)$(OutputPath)NServiceBus.Host.exe</StartProgram>\n  </PropertyGroup>\n  <Import Project=\"$(SolutionDir)\\.nuget\\NuGet.targets\" Condition=\"Exists('$(SolutionDir)\\.nuget\\NuGet.targets')\" />\n</Project>"
  },
  {
    "path": "18 - Domain Events/OnlineTakeawayStore.NServiceBus/Properties/AssemblyInfo.cs",
    "content": "﻿using System.Reflection;\nusing System.Runtime.CompilerServices;\nusing System.Runtime.InteropServices;\n\n// General Information about an assembly is controlled through the following \n// set of attributes. Change these attribute values to modify the information\n// associated with an assembly.\n[assembly: AssemblyTitle(\"OnlineTakeawayStore.NServiceBusApplication\")]\n[assembly: AssemblyDescription(\"\")]\n[assembly: AssemblyConfiguration(\"\")]\n[assembly: AssemblyCompany(\"\")]\n[assembly: AssemblyProduct(\"OnlineTakeawayStore.NServiceBusApplication\")]\n[assembly: AssemblyCopyright(\"Copyright ©  2014\")]\n[assembly: AssemblyTrademark(\"\")]\n[assembly: AssemblyCulture(\"\")]\n\n// Setting ComVisible to false makes the types in this assembly not visible \n// to COM components.  If you need to access a type in this assembly from \n// COM, set the ComVisible attribute to true on that type.\n[assembly: ComVisible(false)]\n\n// The following GUID is for the ID of the typelib if this project is exposed to COM\n[assembly: Guid(\"a3678d29-22de-46cd-8b5c-a6e87fc6d0e3\")]\n\n// Version information for an assembly consists of the following four values:\n//\n//      Major Version\n//      Minor Version \n//      Build Number\n//      Revision\n//\n// You can specify all the values or you can default the Build and Revision Numbers \n// by using the '*' as shown below:\n// [assembly: AssemblyVersion(\"1.0.*\")]\n[assembly: AssemblyVersion(\"1.0.0.0\")]\n[assembly: AssemblyFileVersion(\"1.0.0.0\")]\n"
  },
  {
    "path": "18 - Domain Events/OnlineTakeawayStore.NServiceBus/packages.config",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<packages>\n  <package id=\"NServiceBus\" version=\"4.3.3\" targetFramework=\"net45\" />\n  <package id=\"NServiceBus.Host\" version=\"4.3.3\" targetFramework=\"net45\" />\n  <package id=\"NServiceBus.Interfaces\" version=\"4.3.3\" targetFramework=\"net45\" />\n</packages>"
  },
  {
    "path": "18 - Domain Events/OnlineTakeawayStore.NativeEvents/Application/CofirmDeliveryOfOrder.cs",
    "content": "﻿using NServiceBus;\nusing OnlineTakeawayStore.NativeEvents.Application.Events;\nusing OnlineTakeawayStore.NativeEvents.Model;\nusing OnlineTakeawayStore.NativeEvents.Model.Events;\nusing System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace OnlineTakeawayStore.NativeEvents.Application\n{\n    public class ConfirmDeliveryOfOrder\n    {\n        private IOrderRepository orderRepository;\n        private IBus bus;\n\n        public ConfirmDeliveryOfOrder(IOrderRepository orderRepository, IBus bus)\n        {\n            this.orderRepository = orderRepository;\n            this.bus = bus;\n        }\n\n        public void Confirm(DateTime timeThatPizzaWasDelivered, Guid orderId)\n        {\n            var order = orderRepository.FindBy(orderId);\n            order.DeliveryGuaranteeFailed += onDeliveryGuaranteeFailed;\n            order.ConfirmReceipt(timeThatPizzaWasDelivered);\n        }\n\n        private void onDeliveryGuaranteeFailed(DeliveryGuaranteeFailed evnt)\n        {\n            // handle internal event and publish external event to other bounded contexts\n            bus.Send(new RefundDueToLateDelivery() { OrderId = evnt.Order.Id });\n        }\n    }\n}\n"
  },
  {
    "path": "18 - Domain Events/OnlineTakeawayStore.NativeEvents/Application/Events/RefundDueToLateDelivery.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace OnlineTakeawayStore.NativeEvents.Application.Events\n{\n    public class RefundDueToLateDelivery\n    {\n        public Guid OrderId { get; set; }\n    }\n}\n"
  },
  {
    "path": "18 - Domain Events/OnlineTakeawayStore.NativeEvents/Model/Events/DeliveryGuaranteeFailed.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace OnlineTakeawayStore.NativeEvents.Model.Events\n{\n    public class DeliveryGuaranteeFailed\n    {\n        public DeliveryGuaranteeFailed(OrderForDelivery order)\n        {\n            Order = order;\n        }\n\n        public OrderForDelivery Order { get; private set; }\n    }\n}\n"
  },
  {
    "path": "18 - Domain Events/OnlineTakeawayStore.NativeEvents/Model/FoodDeliveryOrderSteps.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace OnlineTakeawayStore.NativeEvents.Model\n{\n    enum FoodDeliveryOrderSteps\n    {\n        Pending,\n        Delivered\n    }\n}\n"
  },
  {
    "path": "18 - Domain Events/OnlineTakeawayStore.NativeEvents/Model/IDeliveryGuaranteeOffer.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace OnlineTakeawayStore.NativeEvents.Model\n{\n    public interface IDeliveryGuaranteeOffer\n    {\n        bool IsNotSatisfiedBy(DateTime timeOfOrderBeingPlaced, DateTime timeThatPizzaWasDelivered);\n    }\n}\n"
  },
  {
    "path": "18 - Domain Events/OnlineTakeawayStore.NativeEvents/Model/IOrderRepository.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace OnlineTakeawayStore.NativeEvents.Model\n{\n    public interface IOrderRepository\n    {\n        OrderForDelivery FindBy(Guid id);\n    }\n}\n"
  },
  {
    "path": "18 - Domain Events/OnlineTakeawayStore.NativeEvents/Model/OrderForDelivery.cs",
    "content": "﻿using OnlineTakeawayStore.NativeEvents.Model.Events;\nusing System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace OnlineTakeawayStore.NativeEvents.Model\n{\n    public class OrderForDelivery\n    {\n        public Guid Id { get; private set; }\n        private DateTime TimeOfOrderBeingPlaced { get; set; }\n        private DateTime TimeThatPizzaWasDelivered { get; set; }\n        private FoodDeliveryOrderSteps Status { get; set; }\n        private IDeliveryGuaranteeOffer DeliveryGuaranteeOffer { get; set; }\n\n        public delegate void DeliveryGuaranteeFailedHandler(DeliveryGuaranteeFailed evnt);\n        public event DeliveryGuaranteeFailedHandler DeliveryGuaranteeFailed;\n\n        public OrderForDelivery(Guid id, Guid customerId, Guid restuarantId, List<int> menuItemIds, DateTime timeOfOrderBeingPlaced)\n        {\n            Id = id;\n            TimeOfOrderBeingPlaced = timeOfOrderBeingPlaced;\n            Status = FoodDeliveryOrderSteps.Pending;\n        }\n\n        public void ConfirmReceipt(DateTime timeThatPizzaWasDelivered)\n        {\n            if (Status != FoodDeliveryOrderSteps.Delivered)\n            {\n                TimeThatPizzaWasDelivered = timeThatPizzaWasDelivered;\n                Status = FoodDeliveryOrderSteps.Delivered;\n                if(DeliveryGuaranteeOffer.IsNotSatisfiedBy(TimeOfOrderBeingPlaced, TimeThatPizzaWasDelivered))\n                {\n                    if (DeliveryGuaranteeFailed !=  null)\n                        DeliveryGuaranteeFailed(new DeliveryGuaranteeFailed(this));\n                }\n            }\n        }\n    }\n\n }\n"
  },
  {
    "path": "18 - Domain Events/OnlineTakeawayStore.NativeEvents/OnlineTakeawayStore.NativeEvents.csproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"12.0\" DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <Import Project=\"$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props\" Condition=\"Exists('$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props')\" />\n  <PropertyGroup>\n    <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>\n    <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>\n    <ProjectGuid>{8145FB74-F2DB-468C-A7BA-7A9EC391B9A4}</ProjectGuid>\n    <OutputType>Library</OutputType>\n    <AppDesignerFolder>Properties</AppDesignerFolder>\n    <RootNamespace>OnlineTakeawayStore.NativeEvents</RootNamespace>\n    <AssemblyName>OnlineTakeawayStore.NativeEvents</AssemblyName>\n    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\n    <FileAlignment>512</FileAlignment>\n    <SolutionDir Condition=\"$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'\">..\\</SolutionDir>\n    <RestorePackages>true</RestorePackages>\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' \">\n    <DebugSymbols>true</DebugSymbols>\n    <DebugType>full</DebugType>\n    <Optimize>false</Optimize>\n    <OutputPath>bin\\Debug\\</OutputPath>\n    <DefineConstants>DEBUG;TRACE</DefineConstants>\n    <ErrorReport>prompt</ErrorReport>\n    <WarningLevel>4</WarningLevel>\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' \">\n    <DebugType>pdbonly</DebugType>\n    <Optimize>true</Optimize>\n    <OutputPath>bin\\Release\\</OutputPath>\n    <DefineConstants>TRACE</DefineConstants>\n    <ErrorReport>prompt</ErrorReport>\n    <WarningLevel>4</WarningLevel>\n  </PropertyGroup>\n  <ItemGroup>\n    <Reference Include=\"NServiceBus\">\n      <HintPath>..\\packages\\NServiceBus.Interfaces.4.3.3\\lib\\net40\\NServiceBus.dll</HintPath>\n    </Reference>\n    <Reference Include=\"System\" />\n    <Reference Include=\"System.Core\" />\n    <Reference Include=\"System.Xml.Linq\" />\n    <Reference Include=\"System.Data.DataSetExtensions\" />\n    <Reference Include=\"Microsoft.CSharp\" />\n    <Reference Include=\"System.Data\" />\n    <Reference Include=\"System.Xml\" />\n  </ItemGroup>\n  <ItemGroup>\n    <Compile Include=\"Application\\CofirmDeliveryOfOrder.cs\" />\n    <Compile Include=\"Application\\Events\\RefundDueToLateDelivery.cs\" />\n    <Compile Include=\"Model\\Events\\DeliveryGuaranteeFailed.cs\" />\n    <Compile Include=\"Model\\FoodDeliveryOrderSteps.cs\" />\n    <Compile Include=\"Model\\IDeliveryGuaranteeOffer.cs\" />\n    <Compile Include=\"Model\\IOrderRepository.cs\" />\n    <Compile Include=\"Model\\OrderForDelivery.cs\" />\n    <Compile Include=\"Properties\\AssemblyInfo.cs\" />\n  </ItemGroup>\n  <ItemGroup>\n    <Folder Include=\"Infrastructure\\\" />\n  </ItemGroup>\n  <ItemGroup>\n    <None Include=\"packages.config\" />\n  </ItemGroup>\n  <Import Project=\"$(MSBuildToolsPath)\\Microsoft.CSharp.targets\" />\n  <Import Project=\"$(SolutionDir)\\.nuget\\NuGet.targets\" Condition=\"Exists('$(SolutionDir)\\.nuget\\NuGet.targets')\" />\n  <Target Name=\"EnsureNuGetPackageBuildImports\" BeforeTargets=\"PrepareForBuild\">\n    <PropertyGroup>\n      <ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them.  For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>\n    </PropertyGroup>\n    <Error Condition=\"!Exists('$(SolutionDir)\\.nuget\\NuGet.targets')\" Text=\"$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\\.nuget\\NuGet.targets'))\" />\n  </Target>\n  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \n       Other similar extension points exist, see Microsoft.Common.targets.\n  <Target Name=\"BeforeBuild\">\n  </Target>\n  <Target Name=\"AfterBuild\">\n  </Target>\n  -->\n</Project>"
  },
  {
    "path": "18 - Domain Events/OnlineTakeawayStore.NativeEvents/Properties/AssemblyInfo.cs",
    "content": "﻿using System.Reflection;\nusing System.Runtime.CompilerServices;\nusing System.Runtime.InteropServices;\n\n// General Information about an assembly is controlled through the following \n// set of attributes. Change these attribute values to modify the information\n// associated with an assembly.\n[assembly: AssemblyTitle(\"OnlineTakeawayStore.NativeEvents\")]\n[assembly: AssemblyDescription(\"\")]\n[assembly: AssemblyConfiguration(\"\")]\n[assembly: AssemblyCompany(\"\")]\n[assembly: AssemblyProduct(\"OnlineTakeawayStore.NativeEvents\")]\n[assembly: AssemblyCopyright(\"Copyright ©  2014\")]\n[assembly: AssemblyTrademark(\"\")]\n[assembly: AssemblyCulture(\"\")]\n\n// Setting ComVisible to false makes the types in this assembly not visible \n// to COM components.  If you need to access a type in this assembly from \n// COM, set the ComVisible attribute to true on that type.\n[assembly: ComVisible(false)]\n\n// The following GUID is for the ID of the typelib if this project is exposed to COM\n[assembly: Guid(\"6b352217-2ec8-4eed-aa42-1014381f786a\")]\n\n// Version information for an assembly consists of the following four values:\n//\n//      Major Version\n//      Minor Version \n//      Build Number\n//      Revision\n//\n// You can specify all the values or you can default the Build and Revision Numbers \n// by using the '*' as shown below:\n// [assembly: AssemblyVersion(\"1.0.*\")]\n[assembly: AssemblyVersion(\"1.0.0.0\")]\n[assembly: AssemblyFileVersion(\"1.0.0.0\")]\n"
  },
  {
    "path": "18 - Domain Events/OnlineTakeawayStore.NativeEvents/packages.config",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<packages>\n  <package id=\"NServiceBus.Interfaces\" version=\"4.3.3\" targetFramework=\"net45\" />\n</packages>"
  },
  {
    "path": "18 - Domain Events/OnlineTakeawayStore.ReturnEvents/Application/ConfirmDeliveryOfOrder.cs",
    "content": "﻿using OnlineTakeawayStore.ReturnEvents.Infrastructure;\nusing OnlineTakeawayStore.ReturnEvents.Model;\nusing System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace OnlineTakeawayStore.ReturnEvents.Application\n{\n    public class ConfirmDeliveryOfOrder\n    {\n        private IOrderRepository orderRepository;\n        private IEventDispatcher dispatcher;\n\n        public ConfirmDeliveryOfOrder(IOrderRepository orderRepository, IEventDispatcher dispatcher)\n        {\n            this.orderRepository = orderRepository;\n            this.dispatcher = dispatcher;\n        }\n\n        public void Confirm(DateTime timeThatPizzaWasDelivered, Guid orderId)\n        {\n            var order = orderRepository.FindBy(orderId);\n            order.ConfirmReceipt(timeThatPizzaWasDelivered);\n\n            foreach (var evnt in order.RecordedEvents)\n            {\n                dispatcher.Dispatch(evnt);\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "18 - Domain Events/OnlineTakeawayStore.ReturnEvents/Infrastructure/IEventDispatcher.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace OnlineTakeawayStore.ReturnEvents.Infrastructure\n{\n    public interface IEventDispatcher\n    {\n        void Dispatch<T> (T evnt);\n    }\n}\n"
  },
  {
    "path": "18 - Domain Events/OnlineTakeawayStore.ReturnEvents/Model/Events/DeliveryGuaranteeFailed.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace OnlineTakeawayStore.ReturnEvents.Model.Events\n{\n    public class DeliveryGuaranteeFailed\n    {\n        public DeliveryGuaranteeFailed(OrderForDelivery order)\n        {\n            Order = order;\n        }\n\n        public OrderForDelivery Order { get; private set; }\n    }\n}\n"
  },
  {
    "path": "18 - Domain Events/OnlineTakeawayStore.ReturnEvents/Model/FoodDeliveryOrderSteps.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace OnlineTakeawayStore.ReturnEvents.Model\n{\n    enum FoodDeliveryOrderSteps\n    {\n        Pending,\n        Delivered\n    }\n}\n"
  },
  {
    "path": "18 - Domain Events/OnlineTakeawayStore.ReturnEvents/Model/IDeliveryGuaranteeOffer.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace OnlineTakeawayStore.ReturnEvents.Model\n{\n    public interface IDeliveryGuaranteeOffer\n    {\n        bool IsNotSatisfiedBy(DateTime timeOfOrderBeingPlaced, DateTime timeThatPizzaWasDelivered);\n    }\n}\n"
  },
  {
    "path": "18 - Domain Events/OnlineTakeawayStore.ReturnEvents/Model/IOrderRepository.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace OnlineTakeawayStore.ReturnEvents.Model\n{\n    public interface IOrderRepository\n    {\n        OrderForDelivery FindBy(Guid id);\n    }\n}\n"
  },
  {
    "path": "18 - Domain Events/OnlineTakeawayStore.ReturnEvents/Model/OrderForDelivery.cs",
    "content": "﻿using OnlineTakeawayStore.ReturnEvents.Model.Events;\nusing System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace OnlineTakeawayStore.ReturnEvents.Model\n{\n    public class OrderForDelivery\n    {\n        public Guid Id { get; private set; }\n        private DateTime TimeOfOrderBeingPlaced { get; set; }\n        private DateTime TimeThatPizzaWasDelivered { get; set; }\n        private FoodDeliveryOrderSteps Status { get; set; }\n        private IDeliveryGuaranteeOffer DeliveryGuaranteeOffer { get; set; }\n\n        public OrderForDelivery(Guid id, Guid customerId, Guid restuarantId, List<int> menuItemIds, DateTime timeOfOrderBeingPlaced,\n            IDeliveryGuaranteeOffer deliveryGuaranteeOffer)\n        {\n            Id = id;\n            TimeOfOrderBeingPlaced = timeOfOrderBeingPlaced;\n            Status = FoodDeliveryOrderSteps.Pending;\n            RecordedEvents = new List<Object>();\n            DeliveryGuaranteeOffer = deliveryGuaranteeOffer;\n        }\n\n        public List<Object> RecordedEvents { get; private set; }\n\n        public void ConfirmReceipt(DateTime timeThatPizzaWasDelivered)\n        {\n            if (Status != FoodDeliveryOrderSteps.Delivered)\n            {\n                TimeThatPizzaWasDelivered = timeThatPizzaWasDelivered;\n                Status = FoodDeliveryOrderSteps.Delivered;\n                if (DeliveryGuaranteeOffer.IsNotSatisfiedBy(TimeOfOrderBeingPlaced, TimeThatPizzaWasDelivered))\n                {\n                     RecordedEvents.Add(new DeliveryGuaranteeFailed(this));\n                }\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "18 - Domain Events/OnlineTakeawayStore.ReturnEvents/OnlineTakeawayStore.ReturnEvents.csproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"12.0\" DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <Import Project=\"$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props\" Condition=\"Exists('$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props')\" />\n  <PropertyGroup>\n    <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>\n    <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>\n    <ProjectGuid>{13F72F5A-A233-4903-A685-76BC1CE87F49}</ProjectGuid>\n    <OutputType>Library</OutputType>\n    <AppDesignerFolder>Properties</AppDesignerFolder>\n    <RootNamespace>OnlineTakeawayStore.ReturnEvents</RootNamespace>\n    <AssemblyName>OnlineTakeawayStore.ReturnEvents</AssemblyName>\n    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\n    <FileAlignment>512</FileAlignment>\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' \">\n    <DebugSymbols>true</DebugSymbols>\n    <DebugType>full</DebugType>\n    <Optimize>false</Optimize>\n    <OutputPath>bin\\Debug\\</OutputPath>\n    <DefineConstants>DEBUG;TRACE</DefineConstants>\n    <ErrorReport>prompt</ErrorReport>\n    <WarningLevel>4</WarningLevel>\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' \">\n    <DebugType>pdbonly</DebugType>\n    <Optimize>true</Optimize>\n    <OutputPath>bin\\Release\\</OutputPath>\n    <DefineConstants>TRACE</DefineConstants>\n    <ErrorReport>prompt</ErrorReport>\n    <WarningLevel>4</WarningLevel>\n  </PropertyGroup>\n  <ItemGroup>\n    <Reference Include=\"System\" />\n    <Reference Include=\"System.Core\" />\n    <Reference Include=\"System.Xml.Linq\" />\n    <Reference Include=\"System.Data.DataSetExtensions\" />\n    <Reference Include=\"Microsoft.CSharp\" />\n    <Reference Include=\"System.Data\" />\n    <Reference Include=\"System.Xml\" />\n  </ItemGroup>\n  <ItemGroup>\n    <Compile Include=\"Application\\ConfirmDeliveryOfOrder.cs\" />\n    <Compile Include=\"Infrastructure\\IEventDispatcher.cs\" />\n    <Compile Include=\"Model\\Events\\DeliveryGuaranteeFailed.cs\" />\n    <Compile Include=\"Model\\FoodDeliveryOrderSteps.cs\" />\n    <Compile Include=\"Model\\IDeliveryGuaranteeOffer.cs\" />\n    <Compile Include=\"Model\\IOrderRepository.cs\" />\n    <Compile Include=\"Model\\OrderForDelivery.cs\" />\n    <Compile Include=\"Properties\\AssemblyInfo.cs\" />\n  </ItemGroup>\n  <ItemGroup />\n  <Import Project=\"$(MSBuildToolsPath)\\Microsoft.CSharp.targets\" />\n  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \n       Other similar extension points exist, see Microsoft.Common.targets.\n  <Target Name=\"BeforeBuild\">\n  </Target>\n  <Target Name=\"AfterBuild\">\n  </Target>\n  -->\n</Project>"
  },
  {
    "path": "18 - Domain Events/OnlineTakeawayStore.ReturnEvents/Properties/AssemblyInfo.cs",
    "content": "﻿using System.Reflection;\nusing System.Runtime.CompilerServices;\nusing System.Runtime.InteropServices;\n\n// General Information about an assembly is controlled through the following \n// set of attributes. Change these attribute values to modify the information\n// associated with an assembly.\n[assembly: AssemblyTitle(\"OnlineTakeawayStore.ReturnEvents\")]\n[assembly: AssemblyDescription(\"\")]\n[assembly: AssemblyConfiguration(\"\")]\n[assembly: AssemblyCompany(\"\")]\n[assembly: AssemblyProduct(\"OnlineTakeawayStore.ReturnEvents\")]\n[assembly: AssemblyCopyright(\"Copyright ©  2014\")]\n[assembly: AssemblyTrademark(\"\")]\n[assembly: AssemblyCulture(\"\")]\n\n// Setting ComVisible to false makes the types in this assembly not visible \n// to COM components.  If you need to access a type in this assembly from \n// COM, set the ComVisible attribute to true on that type.\n[assembly: ComVisible(false)]\n\n// The following GUID is for the ID of the typelib if this project is exposed to COM\n[assembly: Guid(\"cf0b0860-d298-4448-a204-185968513ef1\")]\n\n// Version information for an assembly consists of the following four values:\n//\n//      Major Version\n//      Minor Version \n//      Build Number\n//      Revision\n//\n// You can specify all the values or you can default the Build and Revision Numbers \n// by using the '*' as shown below:\n// [assembly: AssemblyVersion(\"1.0.*\")]\n[assembly: AssemblyVersion(\"1.0.0.0\")]\n[assembly: AssemblyFileVersion(\"1.0.0.0\")]\n"
  },
  {
    "path": "18 - Domain Events/OnlineTakeawayStore.StaticDomainEvents/Application/ConfirmDeliveryOfOrder.cs",
    "content": "﻿using NServiceBus;\nusing OnlineTakeawayStore.StaticDomainEvents.Application.Events;\nusing OnlineTakeawayStore.StaticDomainEvents.Infrastructure;\nusing OnlineTakeawayStore.StaticDomainEvents.Model;\nusing OnlineTakeawayStore.StaticDomainEvents.Model.Events;\nusing System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace OnlineTakeawayStore.StaticDomainEvents.Application\n{\n    public class ConfirmDeliveryOfOrder\n    {\n        private IOrderRepository orderRepository;\n        private IBus bus;\n\n        public ConfirmDeliveryOfOrder(IOrderRepository orderRepository, IBus bus)\n        {\n            this.orderRepository = orderRepository;\n            this.bus = bus;\n        }\n\n        public void Confirm(DateTime timeThatPizzaWasDelivered, Guid orderId)\n        {\n            using(DomainEvents.Register<DeliveryGuaranteeFailed>(onDeliveryFailure))\n            {\n                var order = orderRepository.FindBy(orderId);\n                order.ConfirmReceipt(timeThatPizzaWasDelivered);\n            }\n        }\n\n        private void onDeliveryFailure(DeliveryGuaranteeFailed evnt)\n        {\n            // handle internal event and publish external event to other bounded contexts\n            bus.Send(new RefundDueToLateDelivery() { OrderId = evnt.Order.Id });\n        }\n    }\n}\n"
  },
  {
    "path": "18 - Domain Events/OnlineTakeawayStore.StaticDomainEvents/Application/Events/RefundDueToLateDelivery.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace OnlineTakeawayStore.StaticDomainEvents.Application.Events\n{\n    public class RefundDueToLateDelivery\n    {\n        public Guid OrderId { get; set; }\n    }\n}\n"
  },
  {
    "path": "18 - Domain Events/OnlineTakeawayStore.StaticDomainEvents/Infrastructure/DomainEvents.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace OnlineTakeawayStore.StaticDomainEvents.Infrastructure\n{\n    /// <summary>\n    /// Domain Events class from http://www.udidahan.com/2008/08/25/domain-events-take-2/\n    /// </summary>\n    public static class DomainEvents\n    {\n        [ThreadStatic]\n        private static List<Delegate> _actions;\n        private static List<Delegate> Actions\n        {\n            get\n            {\n                if (_actions == null)\n                {\n                    _actions = new List<Delegate>();\n                }\n                return _actions;\n            }\n        }\n       \n        public static IDisposable Register<T>(Action<T> callback)\n        {           \n            Actions.Add(callback);\n\n            return new DomainEventRegistrationRemover(() => Actions.Remove(callback));\n        }\n\n        public static void Raise<T>(T eventArgs)\n        {\n            foreach (Delegate action in Actions)\n            {\n                Action<T> typedAction = action as Action<T>;\n                if (typedAction != null)\n                {\n                    typedAction(eventArgs);\n                }\n            }\n        }\n     \n        private sealed class DomainEventRegistrationRemover : IDisposable\n        {\n            private readonly Action _callOnDispose;\n\n            public DomainEventRegistrationRemover(Action toCall)\n            {\n                _callOnDispose = toCall;\n            }\n\n            public void Dispose()\n            {\n                _callOnDispose();\n            }\n        }\n    }\n}\n\n"
  },
  {
    "path": "18 - Domain Events/OnlineTakeawayStore.StaticDomainEvents/Model/Events/DeliveryGuaranteeFailed.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace OnlineTakeawayStore.StaticDomainEvents.Model.Events\n{\n    public class DeliveryGuaranteeFailed\n    {\n        public DeliveryGuaranteeFailed(OrderForDelivery order)\n        {\n            Order = order;\n        }\n\n        public OrderForDelivery Order { get; private set; }\n    }\n}\n"
  },
  {
    "path": "18 - Domain Events/OnlineTakeawayStore.StaticDomainEvents/Model/FoodDeliveryOrderSteps.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace OnlineTakeawayStore.StaticDomainEvents.Model\n{\n    enum FoodDeliveryOrderSteps\n    {\n        Pending,\n        Delivered\n    }\n}\n"
  },
  {
    "path": "18 - Domain Events/OnlineTakeawayStore.StaticDomainEvents/Model/IDeliveryGuaranteeOffer.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace OnlineTakeawayStore.StaticDomainEvents.Model\n{\n    public interface IDeliveryGuaranteeOffer\n    {\n        bool IsNotSatisfiedBy(DateTime timeOfOrderBeingPlaced, DateTime timeThatPizzaWasDelivered);\n    }\n\n    public class ThirtyMinuteDeliveryGuaranteeOffer : IDeliveryGuaranteeOffer\n    {\n        public bool IsNotSatisfiedBy(DateTime timeOfOrderBeingPlaced, DateTime timeThatPizzaWasDelivered)\n        {\n            return (timeThatPizzaWasDelivered - timeOfOrderBeingPlaced) > TimeSpan.FromMinutes(30);\n        }\n    }\n\n}\n"
  },
  {
    "path": "18 - Domain Events/OnlineTakeawayStore.StaticDomainEvents/Model/IOrderRepository.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace OnlineTakeawayStore.StaticDomainEvents.Model\n{\n    public interface IOrderRepository\n    {\n        OrderForDelivery FindBy(Guid id);\n    }\n}\n"
  },
  {
    "path": "18 - Domain Events/OnlineTakeawayStore.StaticDomainEvents/Model/OrderForDelivery.cs",
    "content": "﻿using OnlineTakeawayStore.StaticDomainEvents.Infrastructure;\nusing OnlineTakeawayStore.StaticDomainEvents.Model.Events;\nusing System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace OnlineTakeawayStore.StaticDomainEvents.Model\n{\n    public class OrderForDelivery\n    {\n        public Guid Id { get; private set; }\n        private DateTime TimeOfOrderBeingPlaced { get; set; }\n        private DateTime TimeThatPizzaWasDelivered { get; set; }\n        private FoodDeliveryOrderSteps Status { get; set; }\n        private IDeliveryGuaranteeOffer DeliveryGuaranteeOffer { get; set; }\n\n        public OrderForDelivery(Guid id, Guid customerId, Guid restuarantId, List<int> menuItemIds, DateTime timeOfOrderBeingPlaced,\n            IDeliveryGuaranteeOffer deliveryGuaranteeOffer)\n        {\n            Id = id;\n            TimeOfOrderBeingPlaced = timeOfOrderBeingPlaced;\n            Status = FoodDeliveryOrderSteps.Pending;\n            DeliveryGuaranteeOffer = deliveryGuaranteeOffer;\n        }\n\n        public void ConfirmReceipt(DateTime timeThatPizzaWasDelivered)\n        {\n            if (Status != FoodDeliveryOrderSteps.Delivered)\n            {\n                TimeThatPizzaWasDelivered = timeThatPizzaWasDelivered;\n                Status = FoodDeliveryOrderSteps.Delivered;\n                if (DeliveryGuaranteeOffer.IsNotSatisfiedBy(TimeOfOrderBeingPlaced, TimeThatPizzaWasDelivered))\n                {\n                    DomainEvents.Raise(new DeliveryGuaranteeFailed(this));\n                }\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "18 - Domain Events/OnlineTakeawayStore.StaticDomainEvents/OnlineTakeawayStore.StaticDomainEvents.csproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"12.0\" DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <Import Project=\"$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props\" Condition=\"Exists('$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props')\" />\n  <PropertyGroup>\n    <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>\n    <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>\n    <ProjectGuid>{203BA48C-4EBB-480B-B01D-E7E7D7E60A96}</ProjectGuid>\n    <OutputType>Library</OutputType>\n    <AppDesignerFolder>Properties</AppDesignerFolder>\n    <RootNamespace>OnlineTakeawayStore.StaticDomainEvents</RootNamespace>\n    <AssemblyName>OnlineTakeawayStore.StaticDomainEvents</AssemblyName>\n    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\n    <FileAlignment>512</FileAlignment>\n    <SolutionDir Condition=\"$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'\">..\\</SolutionDir>\n    <RestorePackages>true</RestorePackages>\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' \">\n    <DebugSymbols>true</DebugSymbols>\n    <DebugType>full</DebugType>\n    <Optimize>false</Optimize>\n    <OutputPath>bin\\Debug\\</OutputPath>\n    <DefineConstants>DEBUG;TRACE</DefineConstants>\n    <ErrorReport>prompt</ErrorReport>\n    <WarningLevel>4</WarningLevel>\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' \">\n    <DebugType>pdbonly</DebugType>\n    <Optimize>true</Optimize>\n    <OutputPath>bin\\Release\\</OutputPath>\n    <DefineConstants>TRACE</DefineConstants>\n    <ErrorReport>prompt</ErrorReport>\n    <WarningLevel>4</WarningLevel>\n  </PropertyGroup>\n  <ItemGroup>\n    <Reference Include=\"NServiceBus\">\n      <HintPath>..\\packages\\NServiceBus.Interfaces.4.3.8\\lib\\net40\\NServiceBus.dll</HintPath>\n    </Reference>\n    <Reference Include=\"NServiceBus.Core\">\n      <HintPath>..\\packages\\NServiceBus.4.3.3\\lib\\net40\\NServiceBus.Core.dll</HintPath>\n    </Reference>\n    <Reference Include=\"System\" />\n    <Reference Include=\"System.Core\" />\n    <Reference Include=\"System.Xml.Linq\" />\n    <Reference Include=\"System.Data.DataSetExtensions\" />\n    <Reference Include=\"Microsoft.CSharp\" />\n    <Reference Include=\"System.Data\" />\n    <Reference Include=\"System.Xml\" />\n  </ItemGroup>\n  <ItemGroup>\n    <Compile Include=\"Application\\ConfirmDeliveryOfOrder.cs\" />\n    <Compile Include=\"Application\\Events\\RefundDueToLateDelivery.cs\" />\n    <Compile Include=\"Infrastructure\\DomainEvents.cs\" />\n    <Compile Include=\"Model\\Events\\DeliveryGuaranteeFailed.cs\" />\n    <Compile Include=\"Model\\FoodDeliveryOrderSteps.cs\" />\n    <Compile Include=\"Model\\IDeliveryGuaranteeOffer.cs\" />\n    <Compile Include=\"Model\\IOrderRepository.cs\" />\n    <Compile Include=\"Model\\OrderForDelivery.cs\" />\n    <Compile Include=\"Properties\\AssemblyInfo.cs\" />\n  </ItemGroup>\n  <ItemGroup />\n  <ItemGroup>\n    <None Include=\"packages.config\" />\n  </ItemGroup>\n  <Import Project=\"$(MSBuildToolsPath)\\Microsoft.CSharp.targets\" />\n  <Import Project=\"$(SolutionDir)\\.nuget\\NuGet.targets\" Condition=\"Exists('$(SolutionDir)\\.nuget\\NuGet.targets')\" />\n  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \n       Other similar extension points exist, see Microsoft.Common.targets.\n  <Target Name=\"BeforeBuild\">\n  </Target>\n  <Target Name=\"AfterBuild\">\n  </Target>\n  -->\n</Project>"
  },
  {
    "path": "18 - Domain Events/OnlineTakeawayStore.StaticDomainEvents/Properties/AssemblyInfo.cs",
    "content": "﻿using System.Reflection;\nusing System.Runtime.CompilerServices;\nusing System.Runtime.InteropServices;\n\n// General Information about an assembly is controlled through the following \n// set of attributes. Change these attribute values to modify the information\n// associated with an assembly.\n[assembly: AssemblyTitle(\"OnlineTakeawayStore.Domain\")]\n[assembly: AssemblyDescription(\"\")]\n[assembly: AssemblyConfiguration(\"\")]\n[assembly: AssemblyCompany(\"\")]\n[assembly: AssemblyProduct(\"OnlineTakeawayStore.Domain\")]\n[assembly: AssemblyCopyright(\"Copyright ©  2014\")]\n[assembly: AssemblyTrademark(\"\")]\n[assembly: AssemblyCulture(\"\")]\n\n// Setting ComVisible to false makes the types in this assembly not visible \n// to COM components.  If you need to access a type in this assembly from \n// COM, set the ComVisible attribute to true on that type.\n[assembly: ComVisible(false)]\n\n// The following GUID is for the ID of the typelib if this project is exposed to COM\n[assembly: Guid(\"867c1ec9-cf71-4f60-b50b-b3d9d4b87e94\")]\n\n// Version information for an assembly consists of the following four values:\n//\n//      Major Version\n//      Minor Version \n//      Build Number\n//      Revision\n//\n// You can specify all the values or you can default the Build and Revision Numbers \n// by using the '*' as shown below:\n// [assembly: AssemblyVersion(\"1.0.*\")]\n[assembly: AssemblyVersion(\"1.0.0.0\")]\n[assembly: AssemblyFileVersion(\"1.0.0.0\")]\n"
  },
  {
    "path": "18 - Domain Events/OnlineTakeawayStore.StaticDomainEvents/packages.config",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<packages>\n  <package id=\"NServiceBus\" version=\"4.3.3\" targetFramework=\"net45\" />\n  <package id=\"NServiceBus.Interfaces\" version=\"4.3.8\" targetFramework=\"net45\" />\n</packages>"
  },
  {
    "path": "18 - Domain Events/OnlineTakeawayStore.Tests/OnlineTakeawayStore.Tests.csproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"12.0\" DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <PropertyGroup>\n    <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>\n    <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>\n    <ProjectGuid>{198900DA-2709-4229-8550-90D75E8A90E0}</ProjectGuid>\n    <OutputType>Library</OutputType>\n    <AppDesignerFolder>Properties</AppDesignerFolder>\n    <RootNamespace>OnlineTakeawayStore.Tests</RootNamespace>\n    <AssemblyName>OnlineTakeawayStore.Tests</AssemblyName>\n    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\n    <FileAlignment>512</FileAlignment>\n    <ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>\n    <VisualStudioVersion Condition=\"'$(VisualStudioVersion)' == ''\">10.0</VisualStudioVersion>\n    <VSToolsPath Condition=\"'$(VSToolsPath)' == ''\">$(MSBuildExtensionsPath32)\\Microsoft\\VisualStudio\\v$(VisualStudioVersion)</VSToolsPath>\n    <ReferencePath>$(ProgramFiles)\\Common Files\\microsoft shared\\VSTT\\$(VisualStudioVersion)\\UITestExtensionPackages</ReferencePath>\n    <IsCodedUITest>False</IsCodedUITest>\n    <TestProjectType>UnitTest</TestProjectType>\n    <SolutionDir Condition=\"$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'\">..\\</SolutionDir>\n    <RestorePackages>true</RestorePackages>\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' \">\n    <DebugSymbols>true</DebugSymbols>\n    <DebugType>full</DebugType>\n    <Optimize>false</Optimize>\n    <OutputPath>bin\\Debug\\</OutputPath>\n    <DefineConstants>DEBUG;TRACE</DefineConstants>\n    <ErrorReport>prompt</ErrorReport>\n    <WarningLevel>4</WarningLevel>\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' \">\n    <DebugType>pdbonly</DebugType>\n    <Optimize>true</Optimize>\n    <OutputPath>bin\\Release\\</OutputPath>\n    <DefineConstants>TRACE</DefineConstants>\n    <ErrorReport>prompt</ErrorReport>\n    <WarningLevel>4</WarningLevel>\n  </PropertyGroup>\n  <ItemGroup>\n    <Reference Include=\"NServiceBus, Version=4.3.0.0, Culture=neutral, PublicKeyToken=9fc386479f8a226c, processorArchitecture=MSIL\">\n      <SpecificVersion>False</SpecificVersion>\n      <HintPath>..\\packages\\NServiceBus.Interfaces.4.3.3\\lib\\net40\\NServiceBus.dll</HintPath>\n    </Reference>\n    <Reference Include=\"Rhino.Mocks\">\n      <HintPath>..\\packages\\RhinoMocks.3.6.1\\lib\\net\\Rhino.Mocks.dll</HintPath>\n    </Reference>\n    <Reference Include=\"System\" />\n  </ItemGroup>\n  <Choose>\n    <When Condition=\"('$(VisualStudioVersion)' == '10.0' or '$(VisualStudioVersion)' == '') and '$(TargetFrameworkVersion)' == 'v3.5'\">\n      <ItemGroup>\n        <Reference Include=\"Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL\" />\n      </ItemGroup>\n    </When>\n    <Otherwise>\n      <ItemGroup>\n        <Reference Include=\"Microsoft.VisualStudio.QualityTools.UnitTestFramework\" />\n      </ItemGroup>\n    </Otherwise>\n  </Choose>\n  <ItemGroup>\n    <Compile Include=\"Properties\\AssemblyInfo.cs\" />\n    <Compile Include=\"ServiceLayerTestExamples\\Delivery_guarantee_failed.cs\" />\n    <Compile Include=\"UnitTestExamples\\ReturnDomainEvents.cs\" />\n    <Compile Include=\"UnitTestExamples\\StaticDomainEvents.cs\" />\n  </ItemGroup>\n  <ItemGroup>\n    <None Include=\"packages.config\" />\n  </ItemGroup>\n  <ItemGroup>\n    <ProjectReference Include=\"..\\OnlineTakeawayStore.ReturnEvents\\OnlineTakeawayStore.ReturnEvents.csproj\">\n      <Project>{13f72f5a-a233-4903-a685-76bc1ce87f49}</Project>\n      <Name>OnlineTakeawayStore.ReturnEvents</Name>\n    </ProjectReference>\n    <ProjectReference Include=\"..\\OnlineTakeawayStore.StaticDomainEvents\\OnlineTakeawayStore.StaticDomainEvents.csproj\">\n      <Project>{203ba48c-4ebb-480b-b01d-e7e7d7e60a96}</Project>\n      <Name>OnlineTakeawayStore.StaticDomainEvents</Name>\n    </ProjectReference>\n  </ItemGroup>\n  <ItemGroup />\n  <Choose>\n    <When Condition=\"'$(VisualStudioVersion)' == '10.0' And '$(IsCodedUITest)' == 'True'\">\n      <ItemGroup>\n        <Reference Include=\"Microsoft.VisualStudio.QualityTools.CodedUITestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL\">\n          <Private>False</Private>\n        </Reference>\n        <Reference Include=\"Microsoft.VisualStudio.TestTools.UITest.Common, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL\">\n          <Private>False</Private>\n        </Reference>\n        <Reference Include=\"Microsoft.VisualStudio.TestTools.UITest.Extension, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL\">\n          <Private>False</Private>\n        </Reference>\n        <Reference Include=\"Microsoft.VisualStudio.TestTools.UITesting, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL\">\n          <Private>False</Private>\n        </Reference>\n      </ItemGroup>\n    </When>\n  </Choose>\n  <Import Project=\"$(VSToolsPath)\\TeamTest\\Microsoft.TestTools.targets\" Condition=\"Exists('$(VSToolsPath)\\TeamTest\\Microsoft.TestTools.targets')\" />\n  <Import Project=\"$(MSBuildToolsPath)\\Microsoft.CSharp.targets\" />\n  <Import Project=\"$(SolutionDir)\\.nuget\\NuGet.targets\" Condition=\"Exists('$(SolutionDir)\\.nuget\\NuGet.targets')\" />\n  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \n       Other similar extension points exist, see Microsoft.Common.targets.\n  <Target Name=\"BeforeBuild\">\n  </Target>\n  <Target Name=\"AfterBuild\">\n  </Target>\n  -->\n</Project>"
  },
  {
    "path": "18 - Domain Events/OnlineTakeawayStore.Tests/Properties/AssemblyInfo.cs",
    "content": "﻿using System.Reflection;\r\nusing System.Runtime.CompilerServices;\r\nusing System.Runtime.InteropServices;\r\n\r\n// General Information about an assembly is controlled through the following \r\n// set of attributes. Change these attribute values to modify the information\r\n// associated with an assembly.\r\n[assembly: AssemblyTitle(\"OnlineTakeawayStore.Tests\")]\r\n[assembly: AssemblyDescription(\"\")]\r\n[assembly: AssemblyConfiguration(\"\")]\r\n[assembly: AssemblyCompany(\"\")]\r\n[assembly: AssemblyProduct(\"OnlineTakeawayStore.Tests\")]\r\n[assembly: AssemblyCopyright(\"Copyright ©  2014\")]\r\n[assembly: AssemblyTrademark(\"\")]\r\n[assembly: AssemblyCulture(\"\")]\r\n\r\n// Setting ComVisible to false makes the types in this assembly not visible \r\n// to COM components.  If you need to access a type in this assembly from \r\n// COM, set the ComVisible attribute to true on that type.\r\n[assembly: ComVisible(false)]\r\n\r\n// The following GUID is for the ID of the typelib if this project is exposed to COM\r\n[assembly: Guid(\"e3bd1f95-c2b6-412d-89fa-72226997ab20\")]\r\n\r\n// Version information for an assembly consists of the following four values:\r\n//\r\n//      Major Version\r\n//      Minor Version \r\n//      Build Number\r\n//      Revision\r\n//\r\n// You can specify all the values or you can default the Build and Revision Numbers \r\n// by using the '*' as shown below:\r\n// [assembly: AssemblyVersion(\"1.0.*\")]\r\n[assembly: AssemblyVersion(\"1.0.0.0\")]\r\n[assembly: AssemblyFileVersion(\"1.0.0.0\")]\r\n"
  },
  {
    "path": "18 - Domain Events/OnlineTakeawayStore.Tests/ServiceLayerTestExamples/Delivery_guarantee_failed.cs",
    "content": "﻿using System;\nusing Microsoft.VisualStudio.TestTools.UnitTesting;\nusing Rhino.Mocks;\nusing OnlineTakeawayStore.StaticDomainEvents.Model;\nusing OnlineTakeawayStore.StaticDomainEvents.Application;\nusing OnlineTakeawayStore.StaticDomainEvents.Application.Events;\nusing NServiceBus;\nusing System.Collections.Generic;\n\nnamespace OnlineTakeawayStore.Tests.ServiceLayerTestExamples\n{\n    [TestClass]\n    public class Delivery_guarantee_failed\n    {\n        IBus bus = MockRepository.GenerateStub<IBus>();\n        // when testing at service layer may want to use concrete repository\n        IOrderRepository repo = MockRepository.GenerateStub<IOrderRepository>();\n        Guid orderId = Guid.NewGuid();\n        Guid customerId = Guid.NewGuid();\n        Guid restaurantId = Guid.NewGuid();\n        List<int> itemIds = new List<int> { 123, 456, 789 };\n        DateTime timeOrderWasPlaced = new DateTime(2015, 03, 01, 20, 15, 0);\n\n\n        [TestInitialize]\n        public void If_an_order_is_not_delivered_within_the_agreed_upon_timeframe()\n        {\n            var offer = new ThirtyMinuteDeliveryGuaranteeOffer();\n            \n            // took longer than 30 minutes - failing the delivery guarantee\n            var timeOrderWasReceived = timeOrderWasPlaced.AddMinutes(31);\n\n            var order = new OrderForDelivery(\n                orderId, customerId, restaurantId, itemIds, timeOrderWasPlaced, offer\n            );\n\n            repo.Stub(r => r.FindBy(orderId)).Return(order);\n            var service = new ConfirmDeliveryOfOrder(repo, bus);\n            service.Confirm(timeOrderWasReceived, orderId);\n        }\n\n        [TestMethod]\n        public void An_external_refund_due_to_late_delivery_instruction_will_be_published()\n        {\n            // get first message published during execution of this use case\n            var message = bus.GetArgumentsForCallsMadeOn(\n                b => b.Send(new RefundDueToLateDelivery()), x => x.IgnoreArguments()\n            )[0][0];\n            var refund = message as RefundDueToLateDelivery;\n            \n            Assert.IsNotNull(refund);\n            Assert.AreEqual(refund.OrderId, orderId);\n        }\n    }\n}\n"
  },
  {
    "path": "18 - Domain Events/OnlineTakeawayStore.Tests/UnitTestExamples/ReturnDomainEvents.cs",
    "content": "﻿using Microsoft.VisualStudio.TestTools.UnitTesting;\nusing OnlineTakeawayStore.ReturnEvents.Model;\nusing OnlineTakeawayStore.ReturnEvents.Model.Events;\nusing Rhino.Mocks;\nusing System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace OnlineTakeawayStore.Tests.UnitTestExamples\n{\n    [TestClass]\n    public class Delivery_guarantee_events_are_recorded_on_guarantee_offer_failure\n    {\n        public bool eventWasRaised = false;\n        public Guid id = Guid.NewGuid();\n        public Guid customerId = Guid.NewGuid();\n        public Guid restaurantId = Guid.NewGuid();\n        public List<int> menuItemIds = new List<int>();\n        public DateTime timeOrderWasPlaced = DateTime.Now.AddMinutes(-30);\n        public DateTime timePizzaDelivered = DateTime.Now;\n        public IDeliveryGuaranteeOffer offer = MockRepository.GenerateStub<IDeliveryGuaranteeOffer>();\n        public OrderForDelivery order = null;\n\n        [TestInitialize]\n        public void When_confirming_an_order_that_is_late()\n        {\n            offer.Stub(x => x.IsNotSatisfiedBy(timeOrderWasPlaced, timePizzaDelivered)).Return(true);\n            order = new OrderForDelivery(id, customerId, restaurantId, menuItemIds, timeOrderWasPlaced, offer);\n            order.ConfirmReceipt(timePizzaDelivered);\n        }\n\n        [TestMethod]\n        public void A_delivery_guarantee_failed_event_will_be_recorded()\n        {\n            var wasRecorded = order.RecordedEvents.OfType<DeliveryGuaranteeFailed>().Count() == 1;\n            Assert.IsTrue(wasRecorded);\n        }\n    }\n}\n"
  },
  {
    "path": "18 - Domain Events/OnlineTakeawayStore.Tests/UnitTestExamples/StaticDomainEvents.cs",
    "content": "﻿using System;\nusing Microsoft.VisualStudio.TestTools.UnitTesting;\nusing OnlineTakeawayStore.StaticDomainEvents.Model;\nusing System.Collections.Generic;\nusing Rhino.Mocks;\nusing OnlineTakeawayStore.StaticDomainEvents.Infrastructure;\nusing OnlineTakeawayStore.StaticDomainEvents.Model.Events;\n\nnamespace OnlineTakeawayStore.Tests.UnitTestExamples\n{\n    [TestClass]\n    public class Delivery_guarantee_events_are_raised_on_guarantee_offer_failure\n    {\n        public bool eventWasRaised = false;\n        public Guid id = Guid.NewGuid();\n        public Guid customerId = Guid.NewGuid();\n        public Guid restaurantId = Guid.NewGuid();\n        public List<int> menuItemIds = new List<int>();\n        public DateTime timeOrderWasPlaced = DateTime.Now.AddMinutes(-30);\n        public DateTime timePizzaDelivered = DateTime.Now;\n        public IDeliveryGuaranteeOffer offer = MockRepository.GenerateStub<IDeliveryGuaranteeOffer>();\n\n        [TestInitialize]\n        public void When_confirming_an_order_that_is_late()\n        {\n            offer.Stub(x => x.IsNotSatisfiedBy(timeOrderWasPlaced, timePizzaDelivered)).Return(true);\n            var order = new OrderForDelivery(id, customerId, restaurantId, menuItemIds, timeOrderWasPlaced, offer);\n            \n            using (DomainEvents.Register<DeliveryGuaranteeFailed>(setTestFlag))\n            {\n                order.ConfirmReceipt(timePizzaDelivered);\n            }\n        }\n\n        private void setTestFlag(DeliveryGuaranteeFailed obj)\n        {\n            eventWasRaised = true;\n        }\n\n        [TestMethod]\n        public void A_delivery_guarantee_failed_event_will_be_raised()\n        {\n            Assert.IsTrue(eventWasRaised);\n        }\n    }\n }\n"
  },
  {
    "path": "18 - Domain Events/OnlineTakeawayStore.Tests/packages.config",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<packages>\n  <package id=\"NServiceBus.Interfaces\" version=\"4.3.3\" targetFramework=\"net45\" />\n  <package id=\"RhinoMocks\" version=\"3.6.1\" targetFramework=\"net45\" />\n</packages>"
  },
  {
    "path": "19 - Aggregates/PPPDDDChap19.eBidder/PPPDDDChap19.eBidder.Common/PPPDDDChap19.eBidder.Common.csproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"4.0\" DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <Import Project=\"$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props\" Condition=\"Exists('$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props')\" />\n  <PropertyGroup>\n    <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>\n    <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>\n    <ProjectGuid>{45804B34-C80F-4096-9919-C22260412E2B}</ProjectGuid>\n    <OutputType>Library</OutputType>\n    <AppDesignerFolder>Properties</AppDesignerFolder>\n    <RootNamespace>PPPDDDChap19.eBidder.Common</RootNamespace>\n    <AssemblyName>PPPDDDChap19.eBidder.Common</AssemblyName>\n    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\n    <FileAlignment>512</FileAlignment>\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' \">\n    <DebugSymbols>true</DebugSymbols>\n    <DebugType>full</DebugType>\n    <Optimize>false</Optimize>\n    <OutputPath>bin\\Debug\\</OutputPath>\n    <DefineConstants>DEBUG;TRACE</DefineConstants>\n    <ErrorReport>prompt</ErrorReport>\n    <WarningLevel>4</WarningLevel>\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' \">\n    <DebugType>pdbonly</DebugType>\n    <Optimize>true</Optimize>\n    <OutputPath>bin\\Release\\</OutputPath>\n    <DefineConstants>TRACE</DefineConstants>\n    <ErrorReport>prompt</ErrorReport>\n    <WarningLevel>4</WarningLevel>\n  </PropertyGroup>\n  <ItemGroup>\n    <Reference Include=\"System\" />\n    <Reference Include=\"System.Core\" />\n    <Reference Include=\"System.Xml.Linq\" />\n    <Reference Include=\"System.Data.DataSetExtensions\" />\n    <Reference Include=\"Microsoft.CSharp\" />\n    <Reference Include=\"System.Data\" />\n    <Reference Include=\"System.Xml\" />\n  </ItemGroup>\n  <ItemGroup>\n    <Compile Include=\"Properties\\AssemblyInfo.cs\" />\n  </ItemGroup>\n  <Import Project=\"$(MSBuildToolsPath)\\Microsoft.CSharp.targets\" />\n  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \n       Other similar extension points exist, see Microsoft.Common.targets.\n  <Target Name=\"BeforeBuild\">\n  </Target>\n  <Target Name=\"AfterBuild\">\n  </Target>\n  -->\n</Project>"
  },
  {
    "path": "19 - Aggregates/PPPDDDChap19.eBidder/PPPDDDChap19.eBidder.Common/Properties/AssemblyInfo.cs",
    "content": "﻿using System.Reflection;\nusing System.Runtime.CompilerServices;\nusing System.Runtime.InteropServices;\n\n// General Information about an assembly is controlled through the following \n// set of attributes. Change these attribute values to modify the information\n// associated with an assembly.\n[assembly: AssemblyTitle(\"PPPDDDChap19.eBidder.Common\")]\n[assembly: AssemblyDescription(\"\")]\n[assembly: AssemblyConfiguration(\"\")]\n[assembly: AssemblyCompany(\"\")]\n[assembly: AssemblyProduct(\"PPPDDDChap19.eBidder.Common\")]\n[assembly: AssemblyCopyright(\"Copyright ©  2014\")]\n[assembly: AssemblyTrademark(\"\")]\n[assembly: AssemblyCulture(\"\")]\n\n// Setting ComVisible to false makes the types in this assembly not visible \n// to COM components.  If you need to access a type in this assembly from \n// COM, set the ComVisible attribute to true on that type.\n[assembly: ComVisible(false)]\n\n// The following GUID is for the ID of the typelib if this project is exposed to COM\n[assembly: Guid(\"35cc822c-0068-4573-90d0-69aca9518a24\")]\n\n// Version information for an assembly consists of the following four values:\n//\n//      Major Version\n//      Minor Version \n//      Build Number\n//      Revision\n//\n// You can specify all the values or you can default the Build and Revision Numbers \n// by using the '*' as shown below:\n// [assembly: AssemblyVersion(\"1.0.*\")]\n[assembly: AssemblyVersion(\"1.0.0.0\")]\n[assembly: AssemblyFileVersion(\"1.0.0.0\")]\n"
  },
  {
    "path": "19 - Aggregates/PPPDDDChap19.eBidder/PPPDDDChap19.eBidder.Disputes/PPPDDDChap19.eBidder.Disputes.csproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"4.0\" DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <Import Project=\"$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props\" Condition=\"Exists('$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props')\" />\n  <PropertyGroup>\n    <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>\n    <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>\n    <ProjectGuid>{6753FC4E-CDEB-4F17-A4C7-9CE18A4C11DB}</ProjectGuid>\n    <OutputType>Library</OutputType>\n    <AppDesignerFolder>Properties</AppDesignerFolder>\n    <RootNamespace>PPPDDDChap19.eBidder.Disputes</RootNamespace>\n    <AssemblyName>PPPDDDChap19.eBidder.Disputes</AssemblyName>\n    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\n    <FileAlignment>512</FileAlignment>\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' \">\n    <DebugSymbols>true</DebugSymbols>\n    <DebugType>full</DebugType>\n    <Optimize>false</Optimize>\n    <OutputPath>bin\\Debug\\</OutputPath>\n    <DefineConstants>DEBUG;TRACE</DefineConstants>\n    <ErrorReport>prompt</ErrorReport>\n    <WarningLevel>4</WarningLevel>\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' \">\n    <DebugType>pdbonly</DebugType>\n    <Optimize>true</Optimize>\n    <OutputPath>bin\\Release\\</OutputPath>\n    <DefineConstants>TRACE</DefineConstants>\n    <ErrorReport>prompt</ErrorReport>\n    <WarningLevel>4</WarningLevel>\n  </PropertyGroup>\n  <ItemGroup>\n    <Reference Include=\"System\" />\n    <Reference Include=\"System.Core\" />\n    <Reference Include=\"System.Xml.Linq\" />\n    <Reference Include=\"System.Data.DataSetExtensions\" />\n    <Reference Include=\"Microsoft.CSharp\" />\n    <Reference Include=\"System.Data\" />\n    <Reference Include=\"System.Xml\" />\n  </ItemGroup>\n  <ItemGroup>\n    <Compile Include=\"Properties\\AssemblyInfo.cs\" />\n  </ItemGroup>\n  <ItemGroup>\n    <Content Include=\"_ReadMe.txt\" />\n  </ItemGroup>\n  <Import Project=\"$(MSBuildToolsPath)\\Microsoft.CSharp.targets\" />\n  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \n       Other similar extension points exist, see Microsoft.Common.targets.\n  <Target Name=\"BeforeBuild\">\n  </Target>\n  <Target Name=\"AfterBuild\">\n  </Target>\n  -->\n</Project>"
  },
  {
    "path": "19 - Aggregates/PPPDDDChap19.eBidder/PPPDDDChap19.eBidder.Disputes/Properties/AssemblyInfo.cs",
    "content": "﻿using System.Reflection;\nusing System.Runtime.CompilerServices;\nusing System.Runtime.InteropServices;\n\n// General Information about an assembly is controlled through the following \n// set of attributes. Change these attribute values to modify the information\n// associated with an assembly.\n[assembly: AssemblyTitle(\"PPPDDDChap19.eBidder.Disputes\")]\n[assembly: AssemblyDescription(\"\")]\n[assembly: AssemblyConfiguration(\"\")]\n[assembly: AssemblyCompany(\"\")]\n[assembly: AssemblyProduct(\"PPPDDDChap19.eBidder.Disputes\")]\n[assembly: AssemblyCopyright(\"Copyright ©  2014\")]\n[assembly: AssemblyTrademark(\"\")]\n[assembly: AssemblyCulture(\"\")]\n\n// Setting ComVisible to false makes the types in this assembly not visible \n// to COM components.  If you need to access a type in this assembly from \n// COM, set the ComVisible attribute to true on that type.\n[assembly: ComVisible(false)]\n\n// The following GUID is for the ID of the typelib if this project is exposed to COM\n[assembly: Guid(\"4098fcb7-6c6d-4da8-9635-366085d7301a\")]\n\n// Version information for an assembly consists of the following four values:\n//\n//      Major Version\n//      Minor Version \n//      Build Number\n//      Revision\n//\n// You can specify all the values or you can default the Build and Revision Numbers \n// by using the '*' as shown below:\n// [assembly: AssemblyVersion(\"1.0.*\")]\n[assembly: AssemblyVersion(\"1.0.0.0\")]\n[assembly: AssemblyFileVersion(\"1.0.0.0\")]\n"
  },
  {
    "path": "19 - Aggregates/PPPDDDChap19.eBidder/PPPDDDChap19.eBidder.Disputes/_ReadMe.txt",
    "content": "﻿This project would hold the code for eBidders dispute system."
  },
  {
    "path": "19 - Aggregates/PPPDDDChap19.eBidder/PPPDDDChap19.eBidder.Listings/Application/Auctions/BusinessUseCases/AuctionCreation.cs",
    "content": "﻿using System;\n\nnamespace PPPDDDChap19.eBidder.Listings.Application.Application.BusinessUseCases\n{\n    public class AuctionCreation\n    {\n        public decimal StartingPrice { get; set; }\n        public Guid SellerId { get; set; }\n        public DateTime EndsAt { get; set; }\n    }\n}\n"
  },
  {
    "path": "19 - Aggregates/PPPDDDChap19.eBidder/PPPDDDChap19.eBidder.Listings/Application/Auctions/BusinessUseCases/BidOnAuctionService.cs",
    "content": "﻿using System;\nusing PPPDDDChap19.eBidder.Listings.Application.Infrastructure;\nusing PPPDDDChap19.eBidder.Listings.Model.Auctions.BidHistory;\nusing PPPDDDChap19.eBidder.Listings.Model.Auctions;\nusing PPPDDDChap19.eBidder.Listings.Model;\nusing PPPDDDChap19.eBidder.Listings.Model.Members;\n\nnamespace PPPDDDChap19.eBidder.Listings.Application.Application.BusinessUseCases\n{\n    public class BidOnAuctionService\n    {\n        private IAuctionRepository _auctions;\n        private IBidHistoryRepository _bidHistory;\n        //private IDocumentSession _unitOfWork;\n        private IClock _clock;\n        private IMemberService _memberService;\n\n        public BidOnAuctionService(IAuctionRepository auctions,\n                                   IBidHistoryRepository bidHistory, \n                                   IMemberService memberService,\n                                   IClock clock)\n        {\n            _auctions = auctions;\n            _bidHistory = bidHistory;\n            _clock = clock;\n            _memberService = memberService;\n        }\n\n        public void Bid(Guid auctionId, Guid memberId, decimal amount)\n        {            \n            using (DomainEvents.Register(OutBid()))\n            using (DomainEvents.Register(BidPlaced()))\n            {                    \n                var member = _memberService.GetMember(memberId);\n\n                if (member.CanBid)\n                { \n                    var auction = _auctions.FindBy(auctionId);\n\n                    var bidAmount = new Money(amount);\n\n                    var offer = new Offer(memberId, bidAmount, _clock.Time());\n\n                    auction.PlaceBidFor(offer, _clock.Time());\n                }                    \n            }                      \n        }\n\n        private Action<BidPlaced> BidPlaced()\n        {\n            return (BidPlaced e) =>\n            {\n                var bidEvent = new Bid(e.AuctionId, e.Bidder, e.AmountBid, e.TimeOfBid);\n\n                _bidHistory.Add(bidEvent);\n            };\n        }\n\n        private Action<OutBid> OutBid()\n        {\n            return (OutBid e) =>\n            {\n                // Add message to Member message board.\n                // \n            };\n        }\n    }\n}\n"
  },
  {
    "path": "19 - Aggregates/PPPDDDChap19.eBidder/PPPDDDChap19.eBidder.Listings/Application/Auctions/BusinessUseCases/CreateAuctionService.cs",
    "content": "﻿using System;\nusing PPPDDDChap19.eBidder.Listings.Model.Auctions;\nusing PPPDDDChap19.eBidder.Listings.Model;\nusing PPPDDDChap19.eBidder.Listings.Model.Sellers;\nusing PPPDDDChap19.eBidder.Listings.Model.Listings;\n\nnamespace PPPDDDChap19.eBidder.Listings.Application.Application.BusinessUseCases\n{\n    public class CreateAuctionService\n    {\n        private IAuctionRepository _auctions;\n        private ISellerService _sellerService;\n        private IListingRepository _listings;\n        // private IDocumentSession _unitOfWork;\n\n        public CreateAuctionService(IAuctionRepository auctions, IListingRepository listing, ISellerService sellerService)\n        {\n            _auctions = auctions;\n            _sellerService = sellerService;\n            _listings = listing;\n            // _unitOfWork = unitOfWork;\n        }\n\n        public Guid Create(AuctionCreation command)\n        {\n            var auctionId = Guid.NewGuid();\n            var listingId = Guid.NewGuid();\n            var startingPrice = new Money(command.StartingPrice);\n\n            var listing = new Listing(listingId, command.SellerId, new ListingFormat(auctionId, FormatType.Auction));\n\n            var auction = new Auction(auctionId, listingId, startingPrice, command.EndsAt); \n\n            // Can seller list\n            var seller = _sellerService.GetSeller(command.SellerId);\n\n            if (seller != null && seller.CanList)\n            {\n                _listings.Add(listing);\n                _auctions.Add(auction);  \n            }\n       \n            // _unitOfWork.SaveChanges();\n\n            return auctionId;\n        }\n    }\n}"
  },
  {
    "path": "19 - Aggregates/PPPDDDChap19.eBidder/PPPDDDChap19.eBidder.Listings/Application/QandA/BusinessUseCases/Answer.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace PPPDDDChap19.eBidder.Listings.Application.QandA.BusinessUseCases\n{\n    public class Answer\n    {\n    }\n}\n"
  },
  {
    "path": "19 - Aggregates/PPPDDDChap19.eBidder/PPPDDDChap19.eBidder.Listings/Application/QandA/BusinessUseCases/AnswerAQuestionService.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\nusing PPPDDDChap19.eBidder.Listings.Application.Infrastructure;\nusing PPPDDDChap19.eBidder.Listings.Model.Auctions.BidHistory;\nusing PPPDDDChap19.eBidder.Listings.Model.Auctions;\nusing PPPDDDChap19.eBidder.Listings.Model;\nusing PPPDDDChap19.eBidder.Listings.Model.QandA;\n\nnamespace PPPDDDChap19.eBidder.Listings.Application.QandA.BusinessUseCases\n{\n    public class AnswerAQuestionService\n    {\n        private IAuctionRepository _auctions;\n        private IQuestionRepository _questions;\n        //private IDocumentSession _unitOfWork;\n        private IClock _clock;\n\n        public AnswerAQuestionService(IQuestionRepository questions, IClock clock)\n        {\n            _questions = questions;\n            _clock = clock;\n        }\n        \n        public void Answer(Guid questionId, Guid sellerId, string answer, bool publishOnListing)\n        {\n            var question = _questions.FindBy(questionId);\n\n            using (DomainEvents.Register(QuestionAnswered()))\n            {\n                question.SubmitAnAnswer(answer, sellerId, publishOnListing, _clock.Time());\n            }\n        }\n\n        private Action<QuestionAnswered> QuestionAnswered()\n        {\n            return (QuestionAnswered e) =>\n            {\n                // Email member about the question being answered\n            };\n        }\n\n    }\n}\n"
  },
  {
    "path": "19 - Aggregates/PPPDDDChap19.eBidder/PPPDDDChap19.eBidder.Listings/Application/QandA/BusinessUseCases/AskAQuestionService.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\nusing PPPDDDChap19.eBidder.Listings.Application.Infrastructure;\nusing PPPDDDChap19.eBidder.Listings.Model.Auctions.BidHistory;\nusing PPPDDDChap19.eBidder.Listings.Model.Auctions;\nusing PPPDDDChap19.eBidder.Listings.Model;\nusing PPPDDDChap19.eBidder.Listings.Model.QandA;\nusing PPPDDDChap19.eBidder.Listings.Model.Listings;\n\nnamespace PPPDDDChap19.eBidder.Listings.Application.QandA.BusinessUseCases\n{\n    public class AskAQuestionService\n    {\n        private IListingRepository _listings;              \n        private IQuestionRepository _questions;\n        //private IDocumentSession _unitOfWork;\n        private IClock _clock;\n\n        public AskAQuestionService(IListingRepository listings,                                   \n                                   IQuestionRepository questions,              \n                                   IClock clock)\n        {\n            _listings = listings;\n            _questions = questions;\n            //_unitOfWork = unitOfWork;\n            _clock = clock;\n        }\n\n        public void Ask(Guid listingId, Guid memberId, string question)\n        {\n            var listing = _listings.FindBy(listingId);\n          \n            using (DomainEvents.Register(QuestionSubmitted()))\n            {\n                var aQuestion = listing.AskQuestion(memberId, question,  _clock.Time());\n\n                _questions.Add(aQuestion);\n            }\n        }\n\n        private Action<QuestionSubmitted> QuestionSubmitted()\n        {\n            return (QuestionSubmitted e) =>\n            {\n                // Email seller about the question being asked\n            };\n        }\n    }\n}\n"
  },
  {
    "path": "19 - Aggregates/PPPDDDChap19.eBidder/PPPDDDChap19.eBidder.Listings/Application/Watching/BusinessUseCases/UnWatchItem.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace PPPDDDChap19.eBidder.Listings.Application.Watching.BusinessUseCases\n{\n    public class UnWatchItem\n    {\n        public Guid MemberId { get; set; }\n        public Guid WatchedItemId { get; set; }\n    }\n}\n"
  },
  {
    "path": "19 - Aggregates/PPPDDDChap19.eBidder/PPPDDDChap19.eBidder.Listings/Application/Watching/BusinessUseCases/WatchItem.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace PPPDDDChap19.eBidder.Listings.Application.Watching.BusinessUseCases\n{\n    public class WatchItem\n    {\n        public Guid MemberId { get; set; }\n        public Guid AuctionId { get; set; }\n    }\n}\n"
  },
  {
    "path": "19 - Aggregates/PPPDDDChap19.eBidder/PPPDDDChap19.eBidder.Listings/Application/Watching/BusinessUseCases/WatchItemService.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\nusing PPPDDDChap19.eBidder.Listings.Model.Auctions;\nusing PPPDDDChap19.eBidder.Listings.Model.WatchLists;\nusing PPPDDDChap19.eBidder.Listings.Model.Listings;\n\nnamespace PPPDDDChap19.eBidder.Listings.Application.Watching.BusinessUseCases\n{\n    public class WatchItemService\n    {\n        private IListingRepository _listings;       \n        private IWatchedItemRepository _watchedItems;\n        // private IDocumentSession _unitOfWork;\n\n        public WatchItemService(IListingRepository listings, IWatchedItemRepository watchedItems)\n        {            \n            _watchedItems = watchedItems;\n            _listings = listings;\n            // _unitOfWork = unitOfWork;\n        }\n\n        public void Watch(WatchItem command)\n        {\n            // Ensure Auction exisits\n            var item = _listings.FindBy(command.AuctionId);\n            \n            var watch = item.Watch(Guid.NewGuid(), command.MemberId);\n\n            _watchedItems.Add(watch); // DB will enforce unique contraint on no member watching more than a single item\n                     \n            // _unitOfWork.SaveChanges();\n        }\n\n        public void UnWatch(UnWatchItem command)\n        {\n            var watchedItem = _watchedItems.FindBy(command.WatchedItemId);\n\n            _watchedItems.Remove(watchedItem);\n        }\n    }\n}\n"
  },
  {
    "path": "19 - Aggregates/PPPDDDChap19.eBidder/PPPDDDChap19.eBidder.Listings/Infrastructure/DomainEvents.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\n\nnamespace PPPDDDChap19.eBidder.Listings.Application.Infrastructure\n{\n    /// <summary>\n    /// Domain Events class from http://www.udidahan.com/2008/08/25/domain-events-take-2/\n    /// </summary>\n    public static class DomainEvents\n    {\n        [ThreadStatic]\n        private static List<Delegate> _actions;\n        private static List<Delegate> Actions\n        {\n            get\n            {\n                if (_actions == null)\n                {\n                    _actions = new List<Delegate>();\n                }\n                return _actions;\n            }\n        }\n       \n        public static IDisposable Register<T>(Action<T> callback)\n        {           \n            Actions.Add(callback);\n\n            return new DomainEventRegistrationRemover(() => Actions.Remove(callback));\n        }\n\n        public static void Raise<T>(T eventArgs)\n        {\n            foreach (Delegate action in Actions)\n            {\n                Action<T> typedAction = action as Action<T>;\n                if (typedAction != null)\n                {\n                    typedAction(eventArgs);\n                }\n            }\n        }\n     \n        private sealed class DomainEventRegistrationRemover : IDisposable\n        {\n            private readonly Action _callOnDispose;\n\n            public DomainEventRegistrationRemover(Action toCall)\n            {\n                _callOnDispose = toCall;\n            }\n\n            public void Dispose()\n            {\n                _callOnDispose();\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "19 - Aggregates/PPPDDDChap19.eBidder/PPPDDDChap19.eBidder.Listings/Infrastructure/Entity.cs",
    "content": "﻿namespace PPPDDDChap19.eBidder.Listings.Application.Infrastructure\n{\n    public abstract class Entity<TId>\n    {\n        public TId Id { get; protected set; }\n        public int Version { get; private set; }\n    }\n}\n"
  },
  {
    "path": "19 - Aggregates/PPPDDDChap19.eBidder/PPPDDDChap19.eBidder.Listings/Infrastructure/IClock.cs",
    "content": "﻿using System;\n\nnamespace PPPDDDChap19.eBidder.Listings.Application.Infrastructure\n{\n    public interface IClock\n    {\n        DateTime Time();\n    }\n}\n"
  },
  {
    "path": "19 - Aggregates/PPPDDDChap19.eBidder/PPPDDDChap19.eBidder.Listings/Infrastructure/SystemClock.cs",
    "content": "﻿using System;\n\nnamespace PPPDDDChap19.eBidder.Listings.Application.Infrastructure\n{\n   public class SystemClock : IClock\n    {\n        public DateTime Time()\n        {\n            return DateTime.Now;\n        }\n    }\n}\n"
  },
  {
    "path": "19 - Aggregates/PPPDDDChap19.eBidder/PPPDDDChap19.eBidder.Listings/Infrastructure/ValueObject.cs",
    "content": "﻿using System.Collections.Generic;\nusing System.Linq;\n\nnamespace PPPDDDChap19.eBidder.Listings.Application.Infrastructure\n{\n    public abstract class ValueObject<T> where T : ValueObject<T>  \n    {\n        protected abstract IEnumerable<object> GetAttributesToIncludeInEqualityCheck();\n\n        public override bool Equals(object other)\n        {\n            return Equals(other as T);\n        }\n\n        public bool Equals(T other)\n        {\n            if (other == null)\n            {\n                return false;\n            }\n            return GetAttributesToIncludeInEqualityCheck().SequenceEqual(other.GetAttributesToIncludeInEqualityCheck());\n        }\n\n        public static bool operator ==(ValueObject<T> left, ValueObject<T> right)\n        {\n            return Equals(left, right);\n        }\n\n        public static bool operator !=(ValueObject<T> left, ValueObject<T> right)\n        {\n            return !(left == right);\n        }\n\n        public override int GetHashCode()\n        {\n            int hash = 17;\n            foreach (var obj in this.GetAttributesToIncludeInEqualityCheck())\n                hash = hash * 31 + (obj == null ? 0 : obj.GetHashCode());\n\n            return hash;\n        }\n    }\n}\n"
  },
  {
    "path": "19 - Aggregates/PPPDDDChap19.eBidder/PPPDDDChap19.eBidder.Listings/Model/ListingFormat/Auctions/Auction.cs",
    "content": "﻿using System;\nusing PPPDDDChap19.eBidder.Listings.Application.Infrastructure;\n\nnamespace PPPDDDChap19.eBidder.Listings.Model.Auctions\n{\n    public class Auction : Entity<Guid>\n    {\n        private Auction() { }\n\n        public Auction(Guid id, Guid listingId, Money startingPrice, DateTime endsAt)\n        {\n            if (id == Guid.Empty)\n                throw new ArgumentNullException(\"Auction Id cannot be null\");\n\n            if (startingPrice == null)\n                throw new ArgumentNullException(\"Starting Price cannot be null\");\n\n            if (endsAt == DateTime.MinValue)\n                throw new ArgumentNullException(\"EndsAt must have a value\");\n            \n            Id = id;\n            ListingId = listingId;\n            StartingPrice = startingPrice;\n            EndsAt = endsAt;            \n        }\n\n        public void ReduceTheStartingPrice()\n        { \n            // Only if no bids and more than 12 hours left\n        }\n\n        private Guid ListingId { get; set; }\n        private DateTime EndsAt { get; set; }       \n        private Money StartingPrice { get; set; }\n        private WinningBid WinningBid { get; set; }\n        private bool HasEnded { get; set; }\n        \n        // Fixed Price or \n        // Auction\n        // Once someone bids, the Buy it now option disappears. \n        // The listing then proceeds as a regular auction-style listing, with the item going to the highest bidder. \n        // (If the auction has a reserve price, the Buy it now option will be available until the reserve price is met.)\n        // http://sellercentre.ebay.co.uk/add-buy-it-now-price-auction\n       \n        private bool StillInProgress(DateTime currentTime)\n        {\n            return (EndsAt > currentTime);             \n        }\n\n        public bool CanPlaceBid()\n        { \n            return HasEnded == false;        \n        }\n\n        public void PlaceBidFor(Offer offer, DateTime currentTime)\n        {\n            if (StillInProgress(currentTime))\n            {\n                if (FirstOffer())\n                    PlaceABidForTheFirst(offer);\n                else if (BidderIsIncreasingMaximumBidToNew(offer))\n                    WinningBid = WinningBid.RaiseMaximumBidTo(offer.MaximumBid);\n                else if (WinningBid.CanBeExceededBy(offer.MaximumBid))\n                {\n                    var newBids = new AutomaticBidder().GenerateNextSequenceOfBidsAfter(offer, WinningBid);\n\n                    foreach (var bid in newBids)\n                        Place(bid);                    \n                }                                                   \n            }     \n        }\n\n        private bool BidderIsIncreasingMaximumBidToNew(Offer offer)\n        {\n            return WinningBid.WasMadeBy(offer.Bidder) && offer.MaximumBid.IsGreaterThan(WinningBid.MaximumBid);\n        }\n\n        private bool FirstOffer()\n        {\n            return WinningBid == null;\n        }\n\n        private void PlaceABidForTheFirst(Offer offer)\n        {\n            if (offer.MaximumBid.IsGreaterThanOrEqualTo(StartingPrice))\n                Place(new WinningBid(offer.Bidder, offer.MaximumBid, StartingPrice, offer.TimeOfOffer));            \n        }\n\n        private void Place(WinningBid newBid)\n        {\n            if (!FirstOffer() && WinningBid.WasMadeBy(newBid.Bidder))\n                DomainEvents.Raise(new OutBid(Id, WinningBid.Bidder));\n\n            WinningBid = newBid;\n            DomainEvents.Raise(new BidPlaced(Id, newBid.Bidder, newBid.CurrentAuctionPrice.Amount, newBid.TimeOfBid));             \n        }\n    }\n}\n"
  },
  {
    "path": "19 - Aggregates/PPPDDDChap19.eBidder/PPPDDDChap19.eBidder.Listings/Model/ListingFormat/Auctions/AuctionId.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace PPPDDDChap19.eBidder.Listings.Model.ListingFormat.Auctions\n{\n    public class AuctionId\n    {\n        public AuctionId(Guid id)\n        {\n            Id = id;\n        }\n\n        public Guid Id { get; private set; }\n    }\n}\n"
  },
  {
    "path": "19 - Aggregates/PPPDDDChap19.eBidder/PPPDDDChap19.eBidder.Listings/Model/ListingFormat/Auctions/AutomaticBidder.cs",
    "content": "﻿using System.Collections.Generic;\n\nnamespace PPPDDDChap19.eBidder.Listings.Model.Auctions\n{\n    public class AutomaticBidder \n    {\n        public IEnumerable<WinningBid> GenerateNextSequenceOfBidsAfter(Offer offer, WinningBid currentWinningBid)\n        {\n            var bids = new List<WinningBid>();\n\n            if (currentWinningBid.MaximumBid.IsGreaterThanOrEqualTo(offer.MaximumBid))\n            {\n                var bidFromOffer = new WinningBid(offer.Bidder, offer.MaximumBid, offer.MaximumBid, offer.TimeOfOffer);\n                bids.Add(bidFromOffer);\n\n                bids.Add(CalculateNextBid(bidFromOffer, new Offer(currentWinningBid.Bidder, currentWinningBid.MaximumBid, currentWinningBid.TimeOfBid)));               \n            }\n            else\n            {\n                if (currentWinningBid.HasNotReachedMaximumBid())\n                {\n                    var currentBiddersLastBid = new WinningBid(currentWinningBid.Bidder, currentWinningBid.MaximumBid, currentWinningBid.MaximumBid, currentWinningBid.TimeOfBid);\n                    bids.Add(currentBiddersLastBid);\n\n                    bids.Add(CalculateNextBid(currentBiddersLastBid, offer));                   \n                }\n                else\n                    bids.Add(new WinningBid(offer.Bidder, currentWinningBid.CurrentAuctionPrice.BidIncrement(), offer.MaximumBid, offer.TimeOfOffer));\n            }\n\n            return bids;\n        }\n\n        private WinningBid CalculateNextBid(WinningBid winningbid, Offer offer)\n        {\n            WinningBid bid;\n\n            if (winningbid.CanBeExceededBy(offer.MaximumBid))\n                bid = new WinningBid(offer.Bidder, offer.MaximumBid, winningbid.CurrentAuctionPrice.BidIncrement(), offer.TimeOfOffer);\n            else\n                bid = new WinningBid(offer.Bidder, offer.MaximumBid, offer.MaximumBid, offer.TimeOfOffer);\n\n            return bid;\n        }\n    }\n}\n"
  },
  {
    "path": "19 - Aggregates/PPPDDDChap19.eBidder/PPPDDDChap19.eBidder.Listings/Model/ListingFormat/Auctions/BidHistory/Bid.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing PPPDDDChap19.eBidder.Listings.Model.Auctions;\nusing PPPDDDChap19.eBidder.Listings.Application.Infrastructure;\n\nnamespace PPPDDDChap19.eBidder.Listings.Model.Auctions.BidHistory\n{\n    public class Bid : ValueObject<Bid>\n    {\n        private Bid()\n        { }\n\n        public Bid(Guid auctionId, Guid bidderId, Money amountBid, DateTime timeOfBid)\n        {\n            if (auctionId == Guid.Empty)\n                throw new ArgumentNullException(\"Auction Id cannot be null\");\n\n            if (bidderId == Guid.Empty)\n                throw new ArgumentNullException(\"Bidder Id cannot be null\");\n\n            if (amountBid == null)\n                throw new ArgumentNullException(\"AmountBid cannot be null\");\n\n            if (timeOfBid == DateTime.MinValue)\n                throw new ArgumentNullException(\"TimeOfBid must have a value\");\n\n            AuctionId = auctionId;\n            Bidder = bidderId;\n            AmountBid = amountBid;\n            TimeOfBid = timeOfBid;\n        }\n\n        public Guid AuctionId { get; private set; }\n        public Guid Bidder { get; private set; }\n        public Money AmountBid {get; private set;}\n        public DateTime TimeOfBid { get; private set; }\n        private Guid Id { get; set; }\n\n        protected override IEnumerable<object> GetAttributesToIncludeInEqualityCheck()\n        {\n            return new List<Object>() { Bidder, AuctionId, TimeOfBid, AmountBid };\n        }\n    }\n}\n"
  },
  {
    "path": "19 - Aggregates/PPPDDDChap19.eBidder/PPPDDDChap19.eBidder.Listings/Model/ListingFormat/Auctions/BidHistory/IBidHistoryRepository.cs",
    "content": "﻿using System;\n\nnamespace PPPDDDChap19.eBidder.Listings.Model.Auctions.BidHistory\n{\n    public interface IBidHistoryRepository\n    {\n        int NoOfBidsFor(Guid autionId);\n        void Add(Bid bid);\n    }\n}\n"
  },
  {
    "path": "19 - Aggregates/PPPDDDChap19.eBidder/PPPDDDChap19.eBidder.Listings/Model/ListingFormat/Auctions/BidPlaced.cs",
    "content": "﻿using System;\n\nnamespace PPPDDDChap19.eBidder.Listings.Model.Auctions\n{\n    public class BidPlaced\n    {\n        public BidPlaced(Guid auctionId, Guid bidderId, Money amountBid, DateTime timeOfBid)\n        {\n            if (auctionId == Guid.Empty)\n                throw new ArgumentNullException(\"Auction Id cannot be null\");\n\n            if (bidderId == Guid.Empty)\n                throw new ArgumentNullException(\"Bidder Id cannot be null\");\n\n            if (amountBid == null)\n                throw new ArgumentNullException(\"AmountBid cannot be null\");\n\n            if (timeOfBid == DateTime.MinValue)\n                throw new ArgumentNullException(\"TimeOfBid must have a value\");\n\n            AuctionId = auctionId;\n            Bidder = bidderId;\n            AmountBid = amountBid;\n            TimeOfBid = timeOfBid;\n        }\n\n        public Guid AuctionId { get; private set; }\n        public Guid Bidder { get; private set; }\n        public Money AmountBid { get; private set; }\n        public DateTime TimeOfBid { get; private set; }        \n    }\n}\n"
  },
  {
    "path": "19 - Aggregates/PPPDDDChap19.eBidder/PPPDDDChap19.eBidder.Listings/Model/ListingFormat/Auctions/IAuctionRepository.cs",
    "content": "﻿using System;\n\nnamespace PPPDDDChap19.eBidder.Listings.Model.Auctions\n{\n    public interface IAuctionRepository\n    {\n        void Add(Auction item);\n        Auction FindBy(Guid Id);\n    }\n}\n"
  },
  {
    "path": "19 - Aggregates/PPPDDDChap19.eBidder/PPPDDDChap19.eBidder.Listings/Model/ListingFormat/Auctions/Offer.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing PPPDDDChap19.eBidder.Listings.Application.Infrastructure;\n\nnamespace PPPDDDChap19.eBidder.Listings.Model.Auctions\n{\n    public class Offer : ValueObject<Offer>\n    {\n        public Offer(Guid bidderId, Money maximumBid, DateTime timeOfOffer)\n        {\n            if (bidderId == Guid.Empty)\n                throw new ArgumentNullException(\"BidderId cannot be null\");\n\n            if (maximumBid == null)\n                throw new ArgumentNullException(\"MaximumBid cannot be null\");\n\n            if (timeOfOffer == DateTime.MinValue)\n                throw new ArgumentNullException(\"Time of Offer must have a value\");\n\n            Bidder = bidderId;\n            MaximumBid = maximumBid;\n            TimeOfOffer = timeOfOffer;\n        }\n\n        public Guid Bidder { get; private set; }\n        public Money MaximumBid { get; private set; }\n        public DateTime TimeOfOffer { get; private set; }\n       \n        protected override IEnumerable<object> GetAttributesToIncludeInEqualityCheck()\n        {\n            return new List<Object>()\n            {\n                Bidder, MaximumBid, TimeOfOffer\n            };\n        }\n    }   \n}\n"
  },
  {
    "path": "19 - Aggregates/PPPDDDChap19.eBidder/PPPDDDChap19.eBidder.Listings/Model/ListingFormat/Auctions/OutBid.cs",
    "content": "﻿using System;\n\nnamespace PPPDDDChap19.eBidder.Listings.Model.Auctions\n{\n    public class OutBid\n    {\n        public OutBid(Guid auctionId, Guid bidderId)\n        {\n            if (auctionId == Guid.Empty)\n                throw new ArgumentNullException(\"Auction Id cannot be null\");\n\n            if (bidderId == Guid.Empty)\n                throw new ArgumentNullException(\"Bidder Id cannot be null\");\n\n            AuctionId = auctionId;\n            Bidder = bidderId;\n        }\n\n        public Guid AuctionId { get; private set; }\n        public Guid Bidder { get; private set; }\n    }\n}\n"
  },
  {
    "path": "19 - Aggregates/PPPDDDChap19.eBidder/PPPDDDChap19.eBidder.Listings/Model/ListingFormat/Auctions/Price.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing PPPDDDChap19.eBidder.Listings.Application.Infrastructure;\n\nnamespace PPPDDDChap19.eBidder.Listings.Model.Auctions\n{\n    public class Price : ValueObject<Price>\n    {\n        private Price()\n        { }\n\n        public Price(Money amount)\n        {\n            if (amount == null)\n                throw new ArgumentNullException(\"Amount cannot be null\");\n\n            Amount = amount;\n        }\n\n        public Money Amount { get; private set; }\n\n        public Money BidIncrement()\n        {\n            if (Amount.IsGreaterThanOrEqualTo(new Money(0.01m)) && Amount.IsLessThanOrEqualTo(new Money(0.99m)))\n                    return Amount.add(new Money(0.05m));\n\n            if (Amount.IsGreaterThanOrEqualTo(new Money(1.00m)) && Amount.IsLessThanOrEqualTo(new Money(4.99m)))\n                    return Amount.add(new Money(0.20m));\n                \n            if (Amount.IsGreaterThanOrEqualTo(new Money(5.00m)) && Amount.IsLessThanOrEqualTo(new Money(14.99m)))\n                    return Amount.add(new Money(0.50m));\n\n            return Amount.add(new Money(1.00m));\n            \n        }\n\n        public bool CanBeExceededBy(Money offer)\n        {\n            return offer.IsGreaterThanOrEqualTo(BidIncrement());\n        }\n\n        protected override IEnumerable<object> GetAttributesToIncludeInEqualityCheck()\n        {\n            return new List<Object>() {Amount};\n        }\n    }\n}\n"
  },
  {
    "path": "19 - Aggregates/PPPDDDChap19.eBidder/PPPDDDChap19.eBidder.Listings/Model/ListingFormat/Auctions/WinningBid.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing PPPDDDChap19.eBidder.Listings.Application.Infrastructure;\n\nnamespace PPPDDDChap19.eBidder.Listings.Model.Auctions\n{\n    public class WinningBid : ValueObject<WinningBid>\n    {\n        private WinningBid() { }\n\n        public WinningBid(Guid bidder, Money maximumBid, Money bid, DateTime timeOfBid)\n        {\n            if (bidder == Guid.Empty)\n                throw new ArgumentNullException(\"Bidder cannot be null\");\n\n            if (maximumBid == null)\n                throw new ArgumentNullException(\"MaximumBid cannot be null\");\n\n            if (timeOfBid == DateTime.MinValue)\n                throw new ArgumentNullException(\"TimeOfBid must have a value\");\n\n            Bidder = bidder;\n            MaximumBid = maximumBid;\n            TimeOfBid = timeOfBid;\n            CurrentAuctionPrice = new Price(bid);\n        }\n        \n        public Guid Bidder { get; private set; }\n        public Money MaximumBid { get; private set; }\n        public DateTime TimeOfBid { get; private set; }\n        public Price CurrentAuctionPrice { get; private set; }\n\n        public WinningBid RaiseMaximumBidTo(Money newAmount)\n        {\n            if (newAmount.IsGreaterThan(MaximumBid))\n                return new WinningBid(Bidder, newAmount, CurrentAuctionPrice.Amount, DateTime.Now);\n            else\n                throw new ApplicationException(\"Maximum bid increase must be larger than current maximum bid.\");\n        }\n\n        public bool WasMadeBy(Guid bidder)\n        {\n            return Bidder.Equals(bidder);\n        }\n\n        public bool CanBeExceededBy(Money offer)\n        {\n            return CurrentAuctionPrice.CanBeExceededBy(offer);\n        }\n\n        public bool HasNotReachedMaximumBid()\n        {\n            return MaximumBid.IsGreaterThan(CurrentAuctionPrice.Amount);\n        }\n\n        protected override IEnumerable<object> GetAttributesToIncludeInEqualityCheck()\n        {\n            return new List<Object>() { Bidder, MaximumBid, TimeOfBid, CurrentAuctionPrice };\n        }\n    }\n}\n"
  },
  {
    "path": "19 - Aggregates/PPPDDDChap19.eBidder/PPPDDDChap19.eBidder.Listings/Model/ListingFormat/FixedPriceListings/FixedPriceListing.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\nusing PPPDDDChap19.eBidder.Listings.Application.Infrastructure;\nusing PPPDDDChap19.eBidder.Listings.Model.QandA;\nusing PPPDDDChap19.eBidder.Listings.Model.Listings;\n\nnamespace PPPDDDChap19.eBidder.Listings.Model.FixedPrice\n{\n    public class FixedPriceListing\n    {\n        private FixedPriceListing() { }\n\n        public FixedPriceListing(Guid id, Guid sellerId, Money buyNowPrice, DateTime endsAt, Listing listing)\n        {\n            if (id == Guid.Empty)\n                throw new ArgumentNullException(\"Auction Id cannot be null\");\n\n            if (sellerId == Guid.Empty)\n                throw new ArgumentNullException(\"Seller Id cannot be null\");\n\n            if (buyNowPrice == null)\n                throw new ArgumentNullException(\"The buy it now price cannot be null\");\n\n            if (endsAt == DateTime.MinValue)\n                throw new ArgumentNullException(\"EndsAt must have a value\");\n\n            if (listing == null)\n                throw new ArgumentNullException(\"The Item cannot be null\");\n\n            Id = id;\n            BuyNowPrice = buyNowPrice;\n            EndsAt = endsAt;\n            Listing = listing;\n        }\n\n        private Guid Id { get; set; }\n        private Guid sellerId { get; set; }\n        private Listing Listing { get; set; }\n        private DateTime EndsAt { get; set; }\n        private Money BuyNowPrice { get; set; }\n\n        public void BestOffer()\n        {\n            // http://ocsnext.ebay.co.uk/ocs/sc\n            // for Buy It Now listing only\n        }\n    }\n}\n"
  },
  {
    "path": "19 - Aggregates/PPPDDDChap19.eBidder/PPPDDDChap19.eBidder.Listings/Model/ListingFormat/FixedPriceListings/IFixedPriceListingRepository.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace PPPDDDChap19.eBidder.Listings.Model.FixedPrice\n{\n    public interface IFixedPriceListingRepository\n    {\n    }\n}\n"
  },
  {
    "path": "19 - Aggregates/PPPDDDChap19.eBidder/PPPDDDChap19.eBidder.Listings/Model/ListingFormat/FixedPriceListings/Offers/BestOffer.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace PPPDDDChap19.eBidder.Listings.Model.Auctions.Offers\n{\n    public class BestOffer\n    {\n        public void CounterOffer()\n        {\n            //price and terms, and click 'Send'.\n        }\n    }\n}\n"
  },
  {
    "path": "19 - Aggregates/PPPDDDChap19.eBidder/PPPDDDChap19.eBidder.Listings/Model/Listings/FormatType.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace PPPDDDChap19.eBidder.Listings.Model.Listings\n{\n    public enum FormatType\n    {\n        Auction,\n        FixedPrice\n    }\n}\n"
  },
  {
    "path": "19 - Aggregates/PPPDDDChap19.eBidder/PPPDDDChap19.eBidder.Listings/Model/Listings/IListingRepository.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace PPPDDDChap19.eBidder.Listings.Model.Listings\n{\n    public interface IListingRepository\n    {\n        void Add(Listing listing);\n        Listing FindBy(Guid id);\n    }\n}\n"
  },
  {
    "path": "19 - Aggregates/PPPDDDChap19.eBidder/PPPDDDChap19.eBidder.Listings/Model/Listings/Listing.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\nusing PPPDDDChap19.eBidder.Listings.Model.WatchLists;\nusing PPPDDDChap19.eBidder.Listings.Model.QandA;\n\nnamespace PPPDDDChap19.eBidder.Listings.Model.Listings\n{\n    public class Listing\n    {\n        public Listing(Guid id, Guid sellerId, ListingFormat format)\n        {\n            if (sellerId == Guid.Empty)\n                throw new ArgumentNullException(\"Seller Id cannot be null\");\n\n            Id = id;\n            Format = format;\n            SellerId = sellerId;\n        }\n\n        private Guid Id { get; set; }\n        private ListingFormat Format { get; set; }\n        private string Title { get; set; }\n        private string Description { get; set; }\n        private string Condition { get; set; }\n        private Guid SellerId { get; set; }\n\n        private decimal PostageCosts { get; set; }\n\n        private string PaymentMethodsAccepted { get; set; }\n        private string DispatchTime { get; set; }\n\n        //public Email ContactSeller(string question)\n        //{ \n        // You'll receive the message in your Messages inbox and your personal email account. \n        // When you respond, you can choose to post the question and answer to your listing \n        // so all buyers can see it. Once you post the answer, you can't change or remove it.\n        //}\n\n        public WatchedItem Watch(Guid watchedItemId, Guid memberId)\n        {\n            return new WatchedItem(watchedItemId, this.Id, memberId);\n        }\n\n        //public void Add(PaymentMethod paymentMethod)\n        //{\n        // replace Item and add PaymentMethod       \n        //}\n\n        //public void Add(PostLocation()\n        //{ \n\n        //}\n\n        public Question AskQuestion(Guid MemberId, string quesiton, DateTime timeOfQuestion)\n        {\n            return new Question(Guid.NewGuid(), this.Id, MemberId, quesiton, timeOfQuestion);\n        }\n       \n       // public void Amend(Item item)\n       // {\n            // http://pages.ebay.co.uk/help/sell/revising_restrictions.html\n            // if (currentTime.\n            // Throw New ItemRevisionEvent(Description), DateTime currentTime          \n      //  }\n    }\n\n\n}\n"
  },
  {
    "path": "19 - Aggregates/PPPDDDChap19.eBidder/PPPDDDChap19.eBidder.Listings/Model/Listings/ListingFormat.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace PPPDDDChap19.eBidder.Listings.Model.Listings\n{\n    public class ListingFormat\n    {\n        public ListingFormat(Guid formatId, FormatType format)\n        {\n            FormatId = formatId;\n            Format = format;\n        }\n\n        public Guid FormatId { get; private set; }\n        public FormatType Format { get; private set; }\n    }\n}\n"
  },
  {
    "path": "19 - Aggregates/PPPDDDChap19.eBidder/PPPDDDChap19.eBidder.Listings/Model/Listings/ListingRevision.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace PPPDDDChap19.eBidder.Listings.Model.Listings\n{\n    public class ListingRevision\n    {\n        private Guid Item { get; set; }\n        private DateTime Date { get; set; }\n        private String RevisedInformation { get; set; }\n    }\n}\n"
  },
  {
    "path": "19 - Aggregates/PPPDDDChap19.eBidder/PPPDDDChap19.eBidder.Listings/Model/Listings/ListingRevisionEvent.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace PPPDDDChap19.eBidder.Listings.Model.Listings\n{\n    public class ListingRevisionEvent\n    {\n        private Guid Item { get; set; }\n        private DateTime Date {get; set;}\n\n        private String RevisedInformation { get; set; }\n    }\n}\n"
  },
  {
    "path": "19 - Aggregates/PPPDDDChap19.eBidder/PPPDDDChap19.eBidder.Listings/Model/Members/IMemberService.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace PPPDDDChap19.eBidder.Listings.Model.Members\n{\n    public interface IMemberService\n    {\n        Member GetMember(Guid memberId);\n    }\n}\n"
  },
  {
    "path": "19 - Aggregates/PPPDDDChap19.eBidder/PPPDDDChap19.eBidder.Listings/Model/Members/Member.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace PPPDDDChap19.eBidder.Listings.Model.Members\n{\n    public class Member\n    {\n        public bool CanBid { get; private set; }\n    }\n}\n"
  },
  {
    "path": "19 - Aggregates/PPPDDDChap19.eBidder/PPPDDDChap19.eBidder.Listings/Model/Money.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing PPPDDDChap19.eBidder.Listings.Application.Infrastructure;\n\nnamespace PPPDDDChap19.eBidder.Listings.Model\n{\n    public class Money : ValueObject<Money>\n    {\n        protected decimal Value { get; set; }\n\n        public Money()\n            : this(0m)\n        {\n        }\n\n        public Money(decimal value)\n        {\n            ThrowExceptionIfNotValid(value);\n\n            Value = value;\n        }\n\n        private void ThrowExceptionIfNotValid(decimal value)\n        {\n            if (value % 0.01m != 0)\n                throw new MoreThanTwoDecimalPlacesInMoneyValueException();\n\n            if(value < 0)\n                throw new MoneyCannotBeANegativeValueException();\n        }\n\n        public Money add(Money money)\n        {\n            return new Money(Value + money.Value);\n        }\n\n        public bool IsGreaterThan(Money money)\n        {\n            return this.Value > money.Value;\n        }\n\n        public bool IsGreaterThanOrEqualTo(Money money)\n        {\n            return this.Value > money.Value || this.Equals(money);\n        }\n\n        public bool IsLessThanOrEqualTo(Money money)\n        {\n            return this.Value < money.Value || this.Equals(money);\n        }\n\n        public override string ToString()\n        {\n            return string.Format(\"{0}\", Value);\n        }\n\n        // Equality Implementation\n\n        protected override IEnumerable<object> GetAttributesToIncludeInEqualityCheck()\n        {\n            return new List<Object>() {Value};\n        }\n    }\n}\n"
  },
  {
    "path": "19 - Aggregates/PPPDDDChap19.eBidder/PPPDDDChap19.eBidder.Listings/Model/MoneyCannotBeANegativeValueException.cs",
    "content": "﻿using System;\n\nnamespace PPPDDDChap19.eBidder.Listings.Model\n{\n    public class MoneyCannotBeANegativeValueException : Exception\n    {\n    }\n}\n"
  },
  {
    "path": "19 - Aggregates/PPPDDDChap19.eBidder/PPPDDDChap19.eBidder.Listings/Model/MoreThanTwoDecimalPlacesInMoneyValueException.cs",
    "content": "﻿using System;\n\nnamespace PPPDDDChap19.eBidder.Listings.Model\n{\n    public class MoreThanTwoDecimalPlacesInMoneyValueException : Exception \n    {\n    }\n}\n"
  },
  {
    "path": "19 - Aggregates/PPPDDDChap19.eBidder/PPPDDDChap19.eBidder.Listings/Model/QandA/Answer.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace PPPDDDChap19.eBidder.Listings.Model.QandA\n{\n    public class Answer\n    {\n        public Answer(DateTime dateAnswered, string text)\n        {\n            DateAnswered = dateAnswered;\n            Text = text;\n        }\n\n        public DateTime DateAnswered { get; private set; }\n        public string Text { get; private set; }\n    }\n}\n"
  },
  {
    "path": "19 - Aggregates/PPPDDDChap19.eBidder/PPPDDDChap19.eBidder.Listings/Model/QandA/IQuestionRepository.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace PPPDDDChap19.eBidder.Listings.Model.QandA\n{\n    public interface IQuestionRepository\n    {\n        Question FindBy(Guid id);\n        void Add(Question question);\n    }\n}\n"
  },
  {
    "path": "19 - Aggregates/PPPDDDChap19.eBidder/PPPDDDChap19.eBidder.Listings/Model/QandA/Question.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\nusing PPPDDDChap19.eBidder.Listings.Application.Infrastructure;\n\nnamespace PPPDDDChap19.eBidder.Listings.Model.QandA\n{\n    public class Question\n    {\n        private Guid Id { get; set; }\n        private Guid SellerId { get; set; }\n        private Guid ListingId { get; set; }\n        private Guid MemberId { get; set; }\n        private bool PublishOnListing { get; set; }\n        private DateTime TimeOfQuestion { get; set; }\n\n        public Question(Guid id, Guid listingId, Guid memberId, string question, DateTime timeOfQuestion)\n        {\n            Id = id;\n            ListingId = listingId;\n            MemberId = memberId;\n            Desc = question;\n            TimeOfQuestion = timeOfQuestion;\n\n            DomainEvents.Raise(new QuestionSubmitted(Id, ListingId));\n        }\n\n        public string Desc { get; set; }\n\n        public void SubmitAnAnswer(string answer, Guid sellerId, bool publishOnListing, DateTime timeOfAnswer)\n        {\n            PublishOnListing = publishOnListing;\n\n            Answer = new Answer(timeOfAnswer, answer);\n\n            DomainEvents.Raise(new QuestionAnswered(Id, ListingId)); \n        }\n\n        public Answer Answer { get; private set; }\n    }\n}\n"
  },
  {
    "path": "19 - Aggregates/PPPDDDChap19.eBidder/PPPDDDChap19.eBidder.Listings/Model/QandA/QuestionAnswered.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace PPPDDDChap19.eBidder.Listings.Model.QandA\n{\n    public class QuestionAnswered\n    {\n        public QuestionAnswered(Guid questionId, Guid listingId)\n        {\n            if (questionId == Guid.Empty)\n                throw new ArgumentNullException(\"Question Id cannot be null\");\n\n            if (listingId == Guid.Empty)\n                throw new ArgumentNullException(\"Listing Id cannot be null\");\n\n            QuestionId = questionId;\n            ListingId = listingId;\n        }\n\n        public Guid ListingId { get; private set; }\n        public Guid QuestionId { get; private set; }\n    }\n}\n"
  },
  {
    "path": "19 - Aggregates/PPPDDDChap19.eBidder/PPPDDDChap19.eBidder.Listings/Model/QandA/QuestionSubmitted.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace PPPDDDChap19.eBidder.Listings.Model.QandA\n{\n    public class QuestionSubmitted\n    {\n        public QuestionSubmitted(Guid questionId, Guid listingId)\n        {\n            if (questionId == Guid.Empty)\n                throw new ArgumentNullException(\"Question Id cannot be null\");\n\n            if (listingId == Guid.Empty)\n                throw new ArgumentNullException(\"Listing Id cannot be null\");\n\n            QuestionId = questionId;\n            ListingId = listingId;\n        }\n\n        public Guid ListingId { get; private set; }\n        public Guid QuestionId { get; private set; }\n    }\n}\n"
  },
  {
    "path": "19 - Aggregates/PPPDDDChap19.eBidder/PPPDDDChap19.eBidder.Listings/Model/Sellers/ISellerService.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace PPPDDDChap19.eBidder.Listings.Model.Sellers\n{\n    public interface ISellerService\n    {\n        Seller GetSeller(Guid sellerId);\n    }\n}\n"
  },
  {
    "path": "19 - Aggregates/PPPDDDChap19.eBidder/PPPDDDChap19.eBidder.Listings/Model/Sellers/Seller.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace PPPDDDChap19.eBidder.Listings.Model.Sellers\n{\n    public class Seller\n    {\n\n        public bool CanList { get; private set; }\n    }\n}\n"
  },
  {
    "path": "19 - Aggregates/PPPDDDChap19.eBidder/PPPDDDChap19.eBidder.Listings/Model/WatchLists/IWatchedItemRepository.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace PPPDDDChap19.eBidder.Listings.Model.WatchLists\n{\n    public interface IWatchedItemRepository\n    {\n        WatchedItem FindBy(Guid id);\n        void Add(WatchedItem watched);\n        void Remove(WatchedItem watched);\n    }\n}\n"
  },
  {
    "path": "19 - Aggregates/PPPDDDChap19.eBidder/PPPDDDChap19.eBidder.Listings/Model/WatchLists/WatchedItem.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace PPPDDDChap19.eBidder.Listings.Model.WatchLists\n{\n    public class WatchedItem\n    {\n        public WatchedItem(Guid id, Guid listingId, Guid memberId)\n        { \n        \n        }\n\n        public Guid Id { get; private set; }\n        public Guid ListingId { get; private set; }\n        public Guid MemberId { get; private set; }\n\n        private string Note { get; set; }\n    }\n}\n"
  },
  {
    "path": "19 - Aggregates/PPPDDDChap19.eBidder/PPPDDDChap19.eBidder.Listings/PPPDDDChap19.eBidder.Listings.csproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"4.0\" DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <Import Project=\"$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props\" Condition=\"Exists('$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props')\" />\n  <PropertyGroup>\n    <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>\n    <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>\n    <ProjectGuid>{5DA97316-904D-480F-B3BC-3FA75E120FEE}</ProjectGuid>\n    <OutputType>Library</OutputType>\n    <AppDesignerFolder>Properties</AppDesignerFolder>\n    <RootNamespace>PPPDDDChap19.eBidder.Listings</RootNamespace>\n    <AssemblyName>PPPDDDChap19.eBidder.Listings</AssemblyName>\n    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\n    <FileAlignment>512</FileAlignment>\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' \">\n    <DebugSymbols>true</DebugSymbols>\n    <DebugType>full</DebugType>\n    <Optimize>false</Optimize>\n    <OutputPath>bin\\Debug\\</OutputPath>\n    <DefineConstants>DEBUG;TRACE</DefineConstants>\n    <ErrorReport>prompt</ErrorReport>\n    <WarningLevel>4</WarningLevel>\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' \">\n    <DebugType>pdbonly</DebugType>\n    <Optimize>true</Optimize>\n    <OutputPath>bin\\Release\\</OutputPath>\n    <DefineConstants>TRACE</DefineConstants>\n    <ErrorReport>prompt</ErrorReport>\n    <WarningLevel>4</WarningLevel>\n  </PropertyGroup>\n  <ItemGroup>\n    <Reference Include=\"System\" />\n    <Reference Include=\"System.Core\" />\n    <Reference Include=\"System.Xml.Linq\" />\n    <Reference Include=\"System.Data.DataSetExtensions\" />\n    <Reference Include=\"Microsoft.CSharp\" />\n    <Reference Include=\"System.Data\" />\n    <Reference Include=\"System.Xml\" />\n  </ItemGroup>\n  <ItemGroup>\n    <Compile Include=\"Application\\QandA\\BusinessUseCases\\Answer.cs\" />\n    <Compile Include=\"Application\\QandA\\BusinessUseCases\\AnswerAQuestionService.cs\" />\n    <Compile Include=\"Application\\QandA\\BusinessUseCases\\AskAQuestionService.cs\" />\n    <Compile Include=\"Application\\Auctions\\BusinessUseCases\\AuctionCreation.cs\" />\n    <Compile Include=\"Application\\Auctions\\BusinessUseCases\\BidOnAuctionService.cs\" />\n    <Compile Include=\"Application\\Auctions\\BusinessUseCases\\CreateAuctionService.cs\" />\n    <Compile Include=\"Application\\Watching\\BusinessUseCases\\UnWatchItem.cs\" />\n    <Compile Include=\"Application\\Watching\\BusinessUseCases\\WatchItem.cs\" />\n    <Compile Include=\"Application\\Watching\\BusinessUseCases\\WatchItemService.cs\" />\n    <Compile Include=\"Infrastructure\\DomainEvents.cs\" />\n    <Compile Include=\"Infrastructure\\Entity.cs\" />\n    <Compile Include=\"Infrastructure\\IClock.cs\" />\n    <Compile Include=\"Infrastructure\\SystemClock.cs\" />\n    <Compile Include=\"Infrastructure\\ValueObject.cs\" />\n    <Compile Include=\"Model\\ListingFormat\\Auctions\\AuctionId.cs\" />\n    <Compile Include=\"Model\\Listings\\FormatType.cs\" />\n    <Compile Include=\"Model\\Listings\\IListingRepository.cs\" />\n    <Compile Include=\"Model\\Listings\\ListingFormat.cs\" />\n    <Compile Include=\"Model\\ListingFormat\\Auctions\\Auction.cs\" />\n    <Compile Include=\"Model\\ListingFormat\\Auctions\\AutomaticBidder.cs\" />\n    <Compile Include=\"Model\\ListingFormat\\Auctions\\BidHistory\\Bid.cs\" />\n    <Compile Include=\"Model\\ListingFormat\\Auctions\\BidHistory\\IBidHistoryRepository.cs\" />\n    <Compile Include=\"Model\\ListingFormat\\Auctions\\BidPlaced.cs\" />\n    <Compile Include=\"Model\\ListingFormat\\Auctions\\IAuctionRepository.cs\" />\n    <Compile Include=\"Model\\ListingFormat\\Auctions\\Offer.cs\" />\n    <Compile Include=\"Model\\ListingFormat\\Auctions\\OutBid.cs\" />\n    <Compile Include=\"Model\\Members\\IMemberService.cs\" />\n    <Compile Include=\"Model\\Members\\Member.cs\" />\n    <Compile Include=\"Model\\Money.cs\" />\n    <Compile Include=\"Model\\MoneyCannotBeANegativeValueException.cs\" />\n    <Compile Include=\"Model\\MoreThanTwoDecimalPlacesInMoneyValueException.cs\" />\n    <Compile Include=\"Model\\QandA\\Answer.cs\" />\n    <Compile Include=\"Model\\QandA\\IQuestionRepository.cs\" />\n    <Compile Include=\"Model\\QandA\\Question.cs\" />\n    <Compile Include=\"Model\\ListingFormat\\Auctions\\WinningBid.cs\" />\n    <Compile Include=\"Model\\ListingFormat\\FixedPriceListings\\FixedPriceListing.cs\" />\n    <Compile Include=\"Model\\ListingFormat\\FixedPriceListings\\IFixedPriceListingRepository.cs\" />\n    <Compile Include=\"Model\\ListingFormat\\FixedPriceListings\\Offers\\BestOffer.cs\" />\n    <Compile Include=\"Model\\Listings\\Listing.cs\" />\n    <Compile Include=\"Model\\Listings\\ListingRevision.cs\" />\n    <Compile Include=\"Model\\Listings\\ListingRevisionEvent.cs\" />\n    <Compile Include=\"Model\\ListingFormat\\Auctions\\Price.cs\" />\n    <Compile Include=\"Model\\QandA\\QuestionAnswered.cs\" />\n    <Compile Include=\"Model\\QandA\\QuestionSubmitted.cs\" />\n    <Compile Include=\"Model\\Sellers\\ISellerService.cs\" />\n    <Compile Include=\"Model\\Sellers\\Seller.cs\" />\n    <Compile Include=\"Model\\WatchLists\\IWatchedItemRepository.cs\" />\n    <Compile Include=\"Model\\WatchLists\\WatchedItem.cs\" />\n    <Compile Include=\"Properties\\AssemblyInfo.cs\" />\n  </ItemGroup>\n  <ItemGroup>\n    <Folder Include=\"Application\\Auctions\\Queries\\\" />\n    <Folder Include=\"Application\\FixedPriceListing\\BusinessUseCases\\\" />\n    <Folder Include=\"Application\\FixedPriceListing\\Queries\\\" />\n    <Folder Include=\"Model\\Listings\\PaymentMethods\\\" />\n    <Folder Include=\"Model\\Listings\\ShippingMethods\\\" />\n  </ItemGroup>\n  <Import Project=\"$(MSBuildToolsPath)\\Microsoft.CSharp.targets\" />\n  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \n       Other similar extension points exist, see Microsoft.Common.targets.\n  <Target Name=\"BeforeBuild\">\n  </Target>\n  <Target Name=\"AfterBuild\">\n  </Target>\n  -->\n</Project>"
  },
  {
    "path": "19 - Aggregates/PPPDDDChap19.eBidder/PPPDDDChap19.eBidder.Listings/Properties/AssemblyInfo.cs",
    "content": "﻿using System.Reflection;\nusing System.Runtime.CompilerServices;\nusing System.Runtime.InteropServices;\n\n// General Information about an assembly is controlled through the following \n// set of attributes. Change these attribute values to modify the information\n// associated with an assembly.\n[assembly: AssemblyTitle(\"PPPDDDChap19.eBidder.Listings\")]\n[assembly: AssemblyDescription(\"\")]\n[assembly: AssemblyConfiguration(\"\")]\n[assembly: AssemblyCompany(\"\")]\n[assembly: AssemblyProduct(\"PPPDDDChap19.eBidder.Listings\")]\n[assembly: AssemblyCopyright(\"Copyright ©  2014\")]\n[assembly: AssemblyTrademark(\"\")]\n[assembly: AssemblyCulture(\"\")]\n\n// Setting ComVisible to false makes the types in this assembly not visible \n// to COM components.  If you need to access a type in this assembly from \n// COM, set the ComVisible attribute to true on that type.\n[assembly: ComVisible(false)]\n\n// The following GUID is for the ID of the typelib if this project is exposed to COM\n[assembly: Guid(\"ad2cedaf-4b70-4583-9c5b-924ff5f247c1\")]\n\n// Version information for an assembly consists of the following four values:\n//\n//      Major Version\n//      Minor Version \n//      Build Number\n//      Revision\n//\n// You can specify all the values or you can default the Build and Revision Numbers \n// by using the '*' as shown below:\n// [assembly: AssemblyVersion(\"1.0.*\")]\n[assembly: AssemblyVersion(\"1.0.0.0\")]\n[assembly: AssemblyFileVersion(\"1.0.0.0\")]\n"
  },
  {
    "path": "19 - Aggregates/PPPDDDChap19.eBidder/PPPDDDChap19.eBidder.Membership/Model/Members/IMemberRepository.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace PPPDDDChap19.eBidder.Listings.Model.Members\n{\n    public interface IMemberRepository\n    {\n        Member FindBy(Guid memberId);\n    }\n}\n"
  },
  {
    "path": "19 - Aggregates/PPPDDDChap19.eBidder/PPPDDDChap19.eBidder.Membership/Model/Members/Member.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace PPPDDDChap19.eBidder.Listings.Model.Members\n{\n    public class Member\n    {\n        private Guid Id { get; set; }\n        \n    }\n}\n"
  },
  {
    "path": "19 - Aggregates/PPPDDDChap19.eBidder/PPPDDDChap19.eBidder.Membership/PPPDDDChap19.eBidder.Membership.csproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"4.0\" DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <Import Project=\"$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props\" Condition=\"Exists('$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props')\" />\n  <PropertyGroup>\n    <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>\n    <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>\n    <ProjectGuid>{48FF285F-08C2-4D38-91FC-48C4C942DE26}</ProjectGuid>\n    <OutputType>Library</OutputType>\n    <AppDesignerFolder>Properties</AppDesignerFolder>\n    <RootNamespace>PPPDDDChap19.eBidder.Membership</RootNamespace>\n    <AssemblyName>PPPDDDChap19.eBidder.Membership</AssemblyName>\n    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\n    <FileAlignment>512</FileAlignment>\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' \">\n    <DebugSymbols>true</DebugSymbols>\n    <DebugType>full</DebugType>\n    <Optimize>false</Optimize>\n    <OutputPath>bin\\Debug\\</OutputPath>\n    <DefineConstants>DEBUG;TRACE</DefineConstants>\n    <ErrorReport>prompt</ErrorReport>\n    <WarningLevel>4</WarningLevel>\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' \">\n    <DebugType>pdbonly</DebugType>\n    <Optimize>true</Optimize>\n    <OutputPath>bin\\Release\\</OutputPath>\n    <DefineConstants>TRACE</DefineConstants>\n    <ErrorReport>prompt</ErrorReport>\n    <WarningLevel>4</WarningLevel>\n  </PropertyGroup>\n  <ItemGroup>\n    <Reference Include=\"System\" />\n    <Reference Include=\"System.Core\" />\n    <Reference Include=\"System.Xml.Linq\" />\n    <Reference Include=\"System.Data.DataSetExtensions\" />\n    <Reference Include=\"Microsoft.CSharp\" />\n    <Reference Include=\"System.Data\" />\n    <Reference Include=\"System.Xml\" />\n  </ItemGroup>\n  <ItemGroup>\n    <Compile Include=\"Model\\Members\\IMemberRepository.cs\" />\n    <Compile Include=\"Model\\Members\\Member.cs\" />\n    <Compile Include=\"Properties\\AssemblyInfo.cs\" />\n  </ItemGroup>\n  <ItemGroup>\n    <Content Include=\"_ReadMe.txt\" />\n  </ItemGroup>\n  <ItemGroup>\n    <Folder Include=\"Model\\Members\\Messages\\\" />\n  </ItemGroup>\n  <Import Project=\"$(MSBuildToolsPath)\\Microsoft.CSharp.targets\" />\n  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \n       Other similar extension points exist, see Microsoft.Common.targets.\n  <Target Name=\"BeforeBuild\">\n  </Target>\n  <Target Name=\"AfterBuild\">\n  </Target>\n  -->\n</Project>"
  },
  {
    "path": "19 - Aggregates/PPPDDDChap19.eBidder/PPPDDDChap19.eBidder.Membership/Properties/AssemblyInfo.cs",
    "content": "﻿using System.Reflection;\nusing System.Runtime.CompilerServices;\nusing System.Runtime.InteropServices;\n\n// General Information about an assembly is controlled through the following \n// set of attributes. Change these attribute values to modify the information\n// associated with an assembly.\n[assembly: AssemblyTitle(\"PPPDDDChap19.eBidder.Membership\")]\n[assembly: AssemblyDescription(\"\")]\n[assembly: AssemblyConfiguration(\"\")]\n[assembly: AssemblyCompany(\"\")]\n[assembly: AssemblyProduct(\"PPPDDDChap19.eBidder.Membership\")]\n[assembly: AssemblyCopyright(\"Copyright ©  2014\")]\n[assembly: AssemblyTrademark(\"\")]\n[assembly: AssemblyCulture(\"\")]\n\n// Setting ComVisible to false makes the types in this assembly not visible \n// to COM components.  If you need to access a type in this assembly from \n// COM, set the ComVisible attribute to true on that type.\n[assembly: ComVisible(false)]\n\n// The following GUID is for the ID of the typelib if this project is exposed to COM\n[assembly: Guid(\"01e44b83-a399-4843-9e6e-075c226c82b2\")]\n\n// Version information for an assembly consists of the following four values:\n//\n//      Major Version\n//      Minor Version \n//      Build Number\n//      Revision\n//\n// You can specify all the values or you can default the Build and Revision Numbers \n// by using the '*' as shown below:\n// [assembly: AssemblyVersion(\"1.0.*\")]\n[assembly: AssemblyVersion(\"1.0.0.0\")]\n[assembly: AssemblyFileVersion(\"1.0.0.0\")]\n"
  },
  {
    "path": "19 - Aggregates/PPPDDDChap19.eBidder/PPPDDDChap19.eBidder.Membership/_ReadMe.txt",
    "content": "﻿This project would hold the code for eBidders seller account."
  },
  {
    "path": "19 - Aggregates/PPPDDDChap19.eBidder/PPPDDDChap19.eBidder.SellerAccount/PPPDDDChap19.eBidder.SellerAccount.csproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"4.0\" DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <Import Project=\"$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props\" Condition=\"Exists('$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props')\" />\n  <PropertyGroup>\n    <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>\n    <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>\n    <ProjectGuid>{8917A663-AB2E-4A7A-B6D1-D153842BDEF4}</ProjectGuid>\n    <OutputType>Library</OutputType>\n    <AppDesignerFolder>Properties</AppDesignerFolder>\n    <RootNamespace>PPPDDDChap19.eBidder.SellerAccount</RootNamespace>\n    <AssemblyName>PPPDDDChap19.eBidder.SellerAccount</AssemblyName>\n    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\n    <FileAlignment>512</FileAlignment>\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' \">\n    <DebugSymbols>true</DebugSymbols>\n    <DebugType>full</DebugType>\n    <Optimize>false</Optimize>\n    <OutputPath>bin\\Debug\\</OutputPath>\n    <DefineConstants>DEBUG;TRACE</DefineConstants>\n    <ErrorReport>prompt</ErrorReport>\n    <WarningLevel>4</WarningLevel>\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' \">\n    <DebugType>pdbonly</DebugType>\n    <Optimize>true</Optimize>\n    <OutputPath>bin\\Release\\</OutputPath>\n    <DefineConstants>TRACE</DefineConstants>\n    <ErrorReport>prompt</ErrorReport>\n    <WarningLevel>4</WarningLevel>\n  </PropertyGroup>\n  <ItemGroup>\n    <Reference Include=\"System\" />\n    <Reference Include=\"System.Core\" />\n    <Reference Include=\"System.Xml.Linq\" />\n    <Reference Include=\"System.Data.DataSetExtensions\" />\n    <Reference Include=\"Microsoft.CSharp\" />\n    <Reference Include=\"System.Data\" />\n    <Reference Include=\"System.Xml\" />\n  </ItemGroup>\n  <ItemGroup>\n    <Compile Include=\"Properties\\AssemblyInfo.cs\" />\n  </ItemGroup>\n  <ItemGroup>\n    <Content Include=\"_ReadMe.txt\" />\n  </ItemGroup>\n  <Import Project=\"$(MSBuildToolsPath)\\Microsoft.CSharp.targets\" />\n  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \n       Other similar extension points exist, see Microsoft.Common.targets.\n  <Target Name=\"BeforeBuild\">\n  </Target>\n  <Target Name=\"AfterBuild\">\n  </Target>\n  -->\n</Project>"
  },
  {
    "path": "19 - Aggregates/PPPDDDChap19.eBidder/PPPDDDChap19.eBidder.SellerAccount/Properties/AssemblyInfo.cs",
    "content": "﻿using System.Reflection;\nusing System.Runtime.CompilerServices;\nusing System.Runtime.InteropServices;\n\n// General Information about an assembly is controlled through the following \n// set of attributes. Change these attribute values to modify the information\n// associated with an assembly.\n[assembly: AssemblyTitle(\"PPPDDDChap19.eBidder.SellerAccount\")]\n[assembly: AssemblyDescription(\"\")]\n[assembly: AssemblyConfiguration(\"\")]\n[assembly: AssemblyCompany(\"\")]\n[assembly: AssemblyProduct(\"PPPDDDChap19.eBidder.SellerAccount\")]\n[assembly: AssemblyCopyright(\"Copyright ©  2014\")]\n[assembly: AssemblyTrademark(\"\")]\n[assembly: AssemblyCulture(\"\")]\n\n// Setting ComVisible to false makes the types in this assembly not visible \n// to COM components.  If you need to access a type in this assembly from \n// COM, set the ComVisible attribute to true on that type.\n[assembly: ComVisible(false)]\n\n// The following GUID is for the ID of the typelib if this project is exposed to COM\n[assembly: Guid(\"1d49b007-12a0-42db-b269-51a49f850a91\")]\n\n// Version information for an assembly consists of the following four values:\n//\n//      Major Version\n//      Minor Version \n//      Build Number\n//      Revision\n//\n// You can specify all the values or you can default the Build and Revision Numbers \n// by using the '*' as shown below:\n// [assembly: AssemblyVersion(\"1.0.*\")]\n[assembly: AssemblyVersion(\"1.0.0.0\")]\n[assembly: AssemblyFileVersion(\"1.0.0.0\")]\n"
  },
  {
    "path": "19 - Aggregates/PPPDDDChap19.eBidder/PPPDDDChap19.eBidder.SellerAccount/_ReadMe.txt",
    "content": "﻿This project would hold the code for eBidders membership."
  },
  {
    "path": "19 - Aggregates/PPPDDDChap19.eBidder/PPPDDDChap19.eBidder.sln",
    "content": "﻿\nMicrosoft Visual Studio Solution File, Format Version 12.00\n# Visual Studio 2012\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"PPPDDDChap19.eBidder.Disputes\", \"PPPDDDChap19.eBidder.Disputes\\PPPDDDChap19.eBidder.Disputes.csproj\", \"{6753FC4E-CDEB-4F17-A4C7-9CE18A4C11DB}\"\nEndProject\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"PPPDDDChap19.eBidder.Listings\", \"PPPDDDChap19.eBidder.Listings\\PPPDDDChap19.eBidder.Listings.csproj\", \"{5DA97316-904D-480F-B3BC-3FA75E120FEE}\"\nEndProject\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"PPPDDDChap19.eBidder.SellerAccount\", \"PPPDDDChap19.eBidder.SellerAccount\\PPPDDDChap19.eBidder.SellerAccount.csproj\", \"{8917A663-AB2E-4A7A-B6D1-D153842BDEF4}\"\nEndProject\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"PPPDDDChap19.eBidder.Membership\", \"PPPDDDChap19.eBidder.Membership\\PPPDDDChap19.eBidder.Membership.csproj\", \"{48FF285F-08C2-4D38-91FC-48C4C942DE26}\"\nEndProject\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"PPPDDDChap19.eBidder.Common\", \"PPPDDDChap19.eBidder.Common\\PPPDDDChap19.eBidder.Common.csproj\", \"{45804B34-C80F-4096-9919-C22260412E2B}\"\nEndProject\nGlobal\n\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\n\t\tDebug|Any CPU = Debug|Any CPU\n\t\tRelease|Any CPU = Release|Any CPU\n\tEndGlobalSection\n\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\n\t\t{6753FC4E-CDEB-4F17-A4C7-9CE18A4C11DB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{6753FC4E-CDEB-4F17-A4C7-9CE18A4C11DB}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{6753FC4E-CDEB-4F17-A4C7-9CE18A4C11DB}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{6753FC4E-CDEB-4F17-A4C7-9CE18A4C11DB}.Release|Any CPU.Build.0 = Release|Any CPU\n\t\t{5DA97316-904D-480F-B3BC-3FA75E120FEE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{5DA97316-904D-480F-B3BC-3FA75E120FEE}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{5DA97316-904D-480F-B3BC-3FA75E120FEE}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{5DA97316-904D-480F-B3BC-3FA75E120FEE}.Release|Any CPU.Build.0 = Release|Any CPU\n\t\t{8917A663-AB2E-4A7A-B6D1-D153842BDEF4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{8917A663-AB2E-4A7A-B6D1-D153842BDEF4}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{8917A663-AB2E-4A7A-B6D1-D153842BDEF4}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{8917A663-AB2E-4A7A-B6D1-D153842BDEF4}.Release|Any CPU.Build.0 = Release|Any CPU\n\t\t{48FF285F-08C2-4D38-91FC-48C4C942DE26}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{48FF285F-08C2-4D38-91FC-48C4C942DE26}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{48FF285F-08C2-4D38-91FC-48C4C942DE26}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{48FF285F-08C2-4D38-91FC-48C4C942DE26}.Release|Any CPU.Build.0 = Release|Any CPU\n\t\t{45804B34-C80F-4096-9919-C22260412E2B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{45804B34-C80F-4096-9919-C22260412E2B}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{45804B34-C80F-4096-9919-C22260412E2B}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{45804B34-C80F-4096-9919-C22260412E2B}.Release|Any CPU.Build.0 = Release|Any CPU\n\tEndGlobalSection\n\tGlobalSection(SolutionProperties) = preSolution\n\t\tHideSolutionNode = FALSE\n\tEndGlobalSection\nEndGlobal\n"
  },
  {
    "path": "19 - Aggregates/README.md",
    "content": "PPPDDD\n======\n\nSample code for the book Principles, Practices and Patterns of Domain-Driven Design. From the book http://www.amazon.com/Professional-Domain-Driven-Design-Patterns/dp/1118714709/\n"
  },
  {
    "path": "20 - Factories/README.md",
    "content": "PPPDDD\n======\n\nSample code for the book Principles, Practices and Patterns of Domain-Driven Design. From the book http://www.amazon.com/Professional-Domain-Driven-Design-Patterns/dp/1118714709/\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.EFExample/.nuget/NuGet.Config",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<configuration>\n  <solution>\n    <add key=\"disableSourceControlIntegration\" value=\"true\" />\n  </solution>\n</configuration>"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.EFExample/.nuget/NuGet.targets",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n    <PropertyGroup>\n        <SolutionDir Condition=\"$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'\">$(MSBuildProjectDirectory)\\..\\</SolutionDir>\n        \n        <!-- Enable the restore command to run before builds -->\n        <RestorePackages Condition=\"  '$(RestorePackages)' == '' \">false</RestorePackages>\n\n        <!-- Property that enables building a package from a project -->\n        <BuildPackage Condition=\" '$(BuildPackage)' == '' \">false</BuildPackage>\n\n        <!-- Determines if package restore consent is required to restore packages -->\n        <RequireRestoreConsent Condition=\" '$(RequireRestoreConsent)' != 'false' \">true</RequireRestoreConsent>\n        \n        <!-- Download NuGet.exe if it does not already exist -->\n        <DownloadNuGetExe Condition=\" '$(DownloadNuGetExe)' == '' \">false</DownloadNuGetExe>\n    </PropertyGroup>\n    \n    <ItemGroup Condition=\" '$(PackageSources)' == '' \">\n        <!-- Package sources used to restore packages. By default, registered sources under %APPDATA%\\NuGet\\NuGet.Config will be used -->\n        <!-- The official NuGet package source (https://www.nuget.org/api/v2/) will be excluded if package sources are specified and it does not appear in the list -->\n        <!--\n            <PackageSource Include=\"https://www.nuget.org/api/v2/\" />\n            <PackageSource Include=\"https://my-nuget-source/nuget/\" />\n        -->\n    </ItemGroup>\n\n    <PropertyGroup Condition=\" '$(OS)' == 'Windows_NT'\">\n        <!-- Windows specific commands -->\n        <NuGetToolsPath>$([System.IO.Path]::Combine($(SolutionDir), \".nuget\"))</NuGetToolsPath>\n        <PackagesConfig>$([System.IO.Path]::Combine($(ProjectDir), \"packages.config\"))</PackagesConfig>\n    </PropertyGroup>\n    \n    <PropertyGroup Condition=\" '$(OS)' != 'Windows_NT'\">\n        <!-- We need to launch nuget.exe with the mono command if we're not on windows -->\n        <NuGetToolsPath>$(SolutionDir).nuget</NuGetToolsPath>\n        <PackagesConfig>packages.config</PackagesConfig>\n    </PropertyGroup>\n    \n    <PropertyGroup>\n        <!-- NuGet command -->\n        <NuGetExePath Condition=\" '$(NuGetExePath)' == '' \">$(NuGetToolsPath)\\NuGet.exe</NuGetExePath>\n        <PackageSources Condition=\" $(PackageSources) == '' \">@(PackageSource)</PackageSources>\n        \n        <NuGetCommand Condition=\" '$(OS)' == 'Windows_NT'\">\"$(NuGetExePath)\"</NuGetCommand>\n        <NuGetCommand Condition=\" '$(OS)' != 'Windows_NT' \">mono --runtime=v4.0.30319 $(NuGetExePath)</NuGetCommand>\n\n        <PackageOutputDir Condition=\"$(PackageOutputDir) == ''\">$(TargetDir.Trim('\\\\'))</PackageOutputDir>\n        \n        <RequireConsentSwitch Condition=\" $(RequireRestoreConsent) == 'true' \">-RequireConsent</RequireConsentSwitch>\n        <NonInteractiveSwitch Condition=\" '$(VisualStudioVersion)' != '' AND '$(OS)' == 'Windows_NT' \">-NonInteractive</NonInteractiveSwitch>\n        \n        <PaddedSolutionDir Condition=\" '$(OS)' == 'Windows_NT'\">\"$(SolutionDir) \"</PaddedSolutionDir>\n        <PaddedSolutionDir Condition=\" '$(OS)' != 'Windows_NT' \">\"$(SolutionDir)\"</PaddedSolutionDir>\n\n        <!-- Commands -->\n        <RestoreCommand>$(NuGetCommand) install \"$(PackagesConfig)\" -source \"$(PackageSources)\"  $(NonInteractiveSwitch) $(RequireConsentSwitch) -solutionDir $(PaddedSolutionDir)</RestoreCommand>\n        <BuildCommand>$(NuGetCommand) pack \"$(ProjectPath)\" -Properties \"Configuration=$(Configuration);Platform=$(Platform)\" $(NonInteractiveSwitch) -OutputDirectory \"$(PackageOutputDir)\" -symbols</BuildCommand>\n\n        <!-- We need to ensure packages are restored prior to assembly resolve -->\n        <BuildDependsOn Condition=\"$(RestorePackages) == 'true'\">\n            RestorePackages;\n            $(BuildDependsOn);\n        </BuildDependsOn>\n\n        <!-- Make the build depend on restore packages -->\n        <BuildDependsOn Condition=\"$(BuildPackage) == 'true'\">\n            $(BuildDependsOn);\n            BuildPackage;\n        </BuildDependsOn>\n    </PropertyGroup>\n\n    <Target Name=\"CheckPrerequisites\">\n        <!-- Raise an error if we're unable to locate nuget.exe  -->\n        <Error Condition=\"'$(DownloadNuGetExe)' != 'true' AND !Exists('$(NuGetExePath)')\" Text=\"Unable to locate '$(NuGetExePath)'\" />\n        <!--\n        Take advantage of MsBuild's build dependency tracking to make sure that we only ever download nuget.exe once.\n        This effectively acts as a lock that makes sure that the download operation will only happen once and all\n        parallel builds will have to wait for it to complete.\n        -->\n        <MsBuild Targets=\"_DownloadNuGet\" Projects=\"$(MSBuildThisFileFullPath)\" Properties=\"Configuration=NOT_IMPORTANT;DownloadNuGetExe=$(DownloadNuGetExe)\" />\n    </Target>\n\n    <Target Name=\"_DownloadNuGet\">\n        <DownloadNuGet OutputFilename=\"$(NuGetExePath)\" Condition=\" '$(DownloadNuGetExe)' == 'true' AND !Exists('$(NuGetExePath)')\" />\n    </Target>\n\n    <Target Name=\"RestorePackages\" DependsOnTargets=\"CheckPrerequisites\">\n        <Exec Command=\"$(RestoreCommand)\"\n              Condition=\"'$(OS)' != 'Windows_NT' And Exists('$(PackagesConfig)')\" />\n              \n        <Exec Command=\"$(RestoreCommand)\"\n              LogStandardErrorAsError=\"true\"\n              Condition=\"'$(OS)' == 'Windows_NT' And Exists('$(PackagesConfig)')\" />\n    </Target>\n\n    <Target Name=\"BuildPackage\" DependsOnTargets=\"CheckPrerequisites\">\n        <Exec Command=\"$(BuildCommand)\" \n              Condition=\" '$(OS)' != 'Windows_NT' \" />\n              \n        <Exec Command=\"$(BuildCommand)\"\n              LogStandardErrorAsError=\"true\"\n              Condition=\" '$(OS)' == 'Windows_NT' \" />\n    </Target>\n    \n    <UsingTask TaskName=\"DownloadNuGet\" TaskFactory=\"CodeTaskFactory\" AssemblyFile=\"$(MSBuildToolsPath)\\Microsoft.Build.Tasks.v4.0.dll\">\n        <ParameterGroup>\n            <OutputFilename ParameterType=\"System.String\" Required=\"true\" />\n        </ParameterGroup>\n        <Task>\n            <Reference Include=\"System.Core\" />\n            <Using Namespace=\"System\" />\n            <Using Namespace=\"System.IO\" />\n            <Using Namespace=\"System.Net\" />\n            <Using Namespace=\"Microsoft.Build.Framework\" />\n            <Using Namespace=\"Microsoft.Build.Utilities\" />\n            <Code Type=\"Fragment\" Language=\"cs\">\n                <![CDATA[\n                try {\n                    OutputFilename = Path.GetFullPath(OutputFilename);\n\n                    Log.LogMessage(\"Downloading latest version of NuGet.exe...\");\n                    WebClient webClient = new WebClient();\n                    webClient.DownloadFile(\"https://www.nuget.org/nuget.exe\", OutputFilename);\n\n                    return true;\n                }\n                catch (Exception ex) {\n                    Log.LogErrorFromException(ex);\n                    return false;\n                }\n            ]]>\n            </Code>\n        </Task>\n    </UsingTask>\n</Project>"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.EFExample/DDDPPP.Chap21.EFExample.Application/App.config",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<configuration>\n\n</configuration>"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.EFExample/DDDPPP.Chap21.EFExample.Application/Application/BusinessUseCases/BidOnAuction.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing DDDPPP.Chap21.EFExample.Application.Model.Auction;\nusing DDDPPP.Chap21.EFExample.Application.Model.BidHistory;\nusing DDDPPP.Chap21.EFExample.Application.Infrastructure;\nusing System.Data.Entity.Infrastructure;\n\nnamespace DDDPPP.Chap21.EFExample.Application.Application.BusinessUseCases\n{\n    public class BidOnAuction\n    {\n        private IAuctionRepository _auctions;\n        private IBidHistoryRepository _bidHistory;\n        private AuctionDatabaseContext _unitOfWork;\n        private IClock _clock;\n\n        public BidOnAuction(IAuctionRepository auctions, IBidHistoryRepository bidHistory, AuctionDatabaseContext unitOfWork, IClock clock)\n        {\n            _auctions = auctions;\n            _bidHistory = bidHistory;\n            _unitOfWork = unitOfWork;\n            _clock = clock;\n        }\n\n        public void Bid(Guid auctionId, Guid memberId, decimal amount)\n        {\n            try\n            {\n                using (DomainEvents.Register(OutBid()))\n                using (DomainEvents.Register(BidPlaced()))\n                {\n                    var auction = _auctions.FindBy(auctionId);\n\n                    var bidAmount = new Money(amount);\n\n                    auction.PlaceBidFor(new Offer(memberId, bidAmount, _clock.Time()), _clock.Time());\n\n                    _auctions.Save(auction);\n                }\n\n                _unitOfWork.SaveChanges();\n            }\n            catch (DbUpdateConcurrencyException ex)\n            {\n                // What happens if the auction is changed after we retrieve it and before we save it?               \n                // try again with the updated auction\n                _unitOfWork.Clear();\n\n                Bid(auctionId, memberId, amount);\n            }            \n        }\n\n        private Action<BidPlaced> BidPlaced()\n        {\n            return (BidPlaced e) =>\n            {\n                var bidEvent = new Bid(e.AuctionId, e.Bidder, e.AmountBid, e.TimeOfBid);\n              \n                _bidHistory.Add(bidEvent);\n            };\n        }\n\n        private Action<OutBid> OutBid()\n        {\n            return (OutBid e) =>\n            {\n                // Email customer to say that he has been out bid                \n            };\n        }\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.EFExample/DDDPPP.Chap21.EFExample.Application/Application/BusinessUseCases/CreateAuction.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing DDDPPP.Chap21.EFExample.Application.Model.Auction;\nusing DDDPPP.Chap21.EFExample.Application.Model.BidHistory;\nusing DDDPPP.Chap21.EFExample.Application.Infrastructure;\n\nnamespace DDDPPP.Chap21.EFExample.Application.Application.BusinessUseCases\n{\n    public class CreateAuction\n    {\n        private IAuctionRepository _auctions;\n        private AuctionDatabaseContext _unitOfWork;\n\n        public CreateAuction(IAuctionRepository auctions, AuctionDatabaseContext unitOfWork)\n        {\n            _auctions = auctions;            \n            _unitOfWork = unitOfWork;\n        }\n\n        public Guid Create(NewAuctionRequest command)\n        {\n            var auctionId = Guid.NewGuid();\n            var startingPrice = new Money(command.StartingPrice);\n           \n            _auctions.Add(new Auction(auctionId, startingPrice, command.EndsAt));\n\n            _unitOfWork.SaveChanges();\n            \n            return auctionId;\n        }\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.EFExample/DDDPPP.Chap21.EFExample.Application/Application/BusinessUseCases/NewAuctionRequest.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace DDDPPP.Chap21.EFExample.Application.Application.BusinessUseCases\n{\n    public class NewAuctionRequest\n    {\n        public decimal StartingPrice { get; set; }\n        public DateTime EndsAt { get; set; }\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.EFExample/DDDPPP.Chap21.EFExample.Application/Application/Queries/AuctionStatus.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\nusing DDDPPP.Chap21.EFExample.Application.Model.BidHistory;\n\nnamespace DDDPPP.Chap21.EFExample.Application.Application.Queries\n{\n    public class AuctionStatus\n    {\n        public Guid Id { get; set; }\n        public decimal CurrentPrice { get; set; }\n        public DateTime AuctionEnds { get; set; }\n        public Guid WinningBidderId { get; set; }\n        public int NumberOfBids { get; set; }\n        public TimeSpan TimeRemaining { get; set; }\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.EFExample/DDDPPP.Chap21.EFExample.Application/Application/Queries/AuctionStatusQuery.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing DDDPPP.Chap21.EFExample.Application.Model.Auction;\nusing DDDPPP.Chap21.EFExample.Application.Model.BidHistory;\nusing DDDPPP.Chap21.EFExample.Application.Infrastructure;\n\nnamespace DDDPPP.Chap21.EFExample.Application.Application.Queries\n{\n    public class AuctionStatusQuery\n    {\n        private readonly IAuctionRepository _auctions;\n        private readonly IBidHistoryRepository _bidHistory;\n        private readonly IClock _clock;\n\n        public AuctionStatusQuery(IAuctionRepository auctions, \n                                  IBidHistoryRepository bidHistory,\n                                  IClock clock)\n        {\n            _auctions = auctions;\n            _bidHistory = bidHistory;\n            _clock = clock;\n        }\n\n        public AuctionStatus AuctionStatus(Guid auctionId)\n        {            \n            var auction = _auctions.FindBy(auctionId);\n\n            var snapshot = auction.GetSnapshot();\n\n            return ConvertToStatus(snapshot);\n        }\n\n        public AuctionStatus ConvertToStatus(AuctionSnapshot snapshot)\n        {\n            var status = new AuctionStatus();\n\n            status.AuctionEnds = snapshot.EndsAt;            \n            status.Id = snapshot.Id;\n            status.TimeRemaining = TimeRemaining(snapshot.EndsAt);\n\n            if (snapshot.WinningBid != null)\n            {\n                status.NumberOfBids = _bidHistory.NoOfBidsFor(snapshot.Id);\n                status.WinningBidderId = snapshot.WinningBid.BiddersId;\n                status.CurrentPrice = snapshot.WinningBid.CurrentPrice;\n            }\n            \n            return status;\n        }\n\n        public TimeSpan TimeRemaining(DateTime AuctionEnds)\n        {\n            if (_clock.Time() < AuctionEnds)\n                return AuctionEnds.Subtract(_clock.Time());\n            else\n                return new TimeSpan();\n        }\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.EFExample/DDDPPP.Chap21.EFExample.Application/Application/Queries/BidHistoryQuery.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing DDDPPP.Chap21.EFExample.Application.Infrastructure;\nusing DDDPPP.Chap21.EFExample.Application.Model.BidHistory;\n\nnamespace DDDPPP.Chap21.EFExample.Application.Application.Queries\n{\n    public class BidHistoryQuery\n    {\n        private readonly IBidHistoryRepository _bidHistory;\n\n        public BidHistoryQuery(IBidHistoryRepository bidHistory)\n        {\n            _bidHistory = bidHistory;         \n        }\n\n        public IEnumerable<BidInformation> BidHistoryFor(Guid auctionId)\n        {\n            var bidHistory = _bidHistory.FindBy(auctionId);\n\n            return Convert(bidHistory.ShowAllBids());\n        }\n\n        public IEnumerable<BidInformation> Convert(IEnumerable<Bid> bids)\n        {\n            var bidInfo = new List<BidInformation>();\n\n            foreach (var bid in bids)\n            {\n                bidInfo.Add(new BidInformation() { Bidder = bid.Bidder, AmountBid = bid.AmountBid.GetSnapshot().Value, TimeOfBid = bid.TimeOfBid });\n            }\n\n            return bidInfo;\n        }\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.EFExample/DDDPPP.Chap21.EFExample.Application/Application/Queries/BidInformation.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace DDDPPP.Chap21.EFExample.Application.Application.Queries\n{\n    public class BidInformation\n    {\n        public Guid Bidder { get;  set; }\n        public decimal AmountBid { get;  set; }\n        public string Currency { get; set; }\n        public DateTime TimeOfBid { get;  set; }\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.EFExample/DDDPPP.Chap21.EFExample.Application/Bootstrapper.cs",
    "content": "﻿using System;\nusing StructureMap;\nusing DDDPPP.Chap21.EFExample.Application.Infrastructure;\nusing DDDPPP.Chap21.EFExample.Application.Model.Auction;\nusing DDDPPP.Chap21.EFExample.Application.Model.BidHistory;\n\nnamespace DDDPPP.Chap21.EFExample.Application\n{\n    public static class Bootstrapper\n    {\n        public static void Startup()\n        {                      \n            ObjectFactory.Initialize(config =>\n            {\n                config.For<IAuctionRepository>().Use<AuctionRepository>();\n                config.For<IBidHistoryRepository>().Use<BidHistoryRepository>();\n                config.For<IClock>().Use<SystemClock>();         \n            });\n        }\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.EFExample/DDDPPP.Chap21.EFExample.Application/DDDPPP.Chap21.EFExample.Application.csproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"4.0\" DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <Import Project=\"$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props\" Condition=\"Exists('$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props')\" />\n  <PropertyGroup>\n    <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>\n    <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>\n    <ProjectGuid>{BD4E953F-603B-4F99-9D6D-687643859354}</ProjectGuid>\n    <OutputType>Library</OutputType>\n    <AppDesignerFolder>Properties</AppDesignerFolder>\n    <RootNamespace>DDDPPP.Chap21.EFExample.Application</RootNamespace>\n    <AssemblyName>DDDPPP.Chap21.EFExample.Application</AssemblyName>\n    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\n    <FileAlignment>512</FileAlignment>\n    <SolutionDir Condition=\"$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'\">..\\</SolutionDir>\n    <RestorePackages>true</RestorePackages>\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' \">\n    <DebugSymbols>true</DebugSymbols>\n    <DebugType>full</DebugType>\n    <Optimize>false</Optimize>\n    <OutputPath>bin\\Debug\\</OutputPath>\n    <DefineConstants>DEBUG;TRACE</DefineConstants>\n    <ErrorReport>prompt</ErrorReport>\n    <WarningLevel>4</WarningLevel>\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' \">\n    <DebugType>pdbonly</DebugType>\n    <Optimize>true</Optimize>\n    <OutputPath>bin\\Release\\</OutputPath>\n    <DefineConstants>TRACE</DefineConstants>\n    <ErrorReport>prompt</ErrorReport>\n    <WarningLevel>4</WarningLevel>\n  </PropertyGroup>\n  <ItemGroup>\n    <Reference Include=\"EntityFramework\">\n      <HintPath>..\\packages\\EntityFramework.6.0.2\\lib\\net45\\EntityFramework.dll</HintPath>\n    </Reference>\n    <Reference Include=\"EntityFramework.SqlServer\">\n      <HintPath>..\\packages\\EntityFramework.6.0.2\\lib\\net45\\EntityFramework.SqlServer.dll</HintPath>\n    </Reference>\n    <Reference Include=\"StructureMap\">\n      <HintPath>..\\packages\\structuremap.2.6.4.1\\lib\\net40\\StructureMap.dll</HintPath>\n    </Reference>\n    <Reference Include=\"System\" />\n    <Reference Include=\"System.ComponentModel.DataAnnotations\" />\n    <Reference Include=\"System.Core\" />\n    <Reference Include=\"System.Xml.Linq\" />\n    <Reference Include=\"System.Data.DataSetExtensions\" />\n    <Reference Include=\"Microsoft.CSharp\" />\n    <Reference Include=\"System.Data\" />\n    <Reference Include=\"System.Xml\" />\n  </ItemGroup>\n  <ItemGroup>\n    <Compile Include=\"Application\\BusinessUseCases\\BidOnAuction.cs\" />\n    <Compile Include=\"Application\\BusinessUseCases\\CreateAuction.cs\" />\n    <Compile Include=\"Application\\BusinessUseCases\\NewAuctionRequest.cs\" />\n    <Compile Include=\"Application\\Queries\\AuctionStatus.cs\" />\n    <Compile Include=\"Application\\Queries\\AuctionStatusQuery.cs\" />\n    <Compile Include=\"Application\\Queries\\BidHistoryQuery.cs\" />\n    <Compile Include=\"Application\\Queries\\BidInformation.cs\" />\n    <Compile Include=\"Bootstrapper.cs\" />\n    <Compile Include=\"Infrastructure\\AuctionRepository.cs\" />\n    <Compile Include=\"Infrastructure\\BidHistoryRepository.cs\" />\n    <Compile Include=\"Infrastructure\\DomainEvents.cs\" />\n    <Compile Include=\"Infrastructure\\DataModel\\AuctionDTO.cs\" />\n    <Compile Include=\"Infrastructure\\AuctionDatabaseContext.cs\" />\n    <Compile Include=\"Infrastructure\\DataModel\\BidDTO.cs\" />\n    <Compile Include=\"Infrastructure\\Entity.cs\" />\n    <Compile Include=\"Infrastructure\\Mapping\\AuctionMap.cs\" />\n    <Compile Include=\"Infrastructure\\Mapping\\BidMap.cs\" />\n    <Compile Include=\"Infrastructure\\ValueObject.cs\" />\n    <Compile Include=\"Model\\Auction\\Auction.cs\" />\n    <Compile Include=\"Model\\Auction\\AuctionSnapshot.cs\" />\n    <Compile Include=\"Model\\Auction\\AutomaticBidder.cs\" />\n    <Compile Include=\"Model\\Auction\\MoneyCannotBeANegativeValueException.cs\" />\n    <Compile Include=\"Model\\Auction\\MoneySnapshot.cs\" />\n    <Compile Include=\"Model\\Auction\\MoreThanTwoDecimalPlacesInMoneyValueException.cs\" />\n    <Compile Include=\"Model\\Auction\\WinningBid.cs\" />\n    <Compile Include=\"Model\\Auction\\BidPlaced.cs\" />\n    <Compile Include=\"Model\\Auction\\WinningBidSnapshot.cs\" />\n    <Compile Include=\"Model\\Auction\\IAuctionRepository.cs\" />\n    <Compile Include=\"Infrastructure\\IClock.cs\" />\n    <Compile Include=\"Model\\Auction\\Money.cs\" />\n    <Compile Include=\"Model\\Auction\\Offer.cs\" />\n    <Compile Include=\"Model\\Auction\\OutBid.cs\" />\n    <Compile Include=\"Model\\Auction\\Price.cs\" />\n    <Compile Include=\"Infrastructure\\SystemClock.cs\" />\n    <Compile Include=\"Model\\BidHistory\\Bid.cs\" />\n    <Compile Include=\"Model\\BidHistory\\BidHistory.cs\" />\n    <Compile Include=\"Model\\BidHistory\\IBidHistoryRepository.cs\" />\n    <Compile Include=\"Properties\\AssemblyInfo.cs\" />\n  </ItemGroup>\n  <ItemGroup>\n    <None Include=\"App.config\" />\n    <None Include=\"packages.config\">\n      <SubType>Designer</SubType>\n    </None>\n  </ItemGroup>\n  <Import Project=\"$(MSBuildToolsPath)\\Microsoft.CSharp.targets\" />\n  <Import Project=\"$(SolutionDir)\\.nuget\\NuGet.targets\" Condition=\"Exists('$(SolutionDir)\\.nuget\\NuGet.targets')\" />\n  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \n       Other similar extension points exist, see Microsoft.Common.targets.\n  <Target Name=\"BeforeBuild\">\n  </Target>\n  <Target Name=\"AfterBuild\">\n  </Target>\n  -->\n</Project>"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.EFExample/DDDPPP.Chap21.EFExample.Application/Infrastructure/AuctionDatabaseContext.cs",
    "content": "using System.Data.Entity;\nusing System.Data.Entity.Infrastructure;\nusing DDDPPP.Chap21.EFExample.Application.Infrastructure.DataModel;\nusing DDDPPP.Chap21.EFExample.Application.Infrastructure.Mapping;\n\nnamespace DDDPPP.Chap21.EFExample.Application.Infrastructure\n{\n    public partial class AuctionDatabaseContext : DbContext\n    {\n        static AuctionDatabaseContext()\n        {\n            Database.SetInitializer<AuctionDatabaseContext>(null);\n        }\n\n        public AuctionDatabaseContext()\n            : base(\"Name=AuctionDatabaseContext\")\n        {\n        }\n\n        public DbSet<AuctionDTO> Auctions { get; set; }\n        public DbSet<BidDTO> Bids { get; set; }\n\n        protected override void OnModelCreating(DbModelBuilder modelBuilder)\n        {\n            modelBuilder.Configurations.Add(new AuctionMap());\n            modelBuilder.Configurations.Add(new BidMap());           \n        }\n\n        public void Clear()\n        {\n            var context = ((IObjectContextAdapter)this).ObjectContext;\n\n            var addedObjects = context\n                             .ObjectStateManager\n                             .GetObjectStateEntries(EntityState.Added);\n\n            foreach (var objectStateEntry in addedObjects)\n            {\n                context.Detach(objectStateEntry.Entity);\n            }\n\n            var modifiedObjects = context\n                             .ObjectStateManager\n                             .GetObjectStateEntries(EntityState.Modified);\n\n            foreach (var objectStateEntry in modifiedObjects)\n            {\n                context.Detach(objectStateEntry.Entity);\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.EFExample/DDDPPP.Chap21.EFExample.Application/Infrastructure/AuctionRepository.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing DDDPPP.Chap21.EFExample.Application.Model.Auction;\nusing DDDPPP.Chap21.EFExample.Application.Application;\nusing DDDPPP.Chap21.EFExample.Application.Infrastructure.DataModel;\n\nnamespace DDDPPP.Chap21.EFExample.Application.Infrastructure\n{\n    public class AuctionRepository : IAuctionRepository\n    {\n        private readonly AuctionDatabaseContext _auctionExampleContext;\n\n        public AuctionRepository(AuctionDatabaseContext auctionExampleContext)\n        {\n            _auctionExampleContext = auctionExampleContext;\n        }\n\n        public void Add(Auction auction)\n        {            \n            var auctionDTO = new AuctionDTO();\n\n            Map(auctionDTO, auction.GetSnapshot());\n            \n            _auctionExampleContext.Auctions.Add(auctionDTO); \n        }\n\n        public void Save(Auction auction)\n        {\n            var auctionDTO = _auctionExampleContext.Auctions.Find(auction.Id);\n\n            Map(auctionDTO, auction.GetSnapshot());                      \n        }\n\n        public Auction FindBy(Guid Id)\n        {\n            var auctionDTO = _auctionExampleContext.Auctions.Find(Id);\n            var auctionSnapshot = new AuctionSnapshot();\n\n            auctionSnapshot.Id = auctionDTO.Id;\n            auctionSnapshot.EndsAt = auctionDTO.AuctionEnds;\n            auctionSnapshot.StartingPrice = auctionDTO.StartingPrice;\n            auctionSnapshot.Version = auctionDTO.Version;\n\n            if (auctionDTO.BidderMemberId.HasValue)\n            {\n                var bidSnapshot = new WinningBidSnapshot();\n\n                bidSnapshot.BiddersMaximumBid = auctionDTO.MaximumBid.Value;\n                bidSnapshot.CurrentPrice = auctionDTO.CurrentPrice.Value;\n                bidSnapshot.BiddersId = auctionDTO.BidderMemberId.Value;\n                bidSnapshot.TimeOfBid = auctionDTO.TimeOfBid.Value;\n                auctionSnapshot.WinningBid = bidSnapshot;\n            }\n           \n            return Auction.CreateFrom(auctionSnapshot);\n        }\n\n        public void Map(AuctionDTO auctionDTO, AuctionSnapshot snapshot)\n        {                        \n            auctionDTO.Id = snapshot.Id;\n            auctionDTO.StartingPrice = snapshot.StartingPrice;\n            auctionDTO.AuctionEnds = snapshot.EndsAt;\n            auctionDTO.Version = snapshot.Version;\n\n            if (snapshot.WinningBid != null)\n            {\n                auctionDTO.BidderMemberId = snapshot.WinningBid.BiddersId;\n                auctionDTO.CurrentPrice = snapshot.WinningBid.CurrentPrice;\n                auctionDTO.MaximumBid = snapshot.WinningBid.BiddersMaximumBid;\n                auctionDTO.TimeOfBid = snapshot.WinningBid.TimeOfBid;\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.EFExample/DDDPPP.Chap21.EFExample.Application/Infrastructure/BidHistoryRepository.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing DDDPPP.Chap21.EFExample.Application.Model.BidHistory;\nusing DDDPPP.Chap21.EFExample.Application.Model.Auction;\nusing DDDPPP.Chap21.EFExample.Application.Infrastructure.DataModel;\n\nnamespace DDDPPP.Chap21.EFExample.Application.Infrastructure\n{\n    public class BidHistoryRepository : IBidHistoryRepository\n    {\n        private readonly AuctionDatabaseContext _auctionExampleContext;\n\n        public BidHistoryRepository(AuctionDatabaseContext auctionExampleContext)\n        {\n            _auctionExampleContext = auctionExampleContext;\n        }\n\n        public int NoOfBidsFor(Guid autionId)\n        {                     \n            return _auctionExampleContext.Bids.Count(x => x.AuctionId == autionId);                                        \n        }\n\n        public void Add(Bid bid)        \n        {\n            var bidDTO = new BidDTO();\n\n            bidDTO.AuctionId = bid.AuctionId;\n            bidDTO.Bid = bid.AmountBid.GetSnapshot().Value;\n            bidDTO.BidderId = bid.Bidder;\n            bidDTO.TimeOfBid = bid.TimeOfBid;\n\n            bidDTO.Id = Guid.NewGuid();\n\n            _auctionExampleContext.Bids.Add(bidDTO); \n        }\n\n        public BidHistory FindBy(Guid auctionId)\n        {\n            var bidDTOs = _auctionExampleContext.Bids.Where<BidDTO>(x => x.AuctionId == auctionId).ToList();\n            var bids = new List<Bid>();\n\n            foreach (var bidDTO in bidDTOs)\n            {\n                bids.Add(new Bid(bidDTO.AuctionId, bidDTO.BidderId, new Money(bidDTO.Bid), bidDTO.TimeOfBid));\n            }\n\n            return new BidHistory(bids);\n        }\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.EFExample/DDDPPP.Chap21.EFExample.Application/Infrastructure/DataModel/AuctionDTO.cs",
    "content": "using System;\nusing System.Collections.Generic;\n\nnamespace DDDPPP.Chap21.EFExample.Application.Infrastructure.DataModel\n{\n    public partial class AuctionDTO\n    {\n        public System.Guid Id { get; set; }\n        public decimal StartingPrice { get; set; }\n        public DateTime AuctionEnds { get; set; }\n\n        public Nullable<System.Guid> BidderMemberId { get; set; }\n        public System.DateTime? TimeOfBid { get; set; }\n        public Nullable<decimal> MaximumBid { get; set; }\n        public Nullable<decimal> CurrentPrice { get; set; }\n\n        public int Version { get; set; }\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.EFExample/DDDPPP.Chap21.EFExample.Application/Infrastructure/DataModel/BidDTO.cs",
    "content": "using System;\nusing System.Collections.Generic;\n\nnamespace DDDPPP.Chap21.EFExample.Application.Infrastructure.DataModel\n{\n    public partial class BidDTO\n    {\n        public System.Guid Id { get; set; }\n        public System.Guid AuctionId { get; set; }\n        public System.Guid BidderId { get; set; }\n        public decimal Bid { get; set; }\n        public System.DateTime TimeOfBid { get; set; }\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.EFExample/DDDPPP.Chap21.EFExample.Application/Infrastructure/DomainEvents.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace DDDPPP.Chap21.EFExample.Application.Infrastructure\n{\n    /// <summary>\n    /// Domain Events class from http://www.udidahan.com/2008/08/25/domain-events-take-2/\n    /// </summary>\n    public static class DomainEvents\n    {\n        [ThreadStatic]\n        private static List<Delegate> _actions;\n        private static List<Delegate> Actions\n        {\n            get\n            {\n                if (_actions == null)\n                {\n                    _actions = new List<Delegate>();\n                }\n                return _actions;\n            }\n        }\n       \n        public static IDisposable Register<T>(Action<T> callback)\n        {           \n            Actions.Add(callback);\n\n            return new DomainEventRegistrationRemover(() => Actions.Remove(callback));\n        }\n\n        public static void Raise<T>(T eventArgs)\n        {\n            foreach (Delegate action in Actions)\n            {\n                Action<T> typedAction = action as Action<T>;\n                if (typedAction != null)\n                {\n                    typedAction(eventArgs);\n                }\n            }\n        }\n     \n        private sealed class DomainEventRegistrationRemover : IDisposable\n        {\n            private readonly Action _callOnDispose;\n\n            public DomainEventRegistrationRemover(Action toCall)\n            {\n                _callOnDispose = toCall;\n            }\n\n            public void Dispose()\n            {\n                _callOnDispose();\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.EFExample/DDDPPP.Chap21.EFExample.Application/Infrastructure/Entity.cs",
    "content": "﻿using System;\n\nnamespace DDDPPP.Chap21.EFExample.Application.Infrastructure\n{\n    public abstract class Entity<TId>\n    {\n        public TId Id { get; protected set; }\n        public int Version { get; protected set; }\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.EFExample/DDDPPP.Chap21.EFExample.Application/Infrastructure/IClock.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace DDDPPP.Chap21.EFExample.Application.Infrastructure\n{\n    public interface IClock\n    {\n        DateTime Time();\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.EFExample/DDDPPP.Chap21.EFExample.Application/Infrastructure/Mapping/AuctionMap.cs",
    "content": "using System.ComponentModel.DataAnnotations.Schema;\nusing System.Data.Entity.ModelConfiguration;\nusing DDDPPP.Chap21.EFExample.Application.Infrastructure.DataModel;\n\nnamespace DDDPPP.Chap21.EFExample.Application.Infrastructure.Mapping\n{\n    public class AuctionMap : EntityTypeConfiguration<AuctionDTO>\n    {\n        public AuctionMap()\n        {\n            // Primary Key\n            this.HasKey(t => t.Id);\n\n            // Properties\n            // Table & Column Mappings\n            this.ToTable(\"Auctions\");\n            this.Property(t => t.Id).HasColumnName(\"Id\");\n            this.Property(t => t.StartingPrice).HasColumnName(\"StartingPrice\");\n            this.Property(t => t.BidderMemberId).HasColumnName(\"BidderMemberId\");\n            this.Property(t => t.TimeOfBid).HasColumnName(\"TimeOfBid\");\n            this.Property(t => t.MaximumBid).HasColumnName(\"MaximumBid\");\n            this.Property(t => t.CurrentPrice).HasColumnName(\"CurrentPrice\");\n            this.Property(t => t.AuctionEnds).HasColumnName(\"AuctionEnds\");\n            this.Property(t => t.Version).HasColumnName(\"Version\").IsConcurrencyToken();\n        }\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.EFExample/DDDPPP.Chap21.EFExample.Application/Infrastructure/Mapping/BidMap.cs",
    "content": "using System.ComponentModel.DataAnnotations.Schema;\nusing System.Data.Entity.ModelConfiguration;\nusing DDDPPP.Chap21.EFExample.Application.Infrastructure.DataModel;\n\nnamespace DDDPPP.Chap21.EFExample.Application.Infrastructure.Mapping\n{\n    public class BidMap : EntityTypeConfiguration<BidDTO>\n    {\n        public BidMap()\n        {\n            // Primary Key\n            this.HasKey(t => t.Id);\n\n            // Properties\n            // Table & Column Mappings\n            this.ToTable(\"BidHistory\");\n            this.Property(t => t.Id).HasColumnName(\"Id\");\n            this.Property(t => t.AuctionId).HasColumnName(\"AuctionId\");\n            this.Property(t => t.BidderId).HasColumnName(\"BidderId\");\n            this.Property(t => t.Bid).HasColumnName(\"Bid\");\n            this.Property(t => t.TimeOfBid).HasColumnName(\"TimeOfBid\");\n        }\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.EFExample/DDDPPP.Chap21.EFExample.Application/Infrastructure/SystemClock.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace DDDPPP.Chap21.EFExample.Application.Infrastructure\n{\n    public class SystemClock : IClock\n    {\n        public DateTime Time()\n        {\n            return DateTime.Now;\n        }\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.EFExample/DDDPPP.Chap21.EFExample.Application/Infrastructure/ValueObject.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\n\nnamespace DDDPPP.Chap21.EFExample.Application.Infrastructure\n{\n    public abstract class ValueObject<T> where T : ValueObject<T>\n    {\n        protected abstract IEnumerable<object> GetAttributesToIncludeInEqualityCheck();\n\n        public override bool Equals(object other)\n        {\n            return Equals(other as T);\n        }\n\n        public bool Equals(T other)\n        {\n            if (other == null)\n            {\n                return false;\n            }\n            return GetAttributesToIncludeInEqualityCheck().SequenceEqual(other.GetAttributesToIncludeInEqualityCheck());\n        }\n\n        public static bool operator ==(ValueObject<T> left, ValueObject<T> right)\n        {\n            return Equals(left, right);\n        }\n\n        public static bool operator !=(ValueObject<T> left, ValueObject<T> right)\n        {\n            return !(left == right);\n        }\n\n        public override int GetHashCode()\n        {\n            int hash = 17;\n            foreach (var obj in this.GetAttributesToIncludeInEqualityCheck())\n                hash = hash * 31 + (obj == null ? 0 : obj.GetHashCode());\n\n            return hash;\n        }\n    }\n}\n\n\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.EFExample/DDDPPP.Chap21.EFExample.Application/Model/Auction/Auction.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\nusing DDDPPP.Chap21.EFExample.Application.Infrastructure;\n\nnamespace DDDPPP.Chap21.EFExample.Application.Model.Auction\n{\n    public class Auction : Entity<Guid>\n    {        \n        public Auction(Guid id, Money startingPrice, DateTime endsAt)\n        {\n            if (id == Guid.Empty)\n                throw new ArgumentNullException(\"Auction Id cannot be null\");\n\n            if (startingPrice == null)\n                throw new ArgumentNullException(\"Starting Price cannot be null\");\n\n            if (endsAt == DateTime.MinValue)\n                throw new ArgumentNullException(\"EndsAt must have a value\");\n\n            Id = id;\n            StartingPrice = startingPrice;\n            EndsAt = endsAt;\n        }\n\n        private Auction(AuctionSnapshot snapshot)\n        {\n            this.Id = snapshot.Id;\n            this.StartingPrice = new Money(snapshot.StartingPrice);\n            this.EndsAt = snapshot.EndsAt;\n            this.Version = snapshot.Version;\n\n            if (snapshot.WinningBid != null)                          \n                CurrentWinningBid = WinningBid.CreateFrom(snapshot.WinningBid);            \n        }\n\n        public static Auction CreateFrom(AuctionSnapshot snapshot)\n        {\n            return new Auction(snapshot);\n        }\n\n        private Money StartingPrice { get; set; }\n        private WinningBid CurrentWinningBid { get; set; }\n        private DateTime EndsAt { get; set; }\n\n        public AuctionSnapshot GetSnapshot()\n        {\n            var snapshot = new AuctionSnapshot();\n            snapshot.Id = this.Id;\n            snapshot.StartingPrice = this.StartingPrice.GetSnapshot().Value;\n            snapshot.EndsAt = this.EndsAt;\n            snapshot.Version = this.Version;\n\n            if (HasACurrentBid())\n                snapshot.WinningBid = CurrentWinningBid.GetSnapshot();            \n\n            return snapshot;\n        }\n\n        private bool HasACurrentBid()\n        {\n            return CurrentWinningBid != null;\n        }\n\n        private bool StillInProgress(DateTime currentTime)\n        {\n            return (EndsAt > currentTime);\n        }\n\n        public void PlaceBidFor(Offer offer, DateTime currentTime)\n        {\n            if (StillInProgress(currentTime))\n            {\n                if (FirstOffer())\n                    PlaceABidForTheFirst(offer);\n                else if (BidderIsIncreasingMaximumBidToNew(offer))\n                    CurrentWinningBid = CurrentWinningBid.RaiseMaximumBidTo(offer.MaximumBid);\n                else if (CurrentWinningBid.CanBeExceededBy(offer.MaximumBid))\n                {\n                    var newBids = new AutomaticBidder().GenerateNextSequenceOfBidsAfter(offer, CurrentWinningBid);\n\n                    foreach (var bid in newBids)\n                        Place(bid);\n                }\n            }\n        }\n\n        private bool BidderIsIncreasingMaximumBidToNew(Offer offer)\n        {\n            return CurrentWinningBid.WasMadeBy(offer.Bidder) && offer.MaximumBid.IsGreaterThan(CurrentWinningBid.MaximumBid);\n        }\n\n        private bool FirstOffer()\n        {\n            return CurrentWinningBid == null;\n        }\n\n        private void PlaceABidForTheFirst(Offer offer)\n        {\n            if (offer.MaximumBid.IsGreaterThanOrEqualTo(StartingPrice))\n                Place(new WinningBid(offer.Bidder, offer.MaximumBid, StartingPrice, offer.TimeOfOffer));\n        }\n\n        private void Place(WinningBid newBid)\n        {\n            if (!FirstOffer() && CurrentWinningBid.WasMadeBy(newBid.Bidder))\n                DomainEvents.Raise(new OutBid(Id, CurrentWinningBid.Bidder));\n\n            CurrentWinningBid = newBid;\n            DomainEvents.Raise(new BidPlaced(Id, newBid.Bidder, newBid.CurrentAuctionPrice.Amount, newBid.TimeOfBid));\n        }\n    }\n\n\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.EFExample/DDDPPP.Chap21.EFExample.Application/Model/Auction/AuctionSnapshot.cs",
    "content": "﻿using System;\n\nnamespace DDDPPP.Chap21.EFExample.Application.Model.Auction\n{\n    public class AuctionSnapshot\n    {\n        public Guid Id { get; set; }\n        public decimal StartingPrice { get; set; }\n        public DateTime EndsAt { get; set; }\n        public WinningBidSnapshot WinningBid { get; set; }\n        public int Version { get; set; }\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.EFExample/DDDPPP.Chap21.EFExample.Application/Model/Auction/AutomaticBidder.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace DDDPPP.Chap21.EFExample.Application.Model.Auction\n{\n    public class AutomaticBidder\n    {\n        public IEnumerable<WinningBid> GenerateNextSequenceOfBidsAfter(Offer offer, WinningBid currentWinningBid)\n        {\n            var bids = new List<WinningBid>();\n\n            if (currentWinningBid.MaximumBid.IsGreaterThanOrEqualTo(offer.MaximumBid))\n            {\n                var bidFromOffer = new WinningBid(offer.Bidder, offer.MaximumBid, offer.MaximumBid, offer.TimeOfOffer);\n                bids.Add(bidFromOffer);\n\n                bids.Add(CalculateNextBid(bidFromOffer, new Offer(currentWinningBid.Bidder, currentWinningBid.MaximumBid, currentWinningBid.TimeOfBid)));\n            }\n            else\n            {\n                if (currentWinningBid.HasNotReachedMaximumBid())\n                {\n                    var currentBiddersLastBid = new WinningBid(currentWinningBid.Bidder, currentWinningBid.MaximumBid, currentWinningBid.MaximumBid, currentWinningBid.TimeOfBid);\n                    bids.Add(currentBiddersLastBid);\n\n                    bids.Add(CalculateNextBid(currentBiddersLastBid, offer));\n                }\n                else\n                    bids.Add(new WinningBid(offer.Bidder, currentWinningBid.CurrentAuctionPrice.BidIncrement(), offer.MaximumBid, offer.TimeOfOffer));\n            }\n\n            return bids;\n        }\n\n        private WinningBid CalculateNextBid(WinningBid winningbid, Offer offer)\n        {\n            WinningBid bid;\n\n            if (winningbid.CanBeExceededBy(offer.MaximumBid))\n                bid = new WinningBid(offer.Bidder, offer.MaximumBid, winningbid.CurrentAuctionPrice.BidIncrement(), offer.TimeOfOffer);\n            else\n                bid = new WinningBid(offer.Bidder, offer.MaximumBid, offer.MaximumBid, offer.TimeOfOffer);\n\n            return bid;\n        }   \n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.EFExample/DDDPPP.Chap21.EFExample.Application/Model/Auction/BidPlaced.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\n\nnamespace DDDPPP.Chap21.EFExample.Application.Model.Auction\n{\n    public class BidPlaced\n    {\n        public BidPlaced(Guid auctionId, Guid bidderId, Money amountBid, DateTime timeOfBid)\n        {\n            if (auctionId == Guid.Empty)\n                throw new ArgumentNullException(\"Auction Id cannot be null\");\n\n            if (bidderId == Guid.Empty)\n                throw new ArgumentNullException(\"Bidder Id cannot be null\");\n\n            if (amountBid == null)\n                throw new ArgumentNullException(\"AmountBid cannot be null\");\n\n            if (timeOfBid == DateTime.MinValue)\n                throw new ArgumentNullException(\"TimeOfBid must have a value\");\n\n            AuctionId = auctionId;\n            Bidder = bidderId;\n            AmountBid = amountBid;\n            TimeOfBid = timeOfBid;\n        }\n\n        public Guid AuctionId { get; private set; }\n        public Guid Bidder { get; private set; }\n        public Money AmountBid { get; private set; }\n        public DateTime TimeOfBid { get; private set; }\n        \n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.EFExample/DDDPPP.Chap21.EFExample.Application/Model/Auction/IAuctionRepository.cs",
    "content": "﻿using System;\nusing DDDPPP.Chap21.EFExample.Application.Application;\n\nnamespace DDDPPP.Chap21.EFExample.Application.Model.Auction\n{\n    public interface IAuctionRepository\n    {\n        void Add(Auction auction);\n        void Save(Auction auction);\n        Auction FindBy(Guid Id);\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.EFExample/DDDPPP.Chap21.EFExample.Application/Model/Auction/Money.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing DDDPPP.Chap21.EFExample.Application.Infrastructure;\n\nnamespace DDDPPP.Chap21.EFExample.Application.Model.Auction\n{\n    public class Money : ValueObject<Money>, IComparable<Money>\n    {\n        protected decimal Value { get; set; }\n\n        public Money()\n            : this(0m)\n        {\n        }\n\n        public Money(decimal value)\n        {\n            ThrowExceptionIfNotValid(value);\n\n            Value = value;\n        }\n\n        private void ThrowExceptionIfNotValid(decimal value)\n        {\n            if (value % 0.01m != 0)\n                throw new MoreThanTwoDecimalPlacesInMoneyValueException();\n\n            if (value < 0)\n                throw new MoneyCannotBeANegativeValueException();\n        }\n\n        public Money Add(Money money)\n        {\n            return new Money(Value + money.Value);\n        }\n\n        public bool IsGreaterThan(Money money)\n        {\n            return this.Value > money.Value;\n        }\n\n        public bool IsGreaterThanOrEqualTo(Money money)\n        {\n            return this.Value > money.Value || this.Equals(money);\n        }\n\n        public bool IsLessThanOrEqualTo(Money money)\n        {\n            return this.Value < money.Value || this.Equals(money);\n        }\n\n        public override string ToString()\n        {\n            return string.Format(\"{0}\", Value);\n        }\n\n        public MoneySnapshot GetSnapshot()\n        {\n            return new MoneySnapshot() { Value = this.Value };\n        }\n\n        protected override IEnumerable<object> GetAttributesToIncludeInEqualityCheck()\n        {\n            return new List<Object>() { Value };\n        }\n\n        public int CompareTo(Money other)\n        {\n            return this.Value.CompareTo(other.Value);\n        }\n    }\n}"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.EFExample/DDDPPP.Chap21.EFExample.Application/Model/Auction/MoneyCannotBeANegativeValueException.cs",
    "content": "﻿using System;\n\nnamespace DDDPPP.Chap21.EFExample.Application.Model.Auction\n{\n    public class MoneyCannotBeANegativeValueException : Exception\n    {\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.EFExample/DDDPPP.Chap21.EFExample.Application/Model/Auction/MoneySnapshot.cs",
    "content": "﻿using System;\n\nnamespace DDDPPP.Chap21.EFExample.Application.Model.Auction\n{\n    public class MoneySnapshot\n    {\n        public decimal Value { get; set; }\n    }\n}"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.EFExample/DDDPPP.Chap21.EFExample.Application/Model/Auction/MoreThanTwoDecimalPlacesInMoneyValueException.cs",
    "content": "﻿using System;\n\nnamespace DDDPPP.Chap21.EFExample.Application.Model.Auction\n{\n    public class MoreThanTwoDecimalPlacesInMoneyValueException : Exception\n    {\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.EFExample/DDDPPP.Chap21.EFExample.Application/Model/Auction/Offer.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing DDDPPP.Chap21.EFExample.Application.Infrastructure;\n\nnamespace DDDPPP.Chap21.EFExample.Application.Model.Auction\n{\n    public class Offer : ValueObject<Offer>\n    {\n        public Offer(Guid bidderId, Money maximumBid, DateTime timeOfOffer)\n        {\n            if (bidderId == Guid.Empty)\n                throw new ArgumentNullException(\"BidderId cannot be null\");\n\n            if (maximumBid == null)\n                throw new ArgumentNullException(\"MaximumBid cannot be null\");\n\n            if (timeOfOffer == DateTime.MinValue)\n                throw new ArgumentNullException(\"Time of Offer must have a value\");\n\n            Bidder = bidderId;\n            MaximumBid = maximumBid;\n            TimeOfOffer = timeOfOffer;\n        }\n\n        public Guid Bidder { get; private set; }\n        public Money MaximumBid { get; private set; }\n        public DateTime TimeOfOffer { get; private set; }\n\n        protected override IEnumerable<object> GetAttributesToIncludeInEqualityCheck()\n        {\n            return new List<Object>()\n            {\n                Bidder, MaximumBid, TimeOfOffer\n            };\n        }\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.EFExample/DDDPPP.Chap21.EFExample.Application/Model/Auction/OutBid.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace DDDPPP.Chap21.EFExample.Application.Model.Auction\n{\n    public class OutBid\n    {\n        public OutBid(Guid auctionId, Guid bidderId)\n        {\n            if (auctionId == Guid.Empty)\n                throw new ArgumentNullException(\"Auction Id cannot be null\");\n\n            if (bidderId == Guid.Empty)\n                throw new ArgumentNullException(\"Bidder Id cannot be null\");\n\n            AuctionId = auctionId;\n            Bidder = bidderId;\n        }\n\n        public Guid AuctionId { get; private set; }\n        public Guid Bidder { get; private set; }\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.EFExample/DDDPPP.Chap21.EFExample.Application/Model/Auction/Price.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing DDDPPP.Chap21.EFExample.Application.Infrastructure;\n\nnamespace DDDPPP.Chap21.EFExample.Application.Model.Auction\n{\n    public class Price : ValueObject<Price>\n    {\n        private Price()\n        { }\n\n        public Price(Money amount)\n        {\n            if (amount == null)\n                throw new ArgumentNullException(\"Amount cannot be null\");\n\n            Amount = amount;\n        }\n\n        public Money Amount { get; private set; }\n\n        public Money BidIncrement()\n        {\n            if (Amount.IsGreaterThanOrEqualTo(new Money(0.01m)) && Amount.IsLessThanOrEqualTo(new Money(0.99m)))\n                return Amount.Add(new Money(0.05m));\n\n            if (Amount.IsGreaterThanOrEqualTo(new Money(1.00m)) && Amount.IsLessThanOrEqualTo(new Money(4.99m)))\n                return Amount.Add(new Money(0.20m));\n\n            if (Amount.IsGreaterThanOrEqualTo(new Money(5.00m)) && Amount.IsLessThanOrEqualTo(new Money(14.99m)))\n                return Amount.Add(new Money(0.50m));\n\n            return Amount.Add(new Money(1.00m));\n\n        }\n\n        public bool CanBeExceededBy(Money offer)\n        {\n            return offer.IsGreaterThanOrEqualTo(BidIncrement());\n        }\n\n        protected override IEnumerable<object> GetAttributesToIncludeInEqualityCheck()\n        {\n            return new List<Object>() { Amount };\n        }\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.EFExample/DDDPPP.Chap21.EFExample.Application/Model/Auction/WinningBid.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing DDDPPP.Chap21.EFExample.Application.Infrastructure;\n\nnamespace DDDPPP.Chap21.EFExample.Application.Model.Auction\n{\n    public class WinningBid : ValueObject<WinningBid>\n    {\n        private WinningBid() { }\n\n        public WinningBid(Guid bidder, Money maximumBid, Money bid, DateTime timeOfBid)\n        {\n            if (bidder == Guid.Empty)\n                throw new ArgumentNullException(\"Bidder cannot be null\");\n\n            if (maximumBid == null)\n                throw new ArgumentNullException(\"MaximumBid cannot be null\");\n\n            if (timeOfBid == DateTime.MinValue)\n                throw new ArgumentNullException(\"TimeOfBid must have a value\");\n\n\n            Bidder = bidder;\n            MaximumBid = maximumBid;\n            TimeOfBid = timeOfBid;\n            CurrentAuctionPrice = new Price(bid);\n        }\n        \n        public Guid Bidder { get; private set; }\n        public Money MaximumBid { get; private set; }\n        public DateTime TimeOfBid { get; private set; }\n        public Price CurrentAuctionPrice { get; private set; }\n\n        public WinningBid RaiseMaximumBidTo(Money newAmount)\n        {\n            if (newAmount.IsGreaterThan(MaximumBid))\n                return new WinningBid(Bidder, newAmount, CurrentAuctionPrice.Amount, DateTime.Now);\n            else\n                throw new ApplicationException(\"Maximum bid increase must be larger than current maximum bid.\");\n        }\n\n        public bool WasMadeBy(Guid bidder)\n        {\n            return Bidder.Equals(bidder);\n        }\n\n        public bool CanBeExceededBy(Money offer)\n        {\n            return CurrentAuctionPrice.CanBeExceededBy(offer);\n        }\n\n        public bool HasNotReachedMaximumBid()\n        {\n            return MaximumBid.IsGreaterThan(CurrentAuctionPrice.Amount);\n        }\n\n        public WinningBidSnapshot GetSnapshot()\n        {\n            var snapshot = new WinningBidSnapshot();\n\n            snapshot.BiddersId = this.Bidder;\n            snapshot.BiddersMaximumBid = this.MaximumBid.GetSnapshot().Value;\n            snapshot.CurrentPrice = this.CurrentAuctionPrice.Amount.GetSnapshot().Value;\n            snapshot.TimeOfBid = this.TimeOfBid;\n\n            return snapshot;\n        }\n\n        public static WinningBid CreateFrom(WinningBidSnapshot bidSnapShot)\n        {\n            return new WinningBid(bidSnapShot.BiddersId, new Money(bidSnapShot.BiddersMaximumBid), new Money(bidSnapShot.CurrentPrice), bidSnapShot.TimeOfBid);\n        }\n\n        protected override IEnumerable<object> GetAttributesToIncludeInEqualityCheck()\n        {\n            return new List<Object>() { Bidder, MaximumBid, TimeOfBid, CurrentAuctionPrice };\n        }\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.EFExample/DDDPPP.Chap21.EFExample.Application/Model/Auction/WinningBidSnapshot.cs",
    "content": "﻿using System;\n\nnamespace DDDPPP.Chap21.EFExample.Application.Model.Auction\n{\n    public class WinningBidSnapshot\n    {\n        public Guid BiddersId { get; set; }\n        public DateTime TimeOfBid { get; set; }\n        public decimal BiddersMaximumBid { get; set; }\n        public decimal CurrentPrice { get; set; }\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.EFExample/DDDPPP.Chap21.EFExample.Application/Model/BidHistory/Bid.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\nusing DDDPPP.Chap21.EFExample.Application.Model.Auction;\nusing DDDPPP.Chap21.EFExample.Application.Infrastructure;\n\nnamespace DDDPPP.Chap21.EFExample.Application.Model.BidHistory\n{\n    public class Bid : ValueObject<Bid>\n    {\n        public Bid(Guid auctionId, Guid bidderId, Money amountBid, DateTime timeOfBid)\n        {\n            if (auctionId == Guid.Empty)\n                throw new ArgumentNullException(\"Auction Id cannot be null\");\n\n            if (bidderId == Guid.Empty)\n                throw new ArgumentNullException(\"Bidder Id cannot be null\");\n\n            if (amountBid == null)\n                throw new ArgumentNullException(\"AmountBid cannot be null\");\n\n            if (timeOfBid == DateTime.MinValue)\n                throw new ArgumentNullException(\"TimeOfBid must have a value\");\n\n            AuctionId = auctionId;\n            Bidder = bidderId;\n            AmountBid = amountBid;\n            TimeOfBid = timeOfBid;\n        }\n\n        public Guid AuctionId { get; private set; }\n        public Guid Bidder { get; private set; }\n        public Money AmountBid { get; private set; }\n        public DateTime TimeOfBid { get; private set; }\n\n        protected override IEnumerable<object> GetAttributesToIncludeInEqualityCheck()\n        {\n            return new List<Object>() { Bidder, AuctionId, TimeOfBid, AmountBid };\n        }\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.EFExample/DDDPPP.Chap21.EFExample.Application/Model/BidHistory/BidHistory.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\n\nnamespace DDDPPP.Chap21.EFExample.Application.Model.BidHistory\n{\n    public class BidHistory\n    {\n        private IEnumerable<Bid> _bids;\n\n        public BidHistory(IEnumerable<Bid> bids)\n        {\n            if (bids == null)\n                throw new ArgumentNullException(\"Bids cannot be null\");\n\n            _bids = bids;\n        }\n\n        public IEnumerable<Bid> ShowAllBids()\n        {\n            var bids = _bids.OrderByDescending(x => x.AmountBid).ThenBy(x => x.TimeOfBid);\n\n            return bids;\n        }\n    }\n}"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.EFExample/DDDPPP.Chap21.EFExample.Application/Model/BidHistory/IBidHistoryRepository.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace DDDPPP.Chap21.EFExample.Application.Model.BidHistory\n{\n    public interface IBidHistoryRepository\n    {\n        int NoOfBidsFor(Guid autionId);\n        void Add(Bid bid);\n        BidHistory FindBy(Guid auctionId);\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.EFExample/DDDPPP.Chap21.EFExample.Application/Properties/AssemblyInfo.cs",
    "content": "﻿using System.Reflection;\nusing System.Runtime.CompilerServices;\nusing System.Runtime.InteropServices;\n\n// General Information about an assembly is controlled through the following \n// set of attributes. Change these attribute values to modify the information\n// associated with an assembly.\n[assembly: AssemblyTitle(\"DDDPPP.Chap21.EFExample.Application\")]\n[assembly: AssemblyDescription(\"\")]\n[assembly: AssemblyConfiguration(\"\")]\n[assembly: AssemblyCompany(\"\")]\n[assembly: AssemblyProduct(\"DDDPPP.Chap21.EFExample.Application\")]\n[assembly: AssemblyCopyright(\"Copyright ©  2013\")]\n[assembly: AssemblyTrademark(\"\")]\n[assembly: AssemblyCulture(\"\")]\n\n// Setting ComVisible to false makes the types in this assembly not visible \n// to COM components.  If you need to access a type in this assembly from \n// COM, set the ComVisible attribute to true on that type.\n[assembly: ComVisible(false)]\n\n// The following GUID is for the ID of the typelib if this project is exposed to COM\n[assembly: Guid(\"b480239b-62a9-4cfb-8e92-f2642429e39a\")]\n\n// Version information for an assembly consists of the following four values:\n//\n//      Major Version\n//      Minor Version \n//      Build Number\n//      Revision\n//\n// You can specify all the values or you can default the Build and Revision Numbers \n// by using the '*' as shown below:\n// [assembly: AssemblyVersion(\"1.0.*\")]\n[assembly: AssemblyVersion(\"1.0.0.0\")]\n[assembly: AssemblyFileVersion(\"1.0.0.0\")]\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.EFExample/DDDPPP.Chap21.EFExample.Application/packages.config",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<packages>\n  <package id=\"EntityFramework\" version=\"6.0.2\" targetFramework=\"net45\" />\n  <package id=\"structuremap\" version=\"2.6.4.1\" targetFramework=\"net45\" />\n</packages>"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.EFExample/DDDPPP.Chap21.EFExample.Presentation/App.config",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<configuration>\n  <configSections>\n    <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->\n    <section name=\"entityFramework\" type=\"System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\" requirePermission=\"false\" />\n  <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 --></configSections>\n  <connectionStrings>\n    <add name=\"AuctionDatabaseContext\" connectionString=\"Data Source=.\\sqlexpress;Initial Catalog=AuctionExample;Integrated Security=True;MultipleActiveResultSets=True\" providerName=\"System.Data.SqlClient\" />\n  </connectionStrings>\n  <entityFramework>\n    <defaultConnectionFactory type=\"System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework\" />\n    <providers>\n      <provider invariantName=\"System.Data.SqlClient\" type=\"System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer\" />\n    </providers>\n  </entityFramework>\n    <startup> \n        <supportedRuntime version=\"v4.0\" sku=\".NETFramework,Version=v4.5\" />\n    </startup>\n</configuration>"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.EFExample/DDDPPP.Chap21.EFExample.Presentation/DDDPPP.Chap21.EFExample.Presentation.csproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"4.0\" DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <Import Project=\"$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props\" Condition=\"Exists('$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props')\" />\n  <PropertyGroup>\n    <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>\n    <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>\n    <ProjectGuid>{65DC6820-684F-462B-A20D-314CE3E47C5F}</ProjectGuid>\n    <OutputType>Exe</OutputType>\n    <AppDesignerFolder>Properties</AppDesignerFolder>\n    <RootNamespace>DDDPPP.Chap21.EFExample.Presentation</RootNamespace>\n    <AssemblyName>DDDPPP.Chap21.EFExample.Presentation</AssemblyName>\n    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\n    <FileAlignment>512</FileAlignment>\n    <SolutionDir Condition=\"$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'\">..\\</SolutionDir>\n    <RestorePackages>true</RestorePackages>\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' \">\n    <PlatformTarget>AnyCPU</PlatformTarget>\n    <DebugSymbols>true</DebugSymbols>\n    <DebugType>full</DebugType>\n    <Optimize>false</Optimize>\n    <OutputPath>bin\\Debug\\</OutputPath>\n    <DefineConstants>DEBUG;TRACE</DefineConstants>\n    <ErrorReport>prompt</ErrorReport>\n    <WarningLevel>4</WarningLevel>\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' \">\n    <PlatformTarget>AnyCPU</PlatformTarget>\n    <DebugType>pdbonly</DebugType>\n    <Optimize>true</Optimize>\n    <OutputPath>bin\\Release\\</OutputPath>\n    <DefineConstants>TRACE</DefineConstants>\n    <ErrorReport>prompt</ErrorReport>\n    <WarningLevel>4</WarningLevel>\n  </PropertyGroup>\n  <ItemGroup>\n    <Reference Include=\"EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL\">\n      <SpecificVersion>False</SpecificVersion>\n      <HintPath>..\\packages\\EntityFramework.6.0.2\\lib\\net45\\EntityFramework.dll</HintPath>\n    </Reference>\n    <Reference Include=\"EntityFramework.SqlServer\">\n      <HintPath>..\\packages\\EntityFramework.6.0.2\\lib\\net45\\EntityFramework.SqlServer.dll</HintPath>\n    </Reference>\n    <Reference Include=\"StructureMap\">\n      <HintPath>..\\packages\\structuremap.2.6.4.1\\lib\\net40\\StructureMap.dll</HintPath>\n    </Reference>\n    <Reference Include=\"System\" />\n    <Reference Include=\"System.ComponentModel.DataAnnotations\" />\n    <Reference Include=\"System.Core\" />\n    <Reference Include=\"System.Xml.Linq\" />\n    <Reference Include=\"System.Data.DataSetExtensions\" />\n    <Reference Include=\"Microsoft.CSharp\" />\n    <Reference Include=\"System.Data\" />\n    <Reference Include=\"System.Xml\" />\n  </ItemGroup>\n  <ItemGroup>\n    <Compile Include=\"Program.cs\" />\n    <Compile Include=\"Properties\\AssemblyInfo.cs\" />\n  </ItemGroup>\n  <ItemGroup>\n    <None Include=\"App.config\" />\n    <None Include=\"packages.config\" />\n  </ItemGroup>\n  <ItemGroup>\n    <ProjectReference Include=\"..\\DDDPPP.Chap21.EFExample.Application\\DDDPPP.Chap21.EFExample.Application.csproj\">\n      <Project>{bd4e953f-603b-4f99-9d6d-687643859354}</Project>\n      <Name>DDDPPP.Chap21.EFExample.Application</Name>\n    </ProjectReference>\n  </ItemGroup>\n  <Import Project=\"$(MSBuildToolsPath)\\Microsoft.CSharp.targets\" />\n  <Import Project=\"$(SolutionDir)\\.nuget\\NuGet.targets\" Condition=\"Exists('$(SolutionDir)\\.nuget\\NuGet.targets')\" />\n  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \n       Other similar extension points exist, see Microsoft.Common.targets.\n  <Target Name=\"BeforeBuild\">\n  </Target>\n  <Target Name=\"AfterBuild\">\n  </Target>\n  -->\n</Project>"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.EFExample/DDDPPP.Chap21.EFExample.Presentation/Program.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\nusing DDDPPP.Chap21.EFExample.Application;\nusing DDDPPP.Chap21.EFExample.Application.Application.BusinessUseCases;\nusing DDDPPP.Chap21.EFExample.Application.Application.Queries;\nusing StructureMap;\n\nnamespace DDDPPP.Chap21.EFExample.Presentation\n{\n    public class Program\n    {\n        private static Dictionary<Guid, String> members = new Dictionary<Guid, string>();\n\n        public static void Main(string[] args)\n        {\n            Bootstrapper.Startup();\n\n            var memberIdA = Guid.NewGuid();\n            var memberIdB = Guid.NewGuid();\n\n            members.Add(memberIdA, \"Ted\");\n            members.Add(memberIdB, \"Rob\");\n\n            var auctionId = CreateAution();\n\n            Bid(auctionId, memberIdA, 10m);\n            Bid(auctionId, memberIdB, 1.49m);\n            Bid(auctionId, memberIdB, 10.01m);\n            Bid(auctionId, memberIdB, 12.00m);\n            Bid(auctionId, memberIdA, 12.00m);\n        }\n\n        public static Guid CreateAution()\n        {\n            var createAuctionService = ObjectFactory.GetInstance<CreateAuction>();\n\n            var newAuctionRequest = new NewAuctionRequest();\n\n            newAuctionRequest.StartingPrice = 0.99m;\n            newAuctionRequest.EndsAt = DateTime.Now.AddDays(1);\n\n            var auctionId = createAuctionService.Create(newAuctionRequest);\n\n            return auctionId;\n        }\n\n        public static void Bid(Guid auctionId, Guid memberId, decimal amount)\n        {\n            var bidOnAuctionService = ObjectFactory.GetInstance<BidOnAuction>();\n\n            bidOnAuctionService.Bid(auctionId, memberId, amount);\n\n            PrintStatusOfAuctionBy(auctionId);\n            PrintBidHistoryOf(auctionId);\n            Console.WriteLine(\"Hit any key to continue\");\n            Console.ReadLine();\n        }\n\n        public static void PrintStatusOfAuctionBy(Guid auctionId)\n        {\n            var auctionSummaryQuery = ObjectFactory.GetInstance<AuctionStatusQuery>();\n            var status = auctionSummaryQuery.AuctionStatus(auctionId);\n\n            Console.WriteLine(\"No Of Bids: \" + status.NumberOfBids);\n            Console.WriteLine(\"Current Bid: \" + status.CurrentPrice.ToString(\"##.##\"));\n            Console.WriteLine(\"Winning Bidder: \" + FindNameOfBidderWith(status.WinningBidderId));\n            Console.WriteLine(\"Time Remaining: \" + status.TimeRemaining);\n            Console.WriteLine();\n        }\n\n        public static void PrintBidHistoryOf(Guid auctionId)\n        {\n            var bidHistoryQuery = ObjectFactory.GetInstance<BidHistoryQuery>();\n            var status = bidHistoryQuery.BidHistoryFor(auctionId);\n\n            Console.WriteLine(\"Bids..\");\n\n            foreach (var bid in status)\n                Console.WriteLine(FindNameOfBidderWith(bid.Bidder) + \"\\t - \" + bid.AmountBid.ToString(\"G\") + \"\\t at \" + bid.TimeOfBid);\n            Console.WriteLine(\"------------------------------\");\n            Console.WriteLine();\n        }\n\n        public static string FindNameOfBidderWith(Guid id)\n        {\n            if (members.ContainsKey(id))\n                return members[id];\n            else\n                return string.Empty;\n        }\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.EFExample/DDDPPP.Chap21.EFExample.Presentation/Properties/AssemblyInfo.cs",
    "content": "﻿using System.Reflection;\nusing System.Runtime.CompilerServices;\nusing System.Runtime.InteropServices;\n\n// General Information about an assembly is controlled through the following \n// set of attributes. Change these attribute values to modify the information\n// associated with an assembly.\n[assembly: AssemblyTitle(\"DDDPPP.Chap21.EFExample.Presentation\")]\n[assembly: AssemblyDescription(\"\")]\n[assembly: AssemblyConfiguration(\"\")]\n[assembly: AssemblyCompany(\"\")]\n[assembly: AssemblyProduct(\"DDDPPP.Chap21.EFExample.Presentation\")]\n[assembly: AssemblyCopyright(\"Copyright ©  2013\")]\n[assembly: AssemblyTrademark(\"\")]\n[assembly: AssemblyCulture(\"\")]\n\n// Setting ComVisible to false makes the types in this assembly not visible \n// to COM components.  If you need to access a type in this assembly from \n// COM, set the ComVisible attribute to true on that type.\n[assembly: ComVisible(false)]\n\n// The following GUID is for the ID of the typelib if this project is exposed to COM\n[assembly: Guid(\"298de2cf-bdbe-4490-9dc5-167e80146ecd\")]\n\n// Version information for an assembly consists of the following four values:\n//\n//      Major Version\n//      Minor Version \n//      Build Number\n//      Revision\n//\n// You can specify all the values or you can default the Build and Revision Numbers \n// by using the '*' as shown below:\n// [assembly: AssemblyVersion(\"1.0.*\")]\n[assembly: AssemblyVersion(\"1.0.0.0\")]\n[assembly: AssemblyFileVersion(\"1.0.0.0\")]\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.EFExample/DDDPPP.Chap21.EFExample.Presentation/packages.config",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<packages>\n  <package id=\"EntityFramework\" version=\"6.0.2\" targetFramework=\"net45\" />\n  <package id=\"structuremap\" version=\"2.6.4.1\" targetFramework=\"net45\" />\n</packages>"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.EFExample/DDDPPP.Chap21.EFExample.sln",
    "content": "﻿\nMicrosoft Visual Studio Solution File, Format Version 12.00\n# Visual Studio 2012\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"DDDPPP.Chap21.EFExample.Application\", \"DDDPPP.Chap21.EFExample.Application\\DDDPPP.Chap21.EFExample.Application.csproj\", \"{BD4E953F-603B-4F99-9D6D-687643859354}\"\nEndProject\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"DDDPPP.Chap21.EFExample.Presentation\", \"DDDPPP.Chap21.EFExample.Presentation\\DDDPPP.Chap21.EFExample.Presentation.csproj\", \"{65DC6820-684F-462B-A20D-314CE3E47C5F}\"\nEndProject\nProject(\"{2150E333-8FDC-42A3-9474-1A3956D46DE8}\") = \".nuget\", \".nuget\", \"{30562B11-28FB-4F78-87B5-6FCC9C08DFE6}\"\n\tProjectSection(SolutionItems) = preProject\n\t\t.nuget\\NuGet.Config = .nuget\\NuGet.Config\n\t\t.nuget\\NuGet.exe = .nuget\\NuGet.exe\n\t\t.nuget\\NuGet.targets = .nuget\\NuGet.targets\n\tEndProjectSection\nEndProject\nGlobal\n\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\n\t\tDebug|Any CPU = Debug|Any CPU\n\t\tRelease|Any CPU = Release|Any CPU\n\tEndGlobalSection\n\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\n\t\t{BD4E953F-603B-4F99-9D6D-687643859354}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{BD4E953F-603B-4F99-9D6D-687643859354}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{BD4E953F-603B-4F99-9D6D-687643859354}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{BD4E953F-603B-4F99-9D6D-687643859354}.Release|Any CPU.Build.0 = Release|Any CPU\n\t\t{65DC6820-684F-462B-A20D-314CE3E47C5F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{65DC6820-684F-462B-A20D-314CE3E47C5F}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{65DC6820-684F-462B-A20D-314CE3E47C5F}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{65DC6820-684F-462B-A20D-314CE3E47C5F}.Release|Any CPU.Build.0 = Release|Any CPU\n\tEndGlobalSection\n\tGlobalSection(SolutionProperties) = preSolution\n\t\tHideSolutionNode = FALSE\n\tEndGlobalSection\nEndGlobal\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.MicroORM/.nuget/NuGet.Config",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<configuration>\n  <solution>\n    <add key=\"disableSourceControlIntegration\" value=\"true\" />\n  </solution>\n</configuration>"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.MicroORM/.nuget/NuGet.targets",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n    <PropertyGroup>\n        <SolutionDir Condition=\"$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'\">$(MSBuildProjectDirectory)\\..\\</SolutionDir>\n        \n        <!-- Enable the restore command to run before builds -->\n        <RestorePackages Condition=\"  '$(RestorePackages)' == '' \">false</RestorePackages>\n\n        <!-- Property that enables building a package from a project -->\n        <BuildPackage Condition=\" '$(BuildPackage)' == '' \">false</BuildPackage>\n\n        <!-- Determines if package restore consent is required to restore packages -->\n        <RequireRestoreConsent Condition=\" '$(RequireRestoreConsent)' != 'false' \">true</RequireRestoreConsent>\n        \n        <!-- Download NuGet.exe if it does not already exist -->\n        <DownloadNuGetExe Condition=\" '$(DownloadNuGetExe)' == '' \">false</DownloadNuGetExe>\n    </PropertyGroup>\n    \n    <ItemGroup Condition=\" '$(PackageSources)' == '' \">\n        <!-- Package sources used to restore packages. By default, registered sources under %APPDATA%\\NuGet\\NuGet.Config will be used -->\n        <!-- The official NuGet package source (https://www.nuget.org/api/v2/) will be excluded if package sources are specified and it does not appear in the list -->\n        <!--\n            <PackageSource Include=\"https://www.nuget.org/api/v2/\" />\n            <PackageSource Include=\"https://my-nuget-source/nuget/\" />\n        -->\n    </ItemGroup>\n\n    <PropertyGroup Condition=\" '$(OS)' == 'Windows_NT'\">\n        <!-- Windows specific commands -->\n        <NuGetToolsPath>$([System.IO.Path]::Combine($(SolutionDir), \".nuget\"))</NuGetToolsPath>\n        <PackagesConfig>$([System.IO.Path]::Combine($(ProjectDir), \"packages.config\"))</PackagesConfig>\n    </PropertyGroup>\n    \n    <PropertyGroup Condition=\" '$(OS)' != 'Windows_NT'\">\n        <!-- We need to launch nuget.exe with the mono command if we're not on windows -->\n        <NuGetToolsPath>$(SolutionDir).nuget</NuGetToolsPath>\n        <PackagesConfig>packages.config</PackagesConfig>\n    </PropertyGroup>\n    \n    <PropertyGroup>\n        <!-- NuGet command -->\n        <NuGetExePath Condition=\" '$(NuGetExePath)' == '' \">$(NuGetToolsPath)\\NuGet.exe</NuGetExePath>\n        <PackageSources Condition=\" $(PackageSources) == '' \">@(PackageSource)</PackageSources>\n        \n        <NuGetCommand Condition=\" '$(OS)' == 'Windows_NT'\">\"$(NuGetExePath)\"</NuGetCommand>\n        <NuGetCommand Condition=\" '$(OS)' != 'Windows_NT' \">mono --runtime=v4.0.30319 $(NuGetExePath)</NuGetCommand>\n\n        <PackageOutputDir Condition=\"$(PackageOutputDir) == ''\">$(TargetDir.Trim('\\\\'))</PackageOutputDir>\n        \n        <RequireConsentSwitch Condition=\" $(RequireRestoreConsent) == 'true' \">-RequireConsent</RequireConsentSwitch>\n        <NonInteractiveSwitch Condition=\" '$(VisualStudioVersion)' != '' AND '$(OS)' == 'Windows_NT' \">-NonInteractive</NonInteractiveSwitch>\n        \n        <PaddedSolutionDir Condition=\" '$(OS)' == 'Windows_NT'\">\"$(SolutionDir) \"</PaddedSolutionDir>\n        <PaddedSolutionDir Condition=\" '$(OS)' != 'Windows_NT' \">\"$(SolutionDir)\"</PaddedSolutionDir>\n\n        <!-- Commands -->\n        <RestoreCommand>$(NuGetCommand) install \"$(PackagesConfig)\" -source \"$(PackageSources)\"  $(NonInteractiveSwitch) $(RequireConsentSwitch) -solutionDir $(PaddedSolutionDir)</RestoreCommand>\n        <BuildCommand>$(NuGetCommand) pack \"$(ProjectPath)\" -Properties \"Configuration=$(Configuration);Platform=$(Platform)\" $(NonInteractiveSwitch) -OutputDirectory \"$(PackageOutputDir)\" -symbols</BuildCommand>\n\n        <!-- We need to ensure packages are restored prior to assembly resolve -->\n        <BuildDependsOn Condition=\"$(RestorePackages) == 'true'\">\n            RestorePackages;\n            $(BuildDependsOn);\n        </BuildDependsOn>\n\n        <!-- Make the build depend on restore packages -->\n        <BuildDependsOn Condition=\"$(BuildPackage) == 'true'\">\n            $(BuildDependsOn);\n            BuildPackage;\n        </BuildDependsOn>\n    </PropertyGroup>\n\n    <Target Name=\"CheckPrerequisites\">\n        <!-- Raise an error if we're unable to locate nuget.exe  -->\n        <Error Condition=\"'$(DownloadNuGetExe)' != 'true' AND !Exists('$(NuGetExePath)')\" Text=\"Unable to locate '$(NuGetExePath)'\" />\n        <!--\n        Take advantage of MsBuild's build dependency tracking to make sure that we only ever download nuget.exe once.\n        This effectively acts as a lock that makes sure that the download operation will only happen once and all\n        parallel builds will have to wait for it to complete.\n        -->\n        <MsBuild Targets=\"_DownloadNuGet\" Projects=\"$(MSBuildThisFileFullPath)\" Properties=\"Configuration=NOT_IMPORTANT;DownloadNuGetExe=$(DownloadNuGetExe)\" />\n    </Target>\n\n    <Target Name=\"_DownloadNuGet\">\n        <DownloadNuGet OutputFilename=\"$(NuGetExePath)\" Condition=\" '$(DownloadNuGetExe)' == 'true' AND !Exists('$(NuGetExePath)')\" />\n    </Target>\n\n    <Target Name=\"RestorePackages\" DependsOnTargets=\"CheckPrerequisites\">\n        <Exec Command=\"$(RestoreCommand)\"\n              Condition=\"'$(OS)' != 'Windows_NT' And Exists('$(PackagesConfig)')\" />\n              \n        <Exec Command=\"$(RestoreCommand)\"\n              LogStandardErrorAsError=\"true\"\n              Condition=\"'$(OS)' == 'Windows_NT' And Exists('$(PackagesConfig)')\" />\n    </Target>\n\n    <Target Name=\"BuildPackage\" DependsOnTargets=\"CheckPrerequisites\">\n        <Exec Command=\"$(BuildCommand)\" \n              Condition=\" '$(OS)' != 'Windows_NT' \" />\n              \n        <Exec Command=\"$(BuildCommand)\"\n              LogStandardErrorAsError=\"true\"\n              Condition=\" '$(OS)' == 'Windows_NT' \" />\n    </Target>\n    \n    <UsingTask TaskName=\"DownloadNuGet\" TaskFactory=\"CodeTaskFactory\" AssemblyFile=\"$(MSBuildToolsPath)\\Microsoft.Build.Tasks.v4.0.dll\">\n        <ParameterGroup>\n            <OutputFilename ParameterType=\"System.String\" Required=\"true\" />\n        </ParameterGroup>\n        <Task>\n            <Reference Include=\"System.Core\" />\n            <Using Namespace=\"System\" />\n            <Using Namespace=\"System.IO\" />\n            <Using Namespace=\"System.Net\" />\n            <Using Namespace=\"Microsoft.Build.Framework\" />\n            <Using Namespace=\"Microsoft.Build.Utilities\" />\n            <Code Type=\"Fragment\" Language=\"cs\">\n                <![CDATA[\n                try {\n                    OutputFilename = Path.GetFullPath(OutputFilename);\n\n                    Log.LogMessage(\"Downloading latest version of NuGet.exe...\");\n                    WebClient webClient = new WebClient();\n                    webClient.DownloadFile(\"https://www.nuget.org/nuget.exe\", OutputFilename);\n\n                    return true;\n                }\n                catch (Exception ex) {\n                    Log.LogErrorFromException(ex);\n                    return false;\n                }\n            ]]>\n            </Code>\n        </Task>\n    </UsingTask>\n</Project>"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.MicroORM/DDDPPP.Chap21.MicroORM.Application/Application/BusinessUseCases/BidOnAuction.cs",
    "content": "﻿using System;\nusing DDDPPP.Chap21.MicroORM.Application.Model.Auction;\nusing DDDPPP.Chap21.MicroORM.Application.Model.BidHistory;\nusing DDDPPP.Chap21.MicroORM.Application.Infrastructure;\n\nnamespace DDDPPP.Chap21.MicroORM.Application.Application.BusinessUseCases\n{\n    public class BidOnAuction\n    {\n        private IAuctionRepository _auctionRepository;\n        private IBidHistoryRepository _bidHistoryRepository;\n        private IUnitOfWork _unitOfWork;\n        private IClock _clock;\n\n        public BidOnAuction(IAuctionRepository auctionRepository, IBidHistoryRepository bidHistoryRepository, IUnitOfWork unitOfWork, IClock clock)\n        {\n            _auctionRepository = auctionRepository;\n            _bidHistoryRepository = bidHistoryRepository;\n            _unitOfWork = unitOfWork;\n            _clock = clock;\n        }\n\n        public void Bid(Guid auctionId, Guid memberId, decimal amount)\n        {\n            try\n            {\n                using (DomainEvents.Register(OutBid()))\n                using (DomainEvents.Register(BidPlaced()))\n                {\n                    var auction = _auctionRepository.FindBy(auctionId);\n\n                    var bidAmount = new Money(amount);\n\n                    auction.PlaceBidFor(new Bid(memberId, bidAmount, _clock.Time()), _clock.Time());\n\n                    _auctionRepository.Save(auction);\n                }\n\n                _unitOfWork.Commit();\n            }\n            catch (ConcurrencyException ex)\n            {\n                _unitOfWork.Clear();\n\n                Bid(auctionId, memberId, amount);\n            }            \n        }\n\n        private Action<BidPlaced> BidPlaced()\n        {\n            return (BidPlaced e) =>\n            {\n                var bidEvent = new HistoricalBid(e.AuctionId, e.Bidder, e.AmountBid, e.TimeOfBid);\n              \n                _bidHistoryRepository.Add(bidEvent);\n            };\n        }\n\n        private Action<OutBid> OutBid()\n        {\n            return (OutBid e) =>\n            {\n                // Email customer to say that he has been out bid                \n            };\n        }\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.MicroORM/DDDPPP.Chap21.MicroORM.Application/Application/BusinessUseCases/CreateAuction.cs",
    "content": "﻿using System;\nusing DDDPPP.Chap21.MicroORM.Application.Model.Auction;\nusing DDDPPP.Chap21.MicroORM.Application.Infrastructure;\n\nnamespace DDDPPP.Chap21.MicroORM.Application.Application.BusinessUseCases\n{\n    public class CreateAuction\n    {\n        private IAuctionRepository _auctionRepository;\n        private IUnitOfWork _unitOfWork;\n\n        public CreateAuction(IAuctionRepository auctionRepository, IUnitOfWork unitOfWork)\n        {\n            _auctionRepository = auctionRepository;            \n            _unitOfWork = unitOfWork;\n        }\n\n        public Guid Create(NewAuctionRequest command)\n        {\n            var auctionId = Guid.NewGuid();\n            var startingPrice = new Money(command.StartingPrice);\n\n            _auctionRepository.Add(new Auction(auctionId, startingPrice, command.EndsAt));\n\n            _unitOfWork.Commit();\n            \n            return auctionId;\n        }\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.MicroORM/DDDPPP.Chap21.MicroORM.Application/Application/BusinessUseCases/NewAuctionRequest.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace DDDPPP.Chap21.MicroORM.Application.Application.BusinessUseCases\n{\n    public class NewAuctionRequest\n    {\n        public decimal StartingPrice { get; set; }\n        public DateTime EndsAt { get; set; }\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.MicroORM/DDDPPP.Chap21.MicroORM.Application/Application/Queries/AuctionStatus.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\nusing DDDPPP.Chap21.MicroORM.Application.Model.BidHistory;\n\nnamespace DDDPPP.Chap21.MicroORM.Application.Application.Queries\n{\n    public class AuctionStatus\n    {\n        public Guid Id { get; set; }       \n        public decimal CurrentPrice { get; set; }\n        public DateTime AuctionEnds { get; set; }\n        public Guid WinningBidderId { get; set; }\n        public int NumberOfBids { get; set; }\n        public TimeSpan TimeRemaining { get; set; }\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.MicroORM/DDDPPP.Chap21.MicroORM.Application/Application/Queries/AuctionStatusQuery.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing DDDPPP.Chap21.MicroORM.Application.Model.Auction;\nusing DDDPPP.Chap21.MicroORM.Application.Model.BidHistory;\nusing DDDPPP.Chap21.MicroORM.Application.Infrastructure;\n\nnamespace DDDPPP.Chap21.MicroORM.Application.Application.Queries\n{\n    public class AuctionStatusQuery\n    {\n        private readonly IAuctionRepository _auctions;\n        private readonly IBidHistoryRepository _bidHistory;\n        private readonly IClock _clock;\n\n        public AuctionStatusQuery(IAuctionRepository auctions, IBidHistoryRepository bidHistory, IClock clock)\n        {\n            _auctions = auctions;\n            _bidHistory = bidHistory;\n            _clock = clock;\n        }\n\n        public AuctionStatus AuctionStatus(Guid auctionId)\n        {            \n            var auction = _auctions.FindBy(auctionId);\n\n            var snapshot = auction.GetSnapshot();\n\n            return ConvertToStatus(snapshot);\n        }\n\n        public AuctionStatus ConvertToStatus(AuctionSnapshot snapshot)\n        {\n            var status = new AuctionStatus();\n\n            status.AuctionEnds = snapshot.EndsAt;            \n            status.Id = snapshot.Id;\n            status.TimeRemaining = TimeRemaining(snapshot.EndsAt);\n\n            if (snapshot.WinningBid != null)\n            {\n                status.NumberOfBids = _bidHistory.NoOfBidsFor(snapshot.Id);\n                status.WinningBidderId = snapshot.WinningBid.BiddersId;\n                status.CurrentPrice = snapshot.WinningBid.CurrentPrice;\n            }\n            \n            return status;\n        }\n\n        public TimeSpan TimeRemaining(DateTime AuctionEnds)\n        {\n            if (_clock.Time() < AuctionEnds)\n                return AuctionEnds.Subtract(_clock.Time());\n            else\n                return new TimeSpan();\n        }\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.MicroORM/DDDPPP.Chap21.MicroORM.Application/Application/Queries/BidHistoryQuery.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing DDDPPP.Chap21.MicroORM.Application.Infrastructure;\nusing DDDPPP.Chap21.MicroORM.Application.Model.BidHistory;\n\nnamespace DDDPPP.Chap21.MicroORM.Application.Application.Queries\n{\n    public class BidHistoryQuery\n    {\n        private readonly IBidHistoryRepository _bidHistory;\n\n        public BidHistoryQuery(IBidHistoryRepository bidHistory)\n        {\n            _bidHistory = bidHistory;         \n        }\n\n        public IEnumerable<BidInformation> BidHistoryFor(Guid auctionId)\n        {\n            var bidHistory = _bidHistory.FindBy(auctionId);\n\n            return Convert(bidHistory.ShowAllBids());\n        }\n\n        public IEnumerable<BidInformation> Convert(IEnumerable<HistoricalBid> bids)\n        {\n            var bidInfo = new List<BidInformation>();\n\n            foreach (var bid in bids)\n            {\n                bidInfo.Add(new BidInformation() { Bidder = bid.Bidder, AmountBid = bid.AmountBid.GetSnapshot().Value, TimeOfBid = bid.TimeOfBid });\n            }\n\n            return bidInfo;\n        }\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.MicroORM/DDDPPP.Chap21.MicroORM.Application/Application/Queries/BidInformation.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace DDDPPP.Chap21.MicroORM.Application.Application.Queries\n{\n    public class BidInformation\n    {\n        public Guid Bidder { get;  set; }\n        public decimal AmountBid { get;  set; }\n        public string Currency { get; set; }\n        public DateTime TimeOfBid { get;  set; }\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.MicroORM/DDDPPP.Chap21.MicroORM.Application/Bootstrapper.cs",
    "content": "﻿using System;\nusing StructureMap;\nusing DDDPPP.Chap21.MicroORM.Application.Infrastructure;\nusing DDDPPP.Chap21.MicroORM.Application.Model.Auction;\nusing DDDPPP.Chap21.MicroORM.Application.Model.BidHistory;\n\nnamespace DDDPPP.Chap21.MicroORM.Application\n{\n    public static class Bootstrapper\n    {\n        public static void Startup()\n        {                      \n            ObjectFactory.Initialize(config =>\n            {\n                config.For<IAuctionRepository>().Use<AuctionRepository>();\n                config.For<IBidHistoryRepository>().Use<BidHistoryRepository>();\n                config.For<IClock>().Use<SystemClock>();\n\n                config.For<IUnitOfWork>()\n                    .HybridHttpOrThreadLocalScoped()\n                    .Use(x =>\n                    {\n                        var uow = new UnitOfWork();\n                        return uow;\n                    });              \n            });\n\n        }\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.MicroORM/DDDPPP.Chap21.MicroORM.Application/DDDPPP.Chap21.MicroORM.Application.csproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"4.0\" DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <Import Project=\"$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props\" Condition=\"Exists('$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props')\" />\n  <PropertyGroup>\n    <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>\n    <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>\n    <ProjectGuid>{79449DCC-9BF4-49D2-B799-C97A4219CC46}</ProjectGuid>\n    <OutputType>Library</OutputType>\n    <AppDesignerFolder>Properties</AppDesignerFolder>\n    <RootNamespace>DDDPPP.Chap21.MicroORM.Application</RootNamespace>\n    <AssemblyName>DDDPPP.Chap21.MicroORM.Application</AssemblyName>\n    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\n    <FileAlignment>512</FileAlignment>\n    <SolutionDir Condition=\"$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'\">..\\</SolutionDir>\n    <RestorePackages>true</RestorePackages>\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' \">\n    <DebugSymbols>true</DebugSymbols>\n    <DebugType>full</DebugType>\n    <Optimize>false</Optimize>\n    <OutputPath>bin\\Debug\\</OutputPath>\n    <DefineConstants>DEBUG;TRACE</DefineConstants>\n    <ErrorReport>prompt</ErrorReport>\n    <WarningLevel>4</WarningLevel>\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' \">\n    <DebugType>pdbonly</DebugType>\n    <Optimize>true</Optimize>\n    <OutputPath>bin\\Release\\</OutputPath>\n    <DefineConstants>TRACE</DefineConstants>\n    <ErrorReport>prompt</ErrorReport>\n    <WarningLevel>4</WarningLevel>\n  </PropertyGroup>\n  <ItemGroup>\n    <Reference Include=\"Dapper\">\n      <HintPath>..\\packages\\Dapper.1.13\\lib\\net45\\Dapper.dll</HintPath>\n    </Reference>\n    <Reference Include=\"StructureMap\">\n      <HintPath>..\\packages\\structuremap.2.6.4.1\\lib\\net40\\StructureMap.dll</HintPath>\n    </Reference>\n    <Reference Include=\"System\" />\n    <Reference Include=\"System.Configuration\" />\n    <Reference Include=\"System.Core\" />\n    <Reference Include=\"System.Transactions\" />\n    <Reference Include=\"System.Xml.Linq\" />\n    <Reference Include=\"System.Data.DataSetExtensions\" />\n    <Reference Include=\"Microsoft.CSharp\" />\n    <Reference Include=\"System.Data\" />\n    <Reference Include=\"System.Xml\" />\n  </ItemGroup>\n  <ItemGroup>\n    <Compile Include=\"Application\\BusinessUseCases\\BidOnAuction.cs\" />\n    <Compile Include=\"Application\\BusinessUseCases\\CreateAuction.cs\" />\n    <Compile Include=\"Application\\BusinessUseCases\\NewAuctionRequest.cs\" />\n    <Compile Include=\"Application\\Queries\\AuctionStatus.cs\" />\n    <Compile Include=\"Application\\Queries\\AuctionStatusQuery.cs\" />\n    <Compile Include=\"Application\\Queries\\BidHistoryQuery.cs\" />\n    <Compile Include=\"Application\\Queries\\BidInformation.cs\" />\n    <Compile Include=\"Infrastructure\\AuctionRepository.cs\" />\n    <Compile Include=\"Infrastructure\\BidHistoryRepository.cs\" />\n    <Compile Include=\"Bootstrapper.cs\" />\n    <Compile Include=\"Infrastructure\\ConcurrencyException.cs\" />\n    <Compile Include=\"Infrastructure\\DataModel\\AuctionDTO.cs\" />\n    <Compile Include=\"Infrastructure\\DataModel\\BidDTO.cs\" />\n    <Compile Include=\"Infrastructure\\DomainEvents.cs\" />\n    <Compile Include=\"Infrastructure\\Entity.cs\" />\n    <Compile Include=\"Infrastructure\\IAggregateDataModel.cs\" />\n    <Compile Include=\"Infrastructure\\IUnitOfWork.cs\" />\n    <Compile Include=\"Infrastructure\\IUnitOfWorkRepository.cs\" />\n    <Compile Include=\"Infrastructure\\UnitOfWork.cs\" />\n    <Compile Include=\"Infrastructure\\ValueObject.cs\" />\n    <Compile Include=\"Infrastructure\\IClock.cs\" />\n    <Compile Include=\"Infrastructure\\SystemClock.cs\" />\n    <Compile Include=\"Model\\Auction\\Auction.cs\" />\n    <Compile Include=\"Model\\Auction\\AuctionSnapshot.cs\" />\n    <Compile Include=\"Model\\Auction\\BidPlaced.cs\" />\n    <Compile Include=\"Model\\Auction\\IAuctionRepository.cs\" />\n    <Compile Include=\"Model\\Auction\\Money.cs\" />\n    <Compile Include=\"Model\\Auction\\MoneyCannotBeANegativeValueException.cs\" />\n    <Compile Include=\"Model\\Auction\\MoneySnapshot.cs\" />\n    <Compile Include=\"Model\\Auction\\MoreThanTwoDecimalPlacesInMoneyValueException.cs\" />\n    <Compile Include=\"Model\\Auction\\Bid.cs\" />\n    <Compile Include=\"Model\\Auction\\OutBid.cs\" />\n    <Compile Include=\"Model\\Auction\\Price.cs\" />\n    <Compile Include=\"Model\\Auction\\WinningBid.cs\" />\n    <Compile Include=\"Model\\Auction\\WinningBidSnapshot.cs\" />\n    <Compile Include=\"Model\\BidHistory\\HistoricalBid.cs\" />\n    <Compile Include=\"Model\\BidHistory\\BidHistory.cs\" />\n    <Compile Include=\"Model\\BidHistory\\IBidHistoryRepository.cs\" />\n    <Compile Include=\"Properties\\AssemblyInfo.cs\" />\n  </ItemGroup>\n  <ItemGroup>\n    <None Include=\"packages.config\" />\n  </ItemGroup>\n  <Import Project=\"$(MSBuildToolsPath)\\Microsoft.CSharp.targets\" />\n  <Import Project=\"$(SolutionDir)\\.nuget\\NuGet.targets\" Condition=\"Exists('$(SolutionDir)\\.nuget\\NuGet.targets')\" />\n  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \n       Other similar extension points exist, see Microsoft.Common.targets.\n  <Target Name=\"BeforeBuild\">\n  </Target>\n  <Target Name=\"AfterBuild\">\n  </Target>\n  -->\n</Project>"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.MicroORM/DDDPPP.Chap21.MicroORM.Application/Infrastructure/AuctionRepository.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing DDDPPP.Chap21.MicroORM.Application.Model.Auction;\nusing DDDPPP.Chap21.MicroORM.Application.Application;\nusing DDDPPP.Chap21.MicroORM.Application.Infrastructure.DataModel;\nusing System.Data.SqlClient;\nusing Dapper;\n\nnamespace DDDPPP.Chap21.MicroORM.Application.Infrastructure\n{\n    public class AuctionRepository : IAuctionRepository, IUnitOfWorkRepository\n    {\n        private IUnitOfWork _unitOfWork;\n\n        public AuctionRepository(IUnitOfWork unitOfWork)\n        {\n            _unitOfWork = unitOfWork;\n        }\n\n        public void Add(Auction auction)\n        {\n            var snapshot = auction.GetSnapshot();\n            var auctionDTO = new AuctionDTO();\n\n            Map(auctionDTO, snapshot);\n                        \n            _unitOfWork.RegisterNew(auctionDTO, this);\n        }\n\n        public void Save(Auction auction)\n        {\n            var snapshot = auction.GetSnapshot();\n            var auctionDTO = new AuctionDTO(); \n           \n            Map(auctionDTO, snapshot);\n\n            _unitOfWork.RegisterAmended(auctionDTO, this);\n        }\n\n        public Auction FindBy(Guid Id)\n        {\n            AuctionDTO auctionDTO;\n\n            using (var connection = new SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings[\"AuctionDB\"].ConnectionString))\n            {\n                auctionDTO = connection.Query<AuctionDTO>(\"Select * From Auctions Where Id = CAST(@Id AS uniqueidentifier)\", new { Id = Id }).FirstOrDefault();\n            }\n\n            var auctionSnapshot = new AuctionSnapshot();\n\n            auctionSnapshot.Id = auctionDTO.Id;\n            auctionSnapshot.EndsAt = auctionDTO.AuctionEnds;\n            auctionSnapshot.StartingPrice = auctionDTO.StartingPrice;\n            auctionSnapshot.Version = auctionDTO.Version;\n\n            if (auctionDTO.BidderMemberId.HasValue)\n            {\n                var bidSnapshot = new WinningBidSnapshot();\n\n                bidSnapshot.AuctionId = auctionDTO.Id;\n                bidSnapshot.BiddersMaximumBid = auctionDTO.MaximumBid.Value;\n                bidSnapshot.CurrentPrice = auctionDTO.CurrentPrice.Value;\n                bidSnapshot.BiddersId = auctionDTO.BidderMemberId.Value;\n                bidSnapshot.TimeOfBid = auctionDTO.TimeOfBid.Value;\n                auctionSnapshot.WinningBid = bidSnapshot;\n            }\n           \n            return Auction.CreateFrom(auctionSnapshot);\n        }\n\n        public void PersistCreationOf(IAggregateDataModel entity)\n        {\n            var auctionDTO = (AuctionDTO)entity;\n\n            using (var connection = new SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings[\"AuctionDB\"].ConnectionString))\n            {\n                var recordsAdded = connection.Execute(@\"                \n                    INSERT INTO [AuctionExample].[dbo].[Auctions]\n                           ([Id]\n                           ,[StartingPrice]\n                           ,[BidderMemberId]\n                           ,[TimeOfBid]\n                           ,[MaximumBid]\n                           ,[CurrentPrice]\n                           ,[AuctionEnds]\n                           ,[Version])\n                     VALUES\n                           (@Id, @StartingPrice, @BidderMemberId, @TimeOfBid, @MaximumBid, @CurrentPrice, @AuctionEnds, @Version)\"\n                    , new { Id = auctionDTO.Id, StartingPrice = auctionDTO.StartingPrice, BidderMemberId = auctionDTO.BidderMemberId, \n                            TimeOfBid = auctionDTO.TimeOfBid, MaximumBid = auctionDTO.MaximumBid, CurrentPrice = auctionDTO.CurrentPrice,\n                            AuctionEnds = auctionDTO.AuctionEnds, Version = auctionDTO.Version });\n            }\n        }\n\n        public void PersistUpdateOf(IAggregateDataModel  entity)\n        {\n            var auctionDTO = (AuctionDTO)entity;\n\n            using (var connection = new SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings[\"AuctionDB\"].ConnectionString))\n            {\n                var recordsUpdated = connection.Execute(@\"                \n                    UPDATE \n                        [AuctionExample].[dbo].[Auctions]\n                    SET \n                        [Id] = @Id\n                       ,[StartingPrice] = @StartingPrice\n                       ,[BidderMemberId] = @BidderMemberId\n                       ,[TimeOfBid] = @TimeOfBid\n                       ,[MaximumBid] = @MaximumBid\n                       ,[CurrentPrice] = @CurrentPrice\n                       ,[AuctionEnds] = @AuctionEnds\n                       ,[Version] = @Version\n                    WHERE\n                        Id = @Id AND Version = @PreviousVersion\"\n                    , new\n                    {\n                        Id = auctionDTO.Id,\n                        StartingPrice = auctionDTO.StartingPrice,\n                        BidderMemberId = auctionDTO.BidderMemberId,\n                        TimeOfBid = auctionDTO.TimeOfBid,\n                        MaximumBid = auctionDTO.MaximumBid,\n                        CurrentPrice = auctionDTO.CurrentPrice,\n                        AuctionEnds = auctionDTO.AuctionEnds,\n                        Version = auctionDTO.Version + 1,\n                        PreviousVersion = auctionDTO.Version\n                    });\n\n                if (!recordsUpdated.Equals(1))\n                {\n                    throw new ConcurrencyException();\n                }  \n            }\n        }\n\n        public void Map(AuctionDTO auctionDTO, AuctionSnapshot snapshot)\n        {\n            auctionDTO.Id = snapshot.Id;\n            auctionDTO.StartingPrice = snapshot.StartingPrice;\n            auctionDTO.AuctionEnds = snapshot.EndsAt;\n            auctionDTO.Version = snapshot.Version;\n            \n            if (snapshot.WinningBid != null)\n            {\n                auctionDTO.BidderMemberId = snapshot.WinningBid.BiddersId;\n                auctionDTO.CurrentPrice = snapshot.WinningBid.CurrentPrice;\n                auctionDTO.MaximumBid = snapshot.WinningBid.BiddersMaximumBid;\n                auctionDTO.TimeOfBid = snapshot.WinningBid.TimeOfBid;\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.MicroORM/DDDPPP.Chap21.MicroORM.Application/Infrastructure/BidHistoryRepository.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing DDDPPP.Chap21.MicroORM.Application.Model.BidHistory;\nusing DDDPPP.Chap21.MicroORM.Application.Model.Auction;\nusing DDDPPP.Chap21.MicroORM.Application.Infrastructure.DataModel;\nusing Dapper;\nusing System.Data.SqlClient;\n\nnamespace DDDPPP.Chap21.MicroORM.Application.Infrastructure\n{\n    public class BidHistoryRepository : IBidHistoryRepository, IUnitOfWorkRepository\n    {\n        private IUnitOfWork _unitOfWork;\n\n        public BidHistoryRepository(IUnitOfWork unitOfWork)\n        {\n            _unitOfWork = unitOfWork;\n        }\n\n        public int NoOfBidsFor(Guid auctionId)\n        {                        \n            int count;\n\n            using (var connection = new SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings[\"AuctionDB\"].ConnectionString))\n            {\n                var count1 = connection.Query<int>(\"Select Count(*) From BidHistory Where AuctionId = @Id\", new { Id = auctionId }).FirstOrDefault();\n\n                count = count1 != null ? count1 : 1;\n            }\n                                     \n            return count;\n        }\n\n        public void Add(HistoricalBid bid)        \n        {\n            var bidHistoryDTO = new BidDTO();\n\n            bidHistoryDTO.AuctionId = bid.AuctionId;\n            bidHistoryDTO.Bid = bid.AmountBid.GetSnapshot().Value;\n            bidHistoryDTO.BidderId = bid.Bidder;\n            bidHistoryDTO.TimeOfBid = bid.TimeOfBid;\n\n            bidHistoryDTO.Id = Guid.NewGuid();\n\n            _unitOfWork.RegisterNew(bidHistoryDTO, this);\n        }\n\n        public BidHistory FindBy(Guid auctionId)\n        {\n            IEnumerable<BidDTO> bidDTOs;\n\n            using (var connection = new SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings[\"AuctionDB\"].ConnectionString))\n            {\n                bidDTOs = connection.Query<BidDTO>(\"Select * From BidHistory Where AuctionId = @Id\", new { Id = auctionId });\n            }\n  \n            var bids = new List<HistoricalBid>();\n\n            foreach (var bid in bidDTOs)\n            { \n                bids.Add(new HistoricalBid(bid.AuctionId, bid.BidderId, new Money(bid.Bid), bid.TimeOfBid));\n            }\n\n            return new BidHistory(bids);\n        }\n\n        public void PersistCreationOf(IAggregateDataModel entity)\n        {\n            var bidHistoryDTO = (BidDTO)entity;\n\n            using (var connection = new SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings[\"AuctionDB\"].ConnectionString))\n            {\n                connection.Execute(@\"                \n                    INSERT INTO [dbo].[BidHistory]\n                           ([AuctionId]\n                           ,[BidderId]\n                           ,[Bid]\n                           ,[TimeOfBid]\n                           ,[Id])\n                     VALUES\n                           (@AuctionId\n                           ,@BidderId\n                           ,@Bid\n                           ,@TimeOfBid\n                           ,@Id)\"\n                    , new\n                    {\n                        Id = bidHistoryDTO.Id,\n                        BidderId = bidHistoryDTO.BidderId,\n                        Bid = bidHistoryDTO.Bid,\n                        TimeOfBid = bidHistoryDTO.TimeOfBid,\n                        AuctionId = bidHistoryDTO.AuctionId \n                    });            \n            }\n        }\n\n        public void PersistUpdateOf(IAggregateDataModel entity)\n        {\n            throw new NotImplementedException();\n        }\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.MicroORM/DDDPPP.Chap21.MicroORM.Application/Infrastructure/ConcurrencyException.cs",
    "content": "﻿using System;\n\nnamespace DDDPPP.Chap21.MicroORM.Application.Infrastructure\n{\n    public class ConcurrencyException : ApplicationException \n    {\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.MicroORM/DDDPPP.Chap21.MicroORM.Application/Infrastructure/DataModel/AuctionDTO.cs",
    "content": "using System;\nusing System.Collections.Generic;\n\nnamespace DDDPPP.Chap21.MicroORM.Application.Infrastructure.DataModel\n{\n    public partial class AuctionDTO : IAggregateDataModel \n    {\n        public System.Guid Id { get; set; }\n        public decimal StartingPrice { get; set; }\n        public DateTime AuctionEnds { get; set; }\n\n        public Nullable<System.Guid> BidderMemberId { get; set; }\n        public System.DateTime? TimeOfBid { get; set; }\n        public Nullable<decimal> MaximumBid { get; set; }\n        public Nullable<decimal> CurrentPrice { get; set; }\n\n        public int Version { get; set; }\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.MicroORM/DDDPPP.Chap21.MicroORM.Application/Infrastructure/DataModel/BidDTO.cs",
    "content": "using System;\nusing System.Collections.Generic;\n\nnamespace DDDPPP.Chap21.MicroORM.Application.Infrastructure.DataModel\n{\n    public partial class BidDTO : IAggregateDataModel \n    {\n        public System.Guid Id { get; set; }\n        public System.Guid AuctionId { get; set; }\n        public System.Guid BidderId { get; set; }\n        public decimal Bid { get; set; }\n        public System.DateTime TimeOfBid { get; set; }\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.MicroORM/DDDPPP.Chap21.MicroORM.Application/Infrastructure/DomainEvents.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace DDDPPP.Chap21.MicroORM.Application.Infrastructure\n{\n    /// <summary>\n    /// Domain Events class from http://www.udidahan.com/2008/08/25/domain-events-take-2/\n    /// </summary>\n    public static class DomainEvents\n    {\n        [ThreadStatic]\n        private static List<Delegate> _actions;\n        private static List<Delegate> Actions\n        {\n            get\n            {\n                if (_actions == null)\n                {\n                    _actions = new List<Delegate>();\n                }\n                return _actions;\n            }\n        }\n       \n        public static IDisposable Register<T>(Action<T> callback)\n        {           \n            Actions.Add(callback);\n\n            return new DomainEventRegistrationRemover(() => Actions.Remove(callback));\n        }\n\n        public static void Raise<T>(T eventArgs)\n        {\n            foreach (Delegate action in Actions)\n            {\n                Action<T> typedAction = action as Action<T>;\n                if (typedAction != null)\n                {\n                    typedAction(eventArgs);\n                }\n            }\n        }\n     \n        private sealed class DomainEventRegistrationRemover : IDisposable\n        {\n            private readonly Action _callOnDispose;\n\n            public DomainEventRegistrationRemover(Action toCall)\n            {\n                _callOnDispose = toCall;\n            }\n\n            public void Dispose()\n            {\n                _callOnDispose();\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.MicroORM/DDDPPP.Chap21.MicroORM.Application/Infrastructure/Entity.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\n\nnamespace DDDPPP.Chap21.MicroORM.Application.Infrastructure\n{\n    public abstract class Entity<TId>\n    {\n        public TId Id { get; protected set; }\n        public int Version { get; protected set; }\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.MicroORM/DDDPPP.Chap21.MicroORM.Application/Infrastructure/IAggregateDataModel.cs",
    "content": "﻿using System;\n\nnamespace DDDPPP.Chap21.MicroORM.Application.Infrastructure\n{\n    public interface IAggregateDataModel\n    {\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.MicroORM/DDDPPP.Chap21.MicroORM.Application/Infrastructure/IClock.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace DDDPPP.Chap21.MicroORM.Application.Infrastructure\n{\n    public interface IClock\n    {\n        DateTime Time();\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.MicroORM/DDDPPP.Chap21.MicroORM.Application/Infrastructure/IUnitOfWork.cs",
    "content": "﻿using System;\n\nnamespace DDDPPP.Chap21.MicroORM.Application.Infrastructure\n{\n    public interface IUnitOfWork\n    {\n        void RegisterAmended(IAggregateDataModel entity, IUnitOfWorkRepository unitofWorkRepository);\n        void RegisterNew(IAggregateDataModel entity, IUnitOfWorkRepository unitofWorkRepository);\n        void Commit();\n        void Clear();\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.MicroORM/DDDPPP.Chap21.MicroORM.Application/Infrastructure/IUnitOfWorkRepository.cs",
    "content": "﻿using System;\n\nnamespace DDDPPP.Chap21.MicroORM.Application.Infrastructure\n{\n    public interface IUnitOfWorkRepository\n    {\n        void PersistCreationOf(IAggregateDataModel entity);\n        void PersistUpdateOf(IAggregateDataModel entity);\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.MicroORM/DDDPPP.Chap21.MicroORM.Application/Infrastructure/SystemClock.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace DDDPPP.Chap21.MicroORM.Application.Infrastructure\n{\n    public class SystemClock : IClock\n    {\n        public DateTime Time()\n        {\n            return DateTime.Now;\n        }\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.MicroORM/DDDPPP.Chap21.MicroORM.Application/Infrastructure/UnitOfWork.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Transactions;\n\nnamespace DDDPPP.Chap21.MicroORM.Application.Infrastructure\n{\n    public class UnitOfWork : IUnitOfWork \n    {\n        private Dictionary<IAggregateDataModel, IUnitOfWorkRepository> addedEntities;\n        private Dictionary<IAggregateDataModel, IUnitOfWorkRepository> changedEntities;\n\n        public UnitOfWork()\n        {\n            addedEntities = new Dictionary<IAggregateDataModel, IUnitOfWorkRepository>();\n            changedEntities = new Dictionary<IAggregateDataModel, IUnitOfWorkRepository>();\n        }\n\n        public void RegisterAmended(IAggregateDataModel entity, IUnitOfWorkRepository unitofWorkRepository)\n        {\n            if (!changedEntities.ContainsKey(entity))\n            {\n                changedEntities.Add(entity, unitofWorkRepository);\n            }\n        }\n\n        public void RegisterNew(IAggregateDataModel entity, IUnitOfWorkRepository unitofWorkRepository)\n        {\n            if (!addedEntities.ContainsKey(entity))\n            {\n                addedEntities.Add(entity, unitofWorkRepository);\n            };\n        }\n\n        public void Clear()\n        {\n            addedEntities.Clear();\n            changedEntities.Clear();\n        }\n        \n        public void Commit()\n        {            \n            using (TransactionScope scope = new TransactionScope())\n            {\n                foreach (IAggregateDataModel entity in this.addedEntities.Keys)\n                {\n                    this.addedEntities[entity].PersistCreationOf(entity);\n                }\n\n                foreach (IAggregateDataModel entity in this.changedEntities.Keys)\n                {\n                    this.changedEntities[entity].PersistUpdateOf(entity);\n                }\n\n                scope.Complete();\n\n                Clear();\n            }\n        }\n\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.MicroORM/DDDPPP.Chap21.MicroORM.Application/Infrastructure/ValueObject.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\n\nnamespace DDDPPP.Chap21.MicroORM.Application.Infrastructure\n{\n    public abstract class ValueObject<T> where T : ValueObject<T>\n    {\n        protected abstract IEnumerable<object> GetAttributesToIncludeInEqualityCheck();\n\n        public override bool Equals(object other)\n        {\n            return Equals(other as T);\n        }\n\n        public bool Equals(T other)\n        {\n            if (other == null)\n            {\n                return false;\n            }\n            return GetAttributesToIncludeInEqualityCheck().SequenceEqual(other.GetAttributesToIncludeInEqualityCheck());\n        }\n\n        public static bool operator ==(ValueObject<T> left, ValueObject<T> right)\n        {\n            return Equals(left, right);\n        }\n\n        public static bool operator !=(ValueObject<T> left, ValueObject<T> right)\n        {\n            return !(left == right);\n        }\n\n        public override int GetHashCode()\n        {\n            int hash = 17;\n            foreach (var obj in this.GetAttributesToIncludeInEqualityCheck())\n                hash = hash * 31 + (obj == null ? 0 : obj.GetHashCode());\n\n            return hash;\n        }\n    }\n}\n\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.MicroORM/DDDPPP.Chap21.MicroORM.Application/Model/Auction/Auction.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\nusing DDDPPP.Chap21.MicroORM.Application.Infrastructure;\n\nnamespace DDDPPP.Chap21.MicroORM.Application.Model.Auction\n{\n    public class Auction : Entity<Guid>\n    {        \n        public Auction(Guid id, Money startingPrice, DateTime endsAt)\n        {\n            if (id == Guid.Empty)\n                throw new ArgumentNullException(\"Auction Id cannot be null\");\n\n            if (startingPrice == null)\n                throw new ArgumentNullException(\"Starting Price cannot be null\");\n\n            if (endsAt == DateTime.MinValue)\n                throw new ArgumentNullException(\"EndsAt must have a value\");\n\n            Id = id;\n            StartingPrice = startingPrice;\n            EndsAt = endsAt;\n        }\n\n        private Auction(AuctionSnapshot snapshot)\n        {\n            this.Id = snapshot.Id;\n            this.StartingPrice = new Money(snapshot.StartingPrice);\n            this.EndsAt = snapshot.EndsAt;\n            this.Version = snapshot.Version;\n\n            if (snapshot.WinningBid != null)                          \n                CurrentWinningBid = WinningBid.CreateFrom(snapshot.WinningBid);            \n        }\n\n        public static Auction CreateFrom(AuctionSnapshot snapshot)\n        {\n            return new Auction(snapshot);\n        }\n\n        private Money StartingPrice { get; set; }\n        private WinningBid CurrentWinningBid { get; set; }\n        private DateTime EndsAt { get; set; }\n\n        public AuctionSnapshot GetSnapshot()\n        {\n            var snapshot = new AuctionSnapshot();\n            snapshot.Id = this.Id;\n            snapshot.StartingPrice = this.StartingPrice.GetSnapshot().Value;\n            snapshot.EndsAt = this.EndsAt;\n            snapshot.Version = this.Version;\n\n            if (HasACurrentBid())\n                snapshot.WinningBid = CurrentWinningBid.GetSnapshot();            \n\n            return snapshot;\n        }\n\n        private bool HasACurrentBid()\n        {\n            return CurrentWinningBid != null;\n        }\n\n        private bool StillInProgress(DateTime currentTime)\n        {\n            return (EndsAt > currentTime);\n        }\n\n        public void PlaceBidFor(Bid bid, DateTime currentTime)\n        {          \n            if (StillInProgress(currentTime))\n            {\n                if (FirstOffer())\n                    PlaceABidForTheFirst(bid);\n                else if (BidderIsIncreasingMaximumBid(bid))\n                    CurrentWinningBid = CurrentWinningBid.RaiseMaximumBidTo(bid.MaximumBid);\n                else if (CurrentWinningBid.CanBeExceededBy(bid.MaximumBid))\n                    Set(CurrentWinningBid.DetermineWinningBidIncrement(bid));                \n            }\n        }\n\n        private bool BidderIsIncreasingMaximumBid(Bid bid)\n        {\n            return CurrentWinningBid.WasMadeBy(bid.Bidder) && bid.MaximumBid.IsGreaterThan(CurrentWinningBid.MaximumBid);\n        }\n\n        private bool FirstOffer()\n        {\n            return CurrentWinningBid == null;\n        }\n\n        private void PlaceABidForTheFirst(Bid offer)\n        {\n            if (offer.MaximumBid.IsGreaterThanOrEqualTo(StartingPrice))\n            {\n                DomainEvents.Raise(new BidPlaced(this.Id, offer.Bidder, StartingPrice, offer.TimeOfOffer));\n\n                Set(new WinningBid(Id, offer.Bidder, offer.MaximumBid, StartingPrice, offer.TimeOfOffer));\n            }\n        }\n\n        private void Set(WinningBid newBid)\n        {\n            if (!FirstOffer() && CurrentWinningBid.WasMadeBy(newBid.Bidder))\n                DomainEvents.Raise(new OutBid(Id, CurrentWinningBid.Bidder));\n\n            CurrentWinningBid = newBid;            \n        }\n    }\n\n\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.MicroORM/DDDPPP.Chap21.MicroORM.Application/Model/Auction/AuctionSnapshot.cs",
    "content": "﻿using System;\n\nnamespace DDDPPP.Chap21.MicroORM.Application.Model.Auction\n{\n    public class AuctionSnapshot\n    {\n        public Guid Id { get; set; }\n        public decimal StartingPrice { get; set; }\n        public DateTime EndsAt { get; set; }\n        public WinningBidSnapshot WinningBid { get; set; }\n        public int Version { get; set; }\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.MicroORM/DDDPPP.Chap21.MicroORM.Application/Model/Auction/Bid.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing DDDPPP.Chap21.MicroORM.Application.Infrastructure;\n\nnamespace DDDPPP.Chap21.MicroORM.Application.Model.Auction\n{\n    public class Bid : ValueObject<Bid>\n    {\n        public Bid(Guid bidderId, Money maximumBid, DateTime timeOfOffer)\n        {\n            if (bidderId == Guid.Empty)\n                throw new ArgumentNullException(\"BidderId cannot be null\");\n\n            if (maximumBid == null)\n                throw new ArgumentNullException(\"MaximumBid cannot be null\");\n\n            if (timeOfOffer == DateTime.MinValue)\n                throw new ArgumentNullException(\"Time of Offer must have a value\");\n\n            Bidder = bidderId;\n            MaximumBid = maximumBid;\n            TimeOfOffer = timeOfOffer;\n        }\n\n        public Guid Bidder { get; private set; }\n        public Money MaximumBid { get; private set; }\n        public DateTime TimeOfOffer { get; private set; }\n\n        protected override IEnumerable<object> GetAttributesToIncludeInEqualityCheck()\n        {\n            return new List<Object>()\n            {\n                Bidder, MaximumBid, TimeOfOffer\n            };\n        }\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.MicroORM/DDDPPP.Chap21.MicroORM.Application/Model/Auction/BidPlaced.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\n\nnamespace DDDPPP.Chap21.MicroORM.Application.Model.Auction\n{\n    public class BidPlaced\n    {\n        public BidPlaced(Guid auctionId, Guid bidderId, Money amountBid, DateTime timeOfBid)\n        {\n            if (auctionId == Guid.Empty)\n                throw new ArgumentNullException(\"Auction Id cannot be null\");\n\n            if (bidderId == Guid.Empty)\n                throw new ArgumentNullException(\"Bidder Id cannot be null\");\n\n            if (amountBid == null)\n                throw new ArgumentNullException(\"AmountBid cannot be null\");\n\n            if (timeOfBid == DateTime.MinValue)\n                throw new ArgumentNullException(\"TimeOfBid must have a value\");\n\n            AuctionId = auctionId;\n            Bidder = bidderId;\n            AmountBid = amountBid;\n            TimeOfBid = timeOfBid;\n        }\n\n        public Guid AuctionId { get; private set; }\n        public Guid Bidder { get; private set; }\n        public Money AmountBid { get; private set; }\n        public DateTime TimeOfBid { get; private set; }\n        \n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.MicroORM/DDDPPP.Chap21.MicroORM.Application/Model/Auction/IAuctionRepository.cs",
    "content": "﻿using System;\nusing DDDPPP.Chap21.MicroORM.Application.Application;\n\nnamespace DDDPPP.Chap21.MicroORM.Application.Model.Auction\n{\n    public interface IAuctionRepository\n    {\n        void Add(Auction auction);\n        void Save(Auction auction);\n        Auction FindBy(Guid Id);\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.MicroORM/DDDPPP.Chap21.MicroORM.Application/Model/Auction/Money.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing DDDPPP.Chap21.MicroORM.Application.Infrastructure;\n\nnamespace DDDPPP.Chap21.MicroORM.Application.Model.Auction\n{\n    public class Money : ValueObject<Money>, IComparable<Money>\n    {\n        protected decimal Value { get; set; }\n\n        public Money()\n            : this(0m)\n        {\n        }\n\n        public Money(decimal value)\n        {\n            ThrowExceptionIfNotValid(value);\n\n            Value = value;\n        }\n\n        private void ThrowExceptionIfNotValid(decimal value)\n        {\n            if (value % 0.01m != 0)\n                throw new MoreThanTwoDecimalPlacesInMoneyValueException();\n\n            if (value < 0)\n                throw new MoneyCannotBeANegativeValueException();\n        }\n\n        public Money Add(Money money)\n        {\n            return new Money(Value + money.Value);\n        }\n\n        public bool IsGreaterThan(Money money)\n        {\n            return this.Value > money.Value;\n        }\n\n        public bool IsGreaterThanOrEqualTo(Money money)\n        {\n            return this.Value > money.Value || this.Equals(money);\n        }\n\n        public bool IsLessThanOrEqualTo(Money money)\n        {\n            return this.Value < money.Value || this.Equals(money);\n        }\n\n        public override string ToString()\n        {\n            return string.Format(\"{0}\", Value);\n        }\n\n        public MoneySnapshot GetSnapshot()\n        {\n            return new MoneySnapshot() { Value = this.Value };\n        }\n\n        protected override IEnumerable<object> GetAttributesToIncludeInEqualityCheck()\n        {\n            return new List<Object>() { Value };\n        }\n\n        public int CompareTo(Money other)\n        {\n            return this.Value.CompareTo(other.Value);\n        }\n    }\n}"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.MicroORM/DDDPPP.Chap21.MicroORM.Application/Model/Auction/MoneyCannotBeANegativeValueException.cs",
    "content": "﻿using System;\n\nnamespace DDDPPP.Chap21.MicroORM.Application.Model.Auction\n{\n    public class MoneyCannotBeANegativeValueException : Exception\n    {\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.MicroORM/DDDPPP.Chap21.MicroORM.Application/Model/Auction/MoneySnapshot.cs",
    "content": "﻿using System;\n\nnamespace DDDPPP.Chap21.MicroORM.Application.Model.Auction\n{\n    public class MoneySnapshot\n    {\n        public decimal Value { get; set; }\n    }\n}"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.MicroORM/DDDPPP.Chap21.MicroORM.Application/Model/Auction/MoreThanTwoDecimalPlacesInMoneyValueException.cs",
    "content": "﻿using System;\n\nnamespace DDDPPP.Chap21.MicroORM.Application.Model.Auction\n{\n    public class MoreThanTwoDecimalPlacesInMoneyValueException : Exception\n    {\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.MicroORM/DDDPPP.Chap21.MicroORM.Application/Model/Auction/OutBid.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace DDDPPP.Chap21.MicroORM.Application.Model.Auction\n{\n    public class OutBid\n    {\n        public OutBid(Guid auctionId, Guid bidderId)\n        {\n            if (auctionId == Guid.Empty)\n                throw new ArgumentNullException(\"Auction Id cannot be null\");\n\n            if (bidderId == Guid.Empty)\n                throw new ArgumentNullException(\"Bidder Id cannot be null\");\n\n            AuctionId = auctionId;\n            Bidder = bidderId;\n        }\n\n        public Guid AuctionId { get; private set; }\n        public Guid Bidder { get; private set; }\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.MicroORM/DDDPPP.Chap21.MicroORM.Application/Model/Auction/Price.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing DDDPPP.Chap21.MicroORM.Application.Infrastructure;\n\nnamespace DDDPPP.Chap21.MicroORM.Application.Model.Auction\n{\n    public class Price : ValueObject<Price>\n    {\n        private Price()\n        { }\n\n        public Price(Money amount)\n        {\n            if (amount == null)\n                throw new ArgumentNullException(\"Amount cannot be null\");\n\n            Amount = amount;\n        }\n\n        public Money Amount { get; private set; }\n\n        public Money BidIncrement()\n        {\n            if (Amount.IsGreaterThanOrEqualTo(new Money(0.01m)) && Amount.IsLessThanOrEqualTo(new Money(0.99m)))\n                return Amount.Add(new Money(0.05m));\n\n            if (Amount.IsGreaterThanOrEqualTo(new Money(1.00m)) && Amount.IsLessThanOrEqualTo(new Money(4.99m)))\n                return Amount.Add(new Money(0.20m));\n\n            if (Amount.IsGreaterThanOrEqualTo(new Money(5.00m)) && Amount.IsLessThanOrEqualTo(new Money(14.99m)))\n                return Amount.Add(new Money(0.50m));\n\n            return Amount.Add(new Money(1.00m));\n\n        }\n\n        public bool CanBeExceededBy(Money offer)\n        {           \n            return offer.IsGreaterThanOrEqualTo(BidIncrement());\n        }\n\n        protected override IEnumerable<object> GetAttributesToIncludeInEqualityCheck()\n        {\n            return new List<Object>() { Amount };\n        }\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.MicroORM/DDDPPP.Chap21.MicroORM.Application/Model/Auction/WinningBid.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing DDDPPP.Chap21.MicroORM.Application.Infrastructure;\n\nnamespace DDDPPP.Chap21.MicroORM.Application.Model.Auction\n{\n    public class WinningBid : ValueObject<WinningBid>\n    {\n        private WinningBid() { }\n\n        public WinningBid(Guid auctionId, Guid bidder, Money maximumBid, Money bid, DateTime timeOfBid)\n        {\n            if (bidder == Guid.Empty)\n                throw new ArgumentNullException(\"Bidder cannot be null\");\n\n            if (maximumBid == null)\n                throw new ArgumentNullException(\"MaximumBid cannot be null\");\n\n            if (timeOfBid == DateTime.MinValue)\n                throw new ArgumentNullException(\"TimeOfBid must have a value\");\n\n\n            Bidder = bidder;\n            MaximumBid = maximumBid;\n            TimeOfBid = timeOfBid;\n            CurrentAuctionPrice = new Price(bid);\n            AuctionId = auctionId;           \n        }\n\n        public Guid AuctionId { get; private set; }\n        public Guid Bidder { get; private set; }\n        public Money MaximumBid { get; private set; }\n        public DateTime TimeOfBid { get; private set; }\n        public Price CurrentAuctionPrice { get; private set; }\n\n        public WinningBid RaiseMaximumBidTo(Money newAmount)\n        {\n            if (newAmount.IsGreaterThan(MaximumBid))\n                return new WinningBid(AuctionId, Bidder, newAmount, CurrentAuctionPrice.Amount, DateTime.Now);\n            else\n                throw new ApplicationException(\"Maximum bid increase must be larger than current maximum bid.\");\n        }\n\n        public bool WasMadeBy(Guid bidder)\n        {\n            return Bidder.Equals(bidder);\n        }\n\n        public WinningBid DetermineWinningBidIncrement(Bid newbid)\n        {            \n            if (this.CanBeExceededBy(this.MaximumBid) && this.CanBeExceededBy(newbid.MaximumBid))\n            {\n                return DetermineWinnerFromProxyBidding(this, newbid);\n            }\n            else if (this.CanBeExceededBy(newbid.MaximumBid))\n            {\n                return CreateNewBid(newbid.Bidder, CurrentAuctionPrice.BidIncrement(), newbid.MaximumBid, newbid.TimeOfOffer);\n            }\n            else            \n                return this;               \n        }\n\n        private WinningBid DetermineWinnerFromProxyBidding(WinningBid winningBid, Bid newbid)\n        {\n            WinningBid nextIncrement;\n\n            if (winningBid.MaxBidCanBeExceededBy(newbid.MaximumBid))\n            {\n                nextIncrement = CreateNewBid(this.Bidder, this.MaximumBid, this.MaximumBid, this.TimeOfBid);\n                \n                if (nextIncrement.CanBeExceededBy(newbid.MaximumBid))                \n                    return CreateNewBid(newbid.Bidder, nextIncrement.CurrentAuctionPrice.BidIncrement(), newbid.MaximumBid, newbid.TimeOfOffer);                \n                else                \n                    return CreateNewBid(newbid.Bidder, newbid.MaximumBid, newbid.MaximumBid, newbid.TimeOfOffer);                \n            }\n            else\n            {\n                nextIncrement = CreateNewBid(newbid.Bidder, newbid.MaximumBid, newbid.MaximumBid, newbid.TimeOfOffer);\n\n                if (nextIncrement.CanBeExceededBy(winningBid.MaximumBid))\n                    return CreateNewBid(winningBid.Bidder, nextIncrement.CurrentAuctionPrice.BidIncrement(), winningBid.MaximumBid, winningBid.TimeOfBid);\n                else\n                    return CreateNewBid(winningBid.Bidder, winningBid.MaximumBid, winningBid.MaximumBid, winningBid.TimeOfBid); \n            }                       \n        }\n\n        private WinningBid CreateNewBid(Guid bidder, Money bid, Money maxBid, DateTime timeOfBid)\n        {\n            DomainEvents.Raise(new BidPlaced(AuctionId, bidder, bid, timeOfBid));\n\n            return new WinningBid(AuctionId, bidder, bid, maxBid, timeOfBid);\n        }\n\n        private bool MaxBidCanBeExceededBy(Money bid)\n        {\n            return !this.MaximumBid.IsGreaterThanOrEqualTo(bid);\n        }\n\n        public bool CanBeExceededBy(Money offer)\n        {\n            return CurrentAuctionPrice.CanBeExceededBy(offer);\n        }\n\n        public bool HasNotReachedMaximumBid()\n        {\n            return MaximumBid.IsGreaterThan(CurrentAuctionPrice.Amount);\n        }\n\n        public WinningBidSnapshot GetSnapshot()\n        {\n            var snapshot = new WinningBidSnapshot();\n\n            snapshot.AuctionId = AuctionId;\n            snapshot.BiddersId = this.Bidder;\n            snapshot.BiddersMaximumBid = this.MaximumBid.GetSnapshot().Value;\n            snapshot.CurrentPrice = this.CurrentAuctionPrice.Amount.GetSnapshot().Value;\n            snapshot.TimeOfBid = this.TimeOfBid;\n\n            return snapshot;\n        }\n\n        public static WinningBid CreateFrom(WinningBidSnapshot bidSnapShot)\n        {\n            return new WinningBid(bidSnapShot.AuctionId, bidSnapShot.BiddersId, new Money(bidSnapShot.BiddersMaximumBid), new Money(bidSnapShot.CurrentPrice), bidSnapShot.TimeOfBid);\n        }\n\n        protected override IEnumerable<object> GetAttributesToIncludeInEqualityCheck()\n        {\n            return new List<Object>() { Bidder, MaximumBid, TimeOfBid, CurrentAuctionPrice };\n        }\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.MicroORM/DDDPPP.Chap21.MicroORM.Application/Model/Auction/WinningBidSnapshot.cs",
    "content": "﻿using System;\n\nnamespace DDDPPP.Chap21.MicroORM.Application.Model.Auction\n{\n    public class WinningBidSnapshot\n    {\n        public Guid AuctionId { get; set; }\n        public Guid BiddersId { get; set; }\n        public DateTime TimeOfBid { get; set; }\n        public decimal BiddersMaximumBid { get; set; }\n        public decimal CurrentPrice { get; set; }\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.MicroORM/DDDPPP.Chap21.MicroORM.Application/Model/BidHistory/BidHistory.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\n\nnamespace DDDPPP.Chap21.MicroORM.Application.Model.BidHistory\n{\n    public class BidHistory\n    {\n        private IEnumerable<HistoricalBid> _bids;\n\n        public BidHistory(IEnumerable<HistoricalBid> bids)\n        {\n            if (bids == null)\n                throw new ArgumentNullException(\"Bids cannot be null\");\n\n            _bids = bids;\n        }\n\n        public IEnumerable<HistoricalBid> ShowAllBids()\n        {\n            var bids = _bids.OrderByDescending(x => x.AmountBid).ThenBy(x => x.TimeOfBid);\n\n            return bids;\n        }\n    }\n}"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.MicroORM/DDDPPP.Chap21.MicroORM.Application/Model/BidHistory/HistoricalBid.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\nusing DDDPPP.Chap21.MicroORM.Application.Model.Auction;\nusing DDDPPP.Chap21.MicroORM.Application.Infrastructure;\n\nnamespace DDDPPP.Chap21.MicroORM.Application.Model.BidHistory\n{\n    public class HistoricalBid : ValueObject<HistoricalBid>\n    {\n        public HistoricalBid(Guid auctionId, Guid bidderId, Money amountBid, DateTime timeOfBid)\n        {\n            if (auctionId == Guid.Empty)\n                throw new ArgumentNullException(\"Auction Id cannot be null\");\n\n            if (bidderId == Guid.Empty)\n                throw new ArgumentNullException(\"Bidder Id cannot be null\");\n\n            if (amountBid == null)\n                throw new ArgumentNullException(\"AmountBid cannot be null\");\n\n            if (timeOfBid == DateTime.MinValue)\n                throw new ArgumentNullException(\"TimeOfBid must have a value\");\n\n            AuctionId = auctionId;\n            Bidder = bidderId;\n            AmountBid = amountBid;\n            TimeOfBid = timeOfBid;\n        }\n\n        public Guid AuctionId { get; private set; }\n        public Guid Bidder { get; private set; }\n        public Money AmountBid { get; private set; }\n        public DateTime TimeOfBid { get; private set; }\n\n        protected override IEnumerable<object> GetAttributesToIncludeInEqualityCheck()\n        {\n            return new List<Object>() { Bidder, AuctionId, TimeOfBid, AmountBid };\n        }\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.MicroORM/DDDPPP.Chap21.MicroORM.Application/Model/BidHistory/IBidHistoryRepository.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace DDDPPP.Chap21.MicroORM.Application.Model.BidHistory\n{\n    public interface IBidHistoryRepository\n    {\n        int NoOfBidsFor(Guid autionId);\n        void Add(HistoricalBid bid);\n        BidHistory FindBy(Guid auctionId);\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.MicroORM/DDDPPP.Chap21.MicroORM.Application/Properties/AssemblyInfo.cs",
    "content": "﻿using System.Reflection;\nusing System.Runtime.CompilerServices;\nusing System.Runtime.InteropServices;\n\n// General Information about an assembly is controlled through the following \n// set of attributes. Change these attribute values to modify the information\n// associated with an assembly.\n[assembly: AssemblyTitle(\"DDDPPP.Chap21.MicroORM.Application\")]\n[assembly: AssemblyDescription(\"\")]\n[assembly: AssemblyConfiguration(\"\")]\n[assembly: AssemblyCompany(\"\")]\n[assembly: AssemblyProduct(\"DDDPPP.Chap21.MicroORM.Application\")]\n[assembly: AssemblyCopyright(\"Copyright ©  2014\")]\n[assembly: AssemblyTrademark(\"\")]\n[assembly: AssemblyCulture(\"\")]\n\n// Setting ComVisible to false makes the types in this assembly not visible \n// to COM components.  If you need to access a type in this assembly from \n// COM, set the ComVisible attribute to true on that type.\n[assembly: ComVisible(false)]\n\n// The following GUID is for the ID of the typelib if this project is exposed to COM\n[assembly: Guid(\"aad163d2-a3eb-4d81-abfe-e79393455c0e\")]\n\n// Version information for an assembly consists of the following four values:\n//\n//      Major Version\n//      Minor Version \n//      Build Number\n//      Revision\n//\n// You can specify all the values or you can default the Build and Revision Numbers \n// by using the '*' as shown below:\n// [assembly: AssemblyVersion(\"1.0.*\")]\n[assembly: AssemblyVersion(\"1.0.0.0\")]\n[assembly: AssemblyFileVersion(\"1.0.0.0\")]\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.MicroORM/DDDPPP.Chap21.MicroORM.Application/packages.config",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<packages>\n  <package id=\"Dapper\" version=\"1.13\" targetFramework=\"net45\" />\n  <package id=\"structuremap\" version=\"2.6.4.1\" targetFramework=\"net45\" />\n</packages>"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.MicroORM/DDDPPP.Chap21.MicroORM.Presentation/App.config",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n<configuration>\n    <startup> \n        <supportedRuntime version=\"v4.0\" sku=\".NETFramework,Version=v4.5\" />\n    </startup>\n\n  <connectionStrings>\n    <add name=\"AuctionDB\" connectionString=\"Data Source=.\\sqlexpress;Initial Catalog=AuctionExample;Integrated Security=True;MultipleActiveResultSets=True\" providerName=\"System.Data.SqlClient\" />\n  </connectionStrings>\n</configuration>"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.MicroORM/DDDPPP.Chap21.MicroORM.Presentation/DDDPPP.Chap21.MicroORM.Presentation.csproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"4.0\" DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <Import Project=\"$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props\" Condition=\"Exists('$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props')\" />\n  <PropertyGroup>\n    <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>\n    <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>\n    <ProjectGuid>{5B064EEB-21F3-42A3-8BBA-5609F53EF9AE}</ProjectGuid>\n    <OutputType>Exe</OutputType>\n    <AppDesignerFolder>Properties</AppDesignerFolder>\n    <RootNamespace>DDDPPP.Chap21.MicroORM.Presentation</RootNamespace>\n    <AssemblyName>DDDPPP.Chap21.MicroORM.Presentation</AssemblyName>\n    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\n    <FileAlignment>512</FileAlignment>\n    <SolutionDir Condition=\"$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'\">..\\</SolutionDir>\n    <RestorePackages>true</RestorePackages>\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' \">\n    <PlatformTarget>AnyCPU</PlatformTarget>\n    <DebugSymbols>true</DebugSymbols>\n    <DebugType>full</DebugType>\n    <Optimize>false</Optimize>\n    <OutputPath>bin\\Debug\\</OutputPath>\n    <DefineConstants>DEBUG;TRACE</DefineConstants>\n    <ErrorReport>prompt</ErrorReport>\n    <WarningLevel>4</WarningLevel>\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' \">\n    <PlatformTarget>AnyCPU</PlatformTarget>\n    <DebugType>pdbonly</DebugType>\n    <Optimize>true</Optimize>\n    <OutputPath>bin\\Release\\</OutputPath>\n    <DefineConstants>TRACE</DefineConstants>\n    <ErrorReport>prompt</ErrorReport>\n    <WarningLevel>4</WarningLevel>\n  </PropertyGroup>\n  <ItemGroup>\n    <Reference Include=\"StructureMap\">\n      <HintPath>..\\packages\\structuremap.2.6.4.1\\lib\\net40\\StructureMap.dll</HintPath>\n    </Reference>\n    <Reference Include=\"System\" />\n    <Reference Include=\"System.Core\" />\n    <Reference Include=\"System.Xml.Linq\" />\n    <Reference Include=\"System.Data.DataSetExtensions\" />\n    <Reference Include=\"Microsoft.CSharp\" />\n    <Reference Include=\"System.Data\" />\n    <Reference Include=\"System.Xml\" />\n  </ItemGroup>\n  <ItemGroup>\n    <Compile Include=\"Program.cs\" />\n    <Compile Include=\"Properties\\AssemblyInfo.cs\" />\n  </ItemGroup>\n  <ItemGroup>\n    <None Include=\"App.config\" />\n    <None Include=\"packages.config\" />\n  </ItemGroup>\n  <ItemGroup>\n    <ProjectReference Include=\"..\\DDDPPP.Chap21.MicroORM.Application\\DDDPPP.Chap21.MicroORM.Application.csproj\">\n      <Project>{79449dcc-9bf4-49d2-b799-c97a4219cc46}</Project>\n      <Name>DDDPPP.Chap21.MicroORM.Application</Name>\n    </ProjectReference>\n  </ItemGroup>\n  <Import Project=\"$(MSBuildToolsPath)\\Microsoft.CSharp.targets\" />\n  <Import Project=\"$(SolutionDir)\\.nuget\\NuGet.targets\" Condition=\"Exists('$(SolutionDir)\\.nuget\\NuGet.targets')\" />\n  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \n       Other similar extension points exist, see Microsoft.Common.targets.\n  <Target Name=\"BeforeBuild\">\n  </Target>\n  <Target Name=\"AfterBuild\">\n  </Target>\n  -->\n</Project>"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.MicroORM/DDDPPP.Chap21.MicroORM.Presentation/Program.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing DDDPPP.Chap21.MicroORM.Application.Application.BusinessUseCases;\nusing DDDPPP.Chap21.MicroORM.Application.Application.Queries;\nusing DDDPPP.Chap21.MicroORM.Application;\nusing StructureMap;\n\nnamespace DDDPPP.Chap21.MicroORM.Presentation\n{\n    public class Program\n    {\n        private static Dictionary<Guid, String> members = new Dictionary<Guid, string>();\n\n        public static void Main(string[] args)\n        {\n            Bootstrapper.Startup();\n\n            var memberIdA = Guid.NewGuid();\n            var memberIdB = Guid.NewGuid();\n            var memberIdC = Guid.NewGuid();\n\n            members.Add(memberIdA, \"Ted\");\n            members.Add(memberIdB, \"Rob\");\n            members.Add(memberIdC, \"Lucy\");\n\n            var auctionId = CreateAuction();\n\n            Bid(auctionId, memberIdA, 10m);\n            Bid(auctionId, memberIdB, 9.99m);\n            Bid(auctionId, memberIdC, 10.05m);\n            Bid(auctionId, memberIdB, 11m);\n            //Bid(auctionId, memberIdB, 1.49m);\n            //Bid(auctionId, memberIdB, 10.01m);\n            //Bid(auctionId, memberIdB, 12.00m);\n            //Bid(auctionId, memberIdA, 12.00m);\n        }\n\n        public static Guid CreateAuction()\n        {\n            var createAuctionService = ObjectFactory.GetInstance<CreateAuction>();\n\n            var newAuctionRequest = new NewAuctionRequest();\n\n            newAuctionRequest.StartingPrice = 0.99m;\n            newAuctionRequest.EndsAt = DateTime.Now.AddDays(1);\n\n            var auctionId = createAuctionService.Create(newAuctionRequest);\n\n            return auctionId;\n        }\n\n        public static void Bid(Guid auctionId, Guid memberId, decimal amount)\n        {\n            var bidOnAuctionService = ObjectFactory.GetInstance<BidOnAuction>();\n\n            bidOnAuctionService.Bid(auctionId, memberId, amount);\n\n            PrintStatusOfAuctionBy(auctionId);\n            PrintBidHistoryOf(auctionId);\n            Console.WriteLine(\"Hit any key to continue\");\n            Console.ReadLine();\n        }\n\n        public static void PrintStatusOfAuctionBy(Guid auctionId)\n        {\n            var auctionSummaryQuery = ObjectFactory.GetInstance<AuctionStatusQuery>();\n            var status = auctionSummaryQuery.AuctionStatus(auctionId);\n\n            Console.WriteLine(\"No Of Bids: \" + status.NumberOfBids);\n            Console.WriteLine(\"Current Bid: \" + status.CurrentPrice.ToString(\"##.##\"));\n            Console.WriteLine(\"Winning Bidder: \" + FindNameOfBidderWith(status.WinningBidderId));\n            Console.WriteLine(\"Time Remaining: \" + status.TimeRemaining);\n            Console.WriteLine();\n        }\n\n        public static void PrintBidHistoryOf(Guid auctionId)\n        {\n            var bidHistoryQuery = ObjectFactory.GetInstance<BidHistoryQuery>();\n            var status = bidHistoryQuery.BidHistoryFor(auctionId);\n\n            Console.WriteLine(\"Bids..\");\n\n            foreach (var bid in status)\n                Console.WriteLine(FindNameOfBidderWith(bid.Bidder) + \"\\t - \" + bid.AmountBid.ToString(\"G\") + \"\\t at \" + bid.TimeOfBid);\n            Console.WriteLine(\"------------------------------\");\n            Console.WriteLine();\n        }\n\n        public static string FindNameOfBidderWith(Guid id)\n        {\n            if (members.ContainsKey(id))\n                return members[id];\n            else\n                return string.Empty;\n        }\n    }\n}"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.MicroORM/DDDPPP.Chap21.MicroORM.Presentation/Properties/AssemblyInfo.cs",
    "content": "﻿using System.Reflection;\nusing System.Runtime.CompilerServices;\nusing System.Runtime.InteropServices;\n\n// General Information about an assembly is controlled through the following \n// set of attributes. Change these attribute values to modify the information\n// associated with an assembly.\n[assembly: AssemblyTitle(\"DDDPPP.Chap21.MicroORM.Presentation\")]\n[assembly: AssemblyDescription(\"\")]\n[assembly: AssemblyConfiguration(\"\")]\n[assembly: AssemblyCompany(\"\")]\n[assembly: AssemblyProduct(\"DDDPPP.Chap21.MicroORM.Presentation\")]\n[assembly: AssemblyCopyright(\"Copyright ©  2014\")]\n[assembly: AssemblyTrademark(\"\")]\n[assembly: AssemblyCulture(\"\")]\n\n// Setting ComVisible to false makes the types in this assembly not visible \n// to COM components.  If you need to access a type in this assembly from \n// COM, set the ComVisible attribute to true on that type.\n[assembly: ComVisible(false)]\n\n// The following GUID is for the ID of the typelib if this project is exposed to COM\n[assembly: Guid(\"08f6e991-44cc-4611-b655-558f8977ddb6\")]\n\n// Version information for an assembly consists of the following four values:\n//\n//      Major Version\n//      Minor Version \n//      Build Number\n//      Revision\n//\n// You can specify all the values or you can default the Build and Revision Numbers \n// by using the '*' as shown below:\n// [assembly: AssemblyVersion(\"1.0.*\")]\n[assembly: AssemblyVersion(\"1.0.0.0\")]\n[assembly: AssemblyFileVersion(\"1.0.0.0\")]\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.MicroORM/DDDPPP.Chap21.MicroORM.Presentation/packages.config",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<packages>\n  <package id=\"structuremap\" version=\"2.6.4.1\" targetFramework=\"net45\" />\n</packages>"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.MicroORM/DDDPPP.Chap21.MicroORM.sln",
    "content": "﻿\nMicrosoft Visual Studio Solution File, Format Version 12.00\n# Visual Studio 2012\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"DDDPPP.Chap21.MicroORM.Application\", \"DDDPPP.Chap21.MicroORM.Application\\DDDPPP.Chap21.MicroORM.Application.csproj\", \"{79449DCC-9BF4-49D2-B799-C97A4219CC46}\"\nEndProject\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"DDDPPP.Chap21.MicroORM.Presentation\", \"DDDPPP.Chap21.MicroORM.Presentation\\DDDPPP.Chap21.MicroORM.Presentation.csproj\", \"{5B064EEB-21F3-42A3-8BBA-5609F53EF9AE}\"\nEndProject\nProject(\"{2150E333-8FDC-42A3-9474-1A3956D46DE8}\") = \".nuget\", \".nuget\", \"{78AFB324-92D3-47BA-9FB8-8A775C834D0D}\"\n\tProjectSection(SolutionItems) = preProject\n\t\t.nuget\\NuGet.Config = .nuget\\NuGet.Config\n\t\t.nuget\\NuGet.exe = .nuget\\NuGet.exe\n\t\t.nuget\\NuGet.targets = .nuget\\NuGet.targets\n\tEndProjectSection\nEndProject\nGlobal\n\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\n\t\tDebug|Any CPU = Debug|Any CPU\n\t\tRelease|Any CPU = Release|Any CPU\n\tEndGlobalSection\n\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\n\t\t{79449DCC-9BF4-49D2-B799-C97A4219CC46}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{79449DCC-9BF4-49D2-B799-C97A4219CC46}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{79449DCC-9BF4-49D2-B799-C97A4219CC46}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{79449DCC-9BF4-49D2-B799-C97A4219CC46}.Release|Any CPU.Build.0 = Release|Any CPU\n\t\t{5B064EEB-21F3-42A3-8BBA-5609F53EF9AE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{5B064EEB-21F3-42A3-8BBA-5609F53EF9AE}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{5B064EEB-21F3-42A3-8BBA-5609F53EF9AE}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{5B064EEB-21F3-42A3-8BBA-5609F53EF9AE}.Release|Any CPU.Build.0 = Release|Any CPU\n\tEndGlobalSection\n\tGlobalSection(SolutionProperties) = preSolution\n\t\tHideSolutionNode = FALSE\n\tEndGlobalSection\nEndGlobal\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.NHibernateExample/.nuget/NuGet.Config",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<configuration>\n  <solution>\n    <add key=\"disableSourceControlIntegration\" value=\"true\" />\n  </solution>\n</configuration>"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.NHibernateExample/.nuget/NuGet.targets",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n    <PropertyGroup>\n        <SolutionDir Condition=\"$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'\">$(MSBuildProjectDirectory)\\..\\</SolutionDir>\n        \n        <!-- Enable the restore command to run before builds -->\n        <RestorePackages Condition=\"  '$(RestorePackages)' == '' \">false</RestorePackages>\n\n        <!-- Property that enables building a package from a project -->\n        <BuildPackage Condition=\" '$(BuildPackage)' == '' \">false</BuildPackage>\n\n        <!-- Determines if package restore consent is required to restore packages -->\n        <RequireRestoreConsent Condition=\" '$(RequireRestoreConsent)' != 'false' \">true</RequireRestoreConsent>\n        \n        <!-- Download NuGet.exe if it does not already exist -->\n        <DownloadNuGetExe Condition=\" '$(DownloadNuGetExe)' == '' \">false</DownloadNuGetExe>\n    </PropertyGroup>\n    \n    <ItemGroup Condition=\" '$(PackageSources)' == '' \">\n        <!-- Package sources used to restore packages. By default, registered sources under %APPDATA%\\NuGet\\NuGet.Config will be used -->\n        <!-- The official NuGet package source (https://www.nuget.org/api/v2/) will be excluded if package sources are specified and it does not appear in the list -->\n        <!--\n            <PackageSource Include=\"https://www.nuget.org/api/v2/\" />\n            <PackageSource Include=\"https://my-nuget-source/nuget/\" />\n        -->\n    </ItemGroup>\n\n    <PropertyGroup Condition=\" '$(OS)' == 'Windows_NT'\">\n        <!-- Windows specific commands -->\n        <NuGetToolsPath>$([System.IO.Path]::Combine($(SolutionDir), \".nuget\"))</NuGetToolsPath>\n        <PackagesConfig>$([System.IO.Path]::Combine($(ProjectDir), \"packages.config\"))</PackagesConfig>\n    </PropertyGroup>\n    \n    <PropertyGroup Condition=\" '$(OS)' != 'Windows_NT'\">\n        <!-- We need to launch nuget.exe with the mono command if we're not on windows -->\n        <NuGetToolsPath>$(SolutionDir).nuget</NuGetToolsPath>\n        <PackagesConfig>packages.config</PackagesConfig>\n    </PropertyGroup>\n    \n    <PropertyGroup>\n        <!-- NuGet command -->\n        <NuGetExePath Condition=\" '$(NuGetExePath)' == '' \">$(NuGetToolsPath)\\NuGet.exe</NuGetExePath>\n        <PackageSources Condition=\" $(PackageSources) == '' \">@(PackageSource)</PackageSources>\n        \n        <NuGetCommand Condition=\" '$(OS)' == 'Windows_NT'\">\"$(NuGetExePath)\"</NuGetCommand>\n        <NuGetCommand Condition=\" '$(OS)' != 'Windows_NT' \">mono --runtime=v4.0.30319 $(NuGetExePath)</NuGetCommand>\n\n        <PackageOutputDir Condition=\"$(PackageOutputDir) == ''\">$(TargetDir.Trim('\\\\'))</PackageOutputDir>\n        \n        <RequireConsentSwitch Condition=\" $(RequireRestoreConsent) == 'true' \">-RequireConsent</RequireConsentSwitch>\n        <NonInteractiveSwitch Condition=\" '$(VisualStudioVersion)' != '' AND '$(OS)' == 'Windows_NT' \">-NonInteractive</NonInteractiveSwitch>\n        \n        <PaddedSolutionDir Condition=\" '$(OS)' == 'Windows_NT'\">\"$(SolutionDir) \"</PaddedSolutionDir>\n        <PaddedSolutionDir Condition=\" '$(OS)' != 'Windows_NT' \">\"$(SolutionDir)\"</PaddedSolutionDir>\n\n        <!-- Commands -->\n        <RestoreCommand>$(NuGetCommand) install \"$(PackagesConfig)\" -source \"$(PackageSources)\"  $(NonInteractiveSwitch) $(RequireConsentSwitch) -solutionDir $(PaddedSolutionDir)</RestoreCommand>\n        <BuildCommand>$(NuGetCommand) pack \"$(ProjectPath)\" -Properties \"Configuration=$(Configuration);Platform=$(Platform)\" $(NonInteractiveSwitch) -OutputDirectory \"$(PackageOutputDir)\" -symbols</BuildCommand>\n\n        <!-- We need to ensure packages are restored prior to assembly resolve -->\n        <BuildDependsOn Condition=\"$(RestorePackages) == 'true'\">\n            RestorePackages;\n            $(BuildDependsOn);\n        </BuildDependsOn>\n\n        <!-- Make the build depend on restore packages -->\n        <BuildDependsOn Condition=\"$(BuildPackage) == 'true'\">\n            $(BuildDependsOn);\n            BuildPackage;\n        </BuildDependsOn>\n    </PropertyGroup>\n\n    <Target Name=\"CheckPrerequisites\">\n        <!-- Raise an error if we're unable to locate nuget.exe  -->\n        <Error Condition=\"'$(DownloadNuGetExe)' != 'true' AND !Exists('$(NuGetExePath)')\" Text=\"Unable to locate '$(NuGetExePath)'\" />\n        <!--\n        Take advantage of MsBuild's build dependency tracking to make sure that we only ever download nuget.exe once.\n        This effectively acts as a lock that makes sure that the download operation will only happen once and all\n        parallel builds will have to wait for it to complete.\n        -->\n        <MsBuild Targets=\"_DownloadNuGet\" Projects=\"$(MSBuildThisFileFullPath)\" Properties=\"Configuration=NOT_IMPORTANT;DownloadNuGetExe=$(DownloadNuGetExe)\" />\n    </Target>\n\n    <Target Name=\"_DownloadNuGet\">\n        <DownloadNuGet OutputFilename=\"$(NuGetExePath)\" Condition=\" '$(DownloadNuGetExe)' == 'true' AND !Exists('$(NuGetExePath)')\" />\n    </Target>\n\n    <Target Name=\"RestorePackages\" DependsOnTargets=\"CheckPrerequisites\">\n        <Exec Command=\"$(RestoreCommand)\"\n              Condition=\"'$(OS)' != 'Windows_NT' And Exists('$(PackagesConfig)')\" />\n              \n        <Exec Command=\"$(RestoreCommand)\"\n              LogStandardErrorAsError=\"true\"\n              Condition=\"'$(OS)' == 'Windows_NT' And Exists('$(PackagesConfig)')\" />\n    </Target>\n\n    <Target Name=\"BuildPackage\" DependsOnTargets=\"CheckPrerequisites\">\n        <Exec Command=\"$(BuildCommand)\" \n              Condition=\" '$(OS)' != 'Windows_NT' \" />\n              \n        <Exec Command=\"$(BuildCommand)\"\n              LogStandardErrorAsError=\"true\"\n              Condition=\" '$(OS)' == 'Windows_NT' \" />\n    </Target>\n    \n    <UsingTask TaskName=\"DownloadNuGet\" TaskFactory=\"CodeTaskFactory\" AssemblyFile=\"$(MSBuildToolsPath)\\Microsoft.Build.Tasks.v4.0.dll\">\n        <ParameterGroup>\n            <OutputFilename ParameterType=\"System.String\" Required=\"true\" />\n        </ParameterGroup>\n        <Task>\n            <Reference Include=\"System.Core\" />\n            <Using Namespace=\"System\" />\n            <Using Namespace=\"System.IO\" />\n            <Using Namespace=\"System.Net\" />\n            <Using Namespace=\"Microsoft.Build.Framework\" />\n            <Using Namespace=\"Microsoft.Build.Utilities\" />\n            <Code Type=\"Fragment\" Language=\"cs\">\n                <![CDATA[\n                try {\n                    OutputFilename = Path.GetFullPath(OutputFilename);\n\n                    Log.LogMessage(\"Downloading latest version of NuGet.exe...\");\n                    WebClient webClient = new WebClient();\n                    webClient.DownloadFile(\"https://www.nuget.org/nuget.exe\", OutputFilename);\n\n                    return true;\n                }\n                catch (Exception ex) {\n                    Log.LogErrorFromException(ex);\n                    return false;\n                }\n            ]]>\n            </Code>\n        </Task>\n    </UsingTask>\n</Project>"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.NHibernateExample/DDDPPP.Chap21.NHibernateExample.Application/Application/BusinessUseCases/BidOnAuction.cs",
    "content": "﻿using System;\nusing DDDPPP.Chap21.NHibernateExample.Application.Model.Auction;\nusing DDDPPP.Chap21.NHibernateExample.Application.Model.BidHistory;\nusing NHibernate;\nusing DDDPPP.Chap21.NHibernateExample.Application.Infrastructure;\n\nnamespace DDDPPP.Chap21.NHibernateExample.Application.Application.BusinessUseCases\n{\n    public class BidOnAuction\n    {\n        private IAuctionRepository _auctionRepository;\n        private IBidHistoryRepository _bidHistoryRepository;\n        private ISession _unitOfWork;\n        private IClock _clock;\n\n        public BidOnAuction(IAuctionRepository auctionRepository, \n                            IBidHistoryRepository bidHistoryRepository, \n                            ISession unitOfWork, IClock clock)\n        {\n            _auctionRepository = auctionRepository;\n            _bidHistoryRepository = bidHistoryRepository;\n            _unitOfWork = unitOfWork;\n            _clock = clock;\n        }\n\n        public void Bid(Guid auctionId, Guid memberId, decimal amount)\n        {\n            try\n            {\n                using (ITransaction transaction = _unitOfWork.BeginTransaction())\n                {\n                    using (DomainEvents.Register(OutBid()))\n                    using (DomainEvents.Register(BidPlaced()))\n                    {\n                        var auction = _auctionRepository.FindBy(auctionId);\n\n                        var bidAmount = new Money(amount);\n\n                        auction.PlaceBidFor(new Offer(memberId, bidAmount, _clock.Time()), _clock.Time());\n                    }\n\n                    transaction.Commit();\n                }\n            }\n            catch (StaleObjectStateException ex)\n            {\n                _unitOfWork.Clear();\n\n                Bid(auctionId, memberId, amount);\n            } \n        }\n\n        private Action<BidPlaced> BidPlaced()\n        {\n            return (BidPlaced e) =>\n            {               \n                var bidEvent = new Bid(e.AuctionId, e.Bidder, e.AmountBid, e.TimeOfBid);\n              \n                _bidHistoryRepository.Add(bidEvent);\n            };\n        }\n\n        private Action<OutBid> OutBid()\n        {\n            return (OutBid e) => \n            { \n                // Email customer to say that he has been out bid                \n            };\n        }\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.NHibernateExample/DDDPPP.Chap21.NHibernateExample.Application/Application/BusinessUseCases/CreateAuction.cs",
    "content": "﻿using System;\nusing DDDPPP.Chap21.NHibernateExample.Application.Model.Auction;\nusing NHibernate;\n\nnamespace DDDPPP.Chap21.NHibernateExample.Application.Application.BusinessUseCases\n{\n    public class CreateAuction\n    {\n        private IAuctionRepository _auctionRepository;\n        private ISession _unitOfWork;\n\n        public CreateAuction(IAuctionRepository auctionRepository,ISession unitOfWork)\n        {\n            _auctionRepository = auctionRepository;            \n            _unitOfWork = unitOfWork;\n        }\n\n        public Guid Create(NewAuctionRequest command)\n        {\n            var auctionId = Guid.NewGuid();\n            var startingPrice = new Money(command.StartingPrice);\n\n            using (ITransaction transaction = _unitOfWork.BeginTransaction())\n            {\n                _auctionRepository.Add(new Auction(auctionId, startingPrice, command.EndsAt));\n\n                transaction.Commit();\n            }\n\n            return auctionId;\n        }\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.NHibernateExample/DDDPPP.Chap21.NHibernateExample.Application/Application/BusinessUseCases/NewAuctionRequest.cs",
    "content": "﻿using System;\n\nnamespace DDDPPP.Chap21.NHibernateExample.Application.Application.BusinessUseCases\n{\n    public class NewAuctionRequest\n    {\n        public decimal StartingPrice { get; set; }\n        public DateTime EndsAt { get; set; }\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.NHibernateExample/DDDPPP.Chap21.NHibernateExample.Application/Application/Queries/AuctionStatus.cs",
    "content": "﻿using System;\n\nnamespace DDDPPP.Chap21.NHibernateExample.Application.Application.Queries\n{\n    public class AuctionStatus\n    {\n        public Guid Id { get; set; }       \n        public decimal CurrentPrice { get; set; }\n        public DateTime AuctionEnds { get; set; }\n        public Guid WinningBidderId { get; set; }\n        public int NumberOfBids { get; set; }\n        public TimeSpan TimeRemaining {get; set;}\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.NHibernateExample/DDDPPP.Chap21.NHibernateExample.Application/Application/Queries/AuctionStatusQuery.cs",
    "content": "﻿using System;\nusing NHibernate;\nusing NHibernate.Criterion;\nusing NHibernate.Transform;\nusing DDDPPP.Chap21.NHibernateExample.Application.Model.BidHistory;\nusing DDDPPP.Chap21.NHibernateExample.Application.Infrastructure;\n\nnamespace DDDPPP.Chap21.NHibernateExample.Application.Application.Queries\n{\n    public class AuctionStatusQuery\n    {\n        private readonly ISession _session;\n        private readonly IBidHistoryRepository _bidHistory;\n        private readonly IClock _clock;\n\n        public AuctionStatusQuery(ISession session, \n                                   IBidHistoryRepository bidHistory,\n                                   IClock clock)\n        {\n            _session = session;\n            _bidHistory = bidHistory;\n            _clock = clock;\n        }\n\n        public AuctionStatus AuctionStatus(Guid auctionId)\n        {\n            var status = _session\n                       .CreateSQLQuery(String.Format(\"select Id, CurrentPrice, BidderMemberId as WinningBidderId, AuctionEnds from Auctions Where Id = '{0}'\", auctionId))\n                       .SetResultTransformer(Transformers.AliasToBean<AuctionStatus>())\n                       .UniqueResult<AuctionStatus>();\n\n            status.TimeRemaining = TimeRemaining(status.AuctionEnds);\n            status.NumberOfBids = _bidHistory.NoOfBidsFor(auctionId);\n\n            return status;\n        }\n\n        public TimeSpan TimeRemaining(DateTime AuctionEnds)\n        {\n            if (_clock.Time() < AuctionEnds)\n                return AuctionEnds.Subtract(_clock.Time());\n            else\n                return new TimeSpan();\n        }\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.NHibernateExample/DDDPPP.Chap21.NHibernateExample.Application/Application/Queries/BidHistoryQuery.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing NHibernate;\nusing NHibernate.Criterion;\nusing NHibernate.Transform;\n\nnamespace DDDPPP.Chap21.NHibernateExample.Application.Application.Queries\n{\n    public class BidHistoryQuery\n    {\n        private readonly ISession _session;\n\n        public BidHistoryQuery(ISession session)\n        {\n            _session = session;         \n        }\n\n        public IEnumerable<BidInformation> BidHistoryFor(Guid auctionId)\n        {\n            var status = _session\n                       .CreateSQLQuery(String.Format(\"SELECT [BidderId] as Bidder,[Bid] as AmountBid ,TimeOfBid FROM [BidHistory] Where AuctionId = '{0}' Order By Bid Desc, TimeOfBid Asc\", auctionId))\n                       .SetResultTransformer(Transformers.AliasToBean<BidInformation>());\n\n            return status.List<BidInformation>(); \n        }\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.NHibernateExample/DDDPPP.Chap21.NHibernateExample.Application/Application/Queries/BidInformation.cs",
    "content": "﻿using System;\n\nnamespace DDDPPP.Chap21.NHibernateExample.Application.Application.Queries\n{\n    public class BidInformation\n    {\n        public Guid Bidder { get;  set; }\n        public decimal AmountBid { get;  set; }\n        public string currency { get; set; }\n        public DateTime TimeOfBid { get;  set; }\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.NHibernateExample/DDDPPP.Chap21.NHibernateExample.Application/Bootstrapper.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing StructureMap;\nusing DDDPPP.Chap21.NHibernateExample.Application.Infrastructure;\nusing DDDPPP.Chap21.NHibernateExample.Application.Model.Auction;\nusing DDDPPP.Chap21.NHibernateExample.Application.Model.BidHistory;\nusing NHibernate;\nusing NHibernate.Cfg;\n\nnamespace DDDPPP.Chap21.NHibernateExample.Application\n{\n    public static class Bootstrapper\n    {\n        public static void Startup()\n        {\n            Configuration config = new Configuration();\n                       \n            config.Configure();\n            config.AddAssembly(\"DDDPPP.Chap21.NHibernateExample.Application\");\n\n            var sessionFactory = config.BuildSessionFactory();\n\n            ObjectFactory.Initialize(structureMapConfig =>\n            {\n                structureMapConfig.For<IAuctionRepository>().Use<AuctionRepository>();\n                structureMapConfig.For<IBidHistoryRepository>().Use<Infrastructure.BidHistoryRepository>();\n                structureMapConfig.For<IClock>().Use<SystemClock>();\n\n                structureMapConfig.For<ISessionFactory>().Use(sessionFactory);\n                structureMapConfig.For<ISession>()\n                    .HybridHttpOrThreadLocalScoped()\n                    .Use(x =>\n                    {\n                        var factory = x.GetInstance<ISessionFactory>();\n                        return factory.OpenSession();\n                    });\n            });\n\n        }\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.NHibernateExample/DDDPPP.Chap21.NHibernateExample.Application/DDDPPP.Chap21.NHibernateExample.Application.csproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"4.0\" DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <Import Project=\"$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props\" Condition=\"Exists('$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props')\" />\n  <PropertyGroup>\n    <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>\n    <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>\n    <ProjectGuid>{0E1BC35E-205D-454C-9EBC-CA849C46E6C2}</ProjectGuid>\n    <OutputType>Library</OutputType>\n    <AppDesignerFolder>Properties</AppDesignerFolder>\n    <RootNamespace>DDDPPP.Chap21.NHibernateExample.Application</RootNamespace>\n    <AssemblyName>DDDPPP.Chap21.NHibernateExample.Application</AssemblyName>\n    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\n    <FileAlignment>512</FileAlignment>\n    <SolutionDir Condition=\"$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'\">..\\</SolutionDir>\n    <RestorePackages>true</RestorePackages>\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' \">\n    <DebugSymbols>true</DebugSymbols>\n    <DebugType>full</DebugType>\n    <Optimize>false</Optimize>\n    <OutputPath>bin\\Debug\\</OutputPath>\n    <DefineConstants>DEBUG;TRACE</DefineConstants>\n    <ErrorReport>prompt</ErrorReport>\n    <WarningLevel>4</WarningLevel>\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' \">\n    <DebugType>pdbonly</DebugType>\n    <Optimize>true</Optimize>\n    <OutputPath>bin\\Release\\</OutputPath>\n    <DefineConstants>TRACE</DefineConstants>\n    <ErrorReport>prompt</ErrorReport>\n    <WarningLevel>4</WarningLevel>\n  </PropertyGroup>\n  <ItemGroup>\n    <Reference Include=\"Iesi.Collections\">\n      <HintPath>..\\packages\\Iesi.Collections.3.2.0.4000\\lib\\Net35\\Iesi.Collections.dll</HintPath>\n    </Reference>\n    <Reference Include=\"NHibernate\">\n      <HintPath>..\\packages\\NHibernate.3.3.3.4001\\lib\\Net35\\NHibernate.dll</HintPath>\n    </Reference>\n    <Reference Include=\"StructureMap\">\n      <HintPath>..\\packages\\structuremap.2.6.4.1\\lib\\net40\\StructureMap.dll</HintPath>\n    </Reference>\n    <Reference Include=\"System\" />\n    <Reference Include=\"System.Core\" />\n    <Reference Include=\"System.Xml.Linq\" />\n    <Reference Include=\"System.Data.DataSetExtensions\" />\n    <Reference Include=\"Microsoft.CSharp\" />\n    <Reference Include=\"System.Data\" />\n    <Reference Include=\"System.Xml\" />\n  </ItemGroup>\n  <ItemGroup>\n    <Compile Include=\"Application\\BusinessUseCases\\NewAuctionRequest.cs\" />\n    <Compile Include=\"Application\\BusinessUseCases\\BidOnAuction.cs\" />\n    <Compile Include=\"Application\\Queries\\AuctionStatusQuery.cs\" />\n    <Compile Include=\"Application\\BusinessUseCases\\CreateAuction.cs\" />\n    <Compile Include=\"Application\\Queries\\AuctionStatus.cs\" />\n    <Compile Include=\"Application\\Queries\\BidHistoryQuery.cs\" />\n    <Compile Include=\"Application\\Queries\\BidInformation.cs\" />\n    <Compile Include=\"Bootstrapper.cs\">\n      <SubType>Code</SubType>\n    </Compile>\n    <Compile Include=\"Infrastructure\\AuctionRepository.cs\">\n      <SubType>Code</SubType>\n    </Compile>\n    <Compile Include=\"Infrastructure\\BidHistoryRepository.cs\">\n      <SubType>Code</SubType>\n    </Compile>\n    <Compile Include=\"Infrastructure\\DomainEvents.cs\" />\n    <Compile Include=\"Infrastructure\\Entity.cs\">\n      <SubType>Code</SubType>\n    </Compile>\n    <Compile Include=\"Infrastructure\\IClock.cs\">\n      <SubType>Code</SubType>\n    </Compile>\n    <Compile Include=\"Infrastructure\\SystemClock.cs\">\n      <SubType>Code</SubType>\n    </Compile>\n    <Compile Include=\"Infrastructure\\ValueObject.cs\">\n      <SubType>Code</SubType>\n    </Compile>\n    <Compile Include=\"Model\\Auction\\Auction.cs\" />\n    <Compile Include=\"Model\\Auction\\AutomaticBidder.cs\" />\n    <Compile Include=\"Model\\Auction\\BidPlaced.cs\" />\n    <Compile Include=\"Model\\Auction\\WinningBid.cs\" />\n    <Compile Include=\"Model\\Auction\\IAuctionRepository.cs\" />\n    <Compile Include=\"Model\\Auction\\Money.cs\" />\n    <Compile Include=\"Model\\Auction\\MoneyCannotBeANegativeValueException.cs\" />\n    <Compile Include=\"Model\\Auction\\MoreThanTwoDecimalPlacesInMoneyValueException.cs\" />\n    <Compile Include=\"Model\\Auction\\Offer.cs\" />\n    <Compile Include=\"Model\\Auction\\OutBid.cs\" />\n    <Compile Include=\"Model\\Auction\\Price.cs\" />\n    <Compile Include=\"Model\\BidHistory\\Bid.cs\" />\n    <Compile Include=\"Model\\BidHistory\\IBidHistoryRepository.cs\" />\n    <Compile Include=\"Properties\\AssemblyInfo.cs\" />\n  </ItemGroup>\n  <ItemGroup>\n    <EmbeddedResource Include=\"Infrastructure\\Auction.hbm.xml\">\n      <SubType>Designer</SubType>\n    </EmbeddedResource>\n    <EmbeddedResource Include=\"Infrastructure\\Bid.hbm.xml\" />\n  </ItemGroup>\n  <ItemGroup>\n    <None Include=\"packages.config\" />\n  </ItemGroup>\n  <Import Project=\"$(MSBuildToolsPath)\\Microsoft.CSharp.targets\" />\n  <Import Project=\"$(SolutionDir)\\.nuget\\NuGet.targets\" Condition=\"Exists('$(SolutionDir)\\.nuget\\NuGet.targets')\" />\n  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \n       Other similar extension points exist, see Microsoft.Common.targets.\n  <Target Name=\"BeforeBuild\">\n  </Target>\n  <Target Name=\"AfterBuild\">\n  </Target>\n  -->\n</Project>"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.NHibernateExample/DDDPPP.Chap21.NHibernateExample.Application/Infrastructure/Auction.hbm.xml",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n<hibernate-mapping xmlns=\"urn:nhibernate-mapping-2.2\"\n    namespace=\"DDDPPP.Chap21.NHibernateExample.Application.Model.Auction\"\n        assembly=\"DDDPPP.Chap21.NHibernateExample.Application\">\n\n  <class name=\"Auction\" table=\"Auctions\" lazy=\"false\" >\n\n    <id name=\"Id\" column=\"Id\" type=\"Guid\">      \n    </id>\n\n    <version name=\"Version\" column=\"Version\" type=\"Int32\" unsaved-value=\"0\"/>\n    \n    <component name=\"StartingPrice\" class=\"Money\">\n      <property name=\"Value\" column=\"StartingPrice\" not-null=\"true\"/>\n    </component>\n\n    <property name=\"EndsAt\" column=\"AuctionEnds\" not-null=\"true\"/>\n  \n    <component name=\"WinningBid\" class=\"WinningBid\">\n\n      <property name=\"Bidder\" column=\"BidderMemberId\" not-null=\"false\"/>\n                   \n      <property name=\"TimeOfBid\" column=\"TimeOfBid\" not-null=\"false\"/>\n      \n      <component name=\"MaximumBid\" class=\"Money\">\n        <property name=\"Value\" column=\"MaximumBid\" not-null=\"false\"/>\n      </component>       \n      \n      <component name=\"CurrentAuctionPrice\" class=\"Price\">\n        <component name=\"Amount\" class=\"Money\">\n          <property name=\"Value\" column=\"CurrentPrice\" not-null=\"false\"/>\n        </component>\n      </component>\n    </component>\n  </class>\n</hibernate-mapping>"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.NHibernateExample/DDDPPP.Chap21.NHibernateExample.Application/Infrastructure/AuctionRepository.cs",
    "content": "﻿using System;\nusing DDDPPP.Chap21.NHibernateExample.Application.Model.Auction;\nusing NHibernate;\nusing NHibernate.Criterion;\nusing NHibernate.Transform;\nusing DDDPPP.Chap21.NHibernateExample.Application.Application;\n\nnamespace DDDPPP.Chap21.NHibernateExample.Application.Infrastructure\n{\n    public class AuctionRepository : IAuctionRepository\n    {\n        private readonly ISession _session;\n\n        public AuctionRepository(ISession session)\n        { \n            _session = session;\n        }\n\n        public void Add(Auction auction)\n        {\n            _session.Save(auction); \n        }\n\n        public Auction FindBy(Guid Id)\n        {\n            return _session.Get<Auction>(Id);\n        }\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.NHibernateExample/DDDPPP.Chap21.NHibernateExample.Application/Infrastructure/Bid.hbm.xml",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n<hibernate-mapping xmlns=\"urn:nhibernate-mapping-2.2\"\n    namespace=\"DDDPPP.Chap21.NHibernateExample.Application.Model.BidHistory\"\n        assembly=\"DDDPPP.Chap21.NHibernateExample.Application\">\n\n  <class name=\"Bid\" table=\"BidHistory\" lazy=\"false\" >\n\n    <id name=\"Id\" column=\"Id\" type=\"Guid\">\n      <generator class=\"guid\"/>\n    </id>\n    \n    <property name=\"AuctionId\" column=\"AuctionId\" not-null=\"false\"/>\n    <property name=\"Bidder\" column=\"BidderId\" not-null=\"false\"/>\n\n    <component name=\"AmountBid\" class=\"DDDPPP.Chap21.NHibernateExample.Application.Model.Auction.Money\">\n      <property name=\"Value\" column=\"Bid\" not-null=\"false\"/>\n    </component>\n\n    <property name=\"TimeOfBid\" column=\"TimeOfBid\" not-null=\"false\"/>    \n  </class>\n</hibernate-mapping>"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.NHibernateExample/DDDPPP.Chap21.NHibernateExample.Application/Infrastructure/BidHistoryRepository.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing DDDPPP.Chap21.NHibernateExample.Application.Model.BidHistory;\nusing NHibernate;\n\nnamespace DDDPPP.Chap21.NHibernateExample.Application.Infrastructure\n{\n    public class BidHistoryRepository : IBidHistoryRepository\n    {\n        private readonly ISession _session;\n\n        public BidHistoryRepository(ISession session)\n        {\n            _session = session;\n        }\n\n        public int NoOfBidsFor(Guid autionId)\n        {\n            var sql = String.Format(\"SELECT Count(*) FROM BidHistory Where AuctionId = '{0}'\", autionId);\n            var query = _session.CreateSQLQuery(sql);\n            var result = query.UniqueResult();\n           \n            return Convert.ToInt32(result);                                                \n        }\n\n        public void Add(Bid bid)\n        {                       \n            _session.Save(bid);\n        }\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.NHibernateExample/DDDPPP.Chap21.NHibernateExample.Application/Infrastructure/DomainEvents.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\n\nnamespace DDDPPP.Chap21.NHibernateExample.Application.Infrastructure\n{\n    /// <summary>\n    /// Domain Events class from http://www.udidahan.com/2008/08/25/domain-events-take-2/\n    /// </summary>\n    public static class DomainEvents\n    {\n        [ThreadStatic]\n        private static List<Delegate> _actions;\n        private static List<Delegate> Actions\n        {\n            get\n            {\n                if (_actions == null)\n                {\n                    _actions = new List<Delegate>();\n                }\n                return _actions;\n            }\n        }\n       \n        public static IDisposable Register<T>(Action<T> callback)\n        {           \n            Actions.Add(callback);\n\n            return new DomainEventRegistrationRemover(() => Actions.Remove(callback));\n        }\n\n        public static void Raise<T>(T eventArgs)\n        {\n            foreach (Delegate action in Actions)\n            {\n                Action<T> typedAction = action as Action<T>;\n                if (typedAction != null)\n                {\n                    typedAction(eventArgs);\n                }\n            }\n        }\n     \n        private sealed class DomainEventRegistrationRemover : IDisposable\n        {\n            private readonly Action _callOnDispose;\n\n            public DomainEventRegistrationRemover(Action toCall)\n            {\n                _callOnDispose = toCall;\n            }\n\n            public void Dispose()\n            {\n                _callOnDispose();\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.NHibernateExample/DDDPPP.Chap21.NHibernateExample.Application/Infrastructure/Entity.cs",
    "content": "﻿namespace DDDPPP.Chap21.NHibernateExample.Application.Infrastructure\n{\n    public abstract class Entity<TId>\n    {\n        public TId Id { get; protected set; }\n        public int Version { get; private set; }\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.NHibernateExample/DDDPPP.Chap21.NHibernateExample.Application/Infrastructure/IClock.cs",
    "content": "﻿using System;\n\nnamespace DDDPPP.Chap21.NHibernateExample.Application.Infrastructure\n{\n    public interface IClock\n    {\n        DateTime Time();\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.NHibernateExample/DDDPPP.Chap21.NHibernateExample.Application/Infrastructure/SystemClock.cs",
    "content": "﻿using System;\n\nnamespace DDDPPP.Chap21.NHibernateExample.Application.Infrastructure\n{\n   public class SystemClock : IClock\n    {\n        public DateTime Time()\n        {\n            return DateTime.Now;\n        }\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.NHibernateExample/DDDPPP.Chap21.NHibernateExample.Application/Infrastructure/ValueObject.cs",
    "content": "﻿using System.Collections.Generic;\nusing System.Linq;\n\nnamespace DDDPPP.Chap21.NHibernateExample.Application.Infrastructure\n{\n    public abstract class ValueObject<T> where T : ValueObject<T>  \n    {\n        protected abstract IEnumerable<object> GetAttributesToIncludeInEqualityCheck();\n\n        public override bool Equals(object other)\n        {\n            return Equals(other as T);\n        }\n\n        public bool Equals(T other)\n        {\n            if (other == null)\n            {\n                return false;\n            }\n            return GetAttributesToIncludeInEqualityCheck().SequenceEqual(other.GetAttributesToIncludeInEqualityCheck());\n        }\n\n        public static bool operator ==(ValueObject<T> left, ValueObject<T> right)\n        {\n            return Equals(left, right);\n        }\n\n        public static bool operator !=(ValueObject<T> left, ValueObject<T> right)\n        {\n            return !(left == right);\n        }\n\n        public override int GetHashCode()\n        {\n            int hash = 17;\n            foreach (var obj in this.GetAttributesToIncludeInEqualityCheck())\n                hash = hash * 31 + (obj == null ? 0 : obj.GetHashCode());\n\n            return hash;\n        }\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.NHibernateExample/DDDPPP.Chap21.NHibernateExample.Application/Model/Auction/Auction.cs",
    "content": "﻿using System;\nusing DDDPPP.Chap21.NHibernateExample.Application.Infrastructure;\n\nnamespace DDDPPP.Chap21.NHibernateExample.Application.Model.Auction\n{\n    public class Auction : Entity<Guid>\n    {\n        private Auction() { }\n\n        public Auction(Guid id, Money startingPrice, DateTime endsAt)\n        {\n            if (id == Guid.Empty)\n                throw new ArgumentNullException(\"Auction Id cannot be null\");\n\n            if (startingPrice == null)\n                throw new ArgumentNullException(\"Starting Price cannot be null\");\n\n            if (endsAt == DateTime.MinValue)\n                throw new ArgumentNullException(\"EndsAt must have a value\");\n\n            Id = id;\n            StartingPrice = startingPrice;\n            EndsAt = endsAt;              \n        }\n\n        private Money StartingPrice { get; set; }\n        private WinningBid WinningBid { get; set; }\n        private DateTime EndsAt { get; set; }\n\n        private bool StillInProgress(DateTime currentTime)\n        {\n            return (EndsAt > currentTime);             \n        }\n\n        public void PlaceBidFor(Offer offer, DateTime currentTime)\n        {\n            if (StillInProgress(currentTime))\n            {\n                if (FirstOffer())\n                    PlaceABidForTheFirst(offer);\n                else if (BidderIsIncreasingMaximumBidToNew(offer))\n                    WinningBid = WinningBid.RaiseMaximumBidTo(offer.MaximumBid);\n                else if (WinningBid.CanBeExceededBy(offer.MaximumBid))\n                {\n                    var newBids = new AutomaticBidder().GenerateNextSequenceOfBidsAfter(offer, WinningBid);\n\n                    foreach (var bid in newBids)\n                        Place(bid);                    \n                }                                                   \n            }     \n        }\n\n        private bool BidderIsIncreasingMaximumBidToNew(Offer offer)\n        {\n            return WinningBid.WasMadeBy(offer.Bidder) && offer.MaximumBid.IsGreaterThan(WinningBid.MaximumBid);\n        }\n\n        private bool FirstOffer()\n        {\n            return WinningBid == null;\n        }\n\n        private void PlaceABidForTheFirst(Offer offer)\n        {\n            if (offer.MaximumBid.IsGreaterThanOrEqualTo(StartingPrice))\n                Place(new WinningBid(offer.Bidder, offer.MaximumBid, StartingPrice, offer.TimeOfOffer));            \n        }\n\n        private void Place(WinningBid newBid)\n        {\n            if (!FirstOffer() && WinningBid.WasMadeBy(newBid.Bidder))\n                DomainEvents.Raise(new OutBid(Id, WinningBid.Bidder));\n\n            WinningBid = newBid;\n            DomainEvents.Raise(new BidPlaced(Id, newBid.Bidder, newBid.CurrentAuctionPrice.Amount, newBid.TimeOfBid));             \n        }\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.NHibernateExample/DDDPPP.Chap21.NHibernateExample.Application/Model/Auction/AutomaticBidder.cs",
    "content": "﻿using System.Collections.Generic;\n\nnamespace DDDPPP.Chap21.NHibernateExample.Application.Model.Auction\n{\n    public class AutomaticBidder \n    {\n        public IEnumerable<WinningBid> GenerateNextSequenceOfBidsAfter(Offer offer, WinningBid currentWinningBid)\n        {\n            var bids = new List<WinningBid>();\n\n            if (currentWinningBid.MaximumBid.IsGreaterThanOrEqualTo(offer.MaximumBid))\n            {\n                var bidFromOffer = new WinningBid(offer.Bidder, offer.MaximumBid, offer.MaximumBid, offer.TimeOfOffer);\n                bids.Add(bidFromOffer);\n\n                bids.Add(CalculateNextBid(bidFromOffer, new Offer(currentWinningBid.Bidder, currentWinningBid.MaximumBid, currentWinningBid.TimeOfBid)));               \n            }\n            else\n            {\n                if (currentWinningBid.HasNotReachedMaximumBid())\n                {\n                    var currentBiddersLastBid = new WinningBid(currentWinningBid.Bidder, currentWinningBid.MaximumBid, currentWinningBid.MaximumBid, currentWinningBid.TimeOfBid);\n                    bids.Add(currentBiddersLastBid);\n\n                    bids.Add(CalculateNextBid(currentBiddersLastBid, offer));                   \n                }\n                else\n                    bids.Add(new WinningBid(offer.Bidder, currentWinningBid.CurrentAuctionPrice.BidIncrement(), offer.MaximumBid, offer.TimeOfOffer));\n            }\n\n            return bids;\n        }\n\n        private WinningBid CalculateNextBid(WinningBid winningbid, Offer offer)\n        {\n            WinningBid bid;\n\n            if (winningbid.CanBeExceededBy(offer.MaximumBid))\n                bid = new WinningBid(offer.Bidder, offer.MaximumBid, winningbid.CurrentAuctionPrice.BidIncrement(), offer.TimeOfOffer);\n            else\n                bid = new WinningBid(offer.Bidder, offer.MaximumBid, offer.MaximumBid, offer.TimeOfOffer);\n\n            return bid;\n        }\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.NHibernateExample/DDDPPP.Chap21.NHibernateExample.Application/Model/Auction/BidPlaced.cs",
    "content": "﻿using System;\n\nnamespace DDDPPP.Chap21.NHibernateExample.Application.Model.Auction\n{\n    public class BidPlaced\n    {\n        public BidPlaced(Guid auctionId, Guid bidderId, Money amountBid, DateTime timeOfBid)\n        {\n            if (auctionId == Guid.Empty)\n                throw new ArgumentNullException(\"Auction Id cannot be null\");\n\n            if (bidderId == Guid.Empty)\n                throw new ArgumentNullException(\"Bidder Id cannot be null\");\n\n            if (amountBid == null)\n                throw new ArgumentNullException(\"AmountBid cannot be null\");\n\n            if (timeOfBid == DateTime.MinValue)\n                throw new ArgumentNullException(\"TimeOfBid must have a value\");\n\n            AuctionId = auctionId;\n            Bidder = bidderId;\n            AmountBid = amountBid;\n            TimeOfBid = timeOfBid;\n        }\n\n        public Guid AuctionId { get; private set; }\n        public Guid Bidder { get; private set; }\n        public Money AmountBid { get; private set; }\n        public DateTime TimeOfBid { get; private set; }        \n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.NHibernateExample/DDDPPP.Chap21.NHibernateExample.Application/Model/Auction/IAuctionRepository.cs",
    "content": "﻿using System;\n\nnamespace DDDPPP.Chap21.NHibernateExample.Application.Model.Auction\n{\n    public interface IAuctionRepository\n    {\n        void Add(Auction auction);\n        Auction FindBy(Guid Id);\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.NHibernateExample/DDDPPP.Chap21.NHibernateExample.Application/Model/Auction/Money.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing DDDPPP.Chap21.NHibernateExample.Application.Infrastructure;\n\nnamespace DDDPPP.Chap21.NHibernateExample.Application.Model.Auction\n{\n    public class Money : ValueObject<Money>\n    {\n        protected decimal Value { get; set; }\n\n        public Money()\n            : this(0m)\n        {\n        }\n\n        public Money(decimal value)\n        {\n            ThrowExceptionIfNotValid(value);\n\n            Value = value;\n        }\n\n        private void ThrowExceptionIfNotValid(decimal value)\n        {\n            if (value % 0.01m != 0)\n                throw new MoreThanTwoDecimalPlacesInMoneyValueException();\n\n            if(value < 0)\n                throw new MoneyCannotBeANegativeValueException();\n        }\n\n        public Money add(Money money)\n        {\n            return new Money(Value + money.Value);\n        }\n\n        public bool IsGreaterThan(Money money)\n        {\n            return this.Value > money.Value;\n        }\n\n        public bool IsGreaterThanOrEqualTo(Money money)\n        {\n            return this.Value > money.Value || this.Equals(money);\n        }\n\n        public bool IsLessThanOrEqualTo(Money money)\n        {\n            return this.Value < money.Value || this.Equals(money);\n        }\n\n        public override string ToString()\n        {\n            return string.Format(\"{0}\", Value);\n        }\n\n        // Equality Implementtion\n\n        protected override IEnumerable<object> GetAttributesToIncludeInEqualityCheck()\n        {\n            return new List<Object>() {Value};\n        }\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.NHibernateExample/DDDPPP.Chap21.NHibernateExample.Application/Model/Auction/MoneyCannotBeANegativeValueException.cs",
    "content": "﻿using System;\n\nnamespace DDDPPP.Chap21.NHibernateExample.Application.Model.Auction\n{\n    public class MoneyCannotBeANegativeValueException : Exception\n    {\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.NHibernateExample/DDDPPP.Chap21.NHibernateExample.Application/Model/Auction/MoreThanTwoDecimalPlacesInMoneyValueException.cs",
    "content": "﻿using System;\n\nnamespace DDDPPP.Chap21.NHibernateExample.Application.Model.Auction\n{\n    public class MoreThanTwoDecimalPlacesInMoneyValueException : Exception \n    {\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.NHibernateExample/DDDPPP.Chap21.NHibernateExample.Application/Model/Auction/Offer.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing DDDPPP.Chap21.NHibernateExample.Application.Infrastructure;\n\nnamespace DDDPPP.Chap21.NHibernateExample.Application.Model.Auction\n{\n    public class Offer : ValueObject<Offer>\n    {\n        public Offer(Guid bidderId, Money maximumBid, DateTime timeOfOffer)\n        {\n            if (bidderId == Guid.Empty)\n                throw new ArgumentNullException(\"BidderId cannot be null\");\n\n            if (maximumBid == null)\n                throw new ArgumentNullException(\"MaximumBid cannot be null\");\n\n            if (timeOfOffer == DateTime.MinValue)\n                throw new ArgumentNullException(\"Time of Offer must have a value\");\n\n            Bidder = bidderId;\n            MaximumBid = maximumBid;\n            TimeOfOffer = timeOfOffer;\n        }\n\n        public Guid Bidder { get; private set; }\n        public Money MaximumBid { get; private set; }\n        public DateTime TimeOfOffer { get; private set; }\n       \n        protected override IEnumerable<object> GetAttributesToIncludeInEqualityCheck()\n        {\n            return new List<Object>()\n            {\n                Bidder, MaximumBid, TimeOfOffer\n            };\n        }\n    }   \n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.NHibernateExample/DDDPPP.Chap21.NHibernateExample.Application/Model/Auction/OutBid.cs",
    "content": "﻿using System;\n\nnamespace DDDPPP.Chap21.NHibernateExample.Application.Model.Auction\n{\n    public class OutBid\n    {\n        public OutBid(Guid auctionId, Guid bidderId)\n        {\n            if (auctionId == Guid.Empty)\n                throw new ArgumentNullException(\"Auction Id cannot be null\");\n\n            if (bidderId == Guid.Empty)\n                throw new ArgumentNullException(\"Bidder Id cannot be null\");\n\n            AuctionId = auctionId;\n            Bidder = bidderId;\n        }\n\n        public Guid AuctionId { get; private set; }\n        public Guid Bidder { get; private set; }\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.NHibernateExample/DDDPPP.Chap21.NHibernateExample.Application/Model/Auction/Price.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing DDDPPP.Chap21.NHibernateExample.Application.Infrastructure;\n\nnamespace DDDPPP.Chap21.NHibernateExample.Application.Model.Auction\n{\n    public class Price : ValueObject<Price>\n    {\n        private Price()\n        { }\n\n        public Price(Money amount)\n        {\n            if (amount == null)\n                throw new ArgumentNullException(\"Amount cannot be null\");\n\n            Amount = amount;\n        }\n\n        public Money Amount { get; private set; }\n\n        public Money BidIncrement()\n        {\n            if (Amount.IsGreaterThanOrEqualTo(new Money(0.01m)) && Amount.IsLessThanOrEqualTo(new Money(0.99m)))\n                    return Amount.add(new Money(0.05m));\n\n            if (Amount.IsGreaterThanOrEqualTo(new Money(1.00m)) && Amount.IsLessThanOrEqualTo(new Money(4.99m)))\n                    return Amount.add(new Money(0.20m));\n                \n            if (Amount.IsGreaterThanOrEqualTo(new Money(5.00m)) && Amount.IsLessThanOrEqualTo(new Money(14.99m)))\n                    return Amount.add(new Money(0.50m));\n\n            return Amount.add(new Money(1.00m));\n            \n        }\n\n        public bool CanBeExceededBy(Money offer)\n        {\n            return offer.IsGreaterThanOrEqualTo(BidIncrement());\n        }\n\n        protected override IEnumerable<object> GetAttributesToIncludeInEqualityCheck()\n        {\n            return new List<Object>() {Amount};\n        }\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.NHibernateExample/DDDPPP.Chap21.NHibernateExample.Application/Model/Auction/WinningBid.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing DDDPPP.Chap21.NHibernateExample.Application.Infrastructure;\n\nnamespace DDDPPP.Chap21.NHibernateExample.Application.Model.Auction\n{\n    public class WinningBid : ValueObject<WinningBid>\n    {\n        private WinningBid() { }\n\n        public WinningBid(Guid bidder, Money maximumBid, Money bid, DateTime timeOfBid)\n        {\n            if (bidder == Guid.Empty)\n                throw new ArgumentNullException(\"Bidder cannot be null\");\n\n            if (maximumBid == null)\n                throw new ArgumentNullException(\"MaximumBid cannot be null\");\n\n            if (timeOfBid == DateTime.MinValue)\n                throw new ArgumentNullException(\"TimeOfBid must have a value\");\n\n            Bidder = bidder;\n            MaximumBid = maximumBid;\n            TimeOfBid = timeOfBid;\n            CurrentAuctionPrice = new Price(bid);\n        }\n        \n        public Guid Bidder { get; private set; }\n        public Money MaximumBid { get; private set; }\n        public DateTime TimeOfBid { get; private set; }\n        public Price CurrentAuctionPrice { get; private set; }\n\n        public WinningBid RaiseMaximumBidTo(Money newAmount)\n        {\n            if (newAmount.IsGreaterThan(MaximumBid))\n                return new WinningBid(Bidder, newAmount, CurrentAuctionPrice.Amount, DateTime.Now);\n            else\n                throw new ApplicationException(\"Maximum bid increase must be larger than current maximum bid.\");\n        }\n\n        public bool WasMadeBy(Guid bidder)\n        {\n            return Bidder.Equals(bidder);\n        }\n\n        public bool CanBeExceededBy(Money offer)\n        {\n            return CurrentAuctionPrice.CanBeExceededBy(offer);\n        }\n\n        public bool HasNotReachedMaximumBid()\n        {\n            return MaximumBid.IsGreaterThan(CurrentAuctionPrice.Amount);\n        }\n\n        protected override IEnumerable<object> GetAttributesToIncludeInEqualityCheck()\n        {\n            return new List<Object>() { Bidder, MaximumBid, TimeOfBid, CurrentAuctionPrice };\n        }\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.NHibernateExample/DDDPPP.Chap21.NHibernateExample.Application/Model/BidHistory/Bid.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing DDDPPP.Chap21.NHibernateExample.Application.Model.Auction;\nusing DDDPPP.Chap21.NHibernateExample.Application.Infrastructure;\n\nnamespace DDDPPP.Chap21.NHibernateExample.Application.Model.BidHistory\n{\n    public class Bid : ValueObject<Bid>\n    {\n        private Bid()\n        { }\n\n        public Bid(Guid auctionId, Guid bidderId, Money amountBid, DateTime timeOfBid)\n        {\n            if (auctionId == Guid.Empty)\n                throw new ArgumentNullException(\"Auction Id cannot be null\");\n\n            if (bidderId == Guid.Empty)\n                throw new ArgumentNullException(\"Bidder Id cannot be null\");\n\n            if (amountBid == null)\n                throw new ArgumentNullException(\"AmountBid cannot be null\");\n\n            if (timeOfBid == DateTime.MinValue)\n                throw new ArgumentNullException(\"TimeOfBid must have a value\");\n\n            AuctionId = auctionId;\n            Bidder = bidderId;\n            AmountBid = amountBid;\n            TimeOfBid = timeOfBid;\n        }\n\n        public Guid AuctionId { get; private set; }\n        public Guid Bidder { get; private set; }\n        public Money AmountBid {get; private set;}\n        public DateTime TimeOfBid { get; private set; }\n        private Guid Id { get; set; }\n\n        protected override IEnumerable<object> GetAttributesToIncludeInEqualityCheck()\n        {\n            return new List<Object>() { Bidder, AuctionId, TimeOfBid, AmountBid };\n        }\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.NHibernateExample/DDDPPP.Chap21.NHibernateExample.Application/Model/BidHistory/IBidHistoryRepository.cs",
    "content": "﻿using System;\n\nnamespace DDDPPP.Chap21.NHibernateExample.Application.Model.BidHistory\n{\n    public interface IBidHistoryRepository\n    {\n        int NoOfBidsFor(Guid autionId);\n        void Add(Bid bid);\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.NHibernateExample/DDDPPP.Chap21.NHibernateExample.Application/Properties/AssemblyInfo.cs",
    "content": "﻿using System.Reflection;\nusing System.Runtime.CompilerServices;\nusing System.Runtime.InteropServices;\n\n// General Information about an assembly is controlled through the following \n// set of attributes. Change these attribute values to modify the information\n// associated with an assembly.\n[assembly: AssemblyTitle(\"DDDPPP.Chap21.NHibernateExample.Application\")]\n[assembly: AssemblyDescription(\"\")]\n[assembly: AssemblyConfiguration(\"\")]\n[assembly: AssemblyCompany(\"\")]\n[assembly: AssemblyProduct(\"DDDPPP.Chap21.NHibernateExample.Application\")]\n[assembly: AssemblyCopyright(\"Copyright ©  2013\")]\n[assembly: AssemblyTrademark(\"\")]\n[assembly: AssemblyCulture(\"\")]\n\n// Setting ComVisible to false makes the types in this assembly not visible \n// to COM components.  If you need to access a type in this assembly from \n// COM, set the ComVisible attribute to true on that type.\n[assembly: ComVisible(false)]\n\n// The following GUID is for the ID of the typelib if this project is exposed to COM\n[assembly: Guid(\"9b21db29-abc5-48cb-a40a-dd70d162ebb3\")]\n\n// Version information for an assembly consists of the following four values:\n//\n//      Major Version\n//      Minor Version \n//      Build Number\n//      Revision\n//\n// You can specify all the values or you can default the Build and Revision Numbers \n// by using the '*' as shown below:\n// [assembly: AssemblyVersion(\"1.0.*\")]\n[assembly: AssemblyVersion(\"1.0.0.0\")]\n[assembly: AssemblyFileVersion(\"1.0.0.0\")]\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.NHibernateExample/DDDPPP.Chap21.NHibernateExample.Application/packages.config",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<packages>\n  <package id=\"Iesi.Collections\" version=\"3.2.0.4000\" targetFramework=\"net45\" />\n  <package id=\"NHibernate\" version=\"3.3.3.4001\" targetFramework=\"net45\" />\n  <package id=\"structuremap\" version=\"2.6.4.1\" targetFramework=\"net45\" />\n</packages>"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.NHibernateExample/DDDPPP.Chap21.NHibernateExample.Presentation/App.config",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n<configuration>\n\n  <configSections>\n    <section name=\"hibernate-configuration\" type=\"NHibernate.Cfg.ConfigurationSectionHandler, NHibernate\" />\n  </configSections>\n  \n  <startup> \n      <supportedRuntime version=\"v4.0\" sku=\".NETFramework,Version=v4.5\" />\n  </startup>\n\n  <hibernate-configuration xmlns=\"urn:nhibernate-configuration-2.2\">\n    <session-factory name=\"NHibernate.Test\">\n      <property name=\"connection.driver_class\">NHibernate.Driver.SqlClientDriver</property>\n      <property name=\"connection.connection_string\">\n        Data Source=.\\SQLEXPRESS;Database=AuctionExample;Trusted_Connection=True;\n      </property>\n      <property name=\"adonet.batch_size\">10</property>\n      <property name=\"show_sql\">false</property>\n      <property name=\"dialect\">NHibernate.Dialect.MsSql2005Dialect</property>\n      <property name=\"command_timeout\">60</property>\n      <property name=\"query.substitutions\">true 1, false 0, yes 'Y', no 'N'</property>      \n    </session-factory>\n  </hibernate-configuration>\n</configuration>"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.NHibernateExample/DDDPPP.Chap21.NHibernateExample.Presentation/DDDPPP.Chap21.NHibernateExample.Presentation.csproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"4.0\" DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <Import Project=\"$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props\" Condition=\"Exists('$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props')\" />\n  <PropertyGroup>\n    <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>\n    <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>\n    <ProjectGuid>{36970D08-67F1-4E50-ACB6-416252F4E5E7}</ProjectGuid>\n    <OutputType>Exe</OutputType>\n    <AppDesignerFolder>Properties</AppDesignerFolder>\n    <RootNamespace>DDDPPP.Chap21.NHibernateExample.Presentation</RootNamespace>\n    <AssemblyName>DDDPPP.Chap21.NHibernateExample.Presentation</AssemblyName>\n    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\n    <FileAlignment>512</FileAlignment>\n    <SolutionDir Condition=\"$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'\">..\\</SolutionDir>\n    <RestorePackages>true</RestorePackages>\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' \">\n    <PlatformTarget>AnyCPU</PlatformTarget>\n    <DebugSymbols>true</DebugSymbols>\n    <DebugType>full</DebugType>\n    <Optimize>false</Optimize>\n    <OutputPath>bin\\Debug\\</OutputPath>\n    <DefineConstants>DEBUG;TRACE</DefineConstants>\n    <ErrorReport>prompt</ErrorReport>\n    <WarningLevel>4</WarningLevel>\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' \">\n    <PlatformTarget>AnyCPU</PlatformTarget>\n    <DebugType>pdbonly</DebugType>\n    <Optimize>true</Optimize>\n    <OutputPath>bin\\Release\\</OutputPath>\n    <DefineConstants>TRACE</DefineConstants>\n    <ErrorReport>prompt</ErrorReport>\n    <WarningLevel>4</WarningLevel>\n  </PropertyGroup>\n  <ItemGroup>\n    <Reference Include=\"StructureMap\">\n      <HintPath>..\\packages\\structuremap.2.6.4.1\\lib\\net40\\StructureMap.dll</HintPath>\n    </Reference>\n    <Reference Include=\"System\" />\n    <Reference Include=\"System.Core\" />\n    <Reference Include=\"System.Xml.Linq\" />\n    <Reference Include=\"System.Data.DataSetExtensions\" />\n    <Reference Include=\"Microsoft.CSharp\" />\n    <Reference Include=\"System.Data\" />\n    <Reference Include=\"System.Xml\" />\n  </ItemGroup>\n  <ItemGroup>\n    <Compile Include=\"Program.cs\" />\n    <Compile Include=\"Properties\\AssemblyInfo.cs\" />\n  </ItemGroup>\n  <ItemGroup>\n    <None Include=\"App.config\" />\n    <None Include=\"packages.config\" />\n  </ItemGroup>\n  <ItemGroup>\n    <ProjectReference Include=\"..\\DDDPPP.Chap21.NHibernateExample.Application\\DDDPPP.Chap21.NHibernateExample.Application.csproj\">\n      <Project>{0e1bc35e-205d-454c-9ebc-ca849c46e6c2}</Project>\n      <Name>DDDPPP.Chap21.NHibernateExample.Application</Name>\n    </ProjectReference>\n  </ItemGroup>\n  <Import Project=\"$(MSBuildToolsPath)\\Microsoft.CSharp.targets\" />\n  <Import Project=\"$(SolutionDir)\\.nuget\\NuGet.targets\" Condition=\"Exists('$(SolutionDir)\\.nuget\\NuGet.targets')\" />\n  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \n       Other similar extension points exist, see Microsoft.Common.targets.\n  <Target Name=\"BeforeBuild\">\n  </Target>\n  <Target Name=\"AfterBuild\">\n  </Target>\n  -->\n</Project>"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.NHibernateExample/DDDPPP.Chap21.NHibernateExample.Presentation/Program.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing DDDPPP.Chap21.NHibernateExample.Application.Application.BusinessUseCases;\nusing DDDPPP.Chap21.NHibernateExample.Application.Application.Queries;\nusing DDDPPP.Chap21.NHibernateExample.Application;\nusing StructureMap;\n\nnamespace DDDPPP.Chap21.NHibernateExample.Presentation\n{\n    public class Program\n    {\n       private static Dictionary<Guid, String> members = new Dictionary<Guid, string>();\n\n       public static void Main(string[] args)\n        {\n            Bootstrapper.Startup();\n                     \n            var memberIdA = Guid.NewGuid();\n            var memberIdB = Guid.NewGuid();\n\n            members.Add(memberIdA, \"Ted\");\n            members.Add(memberIdB, \"Rob\");\n\n            var auctionId = CreateAuction();\n            \n            Bid(auctionId, memberIdA, 10m);\n            Bid(auctionId, memberIdB, 1.49m);\n            Bid(auctionId, memberIdB, 10.01m);\n            Bid(auctionId, memberIdB, 12.00m);\n            Bid(auctionId, memberIdA, 12.00m);\n        }\n\n       public static Guid CreateAuction()\n       {\n           var createAuctionService = ObjectFactory.GetInstance<CreateAuction>();\n\n           var newAuctionRequest = new NewAuctionRequest();\n\n           newAuctionRequest.StartingPrice = 0.99m;\n           newAuctionRequest.EndsAt = DateTime.Now.AddDays(1);\n\n           var auctionId = createAuctionService.Create(newAuctionRequest);\n\n           return auctionId;\n       }\n\n       public static void Bid(Guid auctionId, Guid memberId, decimal amount)\n       {\n           var bidOnAuctionService = ObjectFactory.GetInstance<BidOnAuction>();\n\n           bidOnAuctionService.Bid(auctionId, memberId, amount);\n\n           PrintStatusOfAuctionBy(auctionId);\n           PrintBidHistoryOf(auctionId);\n           Console.WriteLine(\"Hit any key to continue\");\n           Console.ReadLine();\n       }\n\n        public static void PrintStatusOfAuctionBy(Guid auctionId)\n        {\n            var auctionSummaryQuery = ObjectFactory.GetInstance<AuctionStatusQuery>();\n            var status = auctionSummaryQuery.AuctionStatus(auctionId);\n           \n            Console.WriteLine(\"No Of Bids: \" + status.NumberOfBids);\n            Console.WriteLine(\"Current Bid: \" + status.CurrentPrice.ToString(\"##.##\"));\n            Console.WriteLine(\"Winning Bidder: \" + FindNameOfBidderWith(status.WinningBidderId));\n            Console.WriteLine(\"Time Remaining: \" + status.TimeRemaining);            \n            Console.WriteLine();\n        }\n\n        public static void PrintBidHistoryOf(Guid auctionId)\n        {\n            var bidHistoryQuery = ObjectFactory.GetInstance<BidHistoryQuery>();\n            var status = bidHistoryQuery.BidHistoryFor(auctionId);\n\n            Console.WriteLine(\"Bids..\");\n\n            foreach (var bid in status)\n                Console.WriteLine(FindNameOfBidderWith(bid.Bidder) + \"\\t - \" + bid.AmountBid.ToString(\"G\") + \"\\t at \" + bid.TimeOfBid);\n            Console.WriteLine(\"------------------------------\");\n            Console.WriteLine();\n        }\n\n        public static string FindNameOfBidderWith(Guid id)\n        {\n            if (members.ContainsKey(id))\n                return members[id];\n            else\n                return string.Empty;\n        }\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.NHibernateExample/DDDPPP.Chap21.NHibernateExample.Presentation/Properties/AssemblyInfo.cs",
    "content": "﻿using System.Reflection;\nusing System.Runtime.CompilerServices;\nusing System.Runtime.InteropServices;\n\n// General Information about an assembly is controlled through the following \n// set of attributes. Change these attribute values to modify the information\n// associated with an assembly.\n[assembly: AssemblyTitle(\"DDDPPP.Chap21.NHibernateExample.Presentation\")]\n[assembly: AssemblyDescription(\"\")]\n[assembly: AssemblyConfiguration(\"\")]\n[assembly: AssemblyCompany(\"\")]\n[assembly: AssemblyProduct(\"DDDPPP.Chap21.NHibernateExample.Presentation\")]\n[assembly: AssemblyCopyright(\"Copyright ©  2013\")]\n[assembly: AssemblyTrademark(\"\")]\n[assembly: AssemblyCulture(\"\")]\n\n// Setting ComVisible to false makes the types in this assembly not visible \n// to COM components.  If you need to access a type in this assembly from \n// COM, set the ComVisible attribute to true on that type.\n[assembly: ComVisible(false)]\n\n// The following GUID is for the ID of the typelib if this project is exposed to COM\n[assembly: Guid(\"bc8a1c12-a525-4b93-89dc-832e1e62a2e2\")]\n\n// Version information for an assembly consists of the following four values:\n//\n//      Major Version\n//      Minor Version \n//      Build Number\n//      Revision\n//\n// You can specify all the values or you can default the Build and Revision Numbers \n// by using the '*' as shown below:\n// [assembly: AssemblyVersion(\"1.0.*\")]\n[assembly: AssemblyVersion(\"1.0.0.0\")]\n[assembly: AssemblyFileVersion(\"1.0.0.0\")]\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.NHibernateExample/DDDPPP.Chap21.NHibernateExample.Presentation/packages.config",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<packages>\n  <package id=\"structuremap\" version=\"2.6.4.1\" targetFramework=\"net45\" />\n</packages>"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.NHibernateExample/DDDPPP.Chap21.NHibernateExample.sln",
    "content": "﻿\nMicrosoft Visual Studio Solution File, Format Version 12.00\n# Visual Studio 2012\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"DDDPPP.Chap21.NHibernateExample.Presentation\", \"DDDPPP.Chap21.NHibernateExample.Presentation\\DDDPPP.Chap21.NHibernateExample.Presentation.csproj\", \"{36970D08-67F1-4E50-ACB6-416252F4E5E7}\"\nEndProject\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"DDDPPP.Chap21.NHibernateExample.Application\", \"DDDPPP.Chap21.NHibernateExample.Application\\DDDPPP.Chap21.NHibernateExample.Application.csproj\", \"{0E1BC35E-205D-454C-9EBC-CA849C46E6C2}\"\nEndProject\nProject(\"{2150E333-8FDC-42A3-9474-1A3956D46DE8}\") = \".nuget\", \".nuget\", \"{061C53AB-DF4B-47E9-AEE3-21C2120CB110}\"\n\tProjectSection(SolutionItems) = preProject\n\t\t.nuget\\NuGet.Config = .nuget\\NuGet.Config\n\t\t.nuget\\NuGet.exe = .nuget\\NuGet.exe\n\t\t.nuget\\NuGet.targets = .nuget\\NuGet.targets\n\tEndProjectSection\nEndProject\nGlobal\n\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\n\t\tDebug|Any CPU = Debug|Any CPU\n\t\tRelease|Any CPU = Release|Any CPU\n\tEndGlobalSection\n\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\n\t\t{36970D08-67F1-4E50-ACB6-416252F4E5E7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{36970D08-67F1-4E50-ACB6-416252F4E5E7}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{36970D08-67F1-4E50-ACB6-416252F4E5E7}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{36970D08-67F1-4E50-ACB6-416252F4E5E7}.Release|Any CPU.Build.0 = Release|Any CPU\n\t\t{0E1BC35E-205D-454C-9EBC-CA849C46E6C2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{0E1BC35E-205D-454C-9EBC-CA849C46E6C2}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{0E1BC35E-205D-454C-9EBC-CA849C46E6C2}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{0E1BC35E-205D-454C-9EBC-CA849C46E6C2}.Release|Any CPU.Build.0 = Release|Any CPU\n\tEndGlobalSection\n\tGlobalSection(SolutionProperties) = preSolution\n\t\tHideSolutionNode = FALSE\n\tEndGlobalSection\nEndGlobal\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.RavenDBExample/.nuget/NuGet.Config",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<configuration>\n  <solution>\n    <add key=\"disableSourceControlIntegration\" value=\"true\" />\n  </solution>\n</configuration>"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.RavenDBExample/.nuget/NuGet.targets",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n    <PropertyGroup>\n        <SolutionDir Condition=\"$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'\">$(MSBuildProjectDirectory)\\..\\</SolutionDir>\n        \n        <!-- Enable the restore command to run before builds -->\n        <RestorePackages Condition=\"  '$(RestorePackages)' == '' \">false</RestorePackages>\n\n        <!-- Property that enables building a package from a project -->\n        <BuildPackage Condition=\" '$(BuildPackage)' == '' \">false</BuildPackage>\n\n        <!-- Determines if package restore consent is required to restore packages -->\n        <RequireRestoreConsent Condition=\" '$(RequireRestoreConsent)' != 'false' \">true</RequireRestoreConsent>\n        \n        <!-- Download NuGet.exe if it does not already exist -->\n        <DownloadNuGetExe Condition=\" '$(DownloadNuGetExe)' == '' \">false</DownloadNuGetExe>\n    </PropertyGroup>\n    \n    <ItemGroup Condition=\" '$(PackageSources)' == '' \">\n        <!-- Package sources used to restore packages. By default, registered sources under %APPDATA%\\NuGet\\NuGet.Config will be used -->\n        <!-- The official NuGet package source (https://www.nuget.org/api/v2/) will be excluded if package sources are specified and it does not appear in the list -->\n        <!--\n            <PackageSource Include=\"https://www.nuget.org/api/v2/\" />\n            <PackageSource Include=\"https://my-nuget-source/nuget/\" />\n        -->\n    </ItemGroup>\n\n    <PropertyGroup Condition=\" '$(OS)' == 'Windows_NT'\">\n        <!-- Windows specific commands -->\n        <NuGetToolsPath>$([System.IO.Path]::Combine($(SolutionDir), \".nuget\"))</NuGetToolsPath>\n        <PackagesConfig>$([System.IO.Path]::Combine($(ProjectDir), \"packages.config\"))</PackagesConfig>\n    </PropertyGroup>\n    \n    <PropertyGroup Condition=\" '$(OS)' != 'Windows_NT'\">\n        <!-- We need to launch nuget.exe with the mono command if we're not on windows -->\n        <NuGetToolsPath>$(SolutionDir).nuget</NuGetToolsPath>\n        <PackagesConfig>packages.config</PackagesConfig>\n    </PropertyGroup>\n    \n    <PropertyGroup>\n        <!-- NuGet command -->\n        <NuGetExePath Condition=\" '$(NuGetExePath)' == '' \">$(NuGetToolsPath)\\NuGet.exe</NuGetExePath>\n        <PackageSources Condition=\" $(PackageSources) == '' \">@(PackageSource)</PackageSources>\n        \n        <NuGetCommand Condition=\" '$(OS)' == 'Windows_NT'\">\"$(NuGetExePath)\"</NuGetCommand>\n        <NuGetCommand Condition=\" '$(OS)' != 'Windows_NT' \">mono --runtime=v4.0.30319 $(NuGetExePath)</NuGetCommand>\n\n        <PackageOutputDir Condition=\"$(PackageOutputDir) == ''\">$(TargetDir.Trim('\\\\'))</PackageOutputDir>\n        \n        <RequireConsentSwitch Condition=\" $(RequireRestoreConsent) == 'true' \">-RequireConsent</RequireConsentSwitch>\n        <NonInteractiveSwitch Condition=\" '$(VisualStudioVersion)' != '' AND '$(OS)' == 'Windows_NT' \">-NonInteractive</NonInteractiveSwitch>\n        \n        <PaddedSolutionDir Condition=\" '$(OS)' == 'Windows_NT'\">\"$(SolutionDir) \"</PaddedSolutionDir>\n        <PaddedSolutionDir Condition=\" '$(OS)' != 'Windows_NT' \">\"$(SolutionDir)\"</PaddedSolutionDir>\n\n        <!-- Commands -->\n        <RestoreCommand>$(NuGetCommand) install \"$(PackagesConfig)\" -source \"$(PackageSources)\"  $(NonInteractiveSwitch) $(RequireConsentSwitch) -solutionDir $(PaddedSolutionDir)</RestoreCommand>\n        <BuildCommand>$(NuGetCommand) pack \"$(ProjectPath)\" -Properties \"Configuration=$(Configuration);Platform=$(Platform)\" $(NonInteractiveSwitch) -OutputDirectory \"$(PackageOutputDir)\" -symbols</BuildCommand>\n\n        <!-- We need to ensure packages are restored prior to assembly resolve -->\n        <BuildDependsOn Condition=\"$(RestorePackages) == 'true'\">\n            RestorePackages;\n            $(BuildDependsOn);\n        </BuildDependsOn>\n\n        <!-- Make the build depend on restore packages -->\n        <BuildDependsOn Condition=\"$(BuildPackage) == 'true'\">\n            $(BuildDependsOn);\n            BuildPackage;\n        </BuildDependsOn>\n    </PropertyGroup>\n\n    <Target Name=\"CheckPrerequisites\">\n        <!-- Raise an error if we're unable to locate nuget.exe  -->\n        <Error Condition=\"'$(DownloadNuGetExe)' != 'true' AND !Exists('$(NuGetExePath)')\" Text=\"Unable to locate '$(NuGetExePath)'\" />\n        <!--\n        Take advantage of MsBuild's build dependency tracking to make sure that we only ever download nuget.exe once.\n        This effectively acts as a lock that makes sure that the download operation will only happen once and all\n        parallel builds will have to wait for it to complete.\n        -->\n        <MsBuild Targets=\"_DownloadNuGet\" Projects=\"$(MSBuildThisFileFullPath)\" Properties=\"Configuration=NOT_IMPORTANT;DownloadNuGetExe=$(DownloadNuGetExe)\" />\n    </Target>\n\n    <Target Name=\"_DownloadNuGet\">\n        <DownloadNuGet OutputFilename=\"$(NuGetExePath)\" Condition=\" '$(DownloadNuGetExe)' == 'true' AND !Exists('$(NuGetExePath)')\" />\n    </Target>\n\n    <Target Name=\"RestorePackages\" DependsOnTargets=\"CheckPrerequisites\">\n        <Exec Command=\"$(RestoreCommand)\"\n              Condition=\"'$(OS)' != 'Windows_NT' And Exists('$(PackagesConfig)')\" />\n              \n        <Exec Command=\"$(RestoreCommand)\"\n              LogStandardErrorAsError=\"true\"\n              Condition=\"'$(OS)' == 'Windows_NT' And Exists('$(PackagesConfig)')\" />\n    </Target>\n\n    <Target Name=\"BuildPackage\" DependsOnTargets=\"CheckPrerequisites\">\n        <Exec Command=\"$(BuildCommand)\" \n              Condition=\" '$(OS)' != 'Windows_NT' \" />\n              \n        <Exec Command=\"$(BuildCommand)\"\n              LogStandardErrorAsError=\"true\"\n              Condition=\" '$(OS)' == 'Windows_NT' \" />\n    </Target>\n    \n    <UsingTask TaskName=\"DownloadNuGet\" TaskFactory=\"CodeTaskFactory\" AssemblyFile=\"$(MSBuildToolsPath)\\Microsoft.Build.Tasks.v4.0.dll\">\n        <ParameterGroup>\n            <OutputFilename ParameterType=\"System.String\" Required=\"true\" />\n        </ParameterGroup>\n        <Task>\n            <Reference Include=\"System.Core\" />\n            <Using Namespace=\"System\" />\n            <Using Namespace=\"System.IO\" />\n            <Using Namespace=\"System.Net\" />\n            <Using Namespace=\"Microsoft.Build.Framework\" />\n            <Using Namespace=\"Microsoft.Build.Utilities\" />\n            <Code Type=\"Fragment\" Language=\"cs\">\n                <![CDATA[\n                try {\n                    OutputFilename = Path.GetFullPath(OutputFilename);\n\n                    Log.LogMessage(\"Downloading latest version of NuGet.exe...\");\n                    WebClient webClient = new WebClient();\n                    webClient.DownloadFile(\"https://www.nuget.org/nuget.exe\", OutputFilename);\n\n                    return true;\n                }\n                catch (Exception ex) {\n                    Log.LogErrorFromException(ex);\n                    return false;\n                }\n            ]]>\n            </Code>\n        </Task>\n    </UsingTask>\n</Project>"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.RavenDBExample/DDDPPP.Chap21.RavenDBExample.Application/Application/BusinessUseCases/BidOnAuction.cs",
    "content": "﻿using System;\nusing DDDPPP.Chap21.RavenDBExample.Application.Model.Auction;\nusing DDDPPP.Chap21.RavenDBExample.Application.Model.BidHistory;\nusing Raven.Client;\nusing Raven.Abstractions.Exceptions;\nusing DDDPPP.Chap21.RavenDBExample.Application.Infrastructure;\n\nnamespace DDDPPP.Chap21.RavenDBExample.Application.Application.BusinessUseCases\n{\n    public class BidOnAuction\n    {\n        private IAuctionRepository _auctions;\n        private IBidHistoryRepository _bidHistory;\n        private IDocumentSession _unitOfWork;\n        private IClock _clock;\n\n        public BidOnAuction(IAuctionRepository auctions, \n                            IBidHistoryRepository bidHistory, \n                            IDocumentSession unitOfWork, \n                            IClock clock)\n        {\n            _auctions = auctions;\n            _bidHistory = bidHistory;\n            _unitOfWork = unitOfWork;\n            _clock = clock;\n        }\n\n        public void Bid(Guid auctionId, Guid memberId, decimal amount)\n        {\n            try\n            {\n                using (DomainEvents.Register(OutBid()))\n                using (DomainEvents.Register(BidPlaced()))\n                {\n                    var auction = _auctions.FindBy(auctionId);\n\n                    var bidAmount = new Money(amount);\n\n                    auction.PlaceBidFor(new Offer(memberId, bidAmount, _clock.Time()), _clock.Time());\n                }\n                \n                _unitOfWork.SaveChanges();         \n            }\n            catch (ConcurrencyException ex)\n            {\n                _unitOfWork.Advanced.Clear();\n                Bid(auctionId, memberId, amount);\n            }\n        }\n\n        private Action<BidPlaced> BidPlaced()\n        {\n            return (BidPlaced e) =>\n            {               \n                var bidEvent = new Bid(e.AuctionId, e.Bidder, e.AmountBid, e.TimeOfBid);\n              \n                _bidHistory.Add(bidEvent);\n            };\n        }\n\n        private Action<OutBid> OutBid()\n        {\n            return (OutBid e) =>\n            {\n                // Email customer to say that he has been out bid                \n            };\n        }\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.RavenDBExample/DDDPPP.Chap21.RavenDBExample.Application/Application/BusinessUseCases/CreateAuction.cs",
    "content": "﻿using System;\nusing DDDPPP.Chap21.RavenDBExample.Application.Model.Auction;\nusing DDDPPP.Chap21.RavenDBExample.Application.Model.BidHistory;\nusing Raven.Client;\nusing DDDPPP.Chap21.RavenDBExample.Application.Infrastructure;\n\nnamespace DDDPPP.Chap21.RavenDBExample.Application.Application.BusinessUseCases\n{\n    public class CreateAuction\n    {\n        private IAuctionRepository _auctions;\n        private IDocumentSession _unitOfWork;\n\n        public CreateAuction(IAuctionRepository auctions, IDocumentSession unitOfWork)\n        {\n            _auctions = auctions;            \n            _unitOfWork = unitOfWork;\n        }\n\n        public Guid Create(NewAuctionRequest command)\n        {\n            var auctionId = Guid.NewGuid();\n            var startingPrice = new Money(command.StartingPrice);\n  \n            _auctions.Add(new Auction(auctionId, startingPrice, command.EndsAt));\n\n            _unitOfWork.SaveChanges();\n            \n            return auctionId;\n        }\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.RavenDBExample/DDDPPP.Chap21.RavenDBExample.Application/Application/BusinessUseCases/NewAuctionRequest.cs",
    "content": "﻿using System;\n\nnamespace DDDPPP.Chap21.RavenDBExample.Application.Application.BusinessUseCases\n{\n    public class NewAuctionRequest\n    {\n        public decimal StartingPrice { get; set; }\n        public DateTime EndsAt { get; set; }\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.RavenDBExample/DDDPPP.Chap21.RavenDBExample.Application/Application/Queries/AuctionStatus.cs",
    "content": "﻿using System;\n\nnamespace DDDPPP.Chap21.RavenDBExample.Application.Application.Queries\n{\n    public class AuctionStatus\n    {\n        public Guid Id { get; set; }\n        public decimal CurrentPrice { get; set; }\n        public DateTime AuctionEnds { get; set; }\n        public Guid WinningBidderId { get; set; }\n        public int NumberOfBids { get; set; }\n        public TimeSpan TimeRemaining { get; set; }\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.RavenDBExample/DDDPPP.Chap21.RavenDBExample.Application/Application/Queries/AuctionStatusQuery.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing Raven.Client;\nusing DDDPPP.Chap21.RavenDBExample.Application.Model.Auction;\nusing DDDPPP.Chap21.RavenDBExample.Application.Model.BidHistory;\nusing DDDPPP.Chap21.RavenDBExample.Application.Infrastructure;\n\nnamespace DDDPPP.Chap21.RavenDBExample.Application.Application.Queries\n{\n    public class AuctionStatusQuery\n    {\n        private readonly IAuctionRepository _auctions;\n        private readonly IBidHistoryRepository _bidHistory;\n        private readonly IClock _clock;\n\n        public AuctionStatusQuery(IAuctionRepository auctions, \n                                  IBidHistoryRepository bidHistory,\n                                  IClock clock)\n        {\n            _auctions = auctions;\n            _bidHistory = bidHistory;\n            _clock = clock;\n        }\n\n        public AuctionStatus AuctionStatus(Guid auctionId)\n        {\n            var auction = _auctions.FindBy(auctionId);\n\n            var status = new AuctionStatus();\n\n            status.AuctionEnds = auction.EndsAt;\n            status.Id = auction.Id;\n\n            if (auction.HasBeenBidOn())\n            {\n                status.CurrentPrice = auction.WinningBid.CurrentAuctionPrice.Amount.Value;\n                status.WinningBidderId = auction.WinningBid.Bidder;\n            }\n\n            status.TimeRemaining = TimeRemaining(auction.EndsAt);\n            status.NumberOfBids = _bidHistory.NoOfBidsFor(auctionId);\n\n            return status;\n        }\n\n        public TimeSpan TimeRemaining(DateTime AuctionEnds)\n        {\n            if (_clock.Time() < AuctionEnds)\n                return AuctionEnds.Subtract(_clock.Time());\n            else\n                return new TimeSpan();\n        }\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.RavenDBExample/DDDPPP.Chap21.RavenDBExample.Application/Application/Queries/BidHistoryQuery.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing Raven.Client;\nusing DDDPPP.Chap21.RavenDBExample.Application.Model.BidHistory;\n\nnamespace DDDPPP.Chap21.RavenDBExample.Application.Application.Queries\n{\n    public class BidHistoryQuery\n    {\n        private readonly IBidHistoryRepository _bidHistory;\n\n        public BidHistoryQuery(IBidHistoryRepository bidHistory)\n        {\n            _bidHistory = bidHistory;         \n        }\n\n        public IEnumerable<BidInformation> BidHistoryFor(Guid auctionId)\n        {\n            var bidHistory = _bidHistory.FindBy(auctionId);\n\n            return Convert(bidHistory.ShowAllBids());\n        }\n\n        public IEnumerable<BidInformation> Convert(IEnumerable<Bid> bids)\n        {\n            var bidInfo = new List<BidInformation>();\n\n            foreach (var bid in bids)\n            {\n                bidInfo.Add(new BidInformation() { Bidder = bid.Bidder, AmountBid = bid.AmountBid.Value, TimeOfBid = bid.TimeOfBid });\n            }\n\n            return bidInfo;\n        }\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.RavenDBExample/DDDPPP.Chap21.RavenDBExample.Application/Application/Queries/BidInformation.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace DDDPPP.Chap21.RavenDBExample.Application.Application.Queries\n{\n    public class BidInformation\n    {\n        public Guid Bidder { get;  set; }\n        public decimal AmountBid { get;  set; }\n        public string currency { get; set; }\n        public DateTime TimeOfBid { get;  set; }\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.RavenDBExample/DDDPPP.Chap21.RavenDBExample.Application/Bootstrapper.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing Raven.Client;\nusing Raven.Client.Document;\nusing Raven.Client.Extensions;\nusing Raven.Client.Indexes;\nusing StructureMap;\nusing DDDPPP.Chap21.RavenDBExample.Application.Infrastructure;\nusing DDDPPP.Chap21.RavenDBExample.Application.Model.Auction;\nusing DDDPPP.Chap21.RavenDBExample.Application.Model.BidHistory;\n\nnamespace DDDPPP.Chap21.RavenDBExample.Application\n{\n    public static class Bootstrapper\n    {\n        public static void Startup()\n        {           \n            var documentStore = new DocumentStore\n            {\n                ConnectionStringName = \"RavenDB\"\n            }.Initialize();\n\n            documentStore.DatabaseCommands.EnsureDatabaseExists(\"RepositoryExample\");\n\n            ObjectFactory.Initialize(config =>\n            {\n                config.For<IAuctionRepository>().Use<AuctionRepository>();\n                config.For<IBidHistoryRepository>().Use<Infrastructure.BidHistoryRepository>();\n                config.For<IClock>().Use<SystemClock>();\n\n                config.For<IDocumentStore>().Use(documentStore);\n                config.For<IDocumentSession>()\n                    .HybridHttpOrThreadLocalScoped()\n                    .Use(x =>\n                    {\n                        var store = x.GetInstance<IDocumentStore>();\n                        var session = store.OpenSession();\n                        session.Advanced.UseOptimisticConcurrency = true;\n                        return session;\n                    });\n\n                IndexCreation.CreateIndexes(typeof(BidHistory_NumberOfBids).Assembly, documentStore);\n            });\n        }\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.RavenDBExample/DDDPPP.Chap21.RavenDBExample.Application/DDDPPP.Chap21.RavenDBExample.Application.csproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"4.0\" DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <Import Project=\"$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props\" Condition=\"Exists('$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props')\" />\n  <PropertyGroup>\n    <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>\n    <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>\n    <ProjectGuid>{09529C4E-59D9-4758-AB00-240982F0BC63}</ProjectGuid>\n    <OutputType>Library</OutputType>\n    <AppDesignerFolder>Properties</AppDesignerFolder>\n    <RootNamespace>DDDPPP.Chap21.RavenDBExample.Application</RootNamespace>\n    <AssemblyName>DDDPPP.Chap21.RavenDBExample.Application</AssemblyName>\n    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\n    <FileAlignment>512</FileAlignment>\n    <SolutionDir Condition=\"$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'\">..\\</SolutionDir>\n    <RestorePackages>true</RestorePackages>\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' \">\n    <DebugSymbols>true</DebugSymbols>\n    <DebugType>full</DebugType>\n    <Optimize>false</Optimize>\n    <OutputPath>bin\\Debug\\</OutputPath>\n    <DefineConstants>DEBUG;TRACE</DefineConstants>\n    <ErrorReport>prompt</ErrorReport>\n    <WarningLevel>4</WarningLevel>\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' \">\n    <DebugType>pdbonly</DebugType>\n    <Optimize>true</Optimize>\n    <OutputPath>bin\\Release\\</OutputPath>\n    <DefineConstants>TRACE</DefineConstants>\n    <ErrorReport>prompt</ErrorReport>\n    <WarningLevel>4</WarningLevel>\n  </PropertyGroup>\n  <ItemGroup>\n    <Reference Include=\"Raven.Abstractions\">\n      <HintPath>..\\packages\\RavenDB.Client.2.5.2750\\lib\\net45\\Raven.Abstractions.dll</HintPath>\n    </Reference>\n    <Reference Include=\"Raven.Client.Lightweight\">\n      <HintPath>..\\packages\\RavenDB.Client.2.5.2750\\lib\\net45\\Raven.Client.Lightweight.dll</HintPath>\n    </Reference>\n    <Reference Include=\"StructureMap\">\n      <HintPath>..\\packages\\structuremap.2.6.4.1\\lib\\net40\\StructureMap.dll</HintPath>\n    </Reference>\n    <Reference Include=\"System\" />\n    <Reference Include=\"System.ComponentModel.Composition\" />\n    <Reference Include=\"System.Core\" />\n    <Reference Include=\"System.Xml.Linq\" />\n    <Reference Include=\"System.Data.DataSetExtensions\" />\n    <Reference Include=\"Microsoft.CSharp\" />\n    <Reference Include=\"System.Data\" />\n    <Reference Include=\"System.Xml\" />\n  </ItemGroup>\n  <ItemGroup>\n    <Compile Include=\"Application\\BusinessUseCases\\BidOnAuction.cs\" />\n    <Compile Include=\"Application\\BusinessUseCases\\CreateAuction.cs\" />\n    <Compile Include=\"Application\\BusinessUseCases\\NewAuctionRequest.cs\" />\n    <Compile Include=\"Application\\Queries\\AuctionStatus.cs\" />\n    <Compile Include=\"Application\\Queries\\AuctionStatusQuery.cs\" />\n    <Compile Include=\"Application\\Queries\\BidHistoryQuery.cs\" />\n    <Compile Include=\"Application\\Queries\\BidInformation.cs\" />\n    <Compile Include=\"Bootstrapper.cs\" />\n    <Compile Include=\"Infrastructure\\AuctionRepository.cs\" />\n    <Compile Include=\"Infrastructure\\BidHistory_NumberOfBids.cs\" />\n    <Compile Include=\"Infrastructure\\BidHistoryRepository.cs\" />\n    <Compile Include=\"Infrastructure\\DomainEvents.cs\" />\n    <Compile Include=\"Infrastructure\\Entity.cs\" />\n    <Compile Include=\"Infrastructure\\ValueObject.cs\" />\n    <Compile Include=\"Model\\Auction\\Auction.cs\" />\n    <Compile Include=\"Model\\Auction\\AutomaticBidder.cs\" />\n    <Compile Include=\"Model\\Auction\\BidPlaced.cs\" />\n    <Compile Include=\"Infrastructure\\IClock.cs\" />\n    <Compile Include=\"Model\\Auction\\Money.cs\" />\n    <Compile Include=\"Model\\Auction\\MoneyCannotBeANegativeValueException.cs\" />\n    <Compile Include=\"Model\\Auction\\MoreThanTwoDecimalPlacesInMoneyValueException.cs\" />\n    <Compile Include=\"Model\\Auction\\Offer.cs\" />\n    <Compile Include=\"Model\\Auction\\OutBid.cs\" />\n    <Compile Include=\"Model\\Auction\\Price.cs\" />\n    <Compile Include=\"Infrastructure\\SystemClock.cs\" />\n    <Compile Include=\"Model\\BidHistory\\Bid.cs\" />\n    <Compile Include=\"Model\\Auction\\IAuctionRepository.cs\" />\n    <Compile Include=\"Model\\Auction\\WinningBid.cs\" />\n    <Compile Include=\"Model\\BidHistory\\BidHistory.cs\" />\n    <Compile Include=\"Model\\BidHistory\\IBidHistoryRepository.cs\" />\n    <Compile Include=\"Properties\\AssemblyInfo.cs\" />\n  </ItemGroup>\n  <ItemGroup />\n  <ItemGroup>\n    <None Include=\"packages.config\" />\n  </ItemGroup>\n  <Import Project=\"$(MSBuildToolsPath)\\Microsoft.CSharp.targets\" />\n  <Import Project=\"$(SolutionDir)\\.nuget\\NuGet.targets\" Condition=\"Exists('$(SolutionDir)\\.nuget\\NuGet.targets')\" />\n  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \n       Other similar extension points exist, see Microsoft.Common.targets.\n  <Target Name=\"BeforeBuild\">\n  </Target>\n  <Target Name=\"AfterBuild\">\n  </Target>\n  -->\n</Project>"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.RavenDBExample/DDDPPP.Chap21.RavenDBExample.Application/Infrastructure/AuctionRepository.cs",
    "content": "﻿using System;\nusing DDDPPP.Chap21.RavenDBExample.Application.Model.Auction;\nusing Raven.Client;\nusing DDDPPP.Chap21.RavenDBExample.Application.Application.Queries;\n\nnamespace DDDPPP.Chap21.RavenDBExample.Application.Infrastructure\n{\n    public class AuctionRepository : IAuctionRepository\n    {\n        private readonly IDocumentSession _documentSession;\n\n        public AuctionRepository(IDocumentSession documentSession)\n        { \n            _documentSession = documentSession;\n        }\n\n        public void Add(Auction auction)\n        {\n            _documentSession.Store(auction); \n        }\n\n        public Auction FindBy(Guid Id)\n        {\n            return _documentSession.Load<Auction>(\"Auctions/\" + Id);\n        }\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.RavenDBExample/DDDPPP.Chap21.RavenDBExample.Application/Infrastructure/BidHistoryRepository.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing DDDPPP.Chap21.RavenDBExample.Application.Model.BidHistory;\nusing Raven.Client;\n\nnamespace DDDPPP.Chap21.RavenDBExample.Application.Infrastructure\n{\n    public class BidHistoryRepository : IBidHistoryRepository\n    {\n        private readonly IDocumentSession _documentSession;\n\n        public BidHistoryRepository(IDocumentSession documentSession)\n        { \n            _documentSession = documentSession;\n        }\n\n        public int NoOfBidsFor(Guid autionId)\n        {            \n            \n            var count = _documentSession.Query<BidHistory_NumberOfBids.ReduceResult, BidHistory_NumberOfBids>()\n                            .Customize(x => x.WaitForNonStaleResultsAsOfNow())\n                            .FirstOrDefault(x => x.AuctionId == autionId)\n                                ?? new BidHistory_NumberOfBids.ReduceResult();\n\n            return count.Count;                                           \n        }\n\n        public void Add(Bid bid)\n        {\n            _documentSession.Store(bid); \n        }\n\n        public Model.BidHistory.BidHistory FindBy(Guid auctionId)\n        {\n            var bids = _documentSession.Query<Bid>()\n                                .Customize(x => x.WaitForNonStaleResultsAsOfNow())\n                                .Where(x => x.AuctionId == auctionId)                                \n                                .ToList();\n\n            return new Model.BidHistory.BidHistory(bids);\n        }\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.RavenDBExample/DDDPPP.Chap21.RavenDBExample.Application/Infrastructure/BidHistory_NumberOfBids.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing Raven.Client.Indexes;\nusing Raven.Client.Document;\nusing Raven.Abstractions.Indexing;\nusing DDDPPP.Chap21.RavenDBExample.Application.Model.BidHistory;\nusing DDDPPP.Chap21.RavenDBExample.Application.Application;\n\nnamespace DDDPPP.Chap21.RavenDBExample.Application.Infrastructure\n{\n    public class BidHistory_NumberOfBids : AbstractIndexCreationTask<Bid, BidHistory_NumberOfBids.ReduceResult>\n    {\n        public class ReduceResult\n        {\n            public Guid AuctionId { get; set; }\n            public int Count { get; set; }\n        }\n\n        public BidHistory_NumberOfBids()\n        {\n            Map = bids => from bid in bids\n                  select new {bid.AuctionId, Count = 1};\n\n            Reduce = results => from result in results\n                                group result by result.AuctionId into g\n                                select new { AuctionId = g.Key, Count = g.Sum(x => x.Count) };\n        }\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.RavenDBExample/DDDPPP.Chap21.RavenDBExample.Application/Infrastructure/DomainEvents.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace DDDPPP.Chap21.RavenDBExample.Application.Infrastructure\n{\n    /// <summary>\n    /// Domain Events class from http://www.udidahan.com/2008/08/25/domain-events-take-2/\n    /// </summary>\n    public static class DomainEvents\n    {\n        [ThreadStatic]\n        private static List<Delegate> _actions;\n        private static List<Delegate> Actions\n        {\n            get\n            {\n                if (_actions == null)\n                {\n                    _actions = new List<Delegate>();\n                }\n                return _actions;\n            }\n        }\n       \n        public static IDisposable Register<T>(Action<T> callback)\n        {           \n            Actions.Add(callback);\n\n            return new DomainEventRegistrationRemover(() => Actions.Remove(callback));\n        }\n\n        public static void Raise<T>(T eventArgs)\n        {\n            foreach (Delegate action in Actions)\n            {\n                Action<T> typedAction = action as Action<T>;\n                if (typedAction != null)\n                {\n                    typedAction(eventArgs);\n                }\n            }\n        }\n     \n        private sealed class DomainEventRegistrationRemover : IDisposable\n        {\n            private readonly Action _callOnDispose;\n\n            public DomainEventRegistrationRemover(Action toCall)\n            {\n                _callOnDispose = toCall;\n            }\n\n            public void Dispose()\n            {\n                _callOnDispose();\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.RavenDBExample/DDDPPP.Chap21.RavenDBExample.Application/Infrastructure/Entity.cs",
    "content": "﻿using System;\n\nnamespace DDDPPP.Chap21.RavenDBExample.Application.Infrastructure\n{\n    public abstract class Entity<TId>\n    {\n        public TId Id { get; protected set; }\n        public int Version { get; private set; }\n    }\n}"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.RavenDBExample/DDDPPP.Chap21.RavenDBExample.Application/Infrastructure/IClock.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace DDDPPP.Chap21.RavenDBExample.Application.Infrastructure\n{\n    public interface IClock\n    {\n        DateTime Time();\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.RavenDBExample/DDDPPP.Chap21.RavenDBExample.Application/Infrastructure/SystemClock.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace DDDPPP.Chap21.RavenDBExample.Application.Infrastructure\n{\n    public class SystemClock : IClock\n    {\n        public DateTime Time()\n        {\n            return DateTime.Now;\n        }\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.RavenDBExample/DDDPPP.Chap21.RavenDBExample.Application/Infrastructure/ValueObject.cs",
    "content": "﻿using System.Collections.Generic;\nusing System.Linq;\n\nnamespace DDDPPP.Chap21.RavenDBExample.Application.Infrastructure\n{\n    public abstract class ValueObject<T> where T : ValueObject<T>\n    {\n        protected abstract IEnumerable<object> GetAttributesToIncludeInEqualityCheck();\n\n        public override bool Equals(object other)\n        {\n            return Equals(other as T);\n        }\n\n        public bool Equals(T other)\n        {\n            if (other == null)\n            {\n                return false;\n            }\n            return GetAttributesToIncludeInEqualityCheck().SequenceEqual(other.GetAttributesToIncludeInEqualityCheck());\n        }\n\n        public static bool operator ==(ValueObject<T> left, ValueObject<T> right)\n        {\n            return Equals(left, right);\n        }\n\n        public static bool operator !=(ValueObject<T> left, ValueObject<T> right)\n        {\n            return !(left == right);\n        }\n\n        public override int GetHashCode()\n        {\n            int hash = 17;\n            foreach (var obj in this.GetAttributesToIncludeInEqualityCheck())\n                hash = hash * 31 + (obj == null ? 0 : obj.GetHashCode());\n\n            return hash;\n        }\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.RavenDBExample/DDDPPP.Chap21.RavenDBExample.Application/Model/Auction/Auction.cs",
    "content": "﻿using System;\nusing DDDPPP.Chap21.RavenDBExample.Application.Infrastructure;\n\nnamespace DDDPPP.Chap21.RavenDBExample.Application.Model.Auction\n{\n    public class Auction : Entity<Guid>\n    {\n        private Auction() { }\n\n        public Auction(Guid id, Money startingPrice, DateTime endsAt)\n        {\n            if (id == Guid.Empty)\n                throw new ArgumentNullException(\"Auction Id cannot be null\");\n\n            if (startingPrice == null)\n                throw new ArgumentNullException(\"Starting Price cannot be null\");\n\n            if (endsAt == DateTime.MinValue)\n                throw new ArgumentNullException(\"EndsAt must have a value\");\n\n            Id = id;\n            StartingPrice = startingPrice;\n            EndsAt = endsAt;\n        }\n\n        public Money StartingPrice { get; private set; }\n        public WinningBid WinningBid { get; private set; }\n        public DateTime EndsAt { get; private set; }\n\n        public bool StillInProgress(DateTime currentTime)\n        {\n            return (EndsAt > currentTime);\n        }\n\n        public void PlaceBidFor(Offer offer, DateTime currentTime)\n        {\n            if (StillInProgress(currentTime))\n            {\n                if (FirstOffer())\n                    PlaceABidForTheFirst(offer);\n                else if (BidderIsIncreasingMaximumBidToNew(offer))\n                    WinningBid = WinningBid.RaiseMaximumBidTo(offer.MaximumBid);\n                else if (WinningBid.CanBeExceededBy(offer.MaximumBid))\n                {\n                    var newBids = new AutomaticBidder().GenerateNextSequenceOfBidsAfter(offer, WinningBid);\n\n                    foreach (var bid in newBids)\n                        Place(bid);\n                }\n            }\n        }\n\n        private bool BidderIsIncreasingMaximumBidToNew(Offer offer)\n        {\n            return WinningBid.WasMadeBy(offer.Bidder) && offer.MaximumBid.IsGreaterThan(WinningBid.MaximumBid);\n        }\n\n        public bool HasBeenBidOn()\n        {\n            return WinningBid == null;\n        }   \n\n        private bool FirstOffer()\n        {\n            return WinningBid == null;\n        }\n\n        private void PlaceABidForTheFirst(Offer offer)\n        {\n            if (offer.MaximumBid.IsGreaterThanOrEqualTo(StartingPrice))\n                Place(new WinningBid(offer.Bidder, offer.MaximumBid, StartingPrice, offer.TimeOfOffer));\n        }\n\n        private void Place(WinningBid newBid)\n        {\n            if (!FirstOffer() && WinningBid.WasMadeBy(newBid.Bidder))\n                DomainEvents.Raise(new OutBid(Id, WinningBid.Bidder));\n\n            WinningBid = newBid;\n            DomainEvents.Raise(new BidPlaced(Id, newBid.Bidder, newBid.CurrentAuctionPrice.Amount, newBid.TimeOfBid));\n        }\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.RavenDBExample/DDDPPP.Chap21.RavenDBExample.Application/Model/Auction/AutomaticBidder.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace DDDPPP.Chap21.RavenDBExample.Application.Model.Auction\n{\n    public class AutomaticBidder // DomainService\n    {\n        public IEnumerable<WinningBid> GenerateNextSequenceOfBidsAfter(Offer offer, WinningBid currentWinningBid)\n        {\n            var bids = new List<WinningBid>();\n\n            if (currentWinningBid.MaximumBid.IsGreaterThanOrEqualTo(offer.MaximumBid))\n            {\n                var bidFromOffer = new WinningBid(offer.Bidder, offer.MaximumBid, offer.MaximumBid, offer.TimeOfOffer);\n                bids.Add(bidFromOffer);\n\n                bids.Add(CalculateNextBid(bidFromOffer, new Offer(currentWinningBid.Bidder, currentWinningBid.MaximumBid, currentWinningBid.TimeOfBid)));\n            }\n            else\n            {\n                if (currentWinningBid.HasNotReachedMaximumBid())\n                {\n                    var currentBiddersLastBid = new WinningBid(currentWinningBid.Bidder, currentWinningBid.MaximumBid, currentWinningBid.MaximumBid, currentWinningBid.TimeOfBid);\n                    bids.Add(currentBiddersLastBid);\n\n                    bids.Add(CalculateNextBid(currentBiddersLastBid, offer));\n                }\n                else\n                    bids.Add(new WinningBid(offer.Bidder, currentWinningBid.CurrentAuctionPrice.BidIncrement(), offer.MaximumBid, offer.TimeOfOffer));\n            }\n\n            return bids;\n        }\n\n        private WinningBid CalculateNextBid(WinningBid winningbid, Offer offer)\n        {\n            WinningBid bid;\n\n            if (winningbid.CanBeExceededBy(offer.MaximumBid))\n                bid = new WinningBid(offer.Bidder, offer.MaximumBid, winningbid.CurrentAuctionPrice.BidIncrement(), offer.TimeOfOffer);\n            else\n                bid = new WinningBid(offer.Bidder, offer.MaximumBid, offer.MaximumBid, offer.TimeOfOffer);\n\n            return bid;\n        }\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.RavenDBExample/DDDPPP.Chap21.RavenDBExample.Application/Model/Auction/BidPlaced.cs",
    "content": "﻿using System;\n\nnamespace DDDPPP.Chap21.RavenDBExample.Application.Model.Auction\n{\n    public class BidPlaced\n    {\n        public BidPlaced(Guid auctionId, Guid bidderId, Money amountBid, DateTime timeOfBid)\n        {\n            if (auctionId == Guid.Empty)\n                throw new ArgumentNullException(\"Auction Id cannot be null\");\n\n            if (bidderId == Guid.Empty)\n                throw new ArgumentNullException(\"Bidder Id cannot be null\");\n\n            if (amountBid == null)\n                throw new ArgumentNullException(\"AmountBid cannot be null\");\n\n            if (timeOfBid == DateTime.MinValue)\n                throw new ArgumentNullException(\"TimeOfBid must have a value\");\n\n            AuctionId = auctionId;\n            Bidder = bidderId;\n            AmountBid = amountBid;\n            TimeOfBid = timeOfBid;\n        }\n\n        public Guid AuctionId { get; private set; }\n        public Guid Bidder { get; private set; }\n        public Money AmountBid { get; private set; }\n        public DateTime TimeOfBid { get; private set; }\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.RavenDBExample/DDDPPP.Chap21.RavenDBExample.Application/Model/Auction/IAuctionRepository.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\nusing DDDPPP.Chap21.RavenDBExample.Application.Application.Queries;\n\nnamespace DDDPPP.Chap21.RavenDBExample.Application.Model.Auction\n{\n    public interface IAuctionRepository\n    {\n        void Add(Auction auction);\n        Auction FindBy(Guid Id);\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.RavenDBExample/DDDPPP.Chap21.RavenDBExample.Application/Model/Auction/Money.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing DDDPPP.Chap21.RavenDBExample.Application.Infrastructure;\n\nnamespace DDDPPP.Chap21.RavenDBExample.Application.Model.Auction\n{\n    public class Money : ValueObject<Money>, IComparable<Money>\n    {\n        public decimal Value { get; private set; }\n\n        public Money()\n            : this(0m)\n        {\n        }\n\n        public Money(decimal value)\n        {\n            ThrowExceptionIfNotValid(value);\n\n            Value = value;\n        }\n\n        private void ThrowExceptionIfNotValid(decimal value)\n        {\n            if (value % 0.01m != 0)\n                throw new MoreThanTwoDecimalPlacesInMoneyValueException();\n\n            if (value < 0)\n                throw new MoneyCannotBeANegativeValueException();\n        }\n\n        public Money add(Money money)\n        {\n            return new Money(Value + money.Value);\n        }\n\n        public bool IsGreaterThan(Money money)\n        {\n            return this.Value > money.Value;\n        }\n\n        public bool IsGreaterThanOrEqualTo(Money money)\n        {\n            return this.Value > money.Value || this.Equals(money);\n        }\n\n        public bool IsLessThanOrEqualTo(Money money)\n        {\n            return this.Value < money.Value || this.Equals(money);\n        }\n\n        public override string ToString()\n        {\n            return string.Format(\"{0}\", Value);\n        }\n\n        protected override IEnumerable<object> GetAttributesToIncludeInEqualityCheck()\n        {\n            return new List<Object>() { Value };\n        }\n\n        public int CompareTo(Money other)\n        {\n            return this.Value.CompareTo(other.Value);\n        }\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.RavenDBExample/DDDPPP.Chap21.RavenDBExample.Application/Model/Auction/MoneyCannotBeANegativeValueException.cs",
    "content": "﻿using System;\n\nnamespace DDDPPP.Chap21.RavenDBExample.Application.Model.Auction\n{\n    public class MoneyCannotBeANegativeValueException : Exception\n    {\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.RavenDBExample/DDDPPP.Chap21.RavenDBExample.Application/Model/Auction/MoreThanTwoDecimalPlacesInMoneyValueException.cs",
    "content": "﻿using System;\n\nnamespace DDDPPP.Chap21.RavenDBExample.Application.Model.Auction\n{\n    public class MoreThanTwoDecimalPlacesInMoneyValueException : Exception\n    {\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.RavenDBExample/DDDPPP.Chap21.RavenDBExample.Application/Model/Auction/Offer.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing DDDPPP.Chap21.RavenDBExample.Application.Infrastructure;\n\nnamespace DDDPPP.Chap21.RavenDBExample.Application.Model.Auction\n{\n    public class Offer : ValueObject<Offer>\n    {\n        public Offer(Guid bidderId, Money maximumBid, DateTime timeOfOffer)\n        {\n            if (bidderId == Guid.Empty)\n                throw new ArgumentNullException(\"BidderId cannot be null\");\n\n            if (maximumBid == null)\n                throw new ArgumentNullException(\"MaximumBid cannot be null\");\n\n            if (timeOfOffer == DateTime.MinValue)\n                throw new ArgumentNullException(\"Time of Offer must have a value\");\n\n            Bidder = bidderId;\n            MaximumBid = maximumBid;\n            TimeOfOffer = timeOfOffer;\n        }\n\n        public Guid Bidder { get; private set; }\n        public Money MaximumBid { get; private set; }\n        public DateTime TimeOfOffer { get; private set; }\n\n        protected override IEnumerable<object> GetAttributesToIncludeInEqualityCheck()\n        {\n            return new List<Object>()\n            {\n                Bidder, MaximumBid, TimeOfOffer\n            };\n        }\n    }\n}\n\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.RavenDBExample/DDDPPP.Chap21.RavenDBExample.Application/Model/Auction/OutBid.cs",
    "content": "﻿using System;\n\nnamespace DDDPPP.Chap21.RavenDBExample.Application.Model.Auction\n{\n    public class OutBid\n    {\n        public OutBid(Guid auctionId, Guid bidderId)\n        {\n            if (auctionId == Guid.Empty)\n                throw new ArgumentNullException(\"Auction Id cannot be null\");\n\n            if (bidderId == Guid.Empty)\n                throw new ArgumentNullException(\"Bidder Id cannot be null\");\n\n            AuctionId = auctionId;\n            Bidder = bidderId;\n        }\n\n        public Guid AuctionId { get; private set; }\n        public Guid Bidder { get; private set; }\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.RavenDBExample/DDDPPP.Chap21.RavenDBExample.Application/Model/Auction/Price.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing DDDPPP.Chap21.RavenDBExample.Application.Infrastructure;\n\nnamespace DDDPPP.Chap21.RavenDBExample.Application.Model.Auction\n{\n    public class Price : ValueObject<Price>\n    {\n        private Price()\n        { }\n\n        public Price(Money amount)\n        {\n            if (amount == null)\n                throw new ArgumentNullException(\"Amount cannot be null\");\n\n            Amount = amount;\n        }\n\n        public Money Amount { get; private set; }\n\n        public Money BidIncrement()\n        {\n            if (Amount.IsGreaterThanOrEqualTo(new Money(0.01m)) && Amount.IsLessThanOrEqualTo(new Money(0.99m)))\n                return Amount.add(new Money(0.05m));\n\n            if (Amount.IsGreaterThanOrEqualTo(new Money(1.00m)) && Amount.IsLessThanOrEqualTo(new Money(4.99m)))\n                return Amount.add(new Money(0.20m));\n\n            if (Amount.IsGreaterThanOrEqualTo(new Money(5.00m)) && Amount.IsLessThanOrEqualTo(new Money(14.99m)))\n                return Amount.add(new Money(0.50m));\n\n            return Amount.add(new Money(1.00m));\n\n        }\n\n        public bool CanBeExceededBy(Money offer)\n        {\n            return offer.IsGreaterThanOrEqualTo(BidIncrement());\n        }\n\n        protected override IEnumerable<object> GetAttributesToIncludeInEqualityCheck()\n        {\n            return new List<Object>() { Amount };\n        }\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.RavenDBExample/DDDPPP.Chap21.RavenDBExample.Application/Model/Auction/WinningBid.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing DDDPPP.Chap21.RavenDBExample.Application.Infrastructure;\n\nnamespace DDDPPP.Chap21.RavenDBExample.Application.Model.Auction\n{\n    public class WinningBid : ValueObject<WinningBid>\n    {\n        private WinningBid() { }\n\n        public WinningBid(Guid bidder, Money maximumBid, Money bid, DateTime timeOfBid)\n        {\n            if (bidder == Guid.Empty)\n                throw new ArgumentNullException(\"Bidder cannot be null\");\n\n            if (maximumBid == null)\n                throw new ArgumentNullException(\"MaximumBid cannot be null\");\n\n            if (timeOfBid == DateTime.MinValue)\n                throw new ArgumentNullException(\"TimeOfBid must have a value\");\n\n            Bidder = bidder;\n            MaximumBid = maximumBid;\n            TimeOfBid = timeOfBid;\n            CurrentAuctionPrice = new Price(bid);\n        }\n\n        public Guid Bidder { get; private set; }\n        public Money MaximumBid { get; private set; }\n        public DateTime TimeOfBid { get; private set; }\n        public Price CurrentAuctionPrice { get; private set; }\n\n        public WinningBid RaiseMaximumBidTo(Money newAmount)\n        {\n            if (newAmount.IsGreaterThan(MaximumBid))\n                return new WinningBid(Bidder, newAmount, CurrentAuctionPrice.Amount, DateTime.Now);\n            else\n                throw new ApplicationException(\"Maximum bid increase must be larger than current maximum bid.\");\n        }\n\n        public bool WasMadeBy(Guid bidder)\n        {\n            return Bidder.Equals(bidder);\n        }\n\n        public bool CanBeExceededBy(Money offer)\n        {\n            return CurrentAuctionPrice.CanBeExceededBy(offer);\n        }\n\n        public bool HasNotReachedMaximumBid()\n        {\n            return MaximumBid.IsGreaterThan(CurrentAuctionPrice.Amount);\n        }\n\n        protected override IEnumerable<object> GetAttributesToIncludeInEqualityCheck()\n        {\n            return new List<Object>() { Bidder, MaximumBid, TimeOfBid, CurrentAuctionPrice };\n        }\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.RavenDBExample/DDDPPP.Chap21.RavenDBExample.Application/Model/BidHistory/Bid.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing DDDPPP.Chap21.RavenDBExample.Application.Model.Auction;\nusing DDDPPP.Chap21.RavenDBExample.Application.Infrastructure;\n\nnamespace DDDPPP.Chap21.RavenDBExample.Application.Model.BidHistory\n{\n    public class Bid : ValueObject<Bid>\n    {\n        private Bid()\n        { }\n\n        public Bid(Guid auctionId, Guid bidderId, Money amountBid, DateTime timeOfBid)\n        {\n            if (auctionId == Guid.Empty)\n                throw new ArgumentNullException(\"Auction Id cannot be null\");\n\n            if (bidderId == Guid.Empty)\n                throw new ArgumentNullException(\"Bidder Id cannot be null\");\n\n            if (amountBid == null)\n                throw new ArgumentNullException(\"AmountBid cannot be null\");\n\n            if (timeOfBid == DateTime.MinValue)\n                throw new ArgumentNullException(\"TimeOfBid must have a value\");\n\n            AuctionId = auctionId;\n            Bidder = bidderId;\n            AmountBid = amountBid;\n            TimeOfBid = timeOfBid;\n        }\n\n        public Guid AuctionId { get; private set; }\n        public Guid Bidder { get; private set; }\n        public Money AmountBid { get; private set; }\n        public DateTime TimeOfBid { get; private set; }\n        private Guid Id { get; set; }\n\n        protected override IEnumerable<object> GetAttributesToIncludeInEqualityCheck()\n        {\n            return new List<Object>() { Bidder, AuctionId, TimeOfBid, AmountBid };\n        }\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.RavenDBExample/DDDPPP.Chap21.RavenDBExample.Application/Model/BidHistory/BidHistory.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\n\nnamespace DDDPPP.Chap21.RavenDBExample.Application.Model.BidHistory\n{\n    public class BidHistory\n    {\n        private IEnumerable<Bid> _bids;\n\n        public BidHistory(IEnumerable<Bid> bids)\n        {\n            if (bids == null)\n                throw new ArgumentNullException(\"Bids cannot be null\");\n\n            _bids = bids;\n        }\n\n        public IEnumerable<Bid> ShowAllBids()\n        {\n            var bids = _bids.OrderByDescending(x => x.AmountBid).ThenBy(x => x.TimeOfBid);\n\n            return bids;\n        }\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.RavenDBExample/DDDPPP.Chap21.RavenDBExample.Application/Model/BidHistory/IBidHistoryRepository.cs",
    "content": "﻿using System;\n\nnamespace DDDPPP.Chap21.RavenDBExample.Application.Model.BidHistory\n{\n    public interface IBidHistoryRepository\n    {\n        int NoOfBidsFor(Guid autionId);\n        void Add(Bid bid);\n        BidHistory FindBy(Guid auctionId);\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.RavenDBExample/DDDPPP.Chap21.RavenDBExample.Application/Properties/AssemblyInfo.cs",
    "content": "﻿using System.Reflection;\nusing System.Runtime.CompilerServices;\nusing System.Runtime.InteropServices;\n\n// General Information about an assembly is controlled through the following \n// set of attributes. Change these attribute values to modify the information\n// associated with an assembly.\n[assembly: AssemblyTitle(\"DDDPPP.Chap21.RavenDBExample.Application\")]\n[assembly: AssemblyDescription(\"\")]\n[assembly: AssemblyConfiguration(\"\")]\n[assembly: AssemblyCompany(\"\")]\n[assembly: AssemblyProduct(\"DDDPPP.Chap21.RavenDBExample.Application\")]\n[assembly: AssemblyCopyright(\"Copyright ©  2013\")]\n[assembly: AssemblyTrademark(\"\")]\n[assembly: AssemblyCulture(\"\")]\n\n// Setting ComVisible to false makes the types in this assembly not visible \n// to COM components.  If you need to access a type in this assembly from \n// COM, set the ComVisible attribute to true on that type.\n[assembly: ComVisible(false)]\n\n// The following GUID is for the ID of the typelib if this project is exposed to COM\n[assembly: Guid(\"9eb30163-dd6b-4652-bf05-af2775bc2ac9\")]\n\n// Version information for an assembly consists of the following four values:\n//\n//      Major Version\n//      Minor Version \n//      Build Number\n//      Revision\n//\n// You can specify all the values or you can default the Build and Revision Numbers \n// by using the '*' as shown below:\n// [assembly: AssemblyVersion(\"1.0.*\")]\n[assembly: AssemblyVersion(\"1.0.0.0\")]\n[assembly: AssemblyFileVersion(\"1.0.0.0\")]\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.RavenDBExample/DDDPPP.Chap21.RavenDBExample.Application/packages.config",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<packages>\n  <package id=\"RavenDB.Client\" version=\"2.5.2750\" targetFramework=\"net45\" />\n  <package id=\"structuremap\" version=\"2.6.4.1\" targetFramework=\"net45\" />\n</packages>"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.RavenDBExample/DDDPPP.Chap21.RavenDBExample.Application.Tests/DDDPPP.Chap21.RavenDBExample.Application.Tests.csproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"4.0\" DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <Import Project=\"$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props\" Condition=\"Exists('$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props')\" />\n  <PropertyGroup>\n    <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>\n    <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>\n    <ProjectGuid>{9AAF22F4-8A27-4552-A137-C9739E60D035}</ProjectGuid>\n    <OutputType>Library</OutputType>\n    <AppDesignerFolder>Properties</AppDesignerFolder>\n    <RootNamespace>DDDPPP.Chap21.RavenDBExample.Application.Tests</RootNamespace>\n    <AssemblyName>DDDPPP.Chap21.RavenDBExample.Application.Tests</AssemblyName>\n    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\n    <FileAlignment>512</FileAlignment>\n    <SolutionDir Condition=\"$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'\">..\\</SolutionDir>\n    <RestorePackages>true</RestorePackages>\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' \">\n    <DebugSymbols>true</DebugSymbols>\n    <DebugType>full</DebugType>\n    <Optimize>false</Optimize>\n    <OutputPath>bin\\Debug\\</OutputPath>\n    <DefineConstants>DEBUG;TRACE</DefineConstants>\n    <ErrorReport>prompt</ErrorReport>\n    <WarningLevel>4</WarningLevel>\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' \">\n    <DebugType>pdbonly</DebugType>\n    <Optimize>true</Optimize>\n    <OutputPath>bin\\Release\\</OutputPath>\n    <DefineConstants>TRACE</DefineConstants>\n    <ErrorReport>prompt</ErrorReport>\n    <WarningLevel>4</WarningLevel>\n  </PropertyGroup>\n  <ItemGroup>\n    <Reference Include=\"nunit.core\">\n      <HintPath>..\\packages\\NUnitTestAdapter.1.0\\lib\\nunit.core.dll</HintPath>\n      <Private>False</Private>\n    </Reference>\n    <Reference Include=\"nunit.core.interfaces\">\n      <HintPath>..\\packages\\NUnitTestAdapter.1.0\\lib\\nunit.core.interfaces.dll</HintPath>\n      <Private>False</Private>\n    </Reference>\n    <Reference Include=\"nunit.framework, Version=2.6.3.13283, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL\">\n      <SpecificVersion>False</SpecificVersion>\n      <HintPath>..\\packages\\NUnit.2.6.3\\lib\\nunit.framework.dll</HintPath>\n    </Reference>\n    <Reference Include=\"nunit.util\">\n      <HintPath>..\\packages\\NUnitTestAdapter.1.0\\lib\\nunit.util.dll</HintPath>\n      <Private>False</Private>\n    </Reference>\n    <Reference Include=\"NUnit.VisualStudio.TestAdapter\">\n      <HintPath>..\\packages\\NUnitTestAdapter.1.0\\lib\\NUnit.VisualStudio.TestAdapter.dll</HintPath>\n      <Private>False</Private>\n    </Reference>\n    <Reference Include=\"System\" />\n    <Reference Include=\"System.Core\" />\n    <Reference Include=\"System.Xml.Linq\" />\n    <Reference Include=\"System.Data.DataSetExtensions\" />\n    <Reference Include=\"Microsoft.CSharp\" />\n    <Reference Include=\"System.Data\" />\n    <Reference Include=\"System.Xml\" />\n  </ItemGroup>\n  <ItemGroup>\n    <Compile Include=\"Domain\\AutomaticBidderScenarios.cs\" />\n    <Compile Include=\"Properties\\AssemblyInfo.cs\" />\n  </ItemGroup>\n  <ItemGroup>\n    <None Include=\"packages.config\" />\n  </ItemGroup>\n  <ItemGroup>\n    <ProjectReference Include=\"..\\DDDPPP.Chap21.RavenDBExample.Application\\DDDPPP.Chap21.RavenDBExample.Application.csproj\">\n      <Project>{09529c4e-59d9-4758-ab00-240982f0bc63}</Project>\n      <Name>DDDPPP.Chap21.RavenDBExample.Application</Name>\n    </ProjectReference>\n  </ItemGroup>\n  <ItemGroup>\n    <Folder Include=\"Application\\\" />\n  </ItemGroup>\n  <Import Project=\"$(MSBuildToolsPath)\\Microsoft.CSharp.targets\" />\n  <Import Project=\"$(SolutionDir)\\.nuget\\NuGet.targets\" Condition=\"Exists('$(SolutionDir)\\.nuget\\NuGet.targets')\" />\n  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \n       Other similar extension points exist, see Microsoft.Common.targets.\n  <Target Name=\"BeforeBuild\">\n  </Target>\n  <Target Name=\"AfterBuild\">\n  </Target>\n  -->\n</Project>"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.RavenDBExample/DDDPPP.Chap21.RavenDBExample.Application.Tests/Domain/AutomaticBidderScenarios.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\nusing NUnit.Framework;\n\nnamespace DDDPPP.Chap21.RavenDBExample.Application.Tests.Domain\n{\n    [TestFixture]\n    public class AutomaticBidderScenarios\n    {\n        [Test]\n        public void ScenarioA()\n        {\n           \n        }\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.RavenDBExample/DDDPPP.Chap21.RavenDBExample.Application.Tests/Properties/AssemblyInfo.cs",
    "content": "﻿using System.Reflection;\nusing System.Runtime.CompilerServices;\nusing System.Runtime.InteropServices;\n\n// General Information about an assembly is controlled through the following \n// set of attributes. Change these attribute values to modify the information\n// associated with an assembly.\n[assembly: AssemblyTitle(\"DDDPPP.Chap21.RavenDBExample.Application.Tests\")]\n[assembly: AssemblyDescription(\"\")]\n[assembly: AssemblyConfiguration(\"\")]\n[assembly: AssemblyCompany(\"\")]\n[assembly: AssemblyProduct(\"DDDPPP.Chap21.RavenDBExample.Application.Tests\")]\n[assembly: AssemblyCopyright(\"Copyright ©  2013\")]\n[assembly: AssemblyTrademark(\"\")]\n[assembly: AssemblyCulture(\"\")]\n\n// Setting ComVisible to false makes the types in this assembly not visible \n// to COM components.  If you need to access a type in this assembly from \n// COM, set the ComVisible attribute to true on that type.\n[assembly: ComVisible(false)]\n\n// The following GUID is for the ID of the typelib if this project is exposed to COM\n[assembly: Guid(\"efbcab4a-b788-40f9-85f4-97944087e64f\")]\n\n// Version information for an assembly consists of the following four values:\n//\n//      Major Version\n//      Minor Version \n//      Build Number\n//      Revision\n//\n// You can specify all the values or you can default the Build and Revision Numbers \n// by using the '*' as shown below:\n// [assembly: AssemblyVersion(\"1.0.*\")]\n[assembly: AssemblyVersion(\"1.0.0.0\")]\n[assembly: AssemblyFileVersion(\"1.0.0.0\")]\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.RavenDBExample/DDDPPP.Chap21.RavenDBExample.Application.Tests/packages.config",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<packages>\n  <package id=\"NUnit\" version=\"2.6.3\" targetFramework=\"net45\" />\n  <package id=\"NUnitTestAdapter\" version=\"1.0\" targetFramework=\"net45\" />\n</packages>"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.RavenDBExample/DDDPPP.Chap21.RavenDBExample.Presentation/App.config",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n<configuration>\n    <startup> \n        <supportedRuntime version=\"v4.0\" sku=\".NETFramework,Version=v4.5\" />\n    </startup>\n  <connectionStrings>\n    <add name=\"RavenDB\" connectionString=\"Url=http://localhost:8080;Database=RepositoryExample\" />\n  </connectionStrings>\n</configuration>"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.RavenDBExample/DDDPPP.Chap21.RavenDBExample.Presentation/DDDPPP.Chap21.RavenDBExample.Presentation.csproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"4.0\" DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <Import Project=\"$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props\" Condition=\"Exists('$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props')\" />\n  <PropertyGroup>\n    <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>\n    <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>\n    <ProjectGuid>{3E087F7C-38C0-4A31-A18A-6F6867C5962A}</ProjectGuid>\n    <OutputType>Exe</OutputType>\n    <AppDesignerFolder>Properties</AppDesignerFolder>\n    <RootNamespace>DDDPPP.Chap21.RavenDBExample.Presentation</RootNamespace>\n    <AssemblyName>DDDPPP.Chap21.RavenDBExample.Presentation</AssemblyName>\n    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\n    <FileAlignment>512</FileAlignment>\n    <SolutionDir Condition=\"$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'\">..\\</SolutionDir>\n    <RestorePackages>true</RestorePackages>\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' \">\n    <PlatformTarget>AnyCPU</PlatformTarget>\n    <DebugSymbols>true</DebugSymbols>\n    <DebugType>full</DebugType>\n    <Optimize>false</Optimize>\n    <OutputPath>bin\\Debug\\</OutputPath>\n    <DefineConstants>DEBUG;TRACE</DefineConstants>\n    <ErrorReport>prompt</ErrorReport>\n    <WarningLevel>4</WarningLevel>\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' \">\n    <PlatformTarget>AnyCPU</PlatformTarget>\n    <DebugType>pdbonly</DebugType>\n    <Optimize>true</Optimize>\n    <OutputPath>bin\\Release\\</OutputPath>\n    <DefineConstants>TRACE</DefineConstants>\n    <ErrorReport>prompt</ErrorReport>\n    <WarningLevel>4</WarningLevel>\n  </PropertyGroup>\n  <ItemGroup>\n    <Reference Include=\"Raven.Abstractions\">\n      <HintPath>..\\packages\\RavenDB.Client.2.5.2750\\lib\\net45\\Raven.Abstractions.dll</HintPath>\n    </Reference>\n    <Reference Include=\"Raven.Client.Lightweight\">\n      <HintPath>..\\packages\\RavenDB.Client.2.5.2750\\lib\\net45\\Raven.Client.Lightweight.dll</HintPath>\n    </Reference>\n    <Reference Include=\"StructureMap\">\n      <HintPath>..\\packages\\structuremap.2.6.4.1\\lib\\net40\\StructureMap.dll</HintPath>\n    </Reference>\n    <Reference Include=\"System\" />\n    <Reference Include=\"System.ComponentModel.Composition\" />\n    <Reference Include=\"System.Core\" />\n    <Reference Include=\"System.Xml.Linq\" />\n    <Reference Include=\"System.Data.DataSetExtensions\" />\n    <Reference Include=\"Microsoft.CSharp\" />\n    <Reference Include=\"System.Data\" />\n    <Reference Include=\"System.Xml\" />\n  </ItemGroup>\n  <ItemGroup>\n    <Compile Include=\"Program.cs\" />\n    <Compile Include=\"Properties\\AssemblyInfo.cs\" />\n  </ItemGroup>\n  <ItemGroup>\n    <None Include=\"App.config\" />\n    <None Include=\"packages.config\" />\n  </ItemGroup>\n  <ItemGroup>\n    <ProjectReference Include=\"..\\DDDPPP.Chap21.RavenDBExample.Application\\DDDPPP.Chap21.RavenDBExample.Application.csproj\">\n      <Project>{09529c4e-59d9-4758-ab00-240982f0bc63}</Project>\n      <Name>DDDPPP.Chap21.RavenDBExample.Application</Name>\n    </ProjectReference>\n  </ItemGroup>\n  <Import Project=\"$(MSBuildToolsPath)\\Microsoft.CSharp.targets\" />\n  <Import Project=\"$(SolutionDir)\\.nuget\\NuGet.targets\" Condition=\"Exists('$(SolutionDir)\\.nuget\\NuGet.targets')\" />\n  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \n       Other similar extension points exist, see Microsoft.Common.targets.\n  <Target Name=\"BeforeBuild\">\n  </Target>\n  <Target Name=\"AfterBuild\">\n  </Target>\n  -->\n</Project>"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.RavenDBExample/DDDPPP.Chap21.RavenDBExample.Presentation/Program.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\nusing DDDPPP.Chap21.RavenDBExample.Application;\nusing DDDPPP.Chap21.RavenDBExample.Application.Application.BusinessUseCases;\nusing DDDPPP.Chap21.RavenDBExample.Application.Application.Queries;\nusing StructureMap;\n\nnamespace DDDPPP.Chap21.RavenDBExample.Presentation\n{\n    public class Program\n    {\n        private static Dictionary<Guid, String> members = new Dictionary<Guid, string>();\n\n        public static void Main(string[] args)\n        {\n            Bootstrapper.Startup();\n\n            var memberIdA = Guid.NewGuid();\n            var memberIdB = Guid.NewGuid();\n\n            members.Add(memberIdA, \"Ted\");\n            members.Add(memberIdB, \"Rob\");\n\n            var auctionId = CreateAuction();\n\n            Bid(auctionId, memberIdA, 10m);\n            Bid(auctionId, memberIdB, 1.49m);\n            Bid(auctionId, memberIdB, 10.01m);\n            Bid(auctionId, memberIdB, 12.00m);\n            Bid(auctionId, memberIdA, 12.00m);\n        }\n\n        public static Guid CreateAuction()\n        {\n            var createAuctionService = ObjectFactory.GetInstance<CreateAuction>();\n\n            var newAuctionRequest = new NewAuctionRequest();\n\n            newAuctionRequest.StartingPrice = 0.99m;\n            newAuctionRequest.EndsAt = DateTime.Now.AddDays(1);\n\n            var auctionId = createAuctionService.Create(newAuctionRequest);\n\n            return auctionId;\n        }\n\n        public static void Bid(Guid auctionId, Guid memberId, decimal amount)\n        {\n            var bidOnAuctionService = ObjectFactory.GetInstance<BidOnAuction>();\n\n            bidOnAuctionService.Bid(auctionId, memberId, amount);\n\n            PrintStatusOfAuctionBy(auctionId);\n            PrintBidHistoryOf(auctionId);\n            Console.WriteLine(\"Hit any key to continue\");\n            Console.ReadLine();\n        }\n\n        public static void PrintStatusOfAuctionBy(Guid auctionId)\n        {\n            var auctionSummaryQuery = ObjectFactory.GetInstance<AuctionStatusQuery>();\n            var status = auctionSummaryQuery.AuctionStatus(auctionId);\n\n            Console.WriteLine(\"No Of Bids: \" + status.NumberOfBids);\n            Console.WriteLine(\"Current Bid: \" + status.CurrentPrice.ToString(\"##.##\"));\n            Console.WriteLine(\"Winning Bidder: \" + FindNameOfBidderWith(status.WinningBidderId));\n            Console.WriteLine(\"Time Remaining: \" + status.TimeRemaining);\n            Console.WriteLine();\n        }\n\n        public static void PrintBidHistoryOf(Guid auctionId)\n        {\n            var bidHistoryQuery = ObjectFactory.GetInstance<BidHistoryQuery>();\n            var status = bidHistoryQuery.BidHistoryFor(auctionId);\n\n            Console.WriteLine(\"Bids..\");\n\n            foreach (var bid in status)\n                Console.WriteLine(FindNameOfBidderWith(bid.Bidder) + \"\\t - \" + bid.AmountBid.ToString(\"G\") + \"\\t at \" + bid.TimeOfBid);\n            Console.WriteLine(\"------------------------------\");\n            Console.WriteLine();\n        }\n\n        public static string FindNameOfBidderWith(Guid id)\n        {\n            if (members.ContainsKey(id))\n                return members[id];\n            else\n                return string.Empty;\n        }\n    }\n}\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.RavenDBExample/DDDPPP.Chap21.RavenDBExample.Presentation/Properties/AssemblyInfo.cs",
    "content": "﻿using System.Reflection;\nusing System.Runtime.CompilerServices;\nusing System.Runtime.InteropServices;\n\n// General Information about an assembly is controlled through the following \n// set of attributes. Change these attribute values to modify the information\n// associated with an assembly.\n[assembly: AssemblyTitle(\"DDDPPP.Chap21.RavenDBExample.Presentation\")]\n[assembly: AssemblyDescription(\"\")]\n[assembly: AssemblyConfiguration(\"\")]\n[assembly: AssemblyCompany(\"\")]\n[assembly: AssemblyProduct(\"DDDPPP.Chap21.RavenDBExample.Presentation\")]\n[assembly: AssemblyCopyright(\"Copyright ©  2013\")]\n[assembly: AssemblyTrademark(\"\")]\n[assembly: AssemblyCulture(\"\")]\n\n// Setting ComVisible to false makes the types in this assembly not visible \n// to COM components.  If you need to access a type in this assembly from \n// COM, set the ComVisible attribute to true on that type.\n[assembly: ComVisible(false)]\n\n// The following GUID is for the ID of the typelib if this project is exposed to COM\n[assembly: Guid(\"3d0c5dab-82d6-410e-93b2-7b8f13ab502c\")]\n\n// Version information for an assembly consists of the following four values:\n//\n//      Major Version\n//      Minor Version \n//      Build Number\n//      Revision\n//\n// You can specify all the values or you can default the Build and Revision Numbers \n// by using the '*' as shown below:\n// [assembly: AssemblyVersion(\"1.0.*\")]\n[assembly: AssemblyVersion(\"1.0.0.0\")]\n[assembly: AssemblyFileVersion(\"1.0.0.0\")]\n"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.RavenDBExample/DDDPPP.Chap21.RavenDBExample.Presentation/packages.config",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<packages>\n  <package id=\"RavenDB.Client\" version=\"2.5.2750\" targetFramework=\"net45\" />\n  <package id=\"structuremap\" version=\"2.6.4.1\" targetFramework=\"net45\" />\n</packages>"
  },
  {
    "path": "21 - Repositories/DDDPPP.Chap21.RavenDBExample/DDDPPP.Chap21.RavenDBExample.sln",
    "content": "﻿\nMicrosoft Visual Studio Solution File, Format Version 12.00\n# Visual Studio 2012\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"DDDPPP.Chap21.RavenDBExample.Application\", \"DDDPPP.Chap21.RavenDBExample.Application\\DDDPPP.Chap21.RavenDBExample.Application.csproj\", \"{09529C4E-59D9-4758-AB00-240982F0BC63}\"\nEndProject\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"DDDPPP.Chap21.RavenDBExample.Presentation\", \"DDDPPP.Chap21.RavenDBExample.Presentation\\DDDPPP.Chap21.RavenDBExample.Presentation.csproj\", \"{3E087F7C-38C0-4A31-A18A-6F6867C5962A}\"\nEndProject\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"DDDPPP.Chap21.RavenDBExample.Application.Tests\", \"DDDPPP.Chap21.RavenDBExample.Application.Tests\\DDDPPP.Chap21.RavenDBExample.Application.Tests.csproj\", \"{9AAF22F4-8A27-4552-A137-C9739E60D035}\"\nEndProject\nProject(\"{2150E333-8FDC-42A3-9474-1A3956D46DE8}\") = \"Tests\", \"Tests\", \"{A40A3BB8-621E-4C5A-993B-F4B237587EA9}\"\nEndProject\nProject(\"{2150E333-8FDC-42A3-9474-1A3956D46DE8}\") = \".nuget\", \".nuget\", \"{41461052-8167-4AF2-8438-5D89B55807E9}\"\n\tProjectSection(SolutionItems) = preProject\n\t\t.nuget\\NuGet.Config = .nuget\\NuGet.Config\n\t\t.nuget\\NuGet.exe = .nuget\\NuGet.exe\n\t\t.nuget\\NuGet.targets = .nuget\\NuGet.targets\n\tEndProjectSection\nEndProject\nGlobal\n\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\n\t\tDebug|Any CPU = Debug|Any CPU\n\t\tRelease|Any CPU = Release|Any CPU\n\tEndGlobalSection\n\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\n\t\t{09529C4E-59D9-4758-AB00-240982F0BC63}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{09529C4E-59D9-4758-AB00-240982F0BC63}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{09529C4E-59D9-4758-AB00-240982F0BC63}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{09529C4E-59D9-4758-AB00-240982F0BC63}.Release|Any CPU.Build.0 = Release|Any CPU\n\t\t{3E087F7C-38C0-4A31-A18A-6F6867C5962A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{3E087F7C-38C0-4A31-A18A-6F6867C5962A}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{3E087F7C-38C0-4A31-A18A-6F6867C5962A}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{3E087F7C-38C0-4A31-A18A-6F6867C5962A}.Release|Any CPU.Build.0 = Release|Any CPU\n\t\t{9AAF22F4-8A27-4552-A137-C9739E60D035}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{9AAF22F4-8A27-4552-A137-C9739E60D035}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{9AAF22F4-8A27-4552-A137-C9739E60D035}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{9AAF22F4-8A27-4552-A137-C9739E60D035}.Release|Any CPU.Build.0 = Release|Any CPU\n\tEndGlobalSection\n\tGlobalSection(SolutionProperties) = preSolution\n\t\tHideSolutionNode = FALSE\n\tEndGlobalSection\n\tGlobalSection(NestedProjects) = preSolution\n\t\t{9AAF22F4-8A27-4552-A137-C9739E60D035} = {A40A3BB8-621E-4C5A-993B-F4B237587EA9}\n\tEndGlobalSection\nEndGlobal\n"
  },
  {
    "path": "22 - Event Sourcing/PPPDDD.Chap23.EventSourcing.EventStoreDemo/GetEventStore.cs",
    "content": "﻿using EventStore.ClientAPI;\r\nusing Newtonsoft.Json;\r\nusing Newtonsoft.Json.Linq;\r\nusing PPPDDDChap23.EventSourcing.Application.Infrastructure;\r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Text;\r\nusing System.Threading.Tasks;\r\n\r\nnamespace PPPDDD.Chap23.EventSourcing.EventStoreDemo\r\n{\r\n    public class GetEventStore : IEventStore\r\n    {\r\n        private IEventStoreConnection esConn;\r\n\r\n        private const string EventClrTypeHeader = \"EventClrTypeName\";\r\n\r\n        public GetEventStore(IEventStoreConnection esConn)\r\n        {\r\n            this.esConn = esConn;\r\n        }\r\n\r\n        public void CreateNewStream(string streamName, IEnumerable<DomainEvent> domainEvents)\r\n        {\r\n            // ES will automatically create a stream when events are added to it\r\n            AppendEventsToStream(streamName, domainEvents, null);\r\n        }\r\n\r\n        public void AppendEventsToStream(string streamName, IEnumerable<DomainEvent> domainEvents, int? expectedVersion)\r\n        {\r\n            var commitId = Guid.NewGuid();\r\n            var eventsInStorageFormat = domainEvents.Select(e => MapToEventStoreStorageFormat(e, commitId, e.Id));\r\n            esConn.AppendToStream(StreamName(streamName), expectedVersion ?? ExpectedVersion.Any, eventsInStorageFormat);\r\n        }\r\n\r\n        private EventData MapToEventStoreStorageFormat(object evnt, Guid commitId, Guid eventId)\r\n        {\r\n            var headers = new Dictionary<string, object>\r\n            {\r\n                // each event will be associated with the same commit\r\n                {\"CommitId\", commitId}, \r\n                \r\n                // store type of class so event can be rebuilt when the event is loaded\r\n                {EventClrTypeHeader, evnt.GetType().AssemblyQualifiedName}\r\n            };\r\n\r\n            var data = Encoding.UTF8.GetBytes(JsonConvert.SerializeObject(evnt));\r\n            var metadata = Encoding.UTF8.GetBytes(JsonConvert.SerializeObject(headers));\r\n            var isJson = true;\r\n\r\n            return new EventData(eventId, evnt.GetType().Name, isJson, data, metadata);\r\n        }\r\n\r\n        public IEnumerable<DomainEvent> GetStream(string streamName, int fromVersion, int toVersion)\r\n        {\r\n            // ES wants the number of events to retrieve not highest version\r\n            var amount = (toVersion - fromVersion) + 1;\r\n            Console.WriteLine(\"Amount: \" + amount);\r\n            var events = esConn.ReadStreamEventsForward(StreamName(streamName), fromVersion, amount, false); // last param not important here\r\n\r\n            // map events back from JSON string to DomainEvent. Header indicates the type\r\n            return events.Events.Select(e => (DomainEvent)RebuildEvent(e));\r\n        }\r\n\r\n        private object RebuildEvent(ResolvedEvent eventStoreEvent)\r\n        {\r\n            var metadata = eventStoreEvent.OriginalEvent.Metadata;\r\n            var data = eventStoreEvent.OriginalEvent.Data;\r\n            var typeOfDomainEvent = JObject.Parse(Encoding.UTF8.GetString(metadata)).Property(EventClrTypeHeader).Value;\r\n            var rebuiltEvent = JsonConvert.DeserializeObject(Encoding.UTF8.GetString(data), Type.GetType((string)typeOfDomainEvent));\r\n            return rebuiltEvent;\r\n        }\r\n\r\n        // snapshots in Event Store are just events in dedicated snapshot streams\r\n        // explained: http://stackoverflow.com/questions/16359330/is-snapshot-supported-from-greg-young-eventstore\r\n        public void AddSnapshot<T>(string streamName, T snapshot)\r\n        {\r\n            var stream = SnapshotStreamNameFor(streamName);\r\n            var snapshotAsEvent = MapToEventStoreStorageFormat(snapshot, Guid.NewGuid(), Guid.NewGuid());\r\n            esConn.AppendToStream(stream, ExpectedVersion.Any, snapshotAsEvent);\r\n        }\r\n\r\n        public T GetLatestSnapshot<T>(string streamName) where T : class\r\n        {\r\n            var stream = SnapshotStreamNameFor(streamName);\r\n            var amountToFetch = 1; // just the latest one\r\n            var ev = esConn.ReadStreamEventsBackward(stream, StreamPosition.End, amountToFetch, false);\r\n            \r\n            if (ev.Events.Any())\r\n                return (T)RebuildEvent(ev.Events.Single());\r\n            else\r\n                return null;\r\n        }\r\n\r\n        private string SnapshotStreamNameFor(string streamName)\r\n        {\r\n            // snapshots are just events in separate streams\r\n            return StreamName(streamName) + \"-snapshots\";\r\n        }\r\n\r\n        private string StreamName(string streamName)\r\n        {\r\n            // Get Event Store projections require only a single hypen (\"-\")\r\n            // see: https://groups.google.com/forum/#!msg/event-store/D477bKLcdI8/62iFGhHdMMIJ\r\n            var sp = streamName.Split(new []{ '-' }, 2);\r\n            return sp[0] + \"-\" + sp[1].Replace(\"-\", \"\");\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "22 - Event Sourcing/PPPDDD.Chap23.EventSourcing.EventStoreDemo/ImportTestData.cs",
    "content": "﻿using EventStore.ClientAPI;\r\nusing Microsoft.VisualStudio.TestTools.UnitTesting;\r\nusing Newtonsoft.Json;\r\nusing Newtonsoft.Json.Linq;\r\nusing PPPDDDChap23.EventSourcing.Application.Infrastructure;\r\nusing PPPDDDChap23.EventSourcing.Application.Model.PayAsYouGo;\r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Net;\r\nusing System.Text;\r\nusing System.Threading.Tasks;\r\n\r\nnamespace PPPDDD.Chap23.EventSourcing.EventStoreDemo\r\n{\r\n    [TestClass]\r\n    public class ImportTestData\r\n    {\r\n        // ***** These tests require event store to be running on port configured here *****\r\n        //       1113 is the default port, but change as necessary\r\n        IPEndPoint endpoint = new IPEndPoint(IPAddress.Loopback, 1113);\r\n\r\n        PayAsYouGoAccount account1;\r\n        PayAsYouGoAccount account2;\r\n        PayAsYouGoAccount account3;\r\n        PayAsYouGoAccount account4;\r\n        PayAsYouGoAccount account5;\r\n\r\n        /*\r\n         * After running these tests the events will exist inside Event Store. You can then\r\n         * access the Web Admin UI and run queries, projections etc.\r\n         * \r\n         */\r\n        [TestMethod]\r\n        public void Import_test_data_for_temporal_queries_and_projections_example_in_the_book()\r\n        {\r\n            using (var con = EventStoreConnection.Create(endpoint))\r\n            {\r\n                con.Connect();\r\n                var es = new GetEventStore(con);\r\n                var repo = new PayAsYouGoAccountRepository(es);\r\n\r\n                Create5EmptyAccounts();\r\n\r\n                SimulateCustomerActivityFor3rdJune();\r\n                SimulateCustomerActivityFor4thJune();\r\n                SimulateCustomerActivityFor5thJune();\r\n\r\n                PersistAllUncommittedEvents(repo);\r\n            }\r\n        }\r\n\r\n        private void Create5EmptyAccounts()\r\n        {\r\n            var account1Id = Guid.NewGuid();\r\n            account1 = new PayAsYouGoAccount(account1Id, new Money(0));\r\n\r\n            var account2Id = Guid.NewGuid();\r\n            account2 = new PayAsYouGoAccount(account2Id, new Money(0));\r\n\r\n            var account3Id = Guid.NewGuid();\r\n            account3 = new PayAsYouGoAccount(account3Id, new Money(0));\r\n\r\n            var account4Id = Guid.NewGuid();\r\n            account4 = new PayAsYouGoAccount(account4Id, new Money(0));\r\n\r\n            var account5Id = Guid.NewGuid();\r\n            account5 = new PayAsYouGoAccount(account5Id, new Money(0));\r\n        }\r\n\r\n        private void SimulateCustomerActivityFor3rdJune()\r\n        {\r\n            // quiet normal day\r\n\r\n            var startOfDay = new DateTime(2014, 06, 03);\r\n\r\n            account1.TopUp(new Money(5), TestClock(startOfDay.AddHours(10)));\r\n            account1.Record(PhoneCall(startOfDay.AddHours(10.5), 5), Cost(), null);\r\n            account1.Record(PhoneCall(startOfDay.AddHours(20), 10), Cost(), null);\r\n\r\n            account4.TopUp(new Money(10), TestClock(startOfDay.AddHours(18)));\r\n            account4.Record(PhoneCall(startOfDay.AddHours(18.1), 7), Cost(), null);\r\n        }\r\n\r\n        private void SimulateCustomerActivityFor4thJune()\r\n        {\r\n            // Day of the big marketing promotion\r\n\r\n            var startOfDay = new DateTime(2014, 06, 04);\r\n\r\n            var freeCalls = new FreePhoneCallCosting();\r\n\r\n            account1.TopUp(new Money(20), TestClock(startOfDay.AddHours(9.5)));\r\n            account1.Record(PhoneCall(startOfDay.AddHours(10), 22), freeCalls, null);\r\n            account1.Record(PhoneCall(startOfDay.AddHours(10.5), 15), freeCalls, null);\r\n            account1.Record(PhoneCall(startOfDay.AddHours(12.75), 45), freeCalls, null);\r\n            account1.Record(PhoneCall(startOfDay.AddHours(18.75), 5), freeCalls, null);\r\n            account1.Record(PhoneCall(startOfDay.AddHours(19.0), 7), freeCalls, null);\r\n\r\n            account2.TopUp(new Money(20), TestClock(startOfDay.AddHours(6.5)));\r\n            account2.Record(PhoneCall(startOfDay.AddHours(19), 120), freeCalls, null);\r\n            \r\n            account3.TopUp(new Money(20), TestClock(startOfDay.AddHours(21.25)));\r\n            account3.Record(PhoneCall(startOfDay.AddHours(21.25), 24), freeCalls, null);\r\n            account3.Record(PhoneCall(startOfDay.AddHours(23.5), 28), freeCalls, null);\r\n            \r\n            account4.TopUp(new Money(20), TestClock(startOfDay.AddHours(18.75)));\r\n            account4.Record(PhoneCall(startOfDay.AddHours(19.0), 13), freeCalls, null);\r\n            account4.Record(PhoneCall(startOfDay.AddHours(19.25), 19), freeCalls, null);\r\n            account4.Record(PhoneCall(startOfDay.AddHours(20), 7), freeCalls, null);\r\n            account4.Record(PhoneCall(startOfDay.AddHours(19.0), 13), freeCalls, null);\r\n            \r\n            account5.TopUp(new Money(20), TestClock(startOfDay.AddHours(23)));\r\n            account5.Record(PhoneCall(startOfDay.AddHours(23.1), 35), freeCalls, null);\r\n        }\r\n\r\n        private void SimulateCustomerActivityFor5thJune()\r\n        {\r\n            var startOfDay = new DateTime(2014, 06, 05);\r\n\r\n            account1.Record(PhoneCall(startOfDay.AddHours(7.5), 3), Cost(), null);\r\n            account1.Record(PhoneCall(startOfDay.AddHours(14.4), 6), Cost(), null);\r\n            account1.Record(PhoneCall(startOfDay.AddHours(19.75), 2), Cost(), null);\r\n\r\n            account2.Record(PhoneCall(startOfDay.AddHours(19), 5), Cost(), null);\r\n\r\n            account4.Record(PhoneCall(startOfDay.AddHours(15.75), 9), Cost(), null);\r\n            account4.Record(PhoneCall(startOfDay.AddHours(23.6), 4), Cost(), null);\r\n        }\r\n\r\n        private IClock TestClock(DateTime date)\r\n        {\r\n            return new TestClockThatReturnsFixedDate(date);\r\n        }\r\n\r\n        private PhoneCall PhoneCall(DateTime start, int minutes)\r\n        {\r\n            return new PhoneCall(new PhoneNumber(\"11111111111\"), start, new Minutes(minutes));\r\n        }\r\n\r\n        private PhoneCallCosting Cost()\r\n        {\r\n            return new PhoneCallCosting();\r\n        }\r\n\r\n        private void PersistAllUncommittedEvents(PayAsYouGoAccountRepository repo)\r\n        {\r\n            repo.Save(account1);\r\n            repo.Save(account2);\r\n            repo.Save(account3);\r\n            repo.Save(account4);\r\n            repo.Save(account5);\r\n        }\r\n    }\r\n\r\n    public class TestClockThatReturnsFixedDate : IClock\r\n    {\r\n        DateTime stubbedDate;\r\n\r\n        public TestClockThatReturnsFixedDate(DateTime date)\r\n        {\r\n            stubbedDate = date;\r\n        }\r\n\r\n        public DateTime Time()\r\n        {\r\n            return stubbedDate;\r\n        }\r\n    }\r\n\r\n    public class FreePhoneCallCosting : PhoneCallCosting\r\n    {\r\n        public override Money DetermineCostOfCall(Minutes minutes)\r\n        {\r\n            return new Money(0);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "22 - Event Sourcing/PPPDDD.Chap23.EventSourcing.EventStoreDemo/PPPDDD.Chap23.EventSourcing.EventStoreDemo.csproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Project ToolsVersion=\"12.0\" DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\r\n  <Import Project=\"$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props\" Condition=\"Exists('$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props')\" />\r\n  <PropertyGroup>\r\n    <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>\r\n    <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>\r\n    <ProjectGuid>{04053A84-EAD1-4318-92A8-C9F7EE255FCB}</ProjectGuid>\r\n    <OutputType>Library</OutputType>\r\n    <AppDesignerFolder>Properties</AppDesignerFolder>\r\n    <RootNamespace>PPPDDD.Chap23.EventSourcing.EventStoreDemo</RootNamespace>\r\n    <AssemblyName>PPPDDD.Chap23.EventSourcing.EventStoreDemo</AssemblyName>\r\n    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r\n    <FileAlignment>512</FileAlignment>\r\n    <SolutionDir Condition=\"$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'\">..\\PPPDDDChap23.EventSourcing\\</SolutionDir>\r\n    <RestorePackages>true</RestorePackages>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' \">\r\n    <DebugSymbols>true</DebugSymbols>\r\n    <DebugType>full</DebugType>\r\n    <Optimize>false</Optimize>\r\n    <OutputPath>bin\\Debug\\</OutputPath>\r\n    <DefineConstants>DEBUG;TRACE</DefineConstants>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <WarningLevel>4</WarningLevel>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' \">\r\n    <DebugType>pdbonly</DebugType>\r\n    <Optimize>true</Optimize>\r\n    <OutputPath>bin\\Release\\</OutputPath>\r\n    <DefineConstants>TRACE</DefineConstants>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <WarningLevel>4</WarningLevel>\r\n  </PropertyGroup>\r\n  <ItemGroup>\r\n    <Reference Include=\"EventStore.ClientAPI\">\r\n      <HintPath>..\\PPPDDDChap23.EventSourcing\\packages\\EventStore.Client.2.0.2\\lib\\net40\\EventStore.ClientAPI.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL\" />\r\n    <Reference Include=\"Newtonsoft.Json\">\r\n      <HintPath>..\\PPPDDDChap23.EventSourcing\\packages\\Newtonsoft.Json.6.0.3\\lib\\net45\\Newtonsoft.Json.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"System\" />\r\n    <Reference Include=\"System.Core\" />\r\n    <Reference Include=\"System.Xml.Linq\" />\r\n    <Reference Include=\"System.Data.DataSetExtensions\" />\r\n    <Reference Include=\"Microsoft.CSharp\" />\r\n    <Reference Include=\"System.Data\" />\r\n    <Reference Include=\"System.Xml\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <Compile Include=\"GetEventStore.cs\" />\r\n    <Compile Include=\"ImportTestData.cs\" />\r\n    <Compile Include=\"Properties\\AssemblyInfo.cs\" />\r\n    <Compile Include=\"Tests.cs\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <ProjectReference Include=\"..\\PPPDDDChap23.EventSourcing\\PPPDDDChap23.EventSourcing.Application\\PPPDDDChap23.EventSourcing.Application.csproj\">\r\n      <Project>{8d3bffdd-a798-4ce5-b427-8a755698dc9c}</Project>\r\n      <Name>PPPDDDChap23.EventSourcing.Application</Name>\r\n    </ProjectReference>\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <None Include=\"packages.config\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <Service Include=\"{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}\" />\r\n  </ItemGroup>\r\n  <Import Project=\"$(MSBuildToolsPath)\\Microsoft.CSharp.targets\" />\r\n  <Import Project=\"$(SolutionDir)\\.nuget\\NuGet.targets\" Condition=\"Exists('$(SolutionDir)\\.nuget\\NuGet.targets')\" />\r\n  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \r\n       Other similar extension points exist, see Microsoft.Common.targets.\r\n  <Target Name=\"BeforeBuild\">\r\n  </Target>\r\n  <Target Name=\"AfterBuild\">\r\n  </Target>\r\n  -->\r\n</Project>"
  },
  {
    "path": "22 - Event Sourcing/PPPDDD.Chap23.EventSourcing.EventStoreDemo/Properties/AssemblyInfo.cs",
    "content": "﻿using System.Reflection;\r\nusing System.Runtime.CompilerServices;\r\nusing System.Runtime.InteropServices;\r\n\r\n// General Information about an assembly is controlled through the following \r\n// set of attributes. Change these attribute values to modify the information\r\n// associated with an assembly.\r\n[assembly: AssemblyTitle(\"PPPDDD.Chap23.EventSourcing.EventStoreDemo\")]\r\n[assembly: AssemblyDescription(\"\")]\r\n[assembly: AssemblyConfiguration(\"\")]\r\n[assembly: AssemblyCompany(\"\")]\r\n[assembly: AssemblyProduct(\"PPPDDD.Chap23.EventSourcing.EventStoreDemo\")]\r\n[assembly: AssemblyCopyright(\"Copyright ©  2014\")]\r\n[assembly: AssemblyTrademark(\"\")]\r\n[assembly: AssemblyCulture(\"\")]\r\n\r\n// Setting ComVisible to false makes the types in this assembly not visible \r\n// to COM components.  If you need to access a type in this assembly from \r\n// COM, set the ComVisible attribute to true on that type.\r\n[assembly: ComVisible(false)]\r\n\r\n// The following GUID is for the ID of the typelib if this project is exposed to COM\r\n[assembly: Guid(\"2308444e-ff25-4478-80ea-bb620f86042e\")]\r\n\r\n// Version information for an assembly consists of the following four values:\r\n//\r\n//      Major Version\r\n//      Minor Version \r\n//      Build Number\r\n//      Revision\r\n//\r\n// You can specify all the values or you can default the Build and Revision Numbers \r\n// by using the '*' as shown below:\r\n// [assembly: AssemblyVersion(\"1.0.*\")]\r\n[assembly: AssemblyVersion(\"1.0.0.0\")]\r\n[assembly: AssemblyFileVersion(\"1.0.0.0\")]\r\n"
  },
  {
    "path": "22 - Event Sourcing/PPPDDD.Chap23.EventSourcing.EventStoreDemo/Tests.cs",
    "content": "﻿using EventStore.ClientAPI;\r\nusing EventStore.ClientAPI.Exceptions;\r\nusing Microsoft.VisualStudio.TestTools.UnitTesting;\r\nusing PPPDDDChap23.EventSourcing.Application.Infrastructure;\r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Net;\r\nusing System.Text;\r\nusing System.Threading;\r\nusing System.Threading.Tasks;\r\n\r\nnamespace PPPDDD.Chap23.EventSourcing.EventStoreDemo\r\n{\r\n    [TestClass]\r\n    public class Tests\r\n    {\r\n        [TestMethod]\r\n        public void Events_are_persisted_and_can_be_retrieved()\r\n        {\r\n            NewConnection(con =>\r\n            {\r\n                var eventStore = new GetEventStore(con);\r\n                var streamName = CreateDisposableStreamName();\r\n                eventStore.AppendEventsToStream(streamName, testEvents, null);\r\n\r\n                var fromEs = eventStore.GetStream(streamName, 0, Int32.MaxValue - 1);\r\n\r\n                Assert.AreEqual(fromEs.Count(), testEvents.Count());\r\n                foreach (var e in testEvents)\r\n                {\r\n                    Assert.IsTrue(fromEs.Contains(e));\r\n                }\r\n            });\r\n        }\r\n\r\n        [TestMethod]\r\n        public void A_subset_of_events_can_be_retrieved_by_querying_on_version_numbers()\r\n        {\r\n            NewConnection(con =>\r\n            {\r\n                var eventStore = new GetEventStore(con);\r\n                var streamName = CreateDisposableStreamName();\r\n                eventStore.AppendEventsToStream(streamName, testEvents, null);\r\n\r\n                var fromEs = eventStore.GetStream(streamName, 1, 1);\r\n\r\n                Assert.AreEqual(1, fromEs.Count());\r\n                Assert.AreEqual(\"Trevor\", ((TestEvent)fromEs.Single()).Handle);\r\n            });\r\n        }\r\n\r\n        [TestMethod]\r\n        public void Snapshots_are_persisted_and_the_latest_one_is_always_returned()\r\n        {\r\n            NewConnection(con =>\r\n            {\r\n                var eventStore = new GetEventStore(con);\r\n                var streamName = CreateDisposableStreamName();\r\n\r\n                var snapshot1 = new TestSnapshot { Version = 1 };\r\n                var snapshot2 = new TestSnapshot { Version = 2 };\r\n                var snapshot3 = new TestSnapshot { Version = 3 };\r\n\r\n                eventStore.AddSnapshot<TestSnapshot>(streamName, snapshot1);\r\n                eventStore.AddSnapshot<TestSnapshot>(streamName, snapshot2);\r\n                eventStore.AddSnapshot<TestSnapshot>(streamName, snapshot3);\r\n\r\n                var fromEs = eventStore.GetLatestSnapshot<TestSnapshot>(streamName);\r\n                \r\n                Assert.AreEqual(snapshot3, fromEs);\r\n            });\r\n        }\r\n\r\n        [TestMethod]\r\n        public void Optimistic_concurrency_is_supported()\r\n        {\r\n            NewConnection(con =>\r\n            {\r\n                var eventStore = new GetEventStore(con);\r\n                var streamName = CreateDisposableStreamName();\r\n\r\n                // version number will be 2 (3 events, 0 based)\r\n                eventStore.AppendEventsToStream(streamName, testEvents, null);\r\n\r\n                var newEvnt = new TestEvent(Guid.NewGuid())\r\n                {\r\n                    Handle = \"New\",\r\n                    Name = \"Newnew\"\r\n                };\r\n\r\n                try\r\n                {\r\n                    var expectedVersion = 1; // we know the version is already 2\r\n                    eventStore.AppendEventsToStream(streamName, new List<TestEvent>{ newEvnt }, expectedVersion);\r\n                }\r\n                catch (AggregateException e)\r\n                {\r\n                    var extype = e.InnerExceptions.First().GetType();\r\n                    Assert.AreEqual(typeof(WrongExpectedVersionException), extype);\r\n                    return; \r\n                }\r\n\r\n                Assert.Fail(\"Optimistic concurrency violation was not detected\");\r\n            });\r\n        }\r\n\r\n        private string CreateDisposableStreamName()\r\n        {\r\n            // ES will not allow deleted streams to be re-created\r\n            // for more info: https://groups.google.com/forum/#!msg/event-store/HnJcubREozE/shw_qCwvJ5IJ\r\n            return \"teststream\" + Guid.NewGuid();\r\n        }\r\n\r\n        private void NewConnection(Action<IEventStoreConnection> action)\r\n        {\r\n            using(var con = EventStoreConnection.Create(endpoint))\r\n            {\r\n                con.Connect();\r\n                action(con);\r\n            }\r\n        }\r\n\r\n        List<TestEvent> testEvents = new List<TestEvent>\r\n        {\r\n            new TestEvent(Guid.NewGuid())\r\n            {\r\n                Name = \"Name 0\",\r\n                Handle = \"Jimmy\"\r\n            },\r\n            new TestEvent(Guid.NewGuid())\r\n            {\r\n                Name = \"Name 1\",\r\n                Handle = \"Trevor\",\r\n            },\r\n            new TestEvent(Guid.NewGuid())\r\n            {\r\n                Name = \"Name 3\",\r\n                Handle = \"Suzie\"\r\n            }\r\n        };\r\n\r\n        // ***** These tests require event store to be running on port configured here *****\r\n        //       1113 is the default port, but change as necessary\r\n        IPEndPoint endpoint = new IPEndPoint(IPAddress.Loopback, 1113);\r\n    }\r\n\r\n    public class TestEvent : DomainEvent\r\n    {\r\n        public TestEvent(Guid id): base(id) { }\r\n\r\n        public string Name { get; set; }\r\n\r\n        public string Handle { get; set; }\r\n\r\n        public override bool Equals(object obj)\r\n        {\r\n            var te = obj as TestEvent;\r\n            if (te == null) return false;\r\n\r\n            return te.Id == this.Id &&\r\n            te.Name == this.Name &&\r\n            te.Handle == this.Handle;\r\n        }\r\n    }\r\n\r\n    public class TestSnapshot\r\n    {\r\n        public int Version { get; set; }\r\n\r\n        public override bool Equals(object obj)\r\n        {\r\n            var s = obj as TestSnapshot;\r\n            if (s == null) return false;\r\n\r\n            return s.Version == this.Version;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "22 - Event Sourcing/PPPDDD.Chap23.EventSourcing.EventStoreDemo/packages.config",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<packages>\r\n  <package id=\"EventStore.Client\" version=\"2.0.2\" targetFramework=\"net45\" />\r\n  <package id=\"Newtonsoft.Json\" version=\"6.0.3\" targetFramework=\"net45\" />\r\n</packages>"
  },
  {
    "path": "22 - Event Sourcing/PPPDDDChap22/.nuget/NuGet.Config",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<configuration>\n  <solution>\n    <add key=\"disableSourceControlIntegration\" value=\"true\" />\n  </solution>\n</configuration>"
  },
  {
    "path": "22 - Event Sourcing/PPPDDDChap22/.nuget/NuGet.targets",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n    <PropertyGroup>\n        <SolutionDir Condition=\"$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'\">$(MSBuildProjectDirectory)\\..\\</SolutionDir>\n\n        <!-- Enable the restore command to run before builds -->\n        <RestorePackages Condition=\"  '$(RestorePackages)' == '' \">false</RestorePackages>\n\n        <!-- Property that enables building a package from a project -->\n        <BuildPackage Condition=\" '$(BuildPackage)' == '' \">false</BuildPackage>\n\n        <!-- Determines if package restore consent is required to restore packages -->\n        <RequireRestoreConsent Condition=\" '$(RequireRestoreConsent)' != 'false' \">true</RequireRestoreConsent>\n\n        <!-- Download NuGet.exe if it does not already exist -->\n        <DownloadNuGetExe Condition=\" '$(DownloadNuGetExe)' == '' \">false</DownloadNuGetExe>\n    </PropertyGroup>\n\n    <ItemGroup Condition=\" '$(PackageSources)' == '' \">\n        <!-- Package sources used to restore packages. By default, registered sources under %APPDATA%\\NuGet\\NuGet.Config will be used -->\n        <!-- The official NuGet package source (https://www.nuget.org/api/v2/) will be excluded if package sources are specified and it does not appear in the list -->\n        <!--\n            <PackageSource Include=\"https://www.nuget.org/api/v2/\" />\n            <PackageSource Include=\"https://my-nuget-source/nuget/\" />\n        -->\n    </ItemGroup>\n\n    <PropertyGroup Condition=\" '$(OS)' == 'Windows_NT'\">\n        <!-- Windows specific commands -->\n        <NuGetToolsPath>$([System.IO.Path]::Combine($(SolutionDir), \".nuget\"))</NuGetToolsPath>\n    </PropertyGroup>\n\n    <PropertyGroup Condition=\" '$(OS)' != 'Windows_NT'\">\n        <!-- We need to launch nuget.exe with the mono command if we're not on windows -->\n        <NuGetToolsPath>$(SolutionDir).nuget</NuGetToolsPath>\n    </PropertyGroup>\n\n    <PropertyGroup>\n        <PackagesProjectConfig>packages.$(MSBuildProjectName.Replace(' ', '_')).config</PackagesProjectConfig>\n    </PropertyGroup>\n\n    <Choose>\n        <When Condition=\"Exists('$(PackagesProjectConfig)')\">\n            <PropertyGroup>\n                <PackagesConfig>$(PackagesProjectConfig)</PackagesConfig>\n            </PropertyGroup>\n        </When>\n        <When Condition=\"Exists('packages.config')\">\n            <PropertyGroup>\n                <PackagesConfig>packages.config</PackagesConfig>\n            </PropertyGroup>\n        </When>\n    </Choose>\n    \n    <PropertyGroup>\n        <!-- NuGet command -->\n        <NuGetExePath Condition=\" '$(NuGetExePath)' == '' \">$(NuGetToolsPath)\\NuGet.exe</NuGetExePath>\n        <PackageSources Condition=\" $(PackageSources) == '' \">@(PackageSource)</PackageSources>\n\n        <NuGetCommand Condition=\" '$(OS)' == 'Windows_NT'\">\"$(NuGetExePath)\"</NuGetCommand>\n        <NuGetCommand Condition=\" '$(OS)' != 'Windows_NT' \">mono --runtime=v4.0.30319 $(NuGetExePath)</NuGetCommand>\n\n        <PackageOutputDir Condition=\"$(PackageOutputDir) == ''\">$(TargetDir.Trim('\\\\'))</PackageOutputDir>\n\n        <RequireConsentSwitch Condition=\" $(RequireRestoreConsent) == 'true' \">-RequireConsent</RequireConsentSwitch>\n        <NonInteractiveSwitch Condition=\" '$(VisualStudioVersion)' != '' AND '$(OS)' == 'Windows_NT' \">-NonInteractive</NonInteractiveSwitch>\n\n        <PaddedSolutionDir Condition=\" '$(OS)' == 'Windows_NT'\">\"$(SolutionDir) \"</PaddedSolutionDir>\n        <PaddedSolutionDir Condition=\" '$(OS)' != 'Windows_NT' \">\"$(SolutionDir)\"</PaddedSolutionDir>\n\n        <!-- Commands -->\n        <RestoreCommand>$(NuGetCommand) install \"$(PackagesConfig)\" -source \"$(PackageSources)\"  $(NonInteractiveSwitch) $(RequireConsentSwitch) -solutionDir $(PaddedSolutionDir)</RestoreCommand>\n        <BuildCommand>$(NuGetCommand) pack \"$(ProjectPath)\" -Properties \"Configuration=$(Configuration);Platform=$(Platform)\" $(NonInteractiveSwitch) -OutputDirectory \"$(PackageOutputDir)\" -symbols</BuildCommand>\n\n        <!-- We need to ensure packages are restored prior to assembly resolve -->\n        <BuildDependsOn Condition=\"$(RestorePackages) == 'true'\">\n            RestorePackages;\n            $(BuildDependsOn);\n        </BuildDependsOn>\n\n        <!-- Make the build depend on restore packages -->\n        <BuildDependsOn Condition=\"$(BuildPackage) == 'true'\">\n            $(BuildDependsOn);\n            BuildPackage;\n        </BuildDependsOn>\n    </PropertyGroup>\n\n    <Target Name=\"CheckPrerequisites\">\n        <!-- Raise an error if we're unable to locate nuget.exe  -->\n        <Error Condition=\"'$(DownloadNuGetExe)' != 'true' AND !Exists('$(NuGetExePath)')\" Text=\"Unable to locate '$(NuGetExePath)'\" />\n        <!--\n        Take advantage of MsBuild's build dependency tracking to make sure that we only ever download nuget.exe once.\n        This effectively acts as a lock that makes sure that the download operation will only happen once and all\n        parallel builds will have to wait for it to complete.\n        -->\n        <MsBuild Targets=\"_DownloadNuGet\" Projects=\"$(MSBuildThisFileFullPath)\" Properties=\"Configuration=NOT_IMPORTANT;DownloadNuGetExe=$(DownloadNuGetExe)\" />\n    </Target>\n\n    <Target Name=\"_DownloadNuGet\">\n        <DownloadNuGet OutputFilename=\"$(NuGetExePath)\" Condition=\" '$(DownloadNuGetExe)' == 'true' AND !Exists('$(NuGetExePath)')\" />\n    </Target>\n\n    <Target Name=\"RestorePackages\" DependsOnTargets=\"CheckPrerequisites\">        \n        <Exec Command=\"$(RestoreCommand)\"\n              Condition=\"'$(OS)' != 'Windows_NT' And Exists('$(PackagesConfig)')\" />\n\n        <Exec Command=\"$(RestoreCommand)\"\n              LogStandardErrorAsError=\"true\"\n              Condition=\"'$(OS)' == 'Windows_NT' And Exists('$(PackagesConfig)')\" />\n    </Target>\n\n    <Target Name=\"BuildPackage\" DependsOnTargets=\"CheckPrerequisites\">\n        <Exec Command=\"$(BuildCommand)\"\n              Condition=\" '$(OS)' != 'Windows_NT' \" />\n\n        <Exec Command=\"$(BuildCommand)\"\n              LogStandardErrorAsError=\"true\"\n              Condition=\" '$(OS)' == 'Windows_NT' \" />\n    </Target>\n\n    <UsingTask TaskName=\"DownloadNuGet\" TaskFactory=\"CodeTaskFactory\" AssemblyFile=\"$(MSBuildToolsPath)\\Microsoft.Build.Tasks.v4.0.dll\">\n        <ParameterGroup>\n            <OutputFilename ParameterType=\"System.String\" Required=\"true\" />\n        </ParameterGroup>\n        <Task>\n            <Reference Include=\"System.Core\" />\n            <Using Namespace=\"System\" />\n            <Using Namespace=\"System.IO\" />\n            <Using Namespace=\"System.Net\" />\n            <Using Namespace=\"Microsoft.Build.Framework\" />\n            <Using Namespace=\"Microsoft.Build.Utilities\" />\n            <Code Type=\"Fragment\" Language=\"cs\">\n                <![CDATA[\n                try {\n                    OutputFilename = Path.GetFullPath(OutputFilename);\n\n                    Log.LogMessage(\"Downloading latest version of NuGet.exe...\");\n                    WebClient webClient = new WebClient();\n                    webClient.DownloadFile(\"https://www.nuget.org/nuget.exe\", OutputFilename);\n\n                    return true;\n                }\n                catch (Exception ex) {\n                    Log.LogErrorFromException(ex);\n                    return false;\n                }\n            ]]>\n            </Code>\n        </Task>\n    </UsingTask>\n</Project>\n"
  },
  {
    "path": "22 - Event Sourcing/PPPDDDChap22/PPPDDDChap23.EventSourcing.Application/Application/BusinessUseCases/CreateAccount.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\nusing PPPDDDChap23.EventSourcing.Application.Model.PayAsYouGo;\nusing Raven.Client;\nusing Raven.Abstractions.Exceptions;\nusing PPPDDDChap23.EventSourcing.Application.Infrastructure;\n\nnamespace PPPDDDChap23.EventSourcing.Application.Application.BusinessUseCases\n{\n    public class CreateAccount\n    {\n        private IPayAsYouGoAccountRepository _payAsYouGoAccountRepository;\n        private IDocumentSession _unitOfWork;\n\n        public CreateAccount(IPayAsYouGoAccountRepository payAsYouGoAccountRepository,\n                           IDocumentSession unitOfWork)\n        {\n            _payAsYouGoAccountRepository = payAsYouGoAccountRepository;\n            _unitOfWork = unitOfWork;\n        }\n\n        public void Execute(Guid id)\n        {\n            var payAsYouGoAccount = new PayAsYouGoAccount(id, new Money(10m));\n\n            _payAsYouGoAccountRepository.Add(payAsYouGoAccount);\n\n            _unitOfWork.SaveChanges();            \n        }\n    }\n}\n"
  },
  {
    "path": "22 - Event Sourcing/PPPDDDChap22/PPPDDDChap23.EventSourcing.Application/Application/BusinessUseCases/RecordPhonecall.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\nusing PPPDDDChap23.EventSourcing.Application.Model.PayAsYouGo;\nusing Raven.Client;\nusing Raven.Abstractions.Exceptions;\nusing PPPDDDChap23.EventSourcing.Application.Infrastructure;\n\nnamespace PPPDDDChap23.EventSourcing.Application.Application.BusinessUseCases\n{\n    public class RecordPhonecall\n    {\n        private IPayAsYouGoAccountRepository _payAsYouGoAccountRepository;\n        private IDocumentSession _unitOfWork;\n        private IClock _clock;\n\n        public RecordPhonecall(IPayAsYouGoAccountRepository payAsYouGoAccountRepository,\n                           IDocumentSession unitOfWork, IClock clock)\n        {\n            _payAsYouGoAccountRepository = payAsYouGoAccountRepository;\n            _unitOfWork = unitOfWork;\n            _clock = clock;\n        }\n\n        public void Execute(Guid id, string phoneNumber, DateTime callStart, int callLengthInMinutes)\n        {\n            try{\n                var payAsYouGoAccount = _payAsYouGoAccountRepository.FindBy(id);\n\n                var numberDialled = new PhoneNumber(phoneNumber);\n                var phoneCall = new PhoneCall(numberDialled, callStart, new Minutes(callLengthInMinutes));\n\n                payAsYouGoAccount.Record(phoneCall, new PhoneCallCosting(), _clock);\n\n                _payAsYouGoAccountRepository.Save(payAsYouGoAccount);\n\n                _unitOfWork.SaveChanges();\n            }\n            catch (ConcurrencyException ex)\n            {\n                _unitOfWork.Advanced.Clear();\n\n                // TODO: Add logic to retry X times then move to an error queue\n                // Execute(id, phoneNumber, callStart, callLengthInMinutes);\n\n                throw ex;\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "22 - Event Sourcing/PPPDDDChap22/PPPDDDChap23.EventSourcing.Application/Application/BusinessUseCases/TopUpCredit.cs",
    "content": "﻿using System;\nusing PPPDDDChap23.EventSourcing.Application.Model.PayAsYouGo;\nusing Raven.Client;\nusing Raven.Abstractions.Exceptions;\nusing PPPDDDChap23.EventSourcing.Application.Infrastructure;\n\nnamespace PPPDDDChap23.EventSourcing.Application.Application.BusinessUseCases\n{\n    public class TopUpCredit\n    {\n        private IPayAsYouGoAccountRepository _payAsYouGoAccountRepository;\n        private IDocumentSession _unitOfWork;\n        private IClock _clock;\n\n        public TopUpCredit(IPayAsYouGoAccountRepository payAsYouGoAccountRepository,\n                           IDocumentSession unitOfWork,\n                           IClock clock)\n        {\n            _payAsYouGoAccountRepository = payAsYouGoAccountRepository;\n            _unitOfWork = unitOfWork;\n            _clock = clock;\n        }\n\n        public void Execute(Guid id, decimal amount)\n        {\n            try\n            {\n                var account = _payAsYouGoAccountRepository.FindBy(id);\n\n                var credit = new Money(amount);\n\n                account.TopUp(credit, _clock); \n\n                _payAsYouGoAccountRepository.Save(account);\n                                               \n                _unitOfWork.SaveChanges();         \n            }\n            catch (ConcurrencyException ex)\n            {\n                _unitOfWork.Advanced.Clear();\n\n                // TODO: Add logic to retry X times then move to an error queue\n                // Execute(id, amount);\n\n                throw ex;\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "22 - Event Sourcing/PPPDDDChap22/PPPDDDChap23.EventSourcing.Application/Bootstrapper.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\nusing Raven.Client;\nusing Raven.Client.Document;\nusing Raven.Client.Extensions;\nusing Raven.Client.Indexes;\nusing StructureMap;\nusing PPPDDDChap23.EventSourcing.Application.Infrastructure;\nusing PPPDDDChap23.EventSourcing.Application.Model.PayAsYouGo;\n\nnamespace PPPDDDChap23.EventSourcing.Application\n{\n    public static class Bootstrapper\n    {\n        public static void Startup()\n        {           \n            var documentStore = new DocumentStore\n            {\n                ConnectionStringName = \"RavenDB\"\n            }.Initialize();\n\n            documentStore.DatabaseCommands.EnsureDatabaseExists(\"EventSourcingExample\");\n\n            ObjectFactory.Initialize(config =>\n            {\n                config.For<IPayAsYouGoAccountRepository>().Use<PayAsYouGoAccountRepository>();\n                config.For<IClock>().Use<SystemClock>();\n               \n                config.For<IDocumentStore>().Use(documentStore);\n                config.For<IDocumentSession>()\n                    .HybridHttpOrThreadLocalScoped()\n                    .Use(x =>\n                    {\n                        var store = x.GetInstance<IDocumentStore>();\n                        var session = store.OpenSession();\n                        session.Advanced.UseOptimisticConcurrency = true;\n                        return session;\n                    });                \n            });\n        }\n    }\n}\n"
  },
  {
    "path": "22 - Event Sourcing/PPPDDDChap22/PPPDDDChap23.EventSourcing.Application/Infrastructure/Entity.cs",
    "content": "﻿using System;\n\nnamespace PPPDDDChap23.EventSourcing.Application.Infrastructure\n{\n    public abstract class Entity\n    {\n        public Guid Id { get; protected set; }\n    }\n}"
  },
  {
    "path": "22 - Event Sourcing/PPPDDDChap22/PPPDDDChap23.EventSourcing.Application/Infrastructure/EventSourcedAggregate.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace PPPDDDChap23.EventSourcing.Application.Infrastructure\n{\n    public abstract class EventSourcedAggregate : Entity\n    {\n        public List<DomainEvent> Changes { get; private set; }\n        public int Version { get; protected set; }\n\n        public EventSourcedAggregate()\n        {\n            Changes = new List<DomainEvent>();\n        }\n\n        public abstract void Apply(DomainEvent changes);\n    }\n}\n"
  },
  {
    "path": "22 - Event Sourcing/PPPDDDChap22/PPPDDDChap23.EventSourcing.Application/Infrastructure/EventStore.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\nusing Raven.Client;\n\nnamespace PPPDDDChap23.EventSourcing.Application.Infrastructure\n{\n    public class EventStore\n    {\n        private readonly IDocumentSession _documentSession;\n\n        public EventStore(IDocumentSession documentSession)\n        { \n            _documentSession = documentSession;\n        }\n\n        public void CreateNewStream(string streamName, IEnumerable<Object> domainEvents)\n        {\n            var eventStream = new EventStream(streamName);\n            _documentSession.Store(eventStream);\n\n            AppendEventsToStream(streamName, domainEvents);\n        }\n\n        public void AppendEventsToStream(string streamName, IEnumerable<Object> domainEvents)\n        {\n            var stream = _documentSession.Load<EventStream>(streamName);\n\n            foreach (var @event in domainEvents)\n            {\n                _documentSession.Store(stream.RegisterEvent(@event));\n            }\n        }\n\n        public IEnumerable<Object> GetStream(string streamName, int fromVersion, int toVersion)\n        {\n            // Get events from a specific version\n            var eventWrappers = (from stream in _documentSession.Query<EventWrapper>()\n                                  .Customize(x => x.WaitForNonStaleResultsAsOfNow())\n                                  where stream.EventStreamId.Equals(streamName)\n                                  && stream.EventNumber <= toVersion\n                                  && stream.EventNumber >= fromVersion\n                                  orderby stream.EventNumber\n                                  select stream).ToList();\n\n            if (eventWrappers.Count() == 0) return null;\n                      \n            var events = new List<Object>();\n\n            foreach (var @event in eventWrappers)\n            {\n                events.Add(@event.Event);\n            }\n\n            return events;\n        }\n    }\n}\n"
  },
  {
    "path": "22 - Event Sourcing/PPPDDDChap22/PPPDDDChap23.EventSourcing.Application/Infrastructure/EventStream.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace PPPDDDChap23.EventSourcing.Application.Infrastructure\n{\n    public class EventStream\n    {\n        public string Id { get; private set; } //aggregate type + id\n        public int Version {get; private set;}\n\n        private EventStream() { }\n\n        public EventStream(string id)\n        {\n            Id = id;\n            Version = 0;\n        }\n\n        public EventWrapper RegisterEvent(DomainEvent @event)\n        {\n            Version ++;\n\n            return new EventWrapper(@event, Version, Id);\n        }\n    }\n}\n"
  },
  {
    "path": "22 - Event Sourcing/PPPDDDChap22/PPPDDDChap23.EventSourcing.Application/Infrastructure/EventWrapper.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace PPPDDDChap23.EventSourcing.Application.Infrastructure\n{\n    public class EventWrapper\n    {\n        public string Id { get; private set; }\n        public DomainEvent Event { get; private set; }\n        public string EventStreamId { get; private set; }\n        public int EventNumber { get; private set; }\n\n        public EventWrapper(DomainEvent @event, int eventNumber, string streamStateId)\n        {\n            Event = @event;     \n            EventNumber = eventNumber;\n            EventStreamId = streamStateId;\n            Id = string.Format(\"{0}-{1}\", streamStateId, EventNumber);\n        }\n    }\n}\n"
  },
  {
    "path": "22 - Event Sourcing/PPPDDDChap22/PPPDDDChap23.EventSourcing.Application/Infrastructure/IClock.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace PPPDDDChap23.EventSourcing.Application.Infrastructure\n{\n    public interface IClock\n    {\n        DateTime Time();\n    }\n}\n"
  },
  {
    "path": "22 - Event Sourcing/PPPDDDChap22/PPPDDDChap23.EventSourcing.Application/Infrastructure/PayAsYouGoAccountRepository.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\nusing Raven.Client;\nusing PPPDDDChap23.EventSourcing.Application.Model.PayAsYouGo;\n\nnamespace PPPDDDChap23.EventSourcing.Application.Infrastructure\n{\n    public class PayAsYouGoAccountRepository : IPayAsYouGoAccountRepository\n    {\n        private readonly EventStore _eventStore;\n\n        public PayAsYouGoAccountRepository(EventStore eventStore)\n        {\n            _eventStore = eventStore;\n        }\n\n        public PayAsYouGoAccount FindBy(Guid id)\n        {\n            var streamName = string.Format(\"{0}-{1}\", typeof(PayAsYouGoAccount).Name, id.ToString());\n\n            // Check for snapshots\n\n            var fromEventNumber = 0;\n            var toEventNumber = int.MaxValue ;\n\n            // pull back all events from snapshot\n            var stream = _eventStore.GetStream(streamName, fromEventNumber, toEventNumber);\n\n            var payAsYouGoAccount = new PayAsYouGoAccount();\n\n            foreach(var @event in stream)\n            {\n                payAsYouGoAccount.Apply(@event);\n            }\n\n            return payAsYouGoAccount;            \n        }\n\n        public void Add(PayAsYouGoAccount payAsYouGoAccount)\n        {\n            var streamName = string.Format(\"{0}-{1}\", typeof(PayAsYouGoAccount).Name, payAsYouGoAccount.Id.ToString());\n\n            _eventStore.CreateNewStream(streamName, payAsYouGoAccount.Changes);\n        }\n\n        public void Save(PayAsYouGoAccount payAsYouGoAccount)\n        {\n            var streamName = string.Format(\"{0}-{1}\", typeof(PayAsYouGoAccount).Name, payAsYouGoAccount.Id.ToString());\n\n            _eventStore.AppendEventsToStream(streamName, payAsYouGoAccount.Changes);                      \n        }\n\n    }\n}\n"
  },
  {
    "path": "22 - Event Sourcing/PPPDDDChap22/PPPDDDChap23.EventSourcing.Application/Infrastructure/SystemClock.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace PPPDDDChap23.EventSourcing.Application.Infrastructure\n{\n    public class SystemClock : IClock\n    {\n        public DateTime Time()\n        {\n            return DateTime.Now;\n        }\n    }\n}\n"
  },
  {
    "path": "22 - Event Sourcing/PPPDDDChap22/PPPDDDChap23.EventSourcing.Application/Infrastructure/ValueObject.cs",
    "content": "﻿using System.Collections.Generic;\nusing System.Linq;\n\nnamespace PPPDDDChap23.EventSourcing.Application.Infrastructure\n{\n    public abstract class ValueObject<T> where T : ValueObject<T>\n    {\n        protected abstract IEnumerable<object> GetAttributesToIncludeInEqualityCheck();\n\n        public override bool Equals(object other)\n        {\n            return Equals(other as T);\n        }\n\n        public bool Equals(T other)\n        {\n            if (other == null)\n            {\n                return false;\n            }\n            return GetAttributesToIncludeInEqualityCheck().SequenceEqual(other.GetAttributesToIncludeInEqualityCheck());\n        }\n\n        public static bool operator ==(ValueObject<T> left, ValueObject<T> right)\n        {\n            return Equals(left, right);\n        }\n\n        public static bool operator !=(ValueObject<T> left, ValueObject<T> right)\n        {\n            return !(left == right);\n        }\n\n        public override int GetHashCode()\n        {\n            int hash = 17;\n            foreach (var obj in this.GetAttributesToIncludeInEqualityCheck())\n                hash = hash * 31 + (obj == null ? 0 : obj.GetHashCode());\n\n            return hash;\n        }\n    }\n}\n"
  },
  {
    "path": "22 - Event Sourcing/PPPDDDChap22/PPPDDDChap23.EventSourcing.Application/Model/PayAsYouGo/AccountCreated.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\nusing PPPDDDChap23.EventSourcing.Application.Infrastructure;\n\nnamespace PPPDDDChap23.EventSourcing.Application.Model.PayAsYouGo\n{\n    public class AccountCreated  : DomainEvent\n    {\n        public AccountCreated(Guid aggregateId, Money credit)\n            : base(aggregateId)\n        {\n            Credit = credit;\n        }\n\n        public Money Credit { get; private set; }        \n    }\n}\n"
  },
  {
    "path": "22 - Event Sourcing/PPPDDDChap22/PPPDDDChap23.EventSourcing.Application/Model/PayAsYouGo/CreditAdded.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\nusing PPPDDDChap23.EventSourcing.Application.Infrastructure;\n\nnamespace PPPDDDChap23.EventSourcing.Application.Model.PayAsYouGo\n{\n    public class CreditAdded : DomainEvent\n    {\n        public CreditAdded(Guid aggregateId, Money credit)\n            : base(aggregateId)\n        {\n            Credit = credit;\n        }\n\n        public Money Credit { get; private set; }\n    }\n}\n"
  },
  {
    "path": "22 - Event Sourcing/PPPDDDChap22/PPPDDDChap23.EventSourcing.Application/Model/PayAsYouGo/CreditSatisfiesFreeCallAllowanceOffer.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\nusing PPPDDDChap23.EventSourcing.Application.Infrastructure;\n\nnamespace PPPDDDChap23.EventSourcing.Application.Model.PayAsYouGo\n{\n    public class CreditSatisfiesFreeCallAllowanceOffer : DomainEvent\n    {\n        public CreditSatisfiesFreeCallAllowanceOffer(Guid aggregateId, DateTime offerSatisfied, Minutes freeMinutes)\n            : base(aggregateId) \n        {\n            OfferSatisfied = offerSatisfied;\n            FreeMinutes = freeMinutes;\n        }\n\n        public DateTime OfferSatisfied { get; private set; }\n        public Minutes FreeMinutes { get; private set; }\n    }\n}\n"
  },
  {
    "path": "22 - Event Sourcing/PPPDDDChap22/PPPDDDChap23.EventSourcing.Application/Model/PayAsYouGo/FreeCallAllowance.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\nusing PPPDDDChap23.EventSourcing.Application.Infrastructure;\n\nnamespace PPPDDDChap23.EventSourcing.Application.Model.PayAsYouGo\n{\n    public class FreeCallAllowance\n    {\n        // Your allowances will expire after 30 days.  \n        // Calls to standard UK mobiles and landlines (01, 02, 03) within the UK.\n\n        public Minutes Allowance { get; private set; }\n        public DateTime DateStarted { get; private set; }\n\n        public FreeCallAllowance(Minutes allowance, DateTime dateStarted)\n        {\n            Allowance = allowance;\n            DateStarted = dateStarted;\n        }\n\n        public void Subtract(Minutes minutes)\n        {\n            Allowance = Allowance.Subtract(minutes);\n        }\n        \n        public Minutes MinutesWhichCanCover(PhoneCall phoneCall, IClock clock)\n        {\n            if (Allowance.IsGreaterOrEqualTo(phoneCall.Minutes))\n            {\n                return phoneCall.Minutes;\n            }\n            else\n            {\n                return Allowance;\n            }\n        }\n\n        private bool StillValid(IClock clock)\n        {\n            return DateStarted.AddDays(30) > clock.Time();\n        }\n    }\n}\n"
  },
  {
    "path": "22 - Event Sourcing/PPPDDDChap22/PPPDDDChap23.EventSourcing.Application/Model/PayAsYouGo/IPayAsYouGoAccountRepository.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace PPPDDDChap23.EventSourcing.Application.Model.PayAsYouGo\n{\n    public interface IPayAsYouGoAccountRepository\n    {\n        PayAsYouGoAccount FindBy(Guid id);\n\n        void Add(PayAsYouGoAccount payAsYouGoAccount);\n\n        void Save(PayAsYouGoAccount payAsYouGoAccount); \n    }\n}\n"
  },
  {
    "path": "22 - Event Sourcing/PPPDDDChap22/PPPDDDChap23.EventSourcing.Application/Model/PayAsYouGo/Minutes.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace PPPDDDChap23.EventSourcing.Application.Model.PayAsYouGo\n{\n    public class Minutes\n    {\n        protected int Number { get; private set; }\n\n        public Minutes() : this(0) { }\n\n        public Minutes(int number)\n        {\n            // Can't be nagative\n            Number = number;\n        }\n\n        public Minutes Subtract(Minutes minutes)\n        {            \n            return new Minutes(Number - minutes.Number);\n        }\n\n        public Money CostAt(Money chargePerMinute)\n        {\n            return chargePerMinute.MultiplyBy(Number);\n        }\n\n        public bool IsGreaterOrEqualTo(Minutes minutes)\n        {\n            return this.Number >= minutes.Number;\n        }\n    }\n}\n"
  },
  {
    "path": "22 - Event Sourcing/PPPDDDChap22/PPPDDDChap23.EventSourcing.Application/Model/PayAsYouGo/Money.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\nusing PPPDDDChap23.EventSourcing.Application.Infrastructure;\n\nnamespace PPPDDDChap23.EventSourcing.Application.Model.PayAsYouGo\n{\n    public class Money : ValueObject<Money>, IComparable<Money>\n    {\n        protected decimal Amount { get; set; }\n\n        public Money()\n            : this(0m)\n        {\n        }\n\n        public Money(decimal amount)\n        {\n            ThrowExceptionIfNotValid(amount);\n\n            Amount = amount;\n        }\n\n        private void ThrowExceptionIfNotValid(decimal amount)\n        {\n            if (amount % 0.01m != 0)\n                throw new ArgumentException(\"Amount can be 2 decmial places only.\"); \n\n            if (amount < 0)\n                throw new ArgumentException(\"Money cannot be a negative amount\");\n        }\n\n        public Money Add(Money money)\n        {\n            return new Money(this.Amount + money.Amount);\n        }\n\n        public bool IsGreaterThanOrEqualTo(Money money)\n        {\n            return this.Amount >= money.Amount;\n        }\n\n        public Money Subtract(Money money)\n        {\n            return new Money(this.Amount - money.Amount);\n        }\n\n        public Money MultiplyBy(int number)\n        {\n            return new Money(this.Amount * number);\n        }\n\n        protected override IEnumerable<object> GetAttributesToIncludeInEqualityCheck()\n        {\n            return new List<Object>() { Amount };\n        }\n\n        public int CompareTo(Money other)\n        {\n            return this.Amount.CompareTo(other.Amount);\n        }\n    }\n}\n"
  },
  {
    "path": "22 - Event Sourcing/PPPDDDChap22/PPPDDDChap23.EventSourcing.Application/Model/PayAsYouGo/PayAsYouGoAccount.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\nusing PPPDDDChap23.EventSourcing.Application.Infrastructure;\n\nnamespace PPPDDDChap23.EventSourcing.Application.Model.PayAsYouGo\n{\n    public class PayAsYouGoAccount : EventSourcedAggregate\n    {\n        private FreeCallAllowance _freeCallAllowance;\n        private Money _credit;\n        private PayAsYouGoInclusiveMinutesOffer _InclusiveMinutesOffer = new PayAsYouGoInclusiveMinutesOffer();\n\n        public PayAsYouGoAccount()\n        { }\n\n        public PayAsYouGoAccount(Guid id, Money credit)\n        {\n            Causes(new AccountCreated(id, credit));          \n        }\n\n        public PayAsYouGoAccount(PayAsYouGoAccountSnapshot snapShot)\n        {\n            // Restore all state\n            Version = snapShot.Version;\n        }\n\n        public override void Apply(DomainEvent @event)\n        {            \n            When((dynamic)@event);  \n            Version = Version ++;\n        }\n\n        public PayAsYouGoAccountSnapshot GetPayAsYouGoAccountSnapShot()\n        { \n            var snapshot = new PayAsYouGoAccountSnapshot();\n\n            // Save all state\n\n            snapshot.Version = Version;\n\n            return snapshot;\n        }\n\n        public void Record(PhoneCall phoneCall, PhoneCallCosting phoneCallCosting, IClock clock) \n        {\n            var numberOfMinutesCoveredByAllowance = new Minutes();\n      \n            if (_freeCallAllowance != null)\n                numberOfMinutesCoveredByAllowance = _freeCallAllowance.MinutesWhichCanCover(phoneCall, clock);\n\n            var numberOfMinutesToChargeFor = phoneCall.Minutes.Subtract(numberOfMinutesCoveredByAllowance);\n\n            var costOfCall = phoneCallCosting.DetermineCostOfCall(numberOfMinutesToChargeFor);\n\n            Causes(new PhoneCallCharged(this.Id, phoneCall, costOfCall, numberOfMinutesCoveredByAllowance));\n        }\n\n        public void TopUp(Money credit, IClock clock)\n        {\n            if (_InclusiveMinutesOffer.IsSatisfiedBy(credit))\n                Causes(new CreditSatisfiesFreeCallAllowanceOffer(this.Id, clock.Time(), _InclusiveMinutesOffer.FreeMinutes));            \n\n            Causes(new CreditAdded(this.Id, credit));\n        }\n\n        private void Causes(DomainEvent @event)\n        {            \n            Changes.Add(@event);\n            Apply(@event);\n        }\n\n        private void When(CreditAdded creditAdded)\n        {\n            _credit = _credit.Add(creditAdded.Credit);\n        }\n\n        private void When(CreditSatisfiesFreeCallAllowanceOffer creditSatisfiesFreeCallAllowanceOffer)\n        {\n            _freeCallAllowance = new FreeCallAllowance(creditSatisfiesFreeCallAllowanceOffer.FreeMinutes, creditSatisfiesFreeCallAllowanceOffer.OfferSatisfied);\n        }\n\n        private void When(PhoneCallCharged phoneCallCharged)\n        {\n            _credit = _credit.Subtract(phoneCallCharged.CostOfCall);\n\n            if (_freeCallAllowance != null)\n                _freeCallAllowance.Subtract(phoneCallCharged.CoveredByAllowance);\n        }\n\n        private void When(AccountCreated accountCreated)\n        {\n            Id = accountCreated.Id;\n            _credit = accountCreated.Credit;\n        }\n    }\n}\n"
  },
  {
    "path": "22 - Event Sourcing/PPPDDDChap22/PPPDDDChap23.EventSourcing.Application/Model/PayAsYouGo/PayAsYouGoAccountSnapshot.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace PPPDDDChap23.EventSourcing.Application.Model.PayAsYouGo\n{\n    public class PayAsYouGoAccountSnapshot\n    {\n        public int Version {get; set;}\n    }\n}\n"
  },
  {
    "path": "22 - Event Sourcing/PPPDDDChap22/PPPDDDChap23.EventSourcing.Application/Model/PayAsYouGo/PayAsYouGoInclusiveMinutesOffer.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace PPPDDDChap23.EventSourcing.Application.Model.PayAsYouGo\n{\n    public class PayAsYouGoInclusiveMinutesOffer\n    {\n        private Money spendThreshold;\n\n        public PayAsYouGoInclusiveMinutesOffer()\n        {\n            spendThreshold = new Money(10m);\n            FreeMinutes = new Minutes(90);\n        }\n\n        public bool IsSatisfiedBy(Money credit)\n        {\n            return credit.IsGreaterThanOrEqualTo(spendThreshold);\n        }\n\n        public Minutes FreeMinutes { get; private set; }\n    }\n}\n"
  },
  {
    "path": "22 - Event Sourcing/PPPDDDChap22/PPPDDDChap23.EventSourcing.Application/Model/PayAsYouGo/PhoneCall.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace PPPDDDChap23.EventSourcing.Application.Model.PayAsYouGo\n{\n    public class PhoneCall\n    {\n        public PhoneCall(PhoneNumber numberDialled, DateTime callStart, Minutes callLength)\n        {\n            NumberDialled = numberDialled;\n            Minutes = callLength;\n            StartTime = callStart;\n        }\n\n        public DateTime StartTime {get; private set;} \n        public Minutes Minutes {get; private set;}\n        public PhoneNumber NumberDialled { get; private set; }\n    }\n}\n"
  },
  {
    "path": "22 - Event Sourcing/PPPDDDChap22/PPPDDDChap23.EventSourcing.Application/Model/PayAsYouGo/PhoneCallCharged.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\nusing PPPDDDChap23.EventSourcing.Application.Infrastructure;\n\nnamespace PPPDDDChap23.EventSourcing.Application.Model.PayAsYouGo\n{\n    public class PhoneCallCharged : DomainEvent\n    {\n        public PhoneCallCharged(Guid aggregateId, PhoneCall phoneCall, Money costOfCall, Minutes coveredByAllowance) : base (aggregateId)\n        {\n            PhoneCall = phoneCall;\n            CostOfCall = costOfCall;\n            CoveredByAllowance = coveredByAllowance;\n        }\n\n        public PhoneCall PhoneCall { get; private set; }\n\n        public Money CostOfCall { get; private set; }\n\n        public Minutes CoveredByAllowance { get; private set; }\n    }\n}\n"
  },
  {
    "path": "22 - Event Sourcing/PPPDDDChap22/PPPDDDChap23.EventSourcing.Application/Model/PayAsYouGo/PhoneCallCosting.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace PPPDDDChap23.EventSourcing.Application.Model.PayAsYouGo\n{\n    public class PhoneCallCosting\n    {\n        private Money PricePerMinute { get; set; }\n\n        public PhoneCallCosting()\n        {\n            PricePerMinute = new Money(0.30m); \n        }\n\n        public Money DetermineCostOfCall(Minutes minutes)\n        {\n            return minutes.CostAt(PricePerMinute);\n        }\n    }\n}\n"
  },
  {
    "path": "22 - Event Sourcing/PPPDDDChap22/PPPDDDChap23.EventSourcing.Application/Model/PayAsYouGo/PhoneNumber.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace PPPDDDChap23.EventSourcing.Application.Model.PayAsYouGo\n{\n    public class PhoneNumber\n    {\n        public PhoneNumber(string phoneNumber)\n        {\n            Number = phoneNumber;\n        }\n\n        public string Number { get; set; }\n\n        public bool IsUKLandlineOrMobile()\n        {\n            return Number.StartsWith(\"+44\");\n        }\n\n        public bool IsInternational()\n        {\n            return !IsUKLandlineOrMobile();\n        }\n    }\n}\n"
  },
  {
    "path": "22 - Event Sourcing/PPPDDDChap22/PPPDDDChap23.EventSourcing.Application/PPPDDDChap23.EventSourcing.Application.csproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"4.0\" DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <Import Project=\"$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props\" Condition=\"Exists('$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props')\" />\n  <PropertyGroup>\n    <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>\n    <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>\n    <ProjectGuid>{8D3BFFDD-A798-4CE5-B427-8A755698DC9C}</ProjectGuid>\n    <OutputType>Library</OutputType>\n    <AppDesignerFolder>Properties</AppDesignerFolder>\n    <RootNamespace>PPPDDDChap23.EventSourcing.Application</RootNamespace>\n    <AssemblyName>PPPDDDChap23.EventSourcing.Application</AssemblyName>\n    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\n    <FileAlignment>512</FileAlignment>\n    <SolutionDir Condition=\"$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'\">..\\</SolutionDir>\n    <RestorePackages>true</RestorePackages>\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' \">\n    <DebugSymbols>true</DebugSymbols>\n    <DebugType>full</DebugType>\n    <Optimize>false</Optimize>\n    <OutputPath>bin\\Debug\\</OutputPath>\n    <DefineConstants>DEBUG;TRACE</DefineConstants>\n    <ErrorReport>prompt</ErrorReport>\n    <WarningLevel>4</WarningLevel>\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' \">\n    <DebugType>pdbonly</DebugType>\n    <Optimize>true</Optimize>\n    <OutputPath>bin\\Release\\</OutputPath>\n    <DefineConstants>TRACE</DefineConstants>\n    <ErrorReport>prompt</ErrorReport>\n    <WarningLevel>4</WarningLevel>\n  </PropertyGroup>\n  <ItemGroup>\n    <Reference Include=\"Raven.Abstractions\">\n      <HintPath>..\\packages\\RavenDB.Client.2.5.2851\\lib\\net45\\Raven.Abstractions.dll</HintPath>\n    </Reference>\n    <Reference Include=\"Raven.Client.Lightweight\">\n      <HintPath>..\\packages\\RavenDB.Client.2.5.2851\\lib\\net45\\Raven.Client.Lightweight.dll</HintPath>\n    </Reference>\n    <Reference Include=\"StructureMap\">\n      <HintPath>..\\packages\\structuremap.2.6.4.1\\lib\\net40\\StructureMap.dll</HintPath>\n    </Reference>\n    <Reference Include=\"System\" />\n    <Reference Include=\"System.ComponentModel.Composition\" />\n    <Reference Include=\"System.Core\" />\n    <Reference Include=\"System.Xml.Linq\" />\n    <Reference Include=\"System.Data.DataSetExtensions\" />\n    <Reference Include=\"Microsoft.CSharp\" />\n    <Reference Include=\"System.Data\" />\n    <Reference Include=\"System.Xml\" />\n  </ItemGroup>\n  <ItemGroup>\n    <Compile Include=\"Application\\BusinessUseCases\\CreateAccount.cs\" />\n    <Compile Include=\"Application\\BusinessUseCases\\RecordPhonecall.cs\" />\n    <Compile Include=\"Application\\BusinessUseCases\\TopUpCredit.cs\" />\n    <Compile Include=\"Bootstrapper.cs\" />\n    <Compile Include=\"Infrastructure\\Entity.cs\" />\n    <Compile Include=\"Infrastructure\\EventStore.cs\" />\n    <Compile Include=\"Infrastructure\\EventSourcedAggregate.cs\" />\n    <Compile Include=\"Infrastructure\\EventWrapper.cs\" />\n    <Compile Include=\"Infrastructure\\IClock.cs\" />\n    <Compile Include=\"Infrastructure\\PayAsYouGoAccountRepository.cs\" />\n    <Compile Include=\"Infrastructure\\EventStream.cs\" />\n    <Compile Include=\"Infrastructure\\SystemClock.cs\" />\n    <Compile Include=\"Infrastructure\\ValueObject.cs\" />\n    <Compile Include=\"Model\\PayAsYouGo\\AccountCreated.cs\" />\n    <Compile Include=\"Model\\PayAsYouGo\\IPayAsYouGoAccountRepository.cs\" />\n    <Compile Include=\"Model\\PayAsYouGo\\Minutes.cs\" />\n    <Compile Include=\"Model\\PayAsYouGo\\Money.cs\" />\n    <Compile Include=\"Model\\PayAsYouGo\\CreditAdded.cs\" />\n    <Compile Include=\"Model\\PayAsYouGo\\CreditSatisfiesFreeCallAllowanceOffer.cs\" />\n    <Compile Include=\"Model\\PayAsYouGo\\FreeCallAllowance.cs\" />\n    <Compile Include=\"Model\\PayAsYouGo\\PayAsYouGoAccount.cs\" />\n    <Compile Include=\"Model\\PayAsYouGo\\PayAsYouGoAccountSnapshot.cs\" />\n    <Compile Include=\"Model\\PayAsYouGo\\PayAsYouGoInclusiveMinutesOffer.cs\" />\n    <Compile Include=\"Model\\PayAsYouGo\\PhoneCall.cs\" />\n    <Compile Include=\"Model\\PayAsYouGo\\PhoneCallCharged.cs\" />\n    <Compile Include=\"Model\\PayAsYouGo\\PhoneCallCosting.cs\" />\n    <Compile Include=\"Model\\PayAsYouGo\\PhoneNumber.cs\" />\n    <Compile Include=\"Properties\\AssemblyInfo.cs\" />\n  </ItemGroup>\n  <ItemGroup>\n    <Folder Include=\"Application\\Queries\\\" />\n  </ItemGroup>\n  <ItemGroup>\n    <None Include=\"packages.config\" />\n  </ItemGroup>\n  <Import Project=\"$(MSBuildToolsPath)\\Microsoft.CSharp.targets\" />\n  <Import Project=\"$(SolutionDir)\\.nuget\\NuGet.targets\" Condition=\"Exists('$(SolutionDir)\\.nuget\\NuGet.targets')\" />\n  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \n       Other similar extension points exist, see Microsoft.Common.targets.\n  <Target Name=\"BeforeBuild\">\n  </Target>\n  <Target Name=\"AfterBuild\">\n  </Target>\n  -->\n</Project>"
  },
  {
    "path": "22 - Event Sourcing/PPPDDDChap22/PPPDDDChap23.EventSourcing.Application/Properties/AssemblyInfo.cs",
    "content": "﻿using System.Reflection;\nusing System.Runtime.CompilerServices;\nusing System.Runtime.InteropServices;\n\n// General Information about an assembly is controlled through the following \n// set of attributes. Change these attribute values to modify the information\n// associated with an assembly.\n[assembly: AssemblyTitle(\"PPPDDDChap23.EventSourcing.Application\")]\n[assembly: AssemblyDescription(\"\")]\n[assembly: AssemblyConfiguration(\"\")]\n[assembly: AssemblyCompany(\"\")]\n[assembly: AssemblyProduct(\"PPPDDDChap23.EventSourcing.Application\")]\n[assembly: AssemblyCopyright(\"Copyright ©  2014\")]\n[assembly: AssemblyTrademark(\"\")]\n[assembly: AssemblyCulture(\"\")]\n\n// Setting ComVisible to false makes the types in this assembly not visible \n// to COM components.  If you need to access a type in this assembly from \n// COM, set the ComVisible attribute to true on that type.\n[assembly: ComVisible(false)]\n\n// The following GUID is for the ID of the typelib if this project is exposed to COM\n[assembly: Guid(\"c4d43060-b1aa-465f-bf2c-3eeabf1a4abd\")]\n\n// Version information for an assembly consists of the following four values:\n//\n//      Major Version\n//      Minor Version \n//      Build Number\n//      Revision\n//\n// You can specify all the values or you can default the Build and Revision Numbers \n// by using the '*' as shown below:\n// [assembly: AssemblyVersion(\"1.0.*\")]\n[assembly: AssemblyVersion(\"1.0.0.0\")]\n[assembly: AssemblyFileVersion(\"1.0.0.0\")]\n"
  },
  {
    "path": "22 - Event Sourcing/PPPDDDChap22/PPPDDDChap23.EventSourcing.Application/packages.config",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<packages>\n  <package id=\"RavenDB.Client\" version=\"2.5.2851\" targetFramework=\"net45\" />\n  <package id=\"structuremap\" version=\"2.6.4.1\" targetFramework=\"net45\" />\n</packages>"
  },
  {
    "path": "22 - Event Sourcing/PPPDDDChap22/PPPDDDChap23.EventSourcing.ApplicationTests/PPPDDDChap23.EventSourcing.ApplicationTests.csproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"4.0\" DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <Import Project=\"$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props\" Condition=\"Exists('$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props')\" />\n  <PropertyGroup>\n    <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>\n    <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>\n    <ProjectGuid>{CC4EB0F4-877E-4767-95F7-FCFF629D9251}</ProjectGuid>\n    <OutputType>Library</OutputType>\n    <AppDesignerFolder>Properties</AppDesignerFolder>\n    <RootNamespace>PPPDDDChap23.EventSourcing.ApplicationTests</RootNamespace>\n    <AssemblyName>PPPDDDChap23.EventSourcing.ApplicationTests</AssemblyName>\n    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\n    <FileAlignment>512</FileAlignment>\n    <SolutionDir Condition=\"$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'\">..\\</SolutionDir>\n    <RestorePackages>true</RestorePackages>\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' \">\n    <DebugSymbols>true</DebugSymbols>\n    <DebugType>full</DebugType>\n    <Optimize>false</Optimize>\n    <OutputPath>bin\\Debug\\</OutputPath>\n    <DefineConstants>DEBUG;TRACE</DefineConstants>\n    <ErrorReport>prompt</ErrorReport>\n    <WarningLevel>4</WarningLevel>\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' \">\n    <DebugType>pdbonly</DebugType>\n    <Optimize>true</Optimize>\n    <OutputPath>bin\\Release\\</OutputPath>\n    <DefineConstants>TRACE</DefineConstants>\n    <ErrorReport>prompt</ErrorReport>\n    <WarningLevel>4</WarningLevel>\n  </PropertyGroup>\n  <ItemGroup>\n    <Reference Include=\"StructureMap\">\n      <HintPath>..\\packages\\structuremap.2.6.4.1\\lib\\net40\\StructureMap.dll</HintPath>\n    </Reference>\n    <Reference Include=\"System\" />\n    <Reference Include=\"System.Core\" />\n    <Reference Include=\"System.Xml.Linq\" />\n    <Reference Include=\"System.Data.DataSetExtensions\" />\n    <Reference Include=\"Microsoft.CSharp\" />\n    <Reference Include=\"System.Data\" />\n    <Reference Include=\"System.Xml\" />\n  </ItemGroup>\n  <ItemGroup>\n    <Compile Include=\"Properties\\AssemblyInfo.cs\" />\n  </ItemGroup>\n  <ItemGroup>\n    <None Include=\"packages.config\" />\n  </ItemGroup>\n  <Import Project=\"$(MSBuildToolsPath)\\Microsoft.CSharp.targets\" />\n  <Import Project=\"$(SolutionDir)\\.nuget\\NuGet.targets\" Condition=\"Exists('$(SolutionDir)\\.nuget\\NuGet.targets')\" />\n  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \n       Other similar extension points exist, see Microsoft.Common.targets.\n  <Target Name=\"BeforeBuild\">\n  </Target>\n  <Target Name=\"AfterBuild\">\n  </Target>\n  -->\n</Project>"
  },
  {
    "path": "22 - Event Sourcing/PPPDDDChap22/PPPDDDChap23.EventSourcing.ApplicationTests/Properties/AssemblyInfo.cs",
    "content": "﻿using System.Reflection;\nusing System.Runtime.CompilerServices;\nusing System.Runtime.InteropServices;\n\n// General Information about an assembly is controlled through the following \n// set of attributes. Change these attribute values to modify the information\n// associated with an assembly.\n[assembly: AssemblyTitle(\"PPPDDDChap23.EventSourcing.ApplicationTests\")]\n[assembly: AssemblyDescription(\"\")]\n[assembly: AssemblyConfiguration(\"\")]\n[assembly: AssemblyCompany(\"\")]\n[assembly: AssemblyProduct(\"PPPDDDChap23.EventSourcing.ApplicationTests\")]\n[assembly: AssemblyCopyright(\"Copyright ©  2014\")]\n[assembly: AssemblyTrademark(\"\")]\n[assembly: AssemblyCulture(\"\")]\n\n// Setting ComVisible to false makes the types in this assembly not visible \n// to COM components.  If you need to access a type in this assembly from \n// COM, set the ComVisible attribute to true on that type.\n[assembly: ComVisible(false)]\n\n// The following GUID is for the ID of the typelib if this project is exposed to COM\n[assembly: Guid(\"cf9dd336-2d58-4976-9328-46581d46e60c\")]\n\n// Version information for an assembly consists of the following four values:\n//\n//      Major Version\n//      Minor Version \n//      Build Number\n//      Revision\n//\n// You can specify all the values or you can default the Build and Revision Numbers \n// by using the '*' as shown below:\n// [assembly: AssemblyVersion(\"1.0.*\")]\n[assembly: AssemblyVersion(\"1.0.0.0\")]\n[assembly: AssemblyFileVersion(\"1.0.0.0\")]\n"
  },
  {
    "path": "22 - Event Sourcing/PPPDDDChap22/PPPDDDChap23.EventSourcing.ApplicationTests/packages.config",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<packages>\n  <package id=\"structuremap\" version=\"2.6.4.1\" targetFramework=\"net45\" />\n</packages>"
  },
  {
    "path": "22 - Event Sourcing/PPPDDDChap22/PPPDDDChap23.EventSourcing.Presentation/App.config",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n<configuration>\n  <startup>\n    <supportedRuntime version=\"v4.0\" sku=\".NETFramework,Version=v4.5\" />\n  </startup>\n  <connectionStrings>\n    <add name=\"RavenDB\" connectionString=\"Url=http://localhost:8080;Database=EventSourcingExample\" />\n  </connectionStrings>\n</configuration>"
  },
  {
    "path": "22 - Event Sourcing/PPPDDDChap22/PPPDDDChap23.EventSourcing.Presentation/PPPDDDChap23.EventSourcing.Presentation.csproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"4.0\" DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <Import Project=\"$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props\" Condition=\"Exists('$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props')\" />\n  <PropertyGroup>\n    <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>\n    <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>\n    <ProjectGuid>{2D68287E-7C3A-4A2D-8DF8-510BD615A954}</ProjectGuid>\n    <OutputType>Exe</OutputType>\n    <AppDesignerFolder>Properties</AppDesignerFolder>\n    <RootNamespace>PPPDDDChap23.EventSourcing.Presentation</RootNamespace>\n    <AssemblyName>PPPDDDChap23.EventSourcing.Presentation</AssemblyName>\n    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\n    <FileAlignment>512</FileAlignment>\n    <SolutionDir Condition=\"$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'\">..\\</SolutionDir>\n    <RestorePackages>true</RestorePackages>\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' \">\n    <PlatformTarget>AnyCPU</PlatformTarget>\n    <DebugSymbols>true</DebugSymbols>\n    <DebugType>full</DebugType>\n    <Optimize>false</Optimize>\n    <OutputPath>bin\\Debug\\</OutputPath>\n    <DefineConstants>DEBUG;TRACE</DefineConstants>\n    <ErrorReport>prompt</ErrorReport>\n    <WarningLevel>4</WarningLevel>\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' \">\n    <PlatformTarget>AnyCPU</PlatformTarget>\n    <DebugType>pdbonly</DebugType>\n    <Optimize>true</Optimize>\n    <OutputPath>bin\\Release\\</OutputPath>\n    <DefineConstants>TRACE</DefineConstants>\n    <ErrorReport>prompt</ErrorReport>\n    <WarningLevel>4</WarningLevel>\n  </PropertyGroup>\n  <ItemGroup>\n    <Reference Include=\"StructureMap\">\n      <HintPath>..\\packages\\structuremap.2.6.4.1\\lib\\net40\\StructureMap.dll</HintPath>\n    </Reference>\n    <Reference Include=\"System\" />\n    <Reference Include=\"System.Core\" />\n    <Reference Include=\"System.Xml.Linq\" />\n    <Reference Include=\"System.Data.DataSetExtensions\" />\n    <Reference Include=\"Microsoft.CSharp\" />\n    <Reference Include=\"System.Data\" />\n    <Reference Include=\"System.Xml\" />\n  </ItemGroup>\n  <ItemGroup>\n    <Compile Include=\"Program.cs\" />\n    <Compile Include=\"Properties\\AssemblyInfo.cs\" />\n  </ItemGroup>\n  <ItemGroup>\n    <None Include=\"App.config\" />\n    <None Include=\"packages.config\" />\n  </ItemGroup>\n  <ItemGroup>\n    <ProjectReference Include=\"..\\PPPDDDChap23.EventSourcing.Application\\PPPDDDChap23.EventSourcing.Application.csproj\">\n      <Project>{8d3bffdd-a798-4ce5-b427-8a755698dc9c}</Project>\n      <Name>PPPDDDChap23.EventSourcing.Application</Name>\n    </ProjectReference>\n  </ItemGroup>\n  <Import Project=\"$(MSBuildToolsPath)\\Microsoft.CSharp.targets\" />\n  <Import Project=\"$(SolutionDir)\\.nuget\\NuGet.targets\" Condition=\"Exists('$(SolutionDir)\\.nuget\\NuGet.targets')\" />\n  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \n       Other similar extension points exist, see Microsoft.Common.targets.\n  <Target Name=\"BeforeBuild\">\n  </Target>\n  <Target Name=\"AfterBuild\">\n  </Target>\n  -->\n</Project>"
  },
  {
    "path": "22 - Event Sourcing/PPPDDDChap22/PPPDDDChap23.EventSourcing.Presentation/Program.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\nusing PPPDDDChap23.EventSourcing.Application;\nusing StructureMap;\nusing PPPDDDChap23.EventSourcing.Application.Application.BusinessUseCases;\n\nnamespace PPPDDDChap23.EventSourcing.Presentation\n{\n    public class Program\n    {\n        public static void Main(string[] args)\n        {\n            Bootstrapper.Startup();\n\n            var id = Guid.NewGuid();\n\n            var createAccount = ObjectFactory.GetInstance<CreateAccount>();\n\n            Console.WriteLine(\"Create account\");\n            Console.WriteLine();\n            createAccount.Execute(id);\n\n            Console.WriteLine(\"Record call\");\n            Console.WriteLine();\n\n            var recordPhoneCall = ObjectFactory.GetInstance<RecordPhonecall>();\n\n            recordPhoneCall.Execute(id, \"07789923557\", DateTime.Now, 8); \n\n            Console.WriteLine(\"Top up credit\");\n            Console.WriteLine();\n\n            var topUpCredit = ObjectFactory.GetInstance<TopUpCredit>();\n\n            topUpCredit.Execute(id, 20m);\n\n            Console.WriteLine(\"Hit any key to continue\");\n            Console.ReadLine();\n\n            Console.WriteLine(\"Record call\");\n            Console.WriteLine();\n            \n            recordPhoneCall.Execute(id, \"07789923557\", DateTime.Now, 100); \n\n        }\n    }\n}\n"
  },
  {
    "path": "22 - Event Sourcing/PPPDDDChap22/PPPDDDChap23.EventSourcing.Presentation/Properties/AssemblyInfo.cs",
    "content": "﻿using System.Reflection;\nusing System.Runtime.CompilerServices;\nusing System.Runtime.InteropServices;\n\n// General Information about an assembly is controlled through the following \n// set of attributes. Change these attribute values to modify the information\n// associated with an assembly.\n[assembly: AssemblyTitle(\"PPPDDDChap23.EventSourcing.Presentation\")]\n[assembly: AssemblyDescription(\"\")]\n[assembly: AssemblyConfiguration(\"\")]\n[assembly: AssemblyCompany(\"\")]\n[assembly: AssemblyProduct(\"PPPDDDChap23.EventSourcing.Presentation\")]\n[assembly: AssemblyCopyright(\"Copyright ©  2014\")]\n[assembly: AssemblyTrademark(\"\")]\n[assembly: AssemblyCulture(\"\")]\n\n// Setting ComVisible to false makes the types in this assembly not visible \n// to COM components.  If you need to access a type in this assembly from \n// COM, set the ComVisible attribute to true on that type.\n[assembly: ComVisible(false)]\n\n// The following GUID is for the ID of the typelib if this project is exposed to COM\n[assembly: Guid(\"47342863-2f77-438d-b37f-bb496201c9e4\")]\n\n// Version information for an assembly consists of the following four values:\n//\n//      Major Version\n//      Minor Version \n//      Build Number\n//      Revision\n//\n// You can specify all the values or you can default the Build and Revision Numbers \n// by using the '*' as shown below:\n// [assembly: AssemblyVersion(\"1.0.*\")]\n[assembly: AssemblyVersion(\"1.0.0.0\")]\n[assembly: AssemblyFileVersion(\"1.0.0.0\")]\n"
  },
  {
    "path": "22 - Event Sourcing/PPPDDDChap22/PPPDDDChap23.EventSourcing.Presentation/packages.config",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<packages>\n  <package id=\"structuremap\" version=\"2.6.4.1\" targetFramework=\"net45\" />\n</packages>"
  },
  {
    "path": "22 - Event Sourcing/PPPDDDChap22/PPPDDDChap23.EventSourcing.sln",
    "content": "﻿\nMicrosoft Visual Studio Solution File, Format Version 12.00\n# Visual Studio 2012\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"PPPDDDChap23.EventSourcing.Application\", \"PPPDDDChap23.EventSourcing.Application\\PPPDDDChap23.EventSourcing.Application.csproj\", \"{8D3BFFDD-A798-4CE5-B427-8A755698DC9C}\"\nEndProject\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"PPPDDDChap23.EventSourcing.Presentation\", \"PPPDDDChap23.EventSourcing.Presentation\\PPPDDDChap23.EventSourcing.Presentation.csproj\", \"{2D68287E-7C3A-4A2D-8DF8-510BD615A954}\"\nEndProject\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"PPPDDDChap23.EventSourcing.ApplicationTests\", \"PPPDDDChap23.EventSourcing.ApplicationTests\\PPPDDDChap23.EventSourcing.ApplicationTests.csproj\", \"{CC4EB0F4-877E-4767-95F7-FCFF629D9251}\"\nEndProject\nProject(\"{2150E333-8FDC-42A3-9474-1A3956D46DE8}\") = \".nuget\", \".nuget\", \"{A40CA553-C0B1-4068-865E-306AB36100ED}\"\n\tProjectSection(SolutionItems) = preProject\n\t\t.nuget\\NuGet.Config = .nuget\\NuGet.Config\n\t\t.nuget\\NuGet.exe = .nuget\\NuGet.exe\n\t\t.nuget\\NuGet.targets = .nuget\\NuGet.targets\n\tEndProjectSection\nEndProject\nGlobal\n\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\n\t\tDebug|Any CPU = Debug|Any CPU\n\t\tRelease|Any CPU = Release|Any CPU\n\tEndGlobalSection\n\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\n\t\t{8D3BFFDD-A798-4CE5-B427-8A755698DC9C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{8D3BFFDD-A798-4CE5-B427-8A755698DC9C}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{8D3BFFDD-A798-4CE5-B427-8A755698DC9C}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{8D3BFFDD-A798-4CE5-B427-8A755698DC9C}.Release|Any CPU.Build.0 = Release|Any CPU\n\t\t{2D68287E-7C3A-4A2D-8DF8-510BD615A954}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{2D68287E-7C3A-4A2D-8DF8-510BD615A954}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{2D68287E-7C3A-4A2D-8DF8-510BD615A954}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{2D68287E-7C3A-4A2D-8DF8-510BD615A954}.Release|Any CPU.Build.0 = Release|Any CPU\n\t\t{CC4EB0F4-877E-4767-95F7-FCFF629D9251}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{CC4EB0F4-877E-4767-95F7-FCFF629D9251}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{CC4EB0F4-877E-4767-95F7-FCFF629D9251}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{CC4EB0F4-877E-4767-95F7-FCFF629D9251}.Release|Any CPU.Build.0 = Release|Any CPU\n\tEndGlobalSection\n\tGlobalSection(SolutionProperties) = preSolution\n\t\tHideSolutionNode = FALSE\n\tEndGlobalSection\nEndGlobal\n"
  },
  {
    "path": "22 - Event Sourcing/PPPDDDChap23.EventSourcing/.nuget/NuGet.Config",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<configuration>\n  <solution>\n    <add key=\"disableSourceControlIntegration\" value=\"true\" />\n  </solution>\n</configuration>"
  },
  {
    "path": "22 - Event Sourcing/PPPDDDChap23.EventSourcing/.nuget/NuGet.targets",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n    <PropertyGroup>\n        <SolutionDir Condition=\"$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'\">$(MSBuildProjectDirectory)\\..\\</SolutionDir>\n\n        <!-- Enable the restore command to run before builds -->\n        <RestorePackages Condition=\"  '$(RestorePackages)' == '' \">false</RestorePackages>\n\n        <!-- Property that enables building a package from a project -->\n        <BuildPackage Condition=\" '$(BuildPackage)' == '' \">false</BuildPackage>\n\n        <!-- Determines if package restore consent is required to restore packages -->\n        <RequireRestoreConsent Condition=\" '$(RequireRestoreConsent)' != 'false' \">true</RequireRestoreConsent>\n\n        <!-- Download NuGet.exe if it does not already exist -->\n        <DownloadNuGetExe Condition=\" '$(DownloadNuGetExe)' == '' \">false</DownloadNuGetExe>\n    </PropertyGroup>\n\n    <ItemGroup Condition=\" '$(PackageSources)' == '' \">\n        <!-- Package sources used to restore packages. By default, registered sources under %APPDATA%\\NuGet\\NuGet.Config will be used -->\n        <!-- The official NuGet package source (https://www.nuget.org/api/v2/) will be excluded if package sources are specified and it does not appear in the list -->\n        <!--\n            <PackageSource Include=\"https://www.nuget.org/api/v2/\" />\n            <PackageSource Include=\"https://my-nuget-source/nuget/\" />\n        -->\n    </ItemGroup>\n\n    <PropertyGroup Condition=\" '$(OS)' == 'Windows_NT'\">\n        <!-- Windows specific commands -->\n        <NuGetToolsPath>$([System.IO.Path]::Combine($(SolutionDir), \".nuget\"))</NuGetToolsPath>\n    </PropertyGroup>\n\n    <PropertyGroup Condition=\" '$(OS)' != 'Windows_NT'\">\n        <!-- We need to launch nuget.exe with the mono command if we're not on windows -->\n        <NuGetToolsPath>$(SolutionDir).nuget</NuGetToolsPath>\n    </PropertyGroup>\n\n    <PropertyGroup>\n        <PackagesProjectConfig>packages.$(MSBuildProjectName.Replace(' ', '_')).config</PackagesProjectConfig>\n    </PropertyGroup>\n\n    <Choose>\n        <When Condition=\"Exists('$(PackagesProjectConfig)')\">\n            <PropertyGroup>\n                <PackagesConfig>$(PackagesProjectConfig)</PackagesConfig>\n            </PropertyGroup>\n        </When>\n        <When Condition=\"Exists('packages.config')\">\n            <PropertyGroup>\n                <PackagesConfig>packages.config</PackagesConfig>\n            </PropertyGroup>\n        </When>\n    </Choose>\n    \n    <PropertyGroup>\n        <!-- NuGet command -->\n        <NuGetExePath Condition=\" '$(NuGetExePath)' == '' \">$(NuGetToolsPath)\\NuGet.exe</NuGetExePath>\n        <PackageSources Condition=\" $(PackageSources) == '' \">@(PackageSource)</PackageSources>\n\n        <NuGetCommand Condition=\" '$(OS)' == 'Windows_NT'\">\"$(NuGetExePath)\"</NuGetCommand>\n        <NuGetCommand Condition=\" '$(OS)' != 'Windows_NT' \">mono --runtime=v4.0.30319 $(NuGetExePath)</NuGetCommand>\n\n        <PackageOutputDir Condition=\"$(PackageOutputDir) == ''\">$(TargetDir.Trim('\\\\'))</PackageOutputDir>\n\n        <RequireConsentSwitch Condition=\" $(RequireRestoreConsent) == 'true' \">-RequireConsent</RequireConsentSwitch>\n        <NonInteractiveSwitch Condition=\" '$(VisualStudioVersion)' != '' AND '$(OS)' == 'Windows_NT' \">-NonInteractive</NonInteractiveSwitch>\n\n        <PaddedSolutionDir Condition=\" '$(OS)' == 'Windows_NT'\">\"$(SolutionDir) \"</PaddedSolutionDir>\n        <PaddedSolutionDir Condition=\" '$(OS)' != 'Windows_NT' \">\"$(SolutionDir)\"</PaddedSolutionDir>\n\n        <!-- Commands -->\n        <RestoreCommand>$(NuGetCommand) install \"$(PackagesConfig)\" -source \"$(PackageSources)\"  $(NonInteractiveSwitch) $(RequireConsentSwitch) -solutionDir $(PaddedSolutionDir)</RestoreCommand>\n        <BuildCommand>$(NuGetCommand) pack \"$(ProjectPath)\" -Properties \"Configuration=$(Configuration);Platform=$(Platform)\" $(NonInteractiveSwitch) -OutputDirectory \"$(PackageOutputDir)\" -symbols</BuildCommand>\n\n        <!-- We need to ensure packages are restored prior to assembly resolve -->\n        <BuildDependsOn Condition=\"$(RestorePackages) == 'true'\">\n            RestorePackages;\n            $(BuildDependsOn);\n        </BuildDependsOn>\n\n        <!-- Make the build depend on restore packages -->\n        <BuildDependsOn Condition=\"$(BuildPackage) == 'true'\">\n            $(BuildDependsOn);\n            BuildPackage;\n        </BuildDependsOn>\n    </PropertyGroup>\n\n    <Target Name=\"CheckPrerequisites\">\n        <!-- Raise an error if we're unable to locate nuget.exe  -->\n        <Error Condition=\"'$(DownloadNuGetExe)' != 'true' AND !Exists('$(NuGetExePath)')\" Text=\"Unable to locate '$(NuGetExePath)'\" />\n        <!--\n        Take advantage of MsBuild's build dependency tracking to make sure that we only ever download nuget.exe once.\n        This effectively acts as a lock that makes sure that the download operation will only happen once and all\n        parallel builds will have to wait for it to complete.\n        -->\n        <MsBuild Targets=\"_DownloadNuGet\" Projects=\"$(MSBuildThisFileFullPath)\" Properties=\"Configuration=NOT_IMPORTANT;DownloadNuGetExe=$(DownloadNuGetExe)\" />\n    </Target>\n\n    <Target Name=\"_DownloadNuGet\">\n        <DownloadNuGet OutputFilename=\"$(NuGetExePath)\" Condition=\" '$(DownloadNuGetExe)' == 'true' AND !Exists('$(NuGetExePath)')\" />\n    </Target>\n\n    <Target Name=\"RestorePackages\" DependsOnTargets=\"CheckPrerequisites\">        \n        <Exec Command=\"$(RestoreCommand)\"\n              Condition=\"'$(OS)' != 'Windows_NT' And Exists('$(PackagesConfig)')\" />\n\n        <Exec Command=\"$(RestoreCommand)\"\n              LogStandardErrorAsError=\"true\"\n              Condition=\"'$(OS)' == 'Windows_NT' And Exists('$(PackagesConfig)')\" />\n    </Target>\n\n    <Target Name=\"BuildPackage\" DependsOnTargets=\"CheckPrerequisites\">\n        <Exec Command=\"$(BuildCommand)\"\n              Condition=\" '$(OS)' != 'Windows_NT' \" />\n\n        <Exec Command=\"$(BuildCommand)\"\n              LogStandardErrorAsError=\"true\"\n              Condition=\" '$(OS)' == 'Windows_NT' \" />\n    </Target>\n\n    <UsingTask TaskName=\"DownloadNuGet\" TaskFactory=\"CodeTaskFactory\" AssemblyFile=\"$(MSBuildToolsPath)\\Microsoft.Build.Tasks.v4.0.dll\">\n        <ParameterGroup>\n            <OutputFilename ParameterType=\"System.String\" Required=\"true\" />\n        </ParameterGroup>\n        <Task>\n            <Reference Include=\"System.Core\" />\n            <Using Namespace=\"System\" />\n            <Using Namespace=\"System.IO\" />\n            <Using Namespace=\"System.Net\" />\n            <Using Namespace=\"Microsoft.Build.Framework\" />\n            <Using Namespace=\"Microsoft.Build.Utilities\" />\n            <Code Type=\"Fragment\" Language=\"cs\">\n                <![CDATA[\n                try {\n                    OutputFilename = Path.GetFullPath(OutputFilename);\n\n                    Log.LogMessage(\"Downloading latest version of NuGet.exe...\");\n                    WebClient webClient = new WebClient();\n                    webClient.DownloadFile(\"https://www.nuget.org/nuget.exe\", OutputFilename);\n\n                    return true;\n                }\n                catch (Exception ex) {\n                    Log.LogErrorFromException(ex);\n                    return false;\n                }\n            ]]>\n            </Code>\n        </Task>\n    </UsingTask>\n</Project>\n"
  },
  {
    "path": "22 - Event Sourcing/PPPDDDChap23.EventSourcing/PPPDDDChap23.EventSourcing.Application/Application/BusinessUseCases/CreateAccount.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\nusing PPPDDDChap23.EventSourcing.Application.Model.PayAsYouGo;\nusing Raven.Client;\nusing Raven.Abstractions.Exceptions;\nusing PPPDDDChap23.EventSourcing.Application.Infrastructure;\n\nnamespace PPPDDDChap23.EventSourcing.Application.Application.BusinessUseCases\n{\n    public class CreateAccount\n    {\n        private IPayAsYouGoAccountRepository _payAsYouGoAccountRepository;\n        private IDocumentSession _unitOfWork;\n\n        public CreateAccount(IPayAsYouGoAccountRepository payAsYouGoAccountRepository,\n                           IDocumentSession unitOfWork)\n        {\n            _payAsYouGoAccountRepository = payAsYouGoAccountRepository;\n            _unitOfWork = unitOfWork;\n        }\n\n        public void Execute(Guid id)\n        {\n            var payAsYouGoAccount = new PayAsYouGoAccount(id, new Money(10m));\n\n            _payAsYouGoAccountRepository.Add(payAsYouGoAccount);\n\n            _unitOfWork.SaveChanges();            \n        }\n    }\n}\n"
  },
  {
    "path": "22 - Event Sourcing/PPPDDDChap23.EventSourcing/PPPDDDChap23.EventSourcing.Application/Application/BusinessUseCases/RecordPhonecall.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\nusing PPPDDDChap23.EventSourcing.Application.Model.PayAsYouGo;\nusing Raven.Client;\nusing Raven.Abstractions.Exceptions;\nusing PPPDDDChap23.EventSourcing.Application.Infrastructure;\n\nnamespace PPPDDDChap23.EventSourcing.Application.Application.BusinessUseCases\n{\n    public class RecordPhonecall\n    {\n        private IPayAsYouGoAccountRepository _payAsYouGoAccountRepository;\n        private IDocumentSession _unitOfWork;\n        private IClock _clock;\n\n        public RecordPhonecall(IPayAsYouGoAccountRepository payAsYouGoAccountRepository,\n                           IDocumentSession unitOfWork, IClock clock)\n        {\n            _payAsYouGoAccountRepository = payAsYouGoAccountRepository;\n            _unitOfWork = unitOfWork;\n            _clock = clock;\n        }\n\n        public void Execute(Guid id, string phoneNumber, DateTime callStart, int callLengthInMinutes)\n        {\n            try{\n                var payAsYouGoAccount = _payAsYouGoAccountRepository.FindBy(id);\n\n                var numberDialled = new PhoneNumber(phoneNumber);\n                var phoneCall = new PhoneCall(numberDialled, callStart, new Minutes(callLengthInMinutes));\n\n                payAsYouGoAccount.Record(phoneCall, new PhoneCallCosting(), _clock);\n\n                _payAsYouGoAccountRepository.Save(payAsYouGoAccount);\n\n                _unitOfWork.SaveChanges();\n            }\n            catch (ConcurrencyException ex)\n            {\n                _unitOfWork.Advanced.Clear();\n\n                // TODO: Add logic to retry X times then move to an error queue\n                // Execute(id, phoneNumber, callStart, callLengthInMinutes);\n\n                throw ex;\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "22 - Event Sourcing/PPPDDDChap23.EventSourcing/PPPDDDChap23.EventSourcing.Application/Application/BusinessUseCases/TopUpCredit.cs",
    "content": "﻿using System;\nusing PPPDDDChap23.EventSourcing.Application.Model.PayAsYouGo;\nusing Raven.Client;\nusing Raven.Abstractions.Exceptions;\nusing PPPDDDChap23.EventSourcing.Application.Infrastructure;\n\nnamespace PPPDDDChap23.EventSourcing.Application.Application.BusinessUseCases\n{\n    public class TopUpCredit\n    {\n        private IPayAsYouGoAccountRepository _payAsYouGoAccountRepository;\n        private IDocumentSession _unitOfWork;\n        private IClock _clock;\n\n        public TopUpCredit(IPayAsYouGoAccountRepository payAsYouGoAccountRepository,\n                           IDocumentSession unitOfWork,\n                           IClock clock)\n        {\n            _payAsYouGoAccountRepository = payAsYouGoAccountRepository;\n            _unitOfWork = unitOfWork;\n            _clock = clock;\n        }\n\n        public void Execute(Guid id, decimal amount)\n        {\n            try\n            {\n                var account = _payAsYouGoAccountRepository.FindBy(id);\n\n                var credit = new Money(amount);\n\n                account.TopUp(credit, _clock); \n\n                _payAsYouGoAccountRepository.Save(account);\n                                               \n                _unitOfWork.SaveChanges();         \n            }\n            catch (ConcurrencyException ex)\n            {\n                _unitOfWork.Advanced.Clear();\n\n                // TODO: Add logic to retry X times then move to an error queue\n                // Execute(id, amount);\n\n                throw ex;\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "22 - Event Sourcing/PPPDDDChap23.EventSourcing/PPPDDDChap23.EventSourcing.Application/Bootstrapper.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\nusing Raven.Client;\nusing Raven.Client.Document;\nusing Raven.Client.Extensions;\nusing Raven.Client.Indexes;\nusing StructureMap;\nusing PPPDDDChap23.EventSourcing.Application.Infrastructure;\nusing PPPDDDChap23.EventSourcing.Application.Model.PayAsYouGo;\n\nnamespace PPPDDDChap23.EventSourcing.Application\n{\n    public static class Bootstrapper\n    {\n        public static void Startup()\n        {           \n            var documentStore = new DocumentStore\n            {\n                ConnectionStringName = \"RavenDB\"\n            }.Initialize();\n\n            documentStore.DatabaseCommands.EnsureDatabaseExists(\"EventSourcingExample\");\n\n            ObjectFactory.Initialize(config =>\n            {\n                config.For<IPayAsYouGoAccountRepository>().Use<PayAsYouGoAccountRepository>();\n                config.For<IClock>().Use<SystemClock>();\n               \n                config.For<IDocumentStore>().Use(documentStore);\n                config.For<IDocumentSession>()\n                    .HybridHttpOrThreadLocalScoped()\n                    .Use(x =>\n                    {\n                        var store = x.GetInstance<IDocumentStore>();\n                        var session = store.OpenSession();\n                        session.Advanced.UseOptimisticConcurrency = true;\n                        return session;\n                    });                \n            });\n        }\n    }\n}\n"
  },
  {
    "path": "22 - Event Sourcing/PPPDDDChap23.EventSourcing/PPPDDDChap23.EventSourcing.Application/Infrastructure/DomainEvent.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace PPPDDDChap23.EventSourcing.Application.Infrastructure\n{\n    public abstract class DomainEvent\n    {\n        public DomainEvent(Guid aggregateId)\n        {\n            Id = aggregateId;\n        }\n\n        public Guid Id { get; private set; }\n    }\n}\n"
  },
  {
    "path": "22 - Event Sourcing/PPPDDDChap23.EventSourcing/PPPDDDChap23.EventSourcing.Application/Infrastructure/Entity.cs",
    "content": "﻿using System;\n\nnamespace PPPDDDChap23.EventSourcing.Application.Infrastructure\n{\n    public abstract class Entity\n    {\n        public Guid Id { get; protected set; }\n    }\n}"
  },
  {
    "path": "22 - Event Sourcing/PPPDDDChap23.EventSourcing/PPPDDDChap23.EventSourcing.Application/Infrastructure/EventSourcedAggregate.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace PPPDDDChap23.EventSourcing.Application.Infrastructure\n{\n    public abstract class EventSourcedAggregate : Entity\n    {\n        public List<DomainEvent> Changes { get; private set; }\n        public int Version { get; protected set; }\n\n        public EventSourcedAggregate()\n        {\n            Changes = new List<DomainEvent>();\n        }\n\n        public abstract void Apply(DomainEvent changes);\n    }\n}\n"
  },
  {
    "path": "22 - Event Sourcing/PPPDDDChap23.EventSourcing/PPPDDDChap23.EventSourcing.Application/Infrastructure/EventStore.cs",
    "content": "﻿using System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Text;\r\nusing System.Threading.Tasks;\r\nusing Raven.Client;\r\n\r\nnamespace PPPDDDChap23.EventSourcing.Application.Infrastructure\r\n{\r\n    public class EventStore : IEventStore\r\n    {\r\n        private readonly IDocumentSession _documentSession;\r\n\r\n        public EventStore(IDocumentSession documentSession)\r\n        { \r\n            _documentSession = documentSession;\r\n        }\r\n\r\n        public void CreateNewStream(string streamName, IEnumerable<DomainEvent> domainEvents)\r\n        {\r\n            var eventStream = new EventStream(streamName);\r\n            _documentSession.Store(eventStream);\r\n\r\n            AppendEventsToStream(streamName, domainEvents);\r\n        }\r\n\r\n        public void AppendEventsToStream(string streamName, IEnumerable<DomainEvent> domainEvents, int? expectedVersion = null)\r\n        {\r\n            var stream = _documentSession.Load<EventStream>(streamName);\r\n\r\n            if (expectedVersion != null)\r\n            {\r\n                CheckForConcurrencyError(expectedVersion, stream);\r\n            }\r\n\r\n            foreach (var @event in domainEvents)\r\n            {\r\n                _documentSession.Store(stream.RegisterEvent(@event));\r\n            }\r\n        }\r\n\r\n        private static void CheckForConcurrencyError(int? expectedVersion, EventStream stream)\r\n        {\r\n            var lastUpdatedVersion = stream.Version;\r\n            if (lastUpdatedVersion != expectedVersion)\r\n            {\r\n                var error = string.Format(\"Expected: {0}. Found: {1}\", expectedVersion, lastUpdatedVersion);\r\n                throw new OptimsticConcurrencyException(error);\r\n            }\r\n        }\r\n\r\n        public IEnumerable<DomainEvent> GetStream(string streamName, int fromVersion, int toVersion)\r\n        {\r\n            // Get events from a specific version\r\n            var eventWrappers = (from stream in _documentSession.Query<EventWrapper>()\r\n                                  .Customize(x => x.WaitForNonStaleResultsAsOfNow())\r\n                                  where stream.EventStreamId.Equals(streamName)\r\n                                  && stream.EventNumber <= toVersion\r\n                                  && stream.EventNumber >= fromVersion\r\n                                  orderby stream.EventNumber\r\n                                  select stream).ToList();\r\n\r\n            if (eventWrappers.Count() == 0) return null;\r\n                      \r\n            var events = new List<DomainEvent>();\r\n\r\n            foreach (var @event in eventWrappers)\r\n            {\r\n                events.Add(@event.Event);\r\n            }\r\n\r\n            return events;\r\n        }\r\n\r\n        public void AddSnapshot<T>(string streamName, T snapshot)\r\n        {\r\n            var wrapper = new SnapshotWrapper\r\n            {\r\n                StreamName = streamName,\r\n                Snapshot = snapshot,\r\n                Created = DateTime.Now\r\n            };\r\n            \r\n            _documentSession.Store(snapshot);\r\n        }\r\n\r\n        public T GetLatestSnapshot<T>(string streamName) where T: class\r\n        {\r\n            var latestSnapshot = _documentSession.Query<SnapshotWrapper>()\r\n                            .Customize(x => x.WaitForNonStaleResultsAsOfNow())\r\n                            .Where(x => x.StreamName == streamName)\r\n                            .OrderByDescending(x => x.Created)\r\n                            .FirstOrDefault();\r\n\r\n            if (latestSnapshot == null)\r\n            {\r\n                return null;\r\n            }\r\n            else\r\n            {\r\n                return (T)latestSnapshot.Snapshot;\r\n            }\r\n        }\r\n    }\r\n\r\n    public interface IEventStore\r\n    {\r\n        void CreateNewStream(string streamName, IEnumerable<DomainEvent> domainEvents);\r\n\r\n        void AppendEventsToStream(string streamName, IEnumerable<DomainEvent> domainEvents, int? expectedVersion);\r\n\r\n        IEnumerable<DomainEvent> GetStream(string streamName, int fromVersion, int toVersion);\r\n\r\n        void AddSnapshot<T>(string streamName, T snapshot);\r\n\r\n        T GetLatestSnapshot<T>(string streamName) where T: class;\r\n    }\r\n\r\n    // used for persistence\r\n    public class SnapshotWrapper\r\n    {\r\n        public string StreamName { get; set; }\r\n\r\n        public Object Snapshot { get; set; }\r\n\r\n        public DateTime Created { get; set; }\r\n    }\r\n\r\n    public class OptimsticConcurrencyException : Exception\r\n    {\r\n        public OptimsticConcurrencyException(string message) : base(message) { }\r\n    }\r\n}\r\n"
  },
  {
    "path": "22 - Event Sourcing/PPPDDDChap23.EventSourcing/PPPDDDChap23.EventSourcing.Application/Infrastructure/EventStream.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace PPPDDDChap23.EventSourcing.Application.Infrastructure\n{\n    public class EventStream\n    {\n        public string Id { get; private set; } //aggregate type + id\n        public int Version {get; private set;}\n\n        private EventStream() { }\n\n        public EventStream(string id)\n        {\n            Id = id;\n            Version = 0;\n        }\n\n        public EventWrapper RegisterEvent(DomainEvent @event)\n        {\n            Version ++;\n\n            return new EventWrapper(@event, Version, Id);\n        }\n    }\n}\n"
  },
  {
    "path": "22 - Event Sourcing/PPPDDDChap23.EventSourcing/PPPDDDChap23.EventSourcing.Application/Infrastructure/EventWrapper.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace PPPDDDChap23.EventSourcing.Application.Infrastructure\n{\n    public class EventWrapper\n    {\n        public string Id { get; private set; }\n        public DomainEvent Event { get; private set; }\n        public string EventStreamId { get; private set; }\n        public int EventNumber { get; private set; }\n\n        public EventWrapper(DomainEvent @event, int eventNumber, string streamStateId)\n        {\n            Event = @event;     \n            EventNumber = eventNumber;\n            EventStreamId = streamStateId;\n            Id = string.Format(\"{0}-{1}\", streamStateId, EventNumber);\n        }\n    }\n}\n"
  },
  {
    "path": "22 - Event Sourcing/PPPDDDChap23.EventSourcing/PPPDDDChap23.EventSourcing.Application/Infrastructure/IClock.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace PPPDDDChap23.EventSourcing.Application.Infrastructure\n{\n    public interface IClock\n    {\n        DateTime Time();\n    }\n}\n"
  },
  {
    "path": "22 - Event Sourcing/PPPDDDChap23.EventSourcing/PPPDDDChap23.EventSourcing.Application/Infrastructure/PasAsYouGoSnapshotJob.cs",
    "content": "﻿using PPPDDDChap23.EventSourcing.Application.Model.PayAsYouGo;\r\nusing Raven.Client;\r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Text;\r\nusing System.Threading;\r\nusing System.Threading.Tasks;\r\n\r\nnamespace PPPDDDChap23.EventSourcing.Application.Infrastructure\r\n{\r\n    public class PasAsYouGoAccountSnapshotJob\r\n    {\r\n        private IDocumentStore documentStore;\r\n\r\n        public PasAsYouGoAccountSnapshotJob(IDocumentStore documentStore)\r\n        {\r\n            this.documentStore = documentStore;\r\n        }\r\n\r\n        public void Run()\r\n        {\r\n            while(true)\r\n            {\r\n                foreach (var id in GetIds())\r\n                {\r\n                    using (var session = documentStore.OpenSession())\r\n                    {\r\n                        var repository = new PayAsYouGoAccountRepository(new EventStore(session));\r\n                        var account = repository.FindBy(Guid.Parse(id));\r\n                        var snapshot = account.GetPayAsYouGoAccountSnapshot();\r\n                        repository.SaveSnapshot(snapshot, account);\r\n                    }\r\n                }\r\n\r\n                // Create a new snapshot for each Aggregate every 12 hours\r\n                Thread.Sleep(TimeSpan.FromHours(12));\r\n            }\r\n        }\r\n\r\n        private IEnumerable<string> GetIds()\r\n        {\r\n            using (var session = documentStore.OpenSession())\r\n            {\r\n                return session.Query<EventStream>()\r\n                              .Select(x => x.Id)\r\n                              .ToList();\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "22 - Event Sourcing/PPPDDDChap23.EventSourcing/PPPDDDChap23.EventSourcing.Application/Infrastructure/PayAsYouGoAccountRepository.cs",
    "content": "﻿using System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Text;\r\nusing System.Threading.Tasks;\r\nusing Raven.Client;\r\nusing PPPDDDChap23.EventSourcing.Application.Model.PayAsYouGo;\r\n\r\nnamespace PPPDDDChap23.EventSourcing.Application.Infrastructure\r\n{\r\n    public class PayAsYouGoAccountRepository : IPayAsYouGoAccountRepository\r\n    {\r\n        private readonly IEventStore _eventStore;\r\n\r\n        public PayAsYouGoAccountRepository(IEventStore eventStore)\r\n        {\r\n            _eventStore = eventStore;\r\n        }\r\n\r\n        public PayAsYouGoAccount FindBy(Guid id)\r\n        {\r\n            var streamName = StreamNameFor(id);\r\n            \r\n            var fromEventNumber = 0;\r\n            var toEventNumber = int.MaxValue ;\r\n\r\n            var snapshot = _eventStore.GetLatestSnapshot<PayAsYouGoAccountSnapshot>(streamName);\r\n            if (snapshot != null)\r\n            {\r\n                fromEventNumber = snapshot.Version + 1; // load only events after snapshot\r\n            }\r\n            \r\n            var stream = _eventStore.GetStream(streamName, fromEventNumber, toEventNumber);\r\n\r\n            PayAsYouGoAccount payAsYouGoAccount = null;\r\n            if (snapshot != null)\r\n            {\r\n                payAsYouGoAccount = new PayAsYouGoAccount(snapshot);\r\n            }\r\n            else\r\n            {\r\n                payAsYouGoAccount = new PayAsYouGoAccount();\r\n            }\r\n\r\n\r\n            foreach(var @event in stream)\r\n            {\r\n                payAsYouGoAccount.Apply(@event);\r\n            }\r\n\r\n            return payAsYouGoAccount;            \r\n        }\r\n               \r\n\r\n        public void Add(PayAsYouGoAccount payAsYouGoAccount)\r\n        {\r\n            var streamName = StreamNameFor(payAsYouGoAccount.Id);\r\n\r\n            _eventStore.CreateNewStream(streamName, payAsYouGoAccount.Changes);\r\n        }\r\n\r\n        public void Save(PayAsYouGoAccount payAsYouGoAccount)\r\n        {\r\n            var streamName = StreamNameFor(payAsYouGoAccount.Id);\r\n\r\n            var expectedVersion = GetExpectedVersion(payAsYouGoAccount.InitialVersion);\r\n            _eventStore.AppendEventsToStream(streamName, payAsYouGoAccount.Changes, expectedVersion);                      \r\n        }\r\n\r\n        private int? GetExpectedVersion(int expectedVersion)\r\n        {\r\n            if (expectedVersion == 0)\r\n            {\r\n                // first time the aggregate is stored there is no expected version\r\n                return null;\r\n            }\r\n            else \r\n            {\r\n                return expectedVersion;\r\n            }\r\n        }\r\n\r\n        public void SaveSnapshot(PayAsYouGoAccountSnapshot snapshot, PayAsYouGoAccount payAsYouGoAccount)\r\n        {\r\n            var streamName = StreamNameFor(payAsYouGoAccount.Id);\r\n\r\n            _eventStore.AddSnapshot<PayAsYouGoAccountSnapshot>(streamName, snapshot);\r\n        }\r\n\r\n        private string StreamNameFor(Guid id)\r\n        {\r\n            // Stream per-aggregate: {AggregateType}-{AggregateId}\r\n            return string.Format(\"{0}-{1}\", typeof(PayAsYouGoAccount).Name, id);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "22 - Event Sourcing/PPPDDDChap23.EventSourcing/PPPDDDChap23.EventSourcing.Application/Infrastructure/SystemClock.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace PPPDDDChap23.EventSourcing.Application.Infrastructure\n{\n    public class SystemClock : IClock\n    {\n        public DateTime Time()\n        {\n            return DateTime.Now;\n        }\n    }\n}\n"
  },
  {
    "path": "22 - Event Sourcing/PPPDDDChap23.EventSourcing/PPPDDDChap23.EventSourcing.Application/Infrastructure/ValueObject.cs",
    "content": "﻿using System.Collections.Generic;\nusing System.Linq;\n\nnamespace PPPDDDChap23.EventSourcing.Application.Infrastructure\n{\n    public abstract class ValueObject<T> where T : ValueObject<T>\n    {\n        protected abstract IEnumerable<object> GetAttributesToIncludeInEqualityCheck();\n\n        public override bool Equals(object other)\n        {\n            return Equals(other as T);\n        }\n\n        public bool Equals(T other)\n        {\n            if (other == null)\n            {\n                return false;\n            }\n            return GetAttributesToIncludeInEqualityCheck().SequenceEqual(other.GetAttributesToIncludeInEqualityCheck());\n        }\n\n        public static bool operator ==(ValueObject<T> left, ValueObject<T> right)\n        {\n            return Equals(left, right);\n        }\n\n        public static bool operator !=(ValueObject<T> left, ValueObject<T> right)\n        {\n            return !(left == right);\n        }\n\n        public override int GetHashCode()\n        {\n            int hash = 17;\n            foreach (var obj in this.GetAttributesToIncludeInEqualityCheck())\n                hash = hash * 31 + (obj == null ? 0 : obj.GetHashCode());\n\n            return hash;\n        }\n    }\n}\n"
  },
  {
    "path": "22 - Event Sourcing/PPPDDDChap23.EventSourcing/PPPDDDChap23.EventSourcing.Application/Model/PayAsYouGo/AccountCreated.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\nusing PPPDDDChap23.EventSourcing.Application.Infrastructure;\n\nnamespace PPPDDDChap23.EventSourcing.Application.Model.PayAsYouGo\n{\n    public class AccountCreated  : DomainEvent\n    {\n        public AccountCreated(Guid aggregateId, Money credit)\n            : base(aggregateId)\n        {\n            Credit = credit;\n        }\n\n        public Money Credit { get; private set; }        \n    }\n}\n"
  },
  {
    "path": "22 - Event Sourcing/PPPDDDChap23.EventSourcing/PPPDDDChap23.EventSourcing.Application/Model/PayAsYouGo/CreditAdded.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\nusing PPPDDDChap23.EventSourcing.Application.Infrastructure;\n\nnamespace PPPDDDChap23.EventSourcing.Application.Model.PayAsYouGo\n{\n    public class CreditAdded : DomainEvent\n    {\n        public CreditAdded(Guid aggregateId, Money credit)\n            : base(aggregateId)\n        {\n            Credit = credit;\n        }\n\n        public Money Credit { get; private set; }\n    }\n}\n"
  },
  {
    "path": "22 - Event Sourcing/PPPDDDChap23.EventSourcing/PPPDDDChap23.EventSourcing.Application/Model/PayAsYouGo/CreditSatisfiesFreeCallAllowanceOffer.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\nusing PPPDDDChap23.EventSourcing.Application.Infrastructure;\n\nnamespace PPPDDDChap23.EventSourcing.Application.Model.PayAsYouGo\n{\n    public class CreditSatisfiesFreeCallAllowanceOffer : DomainEvent\n    {\n        public CreditSatisfiesFreeCallAllowanceOffer(Guid aggregateId, DateTime offerSatisfied, Minutes freeMinutes)\n            : base(aggregateId) \n        {\n            OfferSatisfied = offerSatisfied;\n            FreeMinutes = freeMinutes;\n        }\n\n        public DateTime OfferSatisfied { get; private set; }\n        public Minutes FreeMinutes { get; private set; }\n    }\n}\n"
  },
  {
    "path": "22 - Event Sourcing/PPPDDDChap23.EventSourcing/PPPDDDChap23.EventSourcing.Application/Model/PayAsYouGo/FreeCallAllowance.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\nusing PPPDDDChap23.EventSourcing.Application.Infrastructure;\n\nnamespace PPPDDDChap23.EventSourcing.Application.Model.PayAsYouGo\n{\n    public class FreeCallAllowance\n    {\n        // Your allowances will expire after 30 days.  \n        // Calls to standard UK mobiles and landlines (01, 02, 03) within the UK.\n\n        public Minutes Allowance { get; private set; }\n        public DateTime DateStarted { get; private set; }\n\n        public FreeCallAllowance(Minutes allowance, DateTime dateStarted)\n        {\n            Allowance = allowance;\n            DateStarted = dateStarted;\n        }\n\n        public void Subtract(Minutes minutes)\n        {\n            Allowance = Allowance.Subtract(minutes);\n        }\n        \n        public Minutes MinutesWhichCanCover(PhoneCall phoneCall, IClock clock)\n        {\n            if (Allowance.IsGreaterOrEqualTo(phoneCall.Minutes))\n            {\n                return phoneCall.Minutes;\n            }\n            else\n            {\n                return Allowance;\n            }\n        }\n\n        private bool StillValid(IClock clock)\n        {\n            return DateStarted.AddDays(30) > clock.Time();\n        }\n    }\n}\n"
  },
  {
    "path": "22 - Event Sourcing/PPPDDDChap23.EventSourcing/PPPDDDChap23.EventSourcing.Application/Model/PayAsYouGo/IPayAsYouGoAccountRepository.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace PPPDDDChap23.EventSourcing.Application.Model.PayAsYouGo\n{\n    public interface IPayAsYouGoAccountRepository\n    {\n        PayAsYouGoAccount FindBy(Guid id);\n\n        void Add(PayAsYouGoAccount payAsYouGoAccount);\n\n        void Save(PayAsYouGoAccount payAsYouGoAccount); \n    }\n}\n"
  },
  {
    "path": "22 - Event Sourcing/PPPDDDChap23.EventSourcing/PPPDDDChap23.EventSourcing.Application/Model/PayAsYouGo/Minutes.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace PPPDDDChap23.EventSourcing.Application.Model.PayAsYouGo\n{\n    public class Minutes\n    {\n        public int Number { get; private set; }\n\n        public Minutes() : this(0) { }\n\n        public Minutes(int number)\n        {\n            // Can't be nagative\n            Number = number;\n        }\n\n        public Minutes Subtract(Minutes minutes)\n        {            \n            return new Minutes(Number - minutes.Number);\n        }\n\n        public Money CostAt(Money chargePerMinute)\n        {\n            return chargePerMinute.MultiplyBy(Number);\n        }\n\n        public bool IsGreaterOrEqualTo(Minutes minutes)\n        {\n            return this.Number >= minutes.Number;\n        }\n    }\n}\n"
  },
  {
    "path": "22 - Event Sourcing/PPPDDDChap23.EventSourcing/PPPDDDChap23.EventSourcing.Application/Model/PayAsYouGo/Money.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\nusing PPPDDDChap23.EventSourcing.Application.Infrastructure;\n\nnamespace PPPDDDChap23.EventSourcing.Application.Model.PayAsYouGo\n{\n    public class Money : ValueObject<Money>, IComparable<Money>\n    {\n        public decimal Amount { get; set; }\n\n        public Money()\n            : this(0m)\n        {\n        }\n\n        public Money(decimal amount)\n        {\n            ThrowExceptionIfNotValid(amount);\n\n            Amount = amount;\n        }\n\n        private void ThrowExceptionIfNotValid(decimal amount)\n        {\n            if (amount % 0.01m != 0)\n                throw new ArgumentException(\"Amount can be 2 decmial places only.\"); \n\n            if (amount < 0)\n                throw new ArgumentException(\"Money cannot be a negative amount\");\n        }\n\n        public Money Add(Money money)\n        {\n            return new Money(this.Amount + money.Amount);\n        }\n\n        public bool IsGreaterThanOrEqualTo(Money money)\n        {\n            return this.Amount >= money.Amount;\n        }\n\n        public Money Subtract(Money money)\n        {\n            return new Money(this.Amount - money.Amount);\n        }\n\n        public Money MultiplyBy(int number)\n        {\n            return new Money(this.Amount * number);\n        }\n\n        protected override IEnumerable<object> GetAttributesToIncludeInEqualityCheck()\n        {\n            return new List<Object>() { Amount };\n        }\n\n        public int CompareTo(Money other)\n        {\n            return this.Amount.CompareTo(other.Amount);\n        }\n    }\n}\n"
  },
  {
    "path": "22 - Event Sourcing/PPPDDDChap23.EventSourcing/PPPDDDChap23.EventSourcing.Application/Model/PayAsYouGo/PayAsYouGoAccount.cs",
    "content": "﻿using System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Text;\r\nusing System.Threading.Tasks;\r\nusing PPPDDDChap23.EventSourcing.Application.Infrastructure;\r\n\r\nnamespace PPPDDDChap23.EventSourcing.Application.Model.PayAsYouGo\r\n{\r\n    public class PayAsYouGoAccount : EventSourcedAggregate\r\n    {\r\n        private FreeCallAllowance _freeCallAllowance;\r\n        private Money _credit;\r\n        private PayAsYouGoInclusiveMinutesOffer _inclusiveMinutesOffer = new PayAsYouGoInclusiveMinutesOffer(new Money(100000), new Minutes(0));\r\n\r\n        public int InitialVersion { get; private set; }\r\n\r\n        public PayAsYouGoAccount()\r\n        { }\r\n\r\n        public PayAsYouGoAccount(Guid id, Money credit)\r\n        {\r\n            Causes(new AccountCreated(id, credit));          \r\n        }\r\n\r\n        public PayAsYouGoAccount(PayAsYouGoAccountSnapshot snapshot)\r\n        {\r\n            Version = snapshot.Version;\r\n            InitialVersion = snapshot.Version;\r\n            _credit = new Money(snapshot.Credit);\r\n        }\r\n\r\n        public override void Apply(DomainEvent @event)\r\n        {            \r\n            When((dynamic)@event);  \r\n            Version = Version ++;\r\n        }\r\n\r\n        public PayAsYouGoAccountSnapshot GetPayAsYouGoAccountSnapshot()\r\n        {\r\n            return new PayAsYouGoAccountSnapshot\r\n            {\r\n                Version = Version,\r\n                Credit = _credit.Amount\r\n            };\r\n        }\r\n\r\n        public void Record(PhoneCall phoneCall, PhoneCallCosting phoneCallCosting, IClock clock) \r\n        {\r\n            var numberOfMinutesCoveredByAllowance = new Minutes();\r\n      \r\n            if (_freeCallAllowance != null)\r\n                numberOfMinutesCoveredByAllowance = _freeCallAllowance.MinutesWhichCanCover(phoneCall, clock);\r\n\r\n            var numberOfMinutesToChargeFor = phoneCall.Minutes.Subtract(numberOfMinutesCoveredByAllowance);\r\n\r\n            var costOfCall = phoneCallCosting.DetermineCostOfCall(numberOfMinutesToChargeFor);\r\n\r\n            Causes(new PhoneCallCharged(this.Id, phoneCall, costOfCall, numberOfMinutesCoveredByAllowance));\r\n        }\r\n\r\n        public void TopUp(Money credit, IClock clock)\r\n        {\r\n            if (_inclusiveMinutesOffer.IsSatisfiedBy(credit))\r\n                Causes(new CreditSatisfiesFreeCallAllowanceOffer(this.Id, clock.Time(), _inclusiveMinutesOffer.FreeMinutes));            \r\n\r\n            Causes(new CreditAdded(this.Id, credit));\r\n        }\r\n\r\n        public void AddInclusiveMinutesOffer(PayAsYouGoInclusiveMinutesOffer offer)\r\n        {\r\n            _inclusiveMinutesOffer = offer;\r\n        }\r\n\r\n        private void Causes(DomainEvent @event)\r\n        {            \r\n            Changes.Add(@event);\r\n            Apply(@event);\r\n        }\r\n\r\n        private void When(CreditAdded creditAdded)\r\n        {\r\n            _credit = _credit.Add(creditAdded.Credit);\r\n        }\r\n\r\n        private void When(CreditSatisfiesFreeCallAllowanceOffer creditSatisfiesFreeCallAllowanceOffer)\r\n        {\r\n            _freeCallAllowance = new FreeCallAllowance(creditSatisfiesFreeCallAllowanceOffer.FreeMinutes, creditSatisfiesFreeCallAllowanceOffer.OfferSatisfied);\r\n        }\r\n\r\n        private void When(PhoneCallCharged phoneCallCharged)\r\n        {\r\n            _credit = _credit.Subtract(phoneCallCharged.CostOfCall);\r\n\r\n            if (_freeCallAllowance != null)\r\n                _freeCallAllowance.Subtract(phoneCallCharged.CoveredByAllowance);\r\n        }\r\n\r\n        private void When(AccountCreated accountCreated)\r\n        {\r\n            Id = accountCreated.Id;\r\n            _credit = accountCreated.Credit;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "22 - Event Sourcing/PPPDDDChap23.EventSourcing/PPPDDDChap23.EventSourcing.Application/Model/PayAsYouGo/PayAsYouGoAccountSnapshot.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace PPPDDDChap23.EventSourcing.Application.Model.PayAsYouGo\n{\n    public class PayAsYouGoAccountSnapshot\n    {\n        public int Version { get; set; }\r\n\r\n        public decimal Credit { get; set; }\n    }\n}\n"
  },
  {
    "path": "22 - Event Sourcing/PPPDDDChap23.EventSourcing/PPPDDDChap23.EventSourcing.Application/Model/PayAsYouGo/PayAsYouGoInclusiveMinutesOffer.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace PPPDDDChap23.EventSourcing.Application.Model.PayAsYouGo\n{\n    public class PayAsYouGoInclusiveMinutesOffer\n    {\n        private Money spendThreshold;\n\n        public PayAsYouGoInclusiveMinutesOffer(Money spendThreshold, Minutes freeMinutes)\n        {\r\n            this.spendThreshold = spendThreshold;\r\n            FreeMinutes = freeMinutes;\n        }\n\n        public bool IsSatisfiedBy(Money credit)\n        {\n            return credit.IsGreaterThanOrEqualTo(spendThreshold);\n        }\n\n        public Minutes FreeMinutes { get; private set; }\n    }\n}\n"
  },
  {
    "path": "22 - Event Sourcing/PPPDDDChap23.EventSourcing/PPPDDDChap23.EventSourcing.Application/Model/PayAsYouGo/PhoneCall.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace PPPDDDChap23.EventSourcing.Application.Model.PayAsYouGo\n{\n    public class PhoneCall\n    {\n        public PhoneCall(PhoneNumber numberDialled, DateTime callStart, Minutes callLength)\n        {\n            NumberDialled = numberDialled;\n            Minutes = callLength;\n            StartTime = callStart;\n        }\n\n        public DateTime StartTime {get; private set;} \n        public Minutes Minutes {get; private set;}\n        public PhoneNumber NumberDialled { get; private set; }\n    }\n}\n"
  },
  {
    "path": "22 - Event Sourcing/PPPDDDChap23.EventSourcing/PPPDDDChap23.EventSourcing.Application/Model/PayAsYouGo/PhoneCallCharged.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\nusing PPPDDDChap23.EventSourcing.Application.Infrastructure;\n\nnamespace PPPDDDChap23.EventSourcing.Application.Model.PayAsYouGo\n{\n    public class PhoneCallCharged : DomainEvent\n    {\n        public PhoneCallCharged(Guid aggregateId, PhoneCall phoneCall, Money costOfCall, Minutes coveredByAllowance) : base (aggregateId)\n        {\n            PhoneCall = phoneCall;\n            CostOfCall = costOfCall;\n            CoveredByAllowance = coveredByAllowance;\n        }\n\n        public PhoneCall PhoneCall { get; private set; }\n\n        public Money CostOfCall { get; private set; }\n\n        public Minutes CoveredByAllowance { get; private set; }\n    }\n}\n"
  },
  {
    "path": "22 - Event Sourcing/PPPDDDChap23.EventSourcing/PPPDDDChap23.EventSourcing.Application/Model/PayAsYouGo/PhoneCallCosting.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace PPPDDDChap23.EventSourcing.Application.Model.PayAsYouGo\n{\n    public class PhoneCallCosting\n    {\n        private Money PricePerMinute { get; set; }\n\n        public PhoneCallCosting()\n        {\n            PricePerMinute = new Money(0.30m); \n        }\n\n        public virtual Money DetermineCostOfCall(Minutes minutes)\n        {\n            return minutes.CostAt(PricePerMinute);\n        }\n    }\n}\n"
  },
  {
    "path": "22 - Event Sourcing/PPPDDDChap23.EventSourcing/PPPDDDChap23.EventSourcing.Application/Model/PayAsYouGo/PhoneNumber.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace PPPDDDChap23.EventSourcing.Application.Model.PayAsYouGo\n{\n    public class PhoneNumber\n    {\n        public PhoneNumber(string phoneNumber)\n        {\n            Number = phoneNumber;\n        }\n\n        public string Number { get; set; }\n\n        public bool IsUKLandlineOrMobile()\n        {\n            return Number.StartsWith(\"+44\");\n        }\n\n        public bool IsInternational()\n        {\n            return !IsUKLandlineOrMobile();\n        }\n    }\n}\n"
  },
  {
    "path": "22 - Event Sourcing/PPPDDDChap23.EventSourcing/PPPDDDChap23.EventSourcing.Application/PPPDDDChap23.EventSourcing.Application.csproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Project ToolsVersion=\"4.0\" DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\r\n  <Import Project=\"$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props\" Condition=\"Exists('$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props')\" />\r\n  <PropertyGroup>\r\n    <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>\r\n    <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>\r\n    <ProjectGuid>{8D3BFFDD-A798-4CE5-B427-8A755698DC9C}</ProjectGuid>\r\n    <OutputType>Library</OutputType>\r\n    <AppDesignerFolder>Properties</AppDesignerFolder>\r\n    <RootNamespace>PPPDDDChap23.EventSourcing.Application</RootNamespace>\r\n    <AssemblyName>PPPDDDChap23.EventSourcing.Application</AssemblyName>\r\n    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r\n    <FileAlignment>512</FileAlignment>\r\n    <SolutionDir Condition=\"$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'\">..\\</SolutionDir>\r\n    <RestorePackages>true</RestorePackages>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' \">\r\n    <DebugSymbols>true</DebugSymbols>\r\n    <DebugType>full</DebugType>\r\n    <Optimize>false</Optimize>\r\n    <OutputPath>bin\\Debug\\</OutputPath>\r\n    <DefineConstants>DEBUG;TRACE</DefineConstants>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <WarningLevel>4</WarningLevel>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' \">\r\n    <DebugType>pdbonly</DebugType>\r\n    <Optimize>true</Optimize>\r\n    <OutputPath>bin\\Release\\</OutputPath>\r\n    <DefineConstants>TRACE</DefineConstants>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <WarningLevel>4</WarningLevel>\r\n  </PropertyGroup>\r\n  <ItemGroup>\r\n    <Reference Include=\"Raven.Abstractions\">\r\n      <HintPath>..\\packages\\RavenDB.Client.2.5.2851\\lib\\net45\\Raven.Abstractions.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"Raven.Client.Lightweight\">\r\n      <HintPath>..\\packages\\RavenDB.Client.2.5.2851\\lib\\net45\\Raven.Client.Lightweight.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"StructureMap\">\r\n      <HintPath>..\\packages\\structuremap.2.6.4.1\\lib\\net40\\StructureMap.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"System\" />\r\n    <Reference Include=\"System.ComponentModel.Composition\" />\r\n    <Reference Include=\"System.Core\" />\r\n    <Reference Include=\"System.Xml.Linq\" />\r\n    <Reference Include=\"System.Data.DataSetExtensions\" />\r\n    <Reference Include=\"Microsoft.CSharp\" />\r\n    <Reference Include=\"System.Data\" />\r\n    <Reference Include=\"System.Xml\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <Compile Include=\"Application\\BusinessUseCases\\CreateAccount.cs\" />\r\n    <Compile Include=\"Application\\BusinessUseCases\\RecordPhonecall.cs\" />\r\n    <Compile Include=\"Application\\BusinessUseCases\\TopUpCredit.cs\" />\r\n    <Compile Include=\"Bootstrapper.cs\" />\r\n    <Compile Include=\"Infrastructure\\Entity.cs\" />\r\n    <Compile Include=\"Infrastructure\\EventStore.cs\" />\r\n    <Compile Include=\"Infrastructure\\EventSourcedAggregate.cs\" />\r\n    <Compile Include=\"Infrastructure\\DomainEvent.cs\" />\r\n    <Compile Include=\"Infrastructure\\EventWrapper.cs\" />\r\n    <Compile Include=\"Infrastructure\\IClock.cs\" />\r\n    <Compile Include=\"Infrastructure\\PasAsYouGoSnapshotJob.cs\" />\r\n    <Compile Include=\"Infrastructure\\PayAsYouGoAccountRepository.cs\" />\r\n    <Compile Include=\"Infrastructure\\EventStream.cs\" />\r\n    <Compile Include=\"Infrastructure\\SystemClock.cs\" />\r\n    <Compile Include=\"Infrastructure\\ValueObject.cs\" />\r\n    <Compile Include=\"Model\\PayAsYouGo\\AccountCreated.cs\" />\r\n    <Compile Include=\"Model\\PayAsYouGo\\IPayAsYouGoAccountRepository.cs\" />\r\n    <Compile Include=\"Model\\PayAsYouGo\\Minutes.cs\" />\r\n    <Compile Include=\"Model\\PayAsYouGo\\Money.cs\" />\r\n    <Compile Include=\"Model\\PayAsYouGo\\CreditAdded.cs\" />\r\n    <Compile Include=\"Model\\PayAsYouGo\\CreditSatisfiesFreeCallAllowanceOffer.cs\" />\r\n    <Compile Include=\"Model\\PayAsYouGo\\FreeCallAllowance.cs\" />\r\n    <Compile Include=\"Model\\PayAsYouGo\\PayAsYouGoAccount.cs\" />\r\n    <Compile Include=\"Model\\PayAsYouGo\\PayAsYouGoAccountSnapshot.cs\" />\r\n    <Compile Include=\"Model\\PayAsYouGo\\PayAsYouGoInclusiveMinutesOffer.cs\" />\r\n    <Compile Include=\"Model\\PayAsYouGo\\PhoneCall.cs\" />\r\n    <Compile Include=\"Model\\PayAsYouGo\\PhoneCallCharged.cs\" />\r\n    <Compile Include=\"Model\\PayAsYouGo\\PhoneCallCosting.cs\" />\r\n    <Compile Include=\"Model\\PayAsYouGo\\PhoneNumber.cs\" />\r\n    <Compile Include=\"Properties\\AssemblyInfo.cs\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <Folder Include=\"Application\\Queries\\\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <None Include=\"packages.config\" />\r\n  </ItemGroup>\r\n  <Import Project=\"$(MSBuildToolsPath)\\Microsoft.CSharp.targets\" />\r\n  <Import Project=\"$(SolutionDir)\\.nuget\\NuGet.targets\" Condition=\"Exists('$(SolutionDir)\\.nuget\\NuGet.targets')\" />\r\n  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \n       Other similar extension points exist, see Microsoft.Common.targets.\n  <Target Name=\"BeforeBuild\">\n  </Target>\n  <Target Name=\"AfterBuild\">\n  </Target>\n  -->\r\n</Project>"
  },
  {
    "path": "22 - Event Sourcing/PPPDDDChap23.EventSourcing/PPPDDDChap23.EventSourcing.Application/Properties/AssemblyInfo.cs",
    "content": "﻿using System.Reflection;\nusing System.Runtime.CompilerServices;\nusing System.Runtime.InteropServices;\n\n// General Information about an assembly is controlled through the following \n// set of attributes. Change these attribute values to modify the information\n// associated with an assembly.\n[assembly: AssemblyTitle(\"PPPDDDChap23.EventSourcing.Application\")]\n[assembly: AssemblyDescription(\"\")]\n[assembly: AssemblyConfiguration(\"\")]\n[assembly: AssemblyCompany(\"\")]\n[assembly: AssemblyProduct(\"PPPDDDChap23.EventSourcing.Application\")]\n[assembly: AssemblyCopyright(\"Copyright ©  2014\")]\n[assembly: AssemblyTrademark(\"\")]\n[assembly: AssemblyCulture(\"\")]\n\n// Setting ComVisible to false makes the types in this assembly not visible \n// to COM components.  If you need to access a type in this assembly from \n// COM, set the ComVisible attribute to true on that type.\n[assembly: ComVisible(false)]\n\n// The following GUID is for the ID of the typelib if this project is exposed to COM\n[assembly: Guid(\"c4d43060-b1aa-465f-bf2c-3eeabf1a4abd\")]\n\n// Version information for an assembly consists of the following four values:\n//\n//      Major Version\n//      Minor Version \n//      Build Number\n//      Revision\n//\n// You can specify all the values or you can default the Build and Revision Numbers \n// by using the '*' as shown below:\n// [assembly: AssemblyVersion(\"1.0.*\")]\n[assembly: AssemblyVersion(\"1.0.0.0\")]\n[assembly: AssemblyFileVersion(\"1.0.0.0\")]\n"
  },
  {
    "path": "22 - Event Sourcing/PPPDDDChap23.EventSourcing/PPPDDDChap23.EventSourcing.Application/packages.config",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<packages>\n  <package id=\"RavenDB.Client\" version=\"2.5.2851\" targetFramework=\"net45\" />\n  <package id=\"structuremap\" version=\"2.6.4.1\" targetFramework=\"net45\" />\n</packages>"
  },
  {
    "path": "22 - Event Sourcing/PPPDDDChap23.EventSourcing/PPPDDDChap23.EventSourcing.ApplicationTests/PPPDDDChap23.EventSourcing.ApplicationTests.csproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Project ToolsVersion=\"4.0\" DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\r\n  <Import Project=\"$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props\" Condition=\"Exists('$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props')\" />\r\n  <PropertyGroup>\r\n    <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>\r\n    <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>\r\n    <ProjectGuid>{CC4EB0F4-877E-4767-95F7-FCFF629D9251}</ProjectGuid>\r\n    <OutputType>Library</OutputType>\r\n    <AppDesignerFolder>Properties</AppDesignerFolder>\r\n    <RootNamespace>PPPDDDChap23.EventSourcing.ApplicationTests</RootNamespace>\r\n    <AssemblyName>PPPDDDChap23.EventSourcing.ApplicationTests</AssemblyName>\r\n    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r\n    <FileAlignment>512</FileAlignment>\r\n    <SolutionDir Condition=\"$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'\">..\\</SolutionDir>\r\n    <RestorePackages>true</RestorePackages>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' \">\r\n    <DebugSymbols>true</DebugSymbols>\r\n    <DebugType>full</DebugType>\r\n    <Optimize>false</Optimize>\r\n    <OutputPath>bin\\Debug\\</OutputPath>\r\n    <DefineConstants>DEBUG;TRACE</DefineConstants>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <WarningLevel>4</WarningLevel>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' \">\r\n    <DebugType>pdbonly</DebugType>\r\n    <Optimize>true</Optimize>\r\n    <OutputPath>bin\\Release\\</OutputPath>\r\n    <DefineConstants>TRACE</DefineConstants>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <WarningLevel>4</WarningLevel>\r\n  </PropertyGroup>\r\n  <ItemGroup>\r\n    <Reference Include=\"Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL\" />\r\n    <Reference Include=\"StructureMap\">\r\n      <HintPath>..\\packages\\structuremap.2.6.4.1\\lib\\net40\\StructureMap.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"System\" />\r\n    <Reference Include=\"System.Core\" />\r\n    <Reference Include=\"System.Xml.Linq\" />\r\n    <Reference Include=\"System.Data.DataSetExtensions\" />\r\n    <Reference Include=\"Microsoft.CSharp\" />\r\n    <Reference Include=\"System.Data\" />\r\n    <Reference Include=\"System.Xml\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <Compile Include=\"PayAsYouGoAccount_Tests.cs\" />\r\n    <Compile Include=\"Properties\\AssemblyInfo.cs\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <None Include=\"packages.config\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <ProjectReference Include=\"..\\PPPDDDChap23.EventSourcing.Application\\PPPDDDChap23.EventSourcing.Application.csproj\">\r\n      <Project>{8d3bffdd-a798-4ce5-b427-8a755698dc9c}</Project>\r\n      <Name>PPPDDDChap23.EventSourcing.Application</Name>\r\n    </ProjectReference>\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <Service Include=\"{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}\" />\r\n  </ItemGroup>\r\n  <Import Project=\"$(MSBuildToolsPath)\\Microsoft.CSharp.targets\" />\r\n  <Import Project=\"$(SolutionDir)\\.nuget\\NuGet.targets\" Condition=\"Exists('$(SolutionDir)\\.nuget\\NuGet.targets')\" />\r\n  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \n       Other similar extension points exist, see Microsoft.Common.targets.\n  <Target Name=\"BeforeBuild\">\n  </Target>\n  <Target Name=\"AfterBuild\">\n  </Target>\n  -->\r\n</Project>"
  },
  {
    "path": "22 - Event Sourcing/PPPDDDChap23.EventSourcing/PPPDDDChap23.EventSourcing.ApplicationTests/PayAsYouGoAccount_Tests.cs",
    "content": "﻿using Microsoft.VisualStudio.TestTools.UnitTesting;\r\nusing PPPDDDChap23.EventSourcing.Application.Infrastructure;\r\nusing PPPDDDChap23.EventSourcing.Application.Model.PayAsYouGo;\r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Text;\r\nusing System.Threading.Tasks;\r\n\r\nnamespace PPPDDDChap23.EventSourcing.ApplicationTests\r\n{\r\n    [TestClass]\r\n    public class PayAsYouGoAccount_Tests\r\n    {\r\n        static PayAsYouGoAccount _account;\r\n        static Money _fiveDollars = new Money(5);\r\n        static PayAsYouGoInclusiveMinutesOffer _free90MinsWith10DollarTopUp = new PayAsYouGoInclusiveMinutesOffer(new Money(10), new Minutes(90));\r\n\r\n        [ClassInitialize] // runs first\r\n        public static void When_applying_a_top_up_that_does_not_qualify_for_inclusive_minutes(TestContext ctx)\r\n        {\r\n            _account = new PayAsYouGoAccount(Guid.NewGuid(), new Money(0));\r\n            // remove the AccountCreated event that is not relevant to this test\r\n            _account.Changes.Clear();\r\n\r\n            _account.AddInclusiveMinutesOffer(_free90MinsWith10DollarTopUp);\r\n            _account.TopUp(_fiveDollars, new SystemClock()); // $5 top up does not meet $10 threshold for free minutes\r\n        }\r\n\r\n        [TestMethod]\r\n        public void The_account_will_be_credited_with_the_top_up_amount_but_no_free_minutes()\r\n        {\r\n            var lastEvent = _account.Changes.SingleOrDefault() as CreditAdded;\r\n            Assert.IsNotNull(lastEvent);\r\n            Assert.AreEqual(_fiveDollars, lastEvent.Credit);\r\n            Assert.AreEqual(5, _account.GetPayAsYouGoAccountSnapshot().Credit);\r\n        }\r\n\r\n    }\r\n}\r\n"
  },
  {
    "path": "22 - Event Sourcing/PPPDDDChap23.EventSourcing/PPPDDDChap23.EventSourcing.ApplicationTests/Properties/AssemblyInfo.cs",
    "content": "﻿using System.Reflection;\nusing System.Runtime.CompilerServices;\nusing System.Runtime.InteropServices;\n\n// General Information about an assembly is controlled through the following \n// set of attributes. Change these attribute values to modify the information\n// associated with an assembly.\n[assembly: AssemblyTitle(\"PPPDDDChap23.EventSourcing.ApplicationTests\")]\n[assembly: AssemblyDescription(\"\")]\n[assembly: AssemblyConfiguration(\"\")]\n[assembly: AssemblyCompany(\"\")]\n[assembly: AssemblyProduct(\"PPPDDDChap23.EventSourcing.ApplicationTests\")]\n[assembly: AssemblyCopyright(\"Copyright ©  2014\")]\n[assembly: AssemblyTrademark(\"\")]\n[assembly: AssemblyCulture(\"\")]\n\n// Setting ComVisible to false makes the types in this assembly not visible \n// to COM components.  If you need to access a type in this assembly from \n// COM, set the ComVisible attribute to true on that type.\n[assembly: ComVisible(false)]\n\n// The following GUID is for the ID of the typelib if this project is exposed to COM\n[assembly: Guid(\"cf9dd336-2d58-4976-9328-46581d46e60c\")]\n\n// Version information for an assembly consists of the following four values:\n//\n//      Major Version\n//      Minor Version \n//      Build Number\n//      Revision\n//\n// You can specify all the values or you can default the Build and Revision Numbers \n// by using the '*' as shown below:\n// [assembly: AssemblyVersion(\"1.0.*\")]\n[assembly: AssemblyVersion(\"1.0.0.0\")]\n[assembly: AssemblyFileVersion(\"1.0.0.0\")]\n"
  },
  {
    "path": "22 - Event Sourcing/PPPDDDChap23.EventSourcing/PPPDDDChap23.EventSourcing.ApplicationTests/packages.config",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<packages>\n  <package id=\"structuremap\" version=\"2.6.4.1\" targetFramework=\"net45\" />\n</packages>"
  },
  {
    "path": "22 - Event Sourcing/PPPDDDChap23.EventSourcing/PPPDDDChap23.EventSourcing.Presentation/App.config",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n<configuration>\n  <startup>\n    <supportedRuntime version=\"v4.0\" sku=\".NETFramework,Version=v4.5\" />\n  </startup>\n  <connectionStrings>\n    <add name=\"RavenDB\" connectionString=\"Url=http://localhost:8080;Database=EventSourcingExample\" />\n  </connectionStrings>\n</configuration>"
  },
  {
    "path": "22 - Event Sourcing/PPPDDDChap23.EventSourcing/PPPDDDChap23.EventSourcing.Presentation/PPPDDDChap23.EventSourcing.Presentation.csproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"4.0\" DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <Import Project=\"$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props\" Condition=\"Exists('$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props')\" />\n  <PropertyGroup>\n    <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>\n    <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>\n    <ProjectGuid>{2D68287E-7C3A-4A2D-8DF8-510BD615A954}</ProjectGuid>\n    <OutputType>Exe</OutputType>\n    <AppDesignerFolder>Properties</AppDesignerFolder>\n    <RootNamespace>PPPDDDChap23.EventSourcing.Presentation</RootNamespace>\n    <AssemblyName>PPPDDDChap23.EventSourcing.Presentation</AssemblyName>\n    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\n    <FileAlignment>512</FileAlignment>\n    <SolutionDir Condition=\"$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'\">..\\</SolutionDir>\n    <RestorePackages>true</RestorePackages>\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' \">\n    <PlatformTarget>AnyCPU</PlatformTarget>\n    <DebugSymbols>true</DebugSymbols>\n    <DebugType>full</DebugType>\n    <Optimize>false</Optimize>\n    <OutputPath>bin\\Debug\\</OutputPath>\n    <DefineConstants>DEBUG;TRACE</DefineConstants>\n    <ErrorReport>prompt</ErrorReport>\n    <WarningLevel>4</WarningLevel>\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' \">\n    <PlatformTarget>AnyCPU</PlatformTarget>\n    <DebugType>pdbonly</DebugType>\n    <Optimize>true</Optimize>\n    <OutputPath>bin\\Release\\</OutputPath>\n    <DefineConstants>TRACE</DefineConstants>\n    <ErrorReport>prompt</ErrorReport>\n    <WarningLevel>4</WarningLevel>\n  </PropertyGroup>\n  <ItemGroup>\n    <Reference Include=\"StructureMap\">\n      <HintPath>..\\packages\\structuremap.2.6.4.1\\lib\\net40\\StructureMap.dll</HintPath>\n    </Reference>\n    <Reference Include=\"System\" />\n    <Reference Include=\"System.Core\" />\n    <Reference Include=\"System.Xml.Linq\" />\n    <Reference Include=\"System.Data.DataSetExtensions\" />\n    <Reference Include=\"Microsoft.CSharp\" />\n    <Reference Include=\"System.Data\" />\n    <Reference Include=\"System.Xml\" />\n  </ItemGroup>\n  <ItemGroup>\n    <Compile Include=\"Program.cs\" />\n    <Compile Include=\"Properties\\AssemblyInfo.cs\" />\n  </ItemGroup>\n  <ItemGroup>\n    <None Include=\"App.config\" />\n    <None Include=\"packages.config\" />\n  </ItemGroup>\n  <ItemGroup>\n    <ProjectReference Include=\"..\\PPPDDDChap23.EventSourcing.Application\\PPPDDDChap23.EventSourcing.Application.csproj\">\n      <Project>{8d3bffdd-a798-4ce5-b427-8a755698dc9c}</Project>\n      <Name>PPPDDDChap23.EventSourcing.Application</Name>\n    </ProjectReference>\n  </ItemGroup>\n  <Import Project=\"$(MSBuildToolsPath)\\Microsoft.CSharp.targets\" />\n  <Import Project=\"$(SolutionDir)\\.nuget\\NuGet.targets\" Condition=\"Exists('$(SolutionDir)\\.nuget\\NuGet.targets')\" />\n  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \n       Other similar extension points exist, see Microsoft.Common.targets.\n  <Target Name=\"BeforeBuild\">\n  </Target>\n  <Target Name=\"AfterBuild\">\n  </Target>\n  -->\n</Project>"
  },
  {
    "path": "22 - Event Sourcing/PPPDDDChap23.EventSourcing/PPPDDDChap23.EventSourcing.Presentation/Program.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\nusing PPPDDDChap23.EventSourcing.Application;\nusing StructureMap;\nusing PPPDDDChap23.EventSourcing.Application.Application.BusinessUseCases;\n\nnamespace PPPDDDChap23.EventSourcing.Presentation\n{\n    public class Program\n    {\n        public static void Main(string[] args)\n        {\n            Bootstrapper.Startup();\n\n            var id = Guid.NewGuid();\n\n            var createAccount = ObjectFactory.GetInstance<CreateAccount>();\n\n            Console.WriteLine(\"Create account\");\n            Console.WriteLine();\n            createAccount.Execute(id);\n\n            Console.WriteLine(\"Record call\");\n            Console.WriteLine();\n\n            var recordPhoneCall = ObjectFactory.GetInstance<RecordPhonecall>();\n\n            recordPhoneCall.Execute(id, \"07789923557\", DateTime.Now, 8); \n\n            Console.WriteLine(\"Top up credit\");\n            Console.WriteLine();\n\n            var topUpCredit = ObjectFactory.GetInstance<TopUpCredit>();\n\n            topUpCredit.Execute(id, 20m);\n\n            Console.WriteLine(\"Hit any key to continue\");\n            Console.ReadLine();\n\n            Console.WriteLine(\"Record call\");\n            Console.WriteLine();\n            \n            recordPhoneCall.Execute(id, \"07789923557\", DateTime.Now, 100); \n\n        }\n    }\n}\n"
  },
  {
    "path": "22 - Event Sourcing/PPPDDDChap23.EventSourcing/PPPDDDChap23.EventSourcing.Presentation/Properties/AssemblyInfo.cs",
    "content": "﻿using System.Reflection;\nusing System.Runtime.CompilerServices;\nusing System.Runtime.InteropServices;\n\n// General Information about an assembly is controlled through the following \n// set of attributes. Change these attribute values to modify the information\n// associated with an assembly.\n[assembly: AssemblyTitle(\"PPPDDDChap23.EventSourcing.Presentation\")]\n[assembly: AssemblyDescription(\"\")]\n[assembly: AssemblyConfiguration(\"\")]\n[assembly: AssemblyCompany(\"\")]\n[assembly: AssemblyProduct(\"PPPDDDChap23.EventSourcing.Presentation\")]\n[assembly: AssemblyCopyright(\"Copyright ©  2014\")]\n[assembly: AssemblyTrademark(\"\")]\n[assembly: AssemblyCulture(\"\")]\n\n// Setting ComVisible to false makes the types in this assembly not visible \n// to COM components.  If you need to access a type in this assembly from \n// COM, set the ComVisible attribute to true on that type.\n[assembly: ComVisible(false)]\n\n// The following GUID is for the ID of the typelib if this project is exposed to COM\n[assembly: Guid(\"47342863-2f77-438d-b37f-bb496201c9e4\")]\n\n// Version information for an assembly consists of the following four values:\n//\n//      Major Version\n//      Minor Version \n//      Build Number\n//      Revision\n//\n// You can specify all the values or you can default the Build and Revision Numbers \n// by using the '*' as shown below:\n// [assembly: AssemblyVersion(\"1.0.*\")]\n[assembly: AssemblyVersion(\"1.0.0.0\")]\n[assembly: AssemblyFileVersion(\"1.0.0.0\")]\n"
  },
  {
    "path": "22 - Event Sourcing/PPPDDDChap23.EventSourcing/PPPDDDChap23.EventSourcing.Presentation/packages.config",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<packages>\n  <package id=\"structuremap\" version=\"2.6.4.1\" targetFramework=\"net45\" />\n</packages>"
  },
  {
    "path": "22 - Event Sourcing/PPPDDDChap23.EventSourcing/PPPDDDChap23.EventSourcing.sln",
    "content": "﻿\r\nMicrosoft Visual Studio Solution File, Format Version 12.00\r\n# Visual Studio Express 2013 for Web\r\nVisualStudioVersion = 12.0.21005.1\r\nMinimumVisualStudioVersion = 10.0.40219.1\r\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"PPPDDDChap23.EventSourcing.Application\", \"PPPDDDChap23.EventSourcing.Application\\PPPDDDChap23.EventSourcing.Application.csproj\", \"{8D3BFFDD-A798-4CE5-B427-8A755698DC9C}\"\r\nEndProject\r\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"PPPDDDChap23.EventSourcing.Presentation\", \"PPPDDDChap23.EventSourcing.Presentation\\PPPDDDChap23.EventSourcing.Presentation.csproj\", \"{2D68287E-7C3A-4A2D-8DF8-510BD615A954}\"\r\nEndProject\r\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"PPPDDDChap23.EventSourcing.ApplicationTests\", \"PPPDDDChap23.EventSourcing.ApplicationTests\\PPPDDDChap23.EventSourcing.ApplicationTests.csproj\", \"{CC4EB0F4-877E-4767-95F7-FCFF629D9251}\"\r\nEndProject\r\nProject(\"{2150E333-8FDC-42A3-9474-1A3956D46DE8}\") = \".nuget\", \".nuget\", \"{A40CA553-C0B1-4068-865E-306AB36100ED}\"\r\n\tProjectSection(SolutionItems) = preProject\r\n\t\t.nuget\\NuGet.Config = .nuget\\NuGet.Config\r\n\t\t.nuget\\NuGet.exe = .nuget\\NuGet.exe\r\n\t\t.nuget\\NuGet.targets = .nuget\\NuGet.targets\r\n\tEndProjectSection\r\nEndProject\r\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"PPPDDD.Chap23.EventSourcing.EventStoreDemo\", \"..\\PPPDDD.Chap23.EventSourcing.EventStoreDemo\\PPPDDD.Chap23.EventSourcing.EventStoreDemo.csproj\", \"{04053A84-EAD1-4318-92A8-C9F7EE255FCB}\"\r\nEndProject\r\nGlobal\r\n\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\r\n\t\tDebug|Any CPU = Debug|Any CPU\r\n\t\tRelease|Any CPU = Release|Any CPU\r\n\tEndGlobalSection\r\n\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\r\n\t\t{8D3BFFDD-A798-4CE5-B427-8A755698DC9C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r\n\t\t{8D3BFFDD-A798-4CE5-B427-8A755698DC9C}.Debug|Any CPU.Build.0 = Debug|Any CPU\r\n\t\t{8D3BFFDD-A798-4CE5-B427-8A755698DC9C}.Release|Any CPU.ActiveCfg = Release|Any CPU\r\n\t\t{8D3BFFDD-A798-4CE5-B427-8A755698DC9C}.Release|Any CPU.Build.0 = Release|Any CPU\r\n\t\t{2D68287E-7C3A-4A2D-8DF8-510BD615A954}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r\n\t\t{2D68287E-7C3A-4A2D-8DF8-510BD615A954}.Debug|Any CPU.Build.0 = Debug|Any CPU\r\n\t\t{2D68287E-7C3A-4A2D-8DF8-510BD615A954}.Release|Any CPU.ActiveCfg = Release|Any CPU\r\n\t\t{2D68287E-7C3A-4A2D-8DF8-510BD615A954}.Release|Any CPU.Build.0 = Release|Any CPU\r\n\t\t{CC4EB0F4-877E-4767-95F7-FCFF629D9251}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r\n\t\t{CC4EB0F4-877E-4767-95F7-FCFF629D9251}.Debug|Any CPU.Build.0 = Debug|Any CPU\r\n\t\t{CC4EB0F4-877E-4767-95F7-FCFF629D9251}.Release|Any CPU.ActiveCfg = Release|Any CPU\r\n\t\t{CC4EB0F4-877E-4767-95F7-FCFF629D9251}.Release|Any CPU.Build.0 = Release|Any CPU\r\n\t\t{04053A84-EAD1-4318-92A8-C9F7EE255FCB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r\n\t\t{04053A84-EAD1-4318-92A8-C9F7EE255FCB}.Debug|Any CPU.Build.0 = Debug|Any CPU\r\n\t\t{04053A84-EAD1-4318-92A8-C9F7EE255FCB}.Release|Any CPU.ActiveCfg = Release|Any CPU\r\n\t\t{04053A84-EAD1-4318-92A8-C9F7EE255FCB}.Release|Any CPU.Build.0 = Release|Any CPU\r\n\tEndGlobalSection\r\n\tGlobalSection(SolutionProperties) = preSolution\r\n\t\tHideSolutionNode = FALSE\r\n\tEndGlobalSection\r\nEndGlobal\r\n"
  },
  {
    "path": "22 - Event Sourcing/README.md",
    "content": "PPPDDDChap23\n============\n\nPrinciples, Practices and Patterns of Domain-Driven Design: Chapter 23 Event Sourcing Code Samples \n"
  },
  {
    "path": "23 - Architecting Application User Interfaces/PPPDDD.NonDist.UIComp/PPPDDD.NonDist.UIComp/App_Start/RouteConfig.cs",
    "content": "﻿using System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Web;\r\nusing System.Web.Mvc;\r\nusing System.Web.Routing;\r\n\r\nnamespace PPPDDD.NonDist.UIComp\r\n{\r\n    public class RouteConfig\r\n    {\r\n        public static void RegisterRoutes(RouteCollection routes)\r\n        {\r\n            routes.IgnoreRoute(\"{resource}.axd/{*pathInfo}\");\r\n\r\n            routes.MapRoute(\r\n                name: \"Default\",\r\n                url: \"{controller}/{action}/{id}\",\r\n                defaults: new { controller = \"Home\", action = \"Index\", id = UrlParameter.Optional }\r\n            );\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "23 - Architecting Application User Interfaces/PPPDDD.NonDist.UIComp/PPPDDD.NonDist.UIComp/Controllers/CatalogueBoundedContextController.cs",
    "content": "﻿using System;\nusing System.Web;\nusing System.Web.Mvc;\n\nnamespace PPPDDD.NonDist.UIComp.Controllers\n{\n    public class CatalogBoundedContextController : Controller\n    {\n        [ChildActionOnly] // action cannot be rendered as an individual page\n        public PartialViewResult ItemInBasket(string productId)\n        {\n            var product = SalesBoundedContext.ProductFinder.Find(productId);\n\n            /* convention will look for a partial view called:\n             * /Views/CatalogBoundedContext/ItemInBasket.cshtml\n            */\n            return PartialView(product);\n        }\n    }\n}\n\n// This would actually be inside a separate project\nnamespace PPPDDD.NonDist.UIComp.SalesBoundedContext\n{\n    public static class ProductFinder\n    {\n        public static Product Find(string productId)\n        {\n            // simulate a database lookup\n            return new Product\n            {\n                ID = productId,\n                Name = \"Product_\" + productId,\n                Description = \"Lorem ipsum dolor sit amet\",\n                ImageUrl = \"http://media.wiley.com/product_data/coverImage/84/04702927/0470292784.jpg\"\n            };\n        }\n    }\n\n    public class Product\n    {\n        public string ID { get; set; }\n\n        public string Name { get; set; }\n\n        public string Description { get; set; }\n\n        public string ImageUrl { get; set; }\n    }\n}"
  },
  {
    "path": "23 - Architecting Application User Interfaces/PPPDDD.NonDist.UIComp/PPPDDD.NonDist.UIComp/Controllers/HomeController.cs",
    "content": "﻿using System;\r\nusing System.Web;\r\nusing System.Web.Mvc;\r\n\r\nnamespace PPPDDD.NonDist.UIComp.Controllers\r\n{\r\n    public class HomeController : Controller\r\n    {\r\n        public ActionResult Index()\r\n        {\r\n            return View();\r\n        }\r\n\t}\r\n}"
  },
  {
    "path": "23 - Architecting Application User Interfaces/PPPDDD.NonDist.UIComp/PPPDDD.NonDist.UIComp/Controllers/PricingBoundedContextController.cs",
    "content": "﻿using System;\r\nusing System.Web;\r\nusing System.Web.Mvc;\r\n\r\nnamespace PPPDDD.NonDist.UIComp.Controllers\r\n{\r\n    public class PricingBoundedContextController : Controller\r\n    {\r\n        [ChildActionOnly] // cannot be rendered as a page\r\n        public PartialViewResult Price(string productId)\r\n        {\r\n            var price = PricingBoundedContext.PriceFinder.PriceFor(productId);\r\n\r\n            /* convention will look for a partial view called:\r\n             * /Views/PricingBoundedContext/Price.cshtml\r\n            */\r\n            return PartialView(price);\r\n        }\r\n    }\r\n}\r\n\r\n// would actually live in a separate project\r\nnamespace PPPDDD.NonDist.UIComp.PricingBoundedContext\r\n{\r\n    public static class PriceFinder\r\n    {\r\n        private static Lazy<Random> random = new Lazy<Random>();\r\n\r\n        public static int PriceFor(string productId)\r\n        {\r\n            // simulate a database lookup\r\n            return random.Value.Next(1, 1000);\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "23 - Architecting Application User Interfaces/PPPDDD.NonDist.UIComp/PPPDDD.NonDist.UIComp/Controllers/ShippingBoundedContextController.cs",
    "content": "﻿using System;\r\nusing System.Web;\r\nusing System.Web.Mvc;\r\n\r\nnamespace PPPDDD.NonDist.UIComp.Controllers\r\n{\r\n    public class ShippingBoundedContextController : Controller\r\n    {\r\n        [ChildActionOnly] // cannot be rendered as a page\r\n        public PartialViewResult DeliveryOptions()\r\n        {\r\n            var options = ShippingBoundedContext.DeliveryOptions.All();\r\n\r\n            /* convention will look for a partial view called:\r\n            * /Views/ShippingBoundedContext/DeliveryOptions.cshtml\r\n           */\r\n            return PartialView(options);\r\n        }\r\n    }\r\n}\r\n\r\n// would actually be in a separate project\r\nnamespace PPPDDD.NonDist.UIComp.ShippingBoundedContext\r\n{\r\n    using System.Collections.Generic;\r\n\r\n    public static class DeliveryOptions\r\n    {\r\n        public static IEnumerable<DeliveryOption> All()\r\n        {\r\n            // simulate database lookup\r\n            return new List<DeliveryOption>\r\n            {\r\n                new DeliveryOption\r\n                {\r\n                    ID = \"ss1\",\r\n                    Name = \"Cheap & Cheerful\",\r\n                    Price = 2,\r\n                    Duration = new Tuple<int,int>(7, 14)\r\n                },\r\n                new DeliveryOption\r\n                {\r\n                    ID = \"ss2\",\r\n                    Name = \"Super Fast\",\r\n                    Price = 50,\r\n                    Duration = new Tuple<int,int>(1, 2)\r\n                }\r\n            };\r\n        }\r\n    }\r\n\r\n    public class DeliveryOption\r\n    {\r\n        public string ID { get; set; }\r\n\r\n        public string Name { get; set; }\r\n\r\n        public int Price { get; set; }\r\n\r\n        public Tuple<int, int> Duration { get; set; }\r\n    }\r\n}"
  },
  {
    "path": "23 - Architecting Application User Interfaces/PPPDDD.NonDist.UIComp/PPPDDD.NonDist.UIComp/Global.asax",
    "content": "﻿<%@ Application Codebehind=\"Global.asax.cs\" Inherits=\"PPPDDD.NonDist.UIComp.MvcApplication\" Language=\"C#\" %>\r\n"
  },
  {
    "path": "23 - Architecting Application User Interfaces/PPPDDD.NonDist.UIComp/PPPDDD.NonDist.UIComp/Global.asax.cs",
    "content": "﻿using System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Web;\r\nusing System.Web.Mvc;\r\nusing System.Web.Routing;\r\n\r\nnamespace PPPDDD.NonDist.UIComp\r\n{\r\n    public class MvcApplication : System.Web.HttpApplication\r\n    {\r\n        protected void Application_Start()\r\n        {\r\n            AreaRegistration.RegisterAllAreas();\r\n            RouteConfig.RegisterRoutes(RouteTable.Routes);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "23 - Architecting Application User Interfaces/PPPDDD.NonDist.UIComp/PPPDDD.NonDist.UIComp/PPPDDD.NonDist.UIComp.csproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"12.0\" DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <Import Project=\"$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props\" Condition=\"Exists('$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props')\" />\n  <PropertyGroup>\n    <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>\n    <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>\n    <ProductVersion>\n    </ProductVersion>\n    <SchemaVersion>2.0</SchemaVersion>\n    <ProjectGuid>{5798C8DC-0ED0-44ED-8E0B-A3B62B94FD09}</ProjectGuid>\n    <ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>\n    <OutputType>Library</OutputType>\n    <AppDesignerFolder>Properties</AppDesignerFolder>\n    <RootNamespace>PPPDDD.NonDist.UIComp</RootNamespace>\n    <AssemblyName>PPPDDD.NonDist.UIComp</AssemblyName>\n    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\n    <UseIISExpress>true</UseIISExpress>\n    <IISExpressSSLPort />\n    <IISExpressAnonymousAuthentication />\n    <IISExpressWindowsAuthentication />\n    <IISExpressUseClassicPipelineMode />\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' \">\n    <DebugSymbols>true</DebugSymbols>\n    <DebugType>full</DebugType>\n    <Optimize>false</Optimize>\n    <OutputPath>bin\\</OutputPath>\n    <DefineConstants>DEBUG;TRACE</DefineConstants>\n    <ErrorReport>prompt</ErrorReport>\n    <WarningLevel>4</WarningLevel>\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' \">\n    <DebugType>pdbonly</DebugType>\n    <Optimize>true</Optimize>\n    <OutputPath>bin\\</OutputPath>\n    <DefineConstants>TRACE</DefineConstants>\n    <ErrorReport>prompt</ErrorReport>\n    <WarningLevel>4</WarningLevel>\n  </PropertyGroup>\n  <ItemGroup>\n    <Reference Include=\"Microsoft.CSharp\" />\n    <Reference Include=\"System.Web.DynamicData\" />\n    <Reference Include=\"System.Web.Entity\" />\n    <Reference Include=\"System.Web.ApplicationServices\" />\n    <Reference Include=\"System.ComponentModel.DataAnnotations\" />\n    <Reference Include=\"System\" />\n    <Reference Include=\"System.Data\" />\n    <Reference Include=\"System.Core\" />\n    <Reference Include=\"System.Data.DataSetExtensions\" />\n    <Reference Include=\"System.Web.Extensions\" />\n    <Reference Include=\"System.Xml.Linq\" />\n    <Reference Include=\"System.Drawing\" />\n    <Reference Include=\"System.Web\" />\n    <Reference Include=\"System.Xml\" />\n    <Reference Include=\"System.Configuration\" />\n    <Reference Include=\"System.Web.Services\" />\n    <Reference Include=\"System.EnterpriseServices\" />\n  </ItemGroup>\n  <ItemGroup>\n    <Reference Include=\"System.Web.Razor\">\n      <HintPath>..\\packages\\Microsoft.AspNet.Razor.3.0.0\\lib\\net45\\System.Web.Razor.dll</HintPath>\n    </Reference>\n    <Reference Include=\"System.Web.Webpages\">\n      <HintPath>..\\packages\\Microsoft.AspNet.Webpages.3.0.0\\lib\\net45\\System.Web.Webpages.dll</HintPath>\n    </Reference>\n    <Reference Include=\"System.Web.Webpages.Deployment\">\n      <HintPath>..\\packages\\Microsoft.AspNet.Webpages.3.0.0\\lib\\net45\\System.Web.Webpages.Deployment.dll</HintPath>\n    </Reference>\n    <Reference Include=\"System.Web.Webpages.Razor\">\n      <HintPath>..\\packages\\Microsoft.AspNet.Webpages.3.0.0\\lib\\net45\\System.Web.Webpages.Razor.dll</HintPath>\n    </Reference>\n    <Reference Include=\"System.Web.Helpers\">\n      <HintPath>..\\packages\\Microsoft.AspNet.Webpages.3.0.0\\lib\\net45\\System.Web.Helpers.dll</HintPath>\n    </Reference>\n    <Reference Include=\"System.Web.Mvc\">\n      <HintPath>..\\packages\\Microsoft.AspNet.Mvc.5.0.0\\lib\\net45\\System.Web.Mvc.dll</HintPath>\n    </Reference>\n  </ItemGroup>\n  <ItemGroup>\n    <Content Include=\"Global.asax\" />\n    <None Include=\"Scripts\\jquery-1.10.2.intellisense.js\" />\n    <Content Include=\"Scripts\\jquery-1.10.2.js\" />\n    <Content Include=\"Scripts\\jquery-1.10.2.min.js\" />\n    <None Include=\"Scripts\\jquery.validate-vsdoc.js\" />\n    <Content Include=\"Scripts\\jquery.validate.js\" />\n    <Content Include=\"Scripts\\jquery.validate.min.js\" />\n    <Content Include=\"Scripts\\jquery.validate.unobtrusive.js\" />\n    <Content Include=\"Scripts\\jquery.validate.unobtrusive.min.js\" />\n    <Content Include=\"Web.config\" />\n    <Content Include=\"Scripts\\jquery-1.10.2.min.map\" />\n    <Content Include=\"Views\\Home\\Index.cshtml\" />\n    <Content Include=\"Views\\CatalogBoundedContext\\ItemInBasket.cshtml\" />\n    <Content Include=\"Views\\PricingBoundedContext\\Price.cshtml\" />\n    <Content Include=\"Views\\ShippingBoundedContext\\DeliveryOptions.cshtml\" />\n  </ItemGroup>\n  <ItemGroup>\n    <Compile Include=\"App_Start\\RouteConfig.cs\" />\n    <Compile Include=\"Controllers\\CatalogueBoundedContextController.cs\" />\n    <Compile Include=\"Controllers\\HomeController.cs\" />\n    <Compile Include=\"Controllers\\PricingBoundedContextController.cs\" />\n    <Compile Include=\"Controllers\\ShippingBoundedContextController.cs\" />\n    <Compile Include=\"Global.asax.cs\">\n      <DependentUpon>Global.asax</DependentUpon>\n    </Compile>\n    <Compile Include=\"Properties\\AssemblyInfo.cs\" />\n  </ItemGroup>\n  <ItemGroup>\n    <Content Include=\"Views\\web.config\" />\n    <Content Include=\"packages.config\" />\n    <None Include=\"Web.Debug.config\">\n      <DependentUpon>Web.config</DependentUpon>\n    </None>\n    <None Include=\"Web.Release.config\">\n      <DependentUpon>Web.config</DependentUpon>\n    </None>\n  </ItemGroup>\n  <ItemGroup>\n    <Folder Include=\"App_Data\\\" />\n    <Folder Include=\"Models\\\" />\n  </ItemGroup>\n  <PropertyGroup>\n    <VisualStudioVersion Condition=\"'$(VisualStudioVersion)' == ''\">10.0</VisualStudioVersion>\n    <VSToolsPath Condition=\"'$(VSToolsPath)' == ''\">$(MSBuildExtensionsPath32)\\Microsoft\\VisualStudio\\v$(VisualStudioVersion)</VSToolsPath>\n  </PropertyGroup>\n  <Import Project=\"$(MSBuildBinPath)\\Microsoft.CSharp.targets\" />\n  <Import Project=\"$(VSToolsPath)\\WebApplications\\Microsoft.WebApplication.targets\" Condition=\"'$(VSToolsPath)' != ''\" />\n  <Import Project=\"$(MSBuildExtensionsPath32)\\Microsoft\\VisualStudio\\v10.0\\WebApplications\\Microsoft.WebApplication.targets\" Condition=\"false\" />\n  <ProjectExtensions>\n    <VisualStudio>\n      <FlavorProperties GUID=\"{349c5851-65df-11da-9384-00065b846f21}\">\n        <WebProjectProperties>\n          <UseIIS>True</UseIIS>\n          <AutoAssignPort>True</AutoAssignPort>\n          <DevelopmentServerPort>1150</DevelopmentServerPort>\n          <DevelopmentServerVPath>/</DevelopmentServerVPath>\n          <IISUrl>http://localhost:1150/</IISUrl>\n          <NTLMAuthentication>False</NTLMAuthentication>\n          <UseCustomServer>False</UseCustomServer>\n          <CustomServerUrl>\n          </CustomServerUrl>\n          <SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>\n        </WebProjectProperties>\n      </FlavorProperties>\n    </VisualStudio>\n  </ProjectExtensions>\n  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \n       Other similar extension points exist, see Microsoft.Common.targets.\n  <Target Name=\"BeforeBuild\">\n  </Target>\n  <Target Name=\"AfterBuild\">\n  </Target>\n  -->\n</Project>"
  },
  {
    "path": "23 - Architecting Application User Interfaces/PPPDDD.NonDist.UIComp/PPPDDD.NonDist.UIComp/Properties/AssemblyInfo.cs",
    "content": "﻿using System.Reflection;\r\nusing System.Runtime.CompilerServices;\r\nusing System.Runtime.InteropServices;\r\n\r\n// General Information about an assembly is controlled through the following \r\n// set of attributes. Change these attribute values to modify the information\r\n// associated with an assembly.\r\n[assembly: AssemblyTitle(\"PPPDDD.NonDist.UIComp\")]\r\n[assembly: AssemblyDescription(\"\")]\r\n[assembly: AssemblyConfiguration(\"\")]\r\n[assembly: AssemblyCompany(\"\")]\r\n[assembly: AssemblyProduct(\"PPPDDD.NonDist.UIComp\")]\r\n[assembly: AssemblyCopyright(\"Copyright ©  2014\")]\r\n[assembly: AssemblyTrademark(\"\")]\r\n[assembly: AssemblyCulture(\"\")]\r\n\r\n// Setting ComVisible to false makes the types in this assembly not visible \r\n// to COM components.  If you need to access a type in this assembly from \r\n// COM, set the ComVisible attribute to true on that type.\r\n[assembly: ComVisible(false)]\r\n\r\n// The following GUID is for the ID of the typelib if this project is exposed to COM\r\n[assembly: Guid(\"f732a1bb-34f1-4ec6-b554-75e8d737b17f\")]\r\n\r\n// Version information for an assembly consists of the following four values:\r\n//\r\n//      Major Version\r\n//      Minor Version \r\n//      Build Number\r\n//      Revision\r\n//\r\n// You can specify all the values or you can default the Revision and Build Numbers \r\n// by using the '*' as shown below:\r\n[assembly: AssemblyVersion(\"1.0.0.0\")]\r\n[assembly: AssemblyFileVersion(\"1.0.0.0\")]\r\n"
  },
  {
    "path": "23 - Architecting Application User Interfaces/PPPDDD.NonDist.UIComp/PPPDDD.NonDist.UIComp/Scripts/jquery-1.10.2.intellisense.js",
    "content": "﻿/* NUGET: BEGIN LICENSE TEXT\r\n *\r\n * Microsoft grants you the right to use these script files for the sole\r\n * purpose of either: (i) interacting through your browser with the Microsoft\r\n * website or online service, subject to the applicable licensing or use\r\n * terms; or (ii) using the files as included with a Microsoft product subject\r\n * to that product's license terms. Microsoft reserves all other rights to the\r\n * files not expressly granted by Microsoft, whether by implication, estoppel\r\n * or otherwise. Insofar as a script file is dual licensed under GPL,\r\n * Microsoft neither took the code under GPL nor distributes it thereunder but\r\n * under the terms set out in this paragraph. All notices and licenses\r\n * below are for informational purposes only.\r\n *\r\n * NUGET: END LICENSE TEXT */\r\nintellisense.annotate(jQuery, {\r\n  'ajax': function() {\r\n    /// <signature>\r\n    ///   <summary>Perform an asynchronous HTTP (Ajax) request.</summary>\r\n    ///   <param name=\"url\" type=\"String\">A string containing the URL to which the request is sent.</param>\r\n    ///   <param name=\"settings\" type=\"PlainObject\">A set of key/value pairs that configure the Ajax request. All settings are optional. A default can be set for any option with $.ajaxSetup(). See jQuery.ajax( settings ) below for a complete list of all settings.</param>\r\n    ///   <returns type=\"jqXHR\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Perform an asynchronous HTTP (Ajax) request.</summary>\r\n    ///   <param name=\"settings\" type=\"PlainObject\">A set of key/value pairs that configure the Ajax request. All settings are optional. A default can be set for any option with $.ajaxSetup().</param>\r\n    ///   <returns type=\"jqXHR\" />\r\n    /// </signature>\r\n  },\r\n  'ajaxPrefilter': function() {\r\n    /// <signature>\r\n    ///   <summary>Handle custom Ajax options or modify existing options before each request is sent and before they are processed by $.ajax().</summary>\r\n    ///   <param name=\"dataTypes\" type=\"String\">An optional string containing one or more space-separated dataTypes</param>\r\n    ///   <param name=\"handler(options, originalOptions, jqXHR)\" type=\"Function\">A handler to set default values for future Ajax requests.</param>\r\n    /// </signature>\r\n  },\r\n  'ajaxSetup': function() {\r\n    /// <signature>\r\n    ///   <summary>Set default values for future Ajax requests.</summary>\r\n    ///   <param name=\"options\" type=\"PlainObject\">A set of key/value pairs that configure the default Ajax request. All options are optional.</param>\r\n    /// </signature>\r\n  },\r\n  'ajaxTransport': function() {\r\n    /// <signature>\r\n    ///   <summary>Creates an object that handles the actual transmission of Ajax data.</summary>\r\n    ///   <param name=\"dataType\" type=\"String\">A string identifying the data type to use</param>\r\n    ///   <param name=\"handler(options, originalOptions, jqXHR)\" type=\"Function\">A handler to return the new transport object to use with the data type provided in the first argument.</param>\r\n    /// </signature>\r\n  },\r\n  'boxModel': function() {\r\n    /// <summary>Deprecated in jQuery 1.3 (see jQuery.support). States if the current page, in the user's browser, is being rendered using the W3C CSS Box Model.</summary>\r\n    /// <returns type=\"Boolean\" />\r\n  },\r\n  'browser': function() {\r\n    /// <summary>Contains flags for the useragent, read from navigator.userAgent. We recommend against using this property; please try to use feature detection instead (see jQuery.support). jQuery.browser may be moved to a plugin in a future release of jQuery.</summary>\r\n    /// <returns type=\"PlainObject\" />\r\n  },\r\n  'browser.version': function() {\r\n    /// <summary>The version number of the rendering engine for the user's browser.</summary>\r\n    /// <returns type=\"String\" />\r\n  },\r\n  'Callbacks': function() {\r\n    /// <signature>\r\n    ///   <summary>A multi-purpose callbacks list object that provides a powerful way to manage callback lists.</summary>\r\n    ///   <param name=\"flags\" type=\"String\">An optional list of space-separated flags that change how the callback list behaves.</param>\r\n    ///   <returns type=\"Callbacks\" />\r\n    /// </signature>\r\n  },\r\n  'contains': function() {\r\n    /// <signature>\r\n    ///   <summary>Check to see if a DOM element is a descendant of another DOM element.</summary>\r\n    ///   <param name=\"container\" type=\"Element\">The DOM element that may contain the other element.</param>\r\n    ///   <param name=\"contained\" type=\"Element\">The DOM element that may be contained by (a descendant of) the other element.</param>\r\n    ///   <returns type=\"Boolean\" />\r\n    /// </signature>\r\n  },\r\n  'cssHooks': function() {\r\n    /// <summary>Hook directly into jQuery to override how particular CSS properties are retrieved or set, normalize CSS property naming, or create custom properties.</summary>\r\n    /// <returns type=\"Object\" />\r\n  },\r\n  'data': function() {\r\n    /// <signature>\r\n    ///   <summary>Returns value at named data store for the element, as set by jQuery.data(element, name, value), or the full data store for the element.</summary>\r\n    ///   <param name=\"element\" type=\"Element\">The DOM element to query for the data.</param>\r\n    ///   <param name=\"key\" type=\"String\">Name of the data stored.</param>\r\n    ///   <returns type=\"Object\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Returns value at named data store for the element, as set by jQuery.data(element, name, value), or the full data store for the element.</summary>\r\n    ///   <param name=\"element\" type=\"Element\">The DOM element to query for the data.</param>\r\n    ///   <returns type=\"Object\" />\r\n    /// </signature>\r\n  },\r\n  'Deferred': function() {\r\n    /// <signature>\r\n    ///   <summary>A constructor function that returns a chainable utility object with methods to register multiple callbacks into callback queues, invoke callback queues, and relay the success or failure state of any synchronous or asynchronous function.</summary>\r\n    ///   <param name=\"beforeStart\" type=\"Function\">A function that is called just before the constructor returns.</param>\r\n    ///   <returns type=\"Deferred\" />\r\n    /// </signature>\r\n  },\r\n  'dequeue': function() {\r\n    /// <signature>\r\n    ///   <summary>Execute the next function on the queue for the matched element.</summary>\r\n    ///   <param name=\"element\" type=\"Element\">A DOM element from which to remove and execute a queued function.</param>\r\n    ///   <param name=\"queueName\" type=\"String\">A string containing the name of the queue. Defaults to fx, the standard effects queue.</param>\r\n    /// </signature>\r\n  },\r\n  'each': function() {\r\n    /// <signature>\r\n    ///   <summary>A generic iterator function, which can be used to seamlessly iterate over both objects and arrays. Arrays and array-like objects with a length property (such as a function's arguments object) are iterated by numeric index, from 0 to length-1. Other objects are iterated via their named properties.</summary>\r\n    ///   <param name=\"collection\" type=\"Object\">The object or array to iterate over.</param>\r\n    ///   <param name=\"callback(indexInArray, valueOfElement)\" type=\"Function\">The function that will be executed on every object.</param>\r\n    ///   <returns type=\"Object\" />\r\n    /// </signature>\r\n  },\r\n  'error': function() {\r\n    /// <signature>\r\n    ///   <summary>Takes a string and throws an exception containing it.</summary>\r\n    ///   <param name=\"message\" type=\"String\">The message to send out.</param>\r\n    /// </signature>\r\n  },\r\n  'extend': function() {\r\n    /// <signature>\r\n    ///   <summary>Merge the contents of two or more objects together into the first object.</summary>\r\n    ///   <param name=\"target\" type=\"Object\">An object that will receive the new properties if additional objects are passed in or that will extend the jQuery namespace if it is the sole argument.</param>\r\n    ///   <param name=\"object1\" type=\"Object\">An object containing additional properties to merge in.</param>\r\n    ///   <param name=\"objectN\" type=\"Object\">Additional objects containing properties to merge in.</param>\r\n    ///   <returns type=\"Object\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Merge the contents of two or more objects together into the first object.</summary>\r\n    ///   <param name=\"deep\" type=\"Boolean\">If true, the merge becomes recursive (aka. deep copy).</param>\r\n    ///   <param name=\"target\" type=\"Object\">The object to extend. It will receive the new properties.</param>\r\n    ///   <param name=\"object1\" type=\"Object\">An object containing additional properties to merge in.</param>\r\n    ///   <param name=\"objectN\" type=\"Object\">Additional objects containing properties to merge in.</param>\r\n    ///   <returns type=\"Object\" />\r\n    /// </signature>\r\n  },\r\n  'get': function() {\r\n    /// <signature>\r\n    ///   <summary>Load data from the server using a HTTP GET request.</summary>\r\n    ///   <param name=\"url\" type=\"String\">A string containing the URL to which the request is sent.</param>\r\n    ///   <param name=\"data\" type=\"String\">A plain object or string that is sent to the server with the request.</param>\r\n    ///   <param name=\"success(data, textStatus, jqXHR)\" type=\"Function\">A callback function that is executed if the request succeeds.</param>\r\n    ///   <param name=\"dataType\" type=\"String\">The type of data expected from the server. Default: Intelligent Guess (xml, json, script, or html).</param>\r\n    ///   <returns type=\"jqXHR\" />\r\n    /// </signature>\r\n  },\r\n  'getJSON': function() {\r\n    /// <signature>\r\n    ///   <summary>Load JSON-encoded data from the server using a GET HTTP request.</summary>\r\n    ///   <param name=\"url\" type=\"String\">A string containing the URL to which the request is sent.</param>\r\n    ///   <param name=\"data\" type=\"PlainObject\">A plain object or string that is sent to the server with the request.</param>\r\n    ///   <param name=\"success(data, textStatus, jqXHR)\" type=\"Function\">A callback function that is executed if the request succeeds.</param>\r\n    ///   <returns type=\"jqXHR\" />\r\n    /// </signature>\r\n  },\r\n  'getScript': function() {\r\n    /// <signature>\r\n    ///   <summary>Load a JavaScript file from the server using a GET HTTP request, then execute it.</summary>\r\n    ///   <param name=\"url\" type=\"String\">A string containing the URL to which the request is sent.</param>\r\n    ///   <param name=\"success(script, textStatus, jqXHR)\" type=\"Function\">A callback function that is executed if the request succeeds.</param>\r\n    ///   <returns type=\"jqXHR\" />\r\n    /// </signature>\r\n  },\r\n  'globalEval': function() {\r\n    /// <signature>\r\n    ///   <summary>Execute some JavaScript code globally.</summary>\r\n    ///   <param name=\"code\" type=\"String\">The JavaScript code to execute.</param>\r\n    /// </signature>\r\n  },\r\n  'grep': function() {\r\n    /// <signature>\r\n    ///   <summary>Finds the elements of an array which satisfy a filter function. The original array is not affected.</summary>\r\n    ///   <param name=\"array\" type=\"Array\">The array to search through.</param>\r\n    ///   <param name=\"function(elementOfArray, indexInArray)\" type=\"Function\">The function to process each item against.  The first argument to the function is the item, and the second argument is the index.  The function should return a Boolean value.  this will be the global window object.</param>\r\n    ///   <param name=\"invert\" type=\"Boolean\">If \"invert\" is false, or not provided, then the function returns an array consisting of all elements for which \"callback\" returns true.  If \"invert\" is true, then the function returns an array consisting of all elements for which \"callback\" returns false.</param>\r\n    ///   <returns type=\"Array\" />\r\n    /// </signature>\r\n  },\r\n  'hasData': function() {\r\n    /// <signature>\r\n    ///   <summary>Determine whether an element has any jQuery data associated with it.</summary>\r\n    ///   <param name=\"element\" type=\"Element\">A DOM element to be checked for data.</param>\r\n    ///   <returns type=\"Boolean\" />\r\n    /// </signature>\r\n  },\r\n  'holdReady': function() {\r\n    /// <signature>\r\n    ///   <summary>Holds or releases the execution of jQuery's ready event.</summary>\r\n    ///   <param name=\"hold\" type=\"Boolean\">Indicates whether the ready hold is being requested or released</param>\r\n    /// </signature>\r\n  },\r\n  'inArray': function() {\r\n    /// <signature>\r\n    ///   <summary>Search for a specified value within an array and return its index (or -1 if not found).</summary>\r\n    ///   <param name=\"value\" type=\"Anything\">The value to search for.</param>\r\n    ///   <param name=\"array\" type=\"Array\">An array through which to search.</param>\r\n    ///   <param name=\"fromIndex\" type=\"Number\">The index of the array at which to begin the search. The default is 0, which will search the whole array.</param>\r\n    ///   <returns type=\"Number\" />\r\n    /// </signature>\r\n  },\r\n  'isArray': function() {\r\n    /// <signature>\r\n    ///   <summary>Determine whether the argument is an array.</summary>\r\n    ///   <param name=\"obj\" type=\"Object\">Object to test whether or not it is an array.</param>\r\n    ///   <returns type=\"boolean\" />\r\n    /// </signature>\r\n  },\r\n  'isEmptyObject': function() {\r\n    /// <signature>\r\n    ///   <summary>Check to see if an object is empty (contains no enumerable properties).</summary>\r\n    ///   <param name=\"object\" type=\"Object\">The object that will be checked to see if it's empty.</param>\r\n    ///   <returns type=\"Boolean\" />\r\n    /// </signature>\r\n  },\r\n  'isFunction': function() {\r\n    /// <signature>\r\n    ///   <summary>Determine if the argument passed is a Javascript function object.</summary>\r\n    ///   <param name=\"obj\" type=\"PlainObject\">Object to test whether or not it is a function.</param>\r\n    ///   <returns type=\"boolean\" />\r\n    /// </signature>\r\n  },\r\n  'isNumeric': function() {\r\n    /// <signature>\r\n    ///   <summary>Determines whether its argument is a number.</summary>\r\n    ///   <param name=\"value\" type=\"PlainObject\">The value to be tested.</param>\r\n    ///   <returns type=\"Boolean\" />\r\n    /// </signature>\r\n  },\r\n  'isPlainObject': function() {\r\n    /// <signature>\r\n    ///   <summary>Check to see if an object is a plain object (created using \"{}\" or \"new Object\").</summary>\r\n    ///   <param name=\"object\" type=\"PlainObject\">The object that will be checked to see if it's a plain object.</param>\r\n    ///   <returns type=\"Boolean\" />\r\n    /// </signature>\r\n  },\r\n  'isWindow': function() {\r\n    /// <signature>\r\n    ///   <summary>Determine whether the argument is a window.</summary>\r\n    ///   <param name=\"obj\" type=\"PlainObject\">Object to test whether or not it is a window.</param>\r\n    ///   <returns type=\"boolean\" />\r\n    /// </signature>\r\n  },\r\n  'isXMLDoc': function() {\r\n    /// <signature>\r\n    ///   <summary>Check to see if a DOM node is within an XML document (or is an XML document).</summary>\r\n    ///   <param name=\"node\" type=\"Element\">The DOM node that will be checked to see if it's in an XML document.</param>\r\n    ///   <returns type=\"Boolean\" />\r\n    /// </signature>\r\n  },\r\n  'makeArray': function() {\r\n    /// <signature>\r\n    ///   <summary>Convert an array-like object into a true JavaScript array.</summary>\r\n    ///   <param name=\"obj\" type=\"PlainObject\">Any object to turn into a native Array.</param>\r\n    ///   <returns type=\"Array\" />\r\n    /// </signature>\r\n  },\r\n  'map': function() {\r\n    /// <signature>\r\n    ///   <summary>Translate all items in an array or object to new array of items.</summary>\r\n    ///   <param name=\"array\" type=\"Array\">The Array to translate.</param>\r\n    ///   <param name=\"callback(elementOfArray, indexInArray)\" type=\"Function\">The function to process each item against.  The first argument to the function is the array item, the second argument is the index in array The function can return any value. Within the function, this refers to the global (window) object.</param>\r\n    ///   <returns type=\"Array\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Translate all items in an array or object to new array of items.</summary>\r\n    ///   <param name=\"arrayOrObject\" type=\"Object\">The Array or Object to translate.</param>\r\n    ///   <param name=\"callback( value, indexOrKey )\" type=\"Function\">The function to process each item against.  The first argument to the function is the value; the second argument is the index or key of the array or object property. The function can return any value to add to the array. A returned array will be flattened into the resulting array. Within the function, this refers to the global (window) object.</param>\r\n    ///   <returns type=\"Array\" />\r\n    /// </signature>\r\n  },\r\n  'merge': function() {\r\n    /// <signature>\r\n    ///   <summary>Merge the contents of two arrays together into the first array.</summary>\r\n    ///   <param name=\"first\" type=\"Array\">The first array to merge, the elements of second added.</param>\r\n    ///   <param name=\"second\" type=\"Array\">The second array to merge into the first, unaltered.</param>\r\n    ///   <returns type=\"Array\" />\r\n    /// </signature>\r\n  },\r\n  'noConflict': function() {\r\n    /// <signature>\r\n    ///   <summary>Relinquish jQuery's control of the $ variable.</summary>\r\n    ///   <param name=\"removeAll\" type=\"Boolean\">A Boolean indicating whether to remove all jQuery variables from the global scope (including jQuery itself).</param>\r\n    ///   <returns type=\"Object\" />\r\n    /// </signature>\r\n  },\r\n  'noop': function() {\r\n    /// <summary>An empty function.</summary>\r\n  },\r\n  'now': function() {\r\n    /// <summary>Return a number representing the current time.</summary>\r\n    /// <returns type=\"Number\" />\r\n  },\r\n  'param': function() {\r\n    /// <signature>\r\n    ///   <summary>Create a serialized representation of an array or object, suitable for use in a URL query string or Ajax request.</summary>\r\n    ///   <param name=\"obj\" type=\"Object\">An array or object to serialize.</param>\r\n    ///   <returns type=\"String\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Create a serialized representation of an array or object, suitable for use in a URL query string or Ajax request.</summary>\r\n    ///   <param name=\"obj\" type=\"Object\">An array or object to serialize.</param>\r\n    ///   <param name=\"traditional\" type=\"Boolean\">A Boolean indicating whether to perform a traditional \"shallow\" serialization.</param>\r\n    ///   <returns type=\"String\" />\r\n    /// </signature>\r\n  },\r\n  'parseHTML': function() {\r\n    /// <signature>\r\n    ///   <summary>Parses a string into an array of DOM nodes.</summary>\r\n    ///   <param name=\"data\" type=\"String\">HTML string to be parsed</param>\r\n    ///   <param name=\"context\" type=\"Element\">DOM element to serve as the context in which the HTML fragment will be created</param>\r\n    ///   <param name=\"keepScripts\" type=\"Boolean\">A Boolean indicating whether to include scripts passed in the HTML string</param>\r\n    ///   <returns type=\"Array\" />\r\n    /// </signature>\r\n  },\r\n  'parseJSON': function() {\r\n    /// <signature>\r\n    ///   <summary>Takes a well-formed JSON string and returns the resulting JavaScript object.</summary>\r\n    ///   <param name=\"json\" type=\"String\">The JSON string to parse.</param>\r\n    ///   <returns type=\"Object\" />\r\n    /// </signature>\r\n  },\r\n  'parseXML': function() {\r\n    /// <signature>\r\n    ///   <summary>Parses a string into an XML document.</summary>\r\n    ///   <param name=\"data\" type=\"String\">a well-formed XML string to be parsed</param>\r\n    ///   <returns type=\"XMLDocument\" />\r\n    /// </signature>\r\n  },\r\n  'post': function() {\r\n    /// <signature>\r\n    ///   <summary>Load data from the server using a HTTP POST request.</summary>\r\n    ///   <param name=\"url\" type=\"String\">A string containing the URL to which the request is sent.</param>\r\n    ///   <param name=\"data\" type=\"String\">A plain object or string that is sent to the server with the request.</param>\r\n    ///   <param name=\"success(data, textStatus, jqXHR)\" type=\"Function\">A callback function that is executed if the request succeeds.</param>\r\n    ///   <param name=\"dataType\" type=\"String\">The type of data expected from the server. Default: Intelligent Guess (xml, json, script, text, html).</param>\r\n    ///   <returns type=\"jqXHR\" />\r\n    /// </signature>\r\n  },\r\n  'proxy': function() {\r\n    /// <signature>\r\n    ///   <summary>Takes a function and returns a new one that will always have a particular context.</summary>\r\n    ///   <param name=\"function\" type=\"Function\">The function whose context will be changed.</param>\r\n    ///   <param name=\"context\" type=\"PlainObject\">The object to which the context (this) of the function should be set.</param>\r\n    ///   <returns type=\"Function\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Takes a function and returns a new one that will always have a particular context.</summary>\r\n    ///   <param name=\"context\" type=\"PlainObject\">The object to which the context of the function should be set.</param>\r\n    ///   <param name=\"name\" type=\"String\">The name of the function whose context will be changed (should be a property of the context object).</param>\r\n    ///   <returns type=\"Function\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Takes a function and returns a new one that will always have a particular context.</summary>\r\n    ///   <param name=\"function\" type=\"Function\">The function whose context will be changed.</param>\r\n    ///   <param name=\"context\" type=\"PlainObject\">The object to which the context (this) of the function should be set.</param>\r\n    ///   <param name=\"additionalArguments\" type=\"Anything\">Any number of arguments to be passed to the function referenced in the function argument.</param>\r\n    ///   <returns type=\"Function\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Takes a function and returns a new one that will always have a particular context.</summary>\r\n    ///   <param name=\"context\" type=\"PlainObject\">The object to which the context of the function should be set.</param>\r\n    ///   <param name=\"name\" type=\"String\">The name of the function whose context will be changed (should be a property of the context object).</param>\r\n    ///   <param name=\"additionalArguments\" type=\"Anything\">Any number of arguments to be passed to the function named in the name argument.</param>\r\n    ///   <returns type=\"Function\" />\r\n    /// </signature>\r\n  },\r\n  'queue': function() {\r\n    /// <signature>\r\n    ///   <summary>Manipulate the queue of functions to be executed on the matched element.</summary>\r\n    ///   <param name=\"element\" type=\"Element\">A DOM element where the array of queued functions is attached.</param>\r\n    ///   <param name=\"queueName\" type=\"String\">A string containing the name of the queue. Defaults to fx, the standard effects queue.</param>\r\n    ///   <param name=\"newQueue\" type=\"Array\">An array of functions to replace the current queue contents.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Manipulate the queue of functions to be executed on the matched element.</summary>\r\n    ///   <param name=\"element\" type=\"Element\">A DOM element on which to add a queued function.</param>\r\n    ///   <param name=\"queueName\" type=\"String\">A string containing the name of the queue. Defaults to fx, the standard effects queue.</param>\r\n    ///   <param name=\"callback()\" type=\"Function\">The new function to add to the queue.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'removeData': function() {\r\n    /// <signature>\r\n    ///   <summary>Remove a previously-stored piece of data.</summary>\r\n    ///   <param name=\"element\" type=\"Element\">A DOM element from which to remove data.</param>\r\n    ///   <param name=\"name\" type=\"String\">A string naming the piece of data to remove.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'sub': function() {\r\n    /// <summary>Creates a new copy of jQuery whose properties and methods can be modified without affecting the original jQuery object.</summary>\r\n    /// <returns type=\"jQuery\" />\r\n  },\r\n  'support': function() {\r\n    /// <summary>A collection of properties that represent the presence of different browser features or bugs. Primarily intended for jQuery's internal use; specific properties may be removed when they are no longer needed internally to improve page startup performance.</summary>\r\n    /// <returns type=\"Object\" />\r\n  },\r\n  'trim': function() {\r\n    /// <signature>\r\n    ///   <summary>Remove the whitespace from the beginning and end of a string.</summary>\r\n    ///   <param name=\"str\" type=\"String\">The string to trim.</param>\r\n    ///   <returns type=\"String\" />\r\n    /// </signature>\r\n  },\r\n  'type': function() {\r\n    /// <signature>\r\n    ///   <summary>Determine the internal JavaScript [[Class]] of an object.</summary>\r\n    ///   <param name=\"obj\" type=\"PlainObject\">Object to get the internal JavaScript [[Class]] of.</param>\r\n    ///   <returns type=\"String\" />\r\n    /// </signature>\r\n  },\r\n  'unique': function() {\r\n    /// <signature>\r\n    ///   <summary>Sorts an array of DOM elements, in place, with the duplicates removed. Note that this only works on arrays of DOM elements, not strings or numbers.</summary>\r\n    ///   <param name=\"array\" type=\"Array\">The Array of DOM elements.</param>\r\n    ///   <returns type=\"Array\" />\r\n    /// </signature>\r\n  },\r\n  'when': function() {\r\n    /// <signature>\r\n    ///   <summary>Provides a way to execute callback functions based on one or more objects, usually Deferred objects that represent asynchronous events.</summary>\r\n    ///   <param name=\"deferreds\" type=\"Deferred\">One or more Deferred objects, or plain JavaScript objects.</param>\r\n    ///   <returns type=\"Promise\" />\r\n    /// </signature>\r\n  },\r\n});\r\n\r\nvar _1228819969 = jQuery.Callbacks;\r\njQuery.Callbacks = function(flags) {\r\nvar _object = _1228819969(flags);\r\nintellisense.annotate(_object, {\r\n  'add': function() {\r\n    /// <signature>\r\n    ///   <summary>Add a callback or a collection of callbacks to a callback list.</summary>\r\n    ///   <param name=\"callbacks\" type=\"Array\">A function, or array of functions, that are to be added to the callback list.</param>\r\n    ///   <returns type=\"Callbacks\" />\r\n    /// </signature>\r\n  },\r\n  'disable': function() {\r\n    /// <summary>Disable a callback list from doing anything more.</summary>\r\n    /// <returns type=\"Callbacks\" />\r\n  },\r\n  'disabled': function() {\r\n    /// <summary>Determine if the callbacks list has been disabled.</summary>\r\n    /// <returns type=\"Boolean\" />\r\n  },\r\n  'empty': function() {\r\n    /// <summary>Remove all of the callbacks from a list.</summary>\r\n    /// <returns type=\"Callbacks\" />\r\n  },\r\n  'fire': function() {\r\n    /// <signature>\r\n    ///   <summary>Call all of the callbacks with the given arguments</summary>\r\n    ///   <param name=\"arguments\" type=\"Anything\">The argument or list of arguments to pass back to the callback list.</param>\r\n    ///   <returns type=\"Callbacks\" />\r\n    /// </signature>\r\n  },\r\n  'fired': function() {\r\n    /// <summary>Determine if the callbacks have already been called at least once.</summary>\r\n    /// <returns type=\"Boolean\" />\r\n  },\r\n  'fireWith': function() {\r\n    /// <signature>\r\n    ///   <summary>Call all callbacks in a list with the given context and arguments.</summary>\r\n    ///   <param name=\"context\" type=\"\">A reference to the context in which the callbacks in the list should be fired.</param>\r\n    ///   <param name=\"args\" type=\"\">An argument, or array of arguments, to pass to the callbacks in the list.</param>\r\n    ///   <returns type=\"Callbacks\" />\r\n    /// </signature>\r\n  },\r\n  'has': function() {\r\n    /// <signature>\r\n    ///   <summary>Determine whether a supplied callback is in a list</summary>\r\n    ///   <param name=\"callback\" type=\"Function\">The callback to search for.</param>\r\n    ///   <returns type=\"Boolean\" />\r\n    /// </signature>\r\n  },\r\n  'lock': function() {\r\n    /// <summary>Lock a callback list in its current state.</summary>\r\n    /// <returns type=\"Callbacks\" />\r\n  },\r\n  'locked': function() {\r\n    /// <summary>Determine if the callbacks list has been locked.</summary>\r\n    /// <returns type=\"Boolean\" />\r\n  },\r\n  'remove': function() {\r\n    /// <signature>\r\n    ///   <summary>Remove a callback or a collection of callbacks from a callback list.</summary>\r\n    ///   <param name=\"callbacks\" type=\"Array\">A function, or array of functions, that are to be removed from the callback list.</param>\r\n    ///   <returns type=\"Callbacks\" />\r\n    /// </signature>\r\n  },\r\n});\r\n\r\nreturn _object;\r\n};\r\nintellisense.redirectDefinition(jQuery.Callbacks, _1228819969);\r\n\r\nvar _731531622 = jQuery.Deferred;\r\njQuery.Deferred = function(func) {\r\nvar _object = _731531622(func);\r\nintellisense.annotate(_object, {\r\n  'always': function() {\r\n    /// <signature>\r\n    ///   <summary>Add handlers to be called when the Deferred object is either resolved or rejected.</summary>\r\n    ///   <param name=\"alwaysCallbacks\" type=\"Function\">A function, or array of functions, that is called when the Deferred is resolved or rejected.</param>\r\n    ///   <param name=\"alwaysCallbacks\" type=\"Function\">Optional additional functions, or arrays of functions, that are called when the Deferred is resolved or rejected.</param>\r\n    ///   <returns type=\"Deferred\" />\r\n    /// </signature>\r\n  },\r\n  'done': function() {\r\n    /// <signature>\r\n    ///   <summary>Add handlers to be called when the Deferred object is resolved.</summary>\r\n    ///   <param name=\"doneCallbacks\" type=\"Function\">A function, or array of functions, that are called when the Deferred is resolved.</param>\r\n    ///   <param name=\"doneCallbacks\" type=\"Function\">Optional additional functions, or arrays of functions, that are called when the Deferred is resolved.</param>\r\n    ///   <returns type=\"Deferred\" />\r\n    /// </signature>\r\n  },\r\n  'fail': function() {\r\n    /// <signature>\r\n    ///   <summary>Add handlers to be called when the Deferred object is rejected.</summary>\r\n    ///   <param name=\"failCallbacks\" type=\"Function\">A function, or array of functions, that are called when the Deferred is rejected.</param>\r\n    ///   <param name=\"failCallbacks\" type=\"Function\">Optional additional functions, or arrays of functions, that are called when the Deferred is rejected.</param>\r\n    ///   <returns type=\"Deferred\" />\r\n    /// </signature>\r\n  },\r\n  'isRejected': function() {\r\n    /// <summary>Determine whether a Deferred object has been rejected.</summary>\r\n    /// <returns type=\"Boolean\" />\r\n  },\r\n  'isResolved': function() {\r\n    /// <summary>Determine whether a Deferred object has been resolved.</summary>\r\n    /// <returns type=\"Boolean\" />\r\n  },\r\n  'notify': function() {\r\n    /// <signature>\r\n    ///   <summary>Call the progressCallbacks on a Deferred object with the given args.</summary>\r\n    ///   <param name=\"args\" type=\"Object\">Optional arguments that are passed to the progressCallbacks.</param>\r\n    ///   <returns type=\"Deferred\" />\r\n    /// </signature>\r\n  },\r\n  'notifyWith': function() {\r\n    /// <signature>\r\n    ///   <summary>Call the progressCallbacks on a Deferred object with the given context and args.</summary>\r\n    ///   <param name=\"context\" type=\"Object\">Context passed to the progressCallbacks as the this object.</param>\r\n    ///   <param name=\"args\" type=\"Object\">Optional arguments that are passed to the progressCallbacks.</param>\r\n    ///   <returns type=\"Deferred\" />\r\n    /// </signature>\r\n  },\r\n  'pipe': function() {\r\n    /// <signature>\r\n    ///   <summary>Utility method to filter and/or chain Deferreds.</summary>\r\n    ///   <param name=\"doneFilter\" type=\"Function\">An optional function that is called when the Deferred is resolved.</param>\r\n    ///   <param name=\"failFilter\" type=\"Function\">An optional function that is called when the Deferred is rejected.</param>\r\n    ///   <returns type=\"Promise\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Utility method to filter and/or chain Deferreds.</summary>\r\n    ///   <param name=\"doneFilter\" type=\"Function\">An optional function that is called when the Deferred is resolved.</param>\r\n    ///   <param name=\"failFilter\" type=\"Function\">An optional function that is called when the Deferred is rejected.</param>\r\n    ///   <param name=\"progressFilter\" type=\"Function\">An optional function that is called when progress notifications are sent to the Deferred.</param>\r\n    ///   <returns type=\"Promise\" />\r\n    /// </signature>\r\n  },\r\n  'progress': function() {\r\n    /// <signature>\r\n    ///   <summary>Add handlers to be called when the Deferred object generates progress notifications.</summary>\r\n    ///   <param name=\"progressCallbacks\" type=\"Function\">A function, or array of functions, that is called when the Deferred generates progress notifications.</param>\r\n    ///   <returns type=\"Deferred\" />\r\n    /// </signature>\r\n  },\r\n  'promise': function() {\r\n    /// <signature>\r\n    ///   <summary>Return a Deferred's Promise object.</summary>\r\n    ///   <param name=\"target\" type=\"Object\">Object onto which the promise methods have to be attached</param>\r\n    ///   <returns type=\"Promise\" />\r\n    /// </signature>\r\n  },\r\n  'reject': function() {\r\n    /// <signature>\r\n    ///   <summary>Reject a Deferred object and call any failCallbacks with the given args.</summary>\r\n    ///   <param name=\"args\" type=\"Object\">Optional arguments that are passed to the failCallbacks.</param>\r\n    ///   <returns type=\"Deferred\" />\r\n    /// </signature>\r\n  },\r\n  'rejectWith': function() {\r\n    /// <signature>\r\n    ///   <summary>Reject a Deferred object and call any failCallbacks with the given context and args.</summary>\r\n    ///   <param name=\"context\" type=\"Object\">Context passed to the failCallbacks as the this object.</param>\r\n    ///   <param name=\"args\" type=\"Array\">An optional array of arguments that are passed to the failCallbacks.</param>\r\n    ///   <returns type=\"Deferred\" />\r\n    /// </signature>\r\n  },\r\n  'resolve': function() {\r\n    /// <signature>\r\n    ///   <summary>Resolve a Deferred object and call any doneCallbacks with the given args.</summary>\r\n    ///   <param name=\"args\" type=\"Object\">Optional arguments that are passed to the doneCallbacks.</param>\r\n    ///   <returns type=\"Deferred\" />\r\n    /// </signature>\r\n  },\r\n  'resolveWith': function() {\r\n    /// <signature>\r\n    ///   <summary>Resolve a Deferred object and call any doneCallbacks with the given context and args.</summary>\r\n    ///   <param name=\"context\" type=\"Object\">Context passed to the doneCallbacks as the this object.</param>\r\n    ///   <param name=\"args\" type=\"Array\">An optional array of arguments that are passed to the doneCallbacks.</param>\r\n    ///   <returns type=\"Deferred\" />\r\n    /// </signature>\r\n  },\r\n  'state': function() {\r\n    /// <summary>Determine the current state of a Deferred object.</summary>\r\n    /// <returns type=\"String\" />\r\n  },\r\n  'then': function() {\r\n    /// <signature>\r\n    ///   <summary>Add handlers to be called when the Deferred object is resolved, rejected, or still in progress.</summary>\r\n    ///   <param name=\"doneFilter\" type=\"Function\">A function that is called when the Deferred is resolved.</param>\r\n    ///   <param name=\"failFilter\" type=\"Function\">An optional function that is called when the Deferred is rejected.</param>\r\n    ///   <param name=\"progressFilter\" type=\"Function\">An optional function that is called when progress notifications are sent to the Deferred.</param>\r\n    ///   <returns type=\"Promise\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Add handlers to be called when the Deferred object is resolved, rejected, or still in progress.</summary>\r\n    ///   <param name=\"doneCallbacks\" type=\"Function\">A function, or array of functions, called when the Deferred is resolved.</param>\r\n    ///   <param name=\"failCallbacks\" type=\"Function\">A function, or array of functions, called when the Deferred is rejected.</param>\r\n    ///   <returns type=\"Promise\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Add handlers to be called when the Deferred object is resolved, rejected, or still in progress.</summary>\r\n    ///   <param name=\"doneCallbacks\" type=\"Function\">A function, or array of functions, called when the Deferred is resolved.</param>\r\n    ///   <param name=\"failCallbacks\" type=\"Function\">A function, or array of functions, called when the Deferred is rejected.</param>\r\n    ///   <param name=\"progressCallbacks\" type=\"Function\">A function, or array of functions, called when the Deferred notifies progress.</param>\r\n    ///   <returns type=\"Promise\" />\r\n    /// </signature>\r\n  },\r\n});\r\n\r\nreturn _object;\r\n};\r\nintellisense.redirectDefinition(jQuery.Callbacks, _731531622);\r\n\r\nintellisense.annotate(jQuery.Event.prototype, {\r\n  'currentTarget': function() {\r\n    /// <summary>The current DOM element within the event bubbling phase.</summary>\r\n    /// <returns type=\"Element\" />\r\n  },\r\n  'data': function() {\r\n    /// <summary>An optional object of data passed to an event method when the current executing handler is bound.</summary>\r\n    /// <returns type=\"Object\" />\r\n  },\r\n  'delegateTarget': function() {\r\n    /// <summary>The element where the currently-called jQuery event handler was attached.</summary>\r\n    /// <returns type=\"Element\" />\r\n  },\r\n  'isDefaultPrevented': function() {\r\n    /// <summary>Returns whether event.preventDefault() was ever called on this event object.</summary>\r\n    /// <returns type=\"Boolean\" />\r\n  },\r\n  'isImmediatePropagationStopped': function() {\r\n    /// <summary>Returns whether event.stopImmediatePropagation() was ever called on this event object.</summary>\r\n    /// <returns type=\"Boolean\" />\r\n  },\r\n  'isPropagationStopped': function() {\r\n    /// <summary>Returns whether event.stopPropagation() was ever called on this event object.</summary>\r\n    /// <returns type=\"Boolean\" />\r\n  },\r\n  'metaKey': function() {\r\n    /// <summary>Indicates whether the META key was pressed when the event fired.</summary>\r\n    /// <returns type=\"Boolean\" />\r\n  },\r\n  'namespace': function() {\r\n    /// <summary>The namespace specified when the event was triggered.</summary>\r\n    /// <returns type=\"String\" />\r\n  },\r\n  'pageX': function() {\r\n    /// <summary>The mouse position relative to the left edge of the document.</summary>\r\n    /// <returns type=\"Number\" />\r\n  },\r\n  'pageY': function() {\r\n    /// <summary>The mouse position relative to the top edge of the document.</summary>\r\n    /// <returns type=\"Number\" />\r\n  },\r\n  'preventDefault': function() {\r\n    /// <summary>If this method is called, the default action of the event will not be triggered.</summary>\r\n  },\r\n  'relatedTarget': function() {\r\n    /// <summary>The other DOM element involved in the event, if any.</summary>\r\n    /// <returns type=\"Element\" />\r\n  },\r\n  'result': function() {\r\n    /// <summary>The last value returned by an event handler that was triggered by this event, unless the value was undefined.</summary>\r\n    /// <returns type=\"Object\" />\r\n  },\r\n  'stopImmediatePropagation': function() {\r\n    /// <summary>Keeps the rest of the handlers from being executed and prevents the event from bubbling up the DOM tree.</summary>\r\n  },\r\n  'stopPropagation': function() {\r\n    /// <summary>Prevents the event from bubbling up the DOM tree, preventing any parent handlers from being notified of the event.</summary>\r\n  },\r\n  'target': function() {\r\n    /// <summary>The DOM element that initiated the event.</summary>\r\n    /// <returns type=\"Element\" />\r\n  },\r\n  'timeStamp': function() {\r\n    /// <summary>The difference in milliseconds between the time the browser created the event and January 1, 1970.</summary>\r\n    /// <returns type=\"Number\" />\r\n  },\r\n  'type': function() {\r\n    /// <summary>Describes the nature of the event.</summary>\r\n    /// <returns type=\"String\" />\r\n  },\r\n  'which': function() {\r\n    /// <summary>For key or mouse events, this property indicates the specific key or button that was pressed.</summary>\r\n    /// <returns type=\"Number\" />\r\n  },\r\n});\r\n\r\nintellisense.annotate(jQuery.fn, {\r\n  'add': function() {\r\n    /// <signature>\r\n    ///   <summary>Add elements to the set of matched elements.</summary>\r\n    ///   <param name=\"selector\" type=\"String\">A string representing a selector expression to find additional elements to add to the set of matched elements.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Add elements to the set of matched elements.</summary>\r\n    ///   <param name=\"elements\" type=\"Array\">One or more elements to add to the set of matched elements.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Add elements to the set of matched elements.</summary>\r\n    ///   <param name=\"html\" type=\"String\">An HTML fragment to add to the set of matched elements.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Add elements to the set of matched elements.</summary>\r\n    ///   <param name=\"jQuery object\" type=\"jQuery object \">An existing jQuery object to add to the set of matched elements.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Add elements to the set of matched elements.</summary>\r\n    ///   <param name=\"selector\" type=\"String\">A string representing a selector expression to find additional elements to add to the set of matched elements.</param>\r\n    ///   <param name=\"context\" type=\"Element\">The point in the document at which the selector should begin matching; similar to the context argument of the $(selector, context) method.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'addBack': function() {\r\n    /// <signature>\r\n    ///   <summary>Add the previous set of elements on the stack to the current set, optionally filtered by a selector.</summary>\r\n    ///   <param name=\"selector\" type=\"String\">A string containing a selector expression to match the current set of elements against.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'addClass': function() {\r\n    /// <signature>\r\n    ///   <summary>Adds the specified class(es) to each of the set of matched elements.</summary>\r\n    ///   <param name=\"className\" type=\"String\">One or more space-separated classes to be added to the class attribute of each matched element.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Adds the specified class(es) to each of the set of matched elements.</summary>\r\n    ///   <param name=\"function(index, currentClass)\" type=\"Function\">A function returning one or more space-separated class names to be added to the existing class name(s). Receives the index position of the element in the set and the existing class name(s) as arguments. Within the function, this refers to the current element in the set.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'after': function() {\r\n    /// <signature>\r\n    ///   <summary>Insert content, specified by the parameter, after each element in the set of matched elements.</summary>\r\n    ///   <param name=\"content\" type=\"jQuery\">HTML string, DOM element, or jQuery object to insert after each element in the set of matched elements.</param>\r\n    ///   <param name=\"content\" type=\"jQuery\">One or more additional DOM elements, arrays of elements, HTML strings, or jQuery objects to insert after each element in the set of matched elements.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Insert content, specified by the parameter, after each element in the set of matched elements.</summary>\r\n    ///   <param name=\"function(index)\" type=\"Function\">A function that returns an HTML string, DOM element(s), or jQuery object to insert after each element in the set of matched elements. Receives the index position of the element in the set as an argument. Within the function, this refers to the current element in the set.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'ajaxComplete': function() {\r\n    /// <signature>\r\n    ///   <summary>Register a handler to be called when Ajax requests complete. This is an AjaxEvent.</summary>\r\n    ///   <param name=\"handler(event, XMLHttpRequest, ajaxOptions)\" type=\"Function\">The function to be invoked.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'ajaxError': function() {\r\n    /// <signature>\r\n    ///   <summary>Register a handler to be called when Ajax requests complete with an error. This is an Ajax Event.</summary>\r\n    ///   <param name=\"handler(event, jqXHR, ajaxSettings, thrownError)\" type=\"Function\">The function to be invoked.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'ajaxSend': function() {\r\n    /// <signature>\r\n    ///   <summary>Attach a function to be executed before an Ajax request is sent. This is an Ajax Event.</summary>\r\n    ///   <param name=\"handler(event, jqXHR, ajaxOptions)\" type=\"Function\">The function to be invoked.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'ajaxStart': function() {\r\n    /// <signature>\r\n    ///   <summary>Register a handler to be called when the first Ajax request begins. This is an Ajax Event.</summary>\r\n    ///   <param name=\"handler()\" type=\"Function\">The function to be invoked.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'ajaxStop': function() {\r\n    /// <signature>\r\n    ///   <summary>Register a handler to be called when all Ajax requests have completed. This is an Ajax Event.</summary>\r\n    ///   <param name=\"handler()\" type=\"Function\">The function to be invoked.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'ajaxSuccess': function() {\r\n    /// <signature>\r\n    ///   <summary>Attach a function to be executed whenever an Ajax request completes successfully. This is an Ajax Event.</summary>\r\n    ///   <param name=\"handler(event, XMLHttpRequest, ajaxOptions)\" type=\"Function\">The function to be invoked.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'all': function() {\r\n    /// <summary>Selects all elements.</summary>\r\n  },\r\n  'andSelf': function() {\r\n    /// <summary>Add the previous set of elements on the stack to the current set.</summary>\r\n    /// <returns type=\"jQuery\" />\r\n  },\r\n  'animate': function() {\r\n    /// <signature>\r\n    ///   <summary>Perform a custom animation of a set of CSS properties.</summary>\r\n    ///   <param name=\"properties\" type=\"PlainObject\">An object of CSS properties and values that the animation will move toward.</param>\r\n    ///   <param name=\"duration\" type=\"\">A string or number determining how long the animation will run.</param>\r\n    ///   <param name=\"easing\" type=\"String\">A string indicating which easing function to use for the transition.</param>\r\n    ///   <param name=\"complete\" type=\"Function\">A function to call once the animation is complete.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Perform a custom animation of a set of CSS properties.</summary>\r\n    ///   <param name=\"properties\" type=\"PlainObject\">An object of CSS properties and values that the animation will move toward.</param>\r\n    ///   <param name=\"options\" type=\"PlainObject\">A map of additional options to pass to the method.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'animated': function() {\r\n    /// <summary>Select all elements that are in the progress of an animation at the time the selector is run.</summary>\r\n  },\r\n  'append': function() {\r\n    /// <signature>\r\n    ///   <summary>Insert content, specified by the parameter, to the end of each element in the set of matched elements.</summary>\r\n    ///   <param name=\"content\" type=\"jQuery\">DOM element, HTML string, or jQuery object to insert at the end of each element in the set of matched elements.</param>\r\n    ///   <param name=\"content\" type=\"jQuery\">One or more additional DOM elements, arrays of elements, HTML strings, or jQuery objects to insert at the end of each element in the set of matched elements.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Insert content, specified by the parameter, to the end of each element in the set of matched elements.</summary>\r\n    ///   <param name=\"function(index, html)\" type=\"Function\">A function that returns an HTML string, DOM element(s), or jQuery object to insert at the end of each element in the set of matched elements. Receives the index position of the element in the set and the old HTML value of the element as arguments. Within the function, this refers to the current element in the set.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'appendTo': function() {\r\n    /// <signature>\r\n    ///   <summary>Insert every element in the set of matched elements to the end of the target.</summary>\r\n    ///   <param name=\"target\" type=\"jQuery\">A selector, element, HTML string, or jQuery object; the matched set of elements will be inserted at the end of the element(s) specified by this parameter.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'attr': function() {\r\n    /// <signature>\r\n    ///   <summary>Set one or more attributes for the set of matched elements.</summary>\r\n    ///   <param name=\"attributeName\" type=\"String\">The name of the attribute to set.</param>\r\n    ///   <param name=\"value\" type=\"Number\">A value to set for the attribute.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Set one or more attributes for the set of matched elements.</summary>\r\n    ///   <param name=\"attributes\" type=\"PlainObject\">An object of attribute-value pairs to set.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Set one or more attributes for the set of matched elements.</summary>\r\n    ///   <param name=\"attributeName\" type=\"String\">The name of the attribute to set.</param>\r\n    ///   <param name=\"function(index, attr)\" type=\"Function\">A function returning the value to set. this is the current element. Receives the index position of the element in the set and the old attribute value as arguments.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'attributeContains': function() {\r\n    /// <signature>\r\n    ///   <summary>Selects elements that have the specified attribute with a value containing the a given substring.</summary>\r\n    ///   <param name=\"attribute\" type=\"String\">An attribute name.</param>\r\n    ///   <param name=\"value\" type=\"String\">An attribute value. Can be either an unquoted single word or a quoted string.</param>\r\n    /// </signature>\r\n  },\r\n  'attributeContainsPrefix': function() {\r\n    /// <signature>\r\n    ///   <summary>Selects elements that have the specified attribute with a value either equal to a given string or starting with that string followed by a hyphen (-).</summary>\r\n    ///   <param name=\"attribute\" type=\"String\">An attribute name.</param>\r\n    ///   <param name=\"value\" type=\"String\">An attribute value. Can be either an unquoted single word or a quoted string.</param>\r\n    /// </signature>\r\n  },\r\n  'attributeContainsWord': function() {\r\n    /// <signature>\r\n    ///   <summary>Selects elements that have the specified attribute with a value containing a given word, delimited by spaces.</summary>\r\n    ///   <param name=\"attribute\" type=\"String\">An attribute name.</param>\r\n    ///   <param name=\"value\" type=\"String\">An attribute value. Can be either an unquoted single word or a quoted string.</param>\r\n    /// </signature>\r\n  },\r\n  'attributeEndsWith': function() {\r\n    /// <signature>\r\n    ///   <summary>Selects elements that have the specified attribute with a value ending exactly with a given string. The comparison is case sensitive.</summary>\r\n    ///   <param name=\"attribute\" type=\"String\">An attribute name.</param>\r\n    ///   <param name=\"value\" type=\"String\">An attribute value. Can be either an unquoted single word or a quoted string.</param>\r\n    /// </signature>\r\n  },\r\n  'attributeEquals': function() {\r\n    /// <signature>\r\n    ///   <summary>Selects elements that have the specified attribute with a value exactly equal to a certain value.</summary>\r\n    ///   <param name=\"attribute\" type=\"String\">An attribute name.</param>\r\n    ///   <param name=\"value\" type=\"String\">An attribute value. Can be either an unquoted single word or a quoted string.</param>\r\n    /// </signature>\r\n  },\r\n  'attributeHas': function() {\r\n    /// <signature>\r\n    ///   <summary>Selects elements that have the specified attribute, with any value.</summary>\r\n    ///   <param name=\"attribute\" type=\"String\">An attribute name.</param>\r\n    /// </signature>\r\n  },\r\n  'attributeMultiple': function() {\r\n    /// <signature>\r\n    ///   <summary>Matches elements that match all of the specified attribute filters.</summary>\r\n    ///   <param name=\"attributeFilter1\" type=\"String\">An attribute filter.</param>\r\n    ///   <param name=\"attributeFilter2\" type=\"String\">Another attribute filter, reducing the selection even more</param>\r\n    ///   <param name=\"attributeFilterN\" type=\"String\">As many more attribute filters as necessary</param>\r\n    /// </signature>\r\n  },\r\n  'attributeNotEqual': function() {\r\n    /// <signature>\r\n    ///   <summary>Select elements that either don't have the specified attribute, or do have the specified attribute but not with a certain value.</summary>\r\n    ///   <param name=\"attribute\" type=\"String\">An attribute name.</param>\r\n    ///   <param name=\"value\" type=\"String\">An attribute value. Can be either an unquoted single word or a quoted string.</param>\r\n    /// </signature>\r\n  },\r\n  'attributeStartsWith': function() {\r\n    /// <signature>\r\n    ///   <summary>Selects elements that have the specified attribute with a value beginning exactly with a given string.</summary>\r\n    ///   <param name=\"attribute\" type=\"String\">An attribute name.</param>\r\n    ///   <param name=\"value\" type=\"String\">An attribute value. Can be either an unquoted single word or a quoted string.</param>\r\n    /// </signature>\r\n  },\r\n  'before': function() {\r\n    /// <signature>\r\n    ///   <summary>Insert content, specified by the parameter, before each element in the set of matched elements.</summary>\r\n    ///   <param name=\"content\" type=\"jQuery\">HTML string, DOM element, or jQuery object to insert before each element in the set of matched elements.</param>\r\n    ///   <param name=\"content\" type=\"jQuery\">One or more additional DOM elements, arrays of elements, HTML strings, or jQuery objects to insert before each element in the set of matched elements.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Insert content, specified by the parameter, before each element in the set of matched elements.</summary>\r\n    ///   <param name=\"function\" type=\"Function\">A function that returns an HTML string, DOM element(s), or jQuery object to insert before each element in the set of matched elements. Receives the index position of the element in the set as an argument. Within the function, this refers to the current element in the set.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'bind': function() {\r\n    /// <signature>\r\n    ///   <summary>Attach a handler to an event for the elements.</summary>\r\n    ///   <param name=\"eventType\" type=\"String\">A string containing one or more DOM event types, such as \"click\" or \"submit,\" or custom event names.</param>\r\n    ///   <param name=\"eventData\" type=\"Object\">An object containing data that will be passed to the event handler.</param>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Attach a handler to an event for the elements.</summary>\r\n    ///   <param name=\"eventType\" type=\"String\">A string containing one or more DOM event types, such as \"click\" or \"submit,\" or custom event names.</param>\r\n    ///   <param name=\"eventData\" type=\"Object\">An object containing data that will be passed to the event handler.</param>\r\n    ///   <param name=\"preventBubble\" type=\"Boolean\">Setting the third argument to false will attach a function that prevents the default action from occurring and stops the event from bubbling. The default is true.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Attach a handler to an event for the elements.</summary>\r\n    ///   <param name=\"events\" type=\"Object\">An object containing one or more DOM event types and functions to execute for them.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'blur': function() {\r\n    /// <signature>\r\n    ///   <summary>Bind an event handler to the \"blur\" JavaScript event, or trigger that event on an element.</summary>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Bind an event handler to the \"blur\" JavaScript event, or trigger that event on an element.</summary>\r\n    ///   <param name=\"eventData\" type=\"Object\">An object containing data that will be passed to the event handler.</param>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'button': function() {\r\n    /// <summary>Selects all button elements and elements of type button.</summary>\r\n  },\r\n  'change': function() {\r\n    /// <signature>\r\n    ///   <summary>Bind an event handler to the \"change\" JavaScript event, or trigger that event on an element.</summary>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Bind an event handler to the \"change\" JavaScript event, or trigger that event on an element.</summary>\r\n    ///   <param name=\"eventData\" type=\"Object\">An object containing data that will be passed to the event handler.</param>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'checkbox': function() {\r\n    /// <summary>Selects all elements of type checkbox.</summary>\r\n  },\r\n  'checked': function() {\r\n    /// <summary>Matches all elements that are checked.</summary>\r\n  },\r\n  'child': function() {\r\n    /// <signature>\r\n    ///   <summary>Selects all direct child elements specified by \"child\" of elements specified by \"parent\".</summary>\r\n    ///   <param name=\"parent\" type=\"String\">Any valid selector.</param>\r\n    ///   <param name=\"child\" type=\"String\">A selector to filter the child elements.</param>\r\n    /// </signature>\r\n  },\r\n  'children': function() {\r\n    /// <signature>\r\n    ///   <summary>Get the children of each element in the set of matched elements, optionally filtered by a selector.</summary>\r\n    ///   <param name=\"selector\" type=\"String\">A string containing a selector expression to match elements against.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'class': function() {\r\n    /// <signature>\r\n    ///   <summary>Selects all elements with the given class.</summary>\r\n    ///   <param name=\"class\" type=\"String\">A class to search for. An element can have multiple classes; only one of them must match.</param>\r\n    /// </signature>\r\n  },\r\n  'clearQueue': function() {\r\n    /// <signature>\r\n    ///   <summary>Remove from the queue all items that have not yet been run.</summary>\r\n    ///   <param name=\"queueName\" type=\"String\">A string containing the name of the queue. Defaults to fx, the standard effects queue.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'click': function() {\r\n    /// <signature>\r\n    ///   <summary>Bind an event handler to the \"click\" JavaScript event, or trigger that event on an element.</summary>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Bind an event handler to the \"click\" JavaScript event, or trigger that event on an element.</summary>\r\n    ///   <param name=\"eventData\" type=\"Object\">An object containing data that will be passed to the event handler.</param>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'clone': function() {\r\n    /// <signature>\r\n    ///   <summary>Create a deep copy of the set of matched elements.</summary>\r\n    ///   <param name=\"withDataAndEvents\" type=\"Boolean\">A Boolean indicating whether event handlers should be copied along with the elements. As of jQuery 1.4, element data will be copied as well.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Create a deep copy of the set of matched elements.</summary>\r\n    ///   <param name=\"withDataAndEvents\" type=\"Boolean\">A Boolean indicating whether event handlers and data should be copied along with the elements. The default value is false. *In jQuery 1.5.0 the default value was incorrectly true; it was changed back to false in 1.5.1 and up.</param>\r\n    ///   <param name=\"deepWithDataAndEvents\" type=\"Boolean\">A Boolean indicating whether event handlers and data for all children of the cloned element should be copied. By default its value matches the first argument's value (which defaults to false).</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'closest': function() {\r\n    /// <signature>\r\n    ///   <summary>For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree.</summary>\r\n    ///   <param name=\"selector\" type=\"String\">A string containing a selector expression to match elements against.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree.</summary>\r\n    ///   <param name=\"selector\" type=\"String\">A string containing a selector expression to match elements against.</param>\r\n    ///   <param name=\"context\" type=\"Element\">A DOM element within which a matching element may be found. If no context is passed in then the context of the jQuery set will be used instead.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree.</summary>\r\n    ///   <param name=\"jQuery object\" type=\"jQuery\">A jQuery object to match elements against.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree.</summary>\r\n    ///   <param name=\"element\" type=\"Element\">An element to match elements against.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'contains': function() {\r\n    /// <signature>\r\n    ///   <summary>Select all elements that contain the specified text.</summary>\r\n    ///   <param name=\"text\" type=\"String\">A string of text to look for. It's case sensitive.</param>\r\n    /// </signature>\r\n  },\r\n  'contents': function() {\r\n    /// <summary>Get the children of each element in the set of matched elements, including text and comment nodes.</summary>\r\n    /// <returns type=\"jQuery\" />\r\n  },\r\n  'context': function() {\r\n    /// <summary>The DOM node context originally passed to jQuery(); if none was passed then context will likely be the document.</summary>\r\n    /// <returns type=\"Element\" />\r\n  },\r\n  'css': function() {\r\n    /// <signature>\r\n    ///   <summary>Set one or more CSS properties for the set of matched elements.</summary>\r\n    ///   <param name=\"propertyName\" type=\"String\">A CSS property name.</param>\r\n    ///   <param name=\"value\" type=\"Number\">A value to set for the property.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Set one or more CSS properties for the set of matched elements.</summary>\r\n    ///   <param name=\"propertyName\" type=\"String\">A CSS property name.</param>\r\n    ///   <param name=\"function(index, value)\" type=\"Function\">A function returning the value to set. this is the current element. Receives the index position of the element in the set and the old value as arguments.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Set one or more CSS properties for the set of matched elements.</summary>\r\n    ///   <param name=\"properties\" type=\"PlainObject\">An object of property-value pairs to set.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'data': function() {\r\n    /// <signature>\r\n    ///   <summary>Store arbitrary data associated with the matched elements.</summary>\r\n    ///   <param name=\"key\" type=\"String\">A string naming the piece of data to set.</param>\r\n    ///   <param name=\"value\" type=\"Object\">The new data value; it can be any Javascript type including Array or Object.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Store arbitrary data associated with the matched elements.</summary>\r\n    ///   <param name=\"obj\" type=\"Object\">An object of key-value pairs of data to update.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'dblclick': function() {\r\n    /// <signature>\r\n    ///   <summary>Bind an event handler to the \"dblclick\" JavaScript event, or trigger that event on an element.</summary>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Bind an event handler to the \"dblclick\" JavaScript event, or trigger that event on an element.</summary>\r\n    ///   <param name=\"eventData\" type=\"Object\">An object containing data that will be passed to the event handler.</param>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'delay': function() {\r\n    /// <signature>\r\n    ///   <summary>Set a timer to delay execution of subsequent items in the queue.</summary>\r\n    ///   <param name=\"duration\" type=\"Number\">An integer indicating the number of milliseconds to delay execution of the next item in the queue.</param>\r\n    ///   <param name=\"queueName\" type=\"String\">A string containing the name of the queue. Defaults to fx, the standard effects queue.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'delegate': function() {\r\n    /// <signature>\r\n    ///   <summary>Attach a handler to one or more events for all elements that match the selector, now or in the future, based on a specific set of root elements.</summary>\r\n    ///   <param name=\"selector\" type=\"String\">A selector to filter the elements that trigger the event.</param>\r\n    ///   <param name=\"eventType\" type=\"String\">A string containing one or more space-separated JavaScript event types, such as \"click\" or \"keydown,\" or custom event names.</param>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute at the time the event is triggered.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Attach a handler to one or more events for all elements that match the selector, now or in the future, based on a specific set of root elements.</summary>\r\n    ///   <param name=\"selector\" type=\"String\">A selector to filter the elements that trigger the event.</param>\r\n    ///   <param name=\"eventType\" type=\"String\">A string containing one or more space-separated JavaScript event types, such as \"click\" or \"keydown,\" or custom event names.</param>\r\n    ///   <param name=\"eventData\" type=\"Object\">An object containing data that will be passed to the event handler.</param>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute at the time the event is triggered.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Attach a handler to one or more events for all elements that match the selector, now or in the future, based on a specific set of root elements.</summary>\r\n    ///   <param name=\"selector\" type=\"String\">A selector to filter the elements that trigger the event.</param>\r\n    ///   <param name=\"events\" type=\"PlainObject\">A plain object of one or more event types and functions to execute for them.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'dequeue': function() {\r\n    /// <signature>\r\n    ///   <summary>Execute the next function on the queue for the matched elements.</summary>\r\n    ///   <param name=\"queueName\" type=\"String\">A string containing the name of the queue. Defaults to fx, the standard effects queue.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'descendant': function() {\r\n    /// <signature>\r\n    ///   <summary>Selects all elements that are descendants of a given ancestor.</summary>\r\n    ///   <param name=\"ancestor\" type=\"String\">Any valid selector.</param>\r\n    ///   <param name=\"descendant\" type=\"String\">A selector to filter the descendant elements.</param>\r\n    /// </signature>\r\n  },\r\n  'detach': function() {\r\n    /// <signature>\r\n    ///   <summary>Remove the set of matched elements from the DOM.</summary>\r\n    ///   <param name=\"selector\" type=\"String\">A selector expression that filters the set of matched elements to be removed.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'die': function() {\r\n    /// <signature>\r\n    ///   <summary>Remove event handlers previously attached using .live() from the elements.</summary>\r\n    ///   <param name=\"eventType\" type=\"String\">A string containing a JavaScript event type, such as click or keydown.</param>\r\n    ///   <param name=\"handler\" type=\"String\">The function that is no longer to be executed.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Remove event handlers previously attached using .live() from the elements.</summary>\r\n    ///   <param name=\"events\" type=\"PlainObject\">A plain object of one or more event types, such as click or keydown and their corresponding functions that are no longer to be executed.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'disabled': function() {\r\n    /// <summary>Selects all elements that are disabled.</summary>\r\n  },\r\n  'each': function() {\r\n    /// <signature>\r\n    ///   <summary>Iterate over a jQuery object, executing a function for each matched element.</summary>\r\n    ///   <param name=\"function(index, Element)\" type=\"Function\">A function to execute for each matched element.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'element': function() {\r\n    /// <signature>\r\n    ///   <summary>Selects all elements with the given tag name.</summary>\r\n    ///   <param name=\"element\" type=\"String\">An element to search for. Refers to the tagName of DOM nodes.</param>\r\n    /// </signature>\r\n  },\r\n  'empty': function() {\r\n    /// <summary>Select all elements that have no children (including text nodes).</summary>\r\n  },\r\n  'enabled': function() {\r\n    /// <summary>Selects all elements that are enabled.</summary>\r\n  },\r\n  'end': function() {\r\n    /// <summary>End the most recent filtering operation in the current chain and return the set of matched elements to its previous state.</summary>\r\n    /// <returns type=\"jQuery\" />\r\n  },\r\n  'eq': function() {\r\n    /// <signature>\r\n    ///   <summary>Select the element at index n within the matched set.</summary>\r\n    ///   <param name=\"index\" type=\"Number\">Zero-based index of the element to match.</param>\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Select the element at index n within the matched set.</summary>\r\n    ///   <param name=\"-index\" type=\"Number\">Zero-based index of the element to match, counting backwards from the last element.</param>\r\n    /// </signature>\r\n  },\r\n  'error': function() {\r\n    /// <signature>\r\n    ///   <summary>Bind an event handler to the \"error\" JavaScript event.</summary>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute when the event is triggered.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Bind an event handler to the \"error\" JavaScript event.</summary>\r\n    ///   <param name=\"eventData\" type=\"Object\">An object containing data that will be passed to the event handler.</param>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'even': function() {\r\n    /// <summary>Selects even elements, zero-indexed.  See also odd.</summary>\r\n  },\r\n  'fadeIn': function() {\r\n    /// <signature>\r\n    ///   <summary>Display the matched elements by fading them to opaque.</summary>\r\n    ///   <param name=\"duration\" type=\"\">A string or number determining how long the animation will run.</param>\r\n    ///   <param name=\"complete\" type=\"Function\">A function to call once the animation is complete.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Display the matched elements by fading them to opaque.</summary>\r\n    ///   <param name=\"options\" type=\"PlainObject\">A map of additional options to pass to the method.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Display the matched elements by fading them to opaque.</summary>\r\n    ///   <param name=\"duration\" type=\"\">A string or number determining how long the animation will run.</param>\r\n    ///   <param name=\"easing\" type=\"String\">A string indicating which easing function to use for the transition.</param>\r\n    ///   <param name=\"complete\" type=\"Function\">A function to call once the animation is complete.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'fadeOut': function() {\r\n    /// <signature>\r\n    ///   <summary>Hide the matched elements by fading them to transparent.</summary>\r\n    ///   <param name=\"duration\" type=\"\">A string or number determining how long the animation will run.</param>\r\n    ///   <param name=\"complete\" type=\"Function\">A function to call once the animation is complete.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Hide the matched elements by fading them to transparent.</summary>\r\n    ///   <param name=\"options\" type=\"PlainObject\">A map of additional options to pass to the method.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Hide the matched elements by fading them to transparent.</summary>\r\n    ///   <param name=\"duration\" type=\"\">A string or number determining how long the animation will run.</param>\r\n    ///   <param name=\"easing\" type=\"String\">A string indicating which easing function to use for the transition.</param>\r\n    ///   <param name=\"complete\" type=\"Function\">A function to call once the animation is complete.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'fadeTo': function() {\r\n    /// <signature>\r\n    ///   <summary>Adjust the opacity of the matched elements.</summary>\r\n    ///   <param name=\"duration\" type=\"Number\">A string or number determining how long the animation will run.</param>\r\n    ///   <param name=\"opacity\" type=\"Number\">A number between 0 and 1 denoting the target opacity.</param>\r\n    ///   <param name=\"complete\" type=\"Function\">A function to call once the animation is complete.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Adjust the opacity of the matched elements.</summary>\r\n    ///   <param name=\"duration\" type=\"Number\">A string or number determining how long the animation will run.</param>\r\n    ///   <param name=\"opacity\" type=\"Number\">A number between 0 and 1 denoting the target opacity.</param>\r\n    ///   <param name=\"easing\" type=\"String\">A string indicating which easing function to use for the transition.</param>\r\n    ///   <param name=\"complete\" type=\"Function\">A function to call once the animation is complete.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'fadeToggle': function() {\r\n    /// <signature>\r\n    ///   <summary>Display or hide the matched elements by animating their opacity.</summary>\r\n    ///   <param name=\"duration\" type=\"\">A string or number determining how long the animation will run.</param>\r\n    ///   <param name=\"easing\" type=\"String\">A string indicating which easing function to use for the transition.</param>\r\n    ///   <param name=\"complete\" type=\"Function\">A function to call once the animation is complete.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Display or hide the matched elements by animating their opacity.</summary>\r\n    ///   <param name=\"options\" type=\"PlainObject\">A map of additional options to pass to the method.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'file': function() {\r\n    /// <summary>Selects all elements of type file.</summary>\r\n  },\r\n  'filter': function() {\r\n    /// <signature>\r\n    ///   <summary>Reduce the set of matched elements to those that match the selector or pass the function's test.</summary>\r\n    ///   <param name=\"selector\" type=\"String\">A string containing a selector expression to match the current set of elements against.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Reduce the set of matched elements to those that match the selector or pass the function's test.</summary>\r\n    ///   <param name=\"function(index)\" type=\"Function\">A function used as a test for each element in the set. this is the current DOM element.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Reduce the set of matched elements to those that match the selector or pass the function's test.</summary>\r\n    ///   <param name=\"element\" type=\"Element\">An element to match the current set of elements against.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Reduce the set of matched elements to those that match the selector or pass the function's test.</summary>\r\n    ///   <param name=\"jQuery object\" type=\"Object\">An existing jQuery object to match the current set of elements against.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'find': function() {\r\n    /// <signature>\r\n    ///   <summary>Get the descendants of each element in the current set of matched elements, filtered by a selector, jQuery object, or element.</summary>\r\n    ///   <param name=\"selector\" type=\"String\">A string containing a selector expression to match elements against.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Get the descendants of each element in the current set of matched elements, filtered by a selector, jQuery object, or element.</summary>\r\n    ///   <param name=\"jQuery object\" type=\"Object\">A jQuery object to match elements against.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Get the descendants of each element in the current set of matched elements, filtered by a selector, jQuery object, or element.</summary>\r\n    ///   <param name=\"element\" type=\"Element\">An element to match elements against.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'finish': function() {\r\n    /// <signature>\r\n    ///   <summary>Stop the currently-running animation, remove all queued animations, and complete all animations for the matched elements.</summary>\r\n    ///   <param name=\"queue\" type=\"String\">The name of the queue in which to stop animations.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'first': function() {\r\n    /// <summary>Selects the first matched element.</summary>\r\n  },\r\n  'first-child': function() {\r\n    /// <summary>Selects all elements that are the first child of their parent.</summary>\r\n  },\r\n  'first-of-type': function() {\r\n    /// <summary>Selects all elements that are the first among siblings of the same element name.</summary>\r\n  },\r\n  'focus': function() {\r\n    /// <signature>\r\n    ///   <summary>Bind an event handler to the \"focus\" JavaScript event, or trigger that event on an element.</summary>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Bind an event handler to the \"focus\" JavaScript event, or trigger that event on an element.</summary>\r\n    ///   <param name=\"eventData\" type=\"Object\">An object containing data that will be passed to the event handler.</param>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'focusin': function() {\r\n    /// <signature>\r\n    ///   <summary>Bind an event handler to the \"focusin\" event.</summary>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Bind an event handler to the \"focusin\" event.</summary>\r\n    ///   <param name=\"eventData\" type=\"Object\">An object containing data that will be passed to the event handler.</param>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'focusout': function() {\r\n    /// <signature>\r\n    ///   <summary>Bind an event handler to the \"focusout\" JavaScript event.</summary>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Bind an event handler to the \"focusout\" JavaScript event.</summary>\r\n    ///   <param name=\"eventData\" type=\"Object\">An object containing data that will be passed to the event handler.</param>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'get': function() {\r\n    /// <signature>\r\n    ///   <summary>Retrieve the DOM elements matched by the jQuery object.</summary>\r\n    ///   <param name=\"index\" type=\"Number\">A zero-based integer indicating which element to retrieve.</param>\r\n    ///   <returns type=\"Element, Array\" />\r\n    /// </signature>\r\n  },\r\n  'gt': function() {\r\n    /// <signature>\r\n    ///   <summary>Select all elements at an index greater than index within the matched set.</summary>\r\n    ///   <param name=\"index\" type=\"Number\">Zero-based index.</param>\r\n    /// </signature>\r\n  },\r\n  'has': function() {\r\n    /// <signature>\r\n    ///   <summary>Reduce the set of matched elements to those that have a descendant that matches the selector or DOM element.</summary>\r\n    ///   <param name=\"selector\" type=\"String\">A string containing a selector expression to match elements against.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Reduce the set of matched elements to those that have a descendant that matches the selector or DOM element.</summary>\r\n    ///   <param name=\"contained\" type=\"Element\">A DOM element to match elements against.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'hasClass': function() {\r\n    /// <signature>\r\n    ///   <summary>Determine whether any of the matched elements are assigned the given class.</summary>\r\n    ///   <param name=\"className\" type=\"String\">The class name to search for.</param>\r\n    ///   <returns type=\"Boolean\" />\r\n    /// </signature>\r\n  },\r\n  'header': function() {\r\n    /// <summary>Selects all elements that are headers, like h1, h2, h3 and so on.</summary>\r\n  },\r\n  'height': function() {\r\n    /// <signature>\r\n    ///   <summary>Set the CSS height of every matched element.</summary>\r\n    ///   <param name=\"value\" type=\"Number\">An integer representing the number of pixels, or an integer with an optional unit of measure appended (as a string).</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Set the CSS height of every matched element.</summary>\r\n    ///   <param name=\"function(index, height)\" type=\"Function\">A function returning the height to set. Receives the index position of the element in the set and the old height as arguments. Within the function, this refers to the current element in the set.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'hidden': function() {\r\n    /// <summary>Selects all elements that are hidden.</summary>\r\n  },\r\n  'hide': function() {\r\n    /// <signature>\r\n    ///   <summary>Hide the matched elements.</summary>\r\n    ///   <param name=\"duration\" type=\"\">A string or number determining how long the animation will run.</param>\r\n    ///   <param name=\"complete\" type=\"Function\">A function to call once the animation is complete.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Hide the matched elements.</summary>\r\n    ///   <param name=\"options\" type=\"PlainObject\">A map of additional options to pass to the method.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Hide the matched elements.</summary>\r\n    ///   <param name=\"duration\" type=\"\">A string or number determining how long the animation will run.</param>\r\n    ///   <param name=\"easing\" type=\"String\">A string indicating which easing function to use for the transition.</param>\r\n    ///   <param name=\"complete\" type=\"Function\">A function to call once the animation is complete.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'hover': function() {\r\n    /// <signature>\r\n    ///   <summary>Bind two handlers to the matched elements, to be executed when the mouse pointer enters and leaves the elements.</summary>\r\n    ///   <param name=\"handlerIn(eventObject)\" type=\"Function\">A function to execute when the mouse pointer enters the element.</param>\r\n    ///   <param name=\"handlerOut(eventObject)\" type=\"Function\">A function to execute when the mouse pointer leaves the element.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'html': function() {\r\n    /// <signature>\r\n    ///   <summary>Set the HTML contents of each element in the set of matched elements.</summary>\r\n    ///   <param name=\"htmlString\" type=\"String\">A string of HTML to set as the content of each matched element.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Set the HTML contents of each element in the set of matched elements.</summary>\r\n    ///   <param name=\"function(index, oldhtml)\" type=\"Function\">A function returning the HTML content to set. Receives the           index position of the element in the set and the old HTML value as arguments.           jQuery empties the element before calling the function;           use the oldhtml argument to reference the previous content.           Within the function, this refers to the current element in the set.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'id': function() {\r\n    /// <signature>\r\n    ///   <summary>Selects a single element with the given id attribute.</summary>\r\n    ///   <param name=\"id\" type=\"String\">An ID to search for, specified via the id attribute of an element.</param>\r\n    /// </signature>\r\n  },\r\n  'image': function() {\r\n    /// <summary>Selects all elements of type image.</summary>\r\n  },\r\n  'index': function() {\r\n    /// <signature>\r\n    ///   <summary>Search for a given element from among the matched elements.</summary>\r\n    ///   <param name=\"selector\" type=\"String\">A selector representing a jQuery collection in which to look for an element.</param>\r\n    ///   <returns type=\"Number\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Search for a given element from among the matched elements.</summary>\r\n    ///   <param name=\"element\" type=\"jQuery\">The DOM element or first element within the jQuery object to look for.</param>\r\n    ///   <returns type=\"Number\" />\r\n    /// </signature>\r\n  },\r\n  'init': function() {\r\n    /// <signature>\r\n    ///   <summary>Accepts a string containing a CSS selector which is then used to match a set of elements.</summary>\r\n    ///   <param name=\"selector\" type=\"String\">A string containing a selector expression</param>\r\n    ///   <param name=\"context\" type=\"jQuery\">A DOM Element, Document, or jQuery to use as context</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Accepts a string containing a CSS selector which is then used to match a set of elements.</summary>\r\n    ///   <param name=\"element\" type=\"Element\">A DOM element to wrap in a jQuery object.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Accepts a string containing a CSS selector which is then used to match a set of elements.</summary>\r\n    ///   <param name=\"elementArray\" type=\"Array\">An array containing a set of DOM elements to wrap in a jQuery object.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Accepts a string containing a CSS selector which is then used to match a set of elements.</summary>\r\n    ///   <param name=\"object\" type=\"PlainObject\">A plain object to wrap in a jQuery object.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Accepts a string containing a CSS selector which is then used to match a set of elements.</summary>\r\n    ///   <param name=\"jQuery object\" type=\"PlainObject\">An existing jQuery object to clone.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'innerHeight': function() {\r\n    /// <summary>Get the current computed height for the first element in the set of matched elements, including padding but not border.</summary>\r\n    /// <returns type=\"Integer\" />\r\n  },\r\n  'innerWidth': function() {\r\n    /// <summary>Get the current computed width for the first element in the set of matched elements, including padding but not border.</summary>\r\n    /// <returns type=\"Integer\" />\r\n  },\r\n  'input': function() {\r\n    /// <summary>Selects all input, textarea, select and button elements.</summary>\r\n  },\r\n  'insertAfter': function() {\r\n    /// <signature>\r\n    ///   <summary>Insert every element in the set of matched elements after the target.</summary>\r\n    ///   <param name=\"target\" type=\"jQuery\">A selector, element, HTML string, or jQuery object; the matched set of elements will be inserted after the element(s) specified by this parameter.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'insertBefore': function() {\r\n    /// <signature>\r\n    ///   <summary>Insert every element in the set of matched elements before the target.</summary>\r\n    ///   <param name=\"target\" type=\"jQuery\">A selector, element, HTML string, or jQuery object; the matched set of elements will be inserted before the element(s) specified by this parameter.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'is': function() {\r\n    /// <signature>\r\n    ///   <summary>Check the current matched set of elements against a selector, element, or jQuery object and return true if at least one of these elements matches the given arguments.</summary>\r\n    ///   <param name=\"selector\" type=\"String\">A string containing a selector expression to match elements against.</param>\r\n    ///   <returns type=\"Boolean\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Check the current matched set of elements against a selector, element, or jQuery object and return true if at least one of these elements matches the given arguments.</summary>\r\n    ///   <param name=\"function(index)\" type=\"Function\">A function used as a test for the set of elements. It accepts one argument, index, which is the element's index in the jQuery collection.Within the function, this refers to the current DOM element.</param>\r\n    ///   <returns type=\"Boolean\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Check the current matched set of elements against a selector, element, or jQuery object and return true if at least one of these elements matches the given arguments.</summary>\r\n    ///   <param name=\"jQuery object\" type=\"Object\">An existing jQuery object to match the current set of elements against.</param>\r\n    ///   <returns type=\"Boolean\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Check the current matched set of elements against a selector, element, or jQuery object and return true if at least one of these elements matches the given arguments.</summary>\r\n    ///   <param name=\"element\" type=\"Element\">An element to match the current set of elements against.</param>\r\n    ///   <returns type=\"Boolean\" />\r\n    /// </signature>\r\n  },\r\n  'jquery': function() {\r\n    /// <summary>A string containing the jQuery version number.</summary>\r\n    /// <returns type=\"String\" />\r\n  },\r\n  'keydown': function() {\r\n    /// <signature>\r\n    ///   <summary>Bind an event handler to the \"keydown\" JavaScript event, or trigger that event on an element.</summary>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Bind an event handler to the \"keydown\" JavaScript event, or trigger that event on an element.</summary>\r\n    ///   <param name=\"eventData\" type=\"PlainObject\">An object containing data that will be passed to the event handler.</param>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'keypress': function() {\r\n    /// <signature>\r\n    ///   <summary>Bind an event handler to the \"keypress\" JavaScript event, or trigger that event on an element.</summary>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Bind an event handler to the \"keypress\" JavaScript event, or trigger that event on an element.</summary>\r\n    ///   <param name=\"eventData\" type=\"PlainObject\">An object containing data that will be passed to the event handler.</param>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'keyup': function() {\r\n    /// <signature>\r\n    ///   <summary>Bind an event handler to the \"keyup\" JavaScript event, or trigger that event on an element.</summary>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Bind an event handler to the \"keyup\" JavaScript event, or trigger that event on an element.</summary>\r\n    ///   <param name=\"eventData\" type=\"PlainObject\">An object containing data that will be passed to the event handler.</param>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'lang': function() {\r\n    /// <signature>\r\n    ///   <summary>Selects all elements of the specified language.</summary>\r\n    ///   <param name=\"language\" type=\"String\">A language code.</param>\r\n    /// </signature>\r\n  },\r\n  'last': function() {\r\n    /// <summary>Selects the last matched element.</summary>\r\n  },\r\n  'last-child': function() {\r\n    /// <summary>Selects all elements that are the last child of their parent.</summary>\r\n  },\r\n  'last-of-type': function() {\r\n    /// <summary>Selects all elements that are the last among siblings of the same element name.</summary>\r\n  },\r\n  'length': function() {\r\n    /// <summary>The number of elements in the jQuery object.</summary>\r\n    /// <returns type=\"Number\" />\r\n  },\r\n  'live': function() {\r\n    /// <signature>\r\n    ///   <summary>Attach an event handler for all elements which match the current selector, now and in the future.</summary>\r\n    ///   <param name=\"events\" type=\"String\">A string containing a JavaScript event type, such as \"click\" or \"keydown.\" As of jQuery 1.4 the string can contain multiple, space-separated event types or custom event names.</param>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute at the time the event is triggered.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Attach an event handler for all elements which match the current selector, now and in the future.</summary>\r\n    ///   <param name=\"events\" type=\"String\">A string containing a JavaScript event type, such as \"click\" or \"keydown.\" As of jQuery 1.4 the string can contain multiple, space-separated event types or custom event names.</param>\r\n    ///   <param name=\"data\" type=\"PlainObject\">An object containing data that will be passed to the event handler.</param>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute at the time the event is triggered.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Attach an event handler for all elements which match the current selector, now and in the future.</summary>\r\n    ///   <param name=\"events\" type=\"PlainObject\">A plain object of one or more JavaScript event types and functions to execute for them.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'load': function() {\r\n    /// <signature>\r\n    ///   <summary>Bind an event handler to the \"load\" JavaScript event.</summary>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute when the event is triggered.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Bind an event handler to the \"load\" JavaScript event.</summary>\r\n    ///   <param name=\"eventData\" type=\"PlainObject\">An object containing data that will be passed to the event handler.</param>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'lt': function() {\r\n    /// <signature>\r\n    ///   <summary>Select all elements at an index less than index within the matched set.</summary>\r\n    ///   <param name=\"index\" type=\"Number\">Zero-based index.</param>\r\n    /// </signature>\r\n  },\r\n  'map': function() {\r\n    /// <signature>\r\n    ///   <summary>Pass each element in the current matched set through a function, producing a new jQuery object containing the return values.</summary>\r\n    ///   <param name=\"callback(index, domElement)\" type=\"Function\">A function object that will be invoked for each element in the current set.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'mousedown': function() {\r\n    /// <signature>\r\n    ///   <summary>Bind an event handler to the \"mousedown\" JavaScript event, or trigger that event on an element.</summary>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Bind an event handler to the \"mousedown\" JavaScript event, or trigger that event on an element.</summary>\r\n    ///   <param name=\"eventData\" type=\"PlainObject\">An object containing data that will be passed to the event handler.</param>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'mouseenter': function() {\r\n    /// <signature>\r\n    ///   <summary>Bind an event handler to be fired when the mouse enters an element, or trigger that handler on an element.</summary>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Bind an event handler to be fired when the mouse enters an element, or trigger that handler on an element.</summary>\r\n    ///   <param name=\"eventData\" type=\"PlainObject\">An object containing data that will be passed to the event handler.</param>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'mouseleave': function() {\r\n    /// <signature>\r\n    ///   <summary>Bind an event handler to be fired when the mouse leaves an element, or trigger that handler on an element.</summary>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Bind an event handler to be fired when the mouse leaves an element, or trigger that handler on an element.</summary>\r\n    ///   <param name=\"eventData\" type=\"PlainObject\">An object containing data that will be passed to the event handler.</param>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'mousemove': function() {\r\n    /// <signature>\r\n    ///   <summary>Bind an event handler to the \"mousemove\" JavaScript event, or trigger that event on an element.</summary>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Bind an event handler to the \"mousemove\" JavaScript event, or trigger that event on an element.</summary>\r\n    ///   <param name=\"eventData\" type=\"PlainObject\">An object containing data that will be passed to the event handler.</param>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'mouseout': function() {\r\n    /// <signature>\r\n    ///   <summary>Bind an event handler to the \"mouseout\" JavaScript event, or trigger that event on an element.</summary>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Bind an event handler to the \"mouseout\" JavaScript event, or trigger that event on an element.</summary>\r\n    ///   <param name=\"eventData\" type=\"PlainObject\">An object containing data that will be passed to the event handler.</param>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'mouseover': function() {\r\n    /// <signature>\r\n    ///   <summary>Bind an event handler to the \"mouseover\" JavaScript event, or trigger that event on an element.</summary>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Bind an event handler to the \"mouseover\" JavaScript event, or trigger that event on an element.</summary>\r\n    ///   <param name=\"eventData\" type=\"PlainObject\">An object containing data that will be passed to the event handler.</param>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'mouseup': function() {\r\n    /// <signature>\r\n    ///   <summary>Bind an event handler to the \"mouseup\" JavaScript event, or trigger that event on an element.</summary>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Bind an event handler to the \"mouseup\" JavaScript event, or trigger that event on an element.</summary>\r\n    ///   <param name=\"eventData\" type=\"PlainObject\">An object containing data that will be passed to the event handler.</param>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'multiple': function() {\r\n    /// <signature>\r\n    ///   <summary>Selects the combined results of all the specified selectors.</summary>\r\n    ///   <param name=\"selector1\" type=\"String\">Any valid selector.</param>\r\n    ///   <param name=\"selector2\" type=\"String\">Another valid selector.</param>\r\n    ///   <param name=\"selectorN\" type=\"String\">As many more valid selectors as you like.</param>\r\n    /// </signature>\r\n  },\r\n  'next': function() {\r\n    /// <signature>\r\n    ///   <summary>Get the immediately following sibling of each element in the set of matched elements. If a selector is provided, it retrieves the next sibling only if it matches that selector.</summary>\r\n    ///   <param name=\"selector\" type=\"String\">A string containing a selector expression to match elements against.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'next adjacent': function() {\r\n    /// <signature>\r\n    ///   <summary>Selects all next elements matching \"next\" that are immediately preceded by a sibling \"prev\".</summary>\r\n    ///   <param name=\"prev\" type=\"String\">Any valid selector.</param>\r\n    ///   <param name=\"next\" type=\"String\">A selector to match the element that is next to the first selector.</param>\r\n    /// </signature>\r\n  },\r\n  'next siblings': function() {\r\n    /// <signature>\r\n    ///   <summary>Selects all sibling elements that follow after the \"prev\" element, have the same parent, and match the filtering \"siblings\" selector.</summary>\r\n    ///   <param name=\"prev\" type=\"String\">Any valid selector.</param>\r\n    ///   <param name=\"siblings\" type=\"String\">A selector to filter elements that are the following siblings of the first selector.</param>\r\n    /// </signature>\r\n  },\r\n  'nextAll': function() {\r\n    /// <signature>\r\n    ///   <summary>Get all following siblings of each element in the set of matched elements, optionally filtered by a selector.</summary>\r\n    ///   <param name=\"selector\" type=\"String\">A string containing a selector expression to match elements against.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'nextUntil': function() {\r\n    /// <signature>\r\n    ///   <summary>Get all following siblings of each element up to but not including the element matched by the selector, DOM node, or jQuery object passed.</summary>\r\n    ///   <param name=\"selector\" type=\"String\">A string containing a selector expression to indicate where to stop matching following sibling elements.</param>\r\n    ///   <param name=\"filter\" type=\"String\">A string containing a selector expression to match elements against.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Get all following siblings of each element up to but not including the element matched by the selector, DOM node, or jQuery object passed.</summary>\r\n    ///   <param name=\"element\" type=\"Element\">A DOM node or jQuery object indicating where to stop matching following sibling elements.</param>\r\n    ///   <param name=\"filter\" type=\"String\">A string containing a selector expression to match elements against.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'not': function() {\r\n    /// <signature>\r\n    ///   <summary>Remove elements from the set of matched elements.</summary>\r\n    ///   <param name=\"selector\" type=\"String\">A string containing a selector expression to match elements against.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Remove elements from the set of matched elements.</summary>\r\n    ///   <param name=\"elements\" type=\"Array\">One or more DOM elements to remove from the matched set.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Remove elements from the set of matched elements.</summary>\r\n    ///   <param name=\"function(index)\" type=\"Function\">A function used as a test for each element in the set. this is the current DOM element.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Remove elements from the set of matched elements.</summary>\r\n    ///   <param name=\"jQuery object\" type=\"PlainObject\">An existing jQuery object to match the current set of elements against.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'nth-child': function() {\r\n    /// <signature>\r\n    ///   <summary>Selects all elements that are the nth-child of their parent.</summary>\r\n    ///   <param name=\"index\" type=\"String\">The index of each child to match, starting with 1, the string even or odd, or an equation ( eg. :nth-child(even), :nth-child(4n) )</param>\r\n    /// </signature>\r\n  },\r\n  'nth-last-child': function() {\r\n    /// <signature>\r\n    ///   <summary>Selects all elements that are the nth-child of their parent, counting from the last element to the first.</summary>\r\n    ///   <param name=\"index\" type=\"String\">The index of each child to match, starting with the last one (1), the string even or odd, or an equation ( eg. :nth-last-child(even), :nth-last-child(4n) )</param>\r\n    /// </signature>\r\n  },\r\n  'nth-last-of-type': function() {\r\n    /// <signature>\r\n    ///   <summary>Selects all elements that are the nth-child of their parent, counting from the last element to the first.</summary>\r\n    ///   <param name=\"index\" type=\"String\">The index of each child to match, starting with the last one (1), the string even or odd, or an equation ( eg. :nth-last-of-type(even), :nth-last-of-type(4n) )</param>\r\n    /// </signature>\r\n  },\r\n  'nth-of-type': function() {\r\n    /// <signature>\r\n    ///   <summary>Selects all elements that are the nth child of their parent in relation to siblings with the same element name.</summary>\r\n    ///   <param name=\"index\" type=\"String\">The index of each child to match, starting with 1, the string even or odd, or an equation ( eg. :nth-of-type(even), :nth-of-type(4n) )</param>\r\n    /// </signature>\r\n  },\r\n  'odd': function() {\r\n    /// <summary>Selects odd elements, zero-indexed.  See also even.</summary>\r\n  },\r\n  'off': function() {\r\n    /// <signature>\r\n    ///   <summary>Remove an event handler.</summary>\r\n    ///   <param name=\"events\" type=\"String\">One or more space-separated event types and optional namespaces, or just namespaces, such as \"click\", \"keydown.myPlugin\", or \".myPlugin\".</param>\r\n    ///   <param name=\"selector\" type=\"String\">A selector which should match the one originally passed to .on() when attaching event handlers.</param>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A handler function previously attached for the event(s), or the special value false.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Remove an event handler.</summary>\r\n    ///   <param name=\"events\" type=\"PlainObject\">An object where the string keys represent one or more space-separated event types and optional namespaces, and the values represent handler functions previously attached for the event(s).</param>\r\n    ///   <param name=\"selector\" type=\"String\">A selector which should match the one originally passed to .on() when attaching event handlers.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'offset': function() {\r\n    /// <signature>\r\n    ///   <summary>Set the current coordinates of every element in the set of matched elements, relative to the document.</summary>\r\n    ///   <param name=\"coordinates\" type=\"PlainObject\">An object containing the properties top and left, which are integers indicating the new top and left coordinates for the elements.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Set the current coordinates of every element in the set of matched elements, relative to the document.</summary>\r\n    ///   <param name=\"function(index, coords)\" type=\"Function\">A function to return the coordinates to set. Receives the index of the element in the collection as the first argument and the current coordinates as the second argument. The function should return an object with the new top and left properties.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'offsetParent': function() {\r\n    /// <summary>Get the closest ancestor element that is positioned.</summary>\r\n    /// <returns type=\"jQuery\" />\r\n  },\r\n  'on': function() {\r\n    /// <signature>\r\n    ///   <summary>Attach an event handler function for one or more events to the selected elements.</summary>\r\n    ///   <param name=\"events\" type=\"String\">One or more space-separated event types and optional namespaces, such as \"click\" or \"keydown.myPlugin\".</param>\r\n    ///   <param name=\"selector\" type=\"String\">A selector string to filter the descendants of the selected elements that trigger the event. If the selector is null or omitted, the event is always triggered when it reaches the selected element.</param>\r\n    ///   <param name=\"data\" type=\"Anything\">Data to be passed to the handler in event.data when an event is triggered.</param>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute when the event is triggered. The value false is also allowed as a shorthand for a function that simply does return false.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Attach an event handler function for one or more events to the selected elements.</summary>\r\n    ///   <param name=\"events\" type=\"PlainObject\">An object in which the string keys represent one or more space-separated event types and optional namespaces, and the values represent a handler function to be called for the event(s).</param>\r\n    ///   <param name=\"selector\" type=\"String\">A selector string to filter the descendants of the selected elements that will call the handler. If the selector is null or omitted, the handler is always called when it reaches the selected element.</param>\r\n    ///   <param name=\"data\" type=\"Anything\">Data to be passed to the handler in event.data when an event occurs.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'one': function() {\r\n    /// <signature>\r\n    ///   <summary>Attach a handler to an event for the elements. The handler is executed at most once per element.</summary>\r\n    ///   <param name=\"events\" type=\"String\">A string containing one or more JavaScript event types, such as \"click\" or \"submit,\" or custom event names.</param>\r\n    ///   <param name=\"data\" type=\"PlainObject\">An object containing data that will be passed to the event handler.</param>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute at the time the event is triggered.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Attach a handler to an event for the elements. The handler is executed at most once per element.</summary>\r\n    ///   <param name=\"events\" type=\"String\">One or more space-separated event types and optional namespaces, such as \"click\" or \"keydown.myPlugin\".</param>\r\n    ///   <param name=\"selector\" type=\"String\">A selector string to filter the descendants of the selected elements that trigger the event. If the selector is null or omitted, the event is always triggered when it reaches the selected element.</param>\r\n    ///   <param name=\"data\" type=\"Anything\">Data to be passed to the handler in event.data when an event is triggered.</param>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute when the event is triggered. The value false is also allowed as a shorthand for a function that simply does return false.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Attach a handler to an event for the elements. The handler is executed at most once per element.</summary>\r\n    ///   <param name=\"events\" type=\"PlainObject\">An object in which the string keys represent one or more space-separated event types and optional namespaces, and the values represent a handler function to be called for the event(s).</param>\r\n    ///   <param name=\"selector\" type=\"String\">A selector string to filter the descendants of the selected elements that will call the handler. If the selector is null or omitted, the handler is always called when it reaches the selected element.</param>\r\n    ///   <param name=\"data\" type=\"Anything\">Data to be passed to the handler in event.data when an event occurs.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'only-child': function() {\r\n    /// <summary>Selects all elements that are the only child of their parent.</summary>\r\n  },\r\n  'only-of-type': function() {\r\n    /// <summary>Selects all elements that have no siblings with the same element name.</summary>\r\n  },\r\n  'outerHeight': function() {\r\n    /// <signature>\r\n    ///   <summary>Get the current computed height for the first element in the set of matched elements, including padding, border, and optionally margin. Returns an integer (without \"px\") representation of the value or null if called on an empty set of elements.</summary>\r\n    ///   <param name=\"includeMargin\" type=\"Boolean\">A Boolean indicating whether to include the element's margin in the calculation.</param>\r\n    ///   <returns type=\"Integer\" />\r\n    /// </signature>\r\n  },\r\n  'outerWidth': function() {\r\n    /// <signature>\r\n    ///   <summary>Get the current computed width for the first element in the set of matched elements, including padding and border.</summary>\r\n    ///   <param name=\"includeMargin\" type=\"Boolean\">A Boolean indicating whether to include the element's margin in the calculation.</param>\r\n    ///   <returns type=\"Integer\" />\r\n    /// </signature>\r\n  },\r\n  'parent': function() {\r\n    /// <signature>\r\n    ///   <summary>Get the parent of each element in the current set of matched elements, optionally filtered by a selector.</summary>\r\n    ///   <param name=\"selector\" type=\"String\">A string containing a selector expression to match elements against.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'parents': function() {\r\n    /// <signature>\r\n    ///   <summary>Get the ancestors of each element in the current set of matched elements, optionally filtered by a selector.</summary>\r\n    ///   <param name=\"selector\" type=\"String\">A string containing a selector expression to match elements against.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'parentsUntil': function() {\r\n    /// <signature>\r\n    ///   <summary>Get the ancestors of each element in the current set of matched elements, up to but not including the element matched by the selector, DOM node, or jQuery object.</summary>\r\n    ///   <param name=\"selector\" type=\"String\">A string containing a selector expression to indicate where to stop matching ancestor elements.</param>\r\n    ///   <param name=\"filter\" type=\"String\">A string containing a selector expression to match elements against.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Get the ancestors of each element in the current set of matched elements, up to but not including the element matched by the selector, DOM node, or jQuery object.</summary>\r\n    ///   <param name=\"element\" type=\"Element\">A DOM node or jQuery object indicating where to stop matching ancestor elements.</param>\r\n    ///   <param name=\"filter\" type=\"String\">A string containing a selector expression to match elements against.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'password': function() {\r\n    /// <summary>Selects all elements of type password.</summary>\r\n  },\r\n  'position': function() {\r\n    /// <summary>Get the current coordinates of the first element in the set of matched elements, relative to the offset parent.</summary>\r\n    /// <returns type=\"Object\" />\r\n  },\r\n  'prepend': function() {\r\n    /// <signature>\r\n    ///   <summary>Insert content, specified by the parameter, to the beginning of each element in the set of matched elements.</summary>\r\n    ///   <param name=\"content\" type=\"jQuery\">DOM element, array of elements, HTML string, or jQuery object to insert at the beginning of each element in the set of matched elements.</param>\r\n    ///   <param name=\"content\" type=\"jQuery\">One or more additional DOM elements, arrays of elements, HTML strings, or jQuery objects to insert at the beginning of each element in the set of matched elements.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Insert content, specified by the parameter, to the beginning of each element in the set of matched elements.</summary>\r\n    ///   <param name=\"function(index, html)\" type=\"Function\">A function that returns an HTML string, DOM element(s), or jQuery object to insert at the beginning of each element in the set of matched elements. Receives the index position of the element in the set and the old HTML value of the element as arguments. Within the function, this refers to the current element in the set.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'prependTo': function() {\r\n    /// <signature>\r\n    ///   <summary>Insert every element in the set of matched elements to the beginning of the target.</summary>\r\n    ///   <param name=\"target\" type=\"jQuery\">A selector, element, HTML string, or jQuery object; the matched set of elements will be inserted at the beginning of the element(s) specified by this parameter.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'prev': function() {\r\n    /// <signature>\r\n    ///   <summary>Get the immediately preceding sibling of each element in the set of matched elements, optionally filtered by a selector.</summary>\r\n    ///   <param name=\"selector\" type=\"String\">A string containing a selector expression to match elements against.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'prevAll': function() {\r\n    /// <signature>\r\n    ///   <summary>Get all preceding siblings of each element in the set of matched elements, optionally filtered by a selector.</summary>\r\n    ///   <param name=\"selector\" type=\"String\">A string containing a selector expression to match elements against.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'prevUntil': function() {\r\n    /// <signature>\r\n    ///   <summary>Get all preceding siblings of each element up to but not including the element matched by the selector, DOM node, or jQuery object.</summary>\r\n    ///   <param name=\"selector\" type=\"String\">A string containing a selector expression to indicate where to stop matching preceding sibling elements.</param>\r\n    ///   <param name=\"filter\" type=\"String\">A string containing a selector expression to match elements against.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Get all preceding siblings of each element up to but not including the element matched by the selector, DOM node, or jQuery object.</summary>\r\n    ///   <param name=\"element\" type=\"Element\">A DOM node or jQuery object indicating where to stop matching preceding sibling elements.</param>\r\n    ///   <param name=\"filter\" type=\"String\">A string containing a selector expression to match elements against.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'promise': function() {\r\n    /// <signature>\r\n    ///   <summary>Return a Promise object to observe when all actions of a certain type bound to the collection, queued or not, have finished.</summary>\r\n    ///   <param name=\"type\" type=\"String\">The type of queue that needs to be observed.</param>\r\n    ///   <param name=\"target\" type=\"PlainObject\">Object onto which the promise methods have to be attached</param>\r\n    ///   <returns type=\"Promise\" />\r\n    /// </signature>\r\n  },\r\n  'prop': function() {\r\n    /// <signature>\r\n    ///   <summary>Set one or more properties for the set of matched elements.</summary>\r\n    ///   <param name=\"propertyName\" type=\"String\">The name of the property to set.</param>\r\n    ///   <param name=\"value\" type=\"Boolean\">A value to set for the property.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Set one or more properties for the set of matched elements.</summary>\r\n    ///   <param name=\"properties\" type=\"PlainObject\">An object of property-value pairs to set.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Set one or more properties for the set of matched elements.</summary>\r\n    ///   <param name=\"propertyName\" type=\"String\">The name of the property to set.</param>\r\n    ///   <param name=\"function(index, oldPropertyValue)\" type=\"Function\">A function returning the value to set. Receives the index position of the element in the set and the old property value as arguments. Within the function, the keyword this refers to the current element.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'pushStack': function() {\r\n    /// <signature>\r\n    ///   <summary>Add a collection of DOM elements onto the jQuery stack.</summary>\r\n    ///   <param name=\"elements\" type=\"Array\">An array of elements to push onto the stack and make into a new jQuery object.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Add a collection of DOM elements onto the jQuery stack.</summary>\r\n    ///   <param name=\"elements\" type=\"Array\">An array of elements to push onto the stack and make into a new jQuery object.</param>\r\n    ///   <param name=\"name\" type=\"String\">The name of a jQuery method that generated the array of elements.</param>\r\n    ///   <param name=\"arguments\" type=\"Array\">The arguments that were passed in to the jQuery method (for serialization).</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'queue': function() {\r\n    /// <signature>\r\n    ///   <summary>Manipulate the queue of functions to be executed, once for each matched element.</summary>\r\n    ///   <param name=\"queueName\" type=\"String\">A string containing the name of the queue. Defaults to fx, the standard effects queue.</param>\r\n    ///   <param name=\"newQueue\" type=\"Array\">An array of functions to replace the current queue contents.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Manipulate the queue of functions to be executed, once for each matched element.</summary>\r\n    ///   <param name=\"queueName\" type=\"String\">A string containing the name of the queue. Defaults to fx, the standard effects queue.</param>\r\n    ///   <param name=\"callback( next )\" type=\"Function\">The new function to add to the queue, with a function to call that will dequeue the next item.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'radio': function() {\r\n    /// <summary>Selects all  elements of type radio.</summary>\r\n  },\r\n  'ready': function() {\r\n    /// <signature>\r\n    ///   <summary>Specify a function to execute when the DOM is fully loaded.</summary>\r\n    ///   <param name=\"handler\" type=\"Function\">A function to execute after the DOM is ready.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'remove': function() {\r\n    /// <signature>\r\n    ///   <summary>Remove the set of matched elements from the DOM.</summary>\r\n    ///   <param name=\"selector\" type=\"String\">A selector expression that filters the set of matched elements to be removed.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'removeAttr': function() {\r\n    /// <signature>\r\n    ///   <summary>Remove an attribute from each element in the set of matched elements.</summary>\r\n    ///   <param name=\"attributeName\" type=\"String\">An attribute to remove; as of version 1.7, it can be a space-separated list of attributes.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'removeClass': function() {\r\n    /// <signature>\r\n    ///   <summary>Remove a single class, multiple classes, or all classes from each element in the set of matched elements.</summary>\r\n    ///   <param name=\"className\" type=\"String\">One or more space-separated classes to be removed from the class attribute of each matched element.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Remove a single class, multiple classes, or all classes from each element in the set of matched elements.</summary>\r\n    ///   <param name=\"function(index, class)\" type=\"Function\">A function returning one or more space-separated class names to be removed. Receives the index position of the element in the set and the old class value as arguments.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'removeData': function() {\r\n    /// <signature>\r\n    ///   <summary>Remove a previously-stored piece of data.</summary>\r\n    ///   <param name=\"name\" type=\"String\">A string naming the piece of data to delete.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Remove a previously-stored piece of data.</summary>\r\n    ///   <param name=\"list\" type=\"String\">An array or space-separated string naming the pieces of data to delete.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'removeProp': function() {\r\n    /// <signature>\r\n    ///   <summary>Remove a property for the set of matched elements.</summary>\r\n    ///   <param name=\"propertyName\" type=\"String\">The name of the property to remove.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'replaceAll': function() {\r\n    /// <signature>\r\n    ///   <summary>Replace each target element with the set of matched elements.</summary>\r\n    ///   <param name=\"target\" type=\"String\">A selector expression indicating which element(s) to replace.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'replaceWith': function() {\r\n    /// <signature>\r\n    ///   <summary>Replace each element in the set of matched elements with the provided new content and return the set of elements that was removed.</summary>\r\n    ///   <param name=\"newContent\" type=\"jQuery\">The content to insert. May be an HTML string, DOM element, or jQuery object.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Replace each element in the set of matched elements with the provided new content and return the set of elements that was removed.</summary>\r\n    ///   <param name=\"function\" type=\"Function\">A function that returns content with which to replace the set of matched elements.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'reset': function() {\r\n    /// <summary>Selects all elements of type reset.</summary>\r\n  },\r\n  'resize': function() {\r\n    /// <signature>\r\n    ///   <summary>Bind an event handler to the \"resize\" JavaScript event, or trigger that event on an element.</summary>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Bind an event handler to the \"resize\" JavaScript event, or trigger that event on an element.</summary>\r\n    ///   <param name=\"eventData\" type=\"PlainObject\">An object containing data that will be passed to the event handler.</param>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'root': function() {\r\n    /// <signature>\r\n    ///   <summary>Selects the element that is the root of the document.</summary>\r\n    ///   <param name=\"index\" type=\"String\">The index of each child to match, starting with 1, the string even or odd, or an equation ( eg. :nth-last-child(even), :nth-last-child(4n) )</param>\r\n    /// </signature>\r\n  },\r\n  'scroll': function() {\r\n    /// <signature>\r\n    ///   <summary>Bind an event handler to the \"scroll\" JavaScript event, or trigger that event on an element.</summary>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Bind an event handler to the \"scroll\" JavaScript event, or trigger that event on an element.</summary>\r\n    ///   <param name=\"eventData\" type=\"PlainObject\">An object containing data that will be passed to the event handler.</param>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'scrollLeft': function() {\r\n    /// <signature>\r\n    ///   <summary>Set the current horizontal position of the scroll bar for each of the set of matched elements.</summary>\r\n    ///   <param name=\"value\" type=\"Number\">An integer indicating the new position to set the scroll bar to.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'scrollTop': function() {\r\n    /// <signature>\r\n    ///   <summary>Set the current vertical position of the scroll bar for each of the set of matched elements.</summary>\r\n    ///   <param name=\"value\" type=\"Number\">An integer indicating the new position to set the scroll bar to.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'select': function() {\r\n    /// <signature>\r\n    ///   <summary>Bind an event handler to the \"select\" JavaScript event, or trigger that event on an element.</summary>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Bind an event handler to the \"select\" JavaScript event, or trigger that event on an element.</summary>\r\n    ///   <param name=\"eventData\" type=\"PlainObject\">An object containing data that will be passed to the event handler.</param>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'selected': function() {\r\n    /// <summary>Selects all elements that are selected.</summary>\r\n  },\r\n  'selector': function() {\r\n    /// <summary>A selector representing selector originally passed to jQuery().</summary>\r\n    /// <returns type=\"String\" />\r\n  },\r\n  'serialize': function() {\r\n    /// <summary>Encode a set of form elements as a string for submission.</summary>\r\n    /// <returns type=\"String\" />\r\n  },\r\n  'serializeArray': function() {\r\n    /// <summary>Encode a set of form elements as an array of names and values.</summary>\r\n    /// <returns type=\"Array\" />\r\n  },\r\n  'show': function() {\r\n    /// <signature>\r\n    ///   <summary>Display the matched elements.</summary>\r\n    ///   <param name=\"duration\" type=\"\">A string or number determining how long the animation will run.</param>\r\n    ///   <param name=\"complete\" type=\"Function\">A function to call once the animation is complete.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Display the matched elements.</summary>\r\n    ///   <param name=\"options\" type=\"PlainObject\">A map of additional options to pass to the method.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Display the matched elements.</summary>\r\n    ///   <param name=\"duration\" type=\"\">A string or number determining how long the animation will run.</param>\r\n    ///   <param name=\"easing\" type=\"String\">A string indicating which easing function to use for the transition.</param>\r\n    ///   <param name=\"complete\" type=\"Function\">A function to call once the animation is complete.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'siblings': function() {\r\n    /// <signature>\r\n    ///   <summary>Get the siblings of each element in the set of matched elements, optionally filtered by a selector.</summary>\r\n    ///   <param name=\"selector\" type=\"String\">A string containing a selector expression to match elements against.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'size': function() {\r\n    /// <summary>Return the number of elements in the jQuery object.</summary>\r\n    /// <returns type=\"Number\" />\r\n  },\r\n  'slice': function() {\r\n    /// <signature>\r\n    ///   <summary>Reduce the set of matched elements to a subset specified by a range of indices.</summary>\r\n    ///   <param name=\"start\" type=\"Number\">An integer indicating the 0-based position at which the elements begin to be selected. If negative, it indicates an offset from the end of the set.</param>\r\n    ///   <param name=\"end\" type=\"Number\">An integer indicating the 0-based position at which the elements stop being selected. If negative, it indicates an offset from the end of the set. If omitted, the range continues until the end of the set.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'slideDown': function() {\r\n    /// <signature>\r\n    ///   <summary>Display the matched elements with a sliding motion.</summary>\r\n    ///   <param name=\"duration\" type=\"\">A string or number determining how long the animation will run.</param>\r\n    ///   <param name=\"complete\" type=\"Function\">A function to call once the animation is complete.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Display the matched elements with a sliding motion.</summary>\r\n    ///   <param name=\"options\" type=\"PlainObject\">A map of additional options to pass to the method.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Display the matched elements with a sliding motion.</summary>\r\n    ///   <param name=\"duration\" type=\"\">A string or number determining how long the animation will run.</param>\r\n    ///   <param name=\"easing\" type=\"String\">A string indicating which easing function to use for the transition.</param>\r\n    ///   <param name=\"complete\" type=\"Function\">A function to call once the animation is complete.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'slideToggle': function() {\r\n    /// <signature>\r\n    ///   <summary>Display or hide the matched elements with a sliding motion.</summary>\r\n    ///   <param name=\"duration\" type=\"\">A string or number determining how long the animation will run.</param>\r\n    ///   <param name=\"complete\" type=\"Function\">A function to call once the animation is complete.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Display or hide the matched elements with a sliding motion.</summary>\r\n    ///   <param name=\"options\" type=\"PlainObject\">A map of additional options to pass to the method.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Display or hide the matched elements with a sliding motion.</summary>\r\n    ///   <param name=\"duration\" type=\"\">A string or number determining how long the animation will run.</param>\r\n    ///   <param name=\"easing\" type=\"String\">A string indicating which easing function to use for the transition.</param>\r\n    ///   <param name=\"complete\" type=\"Function\">A function to call once the animation is complete.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'slideUp': function() {\r\n    /// <signature>\r\n    ///   <summary>Hide the matched elements with a sliding motion.</summary>\r\n    ///   <param name=\"duration\" type=\"\">A string or number determining how long the animation will run.</param>\r\n    ///   <param name=\"complete\" type=\"Function\">A function to call once the animation is complete.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Hide the matched elements with a sliding motion.</summary>\r\n    ///   <param name=\"options\" type=\"PlainObject\">A map of additional options to pass to the method.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Hide the matched elements with a sliding motion.</summary>\r\n    ///   <param name=\"duration\" type=\"\">A string or number determining how long the animation will run.</param>\r\n    ///   <param name=\"easing\" type=\"String\">A string indicating which easing function to use for the transition.</param>\r\n    ///   <param name=\"complete\" type=\"Function\">A function to call once the animation is complete.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'stop': function() {\r\n    /// <signature>\r\n    ///   <summary>Stop the currently-running animation on the matched elements.</summary>\r\n    ///   <param name=\"clearQueue\" type=\"Boolean\">A Boolean indicating whether to remove queued animation as well. Defaults to false.</param>\r\n    ///   <param name=\"jumpToEnd\" type=\"Boolean\">A Boolean indicating whether to complete the current animation immediately. Defaults to false.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Stop the currently-running animation on the matched elements.</summary>\r\n    ///   <param name=\"queue\" type=\"String\">The name of the queue in which to stop animations.</param>\r\n    ///   <param name=\"clearQueue\" type=\"Boolean\">A Boolean indicating whether to remove queued animation as well. Defaults to false.</param>\r\n    ///   <param name=\"jumpToEnd\" type=\"Boolean\">A Boolean indicating whether to complete the current animation immediately. Defaults to false.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'submit': function() {\r\n    /// <signature>\r\n    ///   <summary>Bind an event handler to the \"submit\" JavaScript event, or trigger that event on an element.</summary>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Bind an event handler to the \"submit\" JavaScript event, or trigger that event on an element.</summary>\r\n    ///   <param name=\"eventData\" type=\"PlainObject\">An object containing data that will be passed to the event handler.</param>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'target': function() {\r\n    /// <summary>Selects the target element indicated by the fragment identifier of the document's URI.</summary>\r\n  },\r\n  'text': function() {\r\n    /// <signature>\r\n    ///   <summary>Set the content of each element in the set of matched elements to the specified text.</summary>\r\n    ///   <param name=\"textString\" type=\"String\">A string of text to set as the content of each matched element.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Set the content of each element in the set of matched elements to the specified text.</summary>\r\n    ///   <param name=\"function(index, text)\" type=\"Function\">A function returning the text content to set. Receives the index position of the element in the set and the old text value as arguments.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'toArray': function() {\r\n    /// <summary>Retrieve all the DOM elements contained in the jQuery set, as an array.</summary>\r\n    /// <returns type=\"Array\" />\r\n  },\r\n  'toggle': function() {\r\n    /// <signature>\r\n    ///   <summary>Display or hide the matched elements.</summary>\r\n    ///   <param name=\"duration\" type=\"\">A string or number determining how long the animation will run.</param>\r\n    ///   <param name=\"complete\" type=\"Function\">A function to call once the animation is complete.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Display or hide the matched elements.</summary>\r\n    ///   <param name=\"options\" type=\"PlainObject\">A map of additional options to pass to the method.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Display or hide the matched elements.</summary>\r\n    ///   <param name=\"duration\" type=\"\">A string or number determining how long the animation will run.</param>\r\n    ///   <param name=\"easing\" type=\"String\">A string indicating which easing function to use for the transition.</param>\r\n    ///   <param name=\"complete\" type=\"Function\">A function to call once the animation is complete.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Display or hide the matched elements.</summary>\r\n    ///   <param name=\"showOrHide\" type=\"Boolean\">A Boolean indicating whether to show or hide the elements.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'toggleClass': function() {\r\n    /// <signature>\r\n    ///   <summary>Add or remove one or more classes from each element in the set of matched elements, depending on either the class's presence or the value of the switch argument.</summary>\r\n    ///   <param name=\"className\" type=\"String\">One or more class names (separated by spaces) to be toggled for each element in the matched set.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Add or remove one or more classes from each element in the set of matched elements, depending on either the class's presence or the value of the switch argument.</summary>\r\n    ///   <param name=\"className\" type=\"String\">One or more class names (separated by spaces) to be toggled for each element in the matched set.</param>\r\n    ///   <param name=\"switch\" type=\"Boolean\">A Boolean (not just truthy/falsy) value to determine whether the class should be added or removed.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Add or remove one or more classes from each element in the set of matched elements, depending on either the class's presence or the value of the switch argument.</summary>\r\n    ///   <param name=\"switch\" type=\"Boolean\">A boolean value to determine whether the class should be added or removed.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Add or remove one or more classes from each element in the set of matched elements, depending on either the class's presence or the value of the switch argument.</summary>\r\n    ///   <param name=\"function(index, class, switch)\" type=\"Function\">A function that returns class names to be toggled in the class attribute of each element in the matched set. Receives the index position of the element in the set, the old class value, and the switch as arguments.</param>\r\n    ///   <param name=\"switch\" type=\"Boolean\">A boolean value to determine whether the class should be added or removed.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'trigger': function() {\r\n    /// <signature>\r\n    ///   <summary>Execute all handlers and behaviors attached to the matched elements for the given event type.</summary>\r\n    ///   <param name=\"eventType\" type=\"String\">A string containing a JavaScript event type, such as click or submit.</param>\r\n    ///   <param name=\"extraParameters\" type=\"PlainObject\">Additional parameters to pass along to the event handler.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Execute all handlers and behaviors attached to the matched elements for the given event type.</summary>\r\n    ///   <param name=\"event\" type=\"Event\">A jQuery.Event object.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'triggerHandler': function() {\r\n    /// <signature>\r\n    ///   <summary>Execute all handlers attached to an element for an event.</summary>\r\n    ///   <param name=\"eventType\" type=\"String\">A string containing a JavaScript event type, such as click or submit.</param>\r\n    ///   <param name=\"extraParameters\" type=\"Array\">An array of additional parameters to pass along to the event handler.</param>\r\n    ///   <returns type=\"Object\" />\r\n    /// </signature>\r\n  },\r\n  'unbind': function() {\r\n    /// <signature>\r\n    ///   <summary>Remove a previously-attached event handler from the elements.</summary>\r\n    ///   <param name=\"eventType\" type=\"String\">A string containing a JavaScript event type, such as click or submit.</param>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">The function that is to be no longer executed.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Remove a previously-attached event handler from the elements.</summary>\r\n    ///   <param name=\"eventType\" type=\"String\">A string containing a JavaScript event type, such as click or submit.</param>\r\n    ///   <param name=\"false\" type=\"Boolean\">Unbinds the corresponding 'return false' function that was bound using .bind( eventType, false ).</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Remove a previously-attached event handler from the elements.</summary>\r\n    ///   <param name=\"event\" type=\"Object\">A JavaScript event object as passed to an event handler.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'undelegate': function() {\r\n    /// <signature>\r\n    ///   <summary>Remove a handler from the event for all elements which match the current selector, based upon a specific set of root elements.</summary>\r\n    ///   <param name=\"selector\" type=\"String\">A selector which will be used to filter the event results.</param>\r\n    ///   <param name=\"eventType\" type=\"String\">A string containing a JavaScript event type, such as \"click\" or \"keydown\"</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Remove a handler from the event for all elements which match the current selector, based upon a specific set of root elements.</summary>\r\n    ///   <param name=\"selector\" type=\"String\">A selector which will be used to filter the event results.</param>\r\n    ///   <param name=\"eventType\" type=\"String\">A string containing a JavaScript event type, such as \"click\" or \"keydown\"</param>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute at the time the event is triggered.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Remove a handler from the event for all elements which match the current selector, based upon a specific set of root elements.</summary>\r\n    ///   <param name=\"selector\" type=\"String\">A selector which will be used to filter the event results.</param>\r\n    ///   <param name=\"events\" type=\"PlainObject\">An object of one or more event types and previously bound functions to unbind from them.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Remove a handler from the event for all elements which match the current selector, based upon a specific set of root elements.</summary>\r\n    ///   <param name=\"namespace\" type=\"String\">A string containing a namespace to unbind all events from.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'unload': function() {\r\n    /// <signature>\r\n    ///   <summary>Bind an event handler to the \"unload\" JavaScript event.</summary>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute when the event is triggered.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Bind an event handler to the \"unload\" JavaScript event.</summary>\r\n    ///   <param name=\"eventData\" type=\"Object\">A plain object of data that will be passed to the event handler.</param>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'unwrap': function() {\r\n    /// <summary>Remove the parents of the set of matched elements from the DOM, leaving the matched elements in their place.</summary>\r\n    /// <returns type=\"jQuery\" />\r\n  },\r\n  'val': function() {\r\n    /// <signature>\r\n    ///   <summary>Set the value of each element in the set of matched elements.</summary>\r\n    ///   <param name=\"value\" type=\"Array\">A string of text or an array of strings corresponding to the value of each matched element to set as selected/checked.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Set the value of each element in the set of matched elements.</summary>\r\n    ///   <param name=\"function(index, value)\" type=\"Function\">A function returning the value to set. this is the current element. Receives the index position of the element in the set and the old value as arguments.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'visible': function() {\r\n    /// <summary>Selects all elements that are visible.</summary>\r\n  },\r\n  'width': function() {\r\n    /// <signature>\r\n    ///   <summary>Set the CSS width of each element in the set of matched elements.</summary>\r\n    ///   <param name=\"value\" type=\"Number\">An integer representing the number of pixels, or an integer along with an optional unit of measure appended (as a string).</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Set the CSS width of each element in the set of matched elements.</summary>\r\n    ///   <param name=\"function(index, width)\" type=\"Function\">A function returning the width to set. Receives the index position of the element in the set and the old width as arguments. Within the function, this refers to the current element in the set.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'wrap': function() {\r\n    /// <signature>\r\n    ///   <summary>Wrap an HTML structure around each element in the set of matched elements.</summary>\r\n    ///   <param name=\"wrappingElement\" type=\"jQuery\">An HTML snippet, selector expression, jQuery object, or DOM element specifying the structure to wrap around the matched elements.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Wrap an HTML structure around each element in the set of matched elements.</summary>\r\n    ///   <param name=\"function(index)\" type=\"Function\">A callback function returning the HTML content or jQuery object to wrap around the matched elements. Receives the index position of the element in the set as an argument. Within the function, this refers to the current element in the set.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'wrapAll': function() {\r\n    /// <signature>\r\n    ///   <summary>Wrap an HTML structure around all elements in the set of matched elements.</summary>\r\n    ///   <param name=\"wrappingElement\" type=\"jQuery\">An HTML snippet, selector expression, jQuery object, or DOM element specifying the structure to wrap around the matched elements.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'wrapInner': function() {\r\n    /// <signature>\r\n    ///   <summary>Wrap an HTML structure around the content of each element in the set of matched elements.</summary>\r\n    ///   <param name=\"wrappingElement\" type=\"String\">An HTML snippet, selector expression, jQuery object, or DOM element specifying the structure to wrap around the content of the matched elements.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Wrap an HTML structure around the content of each element in the set of matched elements.</summary>\r\n    ///   <param name=\"function(index)\" type=\"Function\">A callback function which generates a structure to wrap around the content of the matched elements. Receives the index position of the element in the set as an argument. Within the function, this refers to the current element in the set.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n});\r\n\r\nintellisense.annotate(window, {\r\n  '$': function() {\r\n    /// <signature>\r\n    ///   <summary>Accepts a string containing a CSS selector which is then used to match a set of elements.</summary>\r\n    ///   <param name=\"selector\" type=\"String\">A string containing a selector expression</param>\r\n    ///   <param name=\"context\" type=\"jQuery\">A DOM Element, Document, or jQuery to use as context</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Accepts a string containing a CSS selector which is then used to match a set of elements.</summary>\r\n    ///   <param name=\"element\" type=\"Element\">A DOM element to wrap in a jQuery object.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Accepts a string containing a CSS selector which is then used to match a set of elements.</summary>\r\n    ///   <param name=\"elementArray\" type=\"Array\">An array containing a set of DOM elements to wrap in a jQuery object.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Accepts a string containing a CSS selector which is then used to match a set of elements.</summary>\r\n    ///   <param name=\"object\" type=\"PlainObject\">A plain object to wrap in a jQuery object.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Accepts a string containing a CSS selector which is then used to match a set of elements.</summary>\r\n    ///   <param name=\"jQuery object\" type=\"PlainObject\">An existing jQuery object to clone.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n});\r\n\r\n"
  },
  {
    "path": "23 - Architecting Application User Interfaces/PPPDDD.NonDist.UIComp/PPPDDD.NonDist.UIComp/Scripts/jquery-1.10.2.js",
    "content": "/* NUGET: BEGIN LICENSE TEXT\n *\n * Microsoft grants you the right to use these script files for the sole\n * purpose of either: (i) interacting through your browser with the Microsoft\n * website or online service, subject to the applicable licensing or use\n * terms; or (ii) using the files as included with a Microsoft product subject\n * to that product's license terms. Microsoft reserves all other rights to the\n * files not expressly granted by Microsoft, whether by implication, estoppel\n * or otherwise. Insofar as a script file is dual licensed under GPL,\n * Microsoft neither took the code under GPL nor distributes it thereunder but\n * under the terms set out in this paragraph. All notices and licenses\n * below are for informational purposes only.\n *\n * NUGET: END LICENSE TEXT */\n/*!\n * jQuery JavaScript Library v1.10.2\n * http://jquery.com/\n *\n * Includes Sizzle.js\n * http://sizzlejs.com/\n *\n * Copyright 2005, 2013 jQuery Foundation, Inc. and other contributors\n * Released under the MIT license\n * http://jquery.org/license\n *\n * Date: 2013-07-03T13:48Z\n */\n(function( window, undefined ) {\n\n// Can't do this because several apps including ASP.NET trace\n// the stack via arguments.caller.callee and Firefox dies if\n// you try to trace through \"use strict\" call chains. (#13335)\n// Support: Firefox 18+\n//\"use strict\";\nvar\n\t// The deferred used on DOM ready\n\treadyList,\n\n\t// A central reference to the root jQuery(document)\n\trootjQuery,\n\n\t// Support: IE<10\n\t// For `typeof xmlNode.method` instead of `xmlNode.method !== undefined`\n\tcore_strundefined = typeof undefined,\n\n\t// Use the correct document accordingly with window argument (sandbox)\n\tlocation = window.location,\n\tdocument = window.document,\n\tdocElem = document.documentElement,\n\n\t// Map over jQuery in case of overwrite\n\t_jQuery = window.jQuery,\n\n\t// Map over the $ in case of overwrite\n\t_$ = window.$,\n\n\t// [[Class]] -> type pairs\n\tclass2type = {},\n\n\t// List of deleted data cache ids, so we can reuse them\n\tcore_deletedIds = [],\n\n\tcore_version = \"1.10.2\",\n\n\t// Save a reference to some core methods\n\tcore_concat = core_deletedIds.concat,\n\tcore_push = core_deletedIds.push,\n\tcore_slice = core_deletedIds.slice,\n\tcore_indexOf = core_deletedIds.indexOf,\n\tcore_toString = class2type.toString,\n\tcore_hasOwn = class2type.hasOwnProperty,\n\tcore_trim = core_version.trim,\n\n\t// Define a local copy of jQuery\n\tjQuery = function( selector, context ) {\n\t\t// The jQuery object is actually just the init constructor 'enhanced'\n\t\treturn new jQuery.fn.init( selector, context, rootjQuery );\n\t},\n\n\t// Used for matching numbers\n\tcore_pnum = /[+-]?(?:\\d*\\.|)\\d+(?:[eE][+-]?\\d+|)/.source,\n\n\t// Used for splitting on whitespace\n\tcore_rnotwhite = /\\S+/g,\n\n\t// Make sure we trim BOM and NBSP (here's looking at you, Safari 5.0 and IE)\n\trtrim = /^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g,\n\n\t// A simple way to check for HTML strings\n\t// Prioritize #id over <tag> to avoid XSS via location.hash (#9521)\n\t// Strict HTML recognition (#11290: must start with <)\n\trquickExpr = /^(?:\\s*(<[\\w\\W]+>)[^>]*|#([\\w-]*))$/,\n\n\t// Match a standalone tag\n\trsingleTag = /^<(\\w+)\\s*\\/?>(?:<\\/\\1>|)$/,\n\n\t// JSON RegExp\n\trvalidchars = /^[\\],:{}\\s]*$/,\n\trvalidbraces = /(?:^|:|,)(?:\\s*\\[)+/g,\n\trvalidescape = /\\\\(?:[\"\\\\\\/bfnrt]|u[\\da-fA-F]{4})/g,\n\trvalidtokens = /\"[^\"\\\\\\r\\n]*\"|true|false|null|-?(?:\\d+\\.|)\\d+(?:[eE][+-]?\\d+|)/g,\n\n\t// Matches dashed string for camelizing\n\trmsPrefix = /^-ms-/,\n\trdashAlpha = /-([\\da-z])/gi,\n\n\t// Used by jQuery.camelCase as callback to replace()\n\tfcamelCase = function( all, letter ) {\n\t\treturn letter.toUpperCase();\n\t},\n\n\t// The ready event handler\n\tcompleted = function( event ) {\n\n\t\t// readyState === \"complete\" is good enough for us to call the dom ready in oldIE\n\t\tif ( document.addEventListener || event.type === \"load\" || document.readyState === \"complete\" ) {\n\t\t\tdetach();\n\t\t\tjQuery.ready();\n\t\t}\n\t},\n\t// Clean-up method for dom ready events\n\tdetach = function() {\n\t\tif ( document.addEventListener ) {\n\t\t\tdocument.removeEventListener( \"DOMContentLoaded\", completed, false );\n\t\t\twindow.removeEventListener( \"load\", completed, false );\n\n\t\t} else {\n\t\t\tdocument.detachEvent( \"onreadystatechange\", completed );\n\t\t\twindow.detachEvent( \"onload\", completed );\n\t\t}\n\t};\n\njQuery.fn = jQuery.prototype = {\n\t// The current version of jQuery being used\n\tjquery: core_version,\n\n\tconstructor: jQuery,\n\tinit: function( selector, context, rootjQuery ) {\n\t\tvar match, elem;\n\n\t\t// HANDLE: $(\"\"), $(null), $(undefined), $(false)\n\t\tif ( !selector ) {\n\t\t\treturn this;\n\t\t}\n\n\t\t// Handle HTML strings\n\t\tif ( typeof selector === \"string\" ) {\n\t\t\tif ( selector.charAt(0) === \"<\" && selector.charAt( selector.length - 1 ) === \">\" && selector.length >= 3 ) {\n\t\t\t\t// Assume that strings that start and end with <> are HTML and skip the regex check\n\t\t\t\tmatch = [ null, selector, null ];\n\n\t\t\t} else {\n\t\t\t\tmatch = rquickExpr.exec( selector );\n\t\t\t}\n\n\t\t\t// Match html or make sure no context is specified for #id\n\t\t\tif ( match && (match[1] || !context) ) {\n\n\t\t\t\t// HANDLE: $(html) -> $(array)\n\t\t\t\tif ( match[1] ) {\n\t\t\t\t\tcontext = context instanceof jQuery ? context[0] : context;\n\n\t\t\t\t\t// scripts is true for back-compat\n\t\t\t\t\tjQuery.merge( this, jQuery.parseHTML(\n\t\t\t\t\t\tmatch[1],\n\t\t\t\t\t\tcontext && context.nodeType ? context.ownerDocument || context : document,\n\t\t\t\t\t\ttrue\n\t\t\t\t\t) );\n\n\t\t\t\t\t// HANDLE: $(html, props)\n\t\t\t\t\tif ( rsingleTag.test( match[1] ) && jQuery.isPlainObject( context ) ) {\n\t\t\t\t\t\tfor ( match in context ) {\n\t\t\t\t\t\t\t// Properties of context are called as methods if possible\n\t\t\t\t\t\t\tif ( jQuery.isFunction( this[ match ] ) ) {\n\t\t\t\t\t\t\t\tthis[ match ]( context[ match ] );\n\n\t\t\t\t\t\t\t// ...and otherwise set as attributes\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthis.attr( match, context[ match ] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\treturn this;\n\n\t\t\t\t// HANDLE: $(#id)\n\t\t\t\t} else {\n\t\t\t\t\telem = document.getElementById( match[2] );\n\n\t\t\t\t\t// Check parentNode to catch when Blackberry 4.6 returns\n\t\t\t\t\t// nodes that are no longer in the document #6963\n\t\t\t\t\tif ( elem && elem.parentNode ) {\n\t\t\t\t\t\t// Handle the case where IE and Opera return items\n\t\t\t\t\t\t// by name instead of ID\n\t\t\t\t\t\tif ( elem.id !== match[2] ) {\n\t\t\t\t\t\t\treturn rootjQuery.find( selector );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Otherwise, we inject the element directly into the jQuery object\n\t\t\t\t\t\tthis.length = 1;\n\t\t\t\t\t\tthis[0] = elem;\n\t\t\t\t\t}\n\n\t\t\t\t\tthis.context = document;\n\t\t\t\t\tthis.selector = selector;\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\n\t\t\t// HANDLE: $(expr, $(...))\n\t\t\t} else if ( !context || context.jquery ) {\n\t\t\t\treturn ( context || rootjQuery ).find( selector );\n\n\t\t\t// HANDLE: $(expr, context)\n\t\t\t// (which is just equivalent to: $(context).find(expr)\n\t\t\t} else {\n\t\t\t\treturn this.constructor( context ).find( selector );\n\t\t\t}\n\n\t\t// HANDLE: $(DOMElement)\n\t\t} else if ( selector.nodeType ) {\n\t\t\tthis.context = this[0] = selector;\n\t\t\tthis.length = 1;\n\t\t\treturn this;\n\n\t\t// HANDLE: $(function)\n\t\t// Shortcut for document ready\n\t\t} else if ( jQuery.isFunction( selector ) ) {\n\t\t\treturn rootjQuery.ready( selector );\n\t\t}\n\n\t\tif ( selector.selector !== undefined ) {\n\t\t\tthis.selector = selector.selector;\n\t\t\tthis.context = selector.context;\n\t\t}\n\n\t\treturn jQuery.makeArray( selector, this );\n\t},\n\n\t// Start with an empty selector\n\tselector: \"\",\n\n\t// The default length of a jQuery object is 0\n\tlength: 0,\n\n\ttoArray: function() {\n\t\treturn core_slice.call( this );\n\t},\n\n\t// Get the Nth element in the matched element set OR\n\t// Get the whole matched element set as a clean array\n\tget: function( num ) {\n\t\treturn num == null ?\n\n\t\t\t// Return a 'clean' array\n\t\t\tthis.toArray() :\n\n\t\t\t// Return just the object\n\t\t\t( num < 0 ? this[ this.length + num ] : this[ num ] );\n\t},\n\n\t// Take an array of elements and push it onto the stack\n\t// (returning the new matched element set)\n\tpushStack: function( elems ) {\n\n\t\t// Build a new jQuery matched element set\n\t\tvar ret = jQuery.merge( this.constructor(), elems );\n\n\t\t// Add the old object onto the stack (as a reference)\n\t\tret.prevObject = this;\n\t\tret.context = this.context;\n\n\t\t// Return the newly-formed element set\n\t\treturn ret;\n\t},\n\n\t// Execute a callback for every element in the matched set.\n\t// (You can seed the arguments with an array of args, but this is\n\t// only used internally.)\n\teach: function( callback, args ) {\n\t\treturn jQuery.each( this, callback, args );\n\t},\n\n\tready: function( fn ) {\n\t\t// Add the callback\n\t\tjQuery.ready.promise().done( fn );\n\n\t\treturn this;\n\t},\n\n\tslice: function() {\n\t\treturn this.pushStack( core_slice.apply( this, arguments ) );\n\t},\n\n\tfirst: function() {\n\t\treturn this.eq( 0 );\n\t},\n\n\tlast: function() {\n\t\treturn this.eq( -1 );\n\t},\n\n\teq: function( i ) {\n\t\tvar len = this.length,\n\t\t\tj = +i + ( i < 0 ? len : 0 );\n\t\treturn this.pushStack( j >= 0 && j < len ? [ this[j] ] : [] );\n\t},\n\n\tmap: function( callback ) {\n\t\treturn this.pushStack( jQuery.map(this, function( elem, i ) {\n\t\t\treturn callback.call( elem, i, elem );\n\t\t}));\n\t},\n\n\tend: function() {\n\t\treturn this.prevObject || this.constructor(null);\n\t},\n\n\t// For internal use only.\n\t// Behaves like an Array's method, not like a jQuery method.\n\tpush: core_push,\n\tsort: [].sort,\n\tsplice: [].splice\n};\n\n// Give the init function the jQuery prototype for later instantiation\njQuery.fn.init.prototype = jQuery.fn;\n\njQuery.extend = jQuery.fn.extend = function() {\n\tvar src, copyIsArray, copy, name, options, clone,\n\t\ttarget = arguments[0] || {},\n\t\ti = 1,\n\t\tlength = arguments.length,\n\t\tdeep = false;\n\n\t// Handle a deep copy situation\n\tif ( typeof target === \"boolean\" ) {\n\t\tdeep = target;\n\t\ttarget = arguments[1] || {};\n\t\t// skip the boolean and the target\n\t\ti = 2;\n\t}\n\n\t// Handle case when target is a string or something (possible in deep copy)\n\tif ( typeof target !== \"object\" && !jQuery.isFunction(target) ) {\n\t\ttarget = {};\n\t}\n\n\t// extend jQuery itself if only one argument is passed\n\tif ( length === i ) {\n\t\ttarget = this;\n\t\t--i;\n\t}\n\n\tfor ( ; i < length; i++ ) {\n\t\t// Only deal with non-null/undefined values\n\t\tif ( (options = arguments[ i ]) != null ) {\n\t\t\t// Extend the base object\n\t\t\tfor ( name in options ) {\n\t\t\t\tsrc = target[ name ];\n\t\t\t\tcopy = options[ name ];\n\n\t\t\t\t// Prevent never-ending loop\n\t\t\t\tif ( target === copy ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// Recurse if we're merging plain objects or arrays\n\t\t\t\tif ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) {\n\t\t\t\t\tif ( copyIsArray ) {\n\t\t\t\t\t\tcopyIsArray = false;\n\t\t\t\t\t\tclone = src && jQuery.isArray(src) ? src : [];\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\tclone = src && jQuery.isPlainObject(src) ? src : {};\n\t\t\t\t\t}\n\n\t\t\t\t\t// Never move original objects, clone them\n\t\t\t\t\ttarget[ name ] = jQuery.extend( deep, clone, copy );\n\n\t\t\t\t// Don't bring in undefined values\n\t\t\t\t} else if ( copy !== undefined ) {\n\t\t\t\t\ttarget[ name ] = copy;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Return the modified object\n\treturn target;\n};\n\njQuery.extend({\n\t// Unique for each copy of jQuery on the page\n\t// Non-digits removed to match rinlinejQuery\n\texpando: \"jQuery\" + ( core_version + Math.random() ).replace( /\\D/g, \"\" ),\n\n\tnoConflict: function( deep ) {\n\t\tif ( window.$ === jQuery ) {\n\t\t\twindow.$ = _$;\n\t\t}\n\n\t\tif ( deep && window.jQuery === jQuery ) {\n\t\t\twindow.jQuery = _jQuery;\n\t\t}\n\n\t\treturn jQuery;\n\t},\n\n\t// Is the DOM ready to be used? Set to true once it occurs.\n\tisReady: false,\n\n\t// A counter to track how many items to wait for before\n\t// the ready event fires. See #6781\n\treadyWait: 1,\n\n\t// Hold (or release) the ready event\n\tholdReady: function( hold ) {\n\t\tif ( hold ) {\n\t\t\tjQuery.readyWait++;\n\t\t} else {\n\t\t\tjQuery.ready( true );\n\t\t}\n\t},\n\n\t// Handle when the DOM is ready\n\tready: function( wait ) {\n\n\t\t// Abort if there are pending holds or we're already ready\n\t\tif ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).\n\t\tif ( !document.body ) {\n\t\t\treturn setTimeout( jQuery.ready );\n\t\t}\n\n\t\t// Remember that the DOM is ready\n\t\tjQuery.isReady = true;\n\n\t\t// If a normal DOM Ready event fired, decrement, and wait if need be\n\t\tif ( wait !== true && --jQuery.readyWait > 0 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// If there are functions bound, to execute\n\t\treadyList.resolveWith( document, [ jQuery ] );\n\n\t\t// Trigger any bound ready events\n\t\tif ( jQuery.fn.trigger ) {\n\t\t\tjQuery( document ).trigger(\"ready\").off(\"ready\");\n\t\t}\n\t},\n\n\t// See test/unit/core.js for details concerning isFunction.\n\t// Since version 1.3, DOM methods and functions like alert\n\t// aren't supported. They return false on IE (#2968).\n\tisFunction: function( obj ) {\n\t\treturn jQuery.type(obj) === \"function\";\n\t},\n\n\tisArray: Array.isArray || function( obj ) {\n\t\treturn jQuery.type(obj) === \"array\";\n\t},\n\n\tisWindow: function( obj ) {\n\t\t/* jshint eqeqeq: false */\n\t\treturn obj != null && obj == obj.window;\n\t},\n\n\tisNumeric: function( obj ) {\n\t\treturn !isNaN( parseFloat(obj) ) && isFinite( obj );\n\t},\n\n\ttype: function( obj ) {\n\t\tif ( obj == null ) {\n\t\t\treturn String( obj );\n\t\t}\n\t\treturn typeof obj === \"object\" || typeof obj === \"function\" ?\n\t\t\tclass2type[ core_toString.call(obj) ] || \"object\" :\n\t\t\ttypeof obj;\n\t},\n\n\tisPlainObject: function( obj ) {\n\t\tvar key;\n\n\t\t// Must be an Object.\n\t\t// Because of IE, we also have to check the presence of the constructor property.\n\t\t// Make sure that DOM nodes and window objects don't pass through, as well\n\t\tif ( !obj || jQuery.type(obj) !== \"object\" || obj.nodeType || jQuery.isWindow( obj ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\ttry {\n\t\t\t// Not own constructor property must be Object\n\t\t\tif ( obj.constructor &&\n\t\t\t\t!core_hasOwn.call(obj, \"constructor\") &&\n\t\t\t\t!core_hasOwn.call(obj.constructor.prototype, \"isPrototypeOf\") ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} catch ( e ) {\n\t\t\t// IE8,9 Will throw exceptions on certain host objects #9897\n\t\t\treturn false;\n\t\t}\n\n\t\t// Support: IE<9\n\t\t// Handle iteration over inherited properties before own properties.\n\t\tif ( jQuery.support.ownLast ) {\n\t\t\tfor ( key in obj ) {\n\t\t\t\treturn core_hasOwn.call( obj, key );\n\t\t\t}\n\t\t}\n\n\t\t// Own properties are enumerated firstly, so to speed up,\n\t\t// if last one is own, then all properties are own.\n\t\tfor ( key in obj ) {}\n\n\t\treturn key === undefined || core_hasOwn.call( obj, key );\n\t},\n\n\tisEmptyObject: function( obj ) {\n\t\tvar name;\n\t\tfor ( name in obj ) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t},\n\n\terror: function( msg ) {\n\t\tthrow new Error( msg );\n\t},\n\n\t// data: string of html\n\t// context (optional): If specified, the fragment will be created in this context, defaults to document\n\t// keepScripts (optional): If true, will include scripts passed in the html string\n\tparseHTML: function( data, context, keepScripts ) {\n\t\tif ( !data || typeof data !== \"string\" ) {\n\t\t\treturn null;\n\t\t}\n\t\tif ( typeof context === \"boolean\" ) {\n\t\t\tkeepScripts = context;\n\t\t\tcontext = false;\n\t\t}\n\t\tcontext = context || document;\n\n\t\tvar parsed = rsingleTag.exec( data ),\n\t\t\tscripts = !keepScripts && [];\n\n\t\t// Single tag\n\t\tif ( parsed ) {\n\t\t\treturn [ context.createElement( parsed[1] ) ];\n\t\t}\n\n\t\tparsed = jQuery.buildFragment( [ data ], context, scripts );\n\t\tif ( scripts ) {\n\t\t\tjQuery( scripts ).remove();\n\t\t}\n\t\treturn jQuery.merge( [], parsed.childNodes );\n\t},\n\n\tparseJSON: function( data ) {\n\t\t// Attempt to parse using the native JSON parser first\n\t\tif ( window.JSON && window.JSON.parse ) {\n\t\t\treturn window.JSON.parse( data );\n\t\t}\n\n\t\tif ( data === null ) {\n\t\t\treturn data;\n\t\t}\n\n\t\tif ( typeof data === \"string\" ) {\n\n\t\t\t// Make sure leading/trailing whitespace is removed (IE can't handle it)\n\t\t\tdata = jQuery.trim( data );\n\n\t\t\tif ( data ) {\n\t\t\t\t// Make sure the incoming data is actual JSON\n\t\t\t\t// Logic borrowed from http://json.org/json2.js\n\t\t\t\tif ( rvalidchars.test( data.replace( rvalidescape, \"@\" )\n\t\t\t\t\t.replace( rvalidtokens, \"]\" )\n\t\t\t\t\t.replace( rvalidbraces, \"\")) ) {\n\n\t\t\t\t\treturn ( new Function( \"return \" + data ) )();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tjQuery.error( \"Invalid JSON: \" + data );\n\t},\n\n\t// Cross-browser xml parsing\n\tparseXML: function( data ) {\n\t\tvar xml, tmp;\n\t\tif ( !data || typeof data !== \"string\" ) {\n\t\t\treturn null;\n\t\t}\n\t\ttry {\n\t\t\tif ( window.DOMParser ) { // Standard\n\t\t\t\ttmp = new DOMParser();\n\t\t\t\txml = tmp.parseFromString( data , \"text/xml\" );\n\t\t\t} else { // IE\n\t\t\t\txml = new ActiveXObject( \"Microsoft.XMLDOM\" );\n\t\t\t\txml.async = \"false\";\n\t\t\t\txml.loadXML( data );\n\t\t\t}\n\t\t} catch( e ) {\n\t\t\txml = undefined;\n\t\t}\n\t\tif ( !xml || !xml.documentElement || xml.getElementsByTagName( \"parsererror\" ).length ) {\n\t\t\tjQuery.error( \"Invalid XML: \" + data );\n\t\t}\n\t\treturn xml;\n\t},\n\n\tnoop: function() {},\n\n\t// Evaluates a script in a global context\n\t// Workarounds based on findings by Jim Driscoll\n\t// http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context\n\tglobalEval: function( data ) {\n\t\tif ( data && jQuery.trim( data ) ) {\n\t\t\t// We use execScript on Internet Explorer\n\t\t\t// We use an anonymous function so that context is window\n\t\t\t// rather than jQuery in Firefox\n\t\t\t( window.execScript || function( data ) {\n\t\t\t\twindow[ \"eval\" ].call( window, data );\n\t\t\t} )( data );\n\t\t}\n\t},\n\n\t// Convert dashed to camelCase; used by the css and data modules\n\t// Microsoft forgot to hump their vendor prefix (#9572)\n\tcamelCase: function( string ) {\n\t\treturn string.replace( rmsPrefix, \"ms-\" ).replace( rdashAlpha, fcamelCase );\n\t},\n\n\tnodeName: function( elem, name ) {\n\t\treturn elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();\n\t},\n\n\t// args is for internal usage only\n\teach: function( obj, callback, args ) {\n\t\tvar value,\n\t\t\ti = 0,\n\t\t\tlength = obj.length,\n\t\t\tisArray = isArraylike( obj );\n\n\t\tif ( args ) {\n\t\t\tif ( isArray ) {\n\t\t\t\tfor ( ; i < length; i++ ) {\n\t\t\t\t\tvalue = callback.apply( obj[ i ], args );\n\n\t\t\t\t\tif ( value === false ) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfor ( i in obj ) {\n\t\t\t\t\tvalue = callback.apply( obj[ i ], args );\n\n\t\t\t\t\tif ( value === false ) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t// A special, fast, case for the most common use of each\n\t\t} else {\n\t\t\tif ( isArray ) {\n\t\t\t\tfor ( ; i < length; i++ ) {\n\t\t\t\t\tvalue = callback.call( obj[ i ], i, obj[ i ] );\n\n\t\t\t\t\tif ( value === false ) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfor ( i in obj ) {\n\t\t\t\t\tvalue = callback.call( obj[ i ], i, obj[ i ] );\n\n\t\t\t\t\tif ( value === false ) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn obj;\n\t},\n\n\t// Use native String.trim function wherever possible\n\ttrim: core_trim && !core_trim.call(\"\\uFEFF\\xA0\") ?\n\t\tfunction( text ) {\n\t\t\treturn text == null ?\n\t\t\t\t\"\" :\n\t\t\t\tcore_trim.call( text );\n\t\t} :\n\n\t\t// Otherwise use our own trimming functionality\n\t\tfunction( text ) {\n\t\t\treturn text == null ?\n\t\t\t\t\"\" :\n\t\t\t\t( text + \"\" ).replace( rtrim, \"\" );\n\t\t},\n\n\t// results is for internal usage only\n\tmakeArray: function( arr, results ) {\n\t\tvar ret = results || [];\n\n\t\tif ( arr != null ) {\n\t\t\tif ( isArraylike( Object(arr) ) ) {\n\t\t\t\tjQuery.merge( ret,\n\t\t\t\t\ttypeof arr === \"string\" ?\n\t\t\t\t\t[ arr ] : arr\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tcore_push.call( ret, arr );\n\t\t\t}\n\t\t}\n\n\t\treturn ret;\n\t},\n\n\tinArray: function( elem, arr, i ) {\n\t\tvar len;\n\n\t\tif ( arr ) {\n\t\t\tif ( core_indexOf ) {\n\t\t\t\treturn core_indexOf.call( arr, elem, i );\n\t\t\t}\n\n\t\t\tlen = arr.length;\n\t\t\ti = i ? i < 0 ? Math.max( 0, len + i ) : i : 0;\n\n\t\t\tfor ( ; i < len; i++ ) {\n\t\t\t\t// Skip accessing in sparse arrays\n\t\t\t\tif ( i in arr && arr[ i ] === elem ) {\n\t\t\t\t\treturn i;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn -1;\n\t},\n\n\tmerge: function( first, second ) {\n\t\tvar l = second.length,\n\t\t\ti = first.length,\n\t\t\tj = 0;\n\n\t\tif ( typeof l === \"number\" ) {\n\t\t\tfor ( ; j < l; j++ ) {\n\t\t\t\tfirst[ i++ ] = second[ j ];\n\t\t\t}\n\t\t} else {\n\t\t\twhile ( second[j] !== undefined ) {\n\t\t\t\tfirst[ i++ ] = second[ j++ ];\n\t\t\t}\n\t\t}\n\n\t\tfirst.length = i;\n\n\t\treturn first;\n\t},\n\n\tgrep: function( elems, callback, inv ) {\n\t\tvar retVal,\n\t\t\tret = [],\n\t\t\ti = 0,\n\t\t\tlength = elems.length;\n\t\tinv = !!inv;\n\n\t\t// Go through the array, only saving the items\n\t\t// that pass the validator function\n\t\tfor ( ; i < length; i++ ) {\n\t\t\tretVal = !!callback( elems[ i ], i );\n\t\t\tif ( inv !== retVal ) {\n\t\t\t\tret.push( elems[ i ] );\n\t\t\t}\n\t\t}\n\n\t\treturn ret;\n\t},\n\n\t// arg is for internal usage only\n\tmap: function( elems, callback, arg ) {\n\t\tvar value,\n\t\t\ti = 0,\n\t\t\tlength = elems.length,\n\t\t\tisArray = isArraylike( elems ),\n\t\t\tret = [];\n\n\t\t// Go through the array, translating each of the items to their\n\t\tif ( isArray ) {\n\t\t\tfor ( ; i < length; i++ ) {\n\t\t\t\tvalue = callback( elems[ i ], i, arg );\n\n\t\t\t\tif ( value != null ) {\n\t\t\t\t\tret[ ret.length ] = value;\n\t\t\t\t}\n\t\t\t}\n\n\t\t// Go through every key on the object,\n\t\t} else {\n\t\t\tfor ( i in elems ) {\n\t\t\t\tvalue = callback( elems[ i ], i, arg );\n\n\t\t\t\tif ( value != null ) {\n\t\t\t\t\tret[ ret.length ] = value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Flatten any nested arrays\n\t\treturn core_concat.apply( [], ret );\n\t},\n\n\t// A global GUID counter for objects\n\tguid: 1,\n\n\t// Bind a function to a context, optionally partially applying any\n\t// arguments.\n\tproxy: function( fn, context ) {\n\t\tvar args, proxy, tmp;\n\n\t\tif ( typeof context === \"string\" ) {\n\t\t\ttmp = fn[ context ];\n\t\t\tcontext = fn;\n\t\t\tfn = tmp;\n\t\t}\n\n\t\t// Quick check to determine if target is callable, in the spec\n\t\t// this throws a TypeError, but we will just return undefined.\n\t\tif ( !jQuery.isFunction( fn ) ) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\t// Simulated bind\n\t\targs = core_slice.call( arguments, 2 );\n\t\tproxy = function() {\n\t\t\treturn fn.apply( context || this, args.concat( core_slice.call( arguments ) ) );\n\t\t};\n\n\t\t// Set the guid of unique handler to the same of original handler, so it can be removed\n\t\tproxy.guid = fn.guid = fn.guid || jQuery.guid++;\n\n\t\treturn proxy;\n\t},\n\n\t// Multifunctional method to get and set values of a collection\n\t// The value/s can optionally be executed if it's a function\n\taccess: function( elems, fn, key, value, chainable, emptyGet, raw ) {\n\t\tvar i = 0,\n\t\t\tlength = elems.length,\n\t\t\tbulk = key == null;\n\n\t\t// Sets many values\n\t\tif ( jQuery.type( key ) === \"object\" ) {\n\t\t\tchainable = true;\n\t\t\tfor ( i in key ) {\n\t\t\t\tjQuery.access( elems, fn, i, key[i], true, emptyGet, raw );\n\t\t\t}\n\n\t\t// Sets one value\n\t\t} else if ( value !== undefined ) {\n\t\t\tchainable = true;\n\n\t\t\tif ( !jQuery.isFunction( value ) ) {\n\t\t\t\traw = true;\n\t\t\t}\n\n\t\t\tif ( bulk ) {\n\t\t\t\t// Bulk operations run against the entire set\n\t\t\t\tif ( raw ) {\n\t\t\t\t\tfn.call( elems, value );\n\t\t\t\t\tfn = null;\n\n\t\t\t\t// ...except when executing function values\n\t\t\t\t} else {\n\t\t\t\t\tbulk = fn;\n\t\t\t\t\tfn = function( elem, key, value ) {\n\t\t\t\t\t\treturn bulk.call( jQuery( elem ), value );\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( fn ) {\n\t\t\t\tfor ( ; i < length; i++ ) {\n\t\t\t\t\tfn( elems[i], key, raw ? value : value.call( elems[i], i, fn( elems[i], key ) ) );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn chainable ?\n\t\t\telems :\n\n\t\t\t// Gets\n\t\t\tbulk ?\n\t\t\t\tfn.call( elems ) :\n\t\t\t\tlength ? fn( elems[0], key ) : emptyGet;\n\t},\n\n\tnow: function() {\n\t\treturn ( new Date() ).getTime();\n\t},\n\n\t// A method for quickly swapping in/out CSS properties to get correct calculations.\n\t// Note: this method belongs to the css module but it's needed here for the support module.\n\t// If support gets modularized, this method should be moved back to the css module.\n\tswap: function( elem, options, callback, args ) {\n\t\tvar ret, name,\n\t\t\told = {};\n\n\t\t// Remember the old values, and insert the new ones\n\t\tfor ( name in options ) {\n\t\t\told[ name ] = elem.style[ name ];\n\t\t\telem.style[ name ] = options[ name ];\n\t\t}\n\n\t\tret = callback.apply( elem, args || [] );\n\n\t\t// Revert the old values\n\t\tfor ( name in options ) {\n\t\t\telem.style[ name ] = old[ name ];\n\t\t}\n\n\t\treturn ret;\n\t}\n});\n\njQuery.ready.promise = function( obj ) {\n\tif ( !readyList ) {\n\n\t\treadyList = jQuery.Deferred();\n\n\t\t// Catch cases where $(document).ready() is called after the browser event has already occurred.\n\t\t// we once tried to use readyState \"interactive\" here, but it caused issues like the one\n\t\t// discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15\n\t\tif ( document.readyState === \"complete\" ) {\n\t\t\t// Handle it asynchronously to allow scripts the opportunity to delay ready\n\t\t\tsetTimeout( jQuery.ready );\n\n\t\t// Standards-based browsers support DOMContentLoaded\n\t\t} else if ( document.addEventListener ) {\n\t\t\t// Use the handy event callback\n\t\t\tdocument.addEventListener( \"DOMContentLoaded\", completed, false );\n\n\t\t\t// A fallback to window.onload, that will always work\n\t\t\twindow.addEventListener( \"load\", completed, false );\n\n\t\t// If IE event model is used\n\t\t} else {\n\t\t\t// Ensure firing before onload, maybe late but safe also for iframes\n\t\t\tdocument.attachEvent( \"onreadystatechange\", completed );\n\n\t\t\t// A fallback to window.onload, that will always work\n\t\t\twindow.attachEvent( \"onload\", completed );\n\n\t\t\t// If IE and not a frame\n\t\t\t// continually check to see if the document is ready\n\t\t\tvar top = false;\n\n\t\t\ttry {\n\t\t\t\ttop = window.frameElement == null && document.documentElement;\n\t\t\t} catch(e) {}\n\n\t\t\tif ( top && top.doScroll ) {\n\t\t\t\t(function doScrollCheck() {\n\t\t\t\t\tif ( !jQuery.isReady ) {\n\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t// Use the trick by Diego Perini\n\t\t\t\t\t\t\t// http://javascript.nwbox.com/IEContentLoaded/\n\t\t\t\t\t\t\ttop.doScroll(\"left\");\n\t\t\t\t\t\t} catch(e) {\n\t\t\t\t\t\t\treturn setTimeout( doScrollCheck, 50 );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// detach all dom ready events\n\t\t\t\t\t\tdetach();\n\n\t\t\t\t\t\t// and execute any waiting functions\n\t\t\t\t\t\tjQuery.ready();\n\t\t\t\t\t}\n\t\t\t\t})();\n\t\t\t}\n\t\t}\n\t}\n\treturn readyList.promise( obj );\n};\n\n// Populate the class2type map\njQuery.each(\"Boolean Number String Function Array Date RegExp Object Error\".split(\" \"), function(i, name) {\n\tclass2type[ \"[object \" + name + \"]\" ] = name.toLowerCase();\n});\n\nfunction isArraylike( obj ) {\n\tvar length = obj.length,\n\t\ttype = jQuery.type( obj );\n\n\tif ( jQuery.isWindow( obj ) ) {\n\t\treturn false;\n\t}\n\n\tif ( obj.nodeType === 1 && length ) {\n\t\treturn true;\n\t}\n\n\treturn type === \"array\" || type !== \"function\" &&\n\t\t( length === 0 ||\n\t\ttypeof length === \"number\" && length > 0 && ( length - 1 ) in obj );\n}\n\n// All jQuery objects should point back to these\nrootjQuery = jQuery(document);\n/*!\n * Sizzle CSS Selector Engine v1.10.2\n * http://sizzlejs.com/\n *\n * Copyright 2013 jQuery Foundation, Inc. and other contributors\n * Released under the MIT license\n * http://jquery.org/license\n *\n * Date: 2013-07-03\n */\n(function( window, undefined ) {\n\nvar i,\n\tsupport,\n\tcachedruns,\n\tExpr,\n\tgetText,\n\tisXML,\n\tcompile,\n\toutermostContext,\n\tsortInput,\n\n\t// Local document vars\n\tsetDocument,\n\tdocument,\n\tdocElem,\n\tdocumentIsHTML,\n\trbuggyQSA,\n\trbuggyMatches,\n\tmatches,\n\tcontains,\n\n\t// Instance-specific data\n\texpando = \"sizzle\" + -(new Date()),\n\tpreferredDoc = window.document,\n\tdirruns = 0,\n\tdone = 0,\n\tclassCache = createCache(),\n\ttokenCache = createCache(),\n\tcompilerCache = createCache(),\n\thasDuplicate = false,\n\tsortOrder = function( a, b ) {\n\t\tif ( a === b ) {\n\t\t\thasDuplicate = true;\n\t\t\treturn 0;\n\t\t}\n\t\treturn 0;\n\t},\n\n\t// General-purpose constants\n\tstrundefined = typeof undefined,\n\tMAX_NEGATIVE = 1 << 31,\n\n\t// Instance methods\n\thasOwn = ({}).hasOwnProperty,\n\tarr = [],\n\tpop = arr.pop,\n\tpush_native = arr.push,\n\tpush = arr.push,\n\tslice = arr.slice,\n\t// Use a stripped-down indexOf if we can't use a native one\n\tindexOf = arr.indexOf || function( elem ) {\n\t\tvar i = 0,\n\t\t\tlen = this.length;\n\t\tfor ( ; i < len; i++ ) {\n\t\t\tif ( this[i] === elem ) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t},\n\n\tbooleans = \"checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped\",\n\n\t// Regular expressions\n\n\t// Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace\n\twhitespace = \"[\\\\x20\\\\t\\\\r\\\\n\\\\f]\",\n\t// http://www.w3.org/TR/css3-syntax/#characters\n\tcharacterEncoding = \"(?:\\\\\\\\.|[\\\\w-]|[^\\\\x00-\\\\xa0])+\",\n\n\t// Loosely modeled on CSS identifier characters\n\t// An unquoted value should be a CSS identifier http://www.w3.org/TR/css3-selectors/#attribute-selectors\n\t// Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier\n\tidentifier = characterEncoding.replace( \"w\", \"w#\" ),\n\n\t// Acceptable operators http://www.w3.org/TR/selectors/#attribute-selectors\n\tattributes = \"\\\\[\" + whitespace + \"*(\" + characterEncoding + \")\" + whitespace +\n\t\t\"*(?:([*^$|!~]?=)\" + whitespace + \"*(?:(['\\\"])((?:\\\\\\\\.|[^\\\\\\\\])*?)\\\\3|(\" + identifier + \")|)|)\" + whitespace + \"*\\\\]\",\n\n\t// Prefer arguments quoted,\n\t//   then not containing pseudos/brackets,\n\t//   then attribute selectors/non-parenthetical expressions,\n\t//   then anything else\n\t// These preferences are here to reduce the number of selectors\n\t//   needing tokenize in the PSEUDO preFilter\n\tpseudos = \":(\" + characterEncoding + \")(?:\\\\(((['\\\"])((?:\\\\\\\\.|[^\\\\\\\\])*?)\\\\3|((?:\\\\\\\\.|[^\\\\\\\\()[\\\\]]|\" + attributes.replace( 3, 8 ) + \")*)|.*)\\\\)|)\",\n\n\t// Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter\n\trtrim = new RegExp( \"^\" + whitespace + \"+|((?:^|[^\\\\\\\\])(?:\\\\\\\\.)*)\" + whitespace + \"+$\", \"g\" ),\n\n\trcomma = new RegExp( \"^\" + whitespace + \"*,\" + whitespace + \"*\" ),\n\trcombinators = new RegExp( \"^\" + whitespace + \"*([>+~]|\" + whitespace + \")\" + whitespace + \"*\" ),\n\n\trsibling = new RegExp( whitespace + \"*[+~]\" ),\n\trattributeQuotes = new RegExp( \"=\" + whitespace + \"*([^\\\\]'\\\"]*)\" + whitespace + \"*\\\\]\", \"g\" ),\n\n\trpseudo = new RegExp( pseudos ),\n\tridentifier = new RegExp( \"^\" + identifier + \"$\" ),\n\n\tmatchExpr = {\n\t\t\"ID\": new RegExp( \"^#(\" + characterEncoding + \")\" ),\n\t\t\"CLASS\": new RegExp( \"^\\\\.(\" + characterEncoding + \")\" ),\n\t\t\"TAG\": new RegExp( \"^(\" + characterEncoding.replace( \"w\", \"w*\" ) + \")\" ),\n\t\t\"ATTR\": new RegExp( \"^\" + attributes ),\n\t\t\"PSEUDO\": new RegExp( \"^\" + pseudos ),\n\t\t\"CHILD\": new RegExp( \"^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\\\(\" + whitespace +\n\t\t\t\"*(even|odd|(([+-]|)(\\\\d*)n|)\" + whitespace + \"*(?:([+-]|)\" + whitespace +\n\t\t\t\"*(\\\\d+)|))\" + whitespace + \"*\\\\)|)\", \"i\" ),\n\t\t\"bool\": new RegExp( \"^(?:\" + booleans + \")$\", \"i\" ),\n\t\t// For use in libraries implementing .is()\n\t\t// We use this for POS matching in `select`\n\t\t\"needsContext\": new RegExp( \"^\" + whitespace + \"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\\\(\" +\n\t\t\twhitespace + \"*((?:-\\\\d)?\\\\d*)\" + whitespace + \"*\\\\)|)(?=[^-]|$)\", \"i\" )\n\t},\n\n\trnative = /^[^{]+\\{\\s*\\[native \\w/,\n\n\t// Easily-parseable/retrievable ID or TAG or CLASS selectors\n\trquickExpr = /^(?:#([\\w-]+)|(\\w+)|\\.([\\w-]+))$/,\n\n\trinputs = /^(?:input|select|textarea|button)$/i,\n\trheader = /^h\\d$/i,\n\n\trescape = /'|\\\\/g,\n\n\t// CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters\n\trunescape = new RegExp( \"\\\\\\\\([\\\\da-f]{1,6}\" + whitespace + \"?|(\" + whitespace + \")|.)\", \"ig\" ),\n\tfunescape = function( _, escaped, escapedWhitespace ) {\n\t\tvar high = \"0x\" + escaped - 0x10000;\n\t\t// NaN means non-codepoint\n\t\t// Support: Firefox\n\t\t// Workaround erroneous numeric interpretation of +\"0x\"\n\t\treturn high !== high || escapedWhitespace ?\n\t\t\tescaped :\n\t\t\t// BMP codepoint\n\t\t\thigh < 0 ?\n\t\t\t\tString.fromCharCode( high + 0x10000 ) :\n\t\t\t\t// Supplemental Plane codepoint (surrogate pair)\n\t\t\t\tString.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );\n\t};\n\n// Optimize for push.apply( _, NodeList )\ntry {\n\tpush.apply(\n\t\t(arr = slice.call( preferredDoc.childNodes )),\n\t\tpreferredDoc.childNodes\n\t);\n\t// Support: Android<4.0\n\t// Detect silently failing push.apply\n\tarr[ preferredDoc.childNodes.length ].nodeType;\n} catch ( e ) {\n\tpush = { apply: arr.length ?\n\n\t\t// Leverage slice if possible\n\t\tfunction( target, els ) {\n\t\t\tpush_native.apply( target, slice.call(els) );\n\t\t} :\n\n\t\t// Support: IE<9\n\t\t// Otherwise append directly\n\t\tfunction( target, els ) {\n\t\t\tvar j = target.length,\n\t\t\t\ti = 0;\n\t\t\t// Can't trust NodeList.length\n\t\t\twhile ( (target[j++] = els[i++]) ) {}\n\t\t\ttarget.length = j - 1;\n\t\t}\n\t};\n}\n\nfunction Sizzle( selector, context, results, seed ) {\n\tvar match, elem, m, nodeType,\n\t\t// QSA vars\n\t\ti, groups, old, nid, newContext, newSelector;\n\n\tif ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) {\n\t\tsetDocument( context );\n\t}\n\n\tcontext = context || document;\n\tresults = results || [];\n\n\tif ( !selector || typeof selector !== \"string\" ) {\n\t\treturn results;\n\t}\n\n\tif ( (nodeType = context.nodeType) !== 1 && nodeType !== 9 ) {\n\t\treturn [];\n\t}\n\n\tif ( documentIsHTML && !seed ) {\n\n\t\t// Shortcuts\n\t\tif ( (match = rquickExpr.exec( selector )) ) {\n\t\t\t// Speed-up: Sizzle(\"#ID\")\n\t\t\tif ( (m = match[1]) ) {\n\t\t\t\tif ( nodeType === 9 ) {\n\t\t\t\t\telem = context.getElementById( m );\n\t\t\t\t\t// Check parentNode to catch when Blackberry 4.6 returns\n\t\t\t\t\t// nodes that are no longer in the document #6963\n\t\t\t\t\tif ( elem && elem.parentNode ) {\n\t\t\t\t\t\t// Handle the case where IE, Opera, and Webkit return items\n\t\t\t\t\t\t// by name instead of ID\n\t\t\t\t\t\tif ( elem.id === m ) {\n\t\t\t\t\t\t\tresults.push( elem );\n\t\t\t\t\t\t\treturn results;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn results;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// Context is not a document\n\t\t\t\t\tif ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) &&\n\t\t\t\t\t\tcontains( context, elem ) && elem.id === m ) {\n\t\t\t\t\t\tresults.push( elem );\n\t\t\t\t\t\treturn results;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t// Speed-up: Sizzle(\"TAG\")\n\t\t\t} else if ( match[2] ) {\n\t\t\t\tpush.apply( results, context.getElementsByTagName( selector ) );\n\t\t\t\treturn results;\n\n\t\t\t// Speed-up: Sizzle(\".CLASS\")\n\t\t\t} else if ( (m = match[3]) && support.getElementsByClassName && context.getElementsByClassName ) {\n\t\t\t\tpush.apply( results, context.getElementsByClassName( m ) );\n\t\t\t\treturn results;\n\t\t\t}\n\t\t}\n\n\t\t// QSA path\n\t\tif ( support.qsa && (!rbuggyQSA || !rbuggyQSA.test( selector )) ) {\n\t\t\tnid = old = expando;\n\t\t\tnewContext = context;\n\t\t\tnewSelector = nodeType === 9 && selector;\n\n\t\t\t// qSA works strangely on Element-rooted queries\n\t\t\t// We can work around this by specifying an extra ID on the root\n\t\t\t// and working up from there (Thanks to Andrew Dupont for the technique)\n\t\t\t// IE 8 doesn't work on object elements\n\t\t\tif ( nodeType === 1 && context.nodeName.toLowerCase() !== \"object\" ) {\n\t\t\t\tgroups = tokenize( selector );\n\n\t\t\t\tif ( (old = context.getAttribute(\"id\")) ) {\n\t\t\t\t\tnid = old.replace( rescape, \"\\\\$&\" );\n\t\t\t\t} else {\n\t\t\t\t\tcontext.setAttribute( \"id\", nid );\n\t\t\t\t}\n\t\t\t\tnid = \"[id='\" + nid + \"'] \";\n\n\t\t\t\ti = groups.length;\n\t\t\t\twhile ( i-- ) {\n\t\t\t\t\tgroups[i] = nid + toSelector( groups[i] );\n\t\t\t\t}\n\t\t\t\tnewContext = rsibling.test( selector ) && context.parentNode || context;\n\t\t\t\tnewSelector = groups.join(\",\");\n\t\t\t}\n\n\t\t\tif ( newSelector ) {\n\t\t\t\ttry {\n\t\t\t\t\tpush.apply( results,\n\t\t\t\t\t\tnewContext.querySelectorAll( newSelector )\n\t\t\t\t\t);\n\t\t\t\t\treturn results;\n\t\t\t\t} catch(qsaError) {\n\t\t\t\t} finally {\n\t\t\t\t\tif ( !old ) {\n\t\t\t\t\t\tcontext.removeAttribute(\"id\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// All others\n\treturn select( selector.replace( rtrim, \"$1\" ), context, results, seed );\n}\n\n/**\n * Create key-value caches of limited size\n * @returns {Function(string, Object)} Returns the Object data after storing it on itself with\n *\tproperty name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)\n *\tdeleting the oldest entry\n */\nfunction createCache() {\n\tvar keys = [];\n\n\tfunction cache( key, value ) {\n\t\t// Use (key + \" \") to avoid collision with native prototype properties (see Issue #157)\n\t\tif ( keys.push( key += \" \" ) > Expr.cacheLength ) {\n\t\t\t// Only keep the most recent entries\n\t\t\tdelete cache[ keys.shift() ];\n\t\t}\n\t\treturn (cache[ key ] = value);\n\t}\n\treturn cache;\n}\n\n/**\n * Mark a function for special use by Sizzle\n * @param {Function} fn The function to mark\n */\nfunction markFunction( fn ) {\n\tfn[ expando ] = true;\n\treturn fn;\n}\n\n/**\n * Support testing using an element\n * @param {Function} fn Passed the created div and expects a boolean result\n */\nfunction assert( fn ) {\n\tvar div = document.createElement(\"div\");\n\n\ttry {\n\t\treturn !!fn( div );\n\t} catch (e) {\n\t\treturn false;\n\t} finally {\n\t\t// Remove from its parent by default\n\t\tif ( div.parentNode ) {\n\t\t\tdiv.parentNode.removeChild( div );\n\t\t}\n\t\t// release memory in IE\n\t\tdiv = null;\n\t}\n}\n\n/**\n * Adds the same handler for all of the specified attrs\n * @param {String} attrs Pipe-separated list of attributes\n * @param {Function} handler The method that will be applied\n */\nfunction addHandle( attrs, handler ) {\n\tvar arr = attrs.split(\"|\"),\n\t\ti = attrs.length;\n\n\twhile ( i-- ) {\n\t\tExpr.attrHandle[ arr[i] ] = handler;\n\t}\n}\n\n/**\n * Checks document order of two siblings\n * @param {Element} a\n * @param {Element} b\n * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b\n */\nfunction siblingCheck( a, b ) {\n\tvar cur = b && a,\n\t\tdiff = cur && a.nodeType === 1 && b.nodeType === 1 &&\n\t\t\t( ~b.sourceIndex || MAX_NEGATIVE ) -\n\t\t\t( ~a.sourceIndex || MAX_NEGATIVE );\n\n\t// Use IE sourceIndex if available on both nodes\n\tif ( diff ) {\n\t\treturn diff;\n\t}\n\n\t// Check if b follows a\n\tif ( cur ) {\n\t\twhile ( (cur = cur.nextSibling) ) {\n\t\t\tif ( cur === b ) {\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn a ? 1 : -1;\n}\n\n/**\n * Returns a function to use in pseudos for input types\n * @param {String} type\n */\nfunction createInputPseudo( type ) {\n\treturn function( elem ) {\n\t\tvar name = elem.nodeName.toLowerCase();\n\t\treturn name === \"input\" && elem.type === type;\n\t};\n}\n\n/**\n * Returns a function to use in pseudos for buttons\n * @param {String} type\n */\nfunction createButtonPseudo( type ) {\n\treturn function( elem ) {\n\t\tvar name = elem.nodeName.toLowerCase();\n\t\treturn (name === \"input\" || name === \"button\") && elem.type === type;\n\t};\n}\n\n/**\n * Returns a function to use in pseudos for positionals\n * @param {Function} fn\n */\nfunction createPositionalPseudo( fn ) {\n\treturn markFunction(function( argument ) {\n\t\targument = +argument;\n\t\treturn markFunction(function( seed, matches ) {\n\t\t\tvar j,\n\t\t\t\tmatchIndexes = fn( [], seed.length, argument ),\n\t\t\t\ti = matchIndexes.length;\n\n\t\t\t// Match elements found at the specified indexes\n\t\t\twhile ( i-- ) {\n\t\t\t\tif ( seed[ (j = matchIndexes[i]) ] ) {\n\t\t\t\t\tseed[j] = !(matches[j] = seed[j]);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t});\n}\n\n/**\n * Detect xml\n * @param {Element|Object} elem An element or a document\n */\nisXML = Sizzle.isXML = function( elem ) {\n\t// documentElement is verified for cases where it doesn't yet exist\n\t// (such as loading iframes in IE - #4833)\n\tvar documentElement = elem && (elem.ownerDocument || elem).documentElement;\n\treturn documentElement ? documentElement.nodeName !== \"HTML\" : false;\n};\n\n// Expose support vars for convenience\nsupport = Sizzle.support = {};\n\n/**\n * Sets document-related variables once based on the current document\n * @param {Element|Object} [doc] An element or document object to use to set the document\n * @returns {Object} Returns the current document\n */\nsetDocument = Sizzle.setDocument = function( node ) {\n\tvar doc = node ? node.ownerDocument || node : preferredDoc,\n\t\tparent = doc.defaultView;\n\n\t// If no document and documentElement is available, return\n\tif ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) {\n\t\treturn document;\n\t}\n\n\t// Set our document\n\tdocument = doc;\n\tdocElem = doc.documentElement;\n\n\t// Support tests\n\tdocumentIsHTML = !isXML( doc );\n\n\t// Support: IE>8\n\t// If iframe document is assigned to \"document\" variable and if iframe has been reloaded,\n\t// IE will throw \"permission denied\" error when accessing \"document\" variable, see jQuery #13936\n\t// IE6-8 do not support the defaultView property so parent will be undefined\n\tif ( parent && parent.attachEvent && parent !== parent.top ) {\n\t\tparent.attachEvent( \"onbeforeunload\", function() {\n\t\t\tsetDocument();\n\t\t});\n\t}\n\n\t/* Attributes\n\t---------------------------------------------------------------------- */\n\n\t// Support: IE<8\n\t// Verify that getAttribute really returns attributes and not properties (excepting IE8 booleans)\n\tsupport.attributes = assert(function( div ) {\n\t\tdiv.className = \"i\";\n\t\treturn !div.getAttribute(\"className\");\n\t});\n\n\t/* getElement(s)By*\n\t---------------------------------------------------------------------- */\n\n\t// Check if getElementsByTagName(\"*\") returns only elements\n\tsupport.getElementsByTagName = assert(function( div ) {\n\t\tdiv.appendChild( doc.createComment(\"\") );\n\t\treturn !div.getElementsByTagName(\"*\").length;\n\t});\n\n\t// Check if getElementsByClassName can be trusted\n\tsupport.getElementsByClassName = assert(function( div ) {\n\t\tdiv.innerHTML = \"<div class='a'></div><div class='a i'></div>\";\n\n\t\t// Support: Safari<4\n\t\t// Catch class over-caching\n\t\tdiv.firstChild.className = \"i\";\n\t\t// Support: Opera<10\n\t\t// Catch gEBCN failure to find non-leading classes\n\t\treturn div.getElementsByClassName(\"i\").length === 2;\n\t});\n\n\t// Support: IE<10\n\t// Check if getElementById returns elements by name\n\t// The broken getElementById methods don't pick up programatically-set names,\n\t// so use a roundabout getElementsByName test\n\tsupport.getById = assert(function( div ) {\n\t\tdocElem.appendChild( div ).id = expando;\n\t\treturn !doc.getElementsByName || !doc.getElementsByName( expando ).length;\n\t});\n\n\t// ID find and filter\n\tif ( support.getById ) {\n\t\tExpr.find[\"ID\"] = function( id, context ) {\n\t\t\tif ( typeof context.getElementById !== strundefined && documentIsHTML ) {\n\t\t\t\tvar m = context.getElementById( id );\n\t\t\t\t// Check parentNode to catch when Blackberry 4.6 returns\n\t\t\t\t// nodes that are no longer in the document #6963\n\t\t\t\treturn m && m.parentNode ? [m] : [];\n\t\t\t}\n\t\t};\n\t\tExpr.filter[\"ID\"] = function( id ) {\n\t\t\tvar attrId = id.replace( runescape, funescape );\n\t\t\treturn function( elem ) {\n\t\t\t\treturn elem.getAttribute(\"id\") === attrId;\n\t\t\t};\n\t\t};\n\t} else {\n\t\t// Support: IE6/7\n\t\t// getElementById is not reliable as a find shortcut\n\t\tdelete Expr.find[\"ID\"];\n\n\t\tExpr.filter[\"ID\"] =  function( id ) {\n\t\t\tvar attrId = id.replace( runescape, funescape );\n\t\t\treturn function( elem ) {\n\t\t\t\tvar node = typeof elem.getAttributeNode !== strundefined && elem.getAttributeNode(\"id\");\n\t\t\t\treturn node && node.value === attrId;\n\t\t\t};\n\t\t};\n\t}\n\n\t// Tag\n\tExpr.find[\"TAG\"] = support.getElementsByTagName ?\n\t\tfunction( tag, context ) {\n\t\t\tif ( typeof context.getElementsByTagName !== strundefined ) {\n\t\t\t\treturn context.getElementsByTagName( tag );\n\t\t\t}\n\t\t} :\n\t\tfunction( tag, context ) {\n\t\t\tvar elem,\n\t\t\t\ttmp = [],\n\t\t\t\ti = 0,\n\t\t\t\tresults = context.getElementsByTagName( tag );\n\n\t\t\t// Filter out possible comments\n\t\t\tif ( tag === \"*\" ) {\n\t\t\t\twhile ( (elem = results[i++]) ) {\n\t\t\t\t\tif ( elem.nodeType === 1 ) {\n\t\t\t\t\t\ttmp.push( elem );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn tmp;\n\t\t\t}\n\t\t\treturn results;\n\t\t};\n\n\t// Class\n\tExpr.find[\"CLASS\"] = support.getElementsByClassName && function( className, context ) {\n\t\tif ( typeof context.getElementsByClassName !== strundefined && documentIsHTML ) {\n\t\t\treturn context.getElementsByClassName( className );\n\t\t}\n\t};\n\n\t/* QSA/matchesSelector\n\t---------------------------------------------------------------------- */\n\n\t// QSA and matchesSelector support\n\n\t// matchesSelector(:active) reports false when true (IE9/Opera 11.5)\n\trbuggyMatches = [];\n\n\t// qSa(:focus) reports false when true (Chrome 21)\n\t// We allow this because of a bug in IE8/9 that throws an error\n\t// whenever `document.activeElement` is accessed on an iframe\n\t// So, we allow :focus to pass through QSA all the time to avoid the IE error\n\t// See http://bugs.jquery.com/ticket/13378\n\trbuggyQSA = [];\n\n\tif ( (support.qsa = rnative.test( doc.querySelectorAll )) ) {\n\t\t// Build QSA regex\n\t\t// Regex strategy adopted from Diego Perini\n\t\tassert(function( div ) {\n\t\t\t// Select is set to empty string on purpose\n\t\t\t// This is to test IE's treatment of not explicitly\n\t\t\t// setting a boolean content attribute,\n\t\t\t// since its presence should be enough\n\t\t\t// http://bugs.jquery.com/ticket/12359\n\t\t\tdiv.innerHTML = \"<select><option selected=''></option></select>\";\n\n\t\t\t// Support: IE8\n\t\t\t// Boolean attributes and \"value\" are not treated correctly\n\t\t\tif ( !div.querySelectorAll(\"[selected]\").length ) {\n\t\t\t\trbuggyQSA.push( \"\\\\[\" + whitespace + \"*(?:value|\" + booleans + \")\" );\n\t\t\t}\n\n\t\t\t// Webkit/Opera - :checked should return selected option elements\n\t\t\t// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked\n\t\t\t// IE8 throws error here and will not see later tests\n\t\t\tif ( !div.querySelectorAll(\":checked\").length ) {\n\t\t\t\trbuggyQSA.push(\":checked\");\n\t\t\t}\n\t\t});\n\n\t\tassert(function( div ) {\n\n\t\t\t// Support: Opera 10-12/IE8\n\t\t\t// ^= $= *= and empty values\n\t\t\t// Should not select anything\n\t\t\t// Support: Windows 8 Native Apps\n\t\t\t// The type attribute is restricted during .innerHTML assignment\n\t\t\tvar input = doc.createElement(\"input\");\n\t\t\tinput.setAttribute( \"type\", \"hidden\" );\n\t\t\tdiv.appendChild( input ).setAttribute( \"t\", \"\" );\n\n\t\t\tif ( div.querySelectorAll(\"[t^='']\").length ) {\n\t\t\t\trbuggyQSA.push( \"[*^$]=\" + whitespace + \"*(?:''|\\\"\\\")\" );\n\t\t\t}\n\n\t\t\t// FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)\n\t\t\t// IE8 throws error here and will not see later tests\n\t\t\tif ( !div.querySelectorAll(\":enabled\").length ) {\n\t\t\t\trbuggyQSA.push( \":enabled\", \":disabled\" );\n\t\t\t}\n\n\t\t\t// Opera 10-11 does not throw on post-comma invalid pseudos\n\t\t\tdiv.querySelectorAll(\"*,:x\");\n\t\t\trbuggyQSA.push(\",.*:\");\n\t\t});\n\t}\n\n\tif ( (support.matchesSelector = rnative.test( (matches = docElem.webkitMatchesSelector ||\n\t\tdocElem.mozMatchesSelector ||\n\t\tdocElem.oMatchesSelector ||\n\t\tdocElem.msMatchesSelector) )) ) {\n\n\t\tassert(function( div ) {\n\t\t\t// Check to see if it's possible to do matchesSelector\n\t\t\t// on a disconnected node (IE 9)\n\t\t\tsupport.disconnectedMatch = matches.call( div, \"div\" );\n\n\t\t\t// This should fail with an exception\n\t\t\t// Gecko does not error, returns false instead\n\t\t\tmatches.call( div, \"[s!='']:x\" );\n\t\t\trbuggyMatches.push( \"!=\", pseudos );\n\t\t});\n\t}\n\n\trbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join(\"|\") );\n\trbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join(\"|\") );\n\n\t/* Contains\n\t---------------------------------------------------------------------- */\n\n\t// Element contains another\n\t// Purposefully does not implement inclusive descendent\n\t// As in, an element does not contain itself\n\tcontains = rnative.test( docElem.contains ) || docElem.compareDocumentPosition ?\n\t\tfunction( a, b ) {\n\t\t\tvar adown = a.nodeType === 9 ? a.documentElement : a,\n\t\t\t\tbup = b && b.parentNode;\n\t\t\treturn a === bup || !!( bup && bup.nodeType === 1 && (\n\t\t\t\tadown.contains ?\n\t\t\t\t\tadown.contains( bup ) :\n\t\t\t\t\ta.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16\n\t\t\t));\n\t\t} :\n\t\tfunction( a, b ) {\n\t\t\tif ( b ) {\n\t\t\t\twhile ( (b = b.parentNode) ) {\n\t\t\t\t\tif ( b === a ) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t};\n\n\t/* Sorting\n\t---------------------------------------------------------------------- */\n\n\t// Document order sorting\n\tsortOrder = docElem.compareDocumentPosition ?\n\tfunction( a, b ) {\n\n\t\t// Flag for duplicate removal\n\t\tif ( a === b ) {\n\t\t\thasDuplicate = true;\n\t\t\treturn 0;\n\t\t}\n\n\t\tvar compare = b.compareDocumentPosition && a.compareDocumentPosition && a.compareDocumentPosition( b );\n\n\t\tif ( compare ) {\n\t\t\t// Disconnected nodes\n\t\t\tif ( compare & 1 ||\n\t\t\t\t(!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) {\n\n\t\t\t\t// Choose the first element that is related to our preferred document\n\t\t\t\tif ( a === doc || contains(preferredDoc, a) ) {\n\t\t\t\t\treturn -1;\n\t\t\t\t}\n\t\t\t\tif ( b === doc || contains(preferredDoc, b) ) {\n\t\t\t\t\treturn 1;\n\t\t\t\t}\n\n\t\t\t\t// Maintain original order\n\t\t\t\treturn sortInput ?\n\t\t\t\t\t( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) :\n\t\t\t\t\t0;\n\t\t\t}\n\n\t\t\treturn compare & 4 ? -1 : 1;\n\t\t}\n\n\t\t// Not directly comparable, sort on existence of method\n\t\treturn a.compareDocumentPosition ? -1 : 1;\n\t} :\n\tfunction( a, b ) {\n\t\tvar cur,\n\t\t\ti = 0,\n\t\t\taup = a.parentNode,\n\t\t\tbup = b.parentNode,\n\t\t\tap = [ a ],\n\t\t\tbp = [ b ];\n\n\t\t// Exit early if the nodes are identical\n\t\tif ( a === b ) {\n\t\t\thasDuplicate = true;\n\t\t\treturn 0;\n\n\t\t// Parentless nodes are either documents or disconnected\n\t\t} else if ( !aup || !bup ) {\n\t\t\treturn a === doc ? -1 :\n\t\t\t\tb === doc ? 1 :\n\t\t\t\taup ? -1 :\n\t\t\t\tbup ? 1 :\n\t\t\t\tsortInput ?\n\t\t\t\t( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) :\n\t\t\t\t0;\n\n\t\t// If the nodes are siblings, we can do a quick check\n\t\t} else if ( aup === bup ) {\n\t\t\treturn siblingCheck( a, b );\n\t\t}\n\n\t\t// Otherwise we need full lists of their ancestors for comparison\n\t\tcur = a;\n\t\twhile ( (cur = cur.parentNode) ) {\n\t\t\tap.unshift( cur );\n\t\t}\n\t\tcur = b;\n\t\twhile ( (cur = cur.parentNode) ) {\n\t\t\tbp.unshift( cur );\n\t\t}\n\n\t\t// Walk down the tree looking for a discrepancy\n\t\twhile ( ap[i] === bp[i] ) {\n\t\t\ti++;\n\t\t}\n\n\t\treturn i ?\n\t\t\t// Do a sibling check if the nodes have a common ancestor\n\t\t\tsiblingCheck( ap[i], bp[i] ) :\n\n\t\t\t// Otherwise nodes in our document sort first\n\t\t\tap[i] === preferredDoc ? -1 :\n\t\t\tbp[i] === preferredDoc ? 1 :\n\t\t\t0;\n\t};\n\n\treturn doc;\n};\n\nSizzle.matches = function( expr, elements ) {\n\treturn Sizzle( expr, null, null, elements );\n};\n\nSizzle.matchesSelector = function( elem, expr ) {\n\t// Set document vars if needed\n\tif ( ( elem.ownerDocument || elem ) !== document ) {\n\t\tsetDocument( elem );\n\t}\n\n\t// Make sure that attribute selectors are quoted\n\texpr = expr.replace( rattributeQuotes, \"='$1']\" );\n\n\tif ( support.matchesSelector && documentIsHTML &&\n\t\t( !rbuggyMatches || !rbuggyMatches.test( expr ) ) &&\n\t\t( !rbuggyQSA     || !rbuggyQSA.test( expr ) ) ) {\n\n\t\ttry {\n\t\t\tvar ret = matches.call( elem, expr );\n\n\t\t\t// IE 9's matchesSelector returns false on disconnected nodes\n\t\t\tif ( ret || support.disconnectedMatch ||\n\t\t\t\t\t// As well, disconnected nodes are said to be in a document\n\t\t\t\t\t// fragment in IE 9\n\t\t\t\t\telem.document && elem.document.nodeType !== 11 ) {\n\t\t\t\treturn ret;\n\t\t\t}\n\t\t} catch(e) {}\n\t}\n\n\treturn Sizzle( expr, document, null, [elem] ).length > 0;\n};\n\nSizzle.contains = function( context, elem ) {\n\t// Set document vars if needed\n\tif ( ( context.ownerDocument || context ) !== document ) {\n\t\tsetDocument( context );\n\t}\n\treturn contains( context, elem );\n};\n\nSizzle.attr = function( elem, name ) {\n\t// Set document vars if needed\n\tif ( ( elem.ownerDocument || elem ) !== document ) {\n\t\tsetDocument( elem );\n\t}\n\n\tvar fn = Expr.attrHandle[ name.toLowerCase() ],\n\t\t// Don't get fooled by Object.prototype properties (jQuery #13807)\n\t\tval = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?\n\t\t\tfn( elem, name, !documentIsHTML ) :\n\t\t\tundefined;\n\n\treturn val === undefined ?\n\t\tsupport.attributes || !documentIsHTML ?\n\t\t\telem.getAttribute( name ) :\n\t\t\t(val = elem.getAttributeNode(name)) && val.specified ?\n\t\t\t\tval.value :\n\t\t\t\tnull :\n\t\tval;\n};\n\nSizzle.error = function( msg ) {\n\tthrow new Error( \"Syntax error, unrecognized expression: \" + msg );\n};\n\n/**\n * Document sorting and removing duplicates\n * @param {ArrayLike} results\n */\nSizzle.uniqueSort = function( results ) {\n\tvar elem,\n\t\tduplicates = [],\n\t\tj = 0,\n\t\ti = 0;\n\n\t// Unless we *know* we can detect duplicates, assume their presence\n\thasDuplicate = !support.detectDuplicates;\n\tsortInput = !support.sortStable && results.slice( 0 );\n\tresults.sort( sortOrder );\n\n\tif ( hasDuplicate ) {\n\t\twhile ( (elem = results[i++]) ) {\n\t\t\tif ( elem === results[ i ] ) {\n\t\t\t\tj = duplicates.push( i );\n\t\t\t}\n\t\t}\n\t\twhile ( j-- ) {\n\t\t\tresults.splice( duplicates[ j ], 1 );\n\t\t}\n\t}\n\n\treturn results;\n};\n\n/**\n * Utility function for retrieving the text value of an array of DOM nodes\n * @param {Array|Element} elem\n */\ngetText = Sizzle.getText = function( elem ) {\n\tvar node,\n\t\tret = \"\",\n\t\ti = 0,\n\t\tnodeType = elem.nodeType;\n\n\tif ( !nodeType ) {\n\t\t// If no nodeType, this is expected to be an array\n\t\tfor ( ; (node = elem[i]); i++ ) {\n\t\t\t// Do not traverse comment nodes\n\t\t\tret += getText( node );\n\t\t}\n\t} else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {\n\t\t// Use textContent for elements\n\t\t// innerText usage removed for consistency of new lines (see #11153)\n\t\tif ( typeof elem.textContent === \"string\" ) {\n\t\t\treturn elem.textContent;\n\t\t} else {\n\t\t\t// Traverse its children\n\t\t\tfor ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {\n\t\t\t\tret += getText( elem );\n\t\t\t}\n\t\t}\n\t} else if ( nodeType === 3 || nodeType === 4 ) {\n\t\treturn elem.nodeValue;\n\t}\n\t// Do not include comment or processing instruction nodes\n\n\treturn ret;\n};\n\nExpr = Sizzle.selectors = {\n\n\t// Can be adjusted by the user\n\tcacheLength: 50,\n\n\tcreatePseudo: markFunction,\n\n\tmatch: matchExpr,\n\n\tattrHandle: {},\n\n\tfind: {},\n\n\trelative: {\n\t\t\">\": { dir: \"parentNode\", first: true },\n\t\t\" \": { dir: \"parentNode\" },\n\t\t\"+\": { dir: \"previousSibling\", first: true },\n\t\t\"~\": { dir: \"previousSibling\" }\n\t},\n\n\tpreFilter: {\n\t\t\"ATTR\": function( match ) {\n\t\t\tmatch[1] = match[1].replace( runescape, funescape );\n\n\t\t\t// Move the given value to match[3] whether quoted or unquoted\n\t\t\tmatch[3] = ( match[4] || match[5] || \"\" ).replace( runescape, funescape );\n\n\t\t\tif ( match[2] === \"~=\" ) {\n\t\t\t\tmatch[3] = \" \" + match[3] + \" \";\n\t\t\t}\n\n\t\t\treturn match.slice( 0, 4 );\n\t\t},\n\n\t\t\"CHILD\": function( match ) {\n\t\t\t/* matches from matchExpr[\"CHILD\"]\n\t\t\t\t1 type (only|nth|...)\n\t\t\t\t2 what (child|of-type)\n\t\t\t\t3 argument (even|odd|\\d*|\\d*n([+-]\\d+)?|...)\n\t\t\t\t4 xn-component of xn+y argument ([+-]?\\d*n|)\n\t\t\t\t5 sign of xn-component\n\t\t\t\t6 x of xn-component\n\t\t\t\t7 sign of y-component\n\t\t\t\t8 y of y-component\n\t\t\t*/\n\t\t\tmatch[1] = match[1].toLowerCase();\n\n\t\t\tif ( match[1].slice( 0, 3 ) === \"nth\" ) {\n\t\t\t\t// nth-* requires argument\n\t\t\t\tif ( !match[3] ) {\n\t\t\t\t\tSizzle.error( match[0] );\n\t\t\t\t}\n\n\t\t\t\t// numeric x and y parameters for Expr.filter.CHILD\n\t\t\t\t// remember that false/true cast respectively to 0/1\n\t\t\t\tmatch[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === \"even\" || match[3] === \"odd\" ) );\n\t\t\t\tmatch[5] = +( ( match[7] + match[8] ) || match[3] === \"odd\" );\n\n\t\t\t// other types prohibit arguments\n\t\t\t} else if ( match[3] ) {\n\t\t\t\tSizzle.error( match[0] );\n\t\t\t}\n\n\t\t\treturn match;\n\t\t},\n\n\t\t\"PSEUDO\": function( match ) {\n\t\t\tvar excess,\n\t\t\t\tunquoted = !match[5] && match[2];\n\n\t\t\tif ( matchExpr[\"CHILD\"].test( match[0] ) ) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\t// Accept quoted arguments as-is\n\t\t\tif ( match[3] && match[4] !== undefined ) {\n\t\t\t\tmatch[2] = match[4];\n\n\t\t\t// Strip excess characters from unquoted arguments\n\t\t\t} else if ( unquoted && rpseudo.test( unquoted ) &&\n\t\t\t\t// Get excess from tokenize (recursively)\n\t\t\t\t(excess = tokenize( unquoted, true )) &&\n\t\t\t\t// advance to the next closing parenthesis\n\t\t\t\t(excess = unquoted.indexOf( \")\", unquoted.length - excess ) - unquoted.length) ) {\n\n\t\t\t\t// excess is a negative index\n\t\t\t\tmatch[0] = match[0].slice( 0, excess );\n\t\t\t\tmatch[2] = unquoted.slice( 0, excess );\n\t\t\t}\n\n\t\t\t// Return only captures needed by the pseudo filter method (type and argument)\n\t\t\treturn match.slice( 0, 3 );\n\t\t}\n\t},\n\n\tfilter: {\n\n\t\t\"TAG\": function( nodeNameSelector ) {\n\t\t\tvar nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase();\n\t\t\treturn nodeNameSelector === \"*\" ?\n\t\t\t\tfunction() { return true; } :\n\t\t\t\tfunction( elem ) {\n\t\t\t\t\treturn elem.nodeName && elem.nodeName.toLowerCase() === nodeName;\n\t\t\t\t};\n\t\t},\n\n\t\t\"CLASS\": function( className ) {\n\t\t\tvar pattern = classCache[ className + \" \" ];\n\n\t\t\treturn pattern ||\n\t\t\t\t(pattern = new RegExp( \"(^|\" + whitespace + \")\" + className + \"(\" + whitespace + \"|$)\" )) &&\n\t\t\t\tclassCache( className, function( elem ) {\n\t\t\t\t\treturn pattern.test( typeof elem.className === \"string\" && elem.className || typeof elem.getAttribute !== strundefined && elem.getAttribute(\"class\") || \"\" );\n\t\t\t\t});\n\t\t},\n\n\t\t\"ATTR\": function( name, operator, check ) {\n\t\t\treturn function( elem ) {\n\t\t\t\tvar result = Sizzle.attr( elem, name );\n\n\t\t\t\tif ( result == null ) {\n\t\t\t\t\treturn operator === \"!=\";\n\t\t\t\t}\n\t\t\t\tif ( !operator ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\tresult += \"\";\n\n\t\t\t\treturn operator === \"=\" ? result === check :\n\t\t\t\t\toperator === \"!=\" ? result !== check :\n\t\t\t\t\toperator === \"^=\" ? check && result.indexOf( check ) === 0 :\n\t\t\t\t\toperator === \"*=\" ? check && result.indexOf( check ) > -1 :\n\t\t\t\t\toperator === \"$=\" ? check && result.slice( -check.length ) === check :\n\t\t\t\t\toperator === \"~=\" ? ( \" \" + result + \" \" ).indexOf( check ) > -1 :\n\t\t\t\t\toperator === \"|=\" ? result === check || result.slice( 0, check.length + 1 ) === check + \"-\" :\n\t\t\t\t\tfalse;\n\t\t\t};\n\t\t},\n\n\t\t\"CHILD\": function( type, what, argument, first, last ) {\n\t\t\tvar simple = type.slice( 0, 3 ) !== \"nth\",\n\t\t\t\tforward = type.slice( -4 ) !== \"last\",\n\t\t\t\tofType = what === \"of-type\";\n\n\t\t\treturn first === 1 && last === 0 ?\n\n\t\t\t\t// Shortcut for :nth-*(n)\n\t\t\t\tfunction( elem ) {\n\t\t\t\t\treturn !!elem.parentNode;\n\t\t\t\t} :\n\n\t\t\t\tfunction( elem, context, xml ) {\n\t\t\t\t\tvar cache, outerCache, node, diff, nodeIndex, start,\n\t\t\t\t\t\tdir = simple !== forward ? \"nextSibling\" : \"previousSibling\",\n\t\t\t\t\t\tparent = elem.parentNode,\n\t\t\t\t\t\tname = ofType && elem.nodeName.toLowerCase(),\n\t\t\t\t\t\tuseCache = !xml && !ofType;\n\n\t\t\t\t\tif ( parent ) {\n\n\t\t\t\t\t\t// :(first|last|only)-(child|of-type)\n\t\t\t\t\t\tif ( simple ) {\n\t\t\t\t\t\t\twhile ( dir ) {\n\t\t\t\t\t\t\t\tnode = elem;\n\t\t\t\t\t\t\t\twhile ( (node = node[ dir ]) ) {\n\t\t\t\t\t\t\t\t\tif ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) {\n\t\t\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// Reverse direction for :only-* (if we haven't yet done so)\n\t\t\t\t\t\t\t\tstart = dir = type === \"only\" && !start && \"nextSibling\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tstart = [ forward ? parent.firstChild : parent.lastChild ];\n\n\t\t\t\t\t\t// non-xml :nth-child(...) stores cache data on `parent`\n\t\t\t\t\t\tif ( forward && useCache ) {\n\t\t\t\t\t\t\t// Seek `elem` from a previously-cached index\n\t\t\t\t\t\t\touterCache = parent[ expando ] || (parent[ expando ] = {});\n\t\t\t\t\t\t\tcache = outerCache[ type ] || [];\n\t\t\t\t\t\t\tnodeIndex = cache[0] === dirruns && cache[1];\n\t\t\t\t\t\t\tdiff = cache[0] === dirruns && cache[2];\n\t\t\t\t\t\t\tnode = nodeIndex && parent.childNodes[ nodeIndex ];\n\n\t\t\t\t\t\t\twhile ( (node = ++nodeIndex && node && node[ dir ] ||\n\n\t\t\t\t\t\t\t\t// Fallback to seeking `elem` from the start\n\t\t\t\t\t\t\t\t(diff = nodeIndex = 0) || start.pop()) ) {\n\n\t\t\t\t\t\t\t\t// When found, cache indexes on `parent` and break\n\t\t\t\t\t\t\t\tif ( node.nodeType === 1 && ++diff && node === elem ) {\n\t\t\t\t\t\t\t\t\touterCache[ type ] = [ dirruns, nodeIndex, diff ];\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Use previously-cached element index if available\n\t\t\t\t\t\t} else if ( useCache && (cache = (elem[ expando ] || (elem[ expando ] = {}))[ type ]) && cache[0] === dirruns ) {\n\t\t\t\t\t\t\tdiff = cache[1];\n\n\t\t\t\t\t\t// xml :nth-child(...) or :nth-last-child(...) or :nth(-last)?-of-type(...)\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// Use the same loop as above to seek `elem` from the start\n\t\t\t\t\t\t\twhile ( (node = ++nodeIndex && node && node[ dir ] ||\n\t\t\t\t\t\t\t\t(diff = nodeIndex = 0) || start.pop()) ) {\n\n\t\t\t\t\t\t\t\tif ( ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) && ++diff ) {\n\t\t\t\t\t\t\t\t\t// Cache the index of each encountered element\n\t\t\t\t\t\t\t\t\tif ( useCache ) {\n\t\t\t\t\t\t\t\t\t\t(node[ expando ] || (node[ expando ] = {}))[ type ] = [ dirruns, diff ];\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\tif ( node === elem ) {\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Incorporate the offset, then check against cycle size\n\t\t\t\t\t\tdiff -= last;\n\t\t\t\t\t\treturn diff === first || ( diff % first === 0 && diff / first >= 0 );\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t},\n\n\t\t\"PSEUDO\": function( pseudo, argument ) {\n\t\t\t// pseudo-class names are case-insensitive\n\t\t\t// http://www.w3.org/TR/selectors/#pseudo-classes\n\t\t\t// Prioritize by case sensitivity in case custom pseudos are added with uppercase letters\n\t\t\t// Remember that setFilters inherits from pseudos\n\t\t\tvar args,\n\t\t\t\tfn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||\n\t\t\t\t\tSizzle.error( \"unsupported pseudo: \" + pseudo );\n\n\t\t\t// The user may use createPseudo to indicate that\n\t\t\t// arguments are needed to create the filter function\n\t\t\t// just as Sizzle does\n\t\t\tif ( fn[ expando ] ) {\n\t\t\t\treturn fn( argument );\n\t\t\t}\n\n\t\t\t// But maintain support for old signatures\n\t\t\tif ( fn.length > 1 ) {\n\t\t\t\targs = [ pseudo, pseudo, \"\", argument ];\n\t\t\t\treturn Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?\n\t\t\t\t\tmarkFunction(function( seed, matches ) {\n\t\t\t\t\t\tvar idx,\n\t\t\t\t\t\t\tmatched = fn( seed, argument ),\n\t\t\t\t\t\t\ti = matched.length;\n\t\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\t\tidx = indexOf.call( seed, matched[i] );\n\t\t\t\t\t\t\tseed[ idx ] = !( matches[ idx ] = matched[i] );\n\t\t\t\t\t\t}\n\t\t\t\t\t}) :\n\t\t\t\t\tfunction( elem ) {\n\t\t\t\t\t\treturn fn( elem, 0, args );\n\t\t\t\t\t};\n\t\t\t}\n\n\t\t\treturn fn;\n\t\t}\n\t},\n\n\tpseudos: {\n\t\t// Potentially complex pseudos\n\t\t\"not\": markFunction(function( selector ) {\n\t\t\t// Trim the selector passed to compile\n\t\t\t// to avoid treating leading and trailing\n\t\t\t// spaces as combinators\n\t\t\tvar input = [],\n\t\t\t\tresults = [],\n\t\t\t\tmatcher = compile( selector.replace( rtrim, \"$1\" ) );\n\n\t\t\treturn matcher[ expando ] ?\n\t\t\t\tmarkFunction(function( seed, matches, context, xml ) {\n\t\t\t\t\tvar elem,\n\t\t\t\t\t\tunmatched = matcher( seed, null, xml, [] ),\n\t\t\t\t\t\ti = seed.length;\n\n\t\t\t\t\t// Match elements unmatched by `matcher`\n\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\tif ( (elem = unmatched[i]) ) {\n\t\t\t\t\t\t\tseed[i] = !(matches[i] = elem);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}) :\n\t\t\t\tfunction( elem, context, xml ) {\n\t\t\t\t\tinput[0] = elem;\n\t\t\t\t\tmatcher( input, null, xml, results );\n\t\t\t\t\treturn !results.pop();\n\t\t\t\t};\n\t\t}),\n\n\t\t\"has\": markFunction(function( selector ) {\n\t\t\treturn function( elem ) {\n\t\t\t\treturn Sizzle( selector, elem ).length > 0;\n\t\t\t};\n\t\t}),\n\n\t\t\"contains\": markFunction(function( text ) {\n\t\t\treturn function( elem ) {\n\t\t\t\treturn ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1;\n\t\t\t};\n\t\t}),\n\n\t\t// \"Whether an element is represented by a :lang() selector\n\t\t// is based solely on the element's language value\n\t\t// being equal to the identifier C,\n\t\t// or beginning with the identifier C immediately followed by \"-\".\n\t\t// The matching of C against the element's language value is performed case-insensitively.\n\t\t// The identifier C does not have to be a valid language name.\"\n\t\t// http://www.w3.org/TR/selectors/#lang-pseudo\n\t\t\"lang\": markFunction( function( lang ) {\n\t\t\t// lang value must be a valid identifier\n\t\t\tif ( !ridentifier.test(lang || \"\") ) {\n\t\t\t\tSizzle.error( \"unsupported lang: \" + lang );\n\t\t\t}\n\t\t\tlang = lang.replace( runescape, funescape ).toLowerCase();\n\t\t\treturn function( elem ) {\n\t\t\t\tvar elemLang;\n\t\t\t\tdo {\n\t\t\t\t\tif ( (elemLang = documentIsHTML ?\n\t\t\t\t\t\telem.lang :\n\t\t\t\t\t\telem.getAttribute(\"xml:lang\") || elem.getAttribute(\"lang\")) ) {\n\n\t\t\t\t\t\telemLang = elemLang.toLowerCase();\n\t\t\t\t\t\treturn elemLang === lang || elemLang.indexOf( lang + \"-\" ) === 0;\n\t\t\t\t\t}\n\t\t\t\t} while ( (elem = elem.parentNode) && elem.nodeType === 1 );\n\t\t\t\treturn false;\n\t\t\t};\n\t\t}),\n\n\t\t// Miscellaneous\n\t\t\"target\": function( elem ) {\n\t\t\tvar hash = window.location && window.location.hash;\n\t\t\treturn hash && hash.slice( 1 ) === elem.id;\n\t\t},\n\n\t\t\"root\": function( elem ) {\n\t\t\treturn elem === docElem;\n\t\t},\n\n\t\t\"focus\": function( elem ) {\n\t\t\treturn elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex);\n\t\t},\n\n\t\t// Boolean properties\n\t\t\"enabled\": function( elem ) {\n\t\t\treturn elem.disabled === false;\n\t\t},\n\n\t\t\"disabled\": function( elem ) {\n\t\t\treturn elem.disabled === true;\n\t\t},\n\n\t\t\"checked\": function( elem ) {\n\t\t\t// In CSS3, :checked should return both checked and selected elements\n\t\t\t// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked\n\t\t\tvar nodeName = elem.nodeName.toLowerCase();\n\t\t\treturn (nodeName === \"input\" && !!elem.checked) || (nodeName === \"option\" && !!elem.selected);\n\t\t},\n\n\t\t\"selected\": function( elem ) {\n\t\t\t// Accessing this property makes selected-by-default\n\t\t\t// options in Safari work properly\n\t\t\tif ( elem.parentNode ) {\n\t\t\t\telem.parentNode.selectedIndex;\n\t\t\t}\n\n\t\t\treturn elem.selected === true;\n\t\t},\n\n\t\t// Contents\n\t\t\"empty\": function( elem ) {\n\t\t\t// http://www.w3.org/TR/selectors/#empty-pseudo\n\t\t\t// :empty is only affected by element nodes and content nodes(including text(3), cdata(4)),\n\t\t\t//   not comment, processing instructions, or others\n\t\t\t// Thanks to Diego Perini for the nodeName shortcut\n\t\t\t//   Greater than \"@\" means alpha characters (specifically not starting with \"#\" or \"?\")\n\t\t\tfor ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {\n\t\t\t\tif ( elem.nodeName > \"@\" || elem.nodeType === 3 || elem.nodeType === 4 ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t},\n\n\t\t\"parent\": function( elem ) {\n\t\t\treturn !Expr.pseudos[\"empty\"]( elem );\n\t\t},\n\n\t\t// Element/input types\n\t\t\"header\": function( elem ) {\n\t\t\treturn rheader.test( elem.nodeName );\n\t\t},\n\n\t\t\"input\": function( elem ) {\n\t\t\treturn rinputs.test( elem.nodeName );\n\t\t},\n\n\t\t\"button\": function( elem ) {\n\t\t\tvar name = elem.nodeName.toLowerCase();\n\t\t\treturn name === \"input\" && elem.type === \"button\" || name === \"button\";\n\t\t},\n\n\t\t\"text\": function( elem ) {\n\t\t\tvar attr;\n\t\t\t// IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc)\n\t\t\t// use getAttribute instead to test this case\n\t\t\treturn elem.nodeName.toLowerCase() === \"input\" &&\n\t\t\t\telem.type === \"text\" &&\n\t\t\t\t( (attr = elem.getAttribute(\"type\")) == null || attr.toLowerCase() === elem.type );\n\t\t},\n\n\t\t// Position-in-collection\n\t\t\"first\": createPositionalPseudo(function() {\n\t\t\treturn [ 0 ];\n\t\t}),\n\n\t\t\"last\": createPositionalPseudo(function( matchIndexes, length ) {\n\t\t\treturn [ length - 1 ];\n\t\t}),\n\n\t\t\"eq\": createPositionalPseudo(function( matchIndexes, length, argument ) {\n\t\t\treturn [ argument < 0 ? argument + length : argument ];\n\t\t}),\n\n\t\t\"even\": createPositionalPseudo(function( matchIndexes, length ) {\n\t\t\tvar i = 0;\n\t\t\tfor ( ; i < length; i += 2 ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t}),\n\n\t\t\"odd\": createPositionalPseudo(function( matchIndexes, length ) {\n\t\t\tvar i = 1;\n\t\t\tfor ( ; i < length; i += 2 ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t}),\n\n\t\t\"lt\": createPositionalPseudo(function( matchIndexes, length, argument ) {\n\t\t\tvar i = argument < 0 ? argument + length : argument;\n\t\t\tfor ( ; --i >= 0; ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t}),\n\n\t\t\"gt\": createPositionalPseudo(function( matchIndexes, length, argument ) {\n\t\t\tvar i = argument < 0 ? argument + length : argument;\n\t\t\tfor ( ; ++i < length; ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t})\n\t}\n};\n\nExpr.pseudos[\"nth\"] = Expr.pseudos[\"eq\"];\n\n// Add button/input type pseudos\nfor ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {\n\tExpr.pseudos[ i ] = createInputPseudo( i );\n}\nfor ( i in { submit: true, reset: true } ) {\n\tExpr.pseudos[ i ] = createButtonPseudo( i );\n}\n\n// Easy API for creating new setFilters\nfunction setFilters() {}\nsetFilters.prototype = Expr.filters = Expr.pseudos;\nExpr.setFilters = new setFilters();\n\nfunction tokenize( selector, parseOnly ) {\n\tvar matched, match, tokens, type,\n\t\tsoFar, groups, preFilters,\n\t\tcached = tokenCache[ selector + \" \" ];\n\n\tif ( cached ) {\n\t\treturn parseOnly ? 0 : cached.slice( 0 );\n\t}\n\n\tsoFar = selector;\n\tgroups = [];\n\tpreFilters = Expr.preFilter;\n\n\twhile ( soFar ) {\n\n\t\t// Comma and first run\n\t\tif ( !matched || (match = rcomma.exec( soFar )) ) {\n\t\t\tif ( match ) {\n\t\t\t\t// Don't consume trailing commas as valid\n\t\t\t\tsoFar = soFar.slice( match[0].length ) || soFar;\n\t\t\t}\n\t\t\tgroups.push( tokens = [] );\n\t\t}\n\n\t\tmatched = false;\n\n\t\t// Combinators\n\t\tif ( (match = rcombinators.exec( soFar )) ) {\n\t\t\tmatched = match.shift();\n\t\t\ttokens.push({\n\t\t\t\tvalue: matched,\n\t\t\t\t// Cast descendant combinators to space\n\t\t\t\ttype: match[0].replace( rtrim, \" \" )\n\t\t\t});\n\t\t\tsoFar = soFar.slice( matched.length );\n\t\t}\n\n\t\t// Filters\n\t\tfor ( type in Expr.filter ) {\n\t\t\tif ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] ||\n\t\t\t\t(match = preFilters[ type ]( match ))) ) {\n\t\t\t\tmatched = match.shift();\n\t\t\t\ttokens.push({\n\t\t\t\t\tvalue: matched,\n\t\t\t\t\ttype: type,\n\t\t\t\t\tmatches: match\n\t\t\t\t});\n\t\t\t\tsoFar = soFar.slice( matched.length );\n\t\t\t}\n\t\t}\n\n\t\tif ( !matched ) {\n\t\t\tbreak;\n\t\t}\n\t}\n\n\t// Return the length of the invalid excess\n\t// if we're just parsing\n\t// Otherwise, throw an error or return tokens\n\treturn parseOnly ?\n\t\tsoFar.length :\n\t\tsoFar ?\n\t\t\tSizzle.error( selector ) :\n\t\t\t// Cache the tokens\n\t\t\ttokenCache( selector, groups ).slice( 0 );\n}\n\nfunction toSelector( tokens ) {\n\tvar i = 0,\n\t\tlen = tokens.length,\n\t\tselector = \"\";\n\tfor ( ; i < len; i++ ) {\n\t\tselector += tokens[i].value;\n\t}\n\treturn selector;\n}\n\nfunction addCombinator( matcher, combinator, base ) {\n\tvar dir = combinator.dir,\n\t\tcheckNonElements = base && dir === \"parentNode\",\n\t\tdoneName = done++;\n\n\treturn combinator.first ?\n\t\t// Check against closest ancestor/preceding element\n\t\tfunction( elem, context, xml ) {\n\t\t\twhile ( (elem = elem[ dir ]) ) {\n\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\n\t\t\t\t\treturn matcher( elem, context, xml );\n\t\t\t\t}\n\t\t\t}\n\t\t} :\n\n\t\t// Check against all ancestor/preceding elements\n\t\tfunction( elem, context, xml ) {\n\t\t\tvar data, cache, outerCache,\n\t\t\t\tdirkey = dirruns + \" \" + doneName;\n\n\t\t\t// We can't set arbitrary data on XML nodes, so they don't benefit from dir caching\n\t\t\tif ( xml ) {\n\t\t\t\twhile ( (elem = elem[ dir ]) ) {\n\t\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\n\t\t\t\t\t\tif ( matcher( elem, context, xml ) ) {\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\twhile ( (elem = elem[ dir ]) ) {\n\t\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\n\t\t\t\t\t\touterCache = elem[ expando ] || (elem[ expando ] = {});\n\t\t\t\t\t\tif ( (cache = outerCache[ dir ]) && cache[0] === dirkey ) {\n\t\t\t\t\t\t\tif ( (data = cache[1]) === true || data === cachedruns ) {\n\t\t\t\t\t\t\t\treturn data === true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tcache = outerCache[ dir ] = [ dirkey ];\n\t\t\t\t\t\t\tcache[1] = matcher( elem, context, xml ) || cachedruns;\n\t\t\t\t\t\t\tif ( cache[1] === true ) {\n\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t};\n}\n\nfunction elementMatcher( matchers ) {\n\treturn matchers.length > 1 ?\n\t\tfunction( elem, context, xml ) {\n\t\t\tvar i = matchers.length;\n\t\t\twhile ( i-- ) {\n\t\t\t\tif ( !matchers[i]( elem, context, xml ) ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t} :\n\t\tmatchers[0];\n}\n\nfunction condense( unmatched, map, filter, context, xml ) {\n\tvar elem,\n\t\tnewUnmatched = [],\n\t\ti = 0,\n\t\tlen = unmatched.length,\n\t\tmapped = map != null;\n\n\tfor ( ; i < len; i++ ) {\n\t\tif ( (elem = unmatched[i]) ) {\n\t\t\tif ( !filter || filter( elem, context, xml ) ) {\n\t\t\t\tnewUnmatched.push( elem );\n\t\t\t\tif ( mapped ) {\n\t\t\t\t\tmap.push( i );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn newUnmatched;\n}\n\nfunction setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {\n\tif ( postFilter && !postFilter[ expando ] ) {\n\t\tpostFilter = setMatcher( postFilter );\n\t}\n\tif ( postFinder && !postFinder[ expando ] ) {\n\t\tpostFinder = setMatcher( postFinder, postSelector );\n\t}\n\treturn markFunction(function( seed, results, context, xml ) {\n\t\tvar temp, i, elem,\n\t\t\tpreMap = [],\n\t\t\tpostMap = [],\n\t\t\tpreexisting = results.length,\n\n\t\t\t// Get initial elements from seed or context\n\t\t\telems = seed || multipleContexts( selector || \"*\", context.nodeType ? [ context ] : context, [] ),\n\n\t\t\t// Prefilter to get matcher input, preserving a map for seed-results synchronization\n\t\t\tmatcherIn = preFilter && ( seed || !selector ) ?\n\t\t\t\tcondense( elems, preMap, preFilter, context, xml ) :\n\t\t\t\telems,\n\n\t\t\tmatcherOut = matcher ?\n\t\t\t\t// If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results,\n\t\t\t\tpostFinder || ( seed ? preFilter : preexisting || postFilter ) ?\n\n\t\t\t\t\t// ...intermediate processing is necessary\n\t\t\t\t\t[] :\n\n\t\t\t\t\t// ...otherwise use results directly\n\t\t\t\t\tresults :\n\t\t\t\tmatcherIn;\n\n\t\t// Find primary matches\n\t\tif ( matcher ) {\n\t\t\tmatcher( matcherIn, matcherOut, context, xml );\n\t\t}\n\n\t\t// Apply postFilter\n\t\tif ( postFilter ) {\n\t\t\ttemp = condense( matcherOut, postMap );\n\t\t\tpostFilter( temp, [], context, xml );\n\n\t\t\t// Un-match failing elements by moving them back to matcherIn\n\t\t\ti = temp.length;\n\t\t\twhile ( i-- ) {\n\t\t\t\tif ( (elem = temp[i]) ) {\n\t\t\t\t\tmatcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ( seed ) {\n\t\t\tif ( postFinder || preFilter ) {\n\t\t\t\tif ( postFinder ) {\n\t\t\t\t\t// Get the final matcherOut by condensing this intermediate into postFinder contexts\n\t\t\t\t\ttemp = [];\n\t\t\t\t\ti = matcherOut.length;\n\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\tif ( (elem = matcherOut[i]) ) {\n\t\t\t\t\t\t\t// Restore matcherIn since elem is not yet a final match\n\t\t\t\t\t\t\ttemp.push( (matcherIn[i] = elem) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tpostFinder( null, (matcherOut = []), temp, xml );\n\t\t\t\t}\n\n\t\t\t\t// Move matched elements from seed to results to keep them synchronized\n\t\t\t\ti = matcherOut.length;\n\t\t\t\twhile ( i-- ) {\n\t\t\t\t\tif ( (elem = matcherOut[i]) &&\n\t\t\t\t\t\t(temp = postFinder ? indexOf.call( seed, elem ) : preMap[i]) > -1 ) {\n\n\t\t\t\t\t\tseed[temp] = !(results[temp] = elem);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t// Add elements to results, through postFinder if defined\n\t\t} else {\n\t\t\tmatcherOut = condense(\n\t\t\t\tmatcherOut === results ?\n\t\t\t\t\tmatcherOut.splice( preexisting, matcherOut.length ) :\n\t\t\t\t\tmatcherOut\n\t\t\t);\n\t\t\tif ( postFinder ) {\n\t\t\t\tpostFinder( null, results, matcherOut, xml );\n\t\t\t} else {\n\t\t\t\tpush.apply( results, matcherOut );\n\t\t\t}\n\t\t}\n\t});\n}\n\nfunction matcherFromTokens( tokens ) {\n\tvar checkContext, matcher, j,\n\t\tlen = tokens.length,\n\t\tleadingRelative = Expr.relative[ tokens[0].type ],\n\t\timplicitRelative = leadingRelative || Expr.relative[\" \"],\n\t\ti = leadingRelative ? 1 : 0,\n\n\t\t// The foundational matcher ensures that elements are reachable from top-level context(s)\n\t\tmatchContext = addCombinator( function( elem ) {\n\t\t\treturn elem === checkContext;\n\t\t}, implicitRelative, true ),\n\t\tmatchAnyContext = addCombinator( function( elem ) {\n\t\t\treturn indexOf.call( checkContext, elem ) > -1;\n\t\t}, implicitRelative, true ),\n\t\tmatchers = [ function( elem, context, xml ) {\n\t\t\treturn ( !leadingRelative && ( xml || context !== outermostContext ) ) || (\n\t\t\t\t(checkContext = context).nodeType ?\n\t\t\t\t\tmatchContext( elem, context, xml ) :\n\t\t\t\t\tmatchAnyContext( elem, context, xml ) );\n\t\t} ];\n\n\tfor ( ; i < len; i++ ) {\n\t\tif ( (matcher = Expr.relative[ tokens[i].type ]) ) {\n\t\t\tmatchers = [ addCombinator(elementMatcher( matchers ), matcher) ];\n\t\t} else {\n\t\t\tmatcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches );\n\n\t\t\t// Return special upon seeing a positional matcher\n\t\t\tif ( matcher[ expando ] ) {\n\t\t\t\t// Find the next relative operator (if any) for proper handling\n\t\t\t\tj = ++i;\n\t\t\t\tfor ( ; j < len; j++ ) {\n\t\t\t\t\tif ( Expr.relative[ tokens[j].type ] ) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn setMatcher(\n\t\t\t\t\ti > 1 && elementMatcher( matchers ),\n\t\t\t\t\ti > 1 && toSelector(\n\t\t\t\t\t\t// If the preceding token was a descendant combinator, insert an implicit any-element `*`\n\t\t\t\t\t\ttokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === \" \" ? \"*\" : \"\" })\n\t\t\t\t\t).replace( rtrim, \"$1\" ),\n\t\t\t\t\tmatcher,\n\t\t\t\t\ti < j && matcherFromTokens( tokens.slice( i, j ) ),\n\t\t\t\t\tj < len && matcherFromTokens( (tokens = tokens.slice( j )) ),\n\t\t\t\t\tj < len && toSelector( tokens )\n\t\t\t\t);\n\t\t\t}\n\t\t\tmatchers.push( matcher );\n\t\t}\n\t}\n\n\treturn elementMatcher( matchers );\n}\n\nfunction matcherFromGroupMatchers( elementMatchers, setMatchers ) {\n\t// A counter to specify which element is currently being matched\n\tvar matcherCachedRuns = 0,\n\t\tbySet = setMatchers.length > 0,\n\t\tbyElement = elementMatchers.length > 0,\n\t\tsuperMatcher = function( seed, context, xml, results, expandContext ) {\n\t\t\tvar elem, j, matcher,\n\t\t\t\tsetMatched = [],\n\t\t\t\tmatchedCount = 0,\n\t\t\t\ti = \"0\",\n\t\t\t\tunmatched = seed && [],\n\t\t\t\toutermost = expandContext != null,\n\t\t\t\tcontextBackup = outermostContext,\n\t\t\t\t// We must always have either seed elements or context\n\t\t\t\telems = seed || byElement && Expr.find[\"TAG\"]( \"*\", expandContext && context.parentNode || context ),\n\t\t\t\t// Use integer dirruns iff this is the outermost matcher\n\t\t\t\tdirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1);\n\n\t\t\tif ( outermost ) {\n\t\t\t\toutermostContext = context !== document && context;\n\t\t\t\tcachedruns = matcherCachedRuns;\n\t\t\t}\n\n\t\t\t// Add elements passing elementMatchers directly to results\n\t\t\t// Keep `i` a string if there are no elements so `matchedCount` will be \"00\" below\n\t\t\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\t\t\tif ( byElement && elem ) {\n\t\t\t\t\tj = 0;\n\t\t\t\t\twhile ( (matcher = elementMatchers[j++]) ) {\n\t\t\t\t\t\tif ( matcher( elem, context, xml ) ) {\n\t\t\t\t\t\t\tresults.push( elem );\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif ( outermost ) {\n\t\t\t\t\t\tdirruns = dirrunsUnique;\n\t\t\t\t\t\tcachedruns = ++matcherCachedRuns;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Track unmatched elements for set filters\n\t\t\t\tif ( bySet ) {\n\t\t\t\t\t// They will have gone through all possible matchers\n\t\t\t\t\tif ( (elem = !matcher && elem) ) {\n\t\t\t\t\t\tmatchedCount--;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Lengthen the array for every element, matched or not\n\t\t\t\t\tif ( seed ) {\n\t\t\t\t\t\tunmatched.push( elem );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Apply set filters to unmatched elements\n\t\t\tmatchedCount += i;\n\t\t\tif ( bySet && i !== matchedCount ) {\n\t\t\t\tj = 0;\n\t\t\t\twhile ( (matcher = setMatchers[j++]) ) {\n\t\t\t\t\tmatcher( unmatched, setMatched, context, xml );\n\t\t\t\t}\n\n\t\t\t\tif ( seed ) {\n\t\t\t\t\t// Reintegrate element matches to eliminate the need for sorting\n\t\t\t\t\tif ( matchedCount > 0 ) {\n\t\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\t\tif ( !(unmatched[i] || setMatched[i]) ) {\n\t\t\t\t\t\t\t\tsetMatched[i] = pop.call( results );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Discard index placeholder values to get only actual matches\n\t\t\t\t\tsetMatched = condense( setMatched );\n\t\t\t\t}\n\n\t\t\t\t// Add matches to results\n\t\t\t\tpush.apply( results, setMatched );\n\n\t\t\t\t// Seedless set matches succeeding multiple successful matchers stipulate sorting\n\t\t\t\tif ( outermost && !seed && setMatched.length > 0 &&\n\t\t\t\t\t( matchedCount + setMatchers.length ) > 1 ) {\n\n\t\t\t\t\tSizzle.uniqueSort( results );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Override manipulation of globals by nested matchers\n\t\t\tif ( outermost ) {\n\t\t\t\tdirruns = dirrunsUnique;\n\t\t\t\toutermostContext = contextBackup;\n\t\t\t}\n\n\t\t\treturn unmatched;\n\t\t};\n\n\treturn bySet ?\n\t\tmarkFunction( superMatcher ) :\n\t\tsuperMatcher;\n}\n\ncompile = Sizzle.compile = function( selector, group /* Internal Use Only */ ) {\n\tvar i,\n\t\tsetMatchers = [],\n\t\telementMatchers = [],\n\t\tcached = compilerCache[ selector + \" \" ];\n\n\tif ( !cached ) {\n\t\t// Generate a function of recursive functions that can be used to check each element\n\t\tif ( !group ) {\n\t\t\tgroup = tokenize( selector );\n\t\t}\n\t\ti = group.length;\n\t\twhile ( i-- ) {\n\t\t\tcached = matcherFromTokens( group[i] );\n\t\t\tif ( cached[ expando ] ) {\n\t\t\t\tsetMatchers.push( cached );\n\t\t\t} else {\n\t\t\t\telementMatchers.push( cached );\n\t\t\t}\n\t\t}\n\n\t\t// Cache the compiled function\n\t\tcached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) );\n\t}\n\treturn cached;\n};\n\nfunction multipleContexts( selector, contexts, results ) {\n\tvar i = 0,\n\t\tlen = contexts.length;\n\tfor ( ; i < len; i++ ) {\n\t\tSizzle( selector, contexts[i], results );\n\t}\n\treturn results;\n}\n\nfunction select( selector, context, results, seed ) {\n\tvar i, tokens, token, type, find,\n\t\tmatch = tokenize( selector );\n\n\tif ( !seed ) {\n\t\t// Try to minimize operations if there is only one group\n\t\tif ( match.length === 1 ) {\n\n\t\t\t// Take a shortcut and set the context if the root selector is an ID\n\t\t\ttokens = match[0] = match[0].slice( 0 );\n\t\t\tif ( tokens.length > 2 && (token = tokens[0]).type === \"ID\" &&\n\t\t\t\t\tsupport.getById && context.nodeType === 9 && documentIsHTML &&\n\t\t\t\t\tExpr.relative[ tokens[1].type ] ) {\n\n\t\t\t\tcontext = ( Expr.find[\"ID\"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0];\n\t\t\t\tif ( !context ) {\n\t\t\t\t\treturn results;\n\t\t\t\t}\n\t\t\t\tselector = selector.slice( tokens.shift().value.length );\n\t\t\t}\n\n\t\t\t// Fetch a seed set for right-to-left matching\n\t\t\ti = matchExpr[\"needsContext\"].test( selector ) ? 0 : tokens.length;\n\t\t\twhile ( i-- ) {\n\t\t\t\ttoken = tokens[i];\n\n\t\t\t\t// Abort if we hit a combinator\n\t\t\t\tif ( Expr.relative[ (type = token.type) ] ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif ( (find = Expr.find[ type ]) ) {\n\t\t\t\t\t// Search, expanding context for leading sibling combinators\n\t\t\t\t\tif ( (seed = find(\n\t\t\t\t\t\ttoken.matches[0].replace( runescape, funescape ),\n\t\t\t\t\t\trsibling.test( tokens[0].type ) && context.parentNode || context\n\t\t\t\t\t)) ) {\n\n\t\t\t\t\t\t// If seed is empty or no tokens remain, we can return early\n\t\t\t\t\t\ttokens.splice( i, 1 );\n\t\t\t\t\t\tselector = seed.length && toSelector( tokens );\n\t\t\t\t\t\tif ( !selector ) {\n\t\t\t\t\t\t\tpush.apply( results, seed );\n\t\t\t\t\t\t\treturn results;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Compile and execute a filtering function\n\t// Provide `match` to avoid retokenization if we modified the selector above\n\tcompile( selector, match )(\n\t\tseed,\n\t\tcontext,\n\t\t!documentIsHTML,\n\t\tresults,\n\t\trsibling.test( selector )\n\t);\n\treturn results;\n}\n\n// One-time assignments\n\n// Sort stability\nsupport.sortStable = expando.split(\"\").sort( sortOrder ).join(\"\") === expando;\n\n// Support: Chrome<14\n// Always assume duplicates if they aren't passed to the comparison function\nsupport.detectDuplicates = hasDuplicate;\n\n// Initialize against the default document\nsetDocument();\n\n// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27)\n// Detached nodes confoundingly follow *each other*\nsupport.sortDetached = assert(function( div1 ) {\n\t// Should return 1, but returns 4 (following)\n\treturn div1.compareDocumentPosition( document.createElement(\"div\") ) & 1;\n});\n\n// Support: IE<8\n// Prevent attribute/property \"interpolation\"\n// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx\nif ( !assert(function( div ) {\n\tdiv.innerHTML = \"<a href='#'></a>\";\n\treturn div.firstChild.getAttribute(\"href\") === \"#\" ;\n}) ) {\n\taddHandle( \"type|href|height|width\", function( elem, name, isXML ) {\n\t\tif ( !isXML ) {\n\t\t\treturn elem.getAttribute( name, name.toLowerCase() === \"type\" ? 1 : 2 );\n\t\t}\n\t});\n}\n\n// Support: IE<9\n// Use defaultValue in place of getAttribute(\"value\")\nif ( !support.attributes || !assert(function( div ) {\n\tdiv.innerHTML = \"<input/>\";\n\tdiv.firstChild.setAttribute( \"value\", \"\" );\n\treturn div.firstChild.getAttribute( \"value\" ) === \"\";\n}) ) {\n\taddHandle( \"value\", function( elem, name, isXML ) {\n\t\tif ( !isXML && elem.nodeName.toLowerCase() === \"input\" ) {\n\t\t\treturn elem.defaultValue;\n\t\t}\n\t});\n}\n\n// Support: IE<9\n// Use getAttributeNode to fetch booleans when getAttribute lies\nif ( !assert(function( div ) {\n\treturn div.getAttribute(\"disabled\") == null;\n}) ) {\n\taddHandle( booleans, function( elem, name, isXML ) {\n\t\tvar val;\n\t\tif ( !isXML ) {\n\t\t\treturn (val = elem.getAttributeNode( name )) && val.specified ?\n\t\t\t\tval.value :\n\t\t\t\telem[ name ] === true ? name.toLowerCase() : null;\n\t\t}\n\t});\n}\n\njQuery.find = Sizzle;\njQuery.expr = Sizzle.selectors;\njQuery.expr[\":\"] = jQuery.expr.pseudos;\njQuery.unique = Sizzle.uniqueSort;\njQuery.text = Sizzle.getText;\njQuery.isXMLDoc = Sizzle.isXML;\njQuery.contains = Sizzle.contains;\n\n\n})( window );\n// String to Object options format cache\nvar optionsCache = {};\n\n// Convert String-formatted options into Object-formatted ones and store in cache\nfunction createOptions( options ) {\n\tvar object = optionsCache[ options ] = {};\n\tjQuery.each( options.match( core_rnotwhite ) || [], function( _, flag ) {\n\t\tobject[ flag ] = true;\n\t});\n\treturn object;\n}\n\n/*\n * Create a callback list using the following parameters:\n *\n *\toptions: an optional list of space-separated options that will change how\n *\t\t\tthe callback list behaves or a more traditional option object\n *\n * By default a callback list will act like an event callback list and can be\n * \"fired\" multiple times.\n *\n * Possible options:\n *\n *\tonce:\t\t\twill ensure the callback list can only be fired once (like a Deferred)\n *\n *\tmemory:\t\t\twill keep track of previous values and will call any callback added\n *\t\t\t\t\tafter the list has been fired right away with the latest \"memorized\"\n *\t\t\t\t\tvalues (like a Deferred)\n *\n *\tunique:\t\t\twill ensure a callback can only be added once (no duplicate in the list)\n *\n *\tstopOnFalse:\tinterrupt callings when a callback returns false\n *\n */\njQuery.Callbacks = function( options ) {\n\n\t// Convert options from String-formatted to Object-formatted if needed\n\t// (we check in cache first)\n\toptions = typeof options === \"string\" ?\n\t\t( optionsCache[ options ] || createOptions( options ) ) :\n\t\tjQuery.extend( {}, options );\n\n\tvar // Flag to know if list is currently firing\n\t\tfiring,\n\t\t// Last fire value (for non-forgettable lists)\n\t\tmemory,\n\t\t// Flag to know if list was already fired\n\t\tfired,\n\t\t// End of the loop when firing\n\t\tfiringLength,\n\t\t// Index of currently firing callback (modified by remove if needed)\n\t\tfiringIndex,\n\t\t// First callback to fire (used internally by add and fireWith)\n\t\tfiringStart,\n\t\t// Actual callback list\n\t\tlist = [],\n\t\t// Stack of fire calls for repeatable lists\n\t\tstack = !options.once && [],\n\t\t// Fire callbacks\n\t\tfire = function( data ) {\n\t\t\tmemory = options.memory && data;\n\t\t\tfired = true;\n\t\t\tfiringIndex = firingStart || 0;\n\t\t\tfiringStart = 0;\n\t\t\tfiringLength = list.length;\n\t\t\tfiring = true;\n\t\t\tfor ( ; list && firingIndex < firingLength; firingIndex++ ) {\n\t\t\t\tif ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false && options.stopOnFalse ) {\n\t\t\t\t\tmemory = false; // To prevent further calls using add\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tfiring = false;\n\t\t\tif ( list ) {\n\t\t\t\tif ( stack ) {\n\t\t\t\t\tif ( stack.length ) {\n\t\t\t\t\t\tfire( stack.shift() );\n\t\t\t\t\t}\n\t\t\t\t} else if ( memory ) {\n\t\t\t\t\tlist = [];\n\t\t\t\t} else {\n\t\t\t\t\tself.disable();\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t// Actual Callbacks object\n\t\tself = {\n\t\t\t// Add a callback or a collection of callbacks to the list\n\t\t\tadd: function() {\n\t\t\t\tif ( list ) {\n\t\t\t\t\t// First, we save the current length\n\t\t\t\t\tvar start = list.length;\n\t\t\t\t\t(function add( args ) {\n\t\t\t\t\t\tjQuery.each( args, function( _, arg ) {\n\t\t\t\t\t\t\tvar type = jQuery.type( arg );\n\t\t\t\t\t\t\tif ( type === \"function\" ) {\n\t\t\t\t\t\t\t\tif ( !options.unique || !self.has( arg ) ) {\n\t\t\t\t\t\t\t\t\tlist.push( arg );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else if ( arg && arg.length && type !== \"string\" ) {\n\t\t\t\t\t\t\t\t// Inspect recursively\n\t\t\t\t\t\t\t\tadd( arg );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t})( arguments );\n\t\t\t\t\t// Do we need to add the callbacks to the\n\t\t\t\t\t// current firing batch?\n\t\t\t\t\tif ( firing ) {\n\t\t\t\t\t\tfiringLength = list.length;\n\t\t\t\t\t// With memory, if we're not firing then\n\t\t\t\t\t// we should call right away\n\t\t\t\t\t} else if ( memory ) {\n\t\t\t\t\t\tfiringStart = start;\n\t\t\t\t\t\tfire( memory );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\t\t\t// Remove a callback from the list\n\t\t\tremove: function() {\n\t\t\t\tif ( list ) {\n\t\t\t\t\tjQuery.each( arguments, function( _, arg ) {\n\t\t\t\t\t\tvar index;\n\t\t\t\t\t\twhile( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {\n\t\t\t\t\t\t\tlist.splice( index, 1 );\n\t\t\t\t\t\t\t// Handle firing indexes\n\t\t\t\t\t\t\tif ( firing ) {\n\t\t\t\t\t\t\t\tif ( index <= firingLength ) {\n\t\t\t\t\t\t\t\t\tfiringLength--;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif ( index <= firingIndex ) {\n\t\t\t\t\t\t\t\t\tfiringIndex--;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\t\t\t// Check if a given callback is in the list.\n\t\t\t// If no argument is given, return whether or not list has callbacks attached.\n\t\t\thas: function( fn ) {\n\t\t\t\treturn fn ? jQuery.inArray( fn, list ) > -1 : !!( list && list.length );\n\t\t\t},\n\t\t\t// Remove all callbacks from the list\n\t\t\tempty: function() {\n\t\t\t\tlist = [];\n\t\t\t\tfiringLength = 0;\n\t\t\t\treturn this;\n\t\t\t},\n\t\t\t// Have the list do nothing anymore\n\t\t\tdisable: function() {\n\t\t\t\tlist = stack = memory = undefined;\n\t\t\t\treturn this;\n\t\t\t},\n\t\t\t// Is it disabled?\n\t\t\tdisabled: function() {\n\t\t\t\treturn !list;\n\t\t\t},\n\t\t\t// Lock the list in its current state\n\t\t\tlock: function() {\n\t\t\t\tstack = undefined;\n\t\t\t\tif ( !memory ) {\n\t\t\t\t\tself.disable();\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\t\t\t// Is it locked?\n\t\t\tlocked: function() {\n\t\t\t\treturn !stack;\n\t\t\t},\n\t\t\t// Call all callbacks with the given context and arguments\n\t\t\tfireWith: function( context, args ) {\n\t\t\t\tif ( list && ( !fired || stack ) ) {\n\t\t\t\t\targs = args || [];\n\t\t\t\t\targs = [ context, args.slice ? args.slice() : args ];\n\t\t\t\t\tif ( firing ) {\n\t\t\t\t\t\tstack.push( args );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfire( args );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\t\t\t// Call all the callbacks with the given arguments\n\t\t\tfire: function() {\n\t\t\t\tself.fireWith( this, arguments );\n\t\t\t\treturn this;\n\t\t\t},\n\t\t\t// To know if the callbacks have already been called at least once\n\t\t\tfired: function() {\n\t\t\t\treturn !!fired;\n\t\t\t}\n\t\t};\n\n\treturn self;\n};\njQuery.extend({\n\n\tDeferred: function( func ) {\n\t\tvar tuples = [\n\t\t\t\t// action, add listener, listener list, final state\n\t\t\t\t[ \"resolve\", \"done\", jQuery.Callbacks(\"once memory\"), \"resolved\" ],\n\t\t\t\t[ \"reject\", \"fail\", jQuery.Callbacks(\"once memory\"), \"rejected\" ],\n\t\t\t\t[ \"notify\", \"progress\", jQuery.Callbacks(\"memory\") ]\n\t\t\t],\n\t\t\tstate = \"pending\",\n\t\t\tpromise = {\n\t\t\t\tstate: function() {\n\t\t\t\t\treturn state;\n\t\t\t\t},\n\t\t\t\talways: function() {\n\t\t\t\t\tdeferred.done( arguments ).fail( arguments );\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\t\t\t\tthen: function( /* fnDone, fnFail, fnProgress */ ) {\n\t\t\t\t\tvar fns = arguments;\n\t\t\t\t\treturn jQuery.Deferred(function( newDefer ) {\n\t\t\t\t\t\tjQuery.each( tuples, function( i, tuple ) {\n\t\t\t\t\t\t\tvar action = tuple[ 0 ],\n\t\t\t\t\t\t\t\tfn = jQuery.isFunction( fns[ i ] ) && fns[ i ];\n\t\t\t\t\t\t\t// deferred[ done | fail | progress ] for forwarding actions to newDefer\n\t\t\t\t\t\t\tdeferred[ tuple[1] ](function() {\n\t\t\t\t\t\t\t\tvar returned = fn && fn.apply( this, arguments );\n\t\t\t\t\t\t\t\tif ( returned && jQuery.isFunction( returned.promise ) ) {\n\t\t\t\t\t\t\t\t\treturned.promise()\n\t\t\t\t\t\t\t\t\t\t.done( newDefer.resolve )\n\t\t\t\t\t\t\t\t\t\t.fail( newDefer.reject )\n\t\t\t\t\t\t\t\t\t\t.progress( newDefer.notify );\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tnewDefer[ action + \"With\" ]( this === promise ? newDefer.promise() : this, fn ? [ returned ] : arguments );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t});\n\t\t\t\t\t\tfns = null;\n\t\t\t\t\t}).promise();\n\t\t\t\t},\n\t\t\t\t// Get a promise for this deferred\n\t\t\t\t// If obj is provided, the promise aspect is added to the object\n\t\t\t\tpromise: function( obj ) {\n\t\t\t\t\treturn obj != null ? jQuery.extend( obj, promise ) : promise;\n\t\t\t\t}\n\t\t\t},\n\t\t\tdeferred = {};\n\n\t\t// Keep pipe for back-compat\n\t\tpromise.pipe = promise.then;\n\n\t\t// Add list-specific methods\n\t\tjQuery.each( tuples, function( i, tuple ) {\n\t\t\tvar list = tuple[ 2 ],\n\t\t\t\tstateString = tuple[ 3 ];\n\n\t\t\t// promise[ done | fail | progress ] = list.add\n\t\t\tpromise[ tuple[1] ] = list.add;\n\n\t\t\t// Handle state\n\t\t\tif ( stateString ) {\n\t\t\t\tlist.add(function() {\n\t\t\t\t\t// state = [ resolved | rejected ]\n\t\t\t\t\tstate = stateString;\n\n\t\t\t\t// [ reject_list | resolve_list ].disable; progress_list.lock\n\t\t\t\t}, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock );\n\t\t\t}\n\n\t\t\t// deferred[ resolve | reject | notify ]\n\t\t\tdeferred[ tuple[0] ] = function() {\n\t\t\t\tdeferred[ tuple[0] + \"With\" ]( this === deferred ? promise : this, arguments );\n\t\t\t\treturn this;\n\t\t\t};\n\t\t\tdeferred[ tuple[0] + \"With\" ] = list.fireWith;\n\t\t});\n\n\t\t// Make the deferred a promise\n\t\tpromise.promise( deferred );\n\n\t\t// Call given func if any\n\t\tif ( func ) {\n\t\t\tfunc.call( deferred, deferred );\n\t\t}\n\n\t\t// All done!\n\t\treturn deferred;\n\t},\n\n\t// Deferred helper\n\twhen: function( subordinate /* , ..., subordinateN */ ) {\n\t\tvar i = 0,\n\t\t\tresolveValues = core_slice.call( arguments ),\n\t\t\tlength = resolveValues.length,\n\n\t\t\t// the count of uncompleted subordinates\n\t\t\tremaining = length !== 1 || ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0,\n\n\t\t\t// the master Deferred. If resolveValues consist of only a single Deferred, just use that.\n\t\t\tdeferred = remaining === 1 ? subordinate : jQuery.Deferred(),\n\n\t\t\t// Update function for both resolve and progress values\n\t\t\tupdateFunc = function( i, contexts, values ) {\n\t\t\t\treturn function( value ) {\n\t\t\t\t\tcontexts[ i ] = this;\n\t\t\t\t\tvalues[ i ] = arguments.length > 1 ? core_slice.call( arguments ) : value;\n\t\t\t\t\tif( values === progressValues ) {\n\t\t\t\t\t\tdeferred.notifyWith( contexts, values );\n\t\t\t\t\t} else if ( !( --remaining ) ) {\n\t\t\t\t\t\tdeferred.resolveWith( contexts, values );\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t},\n\n\t\t\tprogressValues, progressContexts, resolveContexts;\n\n\t\t// add listeners to Deferred subordinates; treat others as resolved\n\t\tif ( length > 1 ) {\n\t\t\tprogressValues = new Array( length );\n\t\t\tprogressContexts = new Array( length );\n\t\t\tresolveContexts = new Array( length );\n\t\t\tfor ( ; i < length; i++ ) {\n\t\t\t\tif ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) {\n\t\t\t\t\tresolveValues[ i ].promise()\n\t\t\t\t\t\t.done( updateFunc( i, resolveContexts, resolveValues ) )\n\t\t\t\t\t\t.fail( deferred.reject )\n\t\t\t\t\t\t.progress( updateFunc( i, progressContexts, progressValues ) );\n\t\t\t\t} else {\n\t\t\t\t\t--remaining;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// if we're not waiting on anything, resolve the master\n\t\tif ( !remaining ) {\n\t\t\tdeferred.resolveWith( resolveContexts, resolveValues );\n\t\t}\n\n\t\treturn deferred.promise();\n\t}\n});\njQuery.support = (function( support ) {\n\n\tvar all, a, input, select, fragment, opt, eventName, isSupported, i,\n\t\tdiv = document.createElement(\"div\");\n\n\t// Setup\n\tdiv.setAttribute( \"className\", \"t\" );\n\tdiv.innerHTML = \"  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>\";\n\n\t// Finish early in limited (non-browser) environments\n\tall = div.getElementsByTagName(\"*\") || [];\n\ta = div.getElementsByTagName(\"a\")[ 0 ];\n\tif ( !a || !a.style || !all.length ) {\n\t\treturn support;\n\t}\n\n\t// First batch of tests\n\tselect = document.createElement(\"select\");\n\topt = select.appendChild( document.createElement(\"option\") );\n\tinput = div.getElementsByTagName(\"input\")[ 0 ];\n\n\ta.style.cssText = \"top:1px;float:left;opacity:.5\";\n\n\t// Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7)\n\tsupport.getSetAttribute = div.className !== \"t\";\n\n\t// IE strips leading whitespace when .innerHTML is used\n\tsupport.leadingWhitespace = div.firstChild.nodeType === 3;\n\n\t// Make sure that tbody elements aren't automatically inserted\n\t// IE will insert them into empty tables\n\tsupport.tbody = !div.getElementsByTagName(\"tbody\").length;\n\n\t// Make sure that link elements get serialized correctly by innerHTML\n\t// This requires a wrapper element in IE\n\tsupport.htmlSerialize = !!div.getElementsByTagName(\"link\").length;\n\n\t// Get the style information from getAttribute\n\t// (IE uses .cssText instead)\n\tsupport.style = /top/.test( a.getAttribute(\"style\") );\n\n\t// Make sure that URLs aren't manipulated\n\t// (IE normalizes it by default)\n\tsupport.hrefNormalized = a.getAttribute(\"href\") === \"/a\";\n\n\t// Make sure that element opacity exists\n\t// (IE uses filter instead)\n\t// Use a regex to work around a WebKit issue. See #5145\n\tsupport.opacity = /^0.5/.test( a.style.opacity );\n\n\t// Verify style float existence\n\t// (IE uses styleFloat instead of cssFloat)\n\tsupport.cssFloat = !!a.style.cssFloat;\n\n\t// Check the default checkbox/radio value (\"\" on WebKit; \"on\" elsewhere)\n\tsupport.checkOn = !!input.value;\n\n\t// Make sure that a selected-by-default option has a working selected property.\n\t// (WebKit defaults to false instead of true, IE too, if it's in an optgroup)\n\tsupport.optSelected = opt.selected;\n\n\t// Tests for enctype support on a form (#6743)\n\tsupport.enctype = !!document.createElement(\"form\").enctype;\n\n\t// Makes sure cloning an html5 element does not cause problems\n\t// Where outerHTML is undefined, this still works\n\tsupport.html5Clone = document.createElement(\"nav\").cloneNode( true ).outerHTML !== \"<:nav></:nav>\";\n\n\t// Will be defined later\n\tsupport.inlineBlockNeedsLayout = false;\n\tsupport.shrinkWrapBlocks = false;\n\tsupport.pixelPosition = false;\n\tsupport.deleteExpando = true;\n\tsupport.noCloneEvent = true;\n\tsupport.reliableMarginRight = true;\n\tsupport.boxSizingReliable = true;\n\n\t// Make sure checked status is properly cloned\n\tinput.checked = true;\n\tsupport.noCloneChecked = input.cloneNode( true ).checked;\n\n\t// Make sure that the options inside disabled selects aren't marked as disabled\n\t// (WebKit marks them as disabled)\n\tselect.disabled = true;\n\tsupport.optDisabled = !opt.disabled;\n\n\t// Support: IE<9\n\ttry {\n\t\tdelete div.test;\n\t} catch( e ) {\n\t\tsupport.deleteExpando = false;\n\t}\n\n\t// Check if we can trust getAttribute(\"value\")\n\tinput = document.createElement(\"input\");\n\tinput.setAttribute( \"value\", \"\" );\n\tsupport.input = input.getAttribute( \"value\" ) === \"\";\n\n\t// Check if an input maintains its value after becoming a radio\n\tinput.value = \"t\";\n\tinput.setAttribute( \"type\", \"radio\" );\n\tsupport.radioValue = input.value === \"t\";\n\n\t// #11217 - WebKit loses check when the name is after the checked attribute\n\tinput.setAttribute( \"checked\", \"t\" );\n\tinput.setAttribute( \"name\", \"t\" );\n\n\tfragment = document.createDocumentFragment();\n\tfragment.appendChild( input );\n\n\t// Check if a disconnected checkbox will retain its checked\n\t// value of true after appended to the DOM (IE6/7)\n\tsupport.appendChecked = input.checked;\n\n\t// WebKit doesn't clone checked state correctly in fragments\n\tsupport.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked;\n\n\t// Support: IE<9\n\t// Opera does not clone events (and typeof div.attachEvent === undefined).\n\t// IE9-10 clones events bound via attachEvent, but they don't trigger with .click()\n\tif ( div.attachEvent ) {\n\t\tdiv.attachEvent( \"onclick\", function() {\n\t\t\tsupport.noCloneEvent = false;\n\t\t});\n\n\t\tdiv.cloneNode( true ).click();\n\t}\n\n\t// Support: IE<9 (lack submit/change bubble), Firefox 17+ (lack focusin event)\n\t// Beware of CSP restrictions (https://developer.mozilla.org/en/Security/CSP)\n\tfor ( i in { submit: true, change: true, focusin: true }) {\n\t\tdiv.setAttribute( eventName = \"on\" + i, \"t\" );\n\n\t\tsupport[ i + \"Bubbles\" ] = eventName in window || div.attributes[ eventName ].expando === false;\n\t}\n\n\tdiv.style.backgroundClip = \"content-box\";\n\tdiv.cloneNode( true ).style.backgroundClip = \"\";\n\tsupport.clearCloneStyle = div.style.backgroundClip === \"content-box\";\n\n\t// Support: IE<9\n\t// Iteration over object's inherited properties before its own.\n\tfor ( i in jQuery( support ) ) {\n\t\tbreak;\n\t}\n\tsupport.ownLast = i !== \"0\";\n\n\t// Run tests that need a body at doc ready\n\tjQuery(function() {\n\t\tvar container, marginDiv, tds,\n\t\t\tdivReset = \"padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;\",\n\t\t\tbody = document.getElementsByTagName(\"body\")[0];\n\n\t\tif ( !body ) {\n\t\t\t// Return for frameset docs that don't have a body\n\t\t\treturn;\n\t\t}\n\n\t\tcontainer = document.createElement(\"div\");\n\t\tcontainer.style.cssText = \"border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px\";\n\n\t\tbody.appendChild( container ).appendChild( div );\n\n\t\t// Support: IE8\n\t\t// Check if table cells still have offsetWidth/Height when they are set\n\t\t// to display:none and there are still other visible table cells in a\n\t\t// table row; if so, offsetWidth/Height are not reliable for use when\n\t\t// determining if an element has been hidden directly using\n\t\t// display:none (it is still safe to use offsets if a parent element is\n\t\t// hidden; don safety goggles and see bug #4512 for more information).\n\t\tdiv.innerHTML = \"<table><tr><td></td><td>t</td></tr></table>\";\n\t\ttds = div.getElementsByTagName(\"td\");\n\t\ttds[ 0 ].style.cssText = \"padding:0;margin:0;border:0;display:none\";\n\t\tisSupported = ( tds[ 0 ].offsetHeight === 0 );\n\n\t\ttds[ 0 ].style.display = \"\";\n\t\ttds[ 1 ].style.display = \"none\";\n\n\t\t// Support: IE8\n\t\t// Check if empty table cells still have offsetWidth/Height\n\t\tsupport.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 );\n\n\t\t// Check box-sizing and margin behavior.\n\t\tdiv.innerHTML = \"\";\n\t\tdiv.style.cssText = \"box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;\";\n\n\t\t// Workaround failing boxSizing test due to offsetWidth returning wrong value\n\t\t// with some non-1 values of body zoom, ticket #13543\n\t\tjQuery.swap( body, body.style.zoom != null ? { zoom: 1 } : {}, function() {\n\t\t\tsupport.boxSizing = div.offsetWidth === 4;\n\t\t});\n\n\t\t// Use window.getComputedStyle because jsdom on node.js will break without it.\n\t\tif ( window.getComputedStyle ) {\n\t\t\tsupport.pixelPosition = ( window.getComputedStyle( div, null ) || {} ).top !== \"1%\";\n\t\t\tsupport.boxSizingReliable = ( window.getComputedStyle( div, null ) || { width: \"4px\" } ).width === \"4px\";\n\n\t\t\t// Check if div with explicit width and no margin-right incorrectly\n\t\t\t// gets computed margin-right based on width of container. (#3333)\n\t\t\t// Fails in WebKit before Feb 2011 nightlies\n\t\t\t// WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right\n\t\t\tmarginDiv = div.appendChild( document.createElement(\"div\") );\n\t\t\tmarginDiv.style.cssText = div.style.cssText = divReset;\n\t\t\tmarginDiv.style.marginRight = marginDiv.style.width = \"0\";\n\t\t\tdiv.style.width = \"1px\";\n\n\t\t\tsupport.reliableMarginRight =\n\t\t\t\t!parseFloat( ( window.getComputedStyle( marginDiv, null ) || {} ).marginRight );\n\t\t}\n\n\t\tif ( typeof div.style.zoom !== core_strundefined ) {\n\t\t\t// Support: IE<8\n\t\t\t// Check if natively block-level elements act like inline-block\n\t\t\t// elements when setting their display to 'inline' and giving\n\t\t\t// them layout\n\t\t\tdiv.innerHTML = \"\";\n\t\t\tdiv.style.cssText = divReset + \"width:1px;padding:1px;display:inline;zoom:1\";\n\t\t\tsupport.inlineBlockNeedsLayout = ( div.offsetWidth === 3 );\n\n\t\t\t// Support: IE6\n\t\t\t// Check if elements with layout shrink-wrap their children\n\t\t\tdiv.style.display = \"block\";\n\t\t\tdiv.innerHTML = \"<div></div>\";\n\t\t\tdiv.firstChild.style.width = \"5px\";\n\t\t\tsupport.shrinkWrapBlocks = ( div.offsetWidth !== 3 );\n\n\t\t\tif ( support.inlineBlockNeedsLayout ) {\n\t\t\t\t// Prevent IE 6 from affecting layout for positioned elements #11048\n\t\t\t\t// Prevent IE from shrinking the body in IE 7 mode #12869\n\t\t\t\t// Support: IE<8\n\t\t\t\tbody.style.zoom = 1;\n\t\t\t}\n\t\t}\n\n\t\tbody.removeChild( container );\n\n\t\t// Null elements to avoid leaks in IE\n\t\tcontainer = div = tds = marginDiv = null;\n\t});\n\n\t// Null elements to avoid leaks in IE\n\tall = select = fragment = opt = a = input = null;\n\n\treturn support;\n})({});\n\nvar rbrace = /(?:\\{[\\s\\S]*\\}|\\[[\\s\\S]*\\])$/,\n\trmultiDash = /([A-Z])/g;\n\nfunction internalData( elem, name, data, pvt /* Internal Use Only */ ){\n\tif ( !jQuery.acceptData( elem ) ) {\n\t\treturn;\n\t}\n\n\tvar ret, thisCache,\n\t\tinternalKey = jQuery.expando,\n\n\t\t// We have to handle DOM nodes and JS objects differently because IE6-7\n\t\t// can't GC object references properly across the DOM-JS boundary\n\t\tisNode = elem.nodeType,\n\n\t\t// Only DOM nodes need the global jQuery cache; JS object data is\n\t\t// attached directly to the object so GC can occur automatically\n\t\tcache = isNode ? jQuery.cache : elem,\n\n\t\t// Only defining an ID for JS objects if its cache already exists allows\n\t\t// the code to shortcut on the same path as a DOM node with no cache\n\t\tid = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey;\n\n\t// Avoid doing any more work than we need to when trying to get data on an\n\t// object that has no data at all\n\tif ( (!id || !cache[id] || (!pvt && !cache[id].data)) && data === undefined && typeof name === \"string\" ) {\n\t\treturn;\n\t}\n\n\tif ( !id ) {\n\t\t// Only DOM nodes need a new unique ID for each element since their data\n\t\t// ends up in the global cache\n\t\tif ( isNode ) {\n\t\t\tid = elem[ internalKey ] = core_deletedIds.pop() || jQuery.guid++;\n\t\t} else {\n\t\t\tid = internalKey;\n\t\t}\n\t}\n\n\tif ( !cache[ id ] ) {\n\t\t// Avoid exposing jQuery metadata on plain JS objects when the object\n\t\t// is serialized using JSON.stringify\n\t\tcache[ id ] = isNode ? {} : { toJSON: jQuery.noop };\n\t}\n\n\t// An object can be passed to jQuery.data instead of a key/value pair; this gets\n\t// shallow copied over onto the existing cache\n\tif ( typeof name === \"object\" || typeof name === \"function\" ) {\n\t\tif ( pvt ) {\n\t\t\tcache[ id ] = jQuery.extend( cache[ id ], name );\n\t\t} else {\n\t\t\tcache[ id ].data = jQuery.extend( cache[ id ].data, name );\n\t\t}\n\t}\n\n\tthisCache = cache[ id ];\n\n\t// jQuery data() is stored in a separate object inside the object's internal data\n\t// cache in order to avoid key collisions between internal data and user-defined\n\t// data.\n\tif ( !pvt ) {\n\t\tif ( !thisCache.data ) {\n\t\t\tthisCache.data = {};\n\t\t}\n\n\t\tthisCache = thisCache.data;\n\t}\n\n\tif ( data !== undefined ) {\n\t\tthisCache[ jQuery.camelCase( name ) ] = data;\n\t}\n\n\t// Check for both converted-to-camel and non-converted data property names\n\t// If a data property was specified\n\tif ( typeof name === \"string\" ) {\n\n\t\t// First Try to find as-is property data\n\t\tret = thisCache[ name ];\n\n\t\t// Test for null|undefined property data\n\t\tif ( ret == null ) {\n\n\t\t\t// Try to find the camelCased property\n\t\t\tret = thisCache[ jQuery.camelCase( name ) ];\n\t\t}\n\t} else {\n\t\tret = thisCache;\n\t}\n\n\treturn ret;\n}\n\nfunction internalRemoveData( elem, name, pvt ) {\n\tif ( !jQuery.acceptData( elem ) ) {\n\t\treturn;\n\t}\n\n\tvar thisCache, i,\n\t\tisNode = elem.nodeType,\n\n\t\t// See jQuery.data for more information\n\t\tcache = isNode ? jQuery.cache : elem,\n\t\tid = isNode ? elem[ jQuery.expando ] : jQuery.expando;\n\n\t// If there is already no cache entry for this object, there is no\n\t// purpose in continuing\n\tif ( !cache[ id ] ) {\n\t\treturn;\n\t}\n\n\tif ( name ) {\n\n\t\tthisCache = pvt ? cache[ id ] : cache[ id ].data;\n\n\t\tif ( thisCache ) {\n\n\t\t\t// Support array or space separated string names for data keys\n\t\t\tif ( !jQuery.isArray( name ) ) {\n\n\t\t\t\t// try the string as a key before any manipulation\n\t\t\t\tif ( name in thisCache ) {\n\t\t\t\t\tname = [ name ];\n\t\t\t\t} else {\n\n\t\t\t\t\t// split the camel cased version by spaces unless a key with the spaces exists\n\t\t\t\t\tname = jQuery.camelCase( name );\n\t\t\t\t\tif ( name in thisCache ) {\n\t\t\t\t\t\tname = [ name ];\n\t\t\t\t\t} else {\n\t\t\t\t\t\tname = name.split(\" \");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// If \"name\" is an array of keys...\n\t\t\t\t// When data is initially created, via (\"key\", \"val\") signature,\n\t\t\t\t// keys will be converted to camelCase.\n\t\t\t\t// Since there is no way to tell _how_ a key was added, remove\n\t\t\t\t// both plain key and camelCase key. #12786\n\t\t\t\t// This will only penalize the array argument path.\n\t\t\t\tname = name.concat( jQuery.map( name, jQuery.camelCase ) );\n\t\t\t}\n\n\t\t\ti = name.length;\n\t\t\twhile ( i-- ) {\n\t\t\t\tdelete thisCache[ name[i] ];\n\t\t\t}\n\n\t\t\t// If there is no data left in the cache, we want to continue\n\t\t\t// and let the cache object itself get destroyed\n\t\t\tif ( pvt ? !isEmptyDataObject(thisCache) : !jQuery.isEmptyObject(thisCache) ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}\n\n\t// See jQuery.data for more information\n\tif ( !pvt ) {\n\t\tdelete cache[ id ].data;\n\n\t\t// Don't destroy the parent cache unless the internal data object\n\t\t// had been the only thing left in it\n\t\tif ( !isEmptyDataObject( cache[ id ] ) ) {\n\t\t\treturn;\n\t\t}\n\t}\n\n\t// Destroy the cache\n\tif ( isNode ) {\n\t\tjQuery.cleanData( [ elem ], true );\n\n\t// Use delete when supported for expandos or `cache` is not a window per isWindow (#10080)\n\t/* jshint eqeqeq: false */\n\t} else if ( jQuery.support.deleteExpando || cache != cache.window ) {\n\t\t/* jshint eqeqeq: true */\n\t\tdelete cache[ id ];\n\n\t// When all else fails, null\n\t} else {\n\t\tcache[ id ] = null;\n\t}\n}\n\njQuery.extend({\n\tcache: {},\n\n\t// The following elements throw uncatchable exceptions if you\n\t// attempt to add expando properties to them.\n\tnoData: {\n\t\t\"applet\": true,\n\t\t\"embed\": true,\n\t\t// Ban all objects except for Flash (which handle expandos)\n\t\t\"object\": \"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\"\n\t},\n\n\thasData: function( elem ) {\n\t\telem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ];\n\t\treturn !!elem && !isEmptyDataObject( elem );\n\t},\n\n\tdata: function( elem, name, data ) {\n\t\treturn internalData( elem, name, data );\n\t},\n\n\tremoveData: function( elem, name ) {\n\t\treturn internalRemoveData( elem, name );\n\t},\n\n\t// For internal use only.\n\t_data: function( elem, name, data ) {\n\t\treturn internalData( elem, name, data, true );\n\t},\n\n\t_removeData: function( elem, name ) {\n\t\treturn internalRemoveData( elem, name, true );\n\t},\n\n\t// A method for determining if a DOM node can handle the data expando\n\tacceptData: function( elem ) {\n\t\t// Do not set data on non-element because it will not be cleared (#8335).\n\t\tif ( elem.nodeType && elem.nodeType !== 1 && elem.nodeType !== 9 ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tvar noData = elem.nodeName && jQuery.noData[ elem.nodeName.toLowerCase() ];\n\n\t\t// nodes accept data unless otherwise specified; rejection can be conditional\n\t\treturn !noData || noData !== true && elem.getAttribute(\"classid\") === noData;\n\t}\n});\n\njQuery.fn.extend({\n\tdata: function( key, value ) {\n\t\tvar attrs, name,\n\t\t\tdata = null,\n\t\t\ti = 0,\n\t\t\telem = this[0];\n\n\t\t// Special expections of .data basically thwart jQuery.access,\n\t\t// so implement the relevant behavior ourselves\n\n\t\t// Gets all values\n\t\tif ( key === undefined ) {\n\t\t\tif ( this.length ) {\n\t\t\t\tdata = jQuery.data( elem );\n\n\t\t\t\tif ( elem.nodeType === 1 && !jQuery._data( elem, \"parsedAttrs\" ) ) {\n\t\t\t\t\tattrs = elem.attributes;\n\t\t\t\t\tfor ( ; i < attrs.length; i++ ) {\n\t\t\t\t\t\tname = attrs[i].name;\n\n\t\t\t\t\t\tif ( name.indexOf(\"data-\") === 0 ) {\n\t\t\t\t\t\t\tname = jQuery.camelCase( name.slice(5) );\n\n\t\t\t\t\t\t\tdataAttr( elem, name, data[ name ] );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tjQuery._data( elem, \"parsedAttrs\", true );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn data;\n\t\t}\n\n\t\t// Sets multiple values\n\t\tif ( typeof key === \"object\" ) {\n\t\t\treturn this.each(function() {\n\t\t\t\tjQuery.data( this, key );\n\t\t\t});\n\t\t}\n\n\t\treturn arguments.length > 1 ?\n\n\t\t\t// Sets one value\n\t\t\tthis.each(function() {\n\t\t\t\tjQuery.data( this, key, value );\n\t\t\t}) :\n\n\t\t\t// Gets one value\n\t\t\t// Try to fetch any internally stored data first\n\t\t\telem ? dataAttr( elem, key, jQuery.data( elem, key ) ) : null;\n\t},\n\n\tremoveData: function( key ) {\n\t\treturn this.each(function() {\n\t\t\tjQuery.removeData( this, key );\n\t\t});\n\t}\n});\n\nfunction dataAttr( elem, key, data ) {\n\t// If nothing was found internally, try to fetch any\n\t// data from the HTML5 data-* attribute\n\tif ( data === undefined && elem.nodeType === 1 ) {\n\n\t\tvar name = \"data-\" + key.replace( rmultiDash, \"-$1\" ).toLowerCase();\n\n\t\tdata = elem.getAttribute( name );\n\n\t\tif ( typeof data === \"string\" ) {\n\t\t\ttry {\n\t\t\t\tdata = data === \"true\" ? true :\n\t\t\t\t\tdata === \"false\" ? false :\n\t\t\t\t\tdata === \"null\" ? null :\n\t\t\t\t\t// Only convert to a number if it doesn't change the string\n\t\t\t\t\t+data + \"\" === data ? +data :\n\t\t\t\t\trbrace.test( data ) ? jQuery.parseJSON( data ) :\n\t\t\t\t\t\tdata;\n\t\t\t} catch( e ) {}\n\n\t\t\t// Make sure we set the data so it isn't changed later\n\t\t\tjQuery.data( elem, key, data );\n\n\t\t} else {\n\t\t\tdata = undefined;\n\t\t}\n\t}\n\n\treturn data;\n}\n\n// checks a cache object for emptiness\nfunction isEmptyDataObject( obj ) {\n\tvar name;\n\tfor ( name in obj ) {\n\n\t\t// if the public data object is empty, the private is still empty\n\t\tif ( name === \"data\" && jQuery.isEmptyObject( obj[name] ) ) {\n\t\t\tcontinue;\n\t\t}\n\t\tif ( name !== \"toJSON\" ) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\treturn true;\n}\njQuery.extend({\n\tqueue: function( elem, type, data ) {\n\t\tvar queue;\n\n\t\tif ( elem ) {\n\t\t\ttype = ( type || \"fx\" ) + \"queue\";\n\t\t\tqueue = jQuery._data( elem, type );\n\n\t\t\t// Speed up dequeue by getting out quickly if this is just a lookup\n\t\t\tif ( data ) {\n\t\t\t\tif ( !queue || jQuery.isArray(data) ) {\n\t\t\t\t\tqueue = jQuery._data( elem, type, jQuery.makeArray(data) );\n\t\t\t\t} else {\n\t\t\t\t\tqueue.push( data );\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn queue || [];\n\t\t}\n\t},\n\n\tdequeue: function( elem, type ) {\n\t\ttype = type || \"fx\";\n\n\t\tvar queue = jQuery.queue( elem, type ),\n\t\t\tstartLength = queue.length,\n\t\t\tfn = queue.shift(),\n\t\t\thooks = jQuery._queueHooks( elem, type ),\n\t\t\tnext = function() {\n\t\t\t\tjQuery.dequeue( elem, type );\n\t\t\t};\n\n\t\t// If the fx queue is dequeued, always remove the progress sentinel\n\t\tif ( fn === \"inprogress\" ) {\n\t\t\tfn = queue.shift();\n\t\t\tstartLength--;\n\t\t}\n\n\t\tif ( fn ) {\n\n\t\t\t// Add a progress sentinel to prevent the fx queue from being\n\t\t\t// automatically dequeued\n\t\t\tif ( type === \"fx\" ) {\n\t\t\t\tqueue.unshift( \"inprogress\" );\n\t\t\t}\n\n\t\t\t// clear up the last queue stop function\n\t\t\tdelete hooks.stop;\n\t\t\tfn.call( elem, next, hooks );\n\t\t}\n\n\t\tif ( !startLength && hooks ) {\n\t\t\thooks.empty.fire();\n\t\t}\n\t},\n\n\t// not intended for public consumption - generates a queueHooks object, or returns the current one\n\t_queueHooks: function( elem, type ) {\n\t\tvar key = type + \"queueHooks\";\n\t\treturn jQuery._data( elem, key ) || jQuery._data( elem, key, {\n\t\t\tempty: jQuery.Callbacks(\"once memory\").add(function() {\n\t\t\t\tjQuery._removeData( elem, type + \"queue\" );\n\t\t\t\tjQuery._removeData( elem, key );\n\t\t\t})\n\t\t});\n\t}\n});\n\njQuery.fn.extend({\n\tqueue: function( type, data ) {\n\t\tvar setter = 2;\n\n\t\tif ( typeof type !== \"string\" ) {\n\t\t\tdata = type;\n\t\t\ttype = \"fx\";\n\t\t\tsetter--;\n\t\t}\n\n\t\tif ( arguments.length < setter ) {\n\t\t\treturn jQuery.queue( this[0], type );\n\t\t}\n\n\t\treturn data === undefined ?\n\t\t\tthis :\n\t\t\tthis.each(function() {\n\t\t\t\tvar queue = jQuery.queue( this, type, data );\n\n\t\t\t\t// ensure a hooks for this queue\n\t\t\t\tjQuery._queueHooks( this, type );\n\n\t\t\t\tif ( type === \"fx\" && queue[0] !== \"inprogress\" ) {\n\t\t\t\t\tjQuery.dequeue( this, type );\n\t\t\t\t}\n\t\t\t});\n\t},\n\tdequeue: function( type ) {\n\t\treturn this.each(function() {\n\t\t\tjQuery.dequeue( this, type );\n\t\t});\n\t},\n\t// Based off of the plugin by Clint Helfers, with permission.\n\t// http://blindsignals.com/index.php/2009/07/jquery-delay/\n\tdelay: function( time, type ) {\n\t\ttime = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;\n\t\ttype = type || \"fx\";\n\n\t\treturn this.queue( type, function( next, hooks ) {\n\t\t\tvar timeout = setTimeout( next, time );\n\t\t\thooks.stop = function() {\n\t\t\t\tclearTimeout( timeout );\n\t\t\t};\n\t\t});\n\t},\n\tclearQueue: function( type ) {\n\t\treturn this.queue( type || \"fx\", [] );\n\t},\n\t// Get a promise resolved when queues of a certain type\n\t// are emptied (fx is the type by default)\n\tpromise: function( type, obj ) {\n\t\tvar tmp,\n\t\t\tcount = 1,\n\t\t\tdefer = jQuery.Deferred(),\n\t\t\telements = this,\n\t\t\ti = this.length,\n\t\t\tresolve = function() {\n\t\t\t\tif ( !( --count ) ) {\n\t\t\t\t\tdefer.resolveWith( elements, [ elements ] );\n\t\t\t\t}\n\t\t\t};\n\n\t\tif ( typeof type !== \"string\" ) {\n\t\t\tobj = type;\n\t\t\ttype = undefined;\n\t\t}\n\t\ttype = type || \"fx\";\n\n\t\twhile( i-- ) {\n\t\t\ttmp = jQuery._data( elements[ i ], type + \"queueHooks\" );\n\t\t\tif ( tmp && tmp.empty ) {\n\t\t\t\tcount++;\n\t\t\t\ttmp.empty.add( resolve );\n\t\t\t}\n\t\t}\n\t\tresolve();\n\t\treturn defer.promise( obj );\n\t}\n});\nvar nodeHook, boolHook,\n\trclass = /[\\t\\r\\n\\f]/g,\n\trreturn = /\\r/g,\n\trfocusable = /^(?:input|select|textarea|button|object)$/i,\n\trclickable = /^(?:a|area)$/i,\n\truseDefault = /^(?:checked|selected)$/i,\n\tgetSetAttribute = jQuery.support.getSetAttribute,\n\tgetSetInput = jQuery.support.input;\n\njQuery.fn.extend({\n\tattr: function( name, value ) {\n\t\treturn jQuery.access( this, jQuery.attr, name, value, arguments.length > 1 );\n\t},\n\n\tremoveAttr: function( name ) {\n\t\treturn this.each(function() {\n\t\t\tjQuery.removeAttr( this, name );\n\t\t});\n\t},\n\n\tprop: function( name, value ) {\n\t\treturn jQuery.access( this, jQuery.prop, name, value, arguments.length > 1 );\n\t},\n\n\tremoveProp: function( name ) {\n\t\tname = jQuery.propFix[ name ] || name;\n\t\treturn this.each(function() {\n\t\t\t// try/catch handles cases where IE balks (such as removing a property on window)\n\t\t\ttry {\n\t\t\t\tthis[ name ] = undefined;\n\t\t\t\tdelete this[ name ];\n\t\t\t} catch( e ) {}\n\t\t});\n\t},\n\n\taddClass: function( value ) {\n\t\tvar classes, elem, cur, clazz, j,\n\t\t\ti = 0,\n\t\t\tlen = this.length,\n\t\t\tproceed = typeof value === \"string\" && value;\n\n\t\tif ( jQuery.isFunction( value ) ) {\n\t\t\treturn this.each(function( j ) {\n\t\t\t\tjQuery( this ).addClass( value.call( this, j, this.className ) );\n\t\t\t});\n\t\t}\n\n\t\tif ( proceed ) {\n\t\t\t// The disjunction here is for better compressibility (see removeClass)\n\t\t\tclasses = ( value || \"\" ).match( core_rnotwhite ) || [];\n\n\t\t\tfor ( ; i < len; i++ ) {\n\t\t\t\telem = this[ i ];\n\t\t\t\tcur = elem.nodeType === 1 && ( elem.className ?\n\t\t\t\t\t( \" \" + elem.className + \" \" ).replace( rclass, \" \" ) :\n\t\t\t\t\t\" \"\n\t\t\t\t);\n\n\t\t\t\tif ( cur ) {\n\t\t\t\t\tj = 0;\n\t\t\t\t\twhile ( (clazz = classes[j++]) ) {\n\t\t\t\t\t\tif ( cur.indexOf( \" \" + clazz + \" \" ) < 0 ) {\n\t\t\t\t\t\t\tcur += clazz + \" \";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telem.className = jQuery.trim( cur );\n\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t},\n\n\tremoveClass: function( value ) {\n\t\tvar classes, elem, cur, clazz, j,\n\t\t\ti = 0,\n\t\t\tlen = this.length,\n\t\t\tproceed = arguments.length === 0 || typeof value === \"string\" && value;\n\n\t\tif ( jQuery.isFunction( value ) ) {\n\t\t\treturn this.each(function( j ) {\n\t\t\t\tjQuery( this ).removeClass( value.call( this, j, this.className ) );\n\t\t\t});\n\t\t}\n\t\tif ( proceed ) {\n\t\t\tclasses = ( value || \"\" ).match( core_rnotwhite ) || [];\n\n\t\t\tfor ( ; i < len; i++ ) {\n\t\t\t\telem = this[ i ];\n\t\t\t\t// This expression is here for better compressibility (see addClass)\n\t\t\t\tcur = elem.nodeType === 1 && ( elem.className ?\n\t\t\t\t\t( \" \" + elem.className + \" \" ).replace( rclass, \" \" ) :\n\t\t\t\t\t\"\"\n\t\t\t\t);\n\n\t\t\t\tif ( cur ) {\n\t\t\t\t\tj = 0;\n\t\t\t\t\twhile ( (clazz = classes[j++]) ) {\n\t\t\t\t\t\t// Remove *all* instances\n\t\t\t\t\t\twhile ( cur.indexOf( \" \" + clazz + \" \" ) >= 0 ) {\n\t\t\t\t\t\t\tcur = cur.replace( \" \" + clazz + \" \", \" \" );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telem.className = value ? jQuery.trim( cur ) : \"\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t},\n\n\ttoggleClass: function( value, stateVal ) {\n\t\tvar type = typeof value;\n\n\t\tif ( typeof stateVal === \"boolean\" && type === \"string\" ) {\n\t\t\treturn stateVal ? this.addClass( value ) : this.removeClass( value );\n\t\t}\n\n\t\tif ( jQuery.isFunction( value ) ) {\n\t\t\treturn this.each(function( i ) {\n\t\t\t\tjQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal );\n\t\t\t});\n\t\t}\n\n\t\treturn this.each(function() {\n\t\t\tif ( type === \"string\" ) {\n\t\t\t\t// toggle individual class names\n\t\t\t\tvar className,\n\t\t\t\t\ti = 0,\n\t\t\t\t\tself = jQuery( this ),\n\t\t\t\t\tclassNames = value.match( core_rnotwhite ) || [];\n\n\t\t\t\twhile ( (className = classNames[ i++ ]) ) {\n\t\t\t\t\t// check each className given, space separated list\n\t\t\t\t\tif ( self.hasClass( className ) ) {\n\t\t\t\t\t\tself.removeClass( className );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tself.addClass( className );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t// Toggle whole class name\n\t\t\t} else if ( type === core_strundefined || type === \"boolean\" ) {\n\t\t\t\tif ( this.className ) {\n\t\t\t\t\t// store className if set\n\t\t\t\t\tjQuery._data( this, \"__className__\", this.className );\n\t\t\t\t}\n\n\t\t\t\t// If the element has a class name or if we're passed \"false\",\n\t\t\t\t// then remove the whole classname (if there was one, the above saved it).\n\t\t\t\t// Otherwise bring back whatever was previously saved (if anything),\n\t\t\t\t// falling back to the empty string if nothing was stored.\n\t\t\t\tthis.className = this.className || value === false ? \"\" : jQuery._data( this, \"__className__\" ) || \"\";\n\t\t\t}\n\t\t});\n\t},\n\n\thasClass: function( selector ) {\n\t\tvar className = \" \" + selector + \" \",\n\t\t\ti = 0,\n\t\t\tl = this.length;\n\t\tfor ( ; i < l; i++ ) {\n\t\t\tif ( this[i].nodeType === 1 && (\" \" + this[i].className + \" \").replace(rclass, \" \").indexOf( className ) >= 0 ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t},\n\n\tval: function( value ) {\n\t\tvar ret, hooks, isFunction,\n\t\t\telem = this[0];\n\n\t\tif ( !arguments.length ) {\n\t\t\tif ( elem ) {\n\t\t\t\thooks = jQuery.valHooks[ elem.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase() ];\n\n\t\t\t\tif ( hooks && \"get\" in hooks && (ret = hooks.get( elem, \"value\" )) !== undefined ) {\n\t\t\t\t\treturn ret;\n\t\t\t\t}\n\n\t\t\t\tret = elem.value;\n\n\t\t\t\treturn typeof ret === \"string\" ?\n\t\t\t\t\t// handle most common string cases\n\t\t\t\t\tret.replace(rreturn, \"\") :\n\t\t\t\t\t// handle cases where value is null/undef or number\n\t\t\t\t\tret == null ? \"\" : ret;\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\n\t\tisFunction = jQuery.isFunction( value );\n\n\t\treturn this.each(function( i ) {\n\t\t\tvar val;\n\n\t\t\tif ( this.nodeType !== 1 ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( isFunction ) {\n\t\t\t\tval = value.call( this, i, jQuery( this ).val() );\n\t\t\t} else {\n\t\t\t\tval = value;\n\t\t\t}\n\n\t\t\t// Treat null/undefined as \"\"; convert numbers to string\n\t\t\tif ( val == null ) {\n\t\t\t\tval = \"\";\n\t\t\t} else if ( typeof val === \"number\" ) {\n\t\t\t\tval += \"\";\n\t\t\t} else if ( jQuery.isArray( val ) ) {\n\t\t\t\tval = jQuery.map(val, function ( value ) {\n\t\t\t\t\treturn value == null ? \"\" : value + \"\";\n\t\t\t\t});\n\t\t\t}\n\n\t\t\thooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];\n\n\t\t\t// If set returns undefined, fall back to normal setting\n\t\t\tif ( !hooks || !(\"set\" in hooks) || hooks.set( this, val, \"value\" ) === undefined ) {\n\t\t\t\tthis.value = val;\n\t\t\t}\n\t\t});\n\t}\n});\n\njQuery.extend({\n\tvalHooks: {\n\t\toption: {\n\t\t\tget: function( elem ) {\n\t\t\t\t// Use proper attribute retrieval(#6932, #12072)\n\t\t\t\tvar val = jQuery.find.attr( elem, \"value\" );\n\t\t\t\treturn val != null ?\n\t\t\t\t\tval :\n\t\t\t\t\telem.text;\n\t\t\t}\n\t\t},\n\t\tselect: {\n\t\t\tget: function( elem ) {\n\t\t\t\tvar value, option,\n\t\t\t\t\toptions = elem.options,\n\t\t\t\t\tindex = elem.selectedIndex,\n\t\t\t\t\tone = elem.type === \"select-one\" || index < 0,\n\t\t\t\t\tvalues = one ? null : [],\n\t\t\t\t\tmax = one ? index + 1 : options.length,\n\t\t\t\t\ti = index < 0 ?\n\t\t\t\t\t\tmax :\n\t\t\t\t\t\tone ? index : 0;\n\n\t\t\t\t// Loop through all the selected options\n\t\t\t\tfor ( ; i < max; i++ ) {\n\t\t\t\t\toption = options[ i ];\n\n\t\t\t\t\t// oldIE doesn't update selected after form reset (#2551)\n\t\t\t\t\tif ( ( option.selected || i === index ) &&\n\t\t\t\t\t\t\t// Don't return options that are disabled or in a disabled optgroup\n\t\t\t\t\t\t\t( jQuery.support.optDisabled ? !option.disabled : option.getAttribute(\"disabled\") === null ) &&\n\t\t\t\t\t\t\t( !option.parentNode.disabled || !jQuery.nodeName( option.parentNode, \"optgroup\" ) ) ) {\n\n\t\t\t\t\t\t// Get the specific value for the option\n\t\t\t\t\t\tvalue = jQuery( option ).val();\n\n\t\t\t\t\t\t// We don't need an array for one selects\n\t\t\t\t\t\tif ( one ) {\n\t\t\t\t\t\t\treturn value;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Multi-Selects return an array\n\t\t\t\t\t\tvalues.push( value );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn values;\n\t\t\t},\n\n\t\t\tset: function( elem, value ) {\n\t\t\t\tvar optionSet, option,\n\t\t\t\t\toptions = elem.options,\n\t\t\t\t\tvalues = jQuery.makeArray( value ),\n\t\t\t\t\ti = options.length;\n\n\t\t\t\twhile ( i-- ) {\n\t\t\t\t\toption = options[ i ];\n\t\t\t\t\tif ( (option.selected = jQuery.inArray( jQuery(option).val(), values ) >= 0) ) {\n\t\t\t\t\t\toptionSet = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// force browsers to behave consistently when non-matching value is set\n\t\t\t\tif ( !optionSet ) {\n\t\t\t\t\telem.selectedIndex = -1;\n\t\t\t\t}\n\t\t\t\treturn values;\n\t\t\t}\n\t\t}\n\t},\n\n\tattr: function( elem, name, value ) {\n\t\tvar hooks, ret,\n\t\t\tnType = elem.nodeType;\n\n\t\t// don't get/set attributes on text, comment and attribute nodes\n\t\tif ( !elem || nType === 3 || nType === 8 || nType === 2 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Fallback to prop when attributes are not supported\n\t\tif ( typeof elem.getAttribute === core_strundefined ) {\n\t\t\treturn jQuery.prop( elem, name, value );\n\t\t}\n\n\t\t// All attributes are lowercase\n\t\t// Grab necessary hook if one is defined\n\t\tif ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {\n\t\t\tname = name.toLowerCase();\n\t\t\thooks = jQuery.attrHooks[ name ] ||\n\t\t\t\t( jQuery.expr.match.bool.test( name ) ? boolHook : nodeHook );\n\t\t}\n\n\t\tif ( value !== undefined ) {\n\n\t\t\tif ( value === null ) {\n\t\t\t\tjQuery.removeAttr( elem, name );\n\n\t\t\t} else if ( hooks && \"set\" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) {\n\t\t\t\treturn ret;\n\n\t\t\t} else {\n\t\t\t\telem.setAttribute( name, value + \"\" );\n\t\t\t\treturn value;\n\t\t\t}\n\n\t\t} else if ( hooks && \"get\" in hooks && (ret = hooks.get( elem, name )) !== null ) {\n\t\t\treturn ret;\n\n\t\t} else {\n\t\t\tret = jQuery.find.attr( elem, name );\n\n\t\t\t// Non-existent attributes return null, we normalize to undefined\n\t\t\treturn ret == null ?\n\t\t\t\tundefined :\n\t\t\t\tret;\n\t\t}\n\t},\n\n\tremoveAttr: function( elem, value ) {\n\t\tvar name, propName,\n\t\t\ti = 0,\n\t\t\tattrNames = value && value.match( core_rnotwhite );\n\n\t\tif ( attrNames && elem.nodeType === 1 ) {\n\t\t\twhile ( (name = attrNames[i++]) ) {\n\t\t\t\tpropName = jQuery.propFix[ name ] || name;\n\n\t\t\t\t// Boolean attributes get special treatment (#10870)\n\t\t\t\tif ( jQuery.expr.match.bool.test( name ) ) {\n\t\t\t\t\t// Set corresponding property to false\n\t\t\t\t\tif ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) {\n\t\t\t\t\t\telem[ propName ] = false;\n\t\t\t\t\t// Support: IE<9\n\t\t\t\t\t// Also clear defaultChecked/defaultSelected (if appropriate)\n\t\t\t\t\t} else {\n\t\t\t\t\t\telem[ jQuery.camelCase( \"default-\" + name ) ] =\n\t\t\t\t\t\t\telem[ propName ] = false;\n\t\t\t\t\t}\n\n\t\t\t\t// See #9699 for explanation of this approach (setting first, then removal)\n\t\t\t\t} else {\n\t\t\t\t\tjQuery.attr( elem, name, \"\" );\n\t\t\t\t}\n\n\t\t\t\telem.removeAttribute( getSetAttribute ? name : propName );\n\t\t\t}\n\t\t}\n\t},\n\n\tattrHooks: {\n\t\ttype: {\n\t\t\tset: function( elem, value ) {\n\t\t\t\tif ( !jQuery.support.radioValue && value === \"radio\" && jQuery.nodeName(elem, \"input\") ) {\n\t\t\t\t\t// Setting the type on a radio button after the value resets the value in IE6-9\n\t\t\t\t\t// Reset value to default in case type is set after value during creation\n\t\t\t\t\tvar val = elem.value;\n\t\t\t\t\telem.setAttribute( \"type\", value );\n\t\t\t\t\tif ( val ) {\n\t\t\t\t\t\telem.value = val;\n\t\t\t\t\t}\n\t\t\t\t\treturn value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\n\tpropFix: {\n\t\t\"for\": \"htmlFor\",\n\t\t\"class\": \"className\"\n\t},\n\n\tprop: function( elem, name, value ) {\n\t\tvar ret, hooks, notxml,\n\t\t\tnType = elem.nodeType;\n\n\t\t// don't get/set properties on text, comment and attribute nodes\n\t\tif ( !elem || nType === 3 || nType === 8 || nType === 2 ) {\n\t\t\treturn;\n\t\t}\n\n\t\tnotxml = nType !== 1 || !jQuery.isXMLDoc( elem );\n\n\t\tif ( notxml ) {\n\t\t\t// Fix name and attach hooks\n\t\t\tname = jQuery.propFix[ name ] || name;\n\t\t\thooks = jQuery.propHooks[ name ];\n\t\t}\n\n\t\tif ( value !== undefined ) {\n\t\t\treturn hooks && \"set\" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ?\n\t\t\t\tret :\n\t\t\t\t( elem[ name ] = value );\n\n\t\t} else {\n\t\t\treturn hooks && \"get\" in hooks && (ret = hooks.get( elem, name )) !== null ?\n\t\t\t\tret :\n\t\t\t\telem[ name ];\n\t\t}\n\t},\n\n\tpropHooks: {\n\t\ttabIndex: {\n\t\t\tget: function( elem ) {\n\t\t\t\t// elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set\n\t\t\t\t// http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/\n\t\t\t\t// Use proper attribute retrieval(#12072)\n\t\t\t\tvar tabindex = jQuery.find.attr( elem, \"tabindex\" );\n\n\t\t\t\treturn tabindex ?\n\t\t\t\t\tparseInt( tabindex, 10 ) :\n\t\t\t\t\trfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ?\n\t\t\t\t\t\t0 :\n\t\t\t\t\t\t-1;\n\t\t\t}\n\t\t}\n\t}\n});\n\n// Hooks for boolean attributes\nboolHook = {\n\tset: function( elem, value, name ) {\n\t\tif ( value === false ) {\n\t\t\t// Remove boolean attributes when set to false\n\t\t\tjQuery.removeAttr( elem, name );\n\t\t} else if ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) {\n\t\t\t// IE<8 needs the *property* name\n\t\t\telem.setAttribute( !getSetAttribute && jQuery.propFix[ name ] || name, name );\n\n\t\t// Use defaultChecked and defaultSelected for oldIE\n\t\t} else {\n\t\t\telem[ jQuery.camelCase( \"default-\" + name ) ] = elem[ name ] = true;\n\t\t}\n\n\t\treturn name;\n\t}\n};\njQuery.each( jQuery.expr.match.bool.source.match( /\\w+/g ), function( i, name ) {\n\tvar getter = jQuery.expr.attrHandle[ name ] || jQuery.find.attr;\n\n\tjQuery.expr.attrHandle[ name ] = getSetInput && getSetAttribute || !ruseDefault.test( name ) ?\n\t\tfunction( elem, name, isXML ) {\n\t\t\tvar fn = jQuery.expr.attrHandle[ name ],\n\t\t\t\tret = isXML ?\n\t\t\t\t\tundefined :\n\t\t\t\t\t/* jshint eqeqeq: false */\n\t\t\t\t\t(jQuery.expr.attrHandle[ name ] = undefined) !=\n\t\t\t\t\t\tgetter( elem, name, isXML ) ?\n\n\t\t\t\t\t\tname.toLowerCase() :\n\t\t\t\t\t\tnull;\n\t\t\tjQuery.expr.attrHandle[ name ] = fn;\n\t\t\treturn ret;\n\t\t} :\n\t\tfunction( elem, name, isXML ) {\n\t\t\treturn isXML ?\n\t\t\t\tundefined :\n\t\t\t\telem[ jQuery.camelCase( \"default-\" + name ) ] ?\n\t\t\t\t\tname.toLowerCase() :\n\t\t\t\t\tnull;\n\t\t};\n});\n\n// fix oldIE attroperties\nif ( !getSetInput || !getSetAttribute ) {\n\tjQuery.attrHooks.value = {\n\t\tset: function( elem, value, name ) {\n\t\t\tif ( jQuery.nodeName( elem, \"input\" ) ) {\n\t\t\t\t// Does not return so that setAttribute is also used\n\t\t\t\telem.defaultValue = value;\n\t\t\t} else {\n\t\t\t\t// Use nodeHook if defined (#1954); otherwise setAttribute is fine\n\t\t\t\treturn nodeHook && nodeHook.set( elem, value, name );\n\t\t\t}\n\t\t}\n\t};\n}\n\n// IE6/7 do not support getting/setting some attributes with get/setAttribute\nif ( !getSetAttribute ) {\n\n\t// Use this for any attribute in IE6/7\n\t// This fixes almost every IE6/7 issue\n\tnodeHook = {\n\t\tset: function( elem, value, name ) {\n\t\t\t// Set the existing or create a new attribute node\n\t\t\tvar ret = elem.getAttributeNode( name );\n\t\t\tif ( !ret ) {\n\t\t\t\telem.setAttributeNode(\n\t\t\t\t\t(ret = elem.ownerDocument.createAttribute( name ))\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tret.value = value += \"\";\n\n\t\t\t// Break association with cloned elements by also using setAttribute (#9646)\n\t\t\treturn name === \"value\" || value === elem.getAttribute( name ) ?\n\t\t\t\tvalue :\n\t\t\t\tundefined;\n\t\t}\n\t};\n\tjQuery.expr.attrHandle.id = jQuery.expr.attrHandle.name = jQuery.expr.attrHandle.coords =\n\t\t// Some attributes are constructed with empty-string values when not defined\n\t\tfunction( elem, name, isXML ) {\n\t\t\tvar ret;\n\t\t\treturn isXML ?\n\t\t\t\tundefined :\n\t\t\t\t(ret = elem.getAttributeNode( name )) && ret.value !== \"\" ?\n\t\t\t\t\tret.value :\n\t\t\t\t\tnull;\n\t\t};\n\tjQuery.valHooks.button = {\n\t\tget: function( elem, name ) {\n\t\t\tvar ret = elem.getAttributeNode( name );\n\t\t\treturn ret && ret.specified ?\n\t\t\t\tret.value :\n\t\t\t\tundefined;\n\t\t},\n\t\tset: nodeHook.set\n\t};\n\n\t// Set contenteditable to false on removals(#10429)\n\t// Setting to empty string throws an error as an invalid value\n\tjQuery.attrHooks.contenteditable = {\n\t\tset: function( elem, value, name ) {\n\t\t\tnodeHook.set( elem, value === \"\" ? false : value, name );\n\t\t}\n\t};\n\n\t// Set width and height to auto instead of 0 on empty string( Bug #8150 )\n\t// This is for removals\n\tjQuery.each([ \"width\", \"height\" ], function( i, name ) {\n\t\tjQuery.attrHooks[ name ] = {\n\t\t\tset: function( elem, value ) {\n\t\t\t\tif ( value === \"\" ) {\n\t\t\t\t\telem.setAttribute( name, \"auto\" );\n\t\t\t\t\treturn value;\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t});\n}\n\n\n// Some attributes require a special call on IE\n// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx\nif ( !jQuery.support.hrefNormalized ) {\n\t// href/src property should get the full normalized URL (#10299/#12915)\n\tjQuery.each([ \"href\", \"src\" ], function( i, name ) {\n\t\tjQuery.propHooks[ name ] = {\n\t\t\tget: function( elem ) {\n\t\t\t\treturn elem.getAttribute( name, 4 );\n\t\t\t}\n\t\t};\n\t});\n}\n\nif ( !jQuery.support.style ) {\n\tjQuery.attrHooks.style = {\n\t\tget: function( elem ) {\n\t\t\t// Return undefined in the case of empty string\n\t\t\t// Note: IE uppercases css property names, but if we were to .toLowerCase()\n\t\t\t// .cssText, that would destroy case senstitivity in URL's, like in \"background\"\n\t\t\treturn elem.style.cssText || undefined;\n\t\t},\n\t\tset: function( elem, value ) {\n\t\t\treturn ( elem.style.cssText = value + \"\" );\n\t\t}\n\t};\n}\n\n// Safari mis-reports the default selected property of an option\n// Accessing the parent's selectedIndex property fixes it\nif ( !jQuery.support.optSelected ) {\n\tjQuery.propHooks.selected = {\n\t\tget: function( elem ) {\n\t\t\tvar parent = elem.parentNode;\n\n\t\t\tif ( parent ) {\n\t\t\t\tparent.selectedIndex;\n\n\t\t\t\t// Make sure that it also works with optgroups, see #5701\n\t\t\t\tif ( parent.parentNode ) {\n\t\t\t\t\tparent.parentNode.selectedIndex;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn null;\n\t\t}\n\t};\n}\n\njQuery.each([\n\t\"tabIndex\",\n\t\"readOnly\",\n\t\"maxLength\",\n\t\"cellSpacing\",\n\t\"cellPadding\",\n\t\"rowSpan\",\n\t\"colSpan\",\n\t\"useMap\",\n\t\"frameBorder\",\n\t\"contentEditable\"\n], function() {\n\tjQuery.propFix[ this.toLowerCase() ] = this;\n});\n\n// IE6/7 call enctype encoding\nif ( !jQuery.support.enctype ) {\n\tjQuery.propFix.enctype = \"encoding\";\n}\n\n// Radios and checkboxes getter/setter\njQuery.each([ \"radio\", \"checkbox\" ], function() {\n\tjQuery.valHooks[ this ] = {\n\t\tset: function( elem, value ) {\n\t\t\tif ( jQuery.isArray( value ) ) {\n\t\t\t\treturn ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 );\n\t\t\t}\n\t\t}\n\t};\n\tif ( !jQuery.support.checkOn ) {\n\t\tjQuery.valHooks[ this ].get = function( elem ) {\n\t\t\t// Support: Webkit\n\t\t\t// \"\" is returned instead of \"on\" if a value isn't specified\n\t\t\treturn elem.getAttribute(\"value\") === null ? \"on\" : elem.value;\n\t\t};\n\t}\n});\nvar rformElems = /^(?:input|select|textarea)$/i,\n\trkeyEvent = /^key/,\n\trmouseEvent = /^(?:mouse|contextmenu)|click/,\n\trfocusMorph = /^(?:focusinfocus|focusoutblur)$/,\n\trtypenamespace = /^([^.]*)(?:\\.(.+)|)$/;\n\nfunction returnTrue() {\n\treturn true;\n}\n\nfunction returnFalse() {\n\treturn false;\n}\n\nfunction safeActiveElement() {\n\ttry {\n\t\treturn document.activeElement;\n\t} catch ( err ) { }\n}\n\n/*\n * Helper functions for managing events -- not part of the public interface.\n * Props to Dean Edwards' addEvent library for many of the ideas.\n */\njQuery.event = {\n\n\tglobal: {},\n\n\tadd: function( elem, types, handler, data, selector ) {\n\t\tvar tmp, events, t, handleObjIn,\n\t\t\tspecial, eventHandle, handleObj,\n\t\t\thandlers, type, namespaces, origType,\n\t\t\telemData = jQuery._data( elem );\n\n\t\t// Don't attach events to noData or text/comment nodes (but allow plain objects)\n\t\tif ( !elemData ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Caller can pass in an object of custom data in lieu of the handler\n\t\tif ( handler.handler ) {\n\t\t\thandleObjIn = handler;\n\t\t\thandler = handleObjIn.handler;\n\t\t\tselector = handleObjIn.selector;\n\t\t}\n\n\t\t// Make sure that the handler has a unique ID, used to find/remove it later\n\t\tif ( !handler.guid ) {\n\t\t\thandler.guid = jQuery.guid++;\n\t\t}\n\n\t\t// Init the element's event structure and main handler, if this is the first\n\t\tif ( !(events = elemData.events) ) {\n\t\t\tevents = elemData.events = {};\n\t\t}\n\t\tif ( !(eventHandle = elemData.handle) ) {\n\t\t\teventHandle = elemData.handle = function( e ) {\n\t\t\t\t// Discard the second event of a jQuery.event.trigger() and\n\t\t\t\t// when an event is called after a page has unloaded\n\t\t\t\treturn typeof jQuery !== core_strundefined && (!e || jQuery.event.triggered !== e.type) ?\n\t\t\t\t\tjQuery.event.dispatch.apply( eventHandle.elem, arguments ) :\n\t\t\t\t\tundefined;\n\t\t\t};\n\t\t\t// Add elem as a property of the handle fn to prevent a memory leak with IE non-native events\n\t\t\teventHandle.elem = elem;\n\t\t}\n\n\t\t// Handle multiple events separated by a space\n\t\ttypes = ( types || \"\" ).match( core_rnotwhite ) || [\"\"];\n\t\tt = types.length;\n\t\twhile ( t-- ) {\n\t\t\ttmp = rtypenamespace.exec( types[t] ) || [];\n\t\t\ttype = origType = tmp[1];\n\t\t\tnamespaces = ( tmp[2] || \"\" ).split( \".\" ).sort();\n\n\t\t\t// There *must* be a type, no attaching namespace-only handlers\n\t\t\tif ( !type ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// If event changes its type, use the special event handlers for the changed type\n\t\t\tspecial = jQuery.event.special[ type ] || {};\n\n\t\t\t// If selector defined, determine special event api type, otherwise given type\n\t\t\ttype = ( selector ? special.delegateType : special.bindType ) || type;\n\n\t\t\t// Update special based on newly reset type\n\t\t\tspecial = jQuery.event.special[ type ] || {};\n\n\t\t\t// handleObj is passed to all event handlers\n\t\t\thandleObj = jQuery.extend({\n\t\t\t\ttype: type,\n\t\t\t\torigType: origType,\n\t\t\t\tdata: data,\n\t\t\t\thandler: handler,\n\t\t\t\tguid: handler.guid,\n\t\t\t\tselector: selector,\n\t\t\t\tneedsContext: selector && jQuery.expr.match.needsContext.test( selector ),\n\t\t\t\tnamespace: namespaces.join(\".\")\n\t\t\t}, handleObjIn );\n\n\t\t\t// Init the event handler queue if we're the first\n\t\t\tif ( !(handlers = events[ type ]) ) {\n\t\t\t\thandlers = events[ type ] = [];\n\t\t\t\thandlers.delegateCount = 0;\n\n\t\t\t\t// Only use addEventListener/attachEvent if the special events handler returns false\n\t\t\t\tif ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) {\n\t\t\t\t\t// Bind the global event handler to the element\n\t\t\t\t\tif ( elem.addEventListener ) {\n\t\t\t\t\t\telem.addEventListener( type, eventHandle, false );\n\n\t\t\t\t\t} else if ( elem.attachEvent ) {\n\t\t\t\t\t\telem.attachEvent( \"on\" + type, eventHandle );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( special.add ) {\n\t\t\t\tspecial.add.call( elem, handleObj );\n\n\t\t\t\tif ( !handleObj.handler.guid ) {\n\t\t\t\t\thandleObj.handler.guid = handler.guid;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Add to the element's handler list, delegates in front\n\t\t\tif ( selector ) {\n\t\t\t\thandlers.splice( handlers.delegateCount++, 0, handleObj );\n\t\t\t} else {\n\t\t\t\thandlers.push( handleObj );\n\t\t\t}\n\n\t\t\t// Keep track of which events have ever been used, for event optimization\n\t\t\tjQuery.event.global[ type ] = true;\n\t\t}\n\n\t\t// Nullify elem to prevent memory leaks in IE\n\t\telem = null;\n\t},\n\n\t// Detach an event or set of events from an element\n\tremove: function( elem, types, handler, selector, mappedTypes ) {\n\t\tvar j, handleObj, tmp,\n\t\t\torigCount, t, events,\n\t\t\tspecial, handlers, type,\n\t\t\tnamespaces, origType,\n\t\t\telemData = jQuery.hasData( elem ) && jQuery._data( elem );\n\n\t\tif ( !elemData || !(events = elemData.events) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Once for each type.namespace in types; type may be omitted\n\t\ttypes = ( types || \"\" ).match( core_rnotwhite ) || [\"\"];\n\t\tt = types.length;\n\t\twhile ( t-- ) {\n\t\t\ttmp = rtypenamespace.exec( types[t] ) || [];\n\t\t\ttype = origType = tmp[1];\n\t\t\tnamespaces = ( tmp[2] || \"\" ).split( \".\" ).sort();\n\n\t\t\t// Unbind all events (on this namespace, if provided) for the element\n\t\t\tif ( !type ) {\n\t\t\t\tfor ( type in events ) {\n\t\t\t\t\tjQuery.event.remove( elem, type + types[ t ], handler, selector, true );\n\t\t\t\t}\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tspecial = jQuery.event.special[ type ] || {};\n\t\t\ttype = ( selector ? special.delegateType : special.bindType ) || type;\n\t\t\thandlers = events[ type ] || [];\n\t\t\ttmp = tmp[2] && new RegExp( \"(^|\\\\.)\" + namespaces.join(\"\\\\.(?:.*\\\\.|)\") + \"(\\\\.|$)\" );\n\n\t\t\t// Remove matching events\n\t\t\torigCount = j = handlers.length;\n\t\t\twhile ( j-- ) {\n\t\t\t\thandleObj = handlers[ j ];\n\n\t\t\t\tif ( ( mappedTypes || origType === handleObj.origType ) &&\n\t\t\t\t\t( !handler || handler.guid === handleObj.guid ) &&\n\t\t\t\t\t( !tmp || tmp.test( handleObj.namespace ) ) &&\n\t\t\t\t\t( !selector || selector === handleObj.selector || selector === \"**\" && handleObj.selector ) ) {\n\t\t\t\t\thandlers.splice( j, 1 );\n\n\t\t\t\t\tif ( handleObj.selector ) {\n\t\t\t\t\t\thandlers.delegateCount--;\n\t\t\t\t\t}\n\t\t\t\t\tif ( special.remove ) {\n\t\t\t\t\t\tspecial.remove.call( elem, handleObj );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Remove generic event handler if we removed something and no more handlers exist\n\t\t\t// (avoids potential for endless recursion during removal of special event handlers)\n\t\t\tif ( origCount && !handlers.length ) {\n\t\t\t\tif ( !special.teardown || special.teardown.call( elem, namespaces, elemData.handle ) === false ) {\n\t\t\t\t\tjQuery.removeEvent( elem, type, elemData.handle );\n\t\t\t\t}\n\n\t\t\t\tdelete events[ type ];\n\t\t\t}\n\t\t}\n\n\t\t// Remove the expando if it's no longer used\n\t\tif ( jQuery.isEmptyObject( events ) ) {\n\t\t\tdelete elemData.handle;\n\n\t\t\t// removeData also checks for emptiness and clears the expando if empty\n\t\t\t// so use it instead of delete\n\t\t\tjQuery._removeData( elem, \"events\" );\n\t\t}\n\t},\n\n\ttrigger: function( event, data, elem, onlyHandlers ) {\n\t\tvar handle, ontype, cur,\n\t\t\tbubbleType, special, tmp, i,\n\t\t\teventPath = [ elem || document ],\n\t\t\ttype = core_hasOwn.call( event, \"type\" ) ? event.type : event,\n\t\t\tnamespaces = core_hasOwn.call( event, \"namespace\" ) ? event.namespace.split(\".\") : [];\n\n\t\tcur = tmp = elem = elem || document;\n\n\t\t// Don't do events on text and comment nodes\n\t\tif ( elem.nodeType === 3 || elem.nodeType === 8 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// focus/blur morphs to focusin/out; ensure we're not firing them right now\n\t\tif ( rfocusMorph.test( type + jQuery.event.triggered ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( type.indexOf(\".\") >= 0 ) {\n\t\t\t// Namespaced trigger; create a regexp to match event type in handle()\n\t\t\tnamespaces = type.split(\".\");\n\t\t\ttype = namespaces.shift();\n\t\t\tnamespaces.sort();\n\t\t}\n\t\tontype = type.indexOf(\":\") < 0 && \"on\" + type;\n\n\t\t// Caller can pass in a jQuery.Event object, Object, or just an event type string\n\t\tevent = event[ jQuery.expando ] ?\n\t\t\tevent :\n\t\t\tnew jQuery.Event( type, typeof event === \"object\" && event );\n\n\t\t// Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true)\n\t\tevent.isTrigger = onlyHandlers ? 2 : 3;\n\t\tevent.namespace = namespaces.join(\".\");\n\t\tevent.namespace_re = event.namespace ?\n\t\t\tnew RegExp( \"(^|\\\\.)\" + namespaces.join(\"\\\\.(?:.*\\\\.|)\") + \"(\\\\.|$)\" ) :\n\t\t\tnull;\n\n\t\t// Clean up the event in case it is being reused\n\t\tevent.result = undefined;\n\t\tif ( !event.target ) {\n\t\t\tevent.target = elem;\n\t\t}\n\n\t\t// Clone any incoming data and prepend the event, creating the handler arg list\n\t\tdata = data == null ?\n\t\t\t[ event ] :\n\t\t\tjQuery.makeArray( data, [ event ] );\n\n\t\t// Allow special events to draw outside the lines\n\t\tspecial = jQuery.event.special[ type ] || {};\n\t\tif ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Determine event propagation path in advance, per W3C events spec (#9951)\n\t\t// Bubble up to document, then to window; watch for a global ownerDocument var (#9724)\n\t\tif ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) {\n\n\t\t\tbubbleType = special.delegateType || type;\n\t\t\tif ( !rfocusMorph.test( bubbleType + type ) ) {\n\t\t\t\tcur = cur.parentNode;\n\t\t\t}\n\t\t\tfor ( ; cur; cur = cur.parentNode ) {\n\t\t\t\teventPath.push( cur );\n\t\t\t\ttmp = cur;\n\t\t\t}\n\n\t\t\t// Only add window if we got to document (e.g., not plain obj or detached DOM)\n\t\t\tif ( tmp === (elem.ownerDocument || document) ) {\n\t\t\t\teventPath.push( tmp.defaultView || tmp.parentWindow || window );\n\t\t\t}\n\t\t}\n\n\t\t// Fire handlers on the event path\n\t\ti = 0;\n\t\twhile ( (cur = eventPath[i++]) && !event.isPropagationStopped() ) {\n\n\t\t\tevent.type = i > 1 ?\n\t\t\t\tbubbleType :\n\t\t\t\tspecial.bindType || type;\n\n\t\t\t// jQuery handler\n\t\t\thandle = ( jQuery._data( cur, \"events\" ) || {} )[ event.type ] && jQuery._data( cur, \"handle\" );\n\t\t\tif ( handle ) {\n\t\t\t\thandle.apply( cur, data );\n\t\t\t}\n\n\t\t\t// Native handler\n\t\t\thandle = ontype && cur[ ontype ];\n\t\t\tif ( handle && jQuery.acceptData( cur ) && handle.apply && handle.apply( cur, data ) === false ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t}\n\t\t}\n\t\tevent.type = type;\n\n\t\t// If nobody prevented the default action, do it now\n\t\tif ( !onlyHandlers && !event.isDefaultPrevented() ) {\n\n\t\t\tif ( (!special._default || special._default.apply( eventPath.pop(), data ) === false) &&\n\t\t\t\tjQuery.acceptData( elem ) ) {\n\n\t\t\t\t// Call a native DOM method on the target with the same name name as the event.\n\t\t\t\t// Can't use an .isFunction() check here because IE6/7 fails that test.\n\t\t\t\t// Don't do default actions on window, that's where global variables be (#6170)\n\t\t\t\tif ( ontype && elem[ type ] && !jQuery.isWindow( elem ) ) {\n\n\t\t\t\t\t// Don't re-trigger an onFOO event when we call its FOO() method\n\t\t\t\t\ttmp = elem[ ontype ];\n\n\t\t\t\t\tif ( tmp ) {\n\t\t\t\t\t\telem[ ontype ] = null;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Prevent re-triggering of the same event, since we already bubbled it above\n\t\t\t\t\tjQuery.event.triggered = type;\n\t\t\t\t\ttry {\n\t\t\t\t\t\telem[ type ]();\n\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t// IE<9 dies on focus/blur to hidden element (#1486,#12518)\n\t\t\t\t\t\t// only reproducible on winXP IE8 native, not IE9 in IE8 mode\n\t\t\t\t\t}\n\t\t\t\t\tjQuery.event.triggered = undefined;\n\n\t\t\t\t\tif ( tmp ) {\n\t\t\t\t\t\telem[ ontype ] = tmp;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn event.result;\n\t},\n\n\tdispatch: function( event ) {\n\n\t\t// Make a writable jQuery.Event from the native event object\n\t\tevent = jQuery.event.fix( event );\n\n\t\tvar i, ret, handleObj, matched, j,\n\t\t\thandlerQueue = [],\n\t\t\targs = core_slice.call( arguments ),\n\t\t\thandlers = ( jQuery._data( this, \"events\" ) || {} )[ event.type ] || [],\n\t\t\tspecial = jQuery.event.special[ event.type ] || {};\n\n\t\t// Use the fix-ed jQuery.Event rather than the (read-only) native event\n\t\targs[0] = event;\n\t\tevent.delegateTarget = this;\n\n\t\t// Call the preDispatch hook for the mapped type, and let it bail if desired\n\t\tif ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Determine handlers\n\t\thandlerQueue = jQuery.event.handlers.call( this, event, handlers );\n\n\t\t// Run delegates first; they may want to stop propagation beneath us\n\t\ti = 0;\n\t\twhile ( (matched = handlerQueue[ i++ ]) && !event.isPropagationStopped() ) {\n\t\t\tevent.currentTarget = matched.elem;\n\n\t\t\tj = 0;\n\t\t\twhile ( (handleObj = matched.handlers[ j++ ]) && !event.isImmediatePropagationStopped() ) {\n\n\t\t\t\t// Triggered event must either 1) have no namespace, or\n\t\t\t\t// 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace).\n\t\t\t\tif ( !event.namespace_re || event.namespace_re.test( handleObj.namespace ) ) {\n\n\t\t\t\t\tevent.handleObj = handleObj;\n\t\t\t\t\tevent.data = handleObj.data;\n\n\t\t\t\t\tret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler )\n\t\t\t\t\t\t\t.apply( matched.elem, args );\n\n\t\t\t\t\tif ( ret !== undefined ) {\n\t\t\t\t\t\tif ( (event.result = ret) === false ) {\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Call the postDispatch hook for the mapped type\n\t\tif ( special.postDispatch ) {\n\t\t\tspecial.postDispatch.call( this, event );\n\t\t}\n\n\t\treturn event.result;\n\t},\n\n\thandlers: function( event, handlers ) {\n\t\tvar sel, handleObj, matches, i,\n\t\t\thandlerQueue = [],\n\t\t\tdelegateCount = handlers.delegateCount,\n\t\t\tcur = event.target;\n\n\t\t// Find delegate handlers\n\t\t// Black-hole SVG <use> instance trees (#13180)\n\t\t// Avoid non-left-click bubbling in Firefox (#3861)\n\t\tif ( delegateCount && cur.nodeType && (!event.button || event.type !== \"click\") ) {\n\n\t\t\t/* jshint eqeqeq: false */\n\t\t\tfor ( ; cur != this; cur = cur.parentNode || this ) {\n\t\t\t\t/* jshint eqeqeq: true */\n\n\t\t\t\t// Don't check non-elements (#13208)\n\t\t\t\t// Don't process clicks on disabled elements (#6911, #8165, #11382, #11764)\n\t\t\t\tif ( cur.nodeType === 1 && (cur.disabled !== true || event.type !== \"click\") ) {\n\t\t\t\t\tmatches = [];\n\t\t\t\t\tfor ( i = 0; i < delegateCount; i++ ) {\n\t\t\t\t\t\thandleObj = handlers[ i ];\n\n\t\t\t\t\t\t// Don't conflict with Object.prototype properties (#13203)\n\t\t\t\t\t\tsel = handleObj.selector + \" \";\n\n\t\t\t\t\t\tif ( matches[ sel ] === undefined ) {\n\t\t\t\t\t\t\tmatches[ sel ] = handleObj.needsContext ?\n\t\t\t\t\t\t\t\tjQuery( sel, this ).index( cur ) >= 0 :\n\t\t\t\t\t\t\t\tjQuery.find( sel, this, null, [ cur ] ).length;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ( matches[ sel ] ) {\n\t\t\t\t\t\t\tmatches.push( handleObj );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif ( matches.length ) {\n\t\t\t\t\t\thandlerQueue.push({ elem: cur, handlers: matches });\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Add the remaining (directly-bound) handlers\n\t\tif ( delegateCount < handlers.length ) {\n\t\t\thandlerQueue.push({ elem: this, handlers: handlers.slice( delegateCount ) });\n\t\t}\n\n\t\treturn handlerQueue;\n\t},\n\n\tfix: function( event ) {\n\t\tif ( event[ jQuery.expando ] ) {\n\t\t\treturn event;\n\t\t}\n\n\t\t// Create a writable copy of the event object and normalize some properties\n\t\tvar i, prop, copy,\n\t\t\ttype = event.type,\n\t\t\toriginalEvent = event,\n\t\t\tfixHook = this.fixHooks[ type ];\n\n\t\tif ( !fixHook ) {\n\t\t\tthis.fixHooks[ type ] = fixHook =\n\t\t\t\trmouseEvent.test( type ) ? this.mouseHooks :\n\t\t\t\trkeyEvent.test( type ) ? this.keyHooks :\n\t\t\t\t{};\n\t\t}\n\t\tcopy = fixHook.props ? this.props.concat( fixHook.props ) : this.props;\n\n\t\tevent = new jQuery.Event( originalEvent );\n\n\t\ti = copy.length;\n\t\twhile ( i-- ) {\n\t\t\tprop = copy[ i ];\n\t\t\tevent[ prop ] = originalEvent[ prop ];\n\t\t}\n\n\t\t// Support: IE<9\n\t\t// Fix target property (#1925)\n\t\tif ( !event.target ) {\n\t\t\tevent.target = originalEvent.srcElement || document;\n\t\t}\n\n\t\t// Support: Chrome 23+, Safari?\n\t\t// Target should not be a text node (#504, #13143)\n\t\tif ( event.target.nodeType === 3 ) {\n\t\t\tevent.target = event.target.parentNode;\n\t\t}\n\n\t\t// Support: IE<9\n\t\t// For mouse/key events, metaKey==false if it's undefined (#3368, #11328)\n\t\tevent.metaKey = !!event.metaKey;\n\n\t\treturn fixHook.filter ? fixHook.filter( event, originalEvent ) : event;\n\t},\n\n\t// Includes some event props shared by KeyEvent and MouseEvent\n\tprops: \"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which\".split(\" \"),\n\n\tfixHooks: {},\n\n\tkeyHooks: {\n\t\tprops: \"char charCode key keyCode\".split(\" \"),\n\t\tfilter: function( event, original ) {\n\n\t\t\t// Add which for key events\n\t\t\tif ( event.which == null ) {\n\t\t\t\tevent.which = original.charCode != null ? original.charCode : original.keyCode;\n\t\t\t}\n\n\t\t\treturn event;\n\t\t}\n\t},\n\n\tmouseHooks: {\n\t\tprops: \"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement\".split(\" \"),\n\t\tfilter: function( event, original ) {\n\t\t\tvar body, eventDoc, doc,\n\t\t\t\tbutton = original.button,\n\t\t\t\tfromElement = original.fromElement;\n\n\t\t\t// Calculate pageX/Y if missing and clientX/Y available\n\t\t\tif ( event.pageX == null && original.clientX != null ) {\n\t\t\t\teventDoc = event.target.ownerDocument || document;\n\t\t\t\tdoc = eventDoc.documentElement;\n\t\t\t\tbody = eventDoc.body;\n\n\t\t\t\tevent.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 );\n\t\t\t\tevent.pageY = original.clientY + ( doc && doc.scrollTop  || body && body.scrollTop  || 0 ) - ( doc && doc.clientTop  || body && body.clientTop  || 0 );\n\t\t\t}\n\n\t\t\t// Add relatedTarget, if necessary\n\t\t\tif ( !event.relatedTarget && fromElement ) {\n\t\t\t\tevent.relatedTarget = fromElement === event.target ? original.toElement : fromElement;\n\t\t\t}\n\n\t\t\t// Add which for click: 1 === left; 2 === middle; 3 === right\n\t\t\t// Note: button is not normalized, so don't use it\n\t\t\tif ( !event.which && button !== undefined ) {\n\t\t\t\tevent.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) );\n\t\t\t}\n\n\t\t\treturn event;\n\t\t}\n\t},\n\n\tspecial: {\n\t\tload: {\n\t\t\t// Prevent triggered image.load events from bubbling to window.load\n\t\t\tnoBubble: true\n\t\t},\n\t\tfocus: {\n\t\t\t// Fire native event if possible so blur/focus sequence is correct\n\t\t\ttrigger: function() {\n\t\t\t\tif ( this !== safeActiveElement() && this.focus ) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tthis.focus();\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t// Support: IE<9\n\t\t\t\t\t\t// If we error on focus to hidden element (#1486, #12518),\n\t\t\t\t\t\t// let .trigger() run the handlers\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\tdelegateType: \"focusin\"\n\t\t},\n\t\tblur: {\n\t\t\ttrigger: function() {\n\t\t\t\tif ( this === safeActiveElement() && this.blur ) {\n\t\t\t\t\tthis.blur();\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t},\n\t\t\tdelegateType: \"focusout\"\n\t\t},\n\t\tclick: {\n\t\t\t// For checkbox, fire native event so checked state will be right\n\t\t\ttrigger: function() {\n\t\t\t\tif ( jQuery.nodeName( this, \"input\" ) && this.type === \"checkbox\" && this.click ) {\n\t\t\t\t\tthis.click();\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t},\n\n\t\t\t// For cross-browser consistency, don't fire native .click() on links\n\t\t\t_default: function( event ) {\n\t\t\t\treturn jQuery.nodeName( event.target, \"a\" );\n\t\t\t}\n\t\t},\n\n\t\tbeforeunload: {\n\t\t\tpostDispatch: function( event ) {\n\n\t\t\t\t// Even when returnValue equals to undefined Firefox will still show alert\n\t\t\t\tif ( event.result !== undefined ) {\n\t\t\t\t\tevent.originalEvent.returnValue = event.result;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\n\tsimulate: function( type, elem, event, bubble ) {\n\t\t// Piggyback on a donor event to simulate a different one.\n\t\t// Fake originalEvent to avoid donor's stopPropagation, but if the\n\t\t// simulated event prevents default then we do the same on the donor.\n\t\tvar e = jQuery.extend(\n\t\t\tnew jQuery.Event(),\n\t\t\tevent,\n\t\t\t{\n\t\t\t\ttype: type,\n\t\t\t\tisSimulated: true,\n\t\t\t\toriginalEvent: {}\n\t\t\t}\n\t\t);\n\t\tif ( bubble ) {\n\t\t\tjQuery.event.trigger( e, null, elem );\n\t\t} else {\n\t\t\tjQuery.event.dispatch.call( elem, e );\n\t\t}\n\t\tif ( e.isDefaultPrevented() ) {\n\t\t\tevent.preventDefault();\n\t\t}\n\t}\n};\n\njQuery.removeEvent = document.removeEventListener ?\n\tfunction( elem, type, handle ) {\n\t\tif ( elem.removeEventListener ) {\n\t\t\telem.removeEventListener( type, handle, false );\n\t\t}\n\t} :\n\tfunction( elem, type, handle ) {\n\t\tvar name = \"on\" + type;\n\n\t\tif ( elem.detachEvent ) {\n\n\t\t\t// #8545, #7054, preventing memory leaks for custom events in IE6-8\n\t\t\t// detachEvent needed property on element, by name of that event, to properly expose it to GC\n\t\t\tif ( typeof elem[ name ] === core_strundefined ) {\n\t\t\t\telem[ name ] = null;\n\t\t\t}\n\n\t\t\telem.detachEvent( name, handle );\n\t\t}\n\t};\n\njQuery.Event = function( src, props ) {\n\t// Allow instantiation without the 'new' keyword\n\tif ( !(this instanceof jQuery.Event) ) {\n\t\treturn new jQuery.Event( src, props );\n\t}\n\n\t// Event object\n\tif ( src && src.type ) {\n\t\tthis.originalEvent = src;\n\t\tthis.type = src.type;\n\n\t\t// Events bubbling up the document may have been marked as prevented\n\t\t// by a handler lower down the tree; reflect the correct value.\n\t\tthis.isDefaultPrevented = ( src.defaultPrevented || src.returnValue === false ||\n\t\t\tsrc.getPreventDefault && src.getPreventDefault() ) ? returnTrue : returnFalse;\n\n\t// Event type\n\t} else {\n\t\tthis.type = src;\n\t}\n\n\t// Put explicitly provided properties onto the event object\n\tif ( props ) {\n\t\tjQuery.extend( this, props );\n\t}\n\n\t// Create a timestamp if incoming event doesn't have one\n\tthis.timeStamp = src && src.timeStamp || jQuery.now();\n\n\t// Mark it as fixed\n\tthis[ jQuery.expando ] = true;\n};\n\n// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding\n// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html\njQuery.Event.prototype = {\n\tisDefaultPrevented: returnFalse,\n\tisPropagationStopped: returnFalse,\n\tisImmediatePropagationStopped: returnFalse,\n\n\tpreventDefault: function() {\n\t\tvar e = this.originalEvent;\n\n\t\tthis.isDefaultPrevented = returnTrue;\n\t\tif ( !e ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// If preventDefault exists, run it on the original event\n\t\tif ( e.preventDefault ) {\n\t\t\te.preventDefault();\n\n\t\t// Support: IE\n\t\t// Otherwise set the returnValue property of the original event to false\n\t\t} else {\n\t\t\te.returnValue = false;\n\t\t}\n\t},\n\tstopPropagation: function() {\n\t\tvar e = this.originalEvent;\n\n\t\tthis.isPropagationStopped = returnTrue;\n\t\tif ( !e ) {\n\t\t\treturn;\n\t\t}\n\t\t// If stopPropagation exists, run it on the original event\n\t\tif ( e.stopPropagation ) {\n\t\t\te.stopPropagation();\n\t\t}\n\n\t\t// Support: IE\n\t\t// Set the cancelBubble property of the original event to true\n\t\te.cancelBubble = true;\n\t},\n\tstopImmediatePropagation: function() {\n\t\tthis.isImmediatePropagationStopped = returnTrue;\n\t\tthis.stopPropagation();\n\t}\n};\n\n// Create mouseenter/leave events using mouseover/out and event-time checks\njQuery.each({\n\tmouseenter: \"mouseover\",\n\tmouseleave: \"mouseout\"\n}, function( orig, fix ) {\n\tjQuery.event.special[ orig ] = {\n\t\tdelegateType: fix,\n\t\tbindType: fix,\n\n\t\thandle: function( event ) {\n\t\t\tvar ret,\n\t\t\t\ttarget = this,\n\t\t\t\trelated = event.relatedTarget,\n\t\t\t\thandleObj = event.handleObj;\n\n\t\t\t// For mousenter/leave call the handler if related is outside the target.\n\t\t\t// NB: No relatedTarget if the mouse left/entered the browser window\n\t\t\tif ( !related || (related !== target && !jQuery.contains( target, related )) ) {\n\t\t\t\tevent.type = handleObj.origType;\n\t\t\t\tret = handleObj.handler.apply( this, arguments );\n\t\t\t\tevent.type = fix;\n\t\t\t}\n\t\t\treturn ret;\n\t\t}\n\t};\n});\n\n// IE submit delegation\nif ( !jQuery.support.submitBubbles ) {\n\n\tjQuery.event.special.submit = {\n\t\tsetup: function() {\n\t\t\t// Only need this for delegated form submit events\n\t\t\tif ( jQuery.nodeName( this, \"form\" ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// Lazy-add a submit handler when a descendant form may potentially be submitted\n\t\t\tjQuery.event.add( this, \"click._submit keypress._submit\", function( e ) {\n\t\t\t\t// Node name check avoids a VML-related crash in IE (#9807)\n\t\t\t\tvar elem = e.target,\n\t\t\t\t\tform = jQuery.nodeName( elem, \"input\" ) || jQuery.nodeName( elem, \"button\" ) ? elem.form : undefined;\n\t\t\t\tif ( form && !jQuery._data( form, \"submitBubbles\" ) ) {\n\t\t\t\t\tjQuery.event.add( form, \"submit._submit\", function( event ) {\n\t\t\t\t\t\tevent._submit_bubble = true;\n\t\t\t\t\t});\n\t\t\t\t\tjQuery._data( form, \"submitBubbles\", true );\n\t\t\t\t}\n\t\t\t});\n\t\t\t// return undefined since we don't need an event listener\n\t\t},\n\n\t\tpostDispatch: function( event ) {\n\t\t\t// If form was submitted by the user, bubble the event up the tree\n\t\t\tif ( event._submit_bubble ) {\n\t\t\t\tdelete event._submit_bubble;\n\t\t\t\tif ( this.parentNode && !event.isTrigger ) {\n\t\t\t\t\tjQuery.event.simulate( \"submit\", this.parentNode, event, true );\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\tteardown: function() {\n\t\t\t// Only need this for delegated form submit events\n\t\t\tif ( jQuery.nodeName( this, \"form\" ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// Remove delegated handlers; cleanData eventually reaps submit handlers attached above\n\t\t\tjQuery.event.remove( this, \"._submit\" );\n\t\t}\n\t};\n}\n\n// IE change delegation and checkbox/radio fix\nif ( !jQuery.support.changeBubbles ) {\n\n\tjQuery.event.special.change = {\n\n\t\tsetup: function() {\n\n\t\t\tif ( rformElems.test( this.nodeName ) ) {\n\t\t\t\t// IE doesn't fire change on a check/radio until blur; trigger it on click\n\t\t\t\t// after a propertychange. Eat the blur-change in special.change.handle.\n\t\t\t\t// This still fires onchange a second time for check/radio after blur.\n\t\t\t\tif ( this.type === \"checkbox\" || this.type === \"radio\" ) {\n\t\t\t\t\tjQuery.event.add( this, \"propertychange._change\", function( event ) {\n\t\t\t\t\t\tif ( event.originalEvent.propertyName === \"checked\" ) {\n\t\t\t\t\t\t\tthis._just_changed = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\tjQuery.event.add( this, \"click._change\", function( event ) {\n\t\t\t\t\t\tif ( this._just_changed && !event.isTrigger ) {\n\t\t\t\t\t\t\tthis._just_changed = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Allow triggered, simulated change events (#11500)\n\t\t\t\t\t\tjQuery.event.simulate( \"change\", this, event, true );\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t// Delegated event; lazy-add a change handler on descendant inputs\n\t\t\tjQuery.event.add( this, \"beforeactivate._change\", function( e ) {\n\t\t\t\tvar elem = e.target;\n\n\t\t\t\tif ( rformElems.test( elem.nodeName ) && !jQuery._data( elem, \"changeBubbles\" ) ) {\n\t\t\t\t\tjQuery.event.add( elem, \"change._change\", function( event ) {\n\t\t\t\t\t\tif ( this.parentNode && !event.isSimulated && !event.isTrigger ) {\n\t\t\t\t\t\t\tjQuery.event.simulate( \"change\", this.parentNode, event, true );\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\tjQuery._data( elem, \"changeBubbles\", true );\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\n\t\thandle: function( event ) {\n\t\t\tvar elem = event.target;\n\n\t\t\t// Swallow native change events from checkbox/radio, we already triggered them above\n\t\t\tif ( this !== elem || event.isSimulated || event.isTrigger || (elem.type !== \"radio\" && elem.type !== \"checkbox\") ) {\n\t\t\t\treturn event.handleObj.handler.apply( this, arguments );\n\t\t\t}\n\t\t},\n\n\t\tteardown: function() {\n\t\t\tjQuery.event.remove( this, \"._change\" );\n\n\t\t\treturn !rformElems.test( this.nodeName );\n\t\t}\n\t};\n}\n\n// Create \"bubbling\" focus and blur events\nif ( !jQuery.support.focusinBubbles ) {\n\tjQuery.each({ focus: \"focusin\", blur: \"focusout\" }, function( orig, fix ) {\n\n\t\t// Attach a single capturing handler while someone wants focusin/focusout\n\t\tvar attaches = 0,\n\t\t\thandler = function( event ) {\n\t\t\t\tjQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true );\n\t\t\t};\n\n\t\tjQuery.event.special[ fix ] = {\n\t\t\tsetup: function() {\n\t\t\t\tif ( attaches++ === 0 ) {\n\t\t\t\t\tdocument.addEventListener( orig, handler, true );\n\t\t\t\t}\n\t\t\t},\n\t\t\tteardown: function() {\n\t\t\t\tif ( --attaches === 0 ) {\n\t\t\t\t\tdocument.removeEventListener( orig, handler, true );\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t});\n}\n\njQuery.fn.extend({\n\n\ton: function( types, selector, data, fn, /*INTERNAL*/ one ) {\n\t\tvar type, origFn;\n\n\t\t// Types can be a map of types/handlers\n\t\tif ( typeof types === \"object\" ) {\n\t\t\t// ( types-Object, selector, data )\n\t\t\tif ( typeof selector !== \"string\" ) {\n\t\t\t\t// ( types-Object, data )\n\t\t\t\tdata = data || selector;\n\t\t\t\tselector = undefined;\n\t\t\t}\n\t\t\tfor ( type in types ) {\n\t\t\t\tthis.on( type, selector, data, types[ type ], one );\n\t\t\t}\n\t\t\treturn this;\n\t\t}\n\n\t\tif ( data == null && fn == null ) {\n\t\t\t// ( types, fn )\n\t\t\tfn = selector;\n\t\t\tdata = selector = undefined;\n\t\t} else if ( fn == null ) {\n\t\t\tif ( typeof selector === \"string\" ) {\n\t\t\t\t// ( types, selector, fn )\n\t\t\t\tfn = data;\n\t\t\t\tdata = undefined;\n\t\t\t} else {\n\t\t\t\t// ( types, data, fn )\n\t\t\t\tfn = data;\n\t\t\t\tdata = selector;\n\t\t\t\tselector = undefined;\n\t\t\t}\n\t\t}\n\t\tif ( fn === false ) {\n\t\t\tfn = returnFalse;\n\t\t} else if ( !fn ) {\n\t\t\treturn this;\n\t\t}\n\n\t\tif ( one === 1 ) {\n\t\t\torigFn = fn;\n\t\t\tfn = function( event ) {\n\t\t\t\t// Can use an empty set, since event contains the info\n\t\t\t\tjQuery().off( event );\n\t\t\t\treturn origFn.apply( this, arguments );\n\t\t\t};\n\t\t\t// Use same guid so caller can remove using origFn\n\t\t\tfn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );\n\t\t}\n\t\treturn this.each( function() {\n\t\t\tjQuery.event.add( this, types, fn, data, selector );\n\t\t});\n\t},\n\tone: function( types, selector, data, fn ) {\n\t\treturn this.on( types, selector, data, fn, 1 );\n\t},\n\toff: function( types, selector, fn ) {\n\t\tvar handleObj, type;\n\t\tif ( types && types.preventDefault && types.handleObj ) {\n\t\t\t// ( event )  dispatched jQuery.Event\n\t\t\thandleObj = types.handleObj;\n\t\t\tjQuery( types.delegateTarget ).off(\n\t\t\t\thandleObj.namespace ? handleObj.origType + \".\" + handleObj.namespace : handleObj.origType,\n\t\t\t\thandleObj.selector,\n\t\t\t\thandleObj.handler\n\t\t\t);\n\t\t\treturn this;\n\t\t}\n\t\tif ( typeof types === \"object\" ) {\n\t\t\t// ( types-object [, selector] )\n\t\t\tfor ( type in types ) {\n\t\t\t\tthis.off( type, selector, types[ type ] );\n\t\t\t}\n\t\t\treturn this;\n\t\t}\n\t\tif ( selector === false || typeof selector === \"function\" ) {\n\t\t\t// ( types [, fn] )\n\t\t\tfn = selector;\n\t\t\tselector = undefined;\n\t\t}\n\t\tif ( fn === false ) {\n\t\t\tfn = returnFalse;\n\t\t}\n\t\treturn this.each(function() {\n\t\t\tjQuery.event.remove( this, types, fn, selector );\n\t\t});\n\t},\n\n\ttrigger: function( type, data ) {\n\t\treturn this.each(function() {\n\t\t\tjQuery.event.trigger( type, data, this );\n\t\t});\n\t},\n\ttriggerHandler: function( type, data ) {\n\t\tvar elem = this[0];\n\t\tif ( elem ) {\n\t\t\treturn jQuery.event.trigger( type, data, elem, true );\n\t\t}\n\t}\n});\nvar isSimple = /^.[^:#\\[\\.,]*$/,\n\trparentsprev = /^(?:parents|prev(?:Until|All))/,\n\trneedsContext = jQuery.expr.match.needsContext,\n\t// methods guaranteed to produce a unique set when starting from a unique set\n\tguaranteedUnique = {\n\t\tchildren: true,\n\t\tcontents: true,\n\t\tnext: true,\n\t\tprev: true\n\t};\n\njQuery.fn.extend({\n\tfind: function( selector ) {\n\t\tvar i,\n\t\t\tret = [],\n\t\t\tself = this,\n\t\t\tlen = self.length;\n\n\t\tif ( typeof selector !== \"string\" ) {\n\t\t\treturn this.pushStack( jQuery( selector ).filter(function() {\n\t\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\t\tif ( jQuery.contains( self[ i ], this ) ) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}) );\n\t\t}\n\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tjQuery.find( selector, self[ i ], ret );\n\t\t}\n\n\t\t// Needed because $( selector, context ) becomes $( context ).find( selector )\n\t\tret = this.pushStack( len > 1 ? jQuery.unique( ret ) : ret );\n\t\tret.selector = this.selector ? this.selector + \" \" + selector : selector;\n\t\treturn ret;\n\t},\n\n\thas: function( target ) {\n\t\tvar i,\n\t\t\ttargets = jQuery( target, this ),\n\t\t\tlen = targets.length;\n\n\t\treturn this.filter(function() {\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tif ( jQuery.contains( this, targets[i] ) ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t},\n\n\tnot: function( selector ) {\n\t\treturn this.pushStack( winnow(this, selector || [], true) );\n\t},\n\n\tfilter: function( selector ) {\n\t\treturn this.pushStack( winnow(this, selector || [], false) );\n\t},\n\n\tis: function( selector ) {\n\t\treturn !!winnow(\n\t\t\tthis,\n\n\t\t\t// If this is a positional/relative selector, check membership in the returned set\n\t\t\t// so $(\"p:first\").is(\"p:last\") won't return true for a doc with two \"p\".\n\t\t\ttypeof selector === \"string\" && rneedsContext.test( selector ) ?\n\t\t\t\tjQuery( selector ) :\n\t\t\t\tselector || [],\n\t\t\tfalse\n\t\t).length;\n\t},\n\n\tclosest: function( selectors, context ) {\n\t\tvar cur,\n\t\t\ti = 0,\n\t\t\tl = this.length,\n\t\t\tret = [],\n\t\t\tpos = rneedsContext.test( selectors ) || typeof selectors !== \"string\" ?\n\t\t\t\tjQuery( selectors, context || this.context ) :\n\t\t\t\t0;\n\n\t\tfor ( ; i < l; i++ ) {\n\t\t\tfor ( cur = this[i]; cur && cur !== context; cur = cur.parentNode ) {\n\t\t\t\t// Always skip document fragments\n\t\t\t\tif ( cur.nodeType < 11 && (pos ?\n\t\t\t\t\tpos.index(cur) > -1 :\n\n\t\t\t\t\t// Don't pass non-elements to Sizzle\n\t\t\t\t\tcur.nodeType === 1 &&\n\t\t\t\t\t\tjQuery.find.matchesSelector(cur, selectors)) ) {\n\n\t\t\t\t\tcur = ret.push( cur );\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn this.pushStack( ret.length > 1 ? jQuery.unique( ret ) : ret );\n\t},\n\n\t// Determine the position of an element within\n\t// the matched set of elements\n\tindex: function( elem ) {\n\n\t\t// No argument, return index in parent\n\t\tif ( !elem ) {\n\t\t\treturn ( this[0] && this[0].parentNode ) ? this.first().prevAll().length : -1;\n\t\t}\n\n\t\t// index in selector\n\t\tif ( typeof elem === \"string\" ) {\n\t\t\treturn jQuery.inArray( this[0], jQuery( elem ) );\n\t\t}\n\n\t\t// Locate the position of the desired element\n\t\treturn jQuery.inArray(\n\t\t\t// If it receives a jQuery object, the first element is used\n\t\t\telem.jquery ? elem[0] : elem, this );\n\t},\n\n\tadd: function( selector, context ) {\n\t\tvar set = typeof selector === \"string\" ?\n\t\t\t\tjQuery( selector, context ) :\n\t\t\t\tjQuery.makeArray( selector && selector.nodeType ? [ selector ] : selector ),\n\t\t\tall = jQuery.merge( this.get(), set );\n\n\t\treturn this.pushStack( jQuery.unique(all) );\n\t},\n\n\taddBack: function( selector ) {\n\t\treturn this.add( selector == null ?\n\t\t\tthis.prevObject : this.prevObject.filter(selector)\n\t\t);\n\t}\n});\n\nfunction sibling( cur, dir ) {\n\tdo {\n\t\tcur = cur[ dir ];\n\t} while ( cur && cur.nodeType !== 1 );\n\n\treturn cur;\n}\n\njQuery.each({\n\tparent: function( elem ) {\n\t\tvar parent = elem.parentNode;\n\t\treturn parent && parent.nodeType !== 11 ? parent : null;\n\t},\n\tparents: function( elem ) {\n\t\treturn jQuery.dir( elem, \"parentNode\" );\n\t},\n\tparentsUntil: function( elem, i, until ) {\n\t\treturn jQuery.dir( elem, \"parentNode\", until );\n\t},\n\tnext: function( elem ) {\n\t\treturn sibling( elem, \"nextSibling\" );\n\t},\n\tprev: function( elem ) {\n\t\treturn sibling( elem, \"previousSibling\" );\n\t},\n\tnextAll: function( elem ) {\n\t\treturn jQuery.dir( elem, \"nextSibling\" );\n\t},\n\tprevAll: function( elem ) {\n\t\treturn jQuery.dir( elem, \"previousSibling\" );\n\t},\n\tnextUntil: function( elem, i, until ) {\n\t\treturn jQuery.dir( elem, \"nextSibling\", until );\n\t},\n\tprevUntil: function( elem, i, until ) {\n\t\treturn jQuery.dir( elem, \"previousSibling\", until );\n\t},\n\tsiblings: function( elem ) {\n\t\treturn jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem );\n\t},\n\tchildren: function( elem ) {\n\t\treturn jQuery.sibling( elem.firstChild );\n\t},\n\tcontents: function( elem ) {\n\t\treturn jQuery.nodeName( elem, \"iframe\" ) ?\n\t\t\telem.contentDocument || elem.contentWindow.document :\n\t\t\tjQuery.merge( [], elem.childNodes );\n\t}\n}, function( name, fn ) {\n\tjQuery.fn[ name ] = function( until, selector ) {\n\t\tvar ret = jQuery.map( this, fn, until );\n\n\t\tif ( name.slice( -5 ) !== \"Until\" ) {\n\t\t\tselector = until;\n\t\t}\n\n\t\tif ( selector && typeof selector === \"string\" ) {\n\t\t\tret = jQuery.filter( selector, ret );\n\t\t}\n\n\t\tif ( this.length > 1 ) {\n\t\t\t// Remove duplicates\n\t\t\tif ( !guaranteedUnique[ name ] ) {\n\t\t\t\tret = jQuery.unique( ret );\n\t\t\t}\n\n\t\t\t// Reverse order for parents* and prev-derivatives\n\t\t\tif ( rparentsprev.test( name ) ) {\n\t\t\t\tret = ret.reverse();\n\t\t\t}\n\t\t}\n\n\t\treturn this.pushStack( ret );\n\t};\n});\n\njQuery.extend({\n\tfilter: function( expr, elems, not ) {\n\t\tvar elem = elems[ 0 ];\n\n\t\tif ( not ) {\n\t\t\texpr = \":not(\" + expr + \")\";\n\t\t}\n\n\t\treturn elems.length === 1 && elem.nodeType === 1 ?\n\t\t\tjQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [] :\n\t\t\tjQuery.find.matches( expr, jQuery.grep( elems, function( elem ) {\n\t\t\t\treturn elem.nodeType === 1;\n\t\t\t}));\n\t},\n\n\tdir: function( elem, dir, until ) {\n\t\tvar matched = [],\n\t\t\tcur = elem[ dir ];\n\n\t\twhile ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) {\n\t\t\tif ( cur.nodeType === 1 ) {\n\t\t\t\tmatched.push( cur );\n\t\t\t}\n\t\t\tcur = cur[dir];\n\t\t}\n\t\treturn matched;\n\t},\n\n\tsibling: function( n, elem ) {\n\t\tvar r = [];\n\n\t\tfor ( ; n; n = n.nextSibling ) {\n\t\t\tif ( n.nodeType === 1 && n !== elem ) {\n\t\t\t\tr.push( n );\n\t\t\t}\n\t\t}\n\n\t\treturn r;\n\t}\n});\n\n// Implement the identical functionality for filter and not\nfunction winnow( elements, qualifier, not ) {\n\tif ( jQuery.isFunction( qualifier ) ) {\n\t\treturn jQuery.grep( elements, function( elem, i ) {\n\t\t\t/* jshint -W018 */\n\t\t\treturn !!qualifier.call( elem, i, elem ) !== not;\n\t\t});\n\n\t}\n\n\tif ( qualifier.nodeType ) {\n\t\treturn jQuery.grep( elements, function( elem ) {\n\t\t\treturn ( elem === qualifier ) !== not;\n\t\t});\n\n\t}\n\n\tif ( typeof qualifier === \"string\" ) {\n\t\tif ( isSimple.test( qualifier ) ) {\n\t\t\treturn jQuery.filter( qualifier, elements, not );\n\t\t}\n\n\t\tqualifier = jQuery.filter( qualifier, elements );\n\t}\n\n\treturn jQuery.grep( elements, function( elem ) {\n\t\treturn ( jQuery.inArray( elem, qualifier ) >= 0 ) !== not;\n\t});\n}\nfunction createSafeFragment( document ) {\n\tvar list = nodeNames.split( \"|\" ),\n\t\tsafeFrag = document.createDocumentFragment();\n\n\tif ( safeFrag.createElement ) {\n\t\twhile ( list.length ) {\n\t\t\tsafeFrag.createElement(\n\t\t\t\tlist.pop()\n\t\t\t);\n\t\t}\n\t}\n\treturn safeFrag;\n}\n\nvar nodeNames = \"abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|\" +\n\t\t\"header|hgroup|mark|meter|nav|output|progress|section|summary|time|video\",\n\trinlinejQuery = / jQuery\\d+=\"(?:null|\\d+)\"/g,\n\trnoshimcache = new RegExp(\"<(?:\" + nodeNames + \")[\\\\s/>]\", \"i\"),\n\trleadingWhitespace = /^\\s+/,\n\trxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\\w:]+)[^>]*)\\/>/gi,\n\trtagName = /<([\\w:]+)/,\n\trtbody = /<tbody/i,\n\trhtml = /<|&#?\\w+;/,\n\trnoInnerhtml = /<(?:script|style|link)/i,\n\tmanipulation_rcheckableType = /^(?:checkbox|radio)$/i,\n\t// checked=\"checked\" or checked\n\trchecked = /checked\\s*(?:[^=]|=\\s*.checked.)/i,\n\trscriptType = /^$|\\/(?:java|ecma)script/i,\n\trscriptTypeMasked = /^true\\/(.*)/,\n\trcleanScript = /^\\s*<!(?:\\[CDATA\\[|--)|(?:\\]\\]|--)>\\s*$/g,\n\n\t// We have to close these tags to support XHTML (#13200)\n\twrapMap = {\n\t\toption: [ 1, \"<select multiple='multiple'>\", \"</select>\" ],\n\t\tlegend: [ 1, \"<fieldset>\", \"</fieldset>\" ],\n\t\tarea: [ 1, \"<map>\", \"</map>\" ],\n\t\tparam: [ 1, \"<object>\", \"</object>\" ],\n\t\tthead: [ 1, \"<table>\", \"</table>\" ],\n\t\ttr: [ 2, \"<table><tbody>\", \"</tbody></table>\" ],\n\t\tcol: [ 2, \"<table><tbody></tbody><colgroup>\", \"</colgroup></table>\" ],\n\t\ttd: [ 3, \"<table><tbody><tr>\", \"</tr></tbody></table>\" ],\n\n\t\t// IE6-8 can't serialize link, script, style, or any html5 (NoScope) tags,\n\t\t// unless wrapped in a div with non-breaking characters in front of it.\n\t\t_default: jQuery.support.htmlSerialize ? [ 0, \"\", \"\" ] : [ 1, \"X<div>\", \"</div>\"  ]\n\t},\n\tsafeFragment = createSafeFragment( document ),\n\tfragmentDiv = safeFragment.appendChild( document.createElement(\"div\") );\n\nwrapMap.optgroup = wrapMap.option;\nwrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;\nwrapMap.th = wrapMap.td;\n\njQuery.fn.extend({\n\ttext: function( value ) {\n\t\treturn jQuery.access( this, function( value ) {\n\t\t\treturn value === undefined ?\n\t\t\t\tjQuery.text( this ) :\n\t\t\t\tthis.empty().append( ( this[0] && this[0].ownerDocument || document ).createTextNode( value ) );\n\t\t}, null, value, arguments.length );\n\t},\n\n\tappend: function() {\n\t\treturn this.domManip( arguments, function( elem ) {\n\t\t\tif ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {\n\t\t\t\tvar target = manipulationTarget( this, elem );\n\t\t\t\ttarget.appendChild( elem );\n\t\t\t}\n\t\t});\n\t},\n\n\tprepend: function() {\n\t\treturn this.domManip( arguments, function( elem ) {\n\t\t\tif ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {\n\t\t\t\tvar target = manipulationTarget( this, elem );\n\t\t\t\ttarget.insertBefore( elem, target.firstChild );\n\t\t\t}\n\t\t});\n\t},\n\n\tbefore: function() {\n\t\treturn this.domManip( arguments, function( elem ) {\n\t\t\tif ( this.parentNode ) {\n\t\t\t\tthis.parentNode.insertBefore( elem, this );\n\t\t\t}\n\t\t});\n\t},\n\n\tafter: function() {\n\t\treturn this.domManip( arguments, function( elem ) {\n\t\t\tif ( this.parentNode ) {\n\t\t\t\tthis.parentNode.insertBefore( elem, this.nextSibling );\n\t\t\t}\n\t\t});\n\t},\n\n\t// keepData is for internal use only--do not document\n\tremove: function( selector, keepData ) {\n\t\tvar elem,\n\t\t\telems = selector ? jQuery.filter( selector, this ) : this,\n\t\t\ti = 0;\n\n\t\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\n\t\t\tif ( !keepData && elem.nodeType === 1 ) {\n\t\t\t\tjQuery.cleanData( getAll( elem ) );\n\t\t\t}\n\n\t\t\tif ( elem.parentNode ) {\n\t\t\t\tif ( keepData && jQuery.contains( elem.ownerDocument, elem ) ) {\n\t\t\t\t\tsetGlobalEval( getAll( elem, \"script\" ) );\n\t\t\t\t}\n\t\t\t\telem.parentNode.removeChild( elem );\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t},\n\n\tempty: function() {\n\t\tvar elem,\n\t\t\ti = 0;\n\n\t\tfor ( ; (elem = this[i]) != null; i++ ) {\n\t\t\t// Remove element nodes and prevent memory leaks\n\t\t\tif ( elem.nodeType === 1 ) {\n\t\t\t\tjQuery.cleanData( getAll( elem, false ) );\n\t\t\t}\n\n\t\t\t// Remove any remaining nodes\n\t\t\twhile ( elem.firstChild ) {\n\t\t\t\telem.removeChild( elem.firstChild );\n\t\t\t}\n\n\t\t\t// If this is a select, ensure that it displays empty (#12336)\n\t\t\t// Support: IE<9\n\t\t\tif ( elem.options && jQuery.nodeName( elem, \"select\" ) ) {\n\t\t\t\telem.options.length = 0;\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t},\n\n\tclone: function( dataAndEvents, deepDataAndEvents ) {\n\t\tdataAndEvents = dataAndEvents == null ? false : dataAndEvents;\n\t\tdeepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;\n\n\t\treturn this.map( function () {\n\t\t\treturn jQuery.clone( this, dataAndEvents, deepDataAndEvents );\n\t\t});\n\t},\n\n\thtml: function( value ) {\n\t\treturn jQuery.access( this, function( value ) {\n\t\t\tvar elem = this[0] || {},\n\t\t\t\ti = 0,\n\t\t\t\tl = this.length;\n\n\t\t\tif ( value === undefined ) {\n\t\t\t\treturn elem.nodeType === 1 ?\n\t\t\t\t\telem.innerHTML.replace( rinlinejQuery, \"\" ) :\n\t\t\t\t\tundefined;\n\t\t\t}\n\n\t\t\t// See if we can take a shortcut and just use innerHTML\n\t\t\tif ( typeof value === \"string\" && !rnoInnerhtml.test( value ) &&\n\t\t\t\t( jQuery.support.htmlSerialize || !rnoshimcache.test( value )  ) &&\n\t\t\t\t( jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value ) ) &&\n\t\t\t\t!wrapMap[ ( rtagName.exec( value ) || [\"\", \"\"] )[1].toLowerCase() ] ) {\n\n\t\t\t\tvalue = value.replace( rxhtmlTag, \"<$1></$2>\" );\n\n\t\t\t\ttry {\n\t\t\t\t\tfor (; i < l; i++ ) {\n\t\t\t\t\t\t// Remove element nodes and prevent memory leaks\n\t\t\t\t\t\telem = this[i] || {};\n\t\t\t\t\t\tif ( elem.nodeType === 1 ) {\n\t\t\t\t\t\t\tjQuery.cleanData( getAll( elem, false ) );\n\t\t\t\t\t\t\telem.innerHTML = value;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\telem = 0;\n\n\t\t\t\t// If using innerHTML throws an exception, use the fallback method\n\t\t\t\t} catch(e) {}\n\t\t\t}\n\n\t\t\tif ( elem ) {\n\t\t\t\tthis.empty().append( value );\n\t\t\t}\n\t\t}, null, value, arguments.length );\n\t},\n\n\treplaceWith: function() {\n\t\tvar\n\t\t\t// Snapshot the DOM in case .domManip sweeps something relevant into its fragment\n\t\t\targs = jQuery.map( this, function( elem ) {\n\t\t\t\treturn [ elem.nextSibling, elem.parentNode ];\n\t\t\t}),\n\t\t\ti = 0;\n\n\t\t// Make the changes, replacing each context element with the new content\n\t\tthis.domManip( arguments, function( elem ) {\n\t\t\tvar next = args[ i++ ],\n\t\t\t\tparent = args[ i++ ];\n\n\t\t\tif ( parent ) {\n\t\t\t\t// Don't use the snapshot next if it has moved (#13810)\n\t\t\t\tif ( next && next.parentNode !== parent ) {\n\t\t\t\t\tnext = this.nextSibling;\n\t\t\t\t}\n\t\t\t\tjQuery( this ).remove();\n\t\t\t\tparent.insertBefore( elem, next );\n\t\t\t}\n\t\t// Allow new content to include elements from the context set\n\t\t}, true );\n\n\t\t// Force removal if there was no new content (e.g., from empty arguments)\n\t\treturn i ? this : this.remove();\n\t},\n\n\tdetach: function( selector ) {\n\t\treturn this.remove( selector, true );\n\t},\n\n\tdomManip: function( args, callback, allowIntersection ) {\n\n\t\t// Flatten any nested arrays\n\t\targs = core_concat.apply( [], args );\n\n\t\tvar first, node, hasScripts,\n\t\t\tscripts, doc, fragment,\n\t\t\ti = 0,\n\t\t\tl = this.length,\n\t\t\tset = this,\n\t\t\tiNoClone = l - 1,\n\t\t\tvalue = args[0],\n\t\t\tisFunction = jQuery.isFunction( value );\n\n\t\t// We can't cloneNode fragments that contain checked, in WebKit\n\t\tif ( isFunction || !( l <= 1 || typeof value !== \"string\" || jQuery.support.checkClone || !rchecked.test( value ) ) ) {\n\t\t\treturn this.each(function( index ) {\n\t\t\t\tvar self = set.eq( index );\n\t\t\t\tif ( isFunction ) {\n\t\t\t\t\targs[0] = value.call( this, index, self.html() );\n\t\t\t\t}\n\t\t\t\tself.domManip( args, callback, allowIntersection );\n\t\t\t});\n\t\t}\n\n\t\tif ( l ) {\n\t\t\tfragment = jQuery.buildFragment( args, this[ 0 ].ownerDocument, false, !allowIntersection && this );\n\t\t\tfirst = fragment.firstChild;\n\n\t\t\tif ( fragment.childNodes.length === 1 ) {\n\t\t\t\tfragment = first;\n\t\t\t}\n\n\t\t\tif ( first ) {\n\t\t\t\tscripts = jQuery.map( getAll( fragment, \"script\" ), disableScript );\n\t\t\t\thasScripts = scripts.length;\n\n\t\t\t\t// Use the original fragment for the last item instead of the first because it can end up\n\t\t\t\t// being emptied incorrectly in certain situations (#8070).\n\t\t\t\tfor ( ; i < l; i++ ) {\n\t\t\t\t\tnode = fragment;\n\n\t\t\t\t\tif ( i !== iNoClone ) {\n\t\t\t\t\t\tnode = jQuery.clone( node, true, true );\n\n\t\t\t\t\t\t// Keep references to cloned scripts for later restoration\n\t\t\t\t\t\tif ( hasScripts ) {\n\t\t\t\t\t\t\tjQuery.merge( scripts, getAll( node, \"script\" ) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tcallback.call( this[i], node, i );\n\t\t\t\t}\n\n\t\t\t\tif ( hasScripts ) {\n\t\t\t\t\tdoc = scripts[ scripts.length - 1 ].ownerDocument;\n\n\t\t\t\t\t// Reenable scripts\n\t\t\t\t\tjQuery.map( scripts, restoreScript );\n\n\t\t\t\t\t// Evaluate executable scripts on first document insertion\n\t\t\t\t\tfor ( i = 0; i < hasScripts; i++ ) {\n\t\t\t\t\t\tnode = scripts[ i ];\n\t\t\t\t\t\tif ( rscriptType.test( node.type || \"\" ) &&\n\t\t\t\t\t\t\t!jQuery._data( node, \"globalEval\" ) && jQuery.contains( doc, node ) ) {\n\n\t\t\t\t\t\t\tif ( node.src ) {\n\t\t\t\t\t\t\t\t// Hope ajax is available...\n\t\t\t\t\t\t\t\tjQuery._evalUrl( node.src );\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tjQuery.globalEval( ( node.text || node.textContent || node.innerHTML || \"\" ).replace( rcleanScript, \"\" ) );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Fix #11809: Avoid leaking memory\n\t\t\t\tfragment = first = null;\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t}\n});\n\n// Support: IE<8\n// Manipulating tables requires a tbody\nfunction manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType === 1 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}\n\n// Replace/restore the type attribute of script elements for safe DOM manipulation\nfunction disableScript( elem ) {\n\telem.type = (jQuery.find.attr( elem, \"type\" ) !== null) + \"/\" + elem.type;\n\treturn elem;\n}\nfunction restoreScript( elem ) {\n\tvar match = rscriptTypeMasked.exec( elem.type );\n\tif ( match ) {\n\t\telem.type = match[1];\n\t} else {\n\t\telem.removeAttribute(\"type\");\n\t}\n\treturn elem;\n}\n\n// Mark scripts as having already been evaluated\nfunction setGlobalEval( elems, refElements ) {\n\tvar elem,\n\t\ti = 0;\n\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n\t}\n}\n\nfunction cloneCopyEvent( src, dest ) {\n\n\tif ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) {\n\t\treturn;\n\t}\n\n\tvar type, i, l,\n\t\toldData = jQuery._data( src ),\n\t\tcurData = jQuery._data( dest, oldData ),\n\t\tevents = oldData.events;\n\n\tif ( events ) {\n\t\tdelete curData.handle;\n\t\tcurData.events = {};\n\n\t\tfor ( type in events ) {\n\t\t\tfor ( i = 0, l = events[ type ].length; i < l; i++ ) {\n\t\t\t\tjQuery.event.add( dest, type, events[ type ][ i ] );\n\t\t\t}\n\t\t}\n\t}\n\n\t// make the cloned public data object a copy from the original\n\tif ( curData.data ) {\n\t\tcurData.data = jQuery.extend( {}, curData.data );\n\t}\n}\n\nfunction fixCloneNodeIssues( src, dest ) {\n\tvar nodeName, e, data;\n\n\t// We do not need to do anything for non-Elements\n\tif ( dest.nodeType !== 1 ) {\n\t\treturn;\n\t}\n\n\tnodeName = dest.nodeName.toLowerCase();\n\n\t// IE6-8 copies events bound via attachEvent when using cloneNode.\n\tif ( !jQuery.support.noCloneEvent && dest[ jQuery.expando ] ) {\n\t\tdata = jQuery._data( dest );\n\n\t\tfor ( e in data.events ) {\n\t\t\tjQuery.removeEvent( dest, e, data.handle );\n\t\t}\n\n\t\t// Event data gets referenced instead of copied if the expando gets copied too\n\t\tdest.removeAttribute( jQuery.expando );\n\t}\n\n\t// IE blanks contents when cloning scripts, and tries to evaluate newly-set text\n\tif ( nodeName === \"script\" && dest.text !== src.text ) {\n\t\tdisableScript( dest ).text = src.text;\n\t\trestoreScript( dest );\n\n\t// IE6-10 improperly clones children of object elements using classid.\n\t// IE10 throws NoModificationAllowedError if parent is null, #12132.\n\t} else if ( nodeName === \"object\" ) {\n\t\tif ( dest.parentNode ) {\n\t\t\tdest.outerHTML = src.outerHTML;\n\t\t}\n\n\t\t// This path appears unavoidable for IE9. When cloning an object\n\t\t// element in IE9, the outerHTML strategy above is not sufficient.\n\t\t// If the src has innerHTML and the destination does not,\n\t\t// copy the src.innerHTML into the dest.innerHTML. #10324\n\t\tif ( jQuery.support.html5Clone && ( src.innerHTML && !jQuery.trim(dest.innerHTML) ) ) {\n\t\t\tdest.innerHTML = src.innerHTML;\n\t\t}\n\n\t} else if ( nodeName === \"input\" && manipulation_rcheckableType.test( src.type ) ) {\n\t\t// IE6-8 fails to persist the checked state of a cloned checkbox\n\t\t// or radio button. Worse, IE6-7 fail to give the cloned element\n\t\t// a checked appearance if the defaultChecked value isn't also set\n\n\t\tdest.defaultChecked = dest.checked = src.checked;\n\n\t\t// IE6-7 get confused and end up setting the value of a cloned\n\t\t// checkbox/radio button to an empty string instead of \"on\"\n\t\tif ( dest.value !== src.value ) {\n\t\t\tdest.value = src.value;\n\t\t}\n\n\t// IE6-8 fails to return the selected option to the default selected\n\t// state when cloning options\n\t} else if ( nodeName === \"option\" ) {\n\t\tdest.defaultSelected = dest.selected = src.defaultSelected;\n\n\t// IE6-8 fails to set the defaultValue to the correct value when\n\t// cloning other types of input fields\n\t} else if ( nodeName === \"input\" || nodeName === \"textarea\" ) {\n\t\tdest.defaultValue = src.defaultValue;\n\t}\n}\n\njQuery.each({\n\tappendTo: \"append\",\n\tprependTo: \"prepend\",\n\tinsertBefore: \"before\",\n\tinsertAfter: \"after\",\n\treplaceAll: \"replaceWith\"\n}, function( name, original ) {\n\tjQuery.fn[ name ] = function( selector ) {\n\t\tvar elems,\n\t\t\ti = 0,\n\t\t\tret = [],\n\t\t\tinsert = jQuery( selector ),\n\t\t\tlast = insert.length - 1;\n\n\t\tfor ( ; i <= last; i++ ) {\n\t\t\telems = i === last ? this : this.clone(true);\n\t\t\tjQuery( insert[i] )[ original ]( elems );\n\n\t\t\t// Modern browsers can apply jQuery collections as arrays, but oldIE needs a .get()\n\t\t\tcore_push.apply( ret, elems.get() );\n\t\t}\n\n\t\treturn this.pushStack( ret );\n\t};\n});\n\nfunction getAll( context, tag ) {\n\tvar elems, elem,\n\t\ti = 0,\n\t\tfound = typeof context.getElementsByTagName !== core_strundefined ? context.getElementsByTagName( tag || \"*\" ) :\n\t\t\ttypeof context.querySelectorAll !== core_strundefined ? context.querySelectorAll( tag || \"*\" ) :\n\t\t\tundefined;\n\n\tif ( !found ) {\n\t\tfor ( found = [], elems = context.childNodes || context; (elem = elems[i]) != null; i++ ) {\n\t\t\tif ( !tag || jQuery.nodeName( elem, tag ) ) {\n\t\t\t\tfound.push( elem );\n\t\t\t} else {\n\t\t\t\tjQuery.merge( found, getAll( elem, tag ) );\n\t\t\t}\n\t\t}\n\t}\n\n\treturn tag === undefined || tag && jQuery.nodeName( context, tag ) ?\n\t\tjQuery.merge( [ context ], found ) :\n\t\tfound;\n}\n\n// Used in buildFragment, fixes the defaultChecked property\nfunction fixDefaultChecked( elem ) {\n\tif ( manipulation_rcheckableType.test( elem.type ) ) {\n\t\telem.defaultChecked = elem.checked;\n\t}\n}\n\njQuery.extend({\n\tclone: function( elem, dataAndEvents, deepDataAndEvents ) {\n\t\tvar destElements, node, clone, i, srcElements,\n\t\t\tinPage = jQuery.contains( elem.ownerDocument, elem );\n\n\t\tif ( jQuery.support.html5Clone || jQuery.isXMLDoc(elem) || !rnoshimcache.test( \"<\" + elem.nodeName + \">\" ) ) {\n\t\t\tclone = elem.cloneNode( true );\n\n\t\t// IE<=8 does not properly clone detached, unknown element nodes\n\t\t} else {\n\t\t\tfragmentDiv.innerHTML = elem.outerHTML;\n\t\t\tfragmentDiv.removeChild( clone = fragmentDiv.firstChild );\n\t\t}\n\n\t\tif ( (!jQuery.support.noCloneEvent || !jQuery.support.noCloneChecked) &&\n\t\t\t\t(elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem) ) {\n\n\t\t\t// We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2\n\t\t\tdestElements = getAll( clone );\n\t\t\tsrcElements = getAll( elem );\n\n\t\t\t// Fix all IE cloning issues\n\t\t\tfor ( i = 0; (node = srcElements[i]) != null; ++i ) {\n\t\t\t\t// Ensure that the destination node is not null; Fixes #9587\n\t\t\t\tif ( destElements[i] ) {\n\t\t\t\t\tfixCloneNodeIssues( node, destElements[i] );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Copy the events from the original to the clone\n\t\tif ( dataAndEvents ) {\n\t\t\tif ( deepDataAndEvents ) {\n\t\t\t\tsrcElements = srcElements || getAll( elem );\n\t\t\t\tdestElements = destElements || getAll( clone );\n\n\t\t\t\tfor ( i = 0; (node = srcElements[i]) != null; i++ ) {\n\t\t\t\t\tcloneCopyEvent( node, destElements[i] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tcloneCopyEvent( elem, clone );\n\t\t\t}\n\t\t}\n\n\t\t// Preserve script evaluation history\n\t\tdestElements = getAll( clone, \"script\" );\n\t\tif ( destElements.length > 0 ) {\n\t\t\tsetGlobalEval( destElements, !inPage && getAll( elem, \"script\" ) );\n\t\t}\n\n\t\tdestElements = srcElements = node = null;\n\n\t\t// Return the cloned set\n\t\treturn clone;\n\t},\n\n\tbuildFragment: function( elems, context, scripts, selection ) {\n\t\tvar j, elem, contains,\n\t\t\ttmp, tag, tbody, wrap,\n\t\t\tl = elems.length,\n\n\t\t\t// Ensure a safe fragment\n\t\t\tsafe = createSafeFragment( context ),\n\n\t\t\tnodes = [],\n\t\t\ti = 0;\n\n\t\tfor ( ; i < l; i++ ) {\n\t\t\telem = elems[ i ];\n\n\t\t\tif ( elem || elem === 0 ) {\n\n\t\t\t\t// Add nodes directly\n\t\t\t\tif ( jQuery.type( elem ) === \"object\" ) {\n\t\t\t\t\tjQuery.merge( nodes, elem.nodeType ? [ elem ] : elem );\n\n\t\t\t\t// Convert non-html into a text node\n\t\t\t\t} else if ( !rhtml.test( elem ) ) {\n\t\t\t\t\tnodes.push( context.createTextNode( elem ) );\n\n\t\t\t\t// Convert html into DOM nodes\n\t\t\t\t} else {\n\t\t\t\t\ttmp = tmp || safe.appendChild( context.createElement(\"div\") );\n\n\t\t\t\t\t// Deserialize a standard representation\n\t\t\t\t\ttag = ( rtagName.exec( elem ) || [\"\", \"\"] )[1].toLowerCase();\n\t\t\t\t\twrap = wrapMap[ tag ] || wrapMap._default;\n\n\t\t\t\t\ttmp.innerHTML = wrap[1] + elem.replace( rxhtmlTag, \"<$1></$2>\" ) + wrap[2];\n\n\t\t\t\t\t// Descend through wrappers to the right content\n\t\t\t\t\tj = wrap[0];\n\t\t\t\t\twhile ( j-- ) {\n\t\t\t\t\t\ttmp = tmp.lastChild;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Manually add leading whitespace removed by IE\n\t\t\t\t\tif ( !jQuery.support.leadingWhitespace && rleadingWhitespace.test( elem ) ) {\n\t\t\t\t\t\tnodes.push( context.createTextNode( rleadingWhitespace.exec( elem )[0] ) );\n\t\t\t\t\t}\n\n\t\t\t\t\t// Remove IE's autoinserted <tbody> from table fragments\n\t\t\t\t\tif ( !jQuery.support.tbody ) {\n\n\t\t\t\t\t\t// String was a <table>, *may* have spurious <tbody>\n\t\t\t\t\t\telem = tag === \"table\" && !rtbody.test( elem ) ?\n\t\t\t\t\t\t\ttmp.firstChild :\n\n\t\t\t\t\t\t\t// String was a bare <thead> or <tfoot>\n\t\t\t\t\t\t\twrap[1] === \"<table>\" && !rtbody.test( elem ) ?\n\t\t\t\t\t\t\t\ttmp :\n\t\t\t\t\t\t\t\t0;\n\n\t\t\t\t\t\tj = elem && elem.childNodes.length;\n\t\t\t\t\t\twhile ( j-- ) {\n\t\t\t\t\t\t\tif ( jQuery.nodeName( (tbody = elem.childNodes[j]), \"tbody\" ) && !tbody.childNodes.length ) {\n\t\t\t\t\t\t\t\telem.removeChild( tbody );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tjQuery.merge( nodes, tmp.childNodes );\n\n\t\t\t\t\t// Fix #12392 for WebKit and IE > 9\n\t\t\t\t\ttmp.textContent = \"\";\n\n\t\t\t\t\t// Fix #12392 for oldIE\n\t\t\t\t\twhile ( tmp.firstChild ) {\n\t\t\t\t\t\ttmp.removeChild( tmp.firstChild );\n\t\t\t\t\t}\n\n\t\t\t\t\t// Remember the top-level container for proper cleanup\n\t\t\t\t\ttmp = safe.lastChild;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Fix #11356: Clear elements from fragment\n\t\tif ( tmp ) {\n\t\t\tsafe.removeChild( tmp );\n\t\t}\n\n\t\t// Reset defaultChecked for any radios and checkboxes\n\t\t// about to be appended to the DOM in IE 6/7 (#8060)\n\t\tif ( !jQuery.support.appendChecked ) {\n\t\t\tjQuery.grep( getAll( nodes, \"input\" ), fixDefaultChecked );\n\t\t}\n\n\t\ti = 0;\n\t\twhile ( (elem = nodes[ i++ ]) ) {\n\n\t\t\t// #4087 - If origin and destination elements are the same, and this is\n\t\t\t// that element, do not do anything\n\t\t\tif ( selection && jQuery.inArray( elem, selection ) !== -1 ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tcontains = jQuery.contains( elem.ownerDocument, elem );\n\n\t\t\t// Append to fragment\n\t\t\ttmp = getAll( safe.appendChild( elem ), \"script\" );\n\n\t\t\t// Preserve script evaluation history\n\t\t\tif ( contains ) {\n\t\t\t\tsetGlobalEval( tmp );\n\t\t\t}\n\n\t\t\t// Capture executables\n\t\t\tif ( scripts ) {\n\t\t\t\tj = 0;\n\t\t\t\twhile ( (elem = tmp[ j++ ]) ) {\n\t\t\t\t\tif ( rscriptType.test( elem.type || \"\" ) ) {\n\t\t\t\t\t\tscripts.push( elem );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\ttmp = null;\n\n\t\treturn safe;\n\t},\n\n\tcleanData: function( elems, /* internal */ acceptData ) {\n\t\tvar elem, type, id, data,\n\t\t\ti = 0,\n\t\t\tinternalKey = jQuery.expando,\n\t\t\tcache = jQuery.cache,\n\t\t\tdeleteExpando = jQuery.support.deleteExpando,\n\t\t\tspecial = jQuery.event.special;\n\n\t\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\n\t\t\tif ( acceptData || jQuery.acceptData( elem ) ) {\n\n\t\t\t\tid = elem[ internalKey ];\n\t\t\t\tdata = id && cache[ id ];\n\n\t\t\t\tif ( data ) {\n\t\t\t\t\tif ( data.events ) {\n\t\t\t\t\t\tfor ( type in data.events ) {\n\t\t\t\t\t\t\tif ( special[ type ] ) {\n\t\t\t\t\t\t\t\tjQuery.event.remove( elem, type );\n\n\t\t\t\t\t\t\t// This is a shortcut to avoid jQuery.event.remove's overhead\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tjQuery.removeEvent( elem, type, data.handle );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Remove cache only if it was not already removed by jQuery.event.remove\n\t\t\t\t\tif ( cache[ id ] ) {\n\n\t\t\t\t\t\tdelete cache[ id ];\n\n\t\t\t\t\t\t// IE does not allow us to delete expando properties from nodes,\n\t\t\t\t\t\t// nor does it have a removeAttribute function on Document nodes;\n\t\t\t\t\t\t// we must handle all of these cases\n\t\t\t\t\t\tif ( deleteExpando ) {\n\t\t\t\t\t\t\tdelete elem[ internalKey ];\n\n\t\t\t\t\t\t} else if ( typeof elem.removeAttribute !== core_strundefined ) {\n\t\t\t\t\t\t\telem.removeAttribute( internalKey );\n\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\telem[ internalKey ] = null;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tcore_deletedIds.push( id );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\n\t_evalUrl: function( url ) {\n\t\treturn jQuery.ajax({\n\t\t\turl: url,\n\t\t\ttype: \"GET\",\n\t\t\tdataType: \"script\",\n\t\t\tasync: false,\n\t\t\tglobal: false,\n\t\t\t\"throws\": true\n\t\t});\n\t}\n});\njQuery.fn.extend({\n\twrapAll: function( html ) {\n\t\tif ( jQuery.isFunction( html ) ) {\n\t\t\treturn this.each(function(i) {\n\t\t\t\tjQuery(this).wrapAll( html.call(this, i) );\n\t\t\t});\n\t\t}\n\n\t\tif ( this[0] ) {\n\t\t\t// The elements to wrap the target around\n\t\t\tvar wrap = jQuery( html, this[0].ownerDocument ).eq(0).clone(true);\n\n\t\t\tif ( this[0].parentNode ) {\n\t\t\t\twrap.insertBefore( this[0] );\n\t\t\t}\n\n\t\t\twrap.map(function() {\n\t\t\t\tvar elem = this;\n\n\t\t\t\twhile ( elem.firstChild && elem.firstChild.nodeType === 1 ) {\n\t\t\t\t\telem = elem.firstChild;\n\t\t\t\t}\n\n\t\t\t\treturn elem;\n\t\t\t}).append( this );\n\t\t}\n\n\t\treturn this;\n\t},\n\n\twrapInner: function( html ) {\n\t\tif ( jQuery.isFunction( html ) ) {\n\t\t\treturn this.each(function(i) {\n\t\t\t\tjQuery(this).wrapInner( html.call(this, i) );\n\t\t\t});\n\t\t}\n\n\t\treturn this.each(function() {\n\t\t\tvar self = jQuery( this ),\n\t\t\t\tcontents = self.contents();\n\n\t\t\tif ( contents.length ) {\n\t\t\t\tcontents.wrapAll( html );\n\n\t\t\t} else {\n\t\t\t\tself.append( html );\n\t\t\t}\n\t\t});\n\t},\n\n\twrap: function( html ) {\n\t\tvar isFunction = jQuery.isFunction( html );\n\n\t\treturn this.each(function(i) {\n\t\t\tjQuery( this ).wrapAll( isFunction ? html.call(this, i) : html );\n\t\t});\n\t},\n\n\tunwrap: function() {\n\t\treturn this.parent().each(function() {\n\t\t\tif ( !jQuery.nodeName( this, \"body\" ) ) {\n\t\t\t\tjQuery( this ).replaceWith( this.childNodes );\n\t\t\t}\n\t\t}).end();\n\t}\n});\nvar iframe, getStyles, curCSS,\n\tralpha = /alpha\\([^)]*\\)/i,\n\tropacity = /opacity\\s*=\\s*([^)]*)/,\n\trposition = /^(top|right|bottom|left)$/,\n\t// swappable if display is none or starts with table except \"table\", \"table-cell\", or \"table-caption\"\n\t// see here for display values: https://developer.mozilla.org/en-US/docs/CSS/display\n\trdisplayswap = /^(none|table(?!-c[ea]).+)/,\n\trmargin = /^margin/,\n\trnumsplit = new RegExp( \"^(\" + core_pnum + \")(.*)$\", \"i\" ),\n\trnumnonpx = new RegExp( \"^(\" + core_pnum + \")(?!px)[a-z%]+$\", \"i\" ),\n\trrelNum = new RegExp( \"^([+-])=(\" + core_pnum + \")\", \"i\" ),\n\telemdisplay = { BODY: \"block\" },\n\n\tcssShow = { position: \"absolute\", visibility: \"hidden\", display: \"block\" },\n\tcssNormalTransform = {\n\t\tletterSpacing: 0,\n\t\tfontWeight: 400\n\t},\n\n\tcssExpand = [ \"Top\", \"Right\", \"Bottom\", \"Left\" ],\n\tcssPrefixes = [ \"Webkit\", \"O\", \"Moz\", \"ms\" ];\n\n// return a css property mapped to a potentially vendor prefixed property\nfunction vendorPropName( style, name ) {\n\n\t// shortcut for names that are not vendor prefixed\n\tif ( name in style ) {\n\t\treturn name;\n\t}\n\n\t// check for vendor prefixed names\n\tvar capName = name.charAt(0).toUpperCase() + name.slice(1),\n\t\torigName = name,\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in style ) {\n\t\t\treturn name;\n\t\t}\n\t}\n\n\treturn origName;\n}\n\nfunction isHidden( elem, el ) {\n\t// isHidden might be called from jQuery#filter function;\n\t// in that case, element will be second argument\n\telem = el || elem;\n\treturn jQuery.css( elem, \"display\" ) === \"none\" || !jQuery.contains( elem.ownerDocument, elem );\n}\n\nfunction showHide( elements, show ) {\n\tvar display, elem, hidden,\n\t\tvalues = [],\n\t\tindex = 0,\n\t\tlength = elements.length;\n\n\tfor ( ; index < length; index++ ) {\n\t\telem = elements[ index ];\n\t\tif ( !elem.style ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tvalues[ index ] = jQuery._data( elem, \"olddisplay\" );\n\t\tdisplay = elem.style.display;\n\t\tif ( show ) {\n\t\t\t// Reset the inline display of this element to learn if it is\n\t\t\t// being hidden by cascaded rules or not\n\t\t\tif ( !values[ index ] && display === \"none\" ) {\n\t\t\t\telem.style.display = \"\";\n\t\t\t}\n\n\t\t\t// Set elements which have been overridden with display: none\n\t\t\t// in a stylesheet to whatever the default browser style is\n\t\t\t// for such an element\n\t\t\tif ( elem.style.display === \"\" && isHidden( elem ) ) {\n\t\t\t\tvalues[ index ] = jQuery._data( elem, \"olddisplay\", css_defaultDisplay(elem.nodeName) );\n\t\t\t}\n\t\t} else {\n\n\t\t\tif ( !values[ index ] ) {\n\t\t\t\thidden = isHidden( elem );\n\n\t\t\t\tif ( display && display !== \"none\" || !hidden ) {\n\t\t\t\t\tjQuery._data( elem, \"olddisplay\", hidden ? display : jQuery.css( elem, \"display\" ) );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Set the display of most of the elements in a second loop\n\t// to avoid the constant reflow\n\tfor ( index = 0; index < length; index++ ) {\n\t\telem = elements[ index ];\n\t\tif ( !elem.style ) {\n\t\t\tcontinue;\n\t\t}\n\t\tif ( !show || elem.style.display === \"none\" || elem.style.display === \"\" ) {\n\t\t\telem.style.display = show ? values[ index ] || \"\" : \"none\";\n\t\t}\n\t}\n\n\treturn elements;\n}\n\njQuery.fn.extend({\n\tcss: function( name, value ) {\n\t\treturn jQuery.access( this, function( elem, name, value ) {\n\t\t\tvar len, styles,\n\t\t\t\tmap = {},\n\t\t\t\ti = 0;\n\n\t\t\tif ( jQuery.isArray( name ) ) {\n\t\t\t\tstyles = getStyles( elem );\n\t\t\t\tlen = name.length;\n\n\t\t\t\tfor ( ; i < len; i++ ) {\n\t\t\t\t\tmap[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles );\n\t\t\t\t}\n\n\t\t\t\treturn map;\n\t\t\t}\n\n\t\t\treturn value !== undefined ?\n\t\t\t\tjQuery.style( elem, name, value ) :\n\t\t\t\tjQuery.css( elem, name );\n\t\t}, name, value, arguments.length > 1 );\n\t},\n\tshow: function() {\n\t\treturn showHide( this, true );\n\t},\n\thide: function() {\n\t\treturn showHide( this );\n\t},\n\ttoggle: function( state ) {\n\t\tif ( typeof state === \"boolean\" ) {\n\t\t\treturn state ? this.show() : this.hide();\n\t\t}\n\n\t\treturn this.each(function() {\n\t\t\tif ( isHidden( this ) ) {\n\t\t\t\tjQuery( this ).show();\n\t\t\t} else {\n\t\t\t\tjQuery( this ).hide();\n\t\t\t}\n\t\t});\n\t}\n});\n\njQuery.extend({\n\t// Add in style property hooks for overriding the default\n\t// behavior of getting and setting a style property\n\tcssHooks: {\n\t\topacity: {\n\t\t\tget: function( elem, computed ) {\n\t\t\t\tif ( computed ) {\n\t\t\t\t\t// We should always get a number back from opacity\n\t\t\t\t\tvar ret = curCSS( elem, \"opacity\" );\n\t\t\t\t\treturn ret === \"\" ? \"1\" : ret;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\n\t// Don't automatically add \"px\" to these possibly-unitless properties\n\tcssNumber: {\n\t\t\"columnCount\": true,\n\t\t\"fillOpacity\": true,\n\t\t\"fontWeight\": true,\n\t\t\"lineHeight\": true,\n\t\t\"opacity\": true,\n\t\t\"order\": true,\n\t\t\"orphans\": true,\n\t\t\"widows\": true,\n\t\t\"zIndex\": true,\n\t\t\"zoom\": true\n\t},\n\n\t// Add in properties whose names you wish to fix before\n\t// setting or getting the value\n\tcssProps: {\n\t\t// normalize float css property\n\t\t\"float\": jQuery.support.cssFloat ? \"cssFloat\" : \"styleFloat\"\n\t},\n\n\t// Get and set the style property on a DOM Node\n\tstyle: function( elem, name, value, extra ) {\n\t\t// Don't set styles on text and comment nodes\n\t\tif ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Make sure that we're working with the right name\n\t\tvar ret, type, hooks,\n\t\t\torigName = jQuery.camelCase( name ),\n\t\t\tstyle = elem.style;\n\n\t\tname = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( style, origName ) );\n\n\t\t// gets hook for the prefixed version\n\t\t// followed by the unprefixed version\n\t\thooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];\n\n\t\t// Check if we're setting a value\n\t\tif ( value !== undefined ) {\n\t\t\ttype = typeof value;\n\n\t\t\t// convert relative number strings (+= or -=) to relative numbers. #7345\n\t\t\tif ( type === \"string\" && (ret = rrelNum.exec( value )) ) {\n\t\t\t\tvalue = ( ret[1] + 1 ) * ret[2] + parseFloat( jQuery.css( elem, name ) );\n\t\t\t\t// Fixes bug #9237\n\t\t\t\ttype = \"number\";\n\t\t\t}\n\n\t\t\t// Make sure that NaN and null values aren't set. See: #7116\n\t\t\tif ( value == null || type === \"number\" && isNaN( value ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// If a number was passed in, add 'px' to the (except for certain CSS properties)\n\t\t\tif ( type === \"number\" && !jQuery.cssNumber[ origName ] ) {\n\t\t\t\tvalue += \"px\";\n\t\t\t}\n\n\t\t\t// Fixes #8908, it can be done more correctly by specifing setters in cssHooks,\n\t\t\t// but it would mean to define eight (for every problematic property) identical functions\n\t\t\tif ( !jQuery.support.clearCloneStyle && value === \"\" && name.indexOf(\"background\") === 0 ) {\n\t\t\t\tstyle[ name ] = \"inherit\";\n\t\t\t}\n\n\t\t\t// If a hook was provided, use that value, otherwise just set the specified value\n\t\t\tif ( !hooks || !(\"set\" in hooks) || (value = hooks.set( elem, value, extra )) !== undefined ) {\n\n\t\t\t\t// Wrapped to prevent IE from throwing errors when 'invalid' values are provided\n\t\t\t\t// Fixes bug #5509\n\t\t\t\ttry {\n\t\t\t\t\tstyle[ name ] = value;\n\t\t\t\t} catch(e) {}\n\t\t\t}\n\n\t\t} else {\n\t\t\t// If a hook was provided get the non-computed value from there\n\t\t\tif ( hooks && \"get\" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) {\n\t\t\t\treturn ret;\n\t\t\t}\n\n\t\t\t// Otherwise just get the value from the style object\n\t\t\treturn style[ name ];\n\t\t}\n\t},\n\n\tcss: function( elem, name, extra, styles ) {\n\t\tvar num, val, hooks,\n\t\t\torigName = jQuery.camelCase( name );\n\n\t\t// Make sure that we're working with the right name\n\t\tname = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( elem.style, origName ) );\n\n\t\t// gets hook for the prefixed version\n\t\t// followed by the unprefixed version\n\t\thooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];\n\n\t\t// If a hook was provided get the computed value from there\n\t\tif ( hooks && \"get\" in hooks ) {\n\t\t\tval = hooks.get( elem, true, extra );\n\t\t}\n\n\t\t// Otherwise, if a way to get the computed value exists, use that\n\t\tif ( val === undefined ) {\n\t\t\tval = curCSS( elem, name, styles );\n\t\t}\n\n\t\t//convert \"normal\" to computed value\n\t\tif ( val === \"normal\" && name in cssNormalTransform ) {\n\t\t\tval = cssNormalTransform[ name ];\n\t\t}\n\n\t\t// Return, converting to number if forced or a qualifier was provided and val looks numeric\n\t\tif ( extra === \"\" || extra ) {\n\t\t\tnum = parseFloat( val );\n\t\t\treturn extra === true || jQuery.isNumeric( num ) ? num || 0 : val;\n\t\t}\n\t\treturn val;\n\t}\n});\n\n// NOTE: we've included the \"window\" in window.getComputedStyle\n// because jsdom on node.js will break without it.\nif ( window.getComputedStyle ) {\n\tgetStyles = function( elem ) {\n\t\treturn window.getComputedStyle( elem, null );\n\t};\n\n\tcurCSS = function( elem, name, _computed ) {\n\t\tvar width, minWidth, maxWidth,\n\t\t\tcomputed = _computed || getStyles( elem ),\n\n\t\t\t// getPropertyValue is only needed for .css('filter') in IE9, see #12537\n\t\t\tret = computed ? computed.getPropertyValue( name ) || computed[ name ] : undefined,\n\t\t\tstyle = elem.style;\n\n\t\tif ( computed ) {\n\n\t\t\tif ( ret === \"\" && !jQuery.contains( elem.ownerDocument, elem ) ) {\n\t\t\t\tret = jQuery.style( elem, name );\n\t\t\t}\n\n\t\t\t// A tribute to the \"awesome hack by Dean Edwards\"\n\t\t\t// Chrome < 17 and Safari 5.0 uses \"computed value\" instead of \"used value\" for margin-right\n\t\t\t// Safari 5.1.7 (at least) returns percentage for a larger set of values, but width seems to be reliably pixels\n\t\t\t// this is against the CSSOM draft spec: http://dev.w3.org/csswg/cssom/#resolved-values\n\t\t\tif ( rnumnonpx.test( ret ) && rmargin.test( name ) ) {\n\n\t\t\t\t// Remember the original values\n\t\t\t\twidth = style.width;\n\t\t\t\tminWidth = style.minWidth;\n\t\t\t\tmaxWidth = style.maxWidth;\n\n\t\t\t\t// Put in the new values to get a computed value out\n\t\t\t\tstyle.minWidth = style.maxWidth = style.width = ret;\n\t\t\t\tret = computed.width;\n\n\t\t\t\t// Revert the changed values\n\t\t\t\tstyle.width = width;\n\t\t\t\tstyle.minWidth = minWidth;\n\t\t\t\tstyle.maxWidth = maxWidth;\n\t\t\t}\n\t\t}\n\n\t\treturn ret;\n\t};\n} else if ( document.documentElement.currentStyle ) {\n\tgetStyles = function( elem ) {\n\t\treturn elem.currentStyle;\n\t};\n\n\tcurCSS = function( elem, name, _computed ) {\n\t\tvar left, rs, rsLeft,\n\t\t\tcomputed = _computed || getStyles( elem ),\n\t\t\tret = computed ? computed[ name ] : undefined,\n\t\t\tstyle = elem.style;\n\n\t\t// Avoid setting ret to empty string here\n\t\t// so we don't default to auto\n\t\tif ( ret == null && style && style[ name ] ) {\n\t\t\tret = style[ name ];\n\t\t}\n\n\t\t// From the awesome hack by Dean Edwards\n\t\t// http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291\n\n\t\t// If we're not dealing with a regular pixel number\n\t\t// but a number that has a weird ending, we need to convert it to pixels\n\t\t// but not position css attributes, as those are proportional to the parent element instead\n\t\t// and we can't measure the parent instead because it might trigger a \"stacking dolls\" problem\n\t\tif ( rnumnonpx.test( ret ) && !rposition.test( name ) ) {\n\n\t\t\t// Remember the original values\n\t\t\tleft = style.left;\n\t\t\trs = elem.runtimeStyle;\n\t\t\trsLeft = rs && rs.left;\n\n\t\t\t// Put in the new values to get a computed value out\n\t\t\tif ( rsLeft ) {\n\t\t\t\trs.left = elem.currentStyle.left;\n\t\t\t}\n\t\t\tstyle.left = name === \"fontSize\" ? \"1em\" : ret;\n\t\t\tret = style.pixelLeft + \"px\";\n\n\t\t\t// Revert the changed values\n\t\t\tstyle.left = left;\n\t\t\tif ( rsLeft ) {\n\t\t\t\trs.left = rsLeft;\n\t\t\t}\n\t\t}\n\n\t\treturn ret === \"\" ? \"auto\" : ret;\n\t};\n}\n\nfunction setPositiveNumber( elem, value, subtract ) {\n\tvar matches = rnumsplit.exec( value );\n\treturn matches ?\n\t\t// Guard against undefined \"subtract\", e.g., when used as in cssHooks\n\t\tMath.max( 0, matches[ 1 ] - ( subtract || 0 ) ) + ( matches[ 2 ] || \"px\" ) :\n\t\tvalue;\n}\n\nfunction augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) {\n\tvar i = extra === ( isBorderBox ? \"border\" : \"content\" ) ?\n\t\t// If we already have the right measurement, avoid augmentation\n\t\t4 :\n\t\t// Otherwise initialize for horizontal or vertical properties\n\t\tname === \"width\" ? 1 : 0,\n\n\t\tval = 0;\n\n\tfor ( ; i < 4; i += 2 ) {\n\t\t// both box models exclude margin, so add it if we want it\n\t\tif ( extra === \"margin\" ) {\n\t\t\tval += jQuery.css( elem, extra + cssExpand[ i ], true, styles );\n\t\t}\n\n\t\tif ( isBorderBox ) {\n\t\t\t// border-box includes padding, so remove it if we want content\n\t\t\tif ( extra === \"content\" ) {\n\t\t\t\tval -= jQuery.css( elem, \"padding\" + cssExpand[ i ], true, styles );\n\t\t\t}\n\n\t\t\t// at this point, extra isn't border nor margin, so remove border\n\t\t\tif ( extra !== \"margin\" ) {\n\t\t\t\tval -= jQuery.css( elem, \"border\" + cssExpand[ i ] + \"Width\", true, styles );\n\t\t\t}\n\t\t} else {\n\t\t\t// at this point, extra isn't content, so add padding\n\t\t\tval += jQuery.css( elem, \"padding\" + cssExpand[ i ], true, styles );\n\n\t\t\t// at this point, extra isn't content nor padding, so add border\n\t\t\tif ( extra !== \"padding\" ) {\n\t\t\t\tval += jQuery.css( elem, \"border\" + cssExpand[ i ] + \"Width\", true, styles );\n\t\t\t}\n\t\t}\n\t}\n\n\treturn val;\n}\n\nfunction getWidthOrHeight( elem, name, extra ) {\n\n\t// Start with offset property, which is equivalent to the border-box value\n\tvar valueIsBorderBox = true,\n\t\tval = name === \"width\" ? elem.offsetWidth : elem.offsetHeight,\n\t\tstyles = getStyles( elem ),\n\t\tisBorderBox = jQuery.support.boxSizing && jQuery.css( elem, \"boxSizing\", false, styles ) === \"border-box\";\n\n\t// some non-html elements return undefined for offsetWidth, so check for null/undefined\n\t// svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285\n\t// MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668\n\tif ( val <= 0 || val == null ) {\n\t\t// Fall back to computed then uncomputed css if necessary\n\t\tval = curCSS( elem, name, styles );\n\t\tif ( val < 0 || val == null ) {\n\t\t\tval = elem.style[ name ];\n\t\t}\n\n\t\t// Computed unit is not pixels. Stop here and return.\n\t\tif ( rnumnonpx.test(val) ) {\n\t\t\treturn val;\n\t\t}\n\n\t\t// we need the check for style in case a browser which returns unreliable values\n\t\t// for getComputedStyle silently falls back to the reliable elem.style\n\t\tvalueIsBorderBox = isBorderBox && ( jQuery.support.boxSizingReliable || val === elem.style[ name ] );\n\n\t\t// Normalize \"\", auto, and prepare for extra\n\t\tval = parseFloat( val ) || 0;\n\t}\n\n\t// use the active box-sizing model to add/subtract irrelevant styles\n\treturn ( val +\n\t\taugmentWidthOrHeight(\n\t\t\telem,\n\t\t\tname,\n\t\t\textra || ( isBorderBox ? \"border\" : \"content\" ),\n\t\t\tvalueIsBorderBox,\n\t\t\tstyles\n\t\t)\n\t) + \"px\";\n}\n\n// Try to determine the default display value of an element\nfunction css_defaultDisplay( nodeName ) {\n\tvar doc = document,\n\t\tdisplay = elemdisplay[ nodeName ];\n\n\tif ( !display ) {\n\t\tdisplay = actualDisplay( nodeName, doc );\n\n\t\t// If the simple way fails, read from inside an iframe\n\t\tif ( display === \"none\" || !display ) {\n\t\t\t// Use the already-created iframe if possible\n\t\t\tiframe = ( iframe ||\n\t\t\t\tjQuery(\"<iframe frameborder='0' width='0' height='0'/>\")\n\t\t\t\t.css( \"cssText\", \"display:block !important\" )\n\t\t\t).appendTo( doc.documentElement );\n\n\t\t\t// Always write a new HTML skeleton so Webkit and Firefox don't choke on reuse\n\t\t\tdoc = ( iframe[0].contentWindow || iframe[0].contentDocument ).document;\n\t\t\tdoc.write(\"<!doctype html><html><body>\");\n\t\t\tdoc.close();\n\n\t\t\tdisplay = actualDisplay( nodeName, doc );\n\t\t\tiframe.detach();\n\t\t}\n\n\t\t// Store the correct default display\n\t\telemdisplay[ nodeName ] = display;\n\t}\n\n\treturn display;\n}\n\n// Called ONLY from within css_defaultDisplay\nfunction actualDisplay( name, doc ) {\n\tvar elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ),\n\t\tdisplay = jQuery.css( elem[0], \"display\" );\n\telem.remove();\n\treturn display;\n}\n\njQuery.each([ \"height\", \"width\" ], function( i, name ) {\n\tjQuery.cssHooks[ name ] = {\n\t\tget: function( elem, computed, extra ) {\n\t\t\tif ( computed ) {\n\t\t\t\t// certain elements can have dimension info if we invisibly show them\n\t\t\t\t// however, it must have a current display style that would benefit from this\n\t\t\t\treturn elem.offsetWidth === 0 && rdisplayswap.test( jQuery.css( elem, \"display\" ) ) ?\n\t\t\t\t\tjQuery.swap( elem, cssShow, function() {\n\t\t\t\t\t\treturn getWidthOrHeight( elem, name, extra );\n\t\t\t\t\t}) :\n\t\t\t\t\tgetWidthOrHeight( elem, name, extra );\n\t\t\t}\n\t\t},\n\n\t\tset: function( elem, value, extra ) {\n\t\t\tvar styles = extra && getStyles( elem );\n\t\t\treturn setPositiveNumber( elem, value, extra ?\n\t\t\t\taugmentWidthOrHeight(\n\t\t\t\t\telem,\n\t\t\t\t\tname,\n\t\t\t\t\textra,\n\t\t\t\t\tjQuery.support.boxSizing && jQuery.css( elem, \"boxSizing\", false, styles ) === \"border-box\",\n\t\t\t\t\tstyles\n\t\t\t\t) : 0\n\t\t\t);\n\t\t}\n\t};\n});\n\nif ( !jQuery.support.opacity ) {\n\tjQuery.cssHooks.opacity = {\n\t\tget: function( elem, computed ) {\n\t\t\t// IE uses filters for opacity\n\t\t\treturn ropacity.test( (computed && elem.currentStyle ? elem.currentStyle.filter : elem.style.filter) || \"\" ) ?\n\t\t\t\t( 0.01 * parseFloat( RegExp.$1 ) ) + \"\" :\n\t\t\t\tcomputed ? \"1\" : \"\";\n\t\t},\n\n\t\tset: function( elem, value ) {\n\t\t\tvar style = elem.style,\n\t\t\t\tcurrentStyle = elem.currentStyle,\n\t\t\t\topacity = jQuery.isNumeric( value ) ? \"alpha(opacity=\" + value * 100 + \")\" : \"\",\n\t\t\t\tfilter = currentStyle && currentStyle.filter || style.filter || \"\";\n\n\t\t\t// IE has trouble with opacity if it does not have layout\n\t\t\t// Force it by setting the zoom level\n\t\t\tstyle.zoom = 1;\n\n\t\t\t// if setting opacity to 1, and no other filters exist - attempt to remove filter attribute #6652\n\t\t\t// if value === \"\", then remove inline opacity #12685\n\t\t\tif ( ( value >= 1 || value === \"\" ) &&\n\t\t\t\t\tjQuery.trim( filter.replace( ralpha, \"\" ) ) === \"\" &&\n\t\t\t\t\tstyle.removeAttribute ) {\n\n\t\t\t\t// Setting style.filter to null, \"\" & \" \" still leave \"filter:\" in the cssText\n\t\t\t\t// if \"filter:\" is present at all, clearType is disabled, we want to avoid this\n\t\t\t\t// style.removeAttribute is IE Only, but so apparently is this code path...\n\t\t\t\tstyle.removeAttribute( \"filter\" );\n\n\t\t\t\t// if there is no filter style applied in a css rule or unset inline opacity, we are done\n\t\t\t\tif ( value === \"\" || currentStyle && !currentStyle.filter ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// otherwise, set new filter values\n\t\t\tstyle.filter = ralpha.test( filter ) ?\n\t\t\t\tfilter.replace( ralpha, opacity ) :\n\t\t\t\tfilter + \" \" + opacity;\n\t\t}\n\t};\n}\n\n// These hooks cannot be added until DOM ready because the support test\n// for it is not run until after DOM ready\njQuery(function() {\n\tif ( !jQuery.support.reliableMarginRight ) {\n\t\tjQuery.cssHooks.marginRight = {\n\t\t\tget: function( elem, computed ) {\n\t\t\t\tif ( computed ) {\n\t\t\t\t\t// WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right\n\t\t\t\t\t// Work around by temporarily setting element display to inline-block\n\t\t\t\t\treturn jQuery.swap( elem, { \"display\": \"inline-block\" },\n\t\t\t\t\t\tcurCSS, [ elem, \"marginRight\" ] );\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t}\n\n\t// Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084\n\t// getComputedStyle returns percent when specified for top/left/bottom/right\n\t// rather than make the css module depend on the offset module, we just check for it here\n\tif ( !jQuery.support.pixelPosition && jQuery.fn.position ) {\n\t\tjQuery.each( [ \"top\", \"left\" ], function( i, prop ) {\n\t\t\tjQuery.cssHooks[ prop ] = {\n\t\t\t\tget: function( elem, computed ) {\n\t\t\t\t\tif ( computed ) {\n\t\t\t\t\t\tcomputed = curCSS( elem, prop );\n\t\t\t\t\t\t// if curCSS returns percentage, fallback to offset\n\t\t\t\t\t\treturn rnumnonpx.test( computed ) ?\n\t\t\t\t\t\t\tjQuery( elem ).position()[ prop ] + \"px\" :\n\t\t\t\t\t\t\tcomputed;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\t\t});\n\t}\n\n});\n\nif ( jQuery.expr && jQuery.expr.filters ) {\n\tjQuery.expr.filters.hidden = function( elem ) {\n\t\t// Support: Opera <= 12.12\n\t\t// Opera reports offsetWidths and offsetHeights less than zero on some elements\n\t\treturn elem.offsetWidth <= 0 && elem.offsetHeight <= 0 ||\n\t\t\t(!jQuery.support.reliableHiddenOffsets && ((elem.style && elem.style.display) || jQuery.css( elem, \"display\" )) === \"none\");\n\t};\n\n\tjQuery.expr.filters.visible = function( elem ) {\n\t\treturn !jQuery.expr.filters.hidden( elem );\n\t};\n}\n\n// These hooks are used by animate to expand properties\njQuery.each({\n\tmargin: \"\",\n\tpadding: \"\",\n\tborder: \"Width\"\n}, function( prefix, suffix ) {\n\tjQuery.cssHooks[ prefix + suffix ] = {\n\t\texpand: function( value ) {\n\t\t\tvar i = 0,\n\t\t\t\texpanded = {},\n\n\t\t\t\t// assumes a single number if not a string\n\t\t\t\tparts = typeof value === \"string\" ? value.split(\" \") : [ value ];\n\n\t\t\tfor ( ; i < 4; i++ ) {\n\t\t\t\texpanded[ prefix + cssExpand[ i ] + suffix ] =\n\t\t\t\t\tparts[ i ] || parts[ i - 2 ] || parts[ 0 ];\n\t\t\t}\n\n\t\t\treturn expanded;\n\t\t}\n\t};\n\n\tif ( !rmargin.test( prefix ) ) {\n\t\tjQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber;\n\t}\n});\nvar r20 = /%20/g,\n\trbracket = /\\[\\]$/,\n\trCRLF = /\\r?\\n/g,\n\trsubmitterTypes = /^(?:submit|button|image|reset|file)$/i,\n\trsubmittable = /^(?:input|select|textarea|keygen)/i;\n\njQuery.fn.extend({\n\tserialize: function() {\n\t\treturn jQuery.param( this.serializeArray() );\n\t},\n\tserializeArray: function() {\n\t\treturn this.map(function(){\n\t\t\t// Can add propHook for \"elements\" to filter or add form elements\n\t\t\tvar elements = jQuery.prop( this, \"elements\" );\n\t\t\treturn elements ? jQuery.makeArray( elements ) : this;\n\t\t})\n\t\t.filter(function(){\n\t\t\tvar type = this.type;\n\t\t\t// Use .is(\":disabled\") so that fieldset[disabled] works\n\t\t\treturn this.name && !jQuery( this ).is( \":disabled\" ) &&\n\t\t\t\trsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) &&\n\t\t\t\t( this.checked || !manipulation_rcheckableType.test( type ) );\n\t\t})\n\t\t.map(function( i, elem ){\n\t\t\tvar val = jQuery( this ).val();\n\n\t\t\treturn val == null ?\n\t\t\t\tnull :\n\t\t\t\tjQuery.isArray( val ) ?\n\t\t\t\t\tjQuery.map( val, function( val ){\n\t\t\t\t\t\treturn { name: elem.name, value: val.replace( rCRLF, \"\\r\\n\" ) };\n\t\t\t\t\t}) :\n\t\t\t\t\t{ name: elem.name, value: val.replace( rCRLF, \"\\r\\n\" ) };\n\t\t}).get();\n\t}\n});\n\n//Serialize an array of form elements or a set of\n//key/values into a query string\njQuery.param = function( a, traditional ) {\n\tvar prefix,\n\t\ts = [],\n\t\tadd = function( key, value ) {\n\t\t\t// If value is a function, invoke it and return its value\n\t\t\tvalue = jQuery.isFunction( value ) ? value() : ( value == null ? \"\" : value );\n\t\t\ts[ s.length ] = encodeURIComponent( key ) + \"=\" + encodeURIComponent( value );\n\t\t};\n\n\t// Set traditional to true for jQuery <= 1.3.2 behavior.\n\tif ( traditional === undefined ) {\n\t\ttraditional = jQuery.ajaxSettings && jQuery.ajaxSettings.traditional;\n\t}\n\n\t// If an array was passed in, assume that it is an array of form elements.\n\tif ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {\n\t\t// Serialize the form elements\n\t\tjQuery.each( a, function() {\n\t\t\tadd( this.name, this.value );\n\t\t});\n\n\t} else {\n\t\t// If traditional, encode the \"old\" way (the way 1.3.2 or older\n\t\t// did it), otherwise encode params recursively.\n\t\tfor ( prefix in a ) {\n\t\t\tbuildParams( prefix, a[ prefix ], traditional, add );\n\t\t}\n\t}\n\n\t// Return the resulting serialization\n\treturn s.join( \"&\" ).replace( r20, \"+\" );\n};\n\nfunction buildParams( prefix, obj, traditional, add ) {\n\tvar name;\n\n\tif ( jQuery.isArray( obj ) ) {\n\t\t// Serialize array item.\n\t\tjQuery.each( obj, function( i, v ) {\n\t\t\tif ( traditional || rbracket.test( prefix ) ) {\n\t\t\t\t// Treat each array item as a scalar.\n\t\t\t\tadd( prefix, v );\n\n\t\t\t} else {\n\t\t\t\t// Item is non-scalar (array or object), encode its numeric index.\n\t\t\t\tbuildParams( prefix + \"[\" + ( typeof v === \"object\" ? i : \"\" ) + \"]\", v, traditional, add );\n\t\t\t}\n\t\t});\n\n\t} else if ( !traditional && jQuery.type( obj ) === \"object\" ) {\n\t\t// Serialize object item.\n\t\tfor ( name in obj ) {\n\t\t\tbuildParams( prefix + \"[\" + name + \"]\", obj[ name ], traditional, add );\n\t\t}\n\n\t} else {\n\t\t// Serialize scalar item.\n\t\tadd( prefix, obj );\n\t}\n}\njQuery.each( (\"blur focus focusin focusout load resize scroll unload click dblclick \" +\n\t\"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave \" +\n\t\"change select submit keydown keypress keyup error contextmenu\").split(\" \"), function( i, name ) {\n\n\t// Handle event binding\n\tjQuery.fn[ name ] = function( data, fn ) {\n\t\treturn arguments.length > 0 ?\n\t\t\tthis.on( name, null, data, fn ) :\n\t\t\tthis.trigger( name );\n\t};\n});\n\njQuery.fn.extend({\n\thover: function( fnOver, fnOut ) {\n\t\treturn this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );\n\t},\n\n\tbind: function( types, data, fn ) {\n\t\treturn this.on( types, null, data, fn );\n\t},\n\tunbind: function( types, fn ) {\n\t\treturn this.off( types, null, fn );\n\t},\n\n\tdelegate: function( selector, types, data, fn ) {\n\t\treturn this.on( types, selector, data, fn );\n\t},\n\tundelegate: function( selector, types, fn ) {\n\t\t// ( namespace ) or ( selector, types [, fn] )\n\t\treturn arguments.length === 1 ? this.off( selector, \"**\" ) : this.off( types, selector || \"**\", fn );\n\t}\n});\nvar\n\t// Document location\n\tajaxLocParts,\n\tajaxLocation,\n\tajax_nonce = jQuery.now(),\n\n\tajax_rquery = /\\?/,\n\trhash = /#.*$/,\n\trts = /([?&])_=[^&]*/,\n\trheaders = /^(.*?):[ \\t]*([^\\r\\n]*)\\r?$/mg, // IE leaves an \\r character at EOL\n\t// #7653, #8125, #8152: local protocol detection\n\trlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,\n\trnoContent = /^(?:GET|HEAD)$/,\n\trprotocol = /^\\/\\//,\n\trurl = /^([\\w.+-]+:)(?:\\/\\/([^\\/?#:]*)(?::(\\d+)|)|)/,\n\n\t// Keep a copy of the old load method\n\t_load = jQuery.fn.load,\n\n\t/* Prefilters\n\t * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)\n\t * 2) These are called:\n\t *    - BEFORE asking for a transport\n\t *    - AFTER param serialization (s.data is a string if s.processData is true)\n\t * 3) key is the dataType\n\t * 4) the catchall symbol \"*\" can be used\n\t * 5) execution will start with transport dataType and THEN continue down to \"*\" if needed\n\t */\n\tprefilters = {},\n\n\t/* Transports bindings\n\t * 1) key is the dataType\n\t * 2) the catchall symbol \"*\" can be used\n\t * 3) selection will start with transport dataType and THEN go to \"*\" if needed\n\t */\n\ttransports = {},\n\n\t// Avoid comment-prolog char sequence (#10098); must appease lint and evade compression\n\tallTypes = \"*/\".concat(\"*\");\n\n// #8138, IE may throw an exception when accessing\n// a field from window.location if document.domain has been set\ntry {\n\tajaxLocation = location.href;\n} catch( e ) {\n\t// Use the href attribute of an A element\n\t// since IE will modify it given document.location\n\tajaxLocation = document.createElement( \"a\" );\n\tajaxLocation.href = \"\";\n\tajaxLocation = ajaxLocation.href;\n}\n\n// Segment location into parts\najaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || [];\n\n// Base \"constructor\" for jQuery.ajaxPrefilter and jQuery.ajaxTransport\nfunction addToPrefiltersOrTransports( structure ) {\n\n\t// dataTypeExpression is optional and defaults to \"*\"\n\treturn function( dataTypeExpression, func ) {\n\n\t\tif ( typeof dataTypeExpression !== \"string\" ) {\n\t\t\tfunc = dataTypeExpression;\n\t\t\tdataTypeExpression = \"*\";\n\t\t}\n\n\t\tvar dataType,\n\t\t\ti = 0,\n\t\t\tdataTypes = dataTypeExpression.toLowerCase().match( core_rnotwhite ) || [];\n\n\t\tif ( jQuery.isFunction( func ) ) {\n\t\t\t// For each dataType in the dataTypeExpression\n\t\t\twhile ( (dataType = dataTypes[i++]) ) {\n\t\t\t\t// Prepend if requested\n\t\t\t\tif ( dataType[0] === \"+\" ) {\n\t\t\t\t\tdataType = dataType.slice( 1 ) || \"*\";\n\t\t\t\t\t(structure[ dataType ] = structure[ dataType ] || []).unshift( func );\n\n\t\t\t\t// Otherwise append\n\t\t\t\t} else {\n\t\t\t\t\t(structure[ dataType ] = structure[ dataType ] || []).push( func );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n}\n\n// Base inspection function for prefilters and transports\nfunction inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\tvar inspected = {},\n\t\tseekingTransport = ( structure === transports );\n\n\tfunction inspect( dataType ) {\n\t\tvar selected;\n\t\tinspected[ dataType ] = true;\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\tif( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\treturn false;\n\t\t\t} else if ( seekingTransport ) {\n\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t}\n\t\t});\n\t\treturn selected;\n\t}\n\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}\n\n// A special extend for ajax options\n// that takes \"flat\" options (not to be deep extended)\n// Fixes #9887\nfunction ajaxExtend( target, src ) {\n\tvar deep, key,\n\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n\tfor ( key in src ) {\n\t\tif ( src[ key ] !== undefined ) {\n\t\t\t( flatOptions[ key ] ? target : ( deep || (deep = {}) ) )[ key ] = src[ key ];\n\t\t}\n\t}\n\tif ( deep ) {\n\t\tjQuery.extend( true, target, deep );\n\t}\n\n\treturn target;\n}\n\njQuery.fn.load = function( url, params, callback ) {\n\tif ( typeof url !== \"string\" && _load ) {\n\t\treturn _load.apply( this, arguments );\n\t}\n\n\tvar selector, response, type,\n\t\tself = this,\n\t\toff = url.indexOf(\" \");\n\n\tif ( off >= 0 ) {\n\t\tselector = url.slice( off, url.length );\n\t\turl = url.slice( 0, off );\n\t}\n\n\t// If it's a function\n\tif ( jQuery.isFunction( params ) ) {\n\n\t\t// We assume that it's the callback\n\t\tcallback = params;\n\t\tparams = undefined;\n\n\t// Otherwise, build a param string\n\t} else if ( params && typeof params === \"object\" ) {\n\t\ttype = \"POST\";\n\t}\n\n\t// If we have elements to modify, make the request\n\tif ( self.length > 0 ) {\n\t\tjQuery.ajax({\n\t\t\turl: url,\n\n\t\t\t// if \"type\" variable is undefined, then \"GET\" method will be used\n\t\t\ttype: type,\n\t\t\tdataType: \"html\",\n\t\t\tdata: params\n\t\t}).done(function( responseText ) {\n\n\t\t\t// Save response for use in complete callback\n\t\t\tresponse = arguments;\n\n\t\t\tself.html( selector ?\n\n\t\t\t\t// If a selector was specified, locate the right elements in a dummy div\n\t\t\t\t// Exclude scripts to avoid IE 'Permission Denied' errors\n\t\t\t\tjQuery(\"<div>\").append( jQuery.parseHTML( responseText ) ).find( selector ) :\n\n\t\t\t\t// Otherwise use the full result\n\t\t\t\tresponseText );\n\n\t\t}).complete( callback && function( jqXHR, status ) {\n\t\t\tself.each( callback, response || [ jqXHR.responseText, status, jqXHR ] );\n\t\t});\n\t}\n\n\treturn this;\n};\n\n// Attach a bunch of functions for handling common AJAX events\njQuery.each( [ \"ajaxStart\", \"ajaxStop\", \"ajaxComplete\", \"ajaxError\", \"ajaxSuccess\", \"ajaxSend\" ], function( i, type ){\n\tjQuery.fn[ type ] = function( fn ){\n\t\treturn this.on( type, fn );\n\t};\n});\n\njQuery.extend({\n\n\t// Counter for holding the number of active queries\n\tactive: 0,\n\n\t// Last-Modified header cache for next request\n\tlastModified: {},\n\tetag: {},\n\n\tajaxSettings: {\n\t\turl: ajaxLocation,\n\t\ttype: \"GET\",\n\t\tisLocal: rlocalProtocol.test( ajaxLocParts[ 1 ] ),\n\t\tglobal: true,\n\t\tprocessData: true,\n\t\tasync: true,\n\t\tcontentType: \"application/x-www-form-urlencoded; charset=UTF-8\",\n\t\t/*\n\t\ttimeout: 0,\n\t\tdata: null,\n\t\tdataType: null,\n\t\tusername: null,\n\t\tpassword: null,\n\t\tcache: null,\n\t\tthrows: false,\n\t\ttraditional: false,\n\t\theaders: {},\n\t\t*/\n\n\t\taccepts: {\n\t\t\t\"*\": allTypes,\n\t\t\ttext: \"text/plain\",\n\t\t\thtml: \"text/html\",\n\t\t\txml: \"application/xml, text/xml\",\n\t\t\tjson: \"application/json, text/javascript\"\n\t\t},\n\n\t\tcontents: {\n\t\t\txml: /xml/,\n\t\t\thtml: /html/,\n\t\t\tjson: /json/\n\t\t},\n\n\t\tresponseFields: {\n\t\t\txml: \"responseXML\",\n\t\t\ttext: \"responseText\",\n\t\t\tjson: \"responseJSON\"\n\t\t},\n\n\t\t// Data converters\n\t\t// Keys separate source (or catchall \"*\") and destination types with a single space\n\t\tconverters: {\n\n\t\t\t// Convert anything to text\n\t\t\t\"* text\": String,\n\n\t\t\t// Text to html (true = no transformation)\n\t\t\t\"text html\": true,\n\n\t\t\t// Evaluate text as a json expression\n\t\t\t\"text json\": jQuery.parseJSON,\n\n\t\t\t// Parse text as xml\n\t\t\t\"text xml\": jQuery.parseXML\n\t\t},\n\n\t\t// For options that shouldn't be deep extended:\n\t\t// you can add your own custom options here if\n\t\t// and when you create one that shouldn't be\n\t\t// deep extended (see ajaxExtend)\n\t\tflatOptions: {\n\t\t\turl: true,\n\t\t\tcontext: true\n\t\t}\n\t},\n\n\t// Creates a full fledged settings object into target\n\t// with both ajaxSettings and settings fields.\n\t// If target is omitted, writes into ajaxSettings.\n\tajaxSetup: function( target, settings ) {\n\t\treturn settings ?\n\n\t\t\t// Building a settings object\n\t\t\tajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) :\n\n\t\t\t// Extending ajaxSettings\n\t\t\tajaxExtend( jQuery.ajaxSettings, target );\n\t},\n\n\tajaxPrefilter: addToPrefiltersOrTransports( prefilters ),\n\tajaxTransport: addToPrefiltersOrTransports( transports ),\n\n\t// Main method\n\tajax: function( url, options ) {\n\n\t\t// If url is an object, simulate pre-1.5 signature\n\t\tif ( typeof url === \"object\" ) {\n\t\t\toptions = url;\n\t\t\turl = undefined;\n\t\t}\n\n\t\t// Force options to be an object\n\t\toptions = options || {};\n\n\t\tvar // Cross-domain detection vars\n\t\t\tparts,\n\t\t\t// Loop variable\n\t\t\ti,\n\t\t\t// URL without anti-cache param\n\t\t\tcacheURL,\n\t\t\t// Response headers as string\n\t\t\tresponseHeadersString,\n\t\t\t// timeout handle\n\t\t\ttimeoutTimer,\n\n\t\t\t// To know if global events are to be dispatched\n\t\t\tfireGlobals,\n\n\t\t\ttransport,\n\t\t\t// Response headers\n\t\t\tresponseHeaders,\n\t\t\t// Create the final options object\n\t\t\ts = jQuery.ajaxSetup( {}, options ),\n\t\t\t// Callbacks context\n\t\t\tcallbackContext = s.context || s,\n\t\t\t// Context for global events is callbackContext if it is a DOM node or jQuery collection\n\t\t\tglobalEventContext = s.context && ( callbackContext.nodeType || callbackContext.jquery ) ?\n\t\t\t\tjQuery( callbackContext ) :\n\t\t\t\tjQuery.event,\n\t\t\t// Deferreds\n\t\t\tdeferred = jQuery.Deferred(),\n\t\t\tcompleteDeferred = jQuery.Callbacks(\"once memory\"),\n\t\t\t// Status-dependent callbacks\n\t\t\tstatusCode = s.statusCode || {},\n\t\t\t// Headers (they are sent all at once)\n\t\t\trequestHeaders = {},\n\t\t\trequestHeadersNames = {},\n\t\t\t// The jqXHR state\n\t\t\tstate = 0,\n\t\t\t// Default abort message\n\t\t\tstrAbort = \"canceled\",\n\t\t\t// Fake xhr\n\t\t\tjqXHR = {\n\t\t\t\treadyState: 0,\n\n\t\t\t\t// Builds headers hashtable if needed\n\t\t\t\tgetResponseHeader: function( key ) {\n\t\t\t\t\tvar match;\n\t\t\t\t\tif ( state === 2 ) {\n\t\t\t\t\t\tif ( !responseHeaders ) {\n\t\t\t\t\t\t\tresponseHeaders = {};\n\t\t\t\t\t\t\twhile ( (match = rheaders.exec( responseHeadersString )) ) {\n\t\t\t\t\t\t\t\tresponseHeaders[ match[1].toLowerCase() ] = match[ 2 ];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tmatch = responseHeaders[ key.toLowerCase() ];\n\t\t\t\t\t}\n\t\t\t\t\treturn match == null ? null : match;\n\t\t\t\t},\n\n\t\t\t\t// Raw string\n\t\t\t\tgetAllResponseHeaders: function() {\n\t\t\t\t\treturn state === 2 ? responseHeadersString : null;\n\t\t\t\t},\n\n\t\t\t\t// Caches the header\n\t\t\t\tsetRequestHeader: function( name, value ) {\n\t\t\t\t\tvar lname = name.toLowerCase();\n\t\t\t\t\tif ( !state ) {\n\t\t\t\t\t\tname = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name;\n\t\t\t\t\t\trequestHeaders[ name ] = value;\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\n\t\t\t\t// Overrides response content-type header\n\t\t\t\toverrideMimeType: function( type ) {\n\t\t\t\t\tif ( !state ) {\n\t\t\t\t\t\ts.mimeType = type;\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\n\t\t\t\t// Status-dependent callbacks\n\t\t\t\tstatusCode: function( map ) {\n\t\t\t\t\tvar code;\n\t\t\t\t\tif ( map ) {\n\t\t\t\t\t\tif ( state < 2 ) {\n\t\t\t\t\t\t\tfor ( code in map ) {\n\t\t\t\t\t\t\t\t// Lazy-add the new callback in a way that preserves old ones\n\t\t\t\t\t\t\t\tstatusCode[ code ] = [ statusCode[ code ], map[ code ] ];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// Execute the appropriate callbacks\n\t\t\t\t\t\t\tjqXHR.always( map[ jqXHR.status ] );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\n\t\t\t\t// Cancel the request\n\t\t\t\tabort: function( statusText ) {\n\t\t\t\t\tvar finalText = statusText || strAbort;\n\t\t\t\t\tif ( transport ) {\n\t\t\t\t\t\ttransport.abort( finalText );\n\t\t\t\t\t}\n\t\t\t\t\tdone( 0, finalText );\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\t\t\t};\n\n\t\t// Attach deferreds\n\t\tdeferred.promise( jqXHR ).complete = completeDeferred.add;\n\t\tjqXHR.success = jqXHR.done;\n\t\tjqXHR.error = jqXHR.fail;\n\n\t\t// Remove hash character (#7531: and string promotion)\n\t\t// Add protocol if not provided (#5866: IE7 issue with protocol-less urls)\n\t\t// Handle falsy url in the settings object (#10093: consistency with old signature)\n\t\t// We also use the url parameter if available\n\t\ts.url = ( ( url || s.url || ajaxLocation ) + \"\" ).replace( rhash, \"\" ).replace( rprotocol, ajaxLocParts[ 1 ] + \"//\" );\n\n\t\t// Alias method option to type as per ticket #12004\n\t\ts.type = options.method || options.type || s.method || s.type;\n\n\t\t// Extract dataTypes list\n\t\ts.dataTypes = jQuery.trim( s.dataType || \"*\" ).toLowerCase().match( core_rnotwhite ) || [\"\"];\n\n\t\t// A cross-domain request is in order when we have a protocol:host:port mismatch\n\t\tif ( s.crossDomain == null ) {\n\t\t\tparts = rurl.exec( s.url.toLowerCase() );\n\t\t\ts.crossDomain = !!( parts &&\n\t\t\t\t( parts[ 1 ] !== ajaxLocParts[ 1 ] || parts[ 2 ] !== ajaxLocParts[ 2 ] ||\n\t\t\t\t\t( parts[ 3 ] || ( parts[ 1 ] === \"http:\" ? \"80\" : \"443\" ) ) !==\n\t\t\t\t\t\t( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === \"http:\" ? \"80\" : \"443\" ) ) )\n\t\t\t);\n\t\t}\n\n\t\t// Convert data if not already a string\n\t\tif ( s.data && s.processData && typeof s.data !== \"string\" ) {\n\t\t\ts.data = jQuery.param( s.data, s.traditional );\n\t\t}\n\n\t\t// Apply prefilters\n\t\tinspectPrefiltersOrTransports( prefilters, s, options, jqXHR );\n\n\t\t// If request was aborted inside a prefilter, stop there\n\t\tif ( state === 2 ) {\n\t\t\treturn jqXHR;\n\t\t}\n\n\t\t// We can fire global events as of now if asked to\n\t\tfireGlobals = s.global;\n\n\t\t// Watch for a new set of requests\n\t\tif ( fireGlobals && jQuery.active++ === 0 ) {\n\t\t\tjQuery.event.trigger(\"ajaxStart\");\n\t\t}\n\n\t\t// Uppercase the type\n\t\ts.type = s.type.toUpperCase();\n\n\t\t// Determine if request has content\n\t\ts.hasContent = !rnoContent.test( s.type );\n\n\t\t// Save the URL in case we're toying with the If-Modified-Since\n\t\t// and/or If-None-Match header later on\n\t\tcacheURL = s.url;\n\n\t\t// More options handling for requests with no content\n\t\tif ( !s.hasContent ) {\n\n\t\t\t// If data is available, append data to url\n\t\t\tif ( s.data ) {\n\t\t\t\tcacheURL = ( s.url += ( ajax_rquery.test( cacheURL ) ? \"&\" : \"?\" ) + s.data );\n\t\t\t\t// #9682: remove data so that it's not used in an eventual retry\n\t\t\t\tdelete s.data;\n\t\t\t}\n\n\t\t\t// Add anti-cache in url if needed\n\t\t\tif ( s.cache === false ) {\n\t\t\t\ts.url = rts.test( cacheURL ) ?\n\n\t\t\t\t\t// If there is already a '_' parameter, set its value\n\t\t\t\t\tcacheURL.replace( rts, \"$1_=\" + ajax_nonce++ ) :\n\n\t\t\t\t\t// Otherwise add one to the end\n\t\t\t\t\tcacheURL + ( ajax_rquery.test( cacheURL ) ? \"&\" : \"?\" ) + \"_=\" + ajax_nonce++;\n\t\t\t}\n\t\t}\n\n\t\t// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.\n\t\tif ( s.ifModified ) {\n\t\t\tif ( jQuery.lastModified[ cacheURL ] ) {\n\t\t\t\tjqXHR.setRequestHeader( \"If-Modified-Since\", jQuery.lastModified[ cacheURL ] );\n\t\t\t}\n\t\t\tif ( jQuery.etag[ cacheURL ] ) {\n\t\t\t\tjqXHR.setRequestHeader( \"If-None-Match\", jQuery.etag[ cacheURL ] );\n\t\t\t}\n\t\t}\n\n\t\t// Set the correct header, if data is being sent\n\t\tif ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {\n\t\t\tjqXHR.setRequestHeader( \"Content-Type\", s.contentType );\n\t\t}\n\n\t\t// Set the Accepts header for the server, depending on the dataType\n\t\tjqXHR.setRequestHeader(\n\t\t\t\"Accept\",\n\t\t\ts.dataTypes[ 0 ] && s.accepts[ s.dataTypes[0] ] ?\n\t\t\t\ts.accepts[ s.dataTypes[0] ] + ( s.dataTypes[ 0 ] !== \"*\" ? \", \" + allTypes + \"; q=0.01\" : \"\" ) :\n\t\t\t\ts.accepts[ \"*\" ]\n\t\t);\n\n\t\t// Check for headers option\n\t\tfor ( i in s.headers ) {\n\t\t\tjqXHR.setRequestHeader( i, s.headers[ i ] );\n\t\t}\n\n\t\t// Allow custom headers/mimetypes and early abort\n\t\tif ( s.beforeSend && ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) {\n\t\t\t// Abort if not done already and return\n\t\t\treturn jqXHR.abort();\n\t\t}\n\n\t\t// aborting is no longer a cancellation\n\t\tstrAbort = \"abort\";\n\n\t\t// Install callbacks on deferreds\n\t\tfor ( i in { success: 1, error: 1, complete: 1 } ) {\n\t\t\tjqXHR[ i ]( s[ i ] );\n\t\t}\n\n\t\t// Get transport\n\t\ttransport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );\n\n\t\t// If no transport, we auto-abort\n\t\tif ( !transport ) {\n\t\t\tdone( -1, \"No Transport\" );\n\t\t} else {\n\t\t\tjqXHR.readyState = 1;\n\n\t\t\t// Send global event\n\t\t\tif ( fireGlobals ) {\n\t\t\t\tglobalEventContext.trigger( \"ajaxSend\", [ jqXHR, s ] );\n\t\t\t}\n\t\t\t// Timeout\n\t\t\tif ( s.async && s.timeout > 0 ) {\n\t\t\t\ttimeoutTimer = setTimeout(function() {\n\t\t\t\t\tjqXHR.abort(\"timeout\");\n\t\t\t\t}, s.timeout );\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\tstate = 1;\n\t\t\t\ttransport.send( requestHeaders, done );\n\t\t\t} catch ( e ) {\n\t\t\t\t// Propagate exception as error if not done\n\t\t\t\tif ( state < 2 ) {\n\t\t\t\t\tdone( -1, e );\n\t\t\t\t// Simply rethrow otherwise\n\t\t\t\t} else {\n\t\t\t\t\tthrow e;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Callback for when everything is done\n\t\tfunction done( status, nativeStatusText, responses, headers ) {\n\t\t\tvar isSuccess, success, error, response, modified,\n\t\t\t\tstatusText = nativeStatusText;\n\n\t\t\t// Called once\n\t\t\tif ( state === 2 ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// State is \"done\" now\n\t\t\tstate = 2;\n\n\t\t\t// Clear timeout if it exists\n\t\t\tif ( timeoutTimer ) {\n\t\t\t\tclearTimeout( timeoutTimer );\n\t\t\t}\n\n\t\t\t// Dereference transport for early garbage collection\n\t\t\t// (no matter how long the jqXHR object will be used)\n\t\t\ttransport = undefined;\n\n\t\t\t// Cache response headers\n\t\t\tresponseHeadersString = headers || \"\";\n\n\t\t\t// Set readyState\n\t\t\tjqXHR.readyState = status > 0 ? 4 : 0;\n\n\t\t\t// Determine if successful\n\t\t\tisSuccess = status >= 200 && status < 300 || status === 304;\n\n\t\t\t// Get response data\n\t\t\tif ( responses ) {\n\t\t\t\tresponse = ajaxHandleResponses( s, jqXHR, responses );\n\t\t\t}\n\n\t\t\t// Convert no matter what (that way responseXXX fields are always set)\n\t\t\tresponse = ajaxConvert( s, response, jqXHR, isSuccess );\n\n\t\t\t// If successful, handle type chaining\n\t\t\tif ( isSuccess ) {\n\n\t\t\t\t// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.\n\t\t\t\tif ( s.ifModified ) {\n\t\t\t\t\tmodified = jqXHR.getResponseHeader(\"Last-Modified\");\n\t\t\t\t\tif ( modified ) {\n\t\t\t\t\t\tjQuery.lastModified[ cacheURL ] = modified;\n\t\t\t\t\t}\n\t\t\t\t\tmodified = jqXHR.getResponseHeader(\"etag\");\n\t\t\t\t\tif ( modified ) {\n\t\t\t\t\t\tjQuery.etag[ cacheURL ] = modified;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// if no content\n\t\t\t\tif ( status === 204 || s.type === \"HEAD\" ) {\n\t\t\t\t\tstatusText = \"nocontent\";\n\n\t\t\t\t// if not modified\n\t\t\t\t} else if ( status === 304 ) {\n\t\t\t\t\tstatusText = \"notmodified\";\n\n\t\t\t\t// If we have data, let's convert it\n\t\t\t\t} else {\n\t\t\t\t\tstatusText = response.state;\n\t\t\t\t\tsuccess = response.data;\n\t\t\t\t\terror = response.error;\n\t\t\t\t\tisSuccess = !error;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// We extract error from statusText\n\t\t\t\t// then normalize statusText and status for non-aborts\n\t\t\t\terror = statusText;\n\t\t\t\tif ( status || !statusText ) {\n\t\t\t\t\tstatusText = \"error\";\n\t\t\t\t\tif ( status < 0 ) {\n\t\t\t\t\t\tstatus = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Set data for the fake xhr object\n\t\t\tjqXHR.status = status;\n\t\t\tjqXHR.statusText = ( nativeStatusText || statusText ) + \"\";\n\n\t\t\t// Success/Error\n\t\t\tif ( isSuccess ) {\n\t\t\t\tdeferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );\n\t\t\t} else {\n\t\t\t\tdeferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );\n\t\t\t}\n\n\t\t\t// Status-dependent callbacks\n\t\t\tjqXHR.statusCode( statusCode );\n\t\t\tstatusCode = undefined;\n\n\t\t\tif ( fireGlobals ) {\n\t\t\t\tglobalEventContext.trigger( isSuccess ? \"ajaxSuccess\" : \"ajaxError\",\n\t\t\t\t\t[ jqXHR, s, isSuccess ? success : error ] );\n\t\t\t}\n\n\t\t\t// Complete\n\t\t\tcompleteDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );\n\n\t\t\tif ( fireGlobals ) {\n\t\t\t\tglobalEventContext.trigger( \"ajaxComplete\", [ jqXHR, s ] );\n\t\t\t\t// Handle the global AJAX counter\n\t\t\t\tif ( !( --jQuery.active ) ) {\n\t\t\t\t\tjQuery.event.trigger(\"ajaxStop\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn jqXHR;\n\t},\n\n\tgetJSON: function( url, data, callback ) {\n\t\treturn jQuery.get( url, data, callback, \"json\" );\n\t},\n\n\tgetScript: function( url, callback ) {\n\t\treturn jQuery.get( url, undefined, callback, \"script\" );\n\t}\n});\n\njQuery.each( [ \"get\", \"post\" ], function( i, method ) {\n\tjQuery[ method ] = function( url, data, callback, type ) {\n\t\t// shift arguments if data argument was omitted\n\t\tif ( jQuery.isFunction( data ) ) {\n\t\t\ttype = type || callback;\n\t\t\tcallback = data;\n\t\t\tdata = undefined;\n\t\t}\n\n\t\treturn jQuery.ajax({\n\t\t\turl: url,\n\t\t\ttype: method,\n\t\t\tdataType: type,\n\t\t\tdata: data,\n\t\t\tsuccess: callback\n\t\t});\n\t};\n});\n\n/* Handles responses to an ajax request:\n * - finds the right dataType (mediates between content-type and expected dataType)\n * - returns the corresponding response\n */\nfunction ajaxHandleResponses( s, jqXHR, responses ) {\n\tvar firstDataType, ct, finalDataType, type,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}\n\n/* Chain conversions given the request and the original response\n * Also sets the responseXXX fields on the jqXHR instance\n */\nfunction ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s[ \"throws\" ] ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn { state: \"success\", data: response };\n}\n// Install script dataType\njQuery.ajaxSetup({\n\taccepts: {\n\t\tscript: \"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript\"\n\t},\n\tcontents: {\n\t\tscript: /(?:java|ecma)script/\n\t},\n\tconverters: {\n\t\t\"text script\": function( text ) {\n\t\t\tjQuery.globalEval( text );\n\t\t\treturn text;\n\t\t}\n\t}\n});\n\n// Handle cache's special case and global\njQuery.ajaxPrefilter( \"script\", function( s ) {\n\tif ( s.cache === undefined ) {\n\t\ts.cache = false;\n\t}\n\tif ( s.crossDomain ) {\n\t\ts.type = \"GET\";\n\t\ts.global = false;\n\t}\n});\n\n// Bind script tag hack transport\njQuery.ajaxTransport( \"script\", function(s) {\n\n\t// This transport only deals with cross domain requests\n\tif ( s.crossDomain ) {\n\n\t\tvar script,\n\t\t\thead = document.head || jQuery(\"head\")[0] || document.documentElement;\n\n\t\treturn {\n\n\t\t\tsend: function( _, callback ) {\n\n\t\t\t\tscript = document.createElement(\"script\");\n\n\t\t\t\tscript.async = true;\n\n\t\t\t\tif ( s.scriptCharset ) {\n\t\t\t\t\tscript.charset = s.scriptCharset;\n\t\t\t\t}\n\n\t\t\t\tscript.src = s.url;\n\n\t\t\t\t// Attach handlers for all browsers\n\t\t\t\tscript.onload = script.onreadystatechange = function( _, isAbort ) {\n\n\t\t\t\t\tif ( isAbort || !script.readyState || /loaded|complete/.test( script.readyState ) ) {\n\n\t\t\t\t\t\t// Handle memory leak in IE\n\t\t\t\t\t\tscript.onload = script.onreadystatechange = null;\n\n\t\t\t\t\t\t// Remove the script\n\t\t\t\t\t\tif ( script.parentNode ) {\n\t\t\t\t\t\t\tscript.parentNode.removeChild( script );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Dereference the script\n\t\t\t\t\t\tscript = null;\n\n\t\t\t\t\t\t// Callback if not abort\n\t\t\t\t\t\tif ( !isAbort ) {\n\t\t\t\t\t\t\tcallback( 200, \"success\" );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t};\n\n\t\t\t\t// Circumvent IE6 bugs with base elements (#2709 and #4378) by prepending\n\t\t\t\t// Use native DOM manipulation to avoid our domManip AJAX trickery\n\t\t\t\thead.insertBefore( script, head.firstChild );\n\t\t\t},\n\n\t\t\tabort: function() {\n\t\t\t\tif ( script ) {\n\t\t\t\t\tscript.onload( undefined, true );\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t}\n});\nvar oldCallbacks = [],\n\trjsonp = /(=)\\?(?=&|$)|\\?\\?/;\n\n// Default jsonp settings\njQuery.ajaxSetup({\n\tjsonp: \"callback\",\n\tjsonpCallback: function() {\n\t\tvar callback = oldCallbacks.pop() || ( jQuery.expando + \"_\" + ( ajax_nonce++ ) );\n\t\tthis[ callback ] = true;\n\t\treturn callback;\n\t}\n});\n\n// Detect, normalize options and install callbacks for jsonp requests\njQuery.ajaxPrefilter( \"json jsonp\", function( s, originalSettings, jqXHR ) {\n\n\tvar callbackName, overwritten, responseContainer,\n\t\tjsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ?\n\t\t\t\"url\" :\n\t\t\ttypeof s.data === \"string\" && !( s.contentType || \"\" ).indexOf(\"application/x-www-form-urlencoded\") && rjsonp.test( s.data ) && \"data\"\n\t\t);\n\n\t// Handle iff the expected data type is \"jsonp\" or we have a parameter to set\n\tif ( jsonProp || s.dataTypes[ 0 ] === \"jsonp\" ) {\n\n\t\t// Get callback name, remembering preexisting value associated with it\n\t\tcallbackName = s.jsonpCallback = jQuery.isFunction( s.jsonpCallback ) ?\n\t\t\ts.jsonpCallback() :\n\t\t\ts.jsonpCallback;\n\n\t\t// Insert callback into url or form data\n\t\tif ( jsonProp ) {\n\t\t\ts[ jsonProp ] = s[ jsonProp ].replace( rjsonp, \"$1\" + callbackName );\n\t\t} else if ( s.jsonp !== false ) {\n\t\t\ts.url += ( ajax_rquery.test( s.url ) ? \"&\" : \"?\" ) + s.jsonp + \"=\" + callbackName;\n\t\t}\n\n\t\t// Use data converter to retrieve json after script execution\n\t\ts.converters[\"script json\"] = function() {\n\t\t\tif ( !responseContainer ) {\n\t\t\t\tjQuery.error( callbackName + \" was not called\" );\n\t\t\t}\n\t\t\treturn responseContainer[ 0 ];\n\t\t};\n\n\t\t// force json dataType\n\t\ts.dataTypes[ 0 ] = \"json\";\n\n\t\t// Install callback\n\t\toverwritten = window[ callbackName ];\n\t\twindow[ callbackName ] = function() {\n\t\t\tresponseContainer = arguments;\n\t\t};\n\n\t\t// Clean-up function (fires after converters)\n\t\tjqXHR.always(function() {\n\t\t\t// Restore preexisting value\n\t\t\twindow[ callbackName ] = overwritten;\n\n\t\t\t// Save back as free\n\t\t\tif ( s[ callbackName ] ) {\n\t\t\t\t// make sure that re-using the options doesn't screw things around\n\t\t\t\ts.jsonpCallback = originalSettings.jsonpCallback;\n\n\t\t\t\t// save the callback name for future use\n\t\t\t\toldCallbacks.push( callbackName );\n\t\t\t}\n\n\t\t\t// Call if it was a function and we have a response\n\t\t\tif ( responseContainer && jQuery.isFunction( overwritten ) ) {\n\t\t\t\toverwritten( responseContainer[ 0 ] );\n\t\t\t}\n\n\t\t\tresponseContainer = overwritten = undefined;\n\t\t});\n\n\t\t// Delegate to script\n\t\treturn \"script\";\n\t}\n});\nvar xhrCallbacks, xhrSupported,\n\txhrId = 0,\n\t// #5280: Internet Explorer will keep connections alive if we don't abort on unload\n\txhrOnUnloadAbort = window.ActiveXObject && function() {\n\t\t// Abort all pending requests\n\t\tvar key;\n\t\tfor ( key in xhrCallbacks ) {\n\t\t\txhrCallbacks[ key ]( undefined, true );\n\t\t}\n\t};\n\n// Functions to create xhrs\nfunction createStandardXHR() {\n\ttry {\n\t\treturn new window.XMLHttpRequest();\n\t} catch( e ) {}\n}\n\nfunction createActiveXHR() {\n\ttry {\n\t\treturn new window.ActiveXObject(\"Microsoft.XMLHTTP\");\n\t} catch( e ) {}\n}\n\n// Create the request object\n// (This is still attached to ajaxSettings for backward compatibility)\njQuery.ajaxSettings.xhr = window.ActiveXObject ?\n\t/* Microsoft failed to properly\n\t * implement the XMLHttpRequest in IE7 (can't request local files),\n\t * so we use the ActiveXObject when it is available\n\t * Additionally XMLHttpRequest can be disabled in IE7/IE8 so\n\t * we need a fallback.\n\t */\n\tfunction() {\n\t\treturn !this.isLocal && createStandardXHR() || createActiveXHR();\n\t} :\n\t// For all other browsers, use the standard XMLHttpRequest object\n\tcreateStandardXHR;\n\n// Determine support properties\nxhrSupported = jQuery.ajaxSettings.xhr();\njQuery.support.cors = !!xhrSupported && ( \"withCredentials\" in xhrSupported );\nxhrSupported = jQuery.support.ajax = !!xhrSupported;\n\n// Create transport if the browser can provide an xhr\nif ( xhrSupported ) {\n\n\tjQuery.ajaxTransport(function( s ) {\n\t\t// Cross domain only allowed if supported through XMLHttpRequest\n\t\tif ( !s.crossDomain || jQuery.support.cors ) {\n\n\t\t\tvar callback;\n\n\t\t\treturn {\n\t\t\t\tsend: function( headers, complete ) {\n\n\t\t\t\t\t// Get a new xhr\n\t\t\t\t\tvar handle, i,\n\t\t\t\t\t\txhr = s.xhr();\n\n\t\t\t\t\t// Open the socket\n\t\t\t\t\t// Passing null username, generates a login popup on Opera (#2865)\n\t\t\t\t\tif ( s.username ) {\n\t\t\t\t\t\txhr.open( s.type, s.url, s.async, s.username, s.password );\n\t\t\t\t\t} else {\n\t\t\t\t\t\txhr.open( s.type, s.url, s.async );\n\t\t\t\t\t}\n\n\t\t\t\t\t// Apply custom fields if provided\n\t\t\t\t\tif ( s.xhrFields ) {\n\t\t\t\t\t\tfor ( i in s.xhrFields ) {\n\t\t\t\t\t\t\txhr[ i ] = s.xhrFields[ i ];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Override mime type if needed\n\t\t\t\t\tif ( s.mimeType && xhr.overrideMimeType ) {\n\t\t\t\t\t\txhr.overrideMimeType( s.mimeType );\n\t\t\t\t\t}\n\n\t\t\t\t\t// X-Requested-With header\n\t\t\t\t\t// For cross-domain requests, seeing as conditions for a preflight are\n\t\t\t\t\t// akin to a jigsaw puzzle, we simply never set it to be sure.\n\t\t\t\t\t// (it can always be set on a per-request basis or even using ajaxSetup)\n\t\t\t\t\t// For same-domain requests, won't change header if already provided.\n\t\t\t\t\tif ( !s.crossDomain && !headers[\"X-Requested-With\"] ) {\n\t\t\t\t\t\theaders[\"X-Requested-With\"] = \"XMLHttpRequest\";\n\t\t\t\t\t}\n\n\t\t\t\t\t// Need an extra try/catch for cross domain requests in Firefox 3\n\t\t\t\t\ttry {\n\t\t\t\t\t\tfor ( i in headers ) {\n\t\t\t\t\t\t\txhr.setRequestHeader( i, headers[ i ] );\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch( err ) {}\n\n\t\t\t\t\t// Do send the request\n\t\t\t\t\t// This may raise an exception which is actually\n\t\t\t\t\t// handled in jQuery.ajax (so no try/catch here)\n\t\t\t\t\txhr.send( ( s.hasContent && s.data ) || null );\n\n\t\t\t\t\t// Listener\n\t\t\t\t\tcallback = function( _, isAbort ) {\n\t\t\t\t\t\tvar status, responseHeaders, statusText, responses;\n\n\t\t\t\t\t\t// Firefox throws exceptions when accessing properties\n\t\t\t\t\t\t// of an xhr when a network error occurred\n\t\t\t\t\t\t// http://helpful.knobs-dials.com/index.php/Component_returned_failure_code:_0x80040111_(NS_ERROR_NOT_AVAILABLE)\n\t\t\t\t\t\ttry {\n\n\t\t\t\t\t\t\t// Was never called and is aborted or complete\n\t\t\t\t\t\t\tif ( callback && ( isAbort || xhr.readyState === 4 ) ) {\n\n\t\t\t\t\t\t\t\t// Only called once\n\t\t\t\t\t\t\t\tcallback = undefined;\n\n\t\t\t\t\t\t\t\t// Do not keep as active anymore\n\t\t\t\t\t\t\t\tif ( handle ) {\n\t\t\t\t\t\t\t\t\txhr.onreadystatechange = jQuery.noop;\n\t\t\t\t\t\t\t\t\tif ( xhrOnUnloadAbort ) {\n\t\t\t\t\t\t\t\t\t\tdelete xhrCallbacks[ handle ];\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// If it's an abort\n\t\t\t\t\t\t\t\tif ( isAbort ) {\n\t\t\t\t\t\t\t\t\t// Abort it manually if needed\n\t\t\t\t\t\t\t\t\tif ( xhr.readyState !== 4 ) {\n\t\t\t\t\t\t\t\t\t\txhr.abort();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tresponses = {};\n\t\t\t\t\t\t\t\t\tstatus = xhr.status;\n\t\t\t\t\t\t\t\t\tresponseHeaders = xhr.getAllResponseHeaders();\n\n\t\t\t\t\t\t\t\t\t// When requesting binary data, IE6-9 will throw an exception\n\t\t\t\t\t\t\t\t\t// on any attempt to access responseText (#11426)\n\t\t\t\t\t\t\t\t\tif ( typeof xhr.responseText === \"string\" ) {\n\t\t\t\t\t\t\t\t\t\tresponses.text = xhr.responseText;\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t// Firefox throws an exception when accessing\n\t\t\t\t\t\t\t\t\t// statusText for faulty cross-domain requests\n\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\tstatusText = xhr.statusText;\n\t\t\t\t\t\t\t\t\t} catch( e ) {\n\t\t\t\t\t\t\t\t\t\t// We normalize with Webkit giving an empty statusText\n\t\t\t\t\t\t\t\t\t\tstatusText = \"\";\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t// Filter status for non standard behaviors\n\n\t\t\t\t\t\t\t\t\t// If the request is local and we have data: assume a success\n\t\t\t\t\t\t\t\t\t// (success with no data won't get notified, that's the best we\n\t\t\t\t\t\t\t\t\t// can do given current implementations)\n\t\t\t\t\t\t\t\t\tif ( !status && s.isLocal && !s.crossDomain ) {\n\t\t\t\t\t\t\t\t\t\tstatus = responses.text ? 200 : 404;\n\t\t\t\t\t\t\t\t\t// IE - #1450: sometimes returns 1223 when it should be 204\n\t\t\t\t\t\t\t\t\t} else if ( status === 1223 ) {\n\t\t\t\t\t\t\t\t\t\tstatus = 204;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} catch( firefoxAccessException ) {\n\t\t\t\t\t\t\tif ( !isAbort ) {\n\t\t\t\t\t\t\t\tcomplete( -1, firefoxAccessException );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Call complete if needed\n\t\t\t\t\t\tif ( responses ) {\n\t\t\t\t\t\t\tcomplete( status, statusText, responses, responseHeaders );\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\n\t\t\t\t\tif ( !s.async ) {\n\t\t\t\t\t\t// if we're in sync mode we fire the callback\n\t\t\t\t\t\tcallback();\n\t\t\t\t\t} else if ( xhr.readyState === 4 ) {\n\t\t\t\t\t\t// (IE6 & IE7) if it's in cache and has been\n\t\t\t\t\t\t// retrieved directly we need to fire the callback\n\t\t\t\t\t\tsetTimeout( callback );\n\t\t\t\t\t} else {\n\t\t\t\t\t\thandle = ++xhrId;\n\t\t\t\t\t\tif ( xhrOnUnloadAbort ) {\n\t\t\t\t\t\t\t// Create the active xhrs callbacks list if needed\n\t\t\t\t\t\t\t// and attach the unload handler\n\t\t\t\t\t\t\tif ( !xhrCallbacks ) {\n\t\t\t\t\t\t\t\txhrCallbacks = {};\n\t\t\t\t\t\t\t\tjQuery( window ).unload( xhrOnUnloadAbort );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// Add to list of active xhrs callbacks\n\t\t\t\t\t\t\txhrCallbacks[ handle ] = callback;\n\t\t\t\t\t\t}\n\t\t\t\t\t\txhr.onreadystatechange = callback;\n\t\t\t\t\t}\n\t\t\t\t},\n\n\t\t\t\tabort: function() {\n\t\t\t\t\tif ( callback ) {\n\t\t\t\t\t\tcallback( undefined, true );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t});\n}\nvar fxNow, timerId,\n\trfxtypes = /^(?:toggle|show|hide)$/,\n\trfxnum = new RegExp( \"^(?:([+-])=|)(\" + core_pnum + \")([a-z%]*)$\", \"i\" ),\n\trrun = /queueHooks$/,\n\tanimationPrefilters = [ defaultPrefilter ],\n\ttweeners = {\n\t\t\"*\": [function( prop, value ) {\n\t\t\tvar tween = this.createTween( prop, value ),\n\t\t\t\ttarget = tween.cur(),\n\t\t\t\tparts = rfxnum.exec( value ),\n\t\t\t\tunit = parts && parts[ 3 ] || ( jQuery.cssNumber[ prop ] ? \"\" : \"px\" ),\n\n\t\t\t\t// Starting value computation is required for potential unit mismatches\n\t\t\t\tstart = ( jQuery.cssNumber[ prop ] || unit !== \"px\" && +target ) &&\n\t\t\t\t\trfxnum.exec( jQuery.css( tween.elem, prop ) ),\n\t\t\t\tscale = 1,\n\t\t\t\tmaxIterations = 20;\n\n\t\t\tif ( start && start[ 3 ] !== unit ) {\n\t\t\t\t// Trust units reported by jQuery.css\n\t\t\t\tunit = unit || start[ 3 ];\n\n\t\t\t\t// Make sure we update the tween properties later on\n\t\t\t\tparts = parts || [];\n\n\t\t\t\t// Iteratively approximate from a nonzero starting point\n\t\t\t\tstart = +target || 1;\n\n\t\t\t\tdo {\n\t\t\t\t\t// If previous iteration zeroed out, double until we get *something*\n\t\t\t\t\t// Use a string for doubling factor so we don't accidentally see scale as unchanged below\n\t\t\t\t\tscale = scale || \".5\";\n\n\t\t\t\t\t// Adjust and apply\n\t\t\t\t\tstart = start / scale;\n\t\t\t\t\tjQuery.style( tween.elem, prop, start + unit );\n\n\t\t\t\t// Update scale, tolerating zero or NaN from tween.cur()\n\t\t\t\t// And breaking the loop if scale is unchanged or perfect, or if we've just had enough\n\t\t\t\t} while ( scale !== (scale = tween.cur() / target) && scale !== 1 && --maxIterations );\n\t\t\t}\n\n\t\t\t// Update tween properties\n\t\t\tif ( parts ) {\n\t\t\t\tstart = tween.start = +start || +target || 0;\n\t\t\t\ttween.unit = unit;\n\t\t\t\t// If a +=/-= token was provided, we're doing a relative animation\n\t\t\t\ttween.end = parts[ 1 ] ?\n\t\t\t\t\tstart + ( parts[ 1 ] + 1 ) * parts[ 2 ] :\n\t\t\t\t\t+parts[ 2 ];\n\t\t\t}\n\n\t\t\treturn tween;\n\t\t}]\n\t};\n\n// Animations created synchronously will run synchronously\nfunction createFxNow() {\n\tsetTimeout(function() {\n\t\tfxNow = undefined;\n\t});\n\treturn ( fxNow = jQuery.now() );\n}\n\nfunction createTween( value, prop, animation ) {\n\tvar tween,\n\t\tcollection = ( tweeners[ prop ] || [] ).concat( tweeners[ \"*\" ] ),\n\t\tindex = 0,\n\t\tlength = collection.length;\n\tfor ( ; index < length; index++ ) {\n\t\tif ( (tween = collection[ index ].call( animation, prop, value )) ) {\n\n\t\t\t// we're done with this property\n\t\t\treturn tween;\n\t\t}\n\t}\n}\n\nfunction Animation( elem, properties, options ) {\n\tvar result,\n\t\tstopped,\n\t\tindex = 0,\n\t\tlength = animationPrefilters.length,\n\t\tdeferred = jQuery.Deferred().always( function() {\n\t\t\t// don't match elem in the :animated selector\n\t\t\tdelete tick.elem;\n\t\t}),\n\t\ttick = function() {\n\t\t\tif ( stopped ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tvar currentTime = fxNow || createFxNow(),\n\t\t\t\tremaining = Math.max( 0, animation.startTime + animation.duration - currentTime ),\n\t\t\t\t// archaic crash bug won't allow us to use 1 - ( 0.5 || 0 ) (#12497)\n\t\t\t\ttemp = remaining / animation.duration || 0,\n\t\t\t\tpercent = 1 - temp,\n\t\t\t\tindex = 0,\n\t\t\t\tlength = animation.tweens.length;\n\n\t\t\tfor ( ; index < length ; index++ ) {\n\t\t\t\tanimation.tweens[ index ].run( percent );\n\t\t\t}\n\n\t\t\tdeferred.notifyWith( elem, [ animation, percent, remaining ]);\n\n\t\t\tif ( percent < 1 && length ) {\n\t\t\t\treturn remaining;\n\t\t\t} else {\n\t\t\t\tdeferred.resolveWith( elem, [ animation ] );\n\t\t\t\treturn false;\n\t\t\t}\n\t\t},\n\t\tanimation = deferred.promise({\n\t\t\telem: elem,\n\t\t\tprops: jQuery.extend( {}, properties ),\n\t\t\topts: jQuery.extend( true, { specialEasing: {} }, options ),\n\t\t\toriginalProperties: properties,\n\t\t\toriginalOptions: options,\n\t\t\tstartTime: fxNow || createFxNow(),\n\t\t\tduration: options.duration,\n\t\t\ttweens: [],\n\t\t\tcreateTween: function( prop, end ) {\n\t\t\t\tvar tween = jQuery.Tween( elem, animation.opts, prop, end,\n\t\t\t\t\t\tanimation.opts.specialEasing[ prop ] || animation.opts.easing );\n\t\t\t\tanimation.tweens.push( tween );\n\t\t\t\treturn tween;\n\t\t\t},\n\t\t\tstop: function( gotoEnd ) {\n\t\t\t\tvar index = 0,\n\t\t\t\t\t// if we are going to the end, we want to run all the tweens\n\t\t\t\t\t// otherwise we skip this part\n\t\t\t\t\tlength = gotoEnd ? animation.tweens.length : 0;\n\t\t\t\tif ( stopped ) {\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\t\t\t\tstopped = true;\n\t\t\t\tfor ( ; index < length ; index++ ) {\n\t\t\t\t\tanimation.tweens[ index ].run( 1 );\n\t\t\t\t}\n\n\t\t\t\t// resolve when we played the last frame\n\t\t\t\t// otherwise, reject\n\t\t\t\tif ( gotoEnd ) {\n\t\t\t\t\tdeferred.resolveWith( elem, [ animation, gotoEnd ] );\n\t\t\t\t} else {\n\t\t\t\t\tdeferred.rejectWith( elem, [ animation, gotoEnd ] );\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t}\n\t\t}),\n\t\tprops = animation.props;\n\n\tpropFilter( props, animation.opts.specialEasing );\n\n\tfor ( ; index < length ; index++ ) {\n\t\tresult = animationPrefilters[ index ].call( animation, elem, props, animation.opts );\n\t\tif ( result ) {\n\t\t\treturn result;\n\t\t}\n\t}\n\n\tjQuery.map( props, createTween, animation );\n\n\tif ( jQuery.isFunction( animation.opts.start ) ) {\n\t\tanimation.opts.start.call( elem, animation );\n\t}\n\n\tjQuery.fx.timer(\n\t\tjQuery.extend( tick, {\n\t\t\telem: elem,\n\t\t\tanim: animation,\n\t\t\tqueue: animation.opts.queue\n\t\t})\n\t);\n\n\t// attach callbacks from options\n\treturn animation.progress( animation.opts.progress )\n\t\t.done( animation.opts.done, animation.opts.complete )\n\t\t.fail( animation.opts.fail )\n\t\t.always( animation.opts.always );\n}\n\nfunction propFilter( props, specialEasing ) {\n\tvar index, name, easing, value, hooks;\n\n\t// camelCase, specialEasing and expand cssHook pass\n\tfor ( index in props ) {\n\t\tname = jQuery.camelCase( index );\n\t\teasing = specialEasing[ name ];\n\t\tvalue = props[ index ];\n\t\tif ( jQuery.isArray( value ) ) {\n\t\t\teasing = value[ 1 ];\n\t\t\tvalue = props[ index ] = value[ 0 ];\n\t\t}\n\n\t\tif ( index !== name ) {\n\t\t\tprops[ name ] = value;\n\t\t\tdelete props[ index ];\n\t\t}\n\n\t\thooks = jQuery.cssHooks[ name ];\n\t\tif ( hooks && \"expand\" in hooks ) {\n\t\t\tvalue = hooks.expand( value );\n\t\t\tdelete props[ name ];\n\n\t\t\t// not quite $.extend, this wont overwrite keys already present.\n\t\t\t// also - reusing 'index' from above because we have the correct \"name\"\n\t\t\tfor ( index in value ) {\n\t\t\t\tif ( !( index in props ) ) {\n\t\t\t\t\tprops[ index ] = value[ index ];\n\t\t\t\t\tspecialEasing[ index ] = easing;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tspecialEasing[ name ] = easing;\n\t\t}\n\t}\n}\n\njQuery.Animation = jQuery.extend( Animation, {\n\n\ttweener: function( props, callback ) {\n\t\tif ( jQuery.isFunction( props ) ) {\n\t\t\tcallback = props;\n\t\t\tprops = [ \"*\" ];\n\t\t} else {\n\t\t\tprops = props.split(\" \");\n\t\t}\n\n\t\tvar prop,\n\t\t\tindex = 0,\n\t\t\tlength = props.length;\n\n\t\tfor ( ; index < length ; index++ ) {\n\t\t\tprop = props[ index ];\n\t\t\ttweeners[ prop ] = tweeners[ prop ] || [];\n\t\t\ttweeners[ prop ].unshift( callback );\n\t\t}\n\t},\n\n\tprefilter: function( callback, prepend ) {\n\t\tif ( prepend ) {\n\t\t\tanimationPrefilters.unshift( callback );\n\t\t} else {\n\t\t\tanimationPrefilters.push( callback );\n\t\t}\n\t}\n});\n\nfunction defaultPrefilter( elem, props, opts ) {\n\t/* jshint validthis: true */\n\tvar prop, value, toggle, tween, hooks, oldfire,\n\t\tanim = this,\n\t\torig = {},\n\t\tstyle = elem.style,\n\t\thidden = elem.nodeType && isHidden( elem ),\n\t\tdataShow = jQuery._data( elem, \"fxshow\" );\n\n\t// handle queue: false promises\n\tif ( !opts.queue ) {\n\t\thooks = jQuery._queueHooks( elem, \"fx\" );\n\t\tif ( hooks.unqueued == null ) {\n\t\t\thooks.unqueued = 0;\n\t\t\toldfire = hooks.empty.fire;\n\t\t\thooks.empty.fire = function() {\n\t\t\t\tif ( !hooks.unqueued ) {\n\t\t\t\t\toldfire();\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t\thooks.unqueued++;\n\n\t\tanim.always(function() {\n\t\t\t// doing this makes sure that the complete handler will be called\n\t\t\t// before this completes\n\t\t\tanim.always(function() {\n\t\t\t\thooks.unqueued--;\n\t\t\t\tif ( !jQuery.queue( elem, \"fx\" ).length ) {\n\t\t\t\t\thooks.empty.fire();\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t}\n\n\t// height/width overflow pass\n\tif ( elem.nodeType === 1 && ( \"height\" in props || \"width\" in props ) ) {\n\t\t// Make sure that nothing sneaks out\n\t\t// Record all 3 overflow attributes because IE does not\n\t\t// change the overflow attribute when overflowX and\n\t\t// overflowY are set to the same value\n\t\topts.overflow = [ style.overflow, style.overflowX, style.overflowY ];\n\n\t\t// Set display property to inline-block for height/width\n\t\t// animations on inline elements that are having width/height animated\n\t\tif ( jQuery.css( elem, \"display\" ) === \"inline\" &&\n\t\t\t\tjQuery.css( elem, \"float\" ) === \"none\" ) {\n\n\t\t\t// inline-level elements accept inline-block;\n\t\t\t// block-level elements need to be inline with layout\n\t\t\tif ( !jQuery.support.inlineBlockNeedsLayout || css_defaultDisplay( elem.nodeName ) === \"inline\" ) {\n\t\t\t\tstyle.display = \"inline-block\";\n\n\t\t\t} else {\n\t\t\t\tstyle.zoom = 1;\n\t\t\t}\n\t\t}\n\t}\n\n\tif ( opts.overflow ) {\n\t\tstyle.overflow = \"hidden\";\n\t\tif ( !jQuery.support.shrinkWrapBlocks ) {\n\t\t\tanim.always(function() {\n\t\t\t\tstyle.overflow = opts.overflow[ 0 ];\n\t\t\t\tstyle.overflowX = opts.overflow[ 1 ];\n\t\t\t\tstyle.overflowY = opts.overflow[ 2 ];\n\t\t\t});\n\t\t}\n\t}\n\n\n\t// show/hide pass\n\tfor ( prop in props ) {\n\t\tvalue = props[ prop ];\n\t\tif ( rfxtypes.exec( value ) ) {\n\t\t\tdelete props[ prop ];\n\t\t\ttoggle = toggle || value === \"toggle\";\n\t\t\tif ( value === ( hidden ? \"hide\" : \"show\" ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\torig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop );\n\t\t}\n\t}\n\n\tif ( !jQuery.isEmptyObject( orig ) ) {\n\t\tif ( dataShow ) {\n\t\t\tif ( \"hidden\" in dataShow ) {\n\t\t\t\thidden = dataShow.hidden;\n\t\t\t}\n\t\t} else {\n\t\t\tdataShow = jQuery._data( elem, \"fxshow\", {} );\n\t\t}\n\n\t\t// store state if its toggle - enables .stop().toggle() to \"reverse\"\n\t\tif ( toggle ) {\n\t\t\tdataShow.hidden = !hidden;\n\t\t}\n\t\tif ( hidden ) {\n\t\t\tjQuery( elem ).show();\n\t\t} else {\n\t\t\tanim.done(function() {\n\t\t\t\tjQuery( elem ).hide();\n\t\t\t});\n\t\t}\n\t\tanim.done(function() {\n\t\t\tvar prop;\n\t\t\tjQuery._removeData( elem, \"fxshow\" );\n\t\t\tfor ( prop in orig ) {\n\t\t\t\tjQuery.style( elem, prop, orig[ prop ] );\n\t\t\t}\n\t\t});\n\t\tfor ( prop in orig ) {\n\t\t\ttween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim );\n\n\t\t\tif ( !( prop in dataShow ) ) {\n\t\t\t\tdataShow[ prop ] = tween.start;\n\t\t\t\tif ( hidden ) {\n\t\t\t\t\ttween.end = tween.start;\n\t\t\t\t\ttween.start = prop === \"width\" || prop === \"height\" ? 1 : 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction Tween( elem, options, prop, end, easing ) {\n\treturn new Tween.prototype.init( elem, options, prop, end, easing );\n}\njQuery.Tween = Tween;\n\nTween.prototype = {\n\tconstructor: Tween,\n\tinit: function( elem, options, prop, end, easing, unit ) {\n\t\tthis.elem = elem;\n\t\tthis.prop = prop;\n\t\tthis.easing = easing || \"swing\";\n\t\tthis.options = options;\n\t\tthis.start = this.now = this.cur();\n\t\tthis.end = end;\n\t\tthis.unit = unit || ( jQuery.cssNumber[ prop ] ? \"\" : \"px\" );\n\t},\n\tcur: function() {\n\t\tvar hooks = Tween.propHooks[ this.prop ];\n\n\t\treturn hooks && hooks.get ?\n\t\t\thooks.get( this ) :\n\t\t\tTween.propHooks._default.get( this );\n\t},\n\trun: function( percent ) {\n\t\tvar eased,\n\t\t\thooks = Tween.propHooks[ this.prop ];\n\n\t\tif ( this.options.duration ) {\n\t\t\tthis.pos = eased = jQuery.easing[ this.easing ](\n\t\t\t\tpercent, this.options.duration * percent, 0, 1, this.options.duration\n\t\t\t);\n\t\t} else {\n\t\t\tthis.pos = eased = percent;\n\t\t}\n\t\tthis.now = ( this.end - this.start ) * eased + this.start;\n\n\t\tif ( this.options.step ) {\n\t\t\tthis.options.step.call( this.elem, this.now, this );\n\t\t}\n\n\t\tif ( hooks && hooks.set ) {\n\t\t\thooks.set( this );\n\t\t} else {\n\t\t\tTween.propHooks._default.set( this );\n\t\t}\n\t\treturn this;\n\t}\n};\n\nTween.prototype.init.prototype = Tween.prototype;\n\nTween.propHooks = {\n\t_default: {\n\t\tget: function( tween ) {\n\t\t\tvar result;\n\n\t\t\tif ( tween.elem[ tween.prop ] != null &&\n\t\t\t\t(!tween.elem.style || tween.elem.style[ tween.prop ] == null) ) {\n\t\t\t\treturn tween.elem[ tween.prop ];\n\t\t\t}\n\n\t\t\t// passing an empty string as a 3rd parameter to .css will automatically\n\t\t\t// attempt a parseFloat and fallback to a string if the parse fails\n\t\t\t// so, simple values such as \"10px\" are parsed to Float.\n\t\t\t// complex values such as \"rotate(1rad)\" are returned as is.\n\t\t\tresult = jQuery.css( tween.elem, tween.prop, \"\" );\n\t\t\t// Empty strings, null, undefined and \"auto\" are converted to 0.\n\t\t\treturn !result || result === \"auto\" ? 0 : result;\n\t\t},\n\t\tset: function( tween ) {\n\t\t\t// use step hook for back compat - use cssHook if its there - use .style if its\n\t\t\t// available and use plain properties where available\n\t\t\tif ( jQuery.fx.step[ tween.prop ] ) {\n\t\t\t\tjQuery.fx.step[ tween.prop ]( tween );\n\t\t\t} else if ( tween.elem.style && ( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null || jQuery.cssHooks[ tween.prop ] ) ) {\n\t\t\t\tjQuery.style( tween.elem, tween.prop, tween.now + tween.unit );\n\t\t\t} else {\n\t\t\t\ttween.elem[ tween.prop ] = tween.now;\n\t\t\t}\n\t\t}\n\t}\n};\n\n// Support: IE <=9\n// Panic based approach to setting things on disconnected nodes\n\nTween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {\n\tset: function( tween ) {\n\t\tif ( tween.elem.nodeType && tween.elem.parentNode ) {\n\t\t\ttween.elem[ tween.prop ] = tween.now;\n\t\t}\n\t}\n};\n\njQuery.each([ \"toggle\", \"show\", \"hide\" ], function( i, name ) {\n\tvar cssFn = jQuery.fn[ name ];\n\tjQuery.fn[ name ] = function( speed, easing, callback ) {\n\t\treturn speed == null || typeof speed === \"boolean\" ?\n\t\t\tcssFn.apply( this, arguments ) :\n\t\t\tthis.animate( genFx( name, true ), speed, easing, callback );\n\t};\n});\n\njQuery.fn.extend({\n\tfadeTo: function( speed, to, easing, callback ) {\n\n\t\t// show any hidden elements after setting opacity to 0\n\t\treturn this.filter( isHidden ).css( \"opacity\", 0 ).show()\n\n\t\t\t// animate to the value specified\n\t\t\t.end().animate({ opacity: to }, speed, easing, callback );\n\t},\n\tanimate: function( prop, speed, easing, callback ) {\n\t\tvar empty = jQuery.isEmptyObject( prop ),\n\t\t\toptall = jQuery.speed( speed, easing, callback ),\n\t\t\tdoAnimation = function() {\n\t\t\t\t// Operate on a copy of prop so per-property easing won't be lost\n\t\t\t\tvar anim = Animation( this, jQuery.extend( {}, prop ), optall );\n\n\t\t\t\t// Empty animations, or finishing resolves immediately\n\t\t\t\tif ( empty || jQuery._data( this, \"finish\" ) ) {\n\t\t\t\t\tanim.stop( true );\n\t\t\t\t}\n\t\t\t};\n\t\t\tdoAnimation.finish = doAnimation;\n\n\t\treturn empty || optall.queue === false ?\n\t\t\tthis.each( doAnimation ) :\n\t\t\tthis.queue( optall.queue, doAnimation );\n\t},\n\tstop: function( type, clearQueue, gotoEnd ) {\n\t\tvar stopQueue = function( hooks ) {\n\t\t\tvar stop = hooks.stop;\n\t\t\tdelete hooks.stop;\n\t\t\tstop( gotoEnd );\n\t\t};\n\n\t\tif ( typeof type !== \"string\" ) {\n\t\t\tgotoEnd = clearQueue;\n\t\t\tclearQueue = type;\n\t\t\ttype = undefined;\n\t\t}\n\t\tif ( clearQueue && type !== false ) {\n\t\t\tthis.queue( type || \"fx\", [] );\n\t\t}\n\n\t\treturn this.each(function() {\n\t\t\tvar dequeue = true,\n\t\t\t\tindex = type != null && type + \"queueHooks\",\n\t\t\t\ttimers = jQuery.timers,\n\t\t\t\tdata = jQuery._data( this );\n\n\t\t\tif ( index ) {\n\t\t\t\tif ( data[ index ] && data[ index ].stop ) {\n\t\t\t\t\tstopQueue( data[ index ] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfor ( index in data ) {\n\t\t\t\t\tif ( data[ index ] && data[ index ].stop && rrun.test( index ) ) {\n\t\t\t\t\t\tstopQueue( data[ index ] );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor ( index = timers.length; index--; ) {\n\t\t\t\tif ( timers[ index ].elem === this && (type == null || timers[ index ].queue === type) ) {\n\t\t\t\t\ttimers[ index ].anim.stop( gotoEnd );\n\t\t\t\t\tdequeue = false;\n\t\t\t\t\ttimers.splice( index, 1 );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// start the next in the queue if the last step wasn't forced\n\t\t\t// timers currently will call their complete callbacks, which will dequeue\n\t\t\t// but only if they were gotoEnd\n\t\t\tif ( dequeue || !gotoEnd ) {\n\t\t\t\tjQuery.dequeue( this, type );\n\t\t\t}\n\t\t});\n\t},\n\tfinish: function( type ) {\n\t\tif ( type !== false ) {\n\t\t\ttype = type || \"fx\";\n\t\t}\n\t\treturn this.each(function() {\n\t\t\tvar index,\n\t\t\t\tdata = jQuery._data( this ),\n\t\t\t\tqueue = data[ type + \"queue\" ],\n\t\t\t\thooks = data[ type + \"queueHooks\" ],\n\t\t\t\ttimers = jQuery.timers,\n\t\t\t\tlength = queue ? queue.length : 0;\n\n\t\t\t// enable finishing flag on private data\n\t\t\tdata.finish = true;\n\n\t\t\t// empty the queue first\n\t\t\tjQuery.queue( this, type, [] );\n\n\t\t\tif ( hooks && hooks.stop ) {\n\t\t\t\thooks.stop.call( this, true );\n\t\t\t}\n\n\t\t\t// look for any active animations, and finish them\n\t\t\tfor ( index = timers.length; index--; ) {\n\t\t\t\tif ( timers[ index ].elem === this && timers[ index ].queue === type ) {\n\t\t\t\t\ttimers[ index ].anim.stop( true );\n\t\t\t\t\ttimers.splice( index, 1 );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// look for any animations in the old queue and finish them\n\t\t\tfor ( index = 0; index < length; index++ ) {\n\t\t\t\tif ( queue[ index ] && queue[ index ].finish ) {\n\t\t\t\t\tqueue[ index ].finish.call( this );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// turn off finishing flag\n\t\t\tdelete data.finish;\n\t\t});\n\t}\n});\n\n// Generate parameters to create a standard animation\nfunction genFx( type, includeWidth ) {\n\tvar which,\n\t\tattrs = { height: type },\n\t\ti = 0;\n\n\t// if we include width, step value is 1 to do all cssExpand values,\n\t// if we don't include width, step value is 2 to skip over Left and Right\n\tincludeWidth = includeWidth? 1 : 0;\n\tfor( ; i < 4 ; i += 2 - includeWidth ) {\n\t\twhich = cssExpand[ i ];\n\t\tattrs[ \"margin\" + which ] = attrs[ \"padding\" + which ] = type;\n\t}\n\n\tif ( includeWidth ) {\n\t\tattrs.opacity = attrs.width = type;\n\t}\n\n\treturn attrs;\n}\n\n// Generate shortcuts for custom animations\njQuery.each({\n\tslideDown: genFx(\"show\"),\n\tslideUp: genFx(\"hide\"),\n\tslideToggle: genFx(\"toggle\"),\n\tfadeIn: { opacity: \"show\" },\n\tfadeOut: { opacity: \"hide\" },\n\tfadeToggle: { opacity: \"toggle\" }\n}, function( name, props ) {\n\tjQuery.fn[ name ] = function( speed, easing, callback ) {\n\t\treturn this.animate( props, speed, easing, callback );\n\t};\n});\n\njQuery.speed = function( speed, easing, fn ) {\n\tvar opt = speed && typeof speed === \"object\" ? jQuery.extend( {}, speed ) : {\n\t\tcomplete: fn || !fn && easing ||\n\t\t\tjQuery.isFunction( speed ) && speed,\n\t\tduration: speed,\n\t\teasing: fn && easing || easing && !jQuery.isFunction( easing ) && easing\n\t};\n\n\topt.duration = jQuery.fx.off ? 0 : typeof opt.duration === \"number\" ? opt.duration :\n\t\topt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default;\n\n\t// normalize opt.queue - true/undefined/null -> \"fx\"\n\tif ( opt.queue == null || opt.queue === true ) {\n\t\topt.queue = \"fx\";\n\t}\n\n\t// Queueing\n\topt.old = opt.complete;\n\n\topt.complete = function() {\n\t\tif ( jQuery.isFunction( opt.old ) ) {\n\t\t\topt.old.call( this );\n\t\t}\n\n\t\tif ( opt.queue ) {\n\t\t\tjQuery.dequeue( this, opt.queue );\n\t\t}\n\t};\n\n\treturn opt;\n};\n\njQuery.easing = {\n\tlinear: function( p ) {\n\t\treturn p;\n\t},\n\tswing: function( p ) {\n\t\treturn 0.5 - Math.cos( p*Math.PI ) / 2;\n\t}\n};\n\njQuery.timers = [];\njQuery.fx = Tween.prototype.init;\njQuery.fx.tick = function() {\n\tvar timer,\n\t\ttimers = jQuery.timers,\n\t\ti = 0;\n\n\tfxNow = jQuery.now();\n\n\tfor ( ; i < timers.length; i++ ) {\n\t\ttimer = timers[ i ];\n\t\t// Checks the timer has not already been removed\n\t\tif ( !timer() && timers[ i ] === timer ) {\n\t\t\ttimers.splice( i--, 1 );\n\t\t}\n\t}\n\n\tif ( !timers.length ) {\n\t\tjQuery.fx.stop();\n\t}\n\tfxNow = undefined;\n};\n\njQuery.fx.timer = function( timer ) {\n\tif ( timer() && jQuery.timers.push( timer ) ) {\n\t\tjQuery.fx.start();\n\t}\n};\n\njQuery.fx.interval = 13;\n\njQuery.fx.start = function() {\n\tif ( !timerId ) {\n\t\ttimerId = setInterval( jQuery.fx.tick, jQuery.fx.interval );\n\t}\n};\n\njQuery.fx.stop = function() {\n\tclearInterval( timerId );\n\ttimerId = null;\n};\n\njQuery.fx.speeds = {\n\tslow: 600,\n\tfast: 200,\n\t// Default speed\n\t_default: 400\n};\n\n// Back Compat <1.8 extension point\njQuery.fx.step = {};\n\nif ( jQuery.expr && jQuery.expr.filters ) {\n\tjQuery.expr.filters.animated = function( elem ) {\n\t\treturn jQuery.grep(jQuery.timers, function( fn ) {\n\t\t\treturn elem === fn.elem;\n\t\t}).length;\n\t};\n}\njQuery.fn.offset = function( options ) {\n\tif ( arguments.length ) {\n\t\treturn options === undefined ?\n\t\t\tthis :\n\t\t\tthis.each(function( i ) {\n\t\t\t\tjQuery.offset.setOffset( this, options, i );\n\t\t\t});\n\t}\n\n\tvar docElem, win,\n\t\tbox = { top: 0, left: 0 },\n\t\telem = this[ 0 ],\n\t\tdoc = elem && elem.ownerDocument;\n\n\tif ( !doc ) {\n\t\treturn;\n\t}\n\n\tdocElem = doc.documentElement;\n\n\t// Make sure it's not a disconnected DOM node\n\tif ( !jQuery.contains( docElem, elem ) ) {\n\t\treturn box;\n\t}\n\n\t// If we don't have gBCR, just use 0,0 rather than error\n\t// BlackBerry 5, iOS 3 (original iPhone)\n\tif ( typeof elem.getBoundingClientRect !== core_strundefined ) {\n\t\tbox = elem.getBoundingClientRect();\n\t}\n\twin = getWindow( doc );\n\treturn {\n\t\ttop: box.top  + ( win.pageYOffset || docElem.scrollTop )  - ( docElem.clientTop  || 0 ),\n\t\tleft: box.left + ( win.pageXOffset || docElem.scrollLeft ) - ( docElem.clientLeft || 0 )\n\t};\n};\n\njQuery.offset = {\n\n\tsetOffset: function( elem, options, i ) {\n\t\tvar position = jQuery.css( elem, \"position\" );\n\n\t\t// set position first, in-case top/left are set even on static elem\n\t\tif ( position === \"static\" ) {\n\t\t\telem.style.position = \"relative\";\n\t\t}\n\n\t\tvar curElem = jQuery( elem ),\n\t\t\tcurOffset = curElem.offset(),\n\t\t\tcurCSSTop = jQuery.css( elem, \"top\" ),\n\t\t\tcurCSSLeft = jQuery.css( elem, \"left\" ),\n\t\t\tcalculatePosition = ( position === \"absolute\" || position === \"fixed\" ) && jQuery.inArray(\"auto\", [curCSSTop, curCSSLeft]) > -1,\n\t\t\tprops = {}, curPosition = {}, curTop, curLeft;\n\n\t\t// need to be able to calculate position if either top or left is auto and position is either absolute or fixed\n\t\tif ( calculatePosition ) {\n\t\t\tcurPosition = curElem.position();\n\t\t\tcurTop = curPosition.top;\n\t\t\tcurLeft = curPosition.left;\n\t\t} else {\n\t\t\tcurTop = parseFloat( curCSSTop ) || 0;\n\t\t\tcurLeft = parseFloat( curCSSLeft ) || 0;\n\t\t}\n\n\t\tif ( jQuery.isFunction( options ) ) {\n\t\t\toptions = options.call( elem, i, curOffset );\n\t\t}\n\n\t\tif ( options.top != null ) {\n\t\t\tprops.top = ( options.top - curOffset.top ) + curTop;\n\t\t}\n\t\tif ( options.left != null ) {\n\t\t\tprops.left = ( options.left - curOffset.left ) + curLeft;\n\t\t}\n\n\t\tif ( \"using\" in options ) {\n\t\t\toptions.using.call( elem, props );\n\t\t} else {\n\t\t\tcurElem.css( props );\n\t\t}\n\t}\n};\n\n\njQuery.fn.extend({\n\n\tposition: function() {\n\t\tif ( !this[ 0 ] ) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar offsetParent, offset,\n\t\t\tparentOffset = { top: 0, left: 0 },\n\t\t\telem = this[ 0 ];\n\n\t\t// fixed elements are offset from window (parentOffset = {top:0, left: 0}, because it is it's only offset parent\n\t\tif ( jQuery.css( elem, \"position\" ) === \"fixed\" ) {\n\t\t\t// we assume that getBoundingClientRect is available when computed position is fixed\n\t\t\toffset = elem.getBoundingClientRect();\n\t\t} else {\n\t\t\t// Get *real* offsetParent\n\t\t\toffsetParent = this.offsetParent();\n\n\t\t\t// Get correct offsets\n\t\t\toffset = this.offset();\n\t\t\tif ( !jQuery.nodeName( offsetParent[ 0 ], \"html\" ) ) {\n\t\t\t\tparentOffset = offsetParent.offset();\n\t\t\t}\n\n\t\t\t// Add offsetParent borders\n\t\t\tparentOffset.top  += jQuery.css( offsetParent[ 0 ], \"borderTopWidth\", true );\n\t\t\tparentOffset.left += jQuery.css( offsetParent[ 0 ], \"borderLeftWidth\", true );\n\t\t}\n\n\t\t// Subtract parent offsets and element margins\n\t\t// note: when an element has margin: auto the offsetLeft and marginLeft\n\t\t// are the same in Safari causing offset.left to incorrectly be 0\n\t\treturn {\n\t\t\ttop:  offset.top  - parentOffset.top - jQuery.css( elem, \"marginTop\", true ),\n\t\t\tleft: offset.left - parentOffset.left - jQuery.css( elem, \"marginLeft\", true)\n\t\t};\n\t},\n\n\toffsetParent: function() {\n\t\treturn this.map(function() {\n\t\t\tvar offsetParent = this.offsetParent || docElem;\n\t\t\twhile ( offsetParent && ( !jQuery.nodeName( offsetParent, \"html\" ) && jQuery.css( offsetParent, \"position\") === \"static\" ) ) {\n\t\t\t\toffsetParent = offsetParent.offsetParent;\n\t\t\t}\n\t\t\treturn offsetParent || docElem;\n\t\t});\n\t}\n});\n\n\n// Create scrollLeft and scrollTop methods\njQuery.each( {scrollLeft: \"pageXOffset\", scrollTop: \"pageYOffset\"}, function( method, prop ) {\n\tvar top = /Y/.test( prop );\n\n\tjQuery.fn[ method ] = function( val ) {\n\t\treturn jQuery.access( this, function( elem, method, val ) {\n\t\t\tvar win = getWindow( elem );\n\n\t\t\tif ( val === undefined ) {\n\t\t\t\treturn win ? (prop in win) ? win[ prop ] :\n\t\t\t\t\twin.document.documentElement[ method ] :\n\t\t\t\t\telem[ method ];\n\t\t\t}\n\n\t\t\tif ( win ) {\n\t\t\t\twin.scrollTo(\n\t\t\t\t\t!top ? val : jQuery( win ).scrollLeft(),\n\t\t\t\t\ttop ? val : jQuery( win ).scrollTop()\n\t\t\t\t);\n\n\t\t\t} else {\n\t\t\t\telem[ method ] = val;\n\t\t\t}\n\t\t}, method, val, arguments.length, null );\n\t};\n});\n\nfunction getWindow( elem ) {\n\treturn jQuery.isWindow( elem ) ?\n\t\telem :\n\t\telem.nodeType === 9 ?\n\t\t\telem.defaultView || elem.parentWindow :\n\t\t\tfalse;\n}\n// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods\njQuery.each( { Height: \"height\", Width: \"width\" }, function( name, type ) {\n\tjQuery.each( { padding: \"inner\" + name, content: type, \"\": \"outer\" + name }, function( defaultExtra, funcName ) {\n\t\t// margin is only for outerHeight, outerWidth\n\t\tjQuery.fn[ funcName ] = function( margin, value ) {\n\t\t\tvar chainable = arguments.length && ( defaultExtra || typeof margin !== \"boolean\" ),\n\t\t\t\textra = defaultExtra || ( margin === true || value === true ? \"margin\" : \"border\" );\n\n\t\t\treturn jQuery.access( this, function( elem, type, value ) {\n\t\t\t\tvar doc;\n\n\t\t\t\tif ( jQuery.isWindow( elem ) ) {\n\t\t\t\t\t// As of 5/8/2012 this will yield incorrect results for Mobile Safari, but there\n\t\t\t\t\t// isn't a whole lot we can do. See pull request at this URL for discussion:\n\t\t\t\t\t// https://github.com/jquery/jquery/pull/764\n\t\t\t\t\treturn elem.document.documentElement[ \"client\" + name ];\n\t\t\t\t}\n\n\t\t\t\t// Get document width or height\n\t\t\t\tif ( elem.nodeType === 9 ) {\n\t\t\t\t\tdoc = elem.documentElement;\n\n\t\t\t\t\t// Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height], whichever is greatest\n\t\t\t\t\t// unfortunately, this causes bug #3838 in IE6/8 only, but there is currently no good, small way to fix it.\n\t\t\t\t\treturn Math.max(\n\t\t\t\t\t\telem.body[ \"scroll\" + name ], doc[ \"scroll\" + name ],\n\t\t\t\t\t\telem.body[ \"offset\" + name ], doc[ \"offset\" + name ],\n\t\t\t\t\t\tdoc[ \"client\" + name ]\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\treturn value === undefined ?\n\t\t\t\t\t// Get width or height on the element, requesting but not forcing parseFloat\n\t\t\t\t\tjQuery.css( elem, type, extra ) :\n\n\t\t\t\t\t// Set width or height on the element\n\t\t\t\t\tjQuery.style( elem, type, value, extra );\n\t\t\t}, type, chainable ? margin : undefined, chainable, null );\n\t\t};\n\t});\n});\n// Limit scope pollution from any deprecated API\n// (function() {\n\n// The number of elements contained in the matched element set\njQuery.fn.size = function() {\n\treturn this.length;\n};\n\njQuery.fn.andSelf = jQuery.fn.addBack;\n\n// })();\nif ( typeof module === \"object\" && module && typeof module.exports === \"object\" ) {\n\t// Expose jQuery as module.exports in loaders that implement the Node\n\t// module pattern (including browserify). Do not create the global, since\n\t// the user will be storing it themselves locally, and globals are frowned\n\t// upon in the Node module world.\n\tmodule.exports = jQuery;\n} else {\n\t// Otherwise expose jQuery to the global object as usual\n\twindow.jQuery = window.$ = jQuery;\n\n\t// Register as a named AMD module, since jQuery can be concatenated with other\n\t// files that may use define, but not via a proper concatenation script that\n\t// understands anonymous AMD modules. A named AMD is safest and most robust\n\t// way to register. Lowercase jquery is used because AMD module names are\n\t// derived from file names, and jQuery is normally delivered in a lowercase\n\t// file name. Do this after creating the global so that if an AMD module wants\n\t// to call noConflict to hide this version of jQuery, it will work.\n\tif ( typeof define === \"function\" && define.amd ) {\n\t\tdefine( \"jquery\", [], function () { return jQuery; } );\n\t}\n}\n\n})( window );\n"
  },
  {
    "path": "23 - Architecting Application User Interfaces/PPPDDD.NonDist.UIComp/PPPDDD.NonDist.UIComp/Scripts/jquery.validate-vsdoc.js",
    "content": "﻿/* NUGET: BEGIN LICENSE TEXT\r\n *\r\n * Microsoft grants you the right to use these script files for the sole\r\n * purpose of either: (i) interacting through your browser with the Microsoft\r\n * website or online service, subject to the applicable licensing or use\r\n * terms; or (ii) using the files as included with a Microsoft product subject\r\n * to that product's license terms. Microsoft reserves all other rights to the\r\n * files not expressly granted by Microsoft, whether by implication, estoppel\r\n * or otherwise. Insofar as a script file is dual licensed under GPL,\r\n * Microsoft neither took the code under GPL nor distributes it thereunder but\r\n * under the terms set out in this paragraph. All notices and licenses\r\n * below are for informational purposes only.\r\n *\r\n * NUGET: END LICENSE TEXT */\r\n/*\r\n* This file has been commented to support Visual Studio Intellisense.\r\n* You should not use this file at runtime inside the browser--it is only\r\n* intended to be used only for design-time IntelliSense.  Please use the\r\n* standard jQuery library for all production use.\r\n*\r\n* Comment version: 1.11.1\r\n*/\r\n\r\n/*\r\n* Note: While Microsoft is not the author of this file, Microsoft is\r\n* offering you a license subject to the terms of the Microsoft Software\r\n* License Terms for Microsoft ASP.NET Model View Controller 3.\r\n* Microsoft reserves all other rights. The notices below are provided\r\n* for informational purposes only and are not the license terms under\r\n* which Microsoft distributed this file.\r\n*\r\n* jQuery Validation Plugin - v1.11.1 - 2/4/2013\r\n* https://github.com/jzaefferer/jquery-validation\r\n* Copyright (c) 2013 Jörn Zaefferer; Licensed MIT\r\n*\r\n*/\r\n\r\n(function($) {\r\n\r\n$.extend($.fn, {\r\n\t// http://docs.jquery.com/Plugins/Validation/validate\r\n\tvalidate: function( options ) {\r\n\t\t/// <summary>\r\n\t\t/// Validates the selected form. This method sets up event handlers for submit, focus,\r\n\t\t/// keyup, blur and click to trigger validation of the entire form or individual\r\n\t\t/// elements. Each one can be disabled, see the onxxx options (onsubmit, onfocusout,\r\n\t\t/// onkeyup, onclick). focusInvalid focuses elements when submitting a invalid form.\r\n\t\t/// </summary>\r\n\t\t/// <param name=\"options\" type=\"Object\">\r\n\t\t/// A set of key/value pairs that configure the validate. All options are optional.\r\n\t\t/// </param>\r\n\r\n\t\t// if nothing is selected, return nothing; can't chain anyway\r\n\t\tif (!this.length) {\r\n\t\t\toptions && options.debug && window.console && console.warn( \"nothing selected, can't validate, returning nothing\" );\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// check if a validator for this form was already created\r\n\t\tvar validator = $.data(this[0], 'validator');\r\n\t\tif ( validator ) {\r\n\t\t\treturn validator;\r\n\t\t}\r\n\t\t\r\n\t\tvalidator = new $.validator( options, this[0] );\r\n\t\t$.data(this[0], 'validator', validator); \r\n\t\t\r\n\t\tif ( validator.settings.onsubmit ) {\r\n\t\t\r\n\t\t\t// allow suppresing validation by adding a cancel class to the submit button\r\n\t\t\tthis.find(\"input, button\").filter(\".cancel\").click(function() {\r\n\t\t\t\tvalidator.cancelSubmit = true;\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\t// when a submitHandler is used, capture the submitting button\r\n\t\t\tif (validator.settings.submitHandler) {\r\n\t\t\t\tthis.find(\"input, button\").filter(\":submit\").click(function() {\r\n\t\t\t\t\tvalidator.submitButton = this;\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t\r\n\t\t\t// validate the form on submit\r\n\t\t\tthis.submit( function( event ) {\r\n\t\t\t\tif ( validator.settings.debug )\r\n\t\t\t\t\t// prevent form submit to be able to see console output\r\n\t\t\t\t\tevent.preventDefault();\r\n\t\t\t\t\t\r\n\t\t\t\tfunction handle() {\r\n\t\t\t\t\tif ( validator.settings.submitHandler ) {\r\n\t\t\t\t\t\tif (validator.submitButton) {\r\n\t\t\t\t\t\t\t// insert a hidden input as a replacement for the missing submit button\r\n\t\t\t\t\t\t\tvar hidden = $(\"<input type='hidden'/>\").attr(\"name\", validator.submitButton.name).val(validator.submitButton.value).appendTo(validator.currentForm);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tvalidator.settings.submitHandler.call( validator, validator.currentForm );\r\n\t\t\t\t\t\tif (validator.submitButton) {\r\n\t\t\t\t\t\t\t// and clean up afterwards; thanks to no-block-scope, hidden can be referenced\r\n\t\t\t\t\t\t\thidden.remove();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t// prevent submit for invalid forms or custom submit handlers\r\n\t\t\t\tif ( validator.cancelSubmit ) {\r\n\t\t\t\t\tvalidator.cancelSubmit = false;\r\n\t\t\t\t\treturn handle();\r\n\t\t\t\t}\r\n\t\t\t\tif ( validator.form() ) {\r\n\t\t\t\t\tif ( validator.pendingRequest ) {\r\n\t\t\t\t\t\tvalidator.formSubmitted = true;\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn handle();\r\n\t\t\t\t} else {\r\n\t\t\t\t\tvalidator.focusInvalid();\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\t\r\n\t\treturn validator;\r\n\t},\r\n\t// http://docs.jquery.com/Plugins/Validation/valid\r\n\tvalid: function() {\r\n\t\t/// <summary>\r\n\t\t/// Checks if the selected form is valid or if all selected elements are valid.\r\n\t\t/// validate() needs to be called on the form before checking it using this method.\r\n\t\t/// </summary>\r\n\t\t/// <returns type=\"Boolean\" />\r\n\r\n        if ( $(this[0]).is('form')) {\r\n            return this.validate().form();\r\n        } else {\r\n            var valid = true;\r\n            var validator = $(this[0].form).validate();\r\n            this.each(function() {\r\n\t\t\t\tvalid &= validator.element(this);\r\n            });\r\n            return valid;\r\n        }\r\n    },\r\n\t// attributes: space seperated list of attributes to retrieve and remove\r\n\tremoveAttrs: function(attributes) {\r\n\t\t/// <summary>\r\n\t\t/// Remove the specified attributes from the first matched element and return them.\r\n\t\t/// </summary>\r\n\t\t/// <param name=\"attributes\" type=\"String\">\r\n\t\t/// A space-seperated list of attribute names to remove.\r\n\t\t/// </param>\r\n\r\n\t\tvar result = {},\r\n\t\t\t$element = this;\r\n\t\t$.each(attributes.split(/\\s/), function(index, value) {\r\n\t\t\tresult[value] = $element.attr(value);\r\n\t\t\t$element.removeAttr(value);\r\n\t\t});\r\n\t\treturn result;\r\n\t},\r\n\t// http://docs.jquery.com/Plugins/Validation/rules\r\n\trules: function(command, argument) {\r\n\t\t/// <summary>\r\n\t\t/// Return the validations rules for the first selected element.\r\n\t\t/// </summary>\r\n\t\t/// <param name=\"command\" type=\"String\">\r\n\t\t/// Can be either \"add\" or \"remove\".\r\n\t\t/// </param>\r\n\t\t/// <param name=\"argument\" type=\"\">\r\n\t\t/// A list of rules to add or remove.\r\n\t\t/// </param>\r\n\r\n\t\tvar element = this[0];\r\n\t\t\r\n\t\tif (command) {\r\n\t\t\tvar settings = $.data(element.form, 'validator').settings;\r\n\t\t\tvar staticRules = settings.rules;\r\n\t\t\tvar existingRules = $.validator.staticRules(element);\r\n\t\t\tswitch(command) {\r\n\t\t\tcase \"add\":\r\n\t\t\t\t$.extend(existingRules, $.validator.normalizeRule(argument));\r\n\t\t\t\tstaticRules[element.name] = existingRules;\r\n\t\t\t\tif (argument.messages)\r\n\t\t\t\t\tsettings.messages[element.name] = $.extend( settings.messages[element.name], argument.messages );\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"remove\":\r\n\t\t\t\tif (!argument) {\r\n\t\t\t\t\tdelete staticRules[element.name];\r\n\t\t\t\t\treturn existingRules;\r\n\t\t\t\t}\r\n\t\t\t\tvar filtered = {};\r\n\t\t\t\t$.each(argument.split(/\\s/), function(index, method) {\r\n\t\t\t\t\tfiltered[method] = existingRules[method];\r\n\t\t\t\t\tdelete existingRules[method];\r\n\t\t\t\t});\r\n\t\t\t\treturn filtered;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tvar data = $.validator.normalizeRules(\r\n\t\t$.extend(\r\n\t\t\t{},\r\n\t\t\t$.validator.metadataRules(element),\r\n\t\t\t$.validator.classRules(element),\r\n\t\t\t$.validator.attributeRules(element),\r\n\t\t\t$.validator.staticRules(element)\r\n\t\t), element);\r\n\t\t\r\n\t\t// make sure required is at front\r\n\t\tif (data.required) {\r\n\t\t\tvar param = data.required;\r\n\t\t\tdelete data.required;\r\n\t\t\tdata = $.extend({required: param}, data);\r\n\t\t}\r\n\t\t\r\n\t\treturn data;\r\n\t}\r\n});\r\n\r\n// Custom selectors\r\n$.extend($.expr[\":\"], {\r\n\t// http://docs.jquery.com/Plugins/Validation/blank\r\n\tblank: function(a) {return !$.trim(\"\" + a.value);},\r\n\t// http://docs.jquery.com/Plugins/Validation/filled\r\n\tfilled: function(a) {return !!$.trim(\"\" + a.value);},\r\n\t// http://docs.jquery.com/Plugins/Validation/unchecked\r\n\tunchecked: function(a) {return !a.checked;}\r\n});\r\n\r\n// constructor for validator\r\n$.validator = function( options, form ) {\r\n\tthis.settings = $.extend( true, {}, $.validator.defaults, options );\r\n\tthis.currentForm = form;\r\n\tthis.init();\r\n};\r\n\r\n$.validator.format = function(source, params) {\r\n\t/// <summary>\r\n\t/// Replaces {n} placeholders with arguments.\r\n\t/// One or more arguments can be passed, in addition to the string template itself, to insert\r\n\t/// into the string.\r\n\t/// </summary>\r\n\t/// <param name=\"source\" type=\"String\">\r\n\t/// The string to format.\r\n\t/// </param>\r\n\t/// <param name=\"params\" type=\"String\">\r\n\t/// The first argument to insert, or an array of Strings to insert\r\n\t/// </param>\r\n\t/// <returns type=\"String\" />\r\n\r\n\tif ( arguments.length == 1 ) \r\n\t\treturn function() {\r\n\t\t\tvar args = $.makeArray(arguments);\r\n\t\t\targs.unshift(source);\r\n\t\t\treturn $.validator.format.apply( this, args );\r\n\t\t};\r\n\tif ( arguments.length > 2 && params.constructor != Array  ) {\r\n\t\tparams = $.makeArray(arguments).slice(1);\r\n\t}\r\n\tif ( params.constructor != Array ) {\r\n\t\tparams = [ params ];\r\n\t}\r\n\t$.each(params, function(i, n) {\r\n\t\tsource = source.replace(new RegExp(\"\\\\{\" + i + \"\\\\}\", \"g\"), n);\r\n\t});\r\n\treturn source;\r\n};\r\n\r\n$.extend($.validator, {\r\n\t\r\n\tdefaults: {\r\n\t\tmessages: {},\r\n\t\tgroups: {},\r\n\t\trules: {},\r\n\t\terrorClass: \"error\",\r\n\t\tvalidClass: \"valid\",\r\n\t\terrorElement: \"label\",\r\n\t\tfocusInvalid: true,\r\n\t\terrorContainer: $( [] ),\r\n\t\terrorLabelContainer: $( [] ),\r\n\t\tonsubmit: true,\r\n\t\tignore: [],\r\n\t\tignoreTitle: false,\r\n\t\tonfocusin: function(element) {\r\n\t\t\tthis.lastActive = element;\r\n\t\t\t\t\r\n\t\t\t// hide error label and remove error class on focus if enabled\r\n\t\t\tif ( this.settings.focusCleanup && !this.blockFocusCleanup ) {\r\n\t\t\t\tthis.settings.unhighlight && this.settings.unhighlight.call( this, element, this.settings.errorClass, this.settings.validClass );\r\n\t\t\t\tthis.addWrapper(this.errorsFor(element)).hide();\r\n\t\t\t}\r\n\t\t},\r\n\t\tonfocusout: function(element) {\r\n\t\t\tif ( !this.checkable(element) && (element.name in this.submitted || !this.optional(element)) ) {\r\n\t\t\t\tthis.element(element);\r\n\t\t\t}\r\n\t\t},\r\n\t\tonkeyup: function(element) {\r\n\t\t\tif ( element.name in this.submitted || element == this.lastElement ) {\r\n\t\t\t\tthis.element(element);\r\n\t\t\t}\r\n\t\t},\r\n\t\tonclick: function(element) {\r\n\t\t\t// click on selects, radiobuttons and checkboxes\r\n\t\t\tif ( element.name in this.submitted )\r\n\t\t\t\tthis.element(element);\r\n\t\t\t// or option elements, check parent select in that case\r\n\t\t\telse if (element.parentNode.name in this.submitted)\r\n\t\t\t\tthis.element(element.parentNode);\r\n\t\t},\r\n\t\thighlight: function( element, errorClass, validClass ) {\r\n\t\t\t$(element).addClass(errorClass).removeClass(validClass);\r\n\t\t},\r\n\t\tunhighlight: function( element, errorClass, validClass ) {\r\n\t\t\t$(element).removeClass(errorClass).addClass(validClass);\r\n\t\t}\r\n\t},\r\n\r\n\t// http://docs.jquery.com/Plugins/Validation/Validator/setDefaults\r\n\tsetDefaults: function(settings) {\r\n\t\t/// <summary>\r\n\t\t/// Modify default settings for validation.\r\n\t\t/// Accepts everything that Plugins/Validation/validate accepts.\r\n\t\t/// </summary>\r\n\t\t/// <param name=\"settings\" type=\"Options\">\r\n\t\t/// Options to set as default.\r\n\t\t/// </param>\r\n\r\n\t\t$.extend( $.validator.defaults, settings );\r\n\t},\r\n\r\n\tmessages: {\r\n\t\trequired: \"This field is required.\",\r\n\t\tremote: \"Please fix this field.\",\r\n\t\temail: \"Please enter a valid email address.\",\r\n\t\turl: \"Please enter a valid URL.\",\r\n\t\tdate: \"Please enter a valid date.\",\r\n\t\tdateISO: \"Please enter a valid date (ISO).\",\r\n\t\tnumber: \"Please enter a valid number.\",\r\n\t\tdigits: \"Please enter only digits.\",\r\n\t\tcreditcard: \"Please enter a valid credit card number.\",\r\n\t\tequalTo: \"Please enter the same value again.\",\r\n\t\taccept: \"Please enter a value with a valid extension.\",\r\n\t\tmaxlength: $.validator.format(\"Please enter no more than {0} characters.\"),\r\n\t\tminlength: $.validator.format(\"Please enter at least {0} characters.\"),\r\n\t\trangelength: $.validator.format(\"Please enter a value between {0} and {1} characters long.\"),\r\n\t\trange: $.validator.format(\"Please enter a value between {0} and {1}.\"),\r\n\t\tmax: $.validator.format(\"Please enter a value less than or equal to {0}.\"),\r\n\t\tmin: $.validator.format(\"Please enter a value greater than or equal to {0}.\")\r\n\t},\r\n\t\r\n\tautoCreateRanges: false,\r\n\t\r\n\tprototype: {\r\n\t\t\r\n\t\tinit: function() {\r\n\t\t\tthis.labelContainer = $(this.settings.errorLabelContainer);\r\n\t\t\tthis.errorContext = this.labelContainer.length && this.labelContainer || $(this.currentForm);\r\n\t\t\tthis.containers = $(this.settings.errorContainer).add( this.settings.errorLabelContainer );\r\n\t\t\tthis.submitted = {};\r\n\t\t\tthis.valueCache = {};\r\n\t\t\tthis.pendingRequest = 0;\r\n\t\t\tthis.pending = {};\r\n\t\t\tthis.invalid = {};\r\n\t\t\tthis.reset();\r\n\t\t\t\r\n\t\t\tvar groups = (this.groups = {});\r\n\t\t\t$.each(this.settings.groups, function(key, value) {\r\n\t\t\t\t$.each(value.split(/\\s/), function(index, name) {\r\n\t\t\t\t\tgroups[name] = key;\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t\tvar rules = this.settings.rules;\r\n\t\t\t$.each(rules, function(key, value) {\r\n\t\t\t\trules[key] = $.validator.normalizeRule(value);\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tfunction delegate(event) {\r\n\t\t\t\tvar validator = $.data(this[0].form, \"validator\"),\r\n\t\t\t\t\teventType = \"on\" + event.type.replace(/^validate/, \"\");\r\n\t\t\t\tvalidator.settings[eventType] && validator.settings[eventType].call(validator, this[0] );\r\n\t\t\t}\r\n\t\t\t$(this.currentForm)\r\n\t\t\t\t.validateDelegate(\":text, :password, :file, select, textarea\", \"focusin focusout keyup\", delegate)\r\n\t\t\t\t.validateDelegate(\":radio, :checkbox, select, option\", \"click\", delegate);\r\n\r\n\t\t\tif (this.settings.invalidHandler)\r\n\t\t\t\t$(this.currentForm).bind(\"invalid-form.validate\", this.settings.invalidHandler);\r\n\t\t},\r\n\r\n\t\t// http://docs.jquery.com/Plugins/Validation/Validator/form\r\n\t\tform: function() {\r\n\t\t\t/// <summary>\r\n\t\t\t/// Validates the form, returns true if it is valid, false otherwise.\r\n\t\t\t/// This behaves as a normal submit event, but returns the result.\r\n\t\t\t/// </summary>\r\n\t\t\t/// <returns type=\"Boolean\" />\r\n\r\n\t\t\tthis.checkForm();\r\n\t\t\t$.extend(this.submitted, this.errorMap);\r\n\t\t\tthis.invalid = $.extend({}, this.errorMap);\r\n\t\t\tif (!this.valid())\r\n\t\t\t\t$(this.currentForm).triggerHandler(\"invalid-form\", [this]);\r\n\t\t\tthis.showErrors();\r\n\t\t\treturn this.valid();\r\n\t\t},\r\n\t\t\r\n\t\tcheckForm: function() {\r\n\t\t\tthis.prepareForm();\r\n\t\t\tfor ( var i = 0, elements = (this.currentElements = this.elements()); elements[i]; i++ ) {\r\n\t\t\t\tthis.check( elements[i] );\r\n\t\t\t}\r\n\t\t\treturn this.valid(); \r\n\t\t},\r\n\t\t\r\n\t\t// http://docs.jquery.com/Plugins/Validation/Validator/element\r\n\t\telement: function( element ) {\r\n\t\t\t/// <summary>\r\n\t\t\t/// Validates a single element, returns true if it is valid, false otherwise.\r\n\t\t\t/// This behaves as validation on blur or keyup, but returns the result.\r\n\t\t\t/// </summary>\r\n\t\t\t/// <param name=\"element\" type=\"Selector\">\r\n\t\t\t/// An element to validate, must be inside the validated form.\r\n\t\t\t/// </param>\r\n\t\t\t/// <returns type=\"Boolean\" />\r\n\r\n\t\t\telement = this.clean( element );\r\n\t\t\tthis.lastElement = element;\r\n\t\t\tthis.prepareElement( element );\r\n\t\t\tthis.currentElements = $(element);\r\n\t\t\tvar result = this.check( element );\r\n\t\t\tif ( result ) {\r\n\t\t\t\tdelete this.invalid[element.name];\r\n\t\t\t} else {\r\n\t\t\t\tthis.invalid[element.name] = true;\r\n\t\t\t}\r\n\t\t\tif ( !this.numberOfInvalids() ) {\r\n\t\t\t\t// Hide error containers on last error\r\n\t\t\t\tthis.toHide = this.toHide.add( this.containers );\r\n\t\t\t}\r\n\t\t\tthis.showErrors();\r\n\t\t\treturn result;\r\n\t\t},\r\n\r\n\t\t// http://docs.jquery.com/Plugins/Validation/Validator/showErrors\r\n\t\tshowErrors: function(errors) {\r\n\t\t\t/// <summary>\r\n\t\t\t/// Show the specified messages.\r\n\t\t\t/// Keys have to refer to the names of elements, values are displayed for those elements, using the configured error placement.\r\n\t\t\t/// </summary>\r\n\t\t\t/// <param name=\"errors\" type=\"Object\">\r\n\t\t\t/// One or more key/value pairs of input names and messages.\r\n\t\t\t/// </param>\r\n\r\n\t\t\tif(errors) {\r\n\t\t\t\t// add items to error list and map\r\n\t\t\t\t$.extend( this.errorMap, errors );\r\n\t\t\t\tthis.errorList = [];\r\n\t\t\t\tfor ( var name in errors ) {\r\n\t\t\t\t\tthis.errorList.push({\r\n\t\t\t\t\t\tmessage: errors[name],\r\n\t\t\t\t\t\telement: this.findByName(name)[0]\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t\t// remove items from success list\r\n\t\t\t\tthis.successList = $.grep( this.successList, function(element) {\r\n\t\t\t\t\treturn !(element.name in errors);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t\tthis.settings.showErrors\r\n\t\t\t\t? this.settings.showErrors.call( this, this.errorMap, this.errorList )\r\n\t\t\t\t: this.defaultShowErrors();\r\n\t\t},\r\n\t\t\r\n\t\t// http://docs.jquery.com/Plugins/Validation/Validator/resetForm\r\n\t\tresetForm: function() {\r\n\t\t\t/// <summary>\r\n\t\t\t/// Resets the controlled form.\r\n\t\t\t/// Resets input fields to their original value (requires form plugin), removes classes\r\n\t\t\t/// indicating invalid elements and hides error messages.\r\n\t\t\t/// </summary>\r\n\r\n\t\t\tif ( $.fn.resetForm )\r\n\t\t\t\t$( this.currentForm ).resetForm();\r\n\t\t\tthis.submitted = {};\r\n\t\t\tthis.prepareForm();\r\n\t\t\tthis.hideErrors();\r\n\t\t\tthis.elements().removeClass( this.settings.errorClass );\r\n\t\t},\r\n\t\t\r\n\t\tnumberOfInvalids: function() {\r\n\t\t\t/// <summary>\r\n\t\t\t/// Returns the number of invalid fields.\r\n\t\t\t/// This depends on the internal validator state. It covers all fields only after\r\n\t\t\t/// validating the complete form (on submit or via $(\"form\").valid()). After validating\r\n\t\t\t/// a single element, only that element is counted. Most useful in combination with the\r\n\t\t\t/// invalidHandler-option.\r\n\t\t\t/// </summary>\r\n\t\t\t/// <returns type=\"Number\" />\r\n\r\n\t\t\treturn this.objectLength(this.invalid);\r\n\t\t},\r\n\t\t\r\n\t\tobjectLength: function( obj ) {\r\n\t\t\tvar count = 0;\r\n\t\t\tfor ( var i in obj )\r\n\t\t\t\tcount++;\r\n\t\t\treturn count;\r\n\t\t},\r\n\t\t\r\n\t\thideErrors: function() {\r\n\t\t\tthis.addWrapper( this.toHide ).hide();\r\n\t\t},\r\n\t\t\r\n\t\tvalid: function() {\r\n\t\t\treturn this.size() == 0;\r\n\t\t},\r\n\t\t\r\n\t\tsize: function() {\r\n\t\t\treturn this.errorList.length;\r\n\t\t},\r\n\t\t\r\n\t\tfocusInvalid: function() {\r\n\t\t\tif( this.settings.focusInvalid ) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\t$(this.findLastActive() || this.errorList.length && this.errorList[0].element || [])\r\n\t\t\t\t\t.filter(\":visible\")\r\n\t\t\t\t\t.focus()\r\n\t\t\t\t\t// manually trigger focusin event; without it, focusin handler isn't called, findLastActive won't have anything to find\r\n\t\t\t\t\t.trigger(\"focusin\");\r\n\t\t\t\t} catch(e) {\r\n\t\t\t\t\t// ignore IE throwing errors when focusing hidden elements\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\t\t\r\n\t\tfindLastActive: function() {\r\n\t\t\tvar lastActive = this.lastActive;\r\n\t\t\treturn lastActive && $.grep(this.errorList, function(n) {\r\n\t\t\t\treturn n.element.name == lastActive.name;\r\n\t\t\t}).length == 1 && lastActive;\r\n\t\t},\r\n\t\t\r\n\t\telements: function() {\r\n\t\t\tvar validator = this,\r\n\t\t\t\trulesCache = {};\r\n\t\t\t\r\n\t\t\t// select all valid inputs inside the form (no submit or reset buttons)\r\n\t\t\t// workaround $Query([]).add until http://dev.jquery.com/ticket/2114 is solved\r\n\t\t\treturn $([]).add(this.currentForm.elements)\r\n\t\t\t.filter(\":input\")\r\n\t\t\t.not(\":submit, :reset, :image, [disabled]\")\r\n\t\t\t.not( this.settings.ignore )\r\n\t\t\t.filter(function() {\r\n\t\t\t\t!this.name && validator.settings.debug && window.console && console.error( \"%o has no name assigned\", this);\r\n\t\t\t\r\n\t\t\t\t// select only the first element for each name, and only those with rules specified\r\n\t\t\t\tif ( this.name in rulesCache || !validator.objectLength($(this).rules()) )\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t\r\n\t\t\t\trulesCache[this.name] = true;\r\n\t\t\t\treturn true;\r\n\t\t\t});\r\n\t\t},\r\n\t\t\r\n\t\tclean: function( selector ) {\r\n\t\t\treturn $( selector )[0];\r\n\t\t},\r\n\t\t\r\n\t\terrors: function() {\r\n\t\t\treturn $( this.settings.errorElement + \".\" + this.settings.errorClass, this.errorContext );\r\n\t\t},\r\n\t\t\r\n\t\treset: function() {\r\n\t\t\tthis.successList = [];\r\n\t\t\tthis.errorList = [];\r\n\t\t\tthis.errorMap = {};\r\n\t\t\tthis.toShow = $([]);\r\n\t\t\tthis.toHide = $([]);\r\n\t\t\tthis.currentElements = $([]);\r\n\t\t},\r\n\t\t\r\n\t\tprepareForm: function() {\r\n\t\t\tthis.reset();\r\n\t\t\tthis.toHide = this.errors().add( this.containers );\r\n\t\t},\r\n\t\t\r\n\t\tprepareElement: function( element ) {\r\n\t\t\tthis.reset();\r\n\t\t\tthis.toHide = this.errorsFor(element);\r\n\t\t},\r\n\t\r\n\t\tcheck: function( element ) {\r\n\t\t\telement = this.clean( element );\r\n\t\t\t\r\n\t\t\t// if radio/checkbox, validate first element in group instead\r\n\t\t\tif (this.checkable(element)) {\r\n\t\t\t    element = this.findByName(element.name).not(this.settings.ignore)[0];\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tvar rules = $(element).rules();\r\n\t\t\tvar dependencyMismatch = false;\r\n\t\t\tfor (var method in rules) {\r\n\t\t\t\tvar rule = { method: method, parameters: rules[method] };\r\n\t\t\t\ttry {\r\n\t\t\t\t\tvar result = $.validator.methods[method].call( this, element.value.replace(/\\r/g, \"\"), element, rule.parameters );\r\n\t\t\t\t\t\r\n\t\t\t\t\t// if a method indicates that the field is optional and therefore valid,\r\n\t\t\t\t\t// don't mark it as valid when there are no other rules\r\n\t\t\t\t\tif ( result == \"dependency-mismatch\" ) {\r\n\t\t\t\t\t\tdependencyMismatch = true;\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tdependencyMismatch = false;\r\n\t\t\t\t\t\r\n\t\t\t\t\tif ( result == \"pending\" ) {\r\n\t\t\t\t\t\tthis.toHide = this.toHide.not( this.errorsFor(element) );\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tif( !result ) {\r\n\t\t\t\t\t\tthis.formatAndAdd( element, rule );\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t} catch(e) {\r\n\t\t\t\t\tthis.settings.debug && window.console && console.log(\"exception occured when checking element \" + element.id\r\n\t\t\t\t\t\t + \", check the '\" + rule.method + \"' method\", e);\r\n\t\t\t\t\tthrow e;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (dependencyMismatch)\r\n\t\t\t\treturn;\r\n\t\t\tif ( this.objectLength(rules) )\r\n\t\t\t\tthis.successList.push(element);\r\n\t\t\treturn true;\r\n\t\t},\r\n\t\t\r\n\t\t// return the custom message for the given element and validation method\r\n\t\t// specified in the element's \"messages\" metadata\r\n\t\tcustomMetaMessage: function(element, method) {\r\n\t\t\tif (!$.metadata)\r\n\t\t\t\treturn;\r\n\t\t\t\r\n\t\t\tvar meta = this.settings.meta\r\n\t\t\t\t? $(element).metadata()[this.settings.meta]\r\n\t\t\t\t: $(element).metadata();\r\n\t\t\t\r\n\t\t\treturn meta && meta.messages && meta.messages[method];\r\n\t\t},\r\n\t\t\r\n\t\t// return the custom message for the given element name and validation method\r\n\t\tcustomMessage: function( name, method ) {\r\n\t\t\tvar m = this.settings.messages[name];\r\n\t\t\treturn m && (m.constructor == String\r\n\t\t\t\t? m\r\n\t\t\t\t: m[method]);\r\n\t\t},\r\n\t\t\r\n\t\t// return the first defined argument, allowing empty strings\r\n\t\tfindDefined: function() {\r\n\t\t\tfor(var i = 0; i < arguments.length; i++) {\r\n\t\t\t\tif (arguments[i] !== undefined)\r\n\t\t\t\t\treturn arguments[i];\r\n\t\t\t}\r\n\t\t\treturn undefined;\r\n\t\t},\r\n\t\t\r\n\t\tdefaultMessage: function( element, method) {\r\n\t\t\treturn this.findDefined(\r\n\t\t\t\tthis.customMessage( element.name, method ),\r\n\t\t\t\tthis.customMetaMessage( element, method ),\r\n\t\t\t\t// title is never undefined, so handle empty string as undefined\r\n\t\t\t\t!this.settings.ignoreTitle && element.title || undefined,\r\n\t\t\t\t$.validator.messages[method],\r\n\t\t\t\t\"<strong>Warning: No message defined for \" + element.name + \"</strong>\"\r\n\t\t\t);\r\n\t\t},\r\n\t\t\r\n\t\tformatAndAdd: function( element, rule ) {\r\n\t\t\tvar message = this.defaultMessage( element, rule.method ),\r\n\t\t\t\ttheregex = /\\$?\\{(\\d+)\\}/g;\r\n\t\t\tif ( typeof message == \"function\" ) {\r\n\t\t\t\tmessage = message.call(this, rule.parameters, element);\r\n\t\t\t} else if (theregex.test(message)) {\r\n\t\t\t\tmessage = jQuery.format(message.replace(theregex, '{$1}'), rule.parameters);\r\n\t\t\t}\t\t\t\r\n\t\t\tthis.errorList.push({\r\n\t\t\t\tmessage: message,\r\n\t\t\t\telement: element\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.errorMap[element.name] = message;\r\n\t\t\tthis.submitted[element.name] = message;\r\n\t\t},\r\n\t\t\r\n\t\taddWrapper: function(toToggle) {\r\n\t\t\tif ( this.settings.wrapper )\r\n\t\t\t\ttoToggle = toToggle.add( toToggle.parent( this.settings.wrapper ) );\r\n\t\t\treturn toToggle;\r\n\t\t},\r\n\t\t\r\n\t\tdefaultShowErrors: function() {\r\n\t\t\tfor ( var i = 0; this.errorList[i]; i++ ) {\r\n\t\t\t\tvar error = this.errorList[i];\r\n\t\t\t\tthis.settings.highlight && this.settings.highlight.call( this, error.element, this.settings.errorClass, this.settings.validClass );\r\n\t\t\t\tthis.showLabel( error.element, error.message );\r\n\t\t\t}\r\n\t\t\tif( this.errorList.length ) {\r\n\t\t\t\tthis.toShow = this.toShow.add( this.containers );\r\n\t\t\t}\r\n\t\t\tif (this.settings.success) {\r\n\t\t\t\tfor ( var i = 0; this.successList[i]; i++ ) {\r\n\t\t\t\t\tthis.showLabel( this.successList[i] );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (this.settings.unhighlight) {\r\n\t\t\t\tfor ( var i = 0, elements = this.validElements(); elements[i]; i++ ) {\r\n\t\t\t\t\tthis.settings.unhighlight.call( this, elements[i], this.settings.errorClass, this.settings.validClass );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tthis.toHide = this.toHide.not( this.toShow );\r\n\t\t\tthis.hideErrors();\r\n\t\t\tthis.addWrapper( this.toShow ).show();\r\n\t\t},\r\n\t\t\r\n\t\tvalidElements: function() {\r\n\t\t\treturn this.currentElements.not(this.invalidElements());\r\n\t\t},\r\n\t\t\r\n\t\tinvalidElements: function() {\r\n\t\t\treturn $(this.errorList).map(function() {\r\n\t\t\t\treturn this.element;\r\n\t\t\t});\r\n\t\t},\r\n\t\t\r\n\t\tshowLabel: function(element, message) {\r\n\t\t\tvar label = this.errorsFor( element );\r\n\t\t\tif ( label.length ) {\r\n\t\t\t\t// refresh error/success class\r\n\t\t\t\tlabel.removeClass().addClass( this.settings.errorClass );\r\n\t\t\t\r\n\t\t\t\t// check if we have a generated label, replace the message then\r\n\t\t\t\tlabel.attr(\"generated\") && label.html(message);\r\n\t\t\t} else {\r\n\t\t\t\t// create label\r\n\t\t\t\tlabel = $(\"<\" + this.settings.errorElement + \"/>\")\r\n\t\t\t\t\t.attr({\"for\":  this.idOrName(element), generated: true})\r\n\t\t\t\t\t.addClass(this.settings.errorClass)\r\n\t\t\t\t\t.html(message || \"\");\r\n\t\t\t\tif ( this.settings.wrapper ) {\r\n\t\t\t\t\t// make sure the element is visible, even in IE\r\n\t\t\t\t\t// actually showing the wrapped element is handled elsewhere\r\n\t\t\t\t\tlabel = label.hide().show().wrap(\"<\" + this.settings.wrapper + \"/>\").parent();\r\n\t\t\t\t}\r\n\t\t\t\tif ( !this.labelContainer.append(label).length )\r\n\t\t\t\t\tthis.settings.errorPlacement\r\n\t\t\t\t\t\t? this.settings.errorPlacement(label, $(element) )\r\n\t\t\t\t\t\t: label.insertAfter(element);\r\n\t\t\t}\r\n\t\t\tif ( !message && this.settings.success ) {\r\n\t\t\t\tlabel.text(\"\");\r\n\t\t\t\ttypeof this.settings.success == \"string\"\r\n\t\t\t\t\t? label.addClass( this.settings.success )\r\n\t\t\t\t\t: this.settings.success( label );\r\n\t\t\t}\r\n\t\t\tthis.toShow = this.toShow.add(label);\r\n\t\t},\r\n\t\t\r\n\t\terrorsFor: function(element) {\r\n\t\t\tvar name = this.idOrName(element);\r\n    \t\treturn this.errors().filter(function() {\r\n\t\t\t\treturn $(this).attr('for') == name;\r\n\t\t\t});\r\n\t\t},\r\n\t\t\r\n\t\tidOrName: function(element) {\r\n\t\t\treturn this.groups[element.name] || (this.checkable(element) ? element.name : element.id || element.name);\r\n\t\t},\r\n\r\n\t\tcheckable: function( element ) {\r\n\t\t\treturn /radio|checkbox/i.test(element.type);\r\n\t\t},\r\n\t\t\r\n\t\tfindByName: function( name ) {\r\n\t\t\t// select by name and filter by form for performance over form.find(\"[name=...]\")\r\n\t\t\tvar form = this.currentForm;\r\n\t\t\treturn $(document.getElementsByName(name)).map(function(index, element) {\r\n\t\t\t\treturn element.form == form && element.name == name && element  || null;\r\n\t\t\t});\r\n\t\t},\r\n\t\t\r\n\t\tgetLength: function(value, element) {\r\n\t\t\tswitch( element.nodeName.toLowerCase() ) {\r\n\t\t\tcase 'select':\r\n\t\t\t\treturn $(\"option:selected\", element).length;\r\n\t\t\tcase 'input':\r\n\t\t\t\tif( this.checkable( element) )\r\n\t\t\t\t\treturn this.findByName(element.name).filter(':checked').length;\r\n\t\t\t}\r\n\t\t\treturn value.length;\r\n\t\t},\r\n\t\r\n\t\tdepend: function(param, element) {\r\n\t\t\treturn this.dependTypes[typeof param]\r\n\t\t\t\t? this.dependTypes[typeof param](param, element)\r\n\t\t\t\t: true;\r\n\t\t},\r\n\t\r\n\t\tdependTypes: {\r\n\t\t\t\"boolean\": function(param, element) {\r\n\t\t\t\treturn param;\r\n\t\t\t},\r\n\t\t\t\"string\": function(param, element) {\r\n\t\t\t\treturn !!$(param, element.form).length;\r\n\t\t\t},\r\n\t\t\t\"function\": function(param, element) {\r\n\t\t\t\treturn param(element);\r\n\t\t\t}\r\n\t\t},\r\n\t\t\r\n\t\toptional: function(element) {\r\n\t\t\treturn !$.validator.methods.required.call(this, $.trim(element.value), element) && \"dependency-mismatch\";\r\n\t\t},\r\n\t\t\r\n\t\tstartRequest: function(element) {\r\n\t\t\tif (!this.pending[element.name]) {\r\n\t\t\t\tthis.pendingRequest++;\r\n\t\t\t\tthis.pending[element.name] = true;\r\n\t\t\t}\r\n\t\t},\r\n\t\t\r\n\t\tstopRequest: function(element, valid) {\r\n\t\t\tthis.pendingRequest--;\r\n\t\t\t// sometimes synchronization fails, make sure pendingRequest is never < 0\r\n\t\t\tif (this.pendingRequest < 0)\r\n\t\t\t\tthis.pendingRequest = 0;\r\n\t\t\tdelete this.pending[element.name];\r\n\t\t\tif ( valid && this.pendingRequest == 0 && this.formSubmitted && this.form() ) {\r\n\t\t\t\t$(this.currentForm).submit();\r\n\t\t\t\tthis.formSubmitted = false;\r\n\t\t\t} else if (!valid && this.pendingRequest == 0 && this.formSubmitted) {\r\n\t\t\t\t$(this.currentForm).triggerHandler(\"invalid-form\", [this]);\r\n\t\t\t\tthis.formSubmitted = false;\r\n\t\t\t}\r\n\t\t},\r\n\t\t\r\n\t\tpreviousValue: function(element) {\r\n\t\t\treturn $.data(element, \"previousValue\") || $.data(element, \"previousValue\", {\r\n\t\t\t\told: null,\r\n\t\t\t\tvalid: true,\r\n\t\t\t\tmessage: this.defaultMessage( element, \"remote\" )\r\n\t\t\t});\r\n\t\t}\r\n\t\t\r\n\t},\r\n\t\r\n\tclassRuleSettings: {\r\n\t\trequired: {required: true},\r\n\t\temail: {email: true},\r\n\t\turl: {url: true},\r\n\t\tdate: {date: true},\r\n\t\tdateISO: {dateISO: true},\r\n\t\tdateDE: {dateDE: true},\r\n\t\tnumber: {number: true},\r\n\t\tnumberDE: {numberDE: true},\r\n\t\tdigits: {digits: true},\r\n\t\tcreditcard: {creditcard: true}\r\n\t},\r\n\t\r\n\taddClassRules: function(className, rules) {\r\n\t\t/// <summary>\r\n\t\t/// Add a compound class method - useful to refactor common combinations of rules into a single\r\n\t\t/// class.\r\n\t\t/// </summary>\r\n\t\t/// <param name=\"name\" type=\"String\">\r\n\t\t/// The name of the class rule to add\r\n\t\t/// </param>\r\n\t\t/// <param name=\"rules\" type=\"Options\">\r\n\t\t/// The compound rules\r\n\t\t/// </param>\r\n\r\n\t\tclassName.constructor == String ?\r\n\t\t\tthis.classRuleSettings[className] = rules :\r\n\t\t\t$.extend(this.classRuleSettings, className);\r\n\t},\r\n\t\r\n\tclassRules: function(element) {\r\n\t\tvar rules = {};\r\n\t\tvar classes = $(element).attr('class');\r\n\t\tclasses && $.each(classes.split(' '), function() {\r\n\t\t\tif (this in $.validator.classRuleSettings) {\r\n\t\t\t\t$.extend(rules, $.validator.classRuleSettings[this]);\r\n\t\t\t}\r\n\t\t});\r\n\t\treturn rules;\r\n\t},\r\n\t\r\n\tattributeRules: function(element) {\r\n\t\tvar rules = {};\r\n\t\tvar $element = $(element);\r\n\r\n\t\tfor (var method in $.validator.methods) {\r\n\t\t\tvar value = $element.attr(method);\r\n\t\t\tif (value) {\r\n\t\t\t\trules[method] = value;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// maxlength may be returned as -1, 2147483647 (IE) and 524288 (safari) for text inputs\r\n\t\tif (rules.maxlength && /-1|2147483647|524288/.test(rules.maxlength)) {\r\n\t\t\tdelete rules.maxlength;\r\n\t\t}\r\n\t\t\r\n\t\treturn rules;\r\n\t},\r\n\t\r\n\tmetadataRules: function(element) {\r\n\t\tif (!$.metadata) return {};\r\n\t\t\r\n\t\tvar meta = $.data(element.form, 'validator').settings.meta;\r\n\t\treturn meta ?\r\n\t\t\t$(element).metadata()[meta] :\r\n\t\t\t$(element).metadata();\r\n\t},\r\n\t\r\n\tstaticRules: function(element) {\r\n\t\tvar rules = {};\r\n\t\tvar validator = $.data(element.form, 'validator');\r\n\t\tif (validator.settings.rules) {\r\n\t\t\trules = $.validator.normalizeRule(validator.settings.rules[element.name]) || {};\r\n\t\t}\r\n\t\treturn rules;\r\n\t},\r\n\t\r\n\tnormalizeRules: function(rules, element) {\r\n\t\t// handle dependency check\r\n\t\t$.each(rules, function(prop, val) {\r\n\t\t\t// ignore rule when param is explicitly false, eg. required:false\r\n\t\t\tif (val === false) {\r\n\t\t\t\tdelete rules[prop];\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tif (val.param || val.depends) {\r\n\t\t\t\tvar keepRule = true;\r\n\t\t\t\tswitch (typeof val.depends) {\r\n\t\t\t\t\tcase \"string\":\r\n\t\t\t\t\t\tkeepRule = !!$(val.depends, element.form).length;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"function\":\r\n\t\t\t\t\t\tkeepRule = val.depends.call(element, element);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tif (keepRule) {\r\n\t\t\t\t\trules[prop] = val.param !== undefined ? val.param : true;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tdelete rules[prop];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\t// evaluate parameters\r\n\t\t$.each(rules, function(rule, parameter) {\r\n\t\t\trules[rule] = $.isFunction(parameter) ? parameter(element) : parameter;\r\n\t\t});\r\n\t\t\r\n\t\t// clean number parameters\r\n\t\t$.each(['minlength', 'maxlength', 'min', 'max'], function() {\r\n\t\t\tif (rules[this]) {\r\n\t\t\t\trules[this] = Number(rules[this]);\r\n\t\t\t}\r\n\t\t});\r\n\t\t$.each(['rangelength', 'range'], function() {\r\n\t\t\tif (rules[this]) {\r\n\t\t\t\trules[this] = [Number(rules[this][0]), Number(rules[this][1])];\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tif ($.validator.autoCreateRanges) {\r\n\t\t\t// auto-create ranges\r\n\t\t\tif (rules.min && rules.max) {\r\n\t\t\t\trules.range = [rules.min, rules.max];\r\n\t\t\t\tdelete rules.min;\r\n\t\t\t\tdelete rules.max;\r\n\t\t\t}\r\n\t\t\tif (rules.minlength && rules.maxlength) {\r\n\t\t\t\trules.rangelength = [rules.minlength, rules.maxlength];\r\n\t\t\t\tdelete rules.minlength;\r\n\t\t\t\tdelete rules.maxlength;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// To support custom messages in metadata ignore rule methods titled \"messages\"\r\n\t\tif (rules.messages) {\r\n\t\t\tdelete rules.messages;\r\n\t\t}\r\n\t\t\r\n\t\treturn rules;\r\n\t},\r\n\t\r\n\t// Converts a simple string to a {string: true} rule, e.g., \"required\" to {required:true}\r\n\tnormalizeRule: function(data) {\r\n\t\tif( typeof data == \"string\" ) {\r\n\t\t\tvar transformed = {};\r\n\t\t\t$.each(data.split(/\\s/), function() {\r\n\t\t\t\ttransformed[this] = true;\r\n\t\t\t});\r\n\t\t\tdata = transformed;\r\n\t\t}\r\n\t\treturn data;\r\n\t},\r\n\t\r\n\t// http://docs.jquery.com/Plugins/Validation/Validator/addMethod\r\n\taddMethod: function(name, method, message) {\r\n\t\t/// <summary>\r\n\t\t/// Add a custom validation method. It must consist of a name (must be a legal javascript \r\n\t\t/// identifier), a javascript based function and a default string message.\r\n\t\t/// </summary>\r\n\t\t/// <param name=\"name\" type=\"String\">\r\n\t\t/// The name of the method, used to identify and referencing it, must be a valid javascript\r\n\t\t/// identifier\r\n\t\t/// </param>\r\n\t\t/// <param name=\"method\" type=\"Function\">\r\n\t\t/// The actual method implementation, returning true if an element is valid\r\n\t\t/// </param>\r\n\t\t/// <param name=\"message\" type=\"String\" optional=\"true\">\r\n\t\t/// (Optional) The default message to display for this method. Can be a function created by \r\n\t\t/// jQuery.validator.format(value). When undefined, an already existing message is used \r\n\t\t/// (handy for localization), otherwise the field-specific messages have to be defined.\r\n\t\t/// </param>\r\n\r\n\t\t$.validator.methods[name] = method;\r\n\t\t$.validator.messages[name] = message != undefined ? message : $.validator.messages[name];\r\n\t\tif (method.length < 3) {\r\n\t\t\t$.validator.addClassRules(name, $.validator.normalizeRule(name));\r\n\t\t}\r\n\t},\r\n\r\n\tmethods: {\r\n\r\n\t\t// http://docs.jquery.com/Plugins/Validation/Methods/required\r\n\t\trequired: function(value, element, param) {\r\n\t\t\t// check if dependency is met\r\n\t\t\tif ( !this.depend(param, element) )\r\n\t\t\t\treturn \"dependency-mismatch\";\r\n\t\t\tswitch( element.nodeName.toLowerCase() ) {\r\n\t\t\tcase 'select':\r\n\t\t\t\t// could be an array for select-multiple or a string, both are fine this way\r\n\t\t\t\tvar val = $(element).val();\r\n\t\t\t\treturn val && val.length > 0;\r\n\t\t\tcase 'input':\r\n\t\t\t\tif ( this.checkable(element) )\r\n\t\t\t\t\treturn this.getLength(value, element) > 0;\r\n\t\t\tdefault:\r\n\t\t\t\treturn $.trim(value).length > 0;\r\n\t\t\t}\r\n\t\t},\r\n\t\t\r\n\t\t// http://docs.jquery.com/Plugins/Validation/Methods/remote\r\n\t\tremote: function(value, element, param) {\r\n\t\t\tif ( this.optional(element) )\r\n\t\t\t\treturn \"dependency-mismatch\";\r\n\t\t\t\r\n\t\t\tvar previous = this.previousValue(element);\r\n\t\t\tif (!this.settings.messages[element.name] )\r\n\t\t\t\tthis.settings.messages[element.name] = {};\r\n\t\t\tprevious.originalMessage = this.settings.messages[element.name].remote;\r\n\t\t\tthis.settings.messages[element.name].remote = previous.message;\r\n\t\t\t\r\n\t\t\tparam = typeof param == \"string\" && {url:param} || param; \r\n\t\t\t\r\n\t\t\tif ( this.pending[element.name] ) {\r\n\t\t\t\treturn \"pending\";\r\n\t\t\t}\r\n\t\t\tif ( previous.old === value ) {\r\n\t\t\t\treturn previous.valid;\r\n\t\t\t}\r\n\r\n\t\t\tprevious.old = value;\r\n\t\t\tvar validator = this;\r\n\t\t\tthis.startRequest(element);\r\n\t\t\tvar data = {};\r\n\t\t\tdata[element.name] = value;\r\n\t\t\t$.ajax($.extend(true, {\r\n\t\t\t\turl: param,\r\n\t\t\t\tmode: \"abort\",\r\n\t\t\t\tport: \"validate\" + element.name,\r\n\t\t\t\tdataType: \"json\",\r\n\t\t\t\tdata: data,\r\n\t\t\t\tsuccess: function(response) {\r\n\t\t\t\t\tvalidator.settings.messages[element.name].remote = previous.originalMessage;\r\n\t\t\t\t\tvar valid = response === true;\r\n\t\t\t\t\tif ( valid ) {\r\n\t\t\t\t\t\tvar submitted = validator.formSubmitted;\r\n\t\t\t\t\t\tvalidator.prepareElement(element);\r\n\t\t\t\t\t\tvalidator.formSubmitted = submitted;\r\n\t\t\t\t\t\tvalidator.successList.push(element);\r\n\t\t\t\t\t\tvalidator.showErrors();\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tvar errors = {};\r\n\t\t\t\t\t\tvar message = response || validator.defaultMessage(element, \"remote\");\r\n\t\t\t\t\t\terrors[element.name] = previous.message = $.isFunction(message) ? message(value) : message;\r\n\t\t\t\t\t\tvalidator.showErrors(errors);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tprevious.valid = valid;\r\n\t\t\t\t\tvalidator.stopRequest(element, valid);\r\n\t\t\t\t}\r\n\t\t\t}, param));\r\n\t\t\treturn \"pending\";\r\n\t\t},\r\n\r\n\t\t// http://docs.jquery.com/Plugins/Validation/Methods/minlength\r\n\t\tminlength: function(value, element, param) {\r\n\t\t\treturn this.optional(element) || this.getLength($.trim(value), element) >= param;\r\n\t\t},\r\n\t\t\r\n\t\t// http://docs.jquery.com/Plugins/Validation/Methods/maxlength\r\n\t\tmaxlength: function(value, element, param) {\r\n\t\t\treturn this.optional(element) || this.getLength($.trim(value), element) <= param;\r\n\t\t},\r\n\t\t\r\n\t\t// http://docs.jquery.com/Plugins/Validation/Methods/rangelength\r\n\t\trangelength: function(value, element, param) {\r\n\t\t\tvar length = this.getLength($.trim(value), element);\r\n\t\t\treturn this.optional(element) || ( length >= param[0] && length <= param[1] );\r\n\t\t},\r\n\t\t\r\n\t\t// http://docs.jquery.com/Plugins/Validation/Methods/min\r\n\t\tmin: function( value, element, param ) {\r\n\t\t\treturn this.optional(element) || value >= param;\r\n\t\t},\r\n\t\t\r\n\t\t// http://docs.jquery.com/Plugins/Validation/Methods/max\r\n\t\tmax: function( value, element, param ) {\r\n\t\t\treturn this.optional(element) || value <= param;\r\n\t\t},\r\n\t\t\r\n\t\t// http://docs.jquery.com/Plugins/Validation/Methods/range\r\n\t\trange: function( value, element, param ) {\r\n\t\t\treturn this.optional(element) || ( value >= param[0] && value <= param[1] );\r\n\t\t},\r\n\t\t\r\n\t\t// http://docs.jquery.com/Plugins/Validation/Methods/email\r\n\t\temail: function(value, element) {\r\n\t\t\t// contributed by Scott Gonzalez: http://projects.scottsplayground.com/email_address_validation/\r\n\t\t\treturn this.optional(element) || /^((([a-z]|\\d|[!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])+(\\.([a-z]|\\d|[!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])+)*)|((\\x22)((((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(([\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x7f]|\\x21|[\\x23-\\x5b]|[\\x5d-\\x7e]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(\\\\([\\x01-\\x09\\x0b\\x0c\\x0d-\\x7f]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]))))*(((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(\\x22)))@((([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))\\.)+(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))\\.?$/i.test(value);\r\n\t\t},\r\n\t\r\n\t\t// http://docs.jquery.com/Plugins/Validation/Methods/url\r\n\t\turl: function(value, element) {\r\n\t\t\t// contributed by Scott Gonzalez: http://projects.scottsplayground.com/iri/\r\n\t\t\treturn this.optional(element) || /^(https?|ftp):\\/\\/(((([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&'\\(\\)\\*\\+,;=]|:)*@)?(((\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5]))|((([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))\\.)+(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))\\.?)(:\\d*)?)(\\/((([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&'\\(\\)\\*\\+,;=]|:|@)+(\\/(([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&'\\(\\)\\*\\+,;=]|:|@)*)*)?)?(\\?((([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&'\\(\\)\\*\\+,;=]|:|@)|[\\uE000-\\uF8FF]|\\/|\\?)*)?(\\#((([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&'\\(\\)\\*\\+,;=]|:|@)|\\/|\\?)*)?$/i.test(value);\r\n\t\t},\r\n        \r\n\t\t// http://docs.jquery.com/Plugins/Validation/Methods/date\r\n\t\tdate: function(value, element) {\r\n\t\t\treturn this.optional(element) || !/Invalid|NaN/.test(new Date(value));\r\n\t\t},\r\n\t\r\n\t\t// http://docs.jquery.com/Plugins/Validation/Methods/dateISO\r\n\t\tdateISO: function(value, element) {\r\n\t\t\treturn this.optional(element) || /^\\d{4}[\\/-]\\d{1,2}[\\/-]\\d{1,2}$/.test(value);\r\n\t\t},\r\n\t\r\n\t\t// http://docs.jquery.com/Plugins/Validation/Methods/number\r\n\t\tnumber: function(value, element) {\r\n\t\t\treturn this.optional(element) || /^-?(?:\\d+|\\d{1,3}(?:,\\d{3})+)(?:\\.\\d+)?$/.test(value);\r\n\t\t},\r\n\t\r\n\t\t// http://docs.jquery.com/Plugins/Validation/Methods/digits\r\n\t\tdigits: function(value, element) {\r\n\t\t\treturn this.optional(element) || /^\\d+$/.test(value);\r\n\t\t},\r\n\t\t\r\n\t\t// http://docs.jquery.com/Plugins/Validation/Methods/creditcard\r\n\t\t// based on http://en.wikipedia.org/wiki/Luhn\r\n\t\tcreditcard: function(value, element) {\r\n\t\t\tif ( this.optional(element) )\r\n\t\t\t\treturn \"dependency-mismatch\";\r\n\t\t\t// accept only digits and dashes\r\n\t\t\tif (/[^0-9-]+/.test(value))\r\n\t\t\t\treturn false;\r\n\t\t\tvar nCheck = 0,\r\n\t\t\t\tnDigit = 0,\r\n\t\t\t\tbEven = false;\r\n\r\n\t\t\tvalue = value.replace(/\\D/g, \"\");\r\n\r\n\t\t\tfor (var n = value.length - 1; n >= 0; n--) {\r\n\t\t\t\tvar cDigit = value.charAt(n);\r\n\t\t\t\tvar nDigit = parseInt(cDigit, 10);\r\n\t\t\t\tif (bEven) {\r\n\t\t\t\t\tif ((nDigit *= 2) > 9)\r\n\t\t\t\t\t\tnDigit -= 9;\r\n\t\t\t\t}\r\n\t\t\t\tnCheck += nDigit;\r\n\t\t\t\tbEven = !bEven;\r\n\t\t\t}\r\n\r\n\t\t\treturn (nCheck % 10) == 0;\r\n\t\t},\r\n\t\t\r\n\t\t// http://docs.jquery.com/Plugins/Validation/Methods/accept\r\n\t\taccept: function(value, element, param) {\r\n\t\t\tparam = typeof param == \"string\" ? param.replace(/,/g, '|') : \"png|jpe?g|gif\";\r\n\t\t\treturn this.optional(element) || value.match(new RegExp(\".(\" + param + \")$\", \"i\")); \r\n\t\t},\r\n\t\t\r\n\t\t// http://docs.jquery.com/Plugins/Validation/Methods/equalTo\r\n\t\tequalTo: function(value, element, param) {\r\n\t\t\t// bind to the blur event of the target in order to revalidate whenever the target field is updated\r\n\t\t\t// TODO find a way to bind the event just once, avoiding the unbind-rebind overhead\r\n\t\t\tvar target = $(param).unbind(\".validate-equalTo\").bind(\"blur.validate-equalTo\", function() {\r\n\t\t\t\t$(element).valid();\r\n\t\t\t});\r\n\t\t\treturn value == target.val();\r\n\t\t}\r\n\t\t\r\n\t}\r\n\t\r\n});\r\n\r\n// deprecated, use $.validator.format instead\r\n$.format = $.validator.format;\r\n\r\n})(jQuery);\r\n\r\n// ajax mode: abort\r\n// usage: $.ajax({ mode: \"abort\"[, port: \"uniqueport\"]});\r\n// if mode:\"abort\" is used, the previous request on that port (port can be undefined) is aborted via XMLHttpRequest.abort() \r\n;(function($) {\r\n\tvar pendingRequests = {};\r\n\t\t// Use a prefilter if available (1.5+)\r\n\tif ( $.ajaxPrefilter ) {\r\n\t\t$.ajaxPrefilter(function(settings, _, xhr) {\r\n\t\t    var port = settings.port;\r\n\t\t    if (settings.mode == \"abort\") {\r\n\t\t\t    if ( pendingRequests[port] ) {\r\n\t\t\t\t    pendingRequests[port].abort();\r\n\t\t\t    }\t\t\t\tpendingRequests[port] = xhr;\r\n\t\t    }\r\n\t    });\r\n\t} else {\r\n\t\t// Proxy ajax\r\n\t\tvar ajax = $.ajax;\r\n\t\t$.ajax = function(settings) {\r\n\t\t\tvar mode = ( \"mode\" in settings ? settings : $.ajaxSettings ).mode,\r\n\t\t\t\tport = ( \"port\" in settings ? settings : $.ajaxSettings ).port;\r\n\t\t\tif (mode == \"abort\") {\r\n\t\t\t\tif ( pendingRequests[port] ) {\r\n\t\t\t\t\tpendingRequests[port].abort();\r\n\t\t\t\t}\r\n\r\n\t\t\t    return (pendingRequests[port] = ajax.apply(this, arguments));\r\n\t\t    }\r\n\t\t    return ajax.apply(this, arguments);\r\n\t    };\r\n    }\r\n})(jQuery);\r\n\r\n// provides cross-browser focusin and focusout events\r\n// IE has native support, in other browsers, use event caputuring (neither bubbles)\r\n\r\n// provides delegate(type: String, delegate: Selector, handler: Callback) plugin for easier event delegation\r\n// handler is only called when $(event.target).is(delegate), in the scope of the jquery-object for event.target \r\n;(function($) {\r\n\t// only implement if not provided by jQuery core (since 1.4)\r\n\t// TODO verify if jQuery 1.4's implementation is compatible with older jQuery special-event APIs\r\n\tif (!jQuery.event.special.focusin && !jQuery.event.special.focusout && document.addEventListener) {\r\n\t\t$.each({\r\n\t\t\tfocus: 'focusin',\r\n\t\t\tblur: 'focusout'\t\r\n\t\t}, function( original, fix ){\r\n\t\t\t$.event.special[fix] = {\r\n\t\t\t\tsetup:function() {\r\n\t\t\t\t\tthis.addEventListener( original, handler, true );\r\n\t\t\t\t},\r\n\t\t\t\tteardown:function() {\r\n\t\t\t\t\tthis.removeEventListener( original, handler, true );\r\n\t\t\t\t},\r\n\t\t\t\thandler: function(e) {\r\n\t\t\t\t\targuments[0] = $.event.fix(e);\r\n\t\t\t\t\targuments[0].type = fix;\r\n\t\t\t\t\treturn $.event.handle.apply(this, arguments);\r\n\t\t\t\t}\r\n\t\t\t};\r\n\t\t\tfunction handler(e) {\r\n\t\t\t\te = $.event.fix(e);\r\n\t\t\t\te.type = fix;\r\n\t\t\t\treturn $.event.handle.call(this, e);\r\n\t\t\t}\r\n\t\t});\r\n\t};\r\n\t$.extend($.fn, {\r\n\t\tvalidateDelegate: function(delegate, type, handler) {\r\n\t\t\treturn this.bind(type, function(event) {\r\n\t\t\t\tvar target = $(event.target);\r\n\t\t\t\tif (target.is(delegate)) {\r\n\t\t\t\t\treturn handler.apply(target, arguments);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t});\r\n})(jQuery);\r\n"
  },
  {
    "path": "23 - Architecting Application User Interfaces/PPPDDD.NonDist.UIComp/PPPDDD.NonDist.UIComp/Scripts/jquery.validate.js",
    "content": "﻿/* NUGET: BEGIN LICENSE TEXT\n *\n * Microsoft grants you the right to use these script files for the sole\n * purpose of either: (i) interacting through your browser with the Microsoft\n * website or online service, subject to the applicable licensing or use\n * terms; or (ii) using the files as included with a Microsoft product subject\n * to that product's license terms. Microsoft reserves all other rights to the\n * files not expressly granted by Microsoft, whether by implication, estoppel\n * or otherwise. Insofar as a script file is dual licensed under GPL,\n * Microsoft neither took the code under GPL nor distributes it thereunder but\n * under the terms set out in this paragraph. All notices and licenses\n * below are for informational purposes only.\n *\n * NUGET: END LICENSE TEXT */\n/*!\n * jQuery Validation Plugin 1.11.1\n *\n * http://bassistance.de/jquery-plugins/jquery-plugin-validation/\n * http://docs.jquery.com/Plugins/Validation\n *\n * Copyright 2013 Jörn Zaefferer\n * Released under the MIT license:\n *   http://www.opensource.org/licenses/mit-license.php\n */\n\n(function($) {\n\n$.extend($.fn, {\n\t// http://docs.jquery.com/Plugins/Validation/validate\n\tvalidate: function( options ) {\n\n\t\t// if nothing is selected, return nothing; can't chain anyway\n\t\tif ( !this.length ) {\n\t\t\tif ( options && options.debug && window.console ) {\n\t\t\t\tconsole.warn( \"Nothing selected, can't validate, returning nothing.\" );\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\t// check if a validator for this form was already created\n\t\tvar validator = $.data( this[0], \"validator\" );\n\t\tif ( validator ) {\n\t\t\treturn validator;\n\t\t}\n\n\t\t// Add novalidate tag if HTML5.\n\t\tthis.attr( \"novalidate\", \"novalidate\" );\n\n\t\tvalidator = new $.validator( options, this[0] );\n\t\t$.data( this[0], \"validator\", validator );\n\n\t\tif ( validator.settings.onsubmit ) {\n\n\t\t\tthis.validateDelegate( \":submit\", \"click\", function( event ) {\n\t\t\t\tif ( validator.settings.submitHandler ) {\n\t\t\t\t\tvalidator.submitButton = event.target;\n\t\t\t\t}\n\t\t\t\t// allow suppressing validation by adding a cancel class to the submit button\n\t\t\t\tif ( $(event.target).hasClass(\"cancel\") ) {\n\t\t\t\t\tvalidator.cancelSubmit = true;\n\t\t\t\t}\n\n\t\t\t\t// allow suppressing validation by adding the html5 formnovalidate attribute to the submit button\n\t\t\t\tif ( $(event.target).attr(\"formnovalidate\") !== undefined ) {\n\t\t\t\t\tvalidator.cancelSubmit = true;\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t// validate the form on submit\n\t\t\tthis.submit( function( event ) {\n\t\t\t\tif ( validator.settings.debug ) {\n\t\t\t\t\t// prevent form submit to be able to see console output\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t}\n\t\t\t\tfunction handle() {\n\t\t\t\t\tvar hidden;\n\t\t\t\t\tif ( validator.settings.submitHandler ) {\n\t\t\t\t\t\tif ( validator.submitButton ) {\n\t\t\t\t\t\t\t// insert a hidden input as a replacement for the missing submit button\n\t\t\t\t\t\t\thidden = $(\"<input type='hidden'/>\").attr(\"name\", validator.submitButton.name).val( $(validator.submitButton).val() ).appendTo(validator.currentForm);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tvalidator.settings.submitHandler.call( validator, validator.currentForm, event );\n\t\t\t\t\t\tif ( validator.submitButton ) {\n\t\t\t\t\t\t\t// and clean up afterwards; thanks to no-block-scope, hidden can be referenced\n\t\t\t\t\t\t\thidden.remove();\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\t// prevent submit for invalid forms or custom submit handlers\n\t\t\t\tif ( validator.cancelSubmit ) {\n\t\t\t\t\tvalidator.cancelSubmit = false;\n\t\t\t\t\treturn handle();\n\t\t\t\t}\n\t\t\t\tif ( validator.form() ) {\n\t\t\t\t\tif ( validator.pendingRequest ) {\n\t\t\t\t\t\tvalidator.formSubmitted = true;\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\treturn handle();\n\t\t\t\t} else {\n\t\t\t\t\tvalidator.focusInvalid();\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\treturn validator;\n\t},\n\t// http://docs.jquery.com/Plugins/Validation/valid\n\tvalid: function() {\n\t\tif ( $(this[0]).is(\"form\")) {\n\t\t\treturn this.validate().form();\n\t\t} else {\n\t\t\tvar valid = true;\n\t\t\tvar validator = $(this[0].form).validate();\n\t\t\tthis.each(function() {\n\t\t\t\tvalid = valid && validator.element(this);\n\t\t\t});\n\t\t\treturn valid;\n\t\t}\n\t},\n\t// attributes: space seperated list of attributes to retrieve and remove\n\tremoveAttrs: function( attributes ) {\n\t\tvar result = {},\n\t\t\t$element = this;\n\t\t$.each(attributes.split(/\\s/), function( index, value ) {\n\t\t\tresult[value] = $element.attr(value);\n\t\t\t$element.removeAttr(value);\n\t\t});\n\t\treturn result;\n\t},\n\t// http://docs.jquery.com/Plugins/Validation/rules\n\trules: function( command, argument ) {\n\t\tvar element = this[0];\n\n\t\tif ( command ) {\n\t\t\tvar settings = $.data(element.form, \"validator\").settings;\n\t\t\tvar staticRules = settings.rules;\n\t\t\tvar existingRules = $.validator.staticRules(element);\n\t\t\tswitch(command) {\n\t\t\tcase \"add\":\n\t\t\t\t$.extend(existingRules, $.validator.normalizeRule(argument));\n\t\t\t\t// remove messages from rules, but allow them to be set separetely\n\t\t\t\tdelete existingRules.messages;\n\t\t\t\tstaticRules[element.name] = existingRules;\n\t\t\t\tif ( argument.messages ) {\n\t\t\t\t\tsettings.messages[element.name] = $.extend( settings.messages[element.name], argument.messages );\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase \"remove\":\n\t\t\t\tif ( !argument ) {\n\t\t\t\t\tdelete staticRules[element.name];\n\t\t\t\t\treturn existingRules;\n\t\t\t\t}\n\t\t\t\tvar filtered = {};\n\t\t\t\t$.each(argument.split(/\\s/), function( index, method ) {\n\t\t\t\t\tfiltered[method] = existingRules[method];\n\t\t\t\t\tdelete existingRules[method];\n\t\t\t\t});\n\t\t\t\treturn filtered;\n\t\t\t}\n\t\t}\n\n\t\tvar data = $.validator.normalizeRules(\n\t\t$.extend(\n\t\t\t{},\n\t\t\t$.validator.classRules(element),\n\t\t\t$.validator.attributeRules(element),\n\t\t\t$.validator.dataRules(element),\n\t\t\t$.validator.staticRules(element)\n\t\t), element);\n\n\t\t// make sure required is at front\n\t\tif ( data.required ) {\n\t\t\tvar param = data.required;\n\t\t\tdelete data.required;\n\t\t\tdata = $.extend({required: param}, data);\n\t\t}\n\n\t\treturn data;\n\t}\n});\n\n// Custom selectors\n$.extend($.expr[\":\"], {\n\t// http://docs.jquery.com/Plugins/Validation/blank\n\tblank: function( a ) { return !$.trim(\"\" + $(a).val()); },\n\t// http://docs.jquery.com/Plugins/Validation/filled\n\tfilled: function( a ) { return !!$.trim(\"\" + $(a).val()); },\n\t// http://docs.jquery.com/Plugins/Validation/unchecked\n\tunchecked: function( a ) { return !$(a).prop(\"checked\"); }\n});\n\n// constructor for validator\n$.validator = function( options, form ) {\n\tthis.settings = $.extend( true, {}, $.validator.defaults, options );\n\tthis.currentForm = form;\n\tthis.init();\n};\n\n$.validator.format = function( source, params ) {\n\tif ( arguments.length === 1 ) {\n\t\treturn function() {\n\t\t\tvar args = $.makeArray(arguments);\n\t\t\targs.unshift(source);\n\t\t\treturn $.validator.format.apply( this, args );\n\t\t};\n\t}\n\tif ( arguments.length > 2 && params.constructor !== Array  ) {\n\t\tparams = $.makeArray(arguments).slice(1);\n\t}\n\tif ( params.constructor !== Array ) {\n\t\tparams = [ params ];\n\t}\n\t$.each(params, function( i, n ) {\n\t\tsource = source.replace( new RegExp(\"\\\\{\" + i + \"\\\\}\", \"g\"), function() {\n\t\t\treturn n;\n\t\t});\n\t});\n\treturn source;\n};\n\n$.extend($.validator, {\n\n\tdefaults: {\n\t\tmessages: {},\n\t\tgroups: {},\n\t\trules: {},\n\t\terrorClass: \"error\",\n\t\tvalidClass: \"valid\",\n\t\terrorElement: \"label\",\n\t\tfocusInvalid: true,\n\t\terrorContainer: $([]),\n\t\terrorLabelContainer: $([]),\n\t\tonsubmit: true,\n\t\tignore: \":hidden\",\n\t\tignoreTitle: false,\n\t\tonfocusin: function( element, event ) {\n\t\t\tthis.lastActive = element;\n\n\t\t\t// hide error label and remove error class on focus if enabled\n\t\t\tif ( this.settings.focusCleanup && !this.blockFocusCleanup ) {\n\t\t\t\tif ( this.settings.unhighlight ) {\n\t\t\t\t\tthis.settings.unhighlight.call( this, element, this.settings.errorClass, this.settings.validClass );\n\t\t\t\t}\n\t\t\t\tthis.addWrapper(this.errorsFor(element)).hide();\n\t\t\t}\n\t\t},\n\t\tonfocusout: function( element, event ) {\n\t\t\tif ( !this.checkable(element) && (element.name in this.submitted || !this.optional(element)) ) {\n\t\t\t\tthis.element(element);\n\t\t\t}\n\t\t},\n\t\tonkeyup: function( element, event ) {\n\t\t\tif ( event.which === 9 && this.elementValue(element) === \"\" ) {\n\t\t\t\treturn;\n\t\t\t} else if ( element.name in this.submitted || element === this.lastElement ) {\n\t\t\t\tthis.element(element);\n\t\t\t}\n\t\t},\n\t\tonclick: function( element, event ) {\n\t\t\t// click on selects, radiobuttons and checkboxes\n\t\t\tif ( element.name in this.submitted ) {\n\t\t\t\tthis.element(element);\n\t\t\t}\n\t\t\t// or option elements, check parent select in that case\n\t\t\telse if ( element.parentNode.name in this.submitted ) {\n\t\t\t\tthis.element(element.parentNode);\n\t\t\t}\n\t\t},\n\t\thighlight: function( element, errorClass, validClass ) {\n\t\t\tif ( element.type === \"radio\" ) {\n\t\t\t\tthis.findByName(element.name).addClass(errorClass).removeClass(validClass);\n\t\t\t} else {\n\t\t\t\t$(element).addClass(errorClass).removeClass(validClass);\n\t\t\t}\n\t\t},\n\t\tunhighlight: function( element, errorClass, validClass ) {\n\t\t\tif ( element.type === \"radio\" ) {\n\t\t\t\tthis.findByName(element.name).removeClass(errorClass).addClass(validClass);\n\t\t\t} else {\n\t\t\t\t$(element).removeClass(errorClass).addClass(validClass);\n\t\t\t}\n\t\t}\n\t},\n\n\t// http://docs.jquery.com/Plugins/Validation/Validator/setDefaults\n\tsetDefaults: function( settings ) {\n\t\t$.extend( $.validator.defaults, settings );\n\t},\n\n\tmessages: {\n\t\trequired: \"This field is required.\",\n\t\tremote: \"Please fix this field.\",\n\t\temail: \"Please enter a valid email address.\",\n\t\turl: \"Please enter a valid URL.\",\n\t\tdate: \"Please enter a valid date.\",\n\t\tdateISO: \"Please enter a valid date (ISO).\",\n\t\tnumber: \"Please enter a valid number.\",\n\t\tdigits: \"Please enter only digits.\",\n\t\tcreditcard: \"Please enter a valid credit card number.\",\n\t\tequalTo: \"Please enter the same value again.\",\n\t\tmaxlength: $.validator.format(\"Please enter no more than {0} characters.\"),\n\t\tminlength: $.validator.format(\"Please enter at least {0} characters.\"),\n\t\trangelength: $.validator.format(\"Please enter a value between {0} and {1} characters long.\"),\n\t\trange: $.validator.format(\"Please enter a value between {0} and {1}.\"),\n\t\tmax: $.validator.format(\"Please enter a value less than or equal to {0}.\"),\n\t\tmin: $.validator.format(\"Please enter a value greater than or equal to {0}.\")\n\t},\n\n\tautoCreateRanges: false,\n\n\tprototype: {\n\n\t\tinit: function() {\n\t\t\tthis.labelContainer = $(this.settings.errorLabelContainer);\n\t\t\tthis.errorContext = this.labelContainer.length && this.labelContainer || $(this.currentForm);\n\t\t\tthis.containers = $(this.settings.errorContainer).add( this.settings.errorLabelContainer );\n\t\t\tthis.submitted = {};\n\t\t\tthis.valueCache = {};\n\t\t\tthis.pendingRequest = 0;\n\t\t\tthis.pending = {};\n\t\t\tthis.invalid = {};\n\t\t\tthis.reset();\n\n\t\t\tvar groups = (this.groups = {});\n\t\t\t$.each(this.settings.groups, function( key, value ) {\n\t\t\t\tif ( typeof value === \"string\" ) {\n\t\t\t\t\tvalue = value.split(/\\s/);\n\t\t\t\t}\n\t\t\t\t$.each(value, function( index, name ) {\n\t\t\t\t\tgroups[name] = key;\n\t\t\t\t});\n\t\t\t});\n\t\t\tvar rules = this.settings.rules;\n\t\t\t$.each(rules, function( key, value ) {\n\t\t\t\trules[key] = $.validator.normalizeRule(value);\n\t\t\t});\n\n\t\t\tfunction delegate(event) {\n\t\t\t\tvar validator = $.data(this[0].form, \"validator\"),\n\t\t\t\t\teventType = \"on\" + event.type.replace(/^validate/, \"\");\n\t\t\t\tif ( validator.settings[eventType] ) {\n\t\t\t\t\tvalidator.settings[eventType].call(validator, this[0], event);\n\t\t\t\t}\n\t\t\t}\n\t\t\t$(this.currentForm)\n\t\t\t\t.validateDelegate(\":text, [type='password'], [type='file'], select, textarea, \" +\n\t\t\t\t\t\"[type='number'], [type='search'] ,[type='tel'], [type='url'], \" +\n\t\t\t\t\t\"[type='email'], [type='datetime'], [type='date'], [type='month'], \" +\n\t\t\t\t\t\"[type='week'], [type='time'], [type='datetime-local'], \" +\n\t\t\t\t\t\"[type='range'], [type='color'] \",\n\t\t\t\t\t\"focusin focusout keyup\", delegate)\n\t\t\t\t.validateDelegate(\"[type='radio'], [type='checkbox'], select, option\", \"click\", delegate);\n\n\t\t\tif ( this.settings.invalidHandler ) {\n\t\t\t\t$(this.currentForm).bind(\"invalid-form.validate\", this.settings.invalidHandler);\n\t\t\t}\n\t\t},\n\n\t\t// http://docs.jquery.com/Plugins/Validation/Validator/form\n\t\tform: function() {\n\t\t\tthis.checkForm();\n\t\t\t$.extend(this.submitted, this.errorMap);\n\t\t\tthis.invalid = $.extend({}, this.errorMap);\n\t\t\tif ( !this.valid() ) {\n\t\t\t\t$(this.currentForm).triggerHandler(\"invalid-form\", [this]);\n\t\t\t}\n\t\t\tthis.showErrors();\n\t\t\treturn this.valid();\n\t\t},\n\n\t\tcheckForm: function() {\n\t\t\tthis.prepareForm();\n\t\t\tfor ( var i = 0, elements = (this.currentElements = this.elements()); elements[i]; i++ ) {\n\t\t\t\tthis.check( elements[i] );\n\t\t\t}\n\t\t\treturn this.valid();\n\t\t},\n\n\t\t// http://docs.jquery.com/Plugins/Validation/Validator/element\n\t\telement: function( element ) {\n\t\t\telement = this.validationTargetFor( this.clean( element ) );\n\t\t\tthis.lastElement = element;\n\t\t\tthis.prepareElement( element );\n\t\t\tthis.currentElements = $(element);\n\t\t\tvar result = this.check( element ) !== false;\n\t\t\tif ( result ) {\n\t\t\t\tdelete this.invalid[element.name];\n\t\t\t} else {\n\t\t\t\tthis.invalid[element.name] = true;\n\t\t\t}\n\t\t\tif ( !this.numberOfInvalids() ) {\n\t\t\t\t// Hide error containers on last error\n\t\t\t\tthis.toHide = this.toHide.add( this.containers );\n\t\t\t}\n\t\t\tthis.showErrors();\n\t\t\treturn result;\n\t\t},\n\n\t\t// http://docs.jquery.com/Plugins/Validation/Validator/showErrors\n\t\tshowErrors: function( errors ) {\n\t\t\tif ( errors ) {\n\t\t\t\t// add items to error list and map\n\t\t\t\t$.extend( this.errorMap, errors );\n\t\t\t\tthis.errorList = [];\n\t\t\t\tfor ( var name in errors ) {\n\t\t\t\t\tthis.errorList.push({\n\t\t\t\t\t\tmessage: errors[name],\n\t\t\t\t\t\telement: this.findByName(name)[0]\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\t// remove items from success list\n\t\t\t\tthis.successList = $.grep( this.successList, function( element ) {\n\t\t\t\t\treturn !(element.name in errors);\n\t\t\t\t});\n\t\t\t}\n\t\t\tif ( this.settings.showErrors ) {\n\t\t\t\tthis.settings.showErrors.call( this, this.errorMap, this.errorList );\n\t\t\t} else {\n\t\t\t\tthis.defaultShowErrors();\n\t\t\t}\n\t\t},\n\n\t\t// http://docs.jquery.com/Plugins/Validation/Validator/resetForm\n\t\tresetForm: function() {\n\t\t\tif ( $.fn.resetForm ) {\n\t\t\t\t$(this.currentForm).resetForm();\n\t\t\t}\n\t\t\tthis.submitted = {};\n\t\t\tthis.lastElement = null;\n\t\t\tthis.prepareForm();\n\t\t\tthis.hideErrors();\n\t\t\tthis.elements().removeClass( this.settings.errorClass ).removeData( \"previousValue\" );\n\t\t},\n\n\t\tnumberOfInvalids: function() {\n\t\t\treturn this.objectLength(this.invalid);\n\t\t},\n\n\t\tobjectLength: function( obj ) {\n\t\t\tvar count = 0;\n\t\t\tfor ( var i in obj ) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t\treturn count;\n\t\t},\n\n\t\thideErrors: function() {\n\t\t\tthis.addWrapper( this.toHide ).hide();\n\t\t},\n\n\t\tvalid: function() {\n\t\t\treturn this.size() === 0;\n\t\t},\n\n\t\tsize: function() {\n\t\t\treturn this.errorList.length;\n\t\t},\n\n\t\tfocusInvalid: function() {\n\t\t\tif ( this.settings.focusInvalid ) {\n\t\t\t\ttry {\n\t\t\t\t\t$(this.findLastActive() || this.errorList.length && this.errorList[0].element || [])\n\t\t\t\t\t.filter(\":visible\")\n\t\t\t\t\t.focus()\n\t\t\t\t\t// manually trigger focusin event; without it, focusin handler isn't called, findLastActive won't have anything to find\n\t\t\t\t\t.trigger(\"focusin\");\n\t\t\t\t} catch(e) {\n\t\t\t\t\t// ignore IE throwing errors when focusing hidden elements\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\tfindLastActive: function() {\n\t\t\tvar lastActive = this.lastActive;\n\t\t\treturn lastActive && $.grep(this.errorList, function( n ) {\n\t\t\t\treturn n.element.name === lastActive.name;\n\t\t\t}).length === 1 && lastActive;\n\t\t},\n\n\t\telements: function() {\n\t\t\tvar validator = this,\n\t\t\t\trulesCache = {};\n\n\t\t\t// select all valid inputs inside the form (no submit or reset buttons)\n\t\t\treturn $(this.currentForm)\n\t\t\t.find(\"input, select, textarea\")\n\t\t\t.not(\":submit, :reset, :image, [disabled]\")\n\t\t\t.not( this.settings.ignore )\n\t\t\t.filter(function() {\n\t\t\t\tif ( !this.name && validator.settings.debug && window.console ) {\n\t\t\t\t\tconsole.error( \"%o has no name assigned\", this);\n\t\t\t\t}\n\n\t\t\t\t// select only the first element for each name, and only those with rules specified\n\t\t\t\tif ( this.name in rulesCache || !validator.objectLength($(this).rules()) ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\trulesCache[this.name] = true;\n\t\t\t\treturn true;\n\t\t\t});\n\t\t},\n\n\t\tclean: function( selector ) {\n\t\t\treturn $(selector)[0];\n\t\t},\n\n\t\terrors: function() {\n\t\t\tvar errorClass = this.settings.errorClass.replace(\" \", \".\");\n\t\t\treturn $(this.settings.errorElement + \".\" + errorClass, this.errorContext);\n\t\t},\n\n\t\treset: function() {\n\t\t\tthis.successList = [];\n\t\t\tthis.errorList = [];\n\t\t\tthis.errorMap = {};\n\t\t\tthis.toShow = $([]);\n\t\t\tthis.toHide = $([]);\n\t\t\tthis.currentElements = $([]);\n\t\t},\n\n\t\tprepareForm: function() {\n\t\t\tthis.reset();\n\t\t\tthis.toHide = this.errors().add( this.containers );\n\t\t},\n\n\t\tprepareElement: function( element ) {\n\t\t\tthis.reset();\n\t\t\tthis.toHide = this.errorsFor(element);\n\t\t},\n\n\t\telementValue: function( element ) {\n\t\t\tvar type = $(element).attr(\"type\"),\n\t\t\t\tval = $(element).val();\n\n\t\t\tif ( type === \"radio\" || type === \"checkbox\" ) {\n\t\t\t\treturn $(\"input[name='\" + $(element).attr(\"name\") + \"']:checked\").val();\n\t\t\t}\n\n\t\t\tif ( typeof val === \"string\" ) {\n\t\t\t\treturn val.replace(/\\r/g, \"\");\n\t\t\t}\n\t\t\treturn val;\n\t\t},\n\n\t\tcheck: function( element ) {\n\t\t\telement = this.validationTargetFor( this.clean( element ) );\n\n\t\t\tvar rules = $(element).rules();\n\t\t\tvar dependencyMismatch = false;\n\t\t\tvar val = this.elementValue(element);\n\t\t\tvar result;\n\n\t\t\tfor (var method in rules ) {\n\t\t\t\tvar rule = { method: method, parameters: rules[method] };\n\t\t\t\ttry {\n\n\t\t\t\t\tresult = $.validator.methods[method].call( this, val, element, rule.parameters );\n\n\t\t\t\t\t// if a method indicates that the field is optional and therefore valid,\n\t\t\t\t\t// don't mark it as valid when there are no other rules\n\t\t\t\t\tif ( result === \"dependency-mismatch\" ) {\n\t\t\t\t\t\tdependencyMismatch = true;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tdependencyMismatch = false;\n\n\t\t\t\t\tif ( result === \"pending\" ) {\n\t\t\t\t\t\tthis.toHide = this.toHide.not( this.errorsFor(element) );\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( !result ) {\n\t\t\t\t\t\tthis.formatAndAdd( element, rule );\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t} catch(e) {\n\t\t\t\t\tif ( this.settings.debug && window.console ) {\n\t\t\t\t\t\tconsole.log( \"Exception occurred when checking element \" + element.id + \", check the '\" + rule.method + \"' method.\", e );\n\t\t\t\t\t}\n\t\t\t\t\tthrow e;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( dependencyMismatch ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif ( this.objectLength(rules) ) {\n\t\t\t\tthis.successList.push(element);\n\t\t\t}\n\t\t\treturn true;\n\t\t},\n\n\t\t// return the custom message for the given element and validation method\n\t\t// specified in the element's HTML5 data attribute\n\t\tcustomDataMessage: function( element, method ) {\n\t\t\treturn $(element).data(\"msg-\" + method.toLowerCase()) || (element.attributes && $(element).attr(\"data-msg-\" + method.toLowerCase()));\n\t\t},\n\n\t\t// return the custom message for the given element name and validation method\n\t\tcustomMessage: function( name, method ) {\n\t\t\tvar m = this.settings.messages[name];\n\t\t\treturn m && (m.constructor === String ? m : m[method]);\n\t\t},\n\n\t\t// return the first defined argument, allowing empty strings\n\t\tfindDefined: function() {\n\t\t\tfor(var i = 0; i < arguments.length; i++) {\n\t\t\t\tif ( arguments[i] !== undefined ) {\n\t\t\t\t\treturn arguments[i];\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn undefined;\n\t\t},\n\n\t\tdefaultMessage: function( element, method ) {\n\t\t\treturn this.findDefined(\n\t\t\t\tthis.customMessage( element.name, method ),\n\t\t\t\tthis.customDataMessage( element, method ),\n\t\t\t\t// title is never undefined, so handle empty string as undefined\n\t\t\t\t!this.settings.ignoreTitle && element.title || undefined,\n\t\t\t\t$.validator.messages[method],\n\t\t\t\t\"<strong>Warning: No message defined for \" + element.name + \"</strong>\"\n\t\t\t);\n\t\t},\n\n\t\tformatAndAdd: function( element, rule ) {\n\t\t\tvar message = this.defaultMessage( element, rule.method ),\n\t\t\t\ttheregex = /\\$?\\{(\\d+)\\}/g;\n\t\t\tif ( typeof message === \"function\" ) {\n\t\t\t\tmessage = message.call(this, rule.parameters, element);\n\t\t\t} else if (theregex.test(message)) {\n\t\t\t\tmessage = $.validator.format(message.replace(theregex, \"{$1}\"), rule.parameters);\n\t\t\t}\n\t\t\tthis.errorList.push({\n\t\t\t\tmessage: message,\n\t\t\t\telement: element\n\t\t\t});\n\n\t\t\tthis.errorMap[element.name] = message;\n\t\t\tthis.submitted[element.name] = message;\n\t\t},\n\n\t\taddWrapper: function( toToggle ) {\n\t\t\tif ( this.settings.wrapper ) {\n\t\t\t\ttoToggle = toToggle.add( toToggle.parent( this.settings.wrapper ) );\n\t\t\t}\n\t\t\treturn toToggle;\n\t\t},\n\n\t\tdefaultShowErrors: function() {\n\t\t\tvar i, elements;\n\t\t\tfor ( i = 0; this.errorList[i]; i++ ) {\n\t\t\t\tvar error = this.errorList[i];\n\t\t\t\tif ( this.settings.highlight ) {\n\t\t\t\t\tthis.settings.highlight.call( this, error.element, this.settings.errorClass, this.settings.validClass );\n\t\t\t\t}\n\t\t\t\tthis.showLabel( error.element, error.message );\n\t\t\t}\n\t\t\tif ( this.errorList.length ) {\n\t\t\t\tthis.toShow = this.toShow.add( this.containers );\n\t\t\t}\n\t\t\tif ( this.settings.success ) {\n\t\t\t\tfor ( i = 0; this.successList[i]; i++ ) {\n\t\t\t\t\tthis.showLabel( this.successList[i] );\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( this.settings.unhighlight ) {\n\t\t\t\tfor ( i = 0, elements = this.validElements(); elements[i]; i++ ) {\n\t\t\t\t\tthis.settings.unhighlight.call( this, elements[i], this.settings.errorClass, this.settings.validClass );\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.toHide = this.toHide.not( this.toShow );\n\t\t\tthis.hideErrors();\n\t\t\tthis.addWrapper( this.toShow ).show();\n\t\t},\n\n\t\tvalidElements: function() {\n\t\t\treturn this.currentElements.not(this.invalidElements());\n\t\t},\n\n\t\tinvalidElements: function() {\n\t\t\treturn $(this.errorList).map(function() {\n\t\t\t\treturn this.element;\n\t\t\t});\n\t\t},\n\n\t\tshowLabel: function( element, message ) {\n\t\t\tvar label = this.errorsFor( element );\n\t\t\tif ( label.length ) {\n\t\t\t\t// refresh error/success class\n\t\t\t\tlabel.removeClass( this.settings.validClass ).addClass( this.settings.errorClass );\n\t\t\t\t// replace message on existing label\n\t\t\t\tlabel.html(message);\n\t\t\t} else {\n\t\t\t\t// create label\n\t\t\t\tlabel = $(\"<\" + this.settings.errorElement + \">\")\n\t\t\t\t\t.attr(\"for\", this.idOrName(element))\n\t\t\t\t\t.addClass(this.settings.errorClass)\n\t\t\t\t\t.html(message || \"\");\n\t\t\t\tif ( this.settings.wrapper ) {\n\t\t\t\t\t// make sure the element is visible, even in IE\n\t\t\t\t\t// actually showing the wrapped element is handled elsewhere\n\t\t\t\t\tlabel = label.hide().show().wrap(\"<\" + this.settings.wrapper + \"/>\").parent();\n\t\t\t\t}\n\t\t\t\tif ( !this.labelContainer.append(label).length ) {\n\t\t\t\t\tif ( this.settings.errorPlacement ) {\n\t\t\t\t\t\tthis.settings.errorPlacement(label, $(element) );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tlabel.insertAfter(element);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( !message && this.settings.success ) {\n\t\t\t\tlabel.text(\"\");\n\t\t\t\tif ( typeof this.settings.success === \"string\" ) {\n\t\t\t\t\tlabel.addClass( this.settings.success );\n\t\t\t\t} else {\n\t\t\t\t\tthis.settings.success( label, element );\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.toShow = this.toShow.add(label);\n\t\t},\n\n\t\terrorsFor: function( element ) {\n\t\t\tvar name = this.idOrName(element);\n\t\t\treturn this.errors().filter(function() {\n\t\t\t\treturn $(this).attr(\"for\") === name;\n\t\t\t});\n\t\t},\n\n\t\tidOrName: function( element ) {\n\t\t\treturn this.groups[element.name] || (this.checkable(element) ? element.name : element.id || element.name);\n\t\t},\n\n\t\tvalidationTargetFor: function( element ) {\n\t\t\t// if radio/checkbox, validate first element in group instead\n\t\t\tif ( this.checkable(element) ) {\n\t\t\t\telement = this.findByName( element.name ).not(this.settings.ignore)[0];\n\t\t\t}\n\t\t\treturn element;\n\t\t},\n\n\t\tcheckable: function( element ) {\n\t\t\treturn (/radio|checkbox/i).test(element.type);\n\t\t},\n\n\t\tfindByName: function( name ) {\n\t\t\treturn $(this.currentForm).find(\"[name='\" + name + \"']\");\n\t\t},\n\n\t\tgetLength: function( value, element ) {\n\t\t\tswitch( element.nodeName.toLowerCase() ) {\n\t\t\tcase \"select\":\n\t\t\t\treturn $(\"option:selected\", element).length;\n\t\t\tcase \"input\":\n\t\t\t\tif ( this.checkable( element) ) {\n\t\t\t\t\treturn this.findByName(element.name).filter(\":checked\").length;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn value.length;\n\t\t},\n\n\t\tdepend: function( param, element ) {\n\t\t\treturn this.dependTypes[typeof param] ? this.dependTypes[typeof param](param, element) : true;\n\t\t},\n\n\t\tdependTypes: {\n\t\t\t\"boolean\": function( param, element ) {\n\t\t\t\treturn param;\n\t\t\t},\n\t\t\t\"string\": function( param, element ) {\n\t\t\t\treturn !!$(param, element.form).length;\n\t\t\t},\n\t\t\t\"function\": function( param, element ) {\n\t\t\t\treturn param(element);\n\t\t\t}\n\t\t},\n\n\t\toptional: function( element ) {\n\t\t\tvar val = this.elementValue(element);\n\t\t\treturn !$.validator.methods.required.call(this, val, element) && \"dependency-mismatch\";\n\t\t},\n\n\t\tstartRequest: function( element ) {\n\t\t\tif ( !this.pending[element.name] ) {\n\t\t\t\tthis.pendingRequest++;\n\t\t\t\tthis.pending[element.name] = true;\n\t\t\t}\n\t\t},\n\n\t\tstopRequest: function( element, valid ) {\n\t\t\tthis.pendingRequest--;\n\t\t\t// sometimes synchronization fails, make sure pendingRequest is never < 0\n\t\t\tif ( this.pendingRequest < 0 ) {\n\t\t\t\tthis.pendingRequest = 0;\n\t\t\t}\n\t\t\tdelete this.pending[element.name];\n\t\t\tif ( valid && this.pendingRequest === 0 && this.formSubmitted && this.form() ) {\n\t\t\t\t$(this.currentForm).submit();\n\t\t\t\tthis.formSubmitted = false;\n\t\t\t} else if (!valid && this.pendingRequest === 0 && this.formSubmitted) {\n\t\t\t\t$(this.currentForm).triggerHandler(\"invalid-form\", [this]);\n\t\t\t\tthis.formSubmitted = false;\n\t\t\t}\n\t\t},\n\n\t\tpreviousValue: function( element ) {\n\t\t\treturn $.data(element, \"previousValue\") || $.data(element, \"previousValue\", {\n\t\t\t\told: null,\n\t\t\t\tvalid: true,\n\t\t\t\tmessage: this.defaultMessage( element, \"remote\" )\n\t\t\t});\n\t\t}\n\n\t},\n\n\tclassRuleSettings: {\n\t\trequired: {required: true},\n\t\temail: {email: true},\n\t\turl: {url: true},\n\t\tdate: {date: true},\n\t\tdateISO: {dateISO: true},\n\t\tnumber: {number: true},\n\t\tdigits: {digits: true},\n\t\tcreditcard: {creditcard: true}\n\t},\n\n\taddClassRules: function( className, rules ) {\n\t\tif ( className.constructor === String ) {\n\t\t\tthis.classRuleSettings[className] = rules;\n\t\t} else {\n\t\t\t$.extend(this.classRuleSettings, className);\n\t\t}\n\t},\n\n\tclassRules: function( element ) {\n\t\tvar rules = {};\n\t\tvar classes = $(element).attr(\"class\");\n\t\tif ( classes ) {\n\t\t\t$.each(classes.split(\" \"), function() {\n\t\t\t\tif ( this in $.validator.classRuleSettings ) {\n\t\t\t\t\t$.extend(rules, $.validator.classRuleSettings[this]);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\treturn rules;\n\t},\n\n\tattributeRules: function( element ) {\n\t\tvar rules = {};\n\t\tvar $element = $(element);\n\t\tvar type = $element[0].getAttribute(\"type\");\n\n\t\tfor (var method in $.validator.methods) {\n\t\t\tvar value;\n\n\t\t\t// support for <input required> in both html5 and older browsers\n\t\t\tif ( method === \"required\" ) {\n\t\t\t\tvalue = $element.get(0).getAttribute(method);\n\t\t\t\t// Some browsers return an empty string for the required attribute\n\t\t\t\t// and non-HTML5 browsers might have required=\"\" markup\n\t\t\t\tif ( value === \"\" ) {\n\t\t\t\t\tvalue = true;\n\t\t\t\t}\n\t\t\t\t// force non-HTML5 browsers to return bool\n\t\t\t\tvalue = !!value;\n\t\t\t} else {\n\t\t\t\tvalue = $element.attr(method);\n\t\t\t}\n\n\t\t\t// convert the value to a number for number inputs, and for text for backwards compability\n\t\t\t// allows type=\"date\" and others to be compared as strings\n\t\t\tif ( /min|max/.test( method ) && ( type === null || /number|range|text/.test( type ) ) ) {\n\t\t\t\tvalue = Number(value);\n\t\t\t}\n\n\t\t\tif ( value ) {\n\t\t\t\trules[method] = value;\n\t\t\t} else if ( type === method && type !== 'range' ) {\n\t\t\t\t// exception: the jquery validate 'range' method\n\t\t\t\t// does not test for the html5 'range' type\n\t\t\t\trules[method] = true;\n\t\t\t}\n\t\t}\n\n\t\t// maxlength may be returned as -1, 2147483647 (IE) and 524288 (safari) for text inputs\n\t\tif ( rules.maxlength && /-1|2147483647|524288/.test(rules.maxlength) ) {\n\t\t\tdelete rules.maxlength;\n\t\t}\n\n\t\treturn rules;\n\t},\n\n\tdataRules: function( element ) {\n\t\tvar method, value,\n\t\t\trules = {}, $element = $(element);\n\t\tfor (method in $.validator.methods) {\n\t\t\tvalue = $element.data(\"rule-\" + method.toLowerCase());\n\t\t\tif ( value !== undefined ) {\n\t\t\t\trules[method] = value;\n\t\t\t}\n\t\t}\n\t\treturn rules;\n\t},\n\n\tstaticRules: function( element ) {\n\t\tvar rules = {};\n\t\tvar validator = $.data(element.form, \"validator\");\n\t\tif ( validator.settings.rules ) {\n\t\t\trules = $.validator.normalizeRule(validator.settings.rules[element.name]) || {};\n\t\t}\n\t\treturn rules;\n\t},\n\n\tnormalizeRules: function( rules, element ) {\n\t\t// handle dependency check\n\t\t$.each(rules, function( prop, val ) {\n\t\t\t// ignore rule when param is explicitly false, eg. required:false\n\t\t\tif ( val === false ) {\n\t\t\t\tdelete rules[prop];\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif ( val.param || val.depends ) {\n\t\t\t\tvar keepRule = true;\n\t\t\t\tswitch (typeof val.depends) {\n\t\t\t\tcase \"string\":\n\t\t\t\t\tkeepRule = !!$(val.depends, element.form).length;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"function\":\n\t\t\t\t\tkeepRule = val.depends.call(element, element);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif ( keepRule ) {\n\t\t\t\t\trules[prop] = val.param !== undefined ? val.param : true;\n\t\t\t\t} else {\n\t\t\t\t\tdelete rules[prop];\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\t// evaluate parameters\n\t\t$.each(rules, function( rule, parameter ) {\n\t\t\trules[rule] = $.isFunction(parameter) ? parameter(element) : parameter;\n\t\t});\n\n\t\t// clean number parameters\n\t\t$.each(['minlength', 'maxlength'], function() {\n\t\t\tif ( rules[this] ) {\n\t\t\t\trules[this] = Number(rules[this]);\n\t\t\t}\n\t\t});\n\t\t$.each(['rangelength', 'range'], function() {\n\t\t\tvar parts;\n\t\t\tif ( rules[this] ) {\n\t\t\t\tif ( $.isArray(rules[this]) ) {\n\t\t\t\t\trules[this] = [Number(rules[this][0]), Number(rules[this][1])];\n\t\t\t\t} else if ( typeof rules[this] === \"string\" ) {\n\t\t\t\t\tparts = rules[this].split(/[\\s,]+/);\n\t\t\t\t\trules[this] = [Number(parts[0]), Number(parts[1])];\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tif ( $.validator.autoCreateRanges ) {\n\t\t\t// auto-create ranges\n\t\t\tif ( rules.min && rules.max ) {\n\t\t\t\trules.range = [rules.min, rules.max];\n\t\t\t\tdelete rules.min;\n\t\t\t\tdelete rules.max;\n\t\t\t}\n\t\t\tif ( rules.minlength && rules.maxlength ) {\n\t\t\t\trules.rangelength = [rules.minlength, rules.maxlength];\n\t\t\t\tdelete rules.minlength;\n\t\t\t\tdelete rules.maxlength;\n\t\t\t}\n\t\t}\n\n\t\treturn rules;\n\t},\n\n\t// Converts a simple string to a {string: true} rule, e.g., \"required\" to {required:true}\n\tnormalizeRule: function( data ) {\n\t\tif ( typeof data === \"string\" ) {\n\t\t\tvar transformed = {};\n\t\t\t$.each(data.split(/\\s/), function() {\n\t\t\t\ttransformed[this] = true;\n\t\t\t});\n\t\t\tdata = transformed;\n\t\t}\n\t\treturn data;\n\t},\n\n\t// http://docs.jquery.com/Plugins/Validation/Validator/addMethod\n\taddMethod: function( name, method, message ) {\n\t\t$.validator.methods[name] = method;\n\t\t$.validator.messages[name] = message !== undefined ? message : $.validator.messages[name];\n\t\tif ( method.length < 3 ) {\n\t\t\t$.validator.addClassRules(name, $.validator.normalizeRule(name));\n\t\t}\n\t},\n\n\tmethods: {\n\n\t\t// http://docs.jquery.com/Plugins/Validation/Methods/required\n\t\trequired: function( value, element, param ) {\n\t\t\t// check if dependency is met\n\t\t\tif ( !this.depend(param, element) ) {\n\t\t\t\treturn \"dependency-mismatch\";\n\t\t\t}\n\t\t\tif ( element.nodeName.toLowerCase() === \"select\" ) {\n\t\t\t\t// could be an array for select-multiple or a string, both are fine this way\n\t\t\t\tvar val = $(element).val();\n\t\t\t\treturn val && val.length > 0;\n\t\t\t}\n\t\t\tif ( this.checkable(element) ) {\n\t\t\t\treturn this.getLength(value, element) > 0;\n\t\t\t}\n\t\t\treturn $.trim(value).length > 0;\n\t\t},\n\n\t\t// http://docs.jquery.com/Plugins/Validation/Methods/email\n\t\temail: function( value, element ) {\n\t\t\t// contributed by Scott Gonzalez: http://projects.scottsplayground.com/email_address_validation/\n\t\t\treturn this.optional(element) || /^((([a-z]|\\d|[!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])+(\\.([a-z]|\\d|[!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])+)*)|((\\x22)((((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(([\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x7f]|\\x21|[\\x23-\\x5b]|[\\x5d-\\x7e]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(\\\\([\\x01-\\x09\\x0b\\x0c\\x0d-\\x7f]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]))))*(((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(\\x22)))@((([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))\\.)+(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))$/i.test(value);\n\t\t},\n\n\t\t// http://docs.jquery.com/Plugins/Validation/Methods/url\n\t\turl: function( value, element ) {\n\t\t\t// contributed by Scott Gonzalez: http://projects.scottsplayground.com/iri/\n\t\t\treturn this.optional(element) || /^(https?|s?ftp):\\/\\/(((([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&'\\(\\)\\*\\+,;=]|:)*@)?(((\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5]))|((([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))\\.)+(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))\\.?)(:\\d*)?)(\\/((([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&'\\(\\)\\*\\+,;=]|:|@)+(\\/(([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&'\\(\\)\\*\\+,;=]|:|@)*)*)?)?(\\?((([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&'\\(\\)\\*\\+,;=]|:|@)|[\\uE000-\\uF8FF]|\\/|\\?)*)?(#((([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&'\\(\\)\\*\\+,;=]|:|@)|\\/|\\?)*)?$/i.test(value);\n\t\t},\n\n\t\t// http://docs.jquery.com/Plugins/Validation/Methods/date\n\t\tdate: function( value, element ) {\n\t\t\treturn this.optional(element) || !/Invalid|NaN/.test(new Date(value).toString());\n\t\t},\n\n\t\t// http://docs.jquery.com/Plugins/Validation/Methods/dateISO\n\t\tdateISO: function( value, element ) {\n\t\t\treturn this.optional(element) || /^\\d{4}[\\/\\-]\\d{1,2}[\\/\\-]\\d{1,2}$/.test(value);\n\t\t},\n\n\t\t// http://docs.jquery.com/Plugins/Validation/Methods/number\n\t\tnumber: function( value, element ) {\n\t\t\treturn this.optional(element) || /^-?(?:\\d+|\\d{1,3}(?:,\\d{3})+)?(?:\\.\\d+)?$/.test(value);\n\t\t},\n\n\t\t// http://docs.jquery.com/Plugins/Validation/Methods/digits\n\t\tdigits: function( value, element ) {\n\t\t\treturn this.optional(element) || /^\\d+$/.test(value);\n\t\t},\n\n\t\t// http://docs.jquery.com/Plugins/Validation/Methods/creditcard\n\t\t// based on http://en.wikipedia.org/wiki/Luhn\n\t\tcreditcard: function( value, element ) {\n\t\t\tif ( this.optional(element) ) {\n\t\t\t\treturn \"dependency-mismatch\";\n\t\t\t}\n\t\t\t// accept only spaces, digits and dashes\n\t\t\tif ( /[^0-9 \\-]+/.test(value) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tvar nCheck = 0,\n\t\t\t\tnDigit = 0,\n\t\t\t\tbEven = false;\n\n\t\t\tvalue = value.replace(/\\D/g, \"\");\n\n\t\t\tfor (var n = value.length - 1; n >= 0; n--) {\n\t\t\t\tvar cDigit = value.charAt(n);\n\t\t\t\tnDigit = parseInt(cDigit, 10);\n\t\t\t\tif ( bEven ) {\n\t\t\t\t\tif ( (nDigit *= 2) > 9 ) {\n\t\t\t\t\t\tnDigit -= 9;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tnCheck += nDigit;\n\t\t\t\tbEven = !bEven;\n\t\t\t}\n\n\t\t\treturn (nCheck % 10) === 0;\n\t\t},\n\n\t\t// http://docs.jquery.com/Plugins/Validation/Methods/minlength\n\t\tminlength: function( value, element, param ) {\n\t\t\tvar length = $.isArray( value ) ? value.length : this.getLength($.trim(value), element);\n\t\t\treturn this.optional(element) || length >= param;\n\t\t},\n\n\t\t// http://docs.jquery.com/Plugins/Validation/Methods/maxlength\n\t\tmaxlength: function( value, element, param ) {\n\t\t\tvar length = $.isArray( value ) ? value.length : this.getLength($.trim(value), element);\n\t\t\treturn this.optional(element) || length <= param;\n\t\t},\n\n\t\t// http://docs.jquery.com/Plugins/Validation/Methods/rangelength\n\t\trangelength: function( value, element, param ) {\n\t\t\tvar length = $.isArray( value ) ? value.length : this.getLength($.trim(value), element);\n\t\t\treturn this.optional(element) || ( length >= param[0] && length <= param[1] );\n\t\t},\n\n\t\t// http://docs.jquery.com/Plugins/Validation/Methods/min\n\t\tmin: function( value, element, param ) {\n\t\t\treturn this.optional(element) || value >= param;\n\t\t},\n\n\t\t// http://docs.jquery.com/Plugins/Validation/Methods/max\n\t\tmax: function( value, element, param ) {\n\t\t\treturn this.optional(element) || value <= param;\n\t\t},\n\n\t\t// http://docs.jquery.com/Plugins/Validation/Methods/range\n\t\trange: function( value, element, param ) {\n\t\t\treturn this.optional(element) || ( value >= param[0] && value <= param[1] );\n\t\t},\n\n\t\t// http://docs.jquery.com/Plugins/Validation/Methods/equalTo\n\t\tequalTo: function( value, element, param ) {\n\t\t\t// bind to the blur event of the target in order to revalidate whenever the target field is updated\n\t\t\t// TODO find a way to bind the event just once, avoiding the unbind-rebind overhead\n\t\t\tvar target = $(param);\n\t\t\tif ( this.settings.onfocusout ) {\n\t\t\t\ttarget.unbind(\".validate-equalTo\").bind(\"blur.validate-equalTo\", function() {\n\t\t\t\t\t$(element).valid();\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn value === target.val();\n\t\t},\n\n\t\t// http://docs.jquery.com/Plugins/Validation/Methods/remote\n\t\tremote: function( value, element, param ) {\n\t\t\tif ( this.optional(element) ) {\n\t\t\t\treturn \"dependency-mismatch\";\n\t\t\t}\n\n\t\t\tvar previous = this.previousValue(element);\n\t\t\tif (!this.settings.messages[element.name] ) {\n\t\t\t\tthis.settings.messages[element.name] = {};\n\t\t\t}\n\t\t\tprevious.originalMessage = this.settings.messages[element.name].remote;\n\t\t\tthis.settings.messages[element.name].remote = previous.message;\n\n\t\t\tparam = typeof param === \"string\" && {url:param} || param;\n\n\t\t\tif ( previous.old === value ) {\n\t\t\t\treturn previous.valid;\n\t\t\t}\n\n\t\t\tprevious.old = value;\n\t\t\tvar validator = this;\n\t\t\tthis.startRequest(element);\n\t\t\tvar data = {};\n\t\t\tdata[element.name] = value;\n\t\t\t$.ajax($.extend(true, {\n\t\t\t\turl: param,\n\t\t\t\tmode: \"abort\",\n\t\t\t\tport: \"validate\" + element.name,\n\t\t\t\tdataType: \"json\",\n\t\t\t\tdata: data,\n\t\t\t\tsuccess: function( response ) {\n\t\t\t\t\tvalidator.settings.messages[element.name].remote = previous.originalMessage;\n\t\t\t\t\tvar valid = response === true || response === \"true\";\n\t\t\t\t\tif ( valid ) {\n\t\t\t\t\t\tvar submitted = validator.formSubmitted;\n\t\t\t\t\t\tvalidator.prepareElement(element);\n\t\t\t\t\t\tvalidator.formSubmitted = submitted;\n\t\t\t\t\t\tvalidator.successList.push(element);\n\t\t\t\t\t\tdelete validator.invalid[element.name];\n\t\t\t\t\t\tvalidator.showErrors();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvar errors = {};\n\t\t\t\t\t\tvar message = response || validator.defaultMessage( element, \"remote\" );\n\t\t\t\t\t\terrors[element.name] = previous.message = $.isFunction(message) ? message(value) : message;\n\t\t\t\t\t\tvalidator.invalid[element.name] = true;\n\t\t\t\t\t\tvalidator.showErrors(errors);\n\t\t\t\t\t}\n\t\t\t\t\tprevious.valid = valid;\n\t\t\t\t\tvalidator.stopRequest(element, valid);\n\t\t\t\t}\n\t\t\t}, param));\n\t\t\treturn \"pending\";\n\t\t}\n\n\t}\n\n});\n\n// deprecated, use $.validator.format instead\n$.format = $.validator.format;\n\n}(jQuery));\n\n// ajax mode: abort\n// usage: $.ajax({ mode: \"abort\"[, port: \"uniqueport\"]});\n// if mode:\"abort\" is used, the previous request on that port (port can be undefined) is aborted via XMLHttpRequest.abort()\n(function($) {\n\tvar pendingRequests = {};\n\t// Use a prefilter if available (1.5+)\n\tif ( $.ajaxPrefilter ) {\n\t\t$.ajaxPrefilter(function( settings, _, xhr ) {\n\t\t\tvar port = settings.port;\n\t\t\tif ( settings.mode === \"abort\" ) {\n\t\t\t\tif ( pendingRequests[port] ) {\n\t\t\t\t\tpendingRequests[port].abort();\n\t\t\t\t}\n\t\t\t\tpendingRequests[port] = xhr;\n\t\t\t}\n\t\t});\n\t} else {\n\t\t// Proxy ajax\n\t\tvar ajax = $.ajax;\n\t\t$.ajax = function( settings ) {\n\t\t\tvar mode = ( \"mode\" in settings ? settings : $.ajaxSettings ).mode,\n\t\t\t\tport = ( \"port\" in settings ? settings : $.ajaxSettings ).port;\n\t\t\tif ( mode === \"abort\" ) {\n\t\t\t\tif ( pendingRequests[port] ) {\n\t\t\t\t\tpendingRequests[port].abort();\n\t\t\t\t}\n\t\t\t\tpendingRequests[port] = ajax.apply(this, arguments);\n\t\t\t\treturn pendingRequests[port];\n\t\t\t}\n\t\t\treturn ajax.apply(this, arguments);\n\t\t};\n\t}\n}(jQuery));\n\n// provides delegate(type: String, delegate: Selector, handler: Callback) plugin for easier event delegation\n// handler is only called when $(event.target).is(delegate), in the scope of the jquery-object for event.target\n(function($) {\n\t$.extend($.fn, {\n\t\tvalidateDelegate: function( delegate, type, handler ) {\n\t\t\treturn this.bind(type, function( event ) {\n\t\t\t\tvar target = $(event.target);\n\t\t\t\tif ( target.is(delegate) ) {\n\t\t\t\t\treturn handler.apply(target, arguments);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t});\n}(jQuery));\n"
  },
  {
    "path": "23 - Architecting Application User Interfaces/PPPDDD.NonDist.UIComp/PPPDDD.NonDist.UIComp/Scripts/jquery.validate.unobtrusive.js",
    "content": "/* NUGET: BEGIN LICENSE TEXT\r\n*\r\n* Microsoft grants you the right to use these script files for the sole\r\n* purpose of either: (i) interacting through your browser with the Microsoft\r\n* website or online service, subject to the applicable licensing or use\r\n* terms; or (ii) using the files as included with a Microsoft product subject\r\n* to that product's license terms. Microsoft reserves all other rights to the\r\n* files not expressly granted by Microsoft, whether by implication, estoppel\r\n* or otherwise. Insofar as a script file is dual licensed under GPL,\r\n* Microsoft neither took the code under GPL nor distributes it thereunder but\r\n* under the terms set out in this paragraph. All notices and licenses\r\n* below are for informational purposes only.\r\n*\r\n* NUGET: END LICENSE TEXT */\r\n/*!\r\n** Unobtrusive validation support library for jQuery and jQuery Validate\r\n** Copyright (C) Microsoft Corporation. All rights reserved.\r\n*/\r\n/*jslint white: true, browser: true, onevar: true, undef: true, nomen: true, eqeqeq: true, plusplus: true, bitwise: true, regexp: true, newcap: true, immed: true, strict: false */\r\n/*global document: false, jQuery: false */\r\n(function ($) {\r\nvar $jQval = $.validator,\r\nadapters,\r\ndata_validation = \"unobtrusiveValidation\";\r\nfunction setValidationValues(options, ruleName, value) {\r\noptions.rules[ruleName] = value;\r\nif (options.message) {\r\noptions.messages[ruleName] = options.message;\r\n}\r\n}\r\nfunction splitAndTrim(value) {\r\nreturn value.replace(/^\\s+|\\s+$/g, \"\").split(/\\s*,\\s*/g);\r\n}\r\nfunction escapeAttributeValue(value) {\r\n// As mentioned on http://api.jquery.com/category/selectors/\r\nreturn value.replace(/([!\"#$%&'()*+,./:;<=>?@\\[\\\\\\]^`{|}~])/g, \"\\\\$1\");\r\n}\r\nfunction getModelPrefix(fieldName) {\r\nreturn fieldName.substr(0, fieldName.lastIndexOf(\".\") + 1);\r\n}\r\nfunction appendModelPrefix(value, prefix) {\r\nif (value.indexOf(\"*.\") === 0) {\r\nvalue = value.replace(\"*.\", prefix);\r\n}\r\nreturn value;\r\n}\r\nfunction onError(error, inputElement) {  // 'this' is the form element\r\nvar container = $(this).find(\"[data-valmsg-for='\" + escapeAttributeValue(inputElement[0].name) + \"']\"),\r\nreplaceAttrValue = container.attr(\"data-valmsg-replace\"),\r\nreplace = replaceAttrValue ? $.parseJSON(replaceAttrValue) !== false : null;\r\ncontainer.removeClass(\"field-validation-valid\").addClass(\"field-validation-error\");\r\nerror.data(\"unobtrusiveContainer\", container);\r\nif (replace) {\r\ncontainer.empty();\r\nerror.removeClass(\"input-validation-error\").appendTo(container);\r\n}\r\nelse {\r\nerror.hide();\r\n}\r\n}\r\nfunction onErrors(event, validator) {  // 'this' is the form element\r\nvar container = $(this).find(\"[data-valmsg-summary=true]\"),\r\nlist = container.find(\"ul\");\r\nif (list && list.length && validator.errorList.length) {\r\nlist.empty();\r\ncontainer.addClass(\"validation-summary-errors\").removeClass(\"validation-summary-valid\");\r\n$.each(validator.errorList, function () {\r\n$(\"<li />\").html(this.message).appendTo(list);\r\n});\r\n}\r\n}\r\nfunction onSuccess(error) {  // 'this' is the form element\r\nvar container = error.data(\"unobtrusiveContainer\"),\r\nreplaceAttrValue = container.attr(\"data-valmsg-replace\"),\r\nreplace = replaceAttrValue ? $.parseJSON(replaceAttrValue) : null;\r\nif (container) {\r\ncontainer.addClass(\"field-validation-valid\").removeClass(\"field-validation-error\");\r\nerror.removeData(\"unobtrusiveContainer\");\r\nif (replace) {\r\ncontainer.empty();\r\n}\r\n}\r\n}\r\nfunction onReset(event) {  // 'this' is the form element\r\nvar $form = $(this);\r\n$form.data(\"validator\").resetForm();\r\n$form.find(\".validation-summary-errors\")\r\n.addClass(\"validation-summary-valid\")\r\n.removeClass(\"validation-summary-errors\");\r\n$form.find(\".field-validation-error\")\r\n.addClass(\"field-validation-valid\")\r\n.removeClass(\"field-validation-error\")\r\n.removeData(\"unobtrusiveContainer\")\r\n.find(\">*\")  // If we were using valmsg-replace, get the underlying error\r\n.removeData(\"unobtrusiveContainer\");\r\n}\r\nfunction validationInfo(form) {\r\nvar $form = $(form),\r\nresult = $form.data(data_validation),\r\nonResetProxy = $.proxy(onReset, form);\r\nif (!result) {\r\nresult = {\r\noptions: {  // options structure passed to jQuery Validate's validate() method\r\nerrorClass: \"input-validation-error\",\r\nerrorElement: \"span\",\r\nerrorPlacement: $.proxy(onError, form),\r\ninvalidHandler: $.proxy(onErrors, form),\r\nmessages: {},\r\nrules: {},\r\nsuccess: $.proxy(onSuccess, form)\r\n},\r\nattachValidation: function () {\r\n$form\r\n.unbind(\"reset.\" + data_validation, onResetProxy)\r\n.bind(\"reset.\" + data_validation, onResetProxy)\r\n.validate(this.options);\r\n},\r\nvalidate: function () {  // a validation function that is called by unobtrusive Ajax\r\n$form.validate();\r\nreturn $form.valid();\r\n}\r\n};\r\n$form.data(data_validation, result);\r\n}\r\nreturn result;\r\n}\r\n$jQval.unobtrusive = {\r\nadapters: [],\r\nparseElement: function (element, skipAttach) {\r\n/// <summary>\r\n/// Parses a single HTML element for unobtrusive validation attributes.\r\n/// </summary>\r\n/// <param name=\"element\" domElement=\"true\">The HTML element to be parsed.</param>\r\n/// <param name=\"skipAttach\" type=\"Boolean\">[Optional] true to skip attaching the\r\n/// validation to the form. If parsing just this single element, you should specify true.\r\n/// If parsing several elements, you should specify false, and manually attach the validation\r\n/// to the form when you are finished. The default is false.</param>\r\nvar $element = $(element),\r\nform = $element.parents(\"form\")[0],\r\nvalInfo, rules, messages;\r\nif (!form) {  // Cannot do client-side validation without a form\r\nreturn;\r\n}\r\nvalInfo = validationInfo(form);\r\nvalInfo.options.rules[element.name] = rules = {};\r\nvalInfo.options.messages[element.name] = messages = {};\r\n$.each(this.adapters, function () {\r\nvar prefix = \"data-val-\" + this.name,\r\nmessage = $element.attr(prefix),\r\nparamValues = {};\r\nif (message !== undefined) {  // Compare against undefined, because an empty message is legal (and falsy)\r\nprefix += \"-\";\r\n$.each(this.params, function () {\r\nparamValues[this] = $element.attr(prefix + this);\r\n});\r\nthis.adapt({\r\nelement: element,\r\nform: form,\r\nmessage: message,\r\nparams: paramValues,\r\nrules: rules,\r\nmessages: messages\r\n});\r\n}\r\n});\r\n$.extend(rules, { \"__dummy__\": true });\r\nif (!skipAttach) {\r\nvalInfo.attachValidation();\r\n}\r\n},\r\nparse: function (selector) {\r\n/// <summary>\r\n/// Parses all the HTML elements in the specified selector. It looks for input elements decorated\r\n/// with the [data-val=true] attribute value and enables validation according to the data-val-*\r\n/// attribute values.\r\n/// </summary>\r\n/// <param name=\"selector\" type=\"String\">Any valid jQuery selector.</param>\r\nvar $forms = $(selector)\r\n.parents(\"form\")\r\n.andSelf()\r\n.add($(selector).find(\"form\"))\r\n.filter(\"form\");\r\n// :input is a psuedoselector provided by jQuery which selects input and input-like elements\r\n// combining :input with other selectors significantly decreases performance.\r\n$(selector).find(\":input\").filter(\"[data-val=true]\").each(function () {\r\n$jQval.unobtrusive.parseElement(this, true);\r\n});\r\n$forms.each(function () {\r\nvar info = validationInfo(this);\r\nif (info) {\r\ninfo.attachValidation();\r\n}\r\n});\r\n}\r\n};\r\nadapters = $jQval.unobtrusive.adapters;\r\nadapters.add = function (adapterName, params, fn) {\r\n/// <summary>Adds a new adapter to convert unobtrusive HTML into a jQuery Validate validation.</summary>\r\n/// <param name=\"adapterName\" type=\"String\">The name of the adapter to be added. This matches the name used\r\n/// in the data-val-nnnn HTML attribute (where nnnn is the adapter name).</param>\r\n/// <param name=\"params\" type=\"Array\" optional=\"true\">[Optional] An array of parameter names (strings) that will\r\n/// be extracted from the data-val-nnnn-mmmm HTML attributes (where nnnn is the adapter name, and\r\n/// mmmm is the parameter name).</param>\r\n/// <param name=\"fn\" type=\"Function\">The function to call, which adapts the values from the HTML\r\n/// attributes into jQuery Validate rules and/or messages.</param>\r\n/// <returns type=\"jQuery.validator.unobtrusive.adapters\" />\r\nif (!fn) {  // Called with no params, just a function\r\nfn = params;\r\nparams = [];\r\n}\r\nthis.push({ name: adapterName, params: params, adapt: fn });\r\nreturn this;\r\n};\r\nadapters.addBool = function (adapterName, ruleName) {\r\n/// <summary>Adds a new adapter to convert unobtrusive HTML into a jQuery Validate validation, where\r\n/// the jQuery Validate validation rule has no parameter values.</summary>\r\n/// <param name=\"adapterName\" type=\"String\">The name of the adapter to be added. This matches the name used\r\n/// in the data-val-nnnn HTML attribute (where nnnn is the adapter name).</param>\r\n/// <param name=\"ruleName\" type=\"String\" optional=\"true\">[Optional] The name of the jQuery Validate rule. If not provided, the value\r\n/// of adapterName will be used instead.</param>\r\n/// <returns type=\"jQuery.validator.unobtrusive.adapters\" />\r\nreturn this.add(adapterName, function (options) {\r\nsetValidationValues(options, ruleName || adapterName, true);\r\n});\r\n};\r\nadapters.addMinMax = function (adapterName, minRuleName, maxRuleName, minMaxRuleName, minAttribute, maxAttribute) {\r\n/// <summary>Adds a new adapter to convert unobtrusive HTML into a jQuery Validate validation, where\r\n/// the jQuery Validate validation has three potential rules (one for min-only, one for max-only, and\r\n/// one for min-and-max). The HTML parameters are expected to be named -min and -max.</summary>\r\n/// <param name=\"adapterName\" type=\"String\">The name of the adapter to be added. This matches the name used\r\n/// in the data-val-nnnn HTML attribute (where nnnn is the adapter name).</param>\r\n/// <param name=\"minRuleName\" type=\"String\">The name of the jQuery Validate rule to be used when you only\r\n/// have a minimum value.</param>\r\n/// <param name=\"maxRuleName\" type=\"String\">The name of the jQuery Validate rule to be used when you only\r\n/// have a maximum value.</param>\r\n/// <param name=\"minMaxRuleName\" type=\"String\">The name of the jQuery Validate rule to be used when you\r\n/// have both a minimum and maximum value.</param>\r\n/// <param name=\"minAttribute\" type=\"String\" optional=\"true\">[Optional] The name of the HTML attribute that\r\n/// contains the minimum value. The default is \"min\".</param>\r\n/// <param name=\"maxAttribute\" type=\"String\" optional=\"true\">[Optional] The name of the HTML attribute that\r\n/// contains the maximum value. The default is \"max\".</param>\r\n/// <returns type=\"jQuery.validator.unobtrusive.adapters\" />\r\nreturn this.add(adapterName, [minAttribute || \"min\", maxAttribute || \"max\"], function (options) {\r\nvar min = options.params.min,\r\nmax = options.params.max;\r\nif (min && max) {\r\nsetValidationValues(options, minMaxRuleName, [min, max]);\r\n}\r\nelse if (min) {\r\nsetValidationValues(options, minRuleName, min);\r\n}\r\nelse if (max) {\r\nsetValidationValues(options, maxRuleName, max);\r\n}\r\n});\r\n};\r\nadapters.addSingleVal = function (adapterName, attribute, ruleName) {\r\n/// <summary>Adds a new adapter to convert unobtrusive HTML into a jQuery Validate validation, where\r\n/// the jQuery Validate validation rule has a single value.</summary>\r\n/// <param name=\"adapterName\" type=\"String\">The name of the adapter to be added. This matches the name used\r\n/// in the data-val-nnnn HTML attribute(where nnnn is the adapter name).</param>\r\n/// <param name=\"attribute\" type=\"String\">[Optional] The name of the HTML attribute that contains the value.\r\n/// The default is \"val\".</param>\r\n/// <param name=\"ruleName\" type=\"String\" optional=\"true\">[Optional] The name of the jQuery Validate rule. If not provided, the value\r\n/// of adapterName will be used instead.</param>\r\n/// <returns type=\"jQuery.validator.unobtrusive.adapters\" />\r\nreturn this.add(adapterName, [attribute || \"val\"], function (options) {\r\nsetValidationValues(options, ruleName || adapterName, options.params[attribute]);\r\n});\r\n};\r\n$jQval.addMethod(\"__dummy__\", function (value, element, params) {\r\nreturn true;\r\n});\r\n$jQval.addMethod(\"regex\", function (value, element, params) {\r\nvar match;\r\nif (this.optional(element)) {\r\nreturn true;\r\n}\r\nmatch = new RegExp(params).exec(value);\r\nreturn (match && (match.index === 0) && (match[0].length === value.length));\r\n});\r\n$jQval.addMethod(\"nonalphamin\", function (value, element, nonalphamin) {\r\nvar match;\r\nif (nonalphamin) {\r\nmatch = value.match(/\\W/g);\r\nmatch = match && match.length >= nonalphamin;\r\n}\r\nreturn match;\r\n});\r\nif ($jQval.methods.extension) {\r\nadapters.addSingleVal(\"accept\", \"mimtype\");\r\nadapters.addSingleVal(\"extension\", \"extension\");\r\n} else {\r\n// for backward compatibility, when the 'extension' validation method does not exist, such as with versions\r\n// of JQuery Validation plugin prior to 1.10, we should use the 'accept' method for\r\n// validating the extension, and ignore mime-type validations as they are not supported.\r\nadapters.addSingleVal(\"extension\", \"extension\", \"accept\");\r\n}\r\nadapters.addSingleVal(\"regex\", \"pattern\");\r\nadapters.addBool(\"creditcard\").addBool(\"date\").addBool(\"digits\").addBool(\"email\").addBool(\"number\").addBool(\"url\");\r\nadapters.addMinMax(\"length\", \"minlength\", \"maxlength\", \"rangelength\").addMinMax(\"range\", \"min\", \"max\", \"range\");\r\nadapters.add(\"equalto\", [\"other\"], function (options) {\r\nvar prefix = getModelPrefix(options.element.name),\r\nother = options.params.other,\r\nfullOtherName = appendModelPrefix(other, prefix),\r\nelement = $(options.form).find(\":input\").filter(\"[name='\" + escapeAttributeValue(fullOtherName) + \"']\")[0];\r\nsetValidationValues(options, \"equalTo\", element);\r\n});\r\nadapters.add(\"required\", function (options) {\r\n// jQuery Validate equates \"required\" with \"mandatory\" for checkbox elements\r\nif (options.element.tagName.toUpperCase() !== \"INPUT\" || options.element.type.toUpperCase() !== \"CHECKBOX\") {\r\nsetValidationValues(options, \"required\", true);\r\n}\r\n});\r\nadapters.add(\"remote\", [\"url\", \"type\", \"additionalfields\"], function (options) {\r\nvar value = {\r\nurl: options.params.url,\r\ntype: options.params.type || \"GET\",\r\ndata: {}\r\n},\r\nprefix = getModelPrefix(options.element.name);\r\n$.each(splitAndTrim(options.params.additionalfields || options.element.name), function (i, fieldName) {\r\nvar paramName = appendModelPrefix(fieldName, prefix);\r\nvalue.data[paramName] = function () {\r\nreturn $(options.form).find(\":input\").filter(\"[name='\" + escapeAttributeValue(paramName) + \"']\").val();\r\n};\r\n});\r\nsetValidationValues(options, \"remote\", value);\r\n});\r\nadapters.add(\"password\", [\"min\", \"nonalphamin\", \"regex\"], function (options) {\r\nif (options.params.min) {\r\nsetValidationValues(options, \"minlength\", options.params.min);\r\n}\r\nif (options.params.nonalphamin) {\r\nsetValidationValues(options, \"nonalphamin\", options.params.nonalphamin);\r\n}\r\nif (options.params.regex) {\r\nsetValidationValues(options, \"regex\", options.params.regex);\r\n}\r\n});\r\n$(function () {\r\n$jQval.unobtrusive.parse(document);\r\n});\r\n}(jQuery));\r\n"
  },
  {
    "path": "23 - Architecting Application User Interfaces/PPPDDD.NonDist.UIComp/PPPDDD.NonDist.UIComp/Views/CatalogBoundedContext/ItemInBasket.cshtml",
    "content": "﻿@model PPPDDD.NonDist.UIComp.SalesBoundedContext.Product\n\n<div>\n    <h3>@Model.Name</h3>\n    <p>\n        <img height=\"75\" src=\"@Model.ImageUrl\" style=\"float: left;\" />\n        @Model.Description\n    </p>\n</div>\n"
  },
  {
    "path": "23 - Architecting Application User Interfaces/PPPDDD.NonDist.UIComp/PPPDDD.NonDist.UIComp/Views/Home/Index.cshtml",
    "content": "﻿@{\n    Layout = null;\n    var productIdsInBasket = new string[3] { \"prod1\", \"prod2\", \"prod3\"};\n}\n<!DOCTYPE html>\n<html>\n<head>\n    <meta name=\"viewport\" content=\"width=device-width\" />\n    <title>PPPDDD Composite UI</title>\n    @*\n        Can also use RenderAction here if Bounded Contexts\n        need to inject custom javascript\n    *@\n</head>\n<body>\n    <div> \n        <h1>Your Basket</h1>\n        @foreach(var pid in productIdsInBasket)\n        {\n            <div class=\"basketItem\" style=\"margin-bottom: 20px;\">\n                @{ Html.RenderAction(\"ItemInBasket\", \"CatalogBoundedContext\", new { productId = pid}); } \n                @{ Html.RenderAction(\"Price\", \"PricingBoundedContext\", new { productId = pid }); }\n            </div>\n            <br />\n        }\n        @{ Html.RenderAction(\"DeliveryOptions\", \"ShippingBoundedContext\"); }\n    </div>\n</body>\n</html>\n"
  },
  {
    "path": "23 - Architecting Application User Interfaces/PPPDDD.NonDist.UIComp/PPPDDD.NonDist.UIComp/Views/PricingBoundedContext/Price.cshtml",
    "content": "﻿@model int\r\n\r\n<div class=\"price\">\r\n    $@String.Format(Model.ToString(), \"##.##\")\r\n</div>\r\n"
  },
  {
    "path": "23 - Architecting Application User Interfaces/PPPDDD.NonDist.UIComp/PPPDDD.NonDist.UIComp/Views/ShippingBoundedContext/DeliveryOptions.cshtml",
    "content": "﻿@model IEnumerable<PPPDDD.NonDist.UIComp.ShippingBoundedContext.DeliveryOption>\r\n\r\n<div class=\"deliveryOptions\">\r\n    <h2>Delivery Options</h2>\r\n    @foreach(var option in Model)\r\n    {\r\n        <p>\r\n            @Html.RadioButton(\"deliveryOptions\", option.ID)\r\n            @option.Name - $@String.Format(option.Price.ToString(), \"##.##\")\r\n             (@option.Duration.Item1 - @option.Duration.Item2 days)\r\n        </p>\r\n            \r\n    }\r\n</div>\r\n"
  },
  {
    "path": "23 - Architecting Application User Interfaces/PPPDDD.NonDist.UIComp/PPPDDD.NonDist.UIComp/Views/web.config",
    "content": "﻿<?xml version=\"1.0\"?>\r\n\r\n<configuration>\r\n  <configSections>\r\n    <sectionGroup name=\"system.web.webPages.razor\" type=\"System.Web.WebPages.Razor.Configuration.RazorWebSectionGroup, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35\">\r\n      <section name=\"host\" type=\"System.Web.WebPages.Razor.Configuration.HostSection, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35\" requirePermission=\"false\" />\r\n      <section name=\"pages\" type=\"System.Web.WebPages.Razor.Configuration.RazorPagesSection, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35\" requirePermission=\"false\" />\r\n    </sectionGroup>\r\n  </configSections>\r\n\r\n  <system.web.webPages.razor>\r\n    <host factoryType=\"System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35\" />\r\n    <pages pageBaseType=\"System.Web.Mvc.WebViewPage\">\r\n      <namespaces>\r\n        <add namespace=\"System.Web.Mvc\" />\r\n        <add namespace=\"System.Web.Mvc.Ajax\" />\r\n        <add namespace=\"System.Web.Mvc.Html\" />\r\n        <add namespace=\"System.Web.Routing\" />\r\n        <add namespace=\"PPPDDD.NonDist.UIComp\" />\r\n      </namespaces>\r\n    </pages>\r\n  </system.web.webPages.razor>\r\n\r\n  <appSettings>\r\n    <add key=\"webpages:Enabled\" value=\"false\" />\r\n  </appSettings>\r\n\r\n  <system.webServer>\r\n    <handlers>\r\n      <remove name=\"BlockViewHandler\"/>\r\n      <add name=\"BlockViewHandler\" path=\"*\" verb=\"*\" preCondition=\"integratedMode\" type=\"System.Web.HttpNotFoundHandler\" />\r\n    </handlers>\r\n  </system.webServer>\r\n</configuration>\r\n"
  },
  {
    "path": "23 - Architecting Application User Interfaces/PPPDDD.NonDist.UIComp/PPPDDD.NonDist.UIComp/Web.Debug.config",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n\r\n<!-- For more information on using web.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 -->\r\n\r\n<configuration xmlns:xdt=\"http://schemas.microsoft.com/XML-Document-Transform\">\r\n  <!--\r\n    In the example below, the \"SetAttributes\" transform will change the value of \r\n    \"connectionString\" to use \"ReleaseSQLServer\" only when the \"Match\" locator \r\n    finds an attribute \"name\" that has a value of \"MyDB\".\r\n    \r\n    <connectionStrings>\r\n      <add name=\"MyDB\" \r\n        connectionString=\"Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True\" \r\n        xdt:Transform=\"SetAttributes\" xdt:Locator=\"Match(name)\"/>\r\n    </connectionStrings>\r\n  -->\r\n  <system.web>\r\n    <!--\r\n      In the example below, the \"Replace\" transform will replace the entire \r\n      <customErrors> section of your web.config file.\r\n      Note that because there is only one customErrors section under the \r\n      <system.web> node, there is no need to use the \"xdt:Locator\" attribute.\r\n      \r\n      <customErrors defaultRedirect=\"GenericError.htm\"\r\n        mode=\"RemoteOnly\" xdt:Transform=\"Replace\">\r\n        <error statusCode=\"500\" redirect=\"InternalError.htm\"/>\r\n      </customErrors>\r\n    -->\r\n  </system.web>\r\n</configuration>"
  },
  {
    "path": "23 - Architecting Application User Interfaces/PPPDDD.NonDist.UIComp/PPPDDD.NonDist.UIComp/Web.Release.config",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n\r\n<!-- For more information on using web.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 -->\r\n\r\n<configuration xmlns:xdt=\"http://schemas.microsoft.com/XML-Document-Transform\">\r\n  <!--\r\n    In the example below, the \"SetAttributes\" transform will change the value of \r\n    \"connectionString\" to use \"ReleaseSQLServer\" only when the \"Match\" locator \r\n    finds an attribute \"name\" that has a value of \"MyDB\".\r\n    \r\n    <connectionStrings>\r\n      <add name=\"MyDB\" \r\n        connectionString=\"Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True\" \r\n        xdt:Transform=\"SetAttributes\" xdt:Locator=\"Match(name)\"/>\r\n    </connectionStrings>\r\n  -->\r\n  <system.web>\r\n    <compilation xdt:Transform=\"RemoveAttributes(debug)\" />\r\n    <!--\r\n      In the example below, the \"Replace\" transform will replace the entire \r\n      <customErrors> section of your web.config file.\r\n      Note that because there is only one customErrors section under the \r\n      <system.web> node, there is no need to use the \"xdt:Locator\" attribute.\r\n      \r\n      <customErrors defaultRedirect=\"GenericError.htm\"\r\n        mode=\"RemoteOnly\" xdt:Transform=\"Replace\">\r\n        <error statusCode=\"500\" redirect=\"InternalError.htm\"/>\r\n      </customErrors>\r\n    -->\r\n  </system.web>\r\n</configuration>"
  },
  {
    "path": "23 - Architecting Application User Interfaces/PPPDDD.NonDist.UIComp/PPPDDD.NonDist.UIComp/Web.config",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<!--\r\n  For more information on how to configure your ASP.NET application, please visit\r\n  http://go.microsoft.com/fwlink/?LinkId=301880\r\n  -->\r\n<configuration>\r\n  <appSettings>\r\n    <add key=\"webpages:Version\" value=\"3.0.0.0\" />\r\n    <add key=\"webpages:Enabled\" value=\"false\" />\r\n     <add key=\"ClientValidationEnabled\" value=\"true\" />\r\n    <add key=\"UnobtrusiveJavaScriptEnabled\" value=\"true\" />\r\n  </appSettings>\r\n  <system.web>\r\n    <compilation debug=\"true\" targetFramework=\"4.5\" />\r\n    <httpRuntime targetFramework=\"4.5\" />\r\n  </system.web>\r\n</configuration>\r\n"
  },
  {
    "path": "23 - Architecting Application User Interfaces/PPPDDD.NonDist.UIComp/PPPDDD.NonDist.UIComp/packages.config",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<packages>\r\n  <package id=\"jQuery\" version=\"1.10.2\" targetFramework=\"net45\" />\r\n  <package id=\"jQuery.Validation\" version=\"1.11.1\" targetFramework=\"net45\" />\r\n  <package id=\"Microsoft.AspNet.Mvc\" version=\"5.0.0\" targetFramework=\"net45\" />\r\n  <package id=\"Microsoft.AspNet.Razor\" version=\"3.0.0\" targetFramework=\"net45\" />\r\n  <package id=\"Microsoft.AspNet.WebPages\" version=\"3.0.0\" targetFramework=\"net45\" />\r\n  <package id=\"Microsoft.jQuery.Unobtrusive.Validation\" version=\"3.0.0\" targetFramework=\"net45\" />\r\n</packages>"
  },
  {
    "path": "23 - Architecting Application User Interfaces/PPPDDD.NonDist.UIComp/PPPDDD.NonDist.UIComp.sln",
    "content": "﻿\r\nMicrosoft Visual Studio Solution File, Format Version 12.00\r\n# Visual Studio Express 2013 for Web\r\nVisualStudioVersion = 12.0.21005.1\r\nMinimumVisualStudioVersion = 10.0.40219.1\r\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"PPPDDD.NonDist.UIComp\", \"PPPDDD.NonDist.UIComp\\PPPDDD.NonDist.UIComp.csproj\", \"{5798C8DC-0ED0-44ED-8E0B-A3B62B94FD09}\"\r\nEndProject\r\nGlobal\r\n\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\r\n\t\tDebug|Any CPU = Debug|Any CPU\r\n\t\tRelease|Any CPU = Release|Any CPU\r\n\tEndGlobalSection\r\n\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\r\n\t\t{5798C8DC-0ED0-44ED-8E0B-A3B62B94FD09}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r\n\t\t{5798C8DC-0ED0-44ED-8E0B-A3B62B94FD09}.Debug|Any CPU.Build.0 = Debug|Any CPU\r\n\t\t{5798C8DC-0ED0-44ED-8E0B-A3B62B94FD09}.Release|Any CPU.ActiveCfg = Release|Any CPU\r\n\t\t{5798C8DC-0ED0-44ED-8E0B-A3B62B94FD09}.Release|Any CPU.Build.0 = Release|Any CPU\r\n\tEndGlobalSection\r\n\tGlobalSection(SolutionProperties) = preSolution\r\n\t\tHideSolutionNode = FALSE\r\n\tEndGlobalSection\r\nEndGlobal\r\n"
  },
  {
    "path": "23 - Architecting Application User Interfaces/PPPSSS.Dist.UIComp/PPPSSS.Dist.UIComp/App_Start/RouteConfig.cs",
    "content": "﻿using System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Web;\r\nusing System.Web.Mvc;\r\nusing System.Web.Routing;\r\n\r\nnamespace PPPSSS.Dist.UIComp\r\n{\r\n    public class RouteConfig\r\n    {\r\n        public static void RegisterRoutes(RouteCollection routes)\r\n        {\r\n            routes.IgnoreRoute(\"{resource}.axd/{*pathInfo}\");\r\n\r\n            routes.MapRoute(\r\n                name: \"Default\",\r\n                url: \"{controller}/{action}/{id}\",\r\n                defaults: new { controller = \"Home\", action = \"Index\", id = UrlParameter.Optional }\r\n            );\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "23 - Architecting Application User Interfaces/PPPSSS.Dist.UIComp/PPPSSS.Dist.UIComp/Controllers/HolidaysController.cs",
    "content": "﻿using System;\r\nusing System.Collections.Generic;\r\nusing System.Web.Mvc;\r\n\r\nnamespace PPPSSS.Dist.UIComp.Controllers\r\n{\r\n    /*\r\n    * This controller represents an API provided by the Search\r\n    * Bounded Context. It would run as it's own dedicated application\r\n    * and not live inside the same project as the other APIs\r\n    * currently in this project\r\n    */\r\n    public class HolidaysController : Controller\r\n    {\r\n        public JsonResult Index()\r\n        {\r\n            var holidays = new List<Holiday>\r\n            {\r\n                new Holiday\r\n                {\r\n                    Title = \"2 Weeks in Rhodes\",\r\n                    Price = 688,\r\n                    ImgUrl = \"http://media.wiley.com/product_data/coverImage/84/04702927/0470292784.jpg\"\r\n                },\r\n                new Holiday\r\n                {\r\n                    Title = \"1 Week in Barbados\",\r\n                    Price = 320,\r\n                    ImgUrl = \"http://media.wiley.com/product_data/coverImage/84/04702927/0470292784.jpg\"\r\n                }\r\n            };\r\n\r\n            return Json(holidays, JsonRequestBehavior.AllowGet);\r\n        }\r\n\r\n        class Holiday\r\n        {\r\n            public string Title { get; set; }\r\n\r\n            public int Price { get; set; }\r\n\r\n            public string ImgUrl { get; set; }\r\n        }\r\n\t}\r\n}"
  },
  {
    "path": "23 - Architecting Application User Interfaces/PPPSSS.Dist.UIComp/PPPSSS.Dist.UIComp/Controllers/HomeController.cs",
    "content": "﻿using System;\r\nusing System.Web;\r\nusing System.Web.Mvc;\r\n\r\nnamespace PPPSSS.Dist.UIComp.Controllers\r\n{\r\n    public class HomeController : Controller\r\n    {\r\n        public ViewResult Index()\r\n        {\r\n            return View();\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "23 - Architecting Application User Interfaces/PPPSSS.Dist.UIComp/PPPSSS.Dist.UIComp/Controllers/PromotionsController.cs",
    "content": "﻿using System;\r\nusing System.Collections.Generic;\r\nusing System.Web.Mvc;\r\n\r\nnamespace PPPSSS.Dist.UIComp.Controllers\r\n{\r\n    /*\r\n    * This controller represents an API provided by the Search\r\n    * Bounded Context. It would run as it's own dedicated application\r\n    * and not live inside the same project as the other APIs\r\n    * currently in this project\r\n    */\r\n    public class PromotionsController : Controller\r\n    {\r\n        public JsonResult Index()\r\n        {\r\n            var holidays = new List<Holiday>\r\n            {\r\n                new Holiday\r\n                {\r\n                    Title = \"Relaxing Med Cruise\",\r\n                    Price = 999,\r\n                    ImgUrl = \"http://media.wiley.com/product_data/coverImage/84/04702927/0470292784.jpg\"\r\n                },\r\n                new Holiday\r\n                {\r\n                    Title = \"Romantic Weekend Break in Paris\",\r\n                    Price = 120,\r\n                    ImgUrl = \"http://media.wiley.com/product_data/coverImage/84/04702927/0470292784.jpg\"\r\n                }\r\n            };\r\n\r\n            return Json(holidays, JsonRequestBehavior.AllowGet);\r\n        }\r\n\r\n        class Holiday\r\n        {\r\n            public string Title { get; set; }\r\n\r\n            public int Price { get; set; }\r\n\r\n            public string ImgUrl { get; set; }\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "23 - Architecting Application User Interfaces/PPPSSS.Dist.UIComp/PPPSSS.Dist.UIComp/Controllers/RecommendationsController.cs",
    "content": "﻿using System;\r\nusing System.Collections.Generic;\r\nusing System.Web.Mvc;\r\n\r\nnamespace PPPSSS.Dist.UIComp.Controllers\r\n{\r\n    /*\r\n    * This controller represents an API provided by the Search\r\n    * Bounded Context. It would run as it's own dedicated application\r\n    * and not live inside the same project as the other APIs\r\n    * currently in this project\r\n    */\r\n    public class RecommendationsController : Controller\r\n    {\r\n        public JsonResult Index()\r\n        {\r\n            var holidays = new List<Holiday>\r\n            {\r\n                new Holiday\r\n                {\r\n                    Title = \"2 Weeks in Mykonos\",\r\n                    Price = 450,\r\n                    ImgUrl = \"http://media.wiley.com/product_data/coverImage/84/04702927/0470292784.jpg\"\r\n                },\r\n                new Holiday\r\n                {\r\n                    Title = \"2 Weeks in Kos\",\r\n                    Price = 365,\r\n                    ImgUrl = \"http://media.wiley.com/product_data/coverImage/84/04702927/0470292784.jpg\"\r\n                }\r\n            };\r\n\r\n            return Json(holidays, JsonRequestBehavior.AllowGet);\r\n        }\r\n\r\n        class Holiday\r\n        {\r\n            public string Title { get; set; }\r\n\r\n            public int Price { get; set; }\r\n\r\n            public string ImgUrl { get; set; }\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "23 - Architecting Application User Interfaces/PPPSSS.Dist.UIComp/PPPSSS.Dist.UIComp/Global.asax",
    "content": "﻿<%@ Application Codebehind=\"Global.asax.cs\" Inherits=\"PPPSSS.Dist.UIComp.MvcApplication\" Language=\"C#\" %>\r\n"
  },
  {
    "path": "23 - Architecting Application User Interfaces/PPPSSS.Dist.UIComp/PPPSSS.Dist.UIComp/Global.asax.cs",
    "content": "﻿using System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Web;\r\nusing System.Web.Mvc;\r\nusing System.Web.Routing;\r\n\r\nnamespace PPPSSS.Dist.UIComp\r\n{\r\n    public class MvcApplication : System.Web.HttpApplication\r\n    {\r\n        protected void Application_Start()\r\n        {\r\n            AreaRegistration.RegisterAllAreas();\r\n            RouteConfig.RegisterRoutes(RouteTable.Routes);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "23 - Architecting Application User Interfaces/PPPSSS.Dist.UIComp/PPPSSS.Dist.UIComp/PPPSSS.Dist.UIComp.csproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Project ToolsVersion=\"12.0\" DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\r\n  <Import Project=\"$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props\" Condition=\"Exists('$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props')\" />\r\n  <PropertyGroup>\r\n    <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>\r\n    <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>\r\n    <ProductVersion>\r\n    </ProductVersion>\r\n    <SchemaVersion>2.0</SchemaVersion>\r\n    <ProjectGuid>{F38B6576-A63A-4C2C-A1B8-63ABF86E37FB}</ProjectGuid>\r\n    <ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>\r\n    <OutputType>Library</OutputType>\r\n    <AppDesignerFolder>Properties</AppDesignerFolder>\r\n    <RootNamespace>PPPSSS.Dist.UIComp</RootNamespace>\r\n    <AssemblyName>PPPSSS.Dist.UIComp</AssemblyName>\r\n    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r\n    <UseIISExpress>true</UseIISExpress>\r\n    <IISExpressSSLPort />\r\n    <IISExpressAnonymousAuthentication />\r\n    <IISExpressWindowsAuthentication />\r\n    <IISExpressUseClassicPipelineMode />\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' \">\r\n    <DebugSymbols>true</DebugSymbols>\r\n    <DebugType>full</DebugType>\r\n    <Optimize>false</Optimize>\r\n    <OutputPath>bin\\</OutputPath>\r\n    <DefineConstants>DEBUG;TRACE</DefineConstants>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <WarningLevel>4</WarningLevel>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' \">\r\n    <DebugType>pdbonly</DebugType>\r\n    <Optimize>true</Optimize>\r\n    <OutputPath>bin\\</OutputPath>\r\n    <DefineConstants>TRACE</DefineConstants>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <WarningLevel>4</WarningLevel>\r\n  </PropertyGroup>\r\n  <ItemGroup>\r\n    <Reference Include=\"Microsoft.CSharp\" />\r\n    <Reference Include=\"System.Web.DynamicData\" />\r\n    <Reference Include=\"System.Web.Entity\" />\r\n    <Reference Include=\"System.Web.ApplicationServices\" />\r\n    <Reference Include=\"System.ComponentModel.DataAnnotations\" />\r\n    <Reference Include=\"System\" />\r\n    <Reference Include=\"System.Data\" />\r\n    <Reference Include=\"System.Core\" />\r\n    <Reference Include=\"System.Data.DataSetExtensions\" />\r\n    <Reference Include=\"System.Web.Extensions\" />\r\n    <Reference Include=\"System.Xml.Linq\" />\r\n    <Reference Include=\"System.Drawing\" />\r\n    <Reference Include=\"System.Web\" />\r\n    <Reference Include=\"System.Xml\" />\r\n    <Reference Include=\"System.Configuration\" />\r\n    <Reference Include=\"System.Web.Services\" />\r\n    <Reference Include=\"System.EnterpriseServices\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <Reference Include=\"System.Web.Razor\">\r\n      <HintPath>..\\packages\\Microsoft.AspNet.Razor.3.0.0\\lib\\net45\\System.Web.Razor.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"System.Web.Webpages\">\r\n      <HintPath>..\\packages\\Microsoft.AspNet.Webpages.3.0.0\\lib\\net45\\System.Web.Webpages.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"System.Web.Webpages.Deployment\">\r\n      <HintPath>..\\packages\\Microsoft.AspNet.Webpages.3.0.0\\lib\\net45\\System.Web.Webpages.Deployment.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"System.Web.Webpages.Razor\">\r\n      <HintPath>..\\packages\\Microsoft.AspNet.Webpages.3.0.0\\lib\\net45\\System.Web.Webpages.Razor.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"System.Web.Helpers\">\r\n      <HintPath>..\\packages\\Microsoft.AspNet.Webpages.3.0.0\\lib\\net45\\System.Web.Helpers.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"System.Web.Mvc\">\r\n      <HintPath>..\\packages\\Microsoft.AspNet.Mvc.5.0.0\\lib\\net45\\System.Web.Mvc.dll</HintPath>\r\n    </Reference>\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <Content Include=\"Global.asax\" />\r\n    <None Include=\"Scripts\\jquery-1.10.2.intellisense.js\" />\r\n    <Content Include=\"Scripts\\jquery-1.10.2.js\" />\r\n    <Content Include=\"Scripts\\jquery-1.10.2.min.js\" />\r\n    <None Include=\"Scripts\\jquery.validate-vsdoc.js\" />\r\n    <Content Include=\"Scripts\\jquery.validate.js\" />\r\n    <Content Include=\"Scripts\\jquery.validate.min.js\" />\r\n    <Content Include=\"Scripts\\jquery.validate.unobtrusive.js\" />\r\n    <Content Include=\"Scripts\\jquery.validate.unobtrusive.min.js\" />\r\n    <Content Include=\"Scripts\\pppddd-application.js\" />\r\n    <Content Include=\"Web.config\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <Compile Include=\"App_Start\\RouteConfig.cs\" />\r\n    <Compile Include=\"Controllers\\HolidaysController.cs\" />\r\n    <Compile Include=\"Controllers\\HomeController.cs\" />\r\n    <Compile Include=\"Controllers\\PromotionsController.cs\" />\r\n    <Compile Include=\"Controllers\\RecommendationsController.cs\" />\r\n    <Compile Include=\"Global.asax.cs\">\r\n      <DependentUpon>Global.asax</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Properties\\AssemblyInfo.cs\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <Content Include=\"Views\\web.config\" />\r\n    <Content Include=\"packages.config\" />\r\n    <Content Include=\"Scripts\\jquery-1.10.2.min.map\" />\r\n    <Content Include=\"Views\\Home\\Index.cshtml\" />\r\n    <None Include=\"Web.Debug.config\">\r\n      <DependentUpon>Web.config</DependentUpon>\r\n    </None>\r\n    <None Include=\"Web.Release.config\">\r\n      <DependentUpon>Web.config</DependentUpon>\r\n    </None>\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <Folder Include=\"App_Data\\\" />\r\n    <Folder Include=\"Models\\\" />\r\n    <Folder Include=\"Views\\Holidays\\\" />\r\n    <Folder Include=\"Views\\Promotions\\\" />\r\n  </ItemGroup>\r\n  <PropertyGroup>\r\n    <VisualStudioVersion Condition=\"'$(VisualStudioVersion)' == ''\">10.0</VisualStudioVersion>\r\n    <VSToolsPath Condition=\"'$(VSToolsPath)' == ''\">$(MSBuildExtensionsPath32)\\Microsoft\\VisualStudio\\v$(VisualStudioVersion)</VSToolsPath>\r\n  </PropertyGroup>\r\n  <Import Project=\"$(MSBuildBinPath)\\Microsoft.CSharp.targets\" />\r\n  <Import Project=\"$(VSToolsPath)\\WebApplications\\Microsoft.WebApplication.targets\" Condition=\"'$(VSToolsPath)' != ''\" />\r\n  <Import Project=\"$(MSBuildExtensionsPath32)\\Microsoft\\VisualStudio\\v10.0\\WebApplications\\Microsoft.WebApplication.targets\" Condition=\"false\" />\r\n  <ProjectExtensions>\r\n    <VisualStudio>\r\n      <FlavorProperties GUID=\"{349c5851-65df-11da-9384-00065b846f21}\">\r\n        <WebProjectProperties>\r\n          <UseIIS>True</UseIIS>\r\n          <AutoAssignPort>True</AutoAssignPort>\r\n          <DevelopmentServerPort>1277</DevelopmentServerPort>\r\n          <DevelopmentServerVPath>/</DevelopmentServerVPath>\r\n          <IISUrl>http://localhost:1277/</IISUrl>\r\n          <NTLMAuthentication>False</NTLMAuthentication>\r\n          <UseCustomServer>False</UseCustomServer>\r\n          <CustomServerUrl>\r\n          </CustomServerUrl>\r\n          <SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>\r\n        </WebProjectProperties>\r\n      </FlavorProperties>\r\n    </VisualStudio>\r\n  </ProjectExtensions>\r\n  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \r\n       Other similar extension points exist, see Microsoft.Common.targets.\r\n  <Target Name=\"BeforeBuild\">\r\n  </Target>\r\n  <Target Name=\"AfterBuild\">\r\n  </Target>\r\n  -->\r\n</Project>"
  },
  {
    "path": "23 - Architecting Application User Interfaces/PPPSSS.Dist.UIComp/PPPSSS.Dist.UIComp/Properties/AssemblyInfo.cs",
    "content": "﻿using System.Reflection;\r\nusing System.Runtime.CompilerServices;\r\nusing System.Runtime.InteropServices;\r\n\r\n// General Information about an assembly is controlled through the following \r\n// set of attributes. Change these attribute values to modify the information\r\n// associated with an assembly.\r\n[assembly: AssemblyTitle(\"PPPSSS.Dist.UIComp\")]\r\n[assembly: AssemblyDescription(\"\")]\r\n[assembly: AssemblyConfiguration(\"\")]\r\n[assembly: AssemblyCompany(\"\")]\r\n[assembly: AssemblyProduct(\"PPPSSS.Dist.UIComp\")]\r\n[assembly: AssemblyCopyright(\"Copyright ©  2014\")]\r\n[assembly: AssemblyTrademark(\"\")]\r\n[assembly: AssemblyCulture(\"\")]\r\n\r\n// Setting ComVisible to false makes the types in this assembly not visible \r\n// to COM components.  If you need to access a type in this assembly from \r\n// COM, set the ComVisible attribute to true on that type.\r\n[assembly: ComVisible(false)]\r\n\r\n// The following GUID is for the ID of the typelib if this project is exposed to COM\r\n[assembly: Guid(\"ae6a6cdc-660c-4a74-be0b-a0db73e03c92\")]\r\n\r\n// Version information for an assembly consists of the following four values:\r\n//\r\n//      Major Version\r\n//      Minor Version \r\n//      Build Number\r\n//      Revision\r\n//\r\n// You can specify all the values or you can default the Revision and Build Numbers \r\n// by using the '*' as shown below:\r\n[assembly: AssemblyVersion(\"1.0.0.0\")]\r\n[assembly: AssemblyFileVersion(\"1.0.0.0\")]\r\n"
  },
  {
    "path": "23 - Architecting Application User Interfaces/PPPSSS.Dist.UIComp/PPPSSS.Dist.UIComp/Scripts/jquery-1.10.2.intellisense.js",
    "content": "﻿/* NUGET: BEGIN LICENSE TEXT\r\n *\r\n * Microsoft grants you the right to use these script files for the sole\r\n * purpose of either: (i) interacting through your browser with the Microsoft\r\n * website or online service, subject to the applicable licensing or use\r\n * terms; or (ii) using the files as included with a Microsoft product subject\r\n * to that product's license terms. Microsoft reserves all other rights to the\r\n * files not expressly granted by Microsoft, whether by implication, estoppel\r\n * or otherwise. Insofar as a script file is dual licensed under GPL,\r\n * Microsoft neither took the code under GPL nor distributes it thereunder but\r\n * under the terms set out in this paragraph. All notices and licenses\r\n * below are for informational purposes only.\r\n *\r\n * NUGET: END LICENSE TEXT */\r\nintellisense.annotate(jQuery, {\r\n  'ajax': function() {\r\n    /// <signature>\r\n    ///   <summary>Perform an asynchronous HTTP (Ajax) request.</summary>\r\n    ///   <param name=\"url\" type=\"String\">A string containing the URL to which the request is sent.</param>\r\n    ///   <param name=\"settings\" type=\"PlainObject\">A set of key/value pairs that configure the Ajax request. All settings are optional. A default can be set for any option with $.ajaxSetup(). See jQuery.ajax( settings ) below for a complete list of all settings.</param>\r\n    ///   <returns type=\"jqXHR\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Perform an asynchronous HTTP (Ajax) request.</summary>\r\n    ///   <param name=\"settings\" type=\"PlainObject\">A set of key/value pairs that configure the Ajax request. All settings are optional. A default can be set for any option with $.ajaxSetup().</param>\r\n    ///   <returns type=\"jqXHR\" />\r\n    /// </signature>\r\n  },\r\n  'ajaxPrefilter': function() {\r\n    /// <signature>\r\n    ///   <summary>Handle custom Ajax options or modify existing options before each request is sent and before they are processed by $.ajax().</summary>\r\n    ///   <param name=\"dataTypes\" type=\"String\">An optional string containing one or more space-separated dataTypes</param>\r\n    ///   <param name=\"handler(options, originalOptions, jqXHR)\" type=\"Function\">A handler to set default values for future Ajax requests.</param>\r\n    /// </signature>\r\n  },\r\n  'ajaxSetup': function() {\r\n    /// <signature>\r\n    ///   <summary>Set default values for future Ajax requests.</summary>\r\n    ///   <param name=\"options\" type=\"PlainObject\">A set of key/value pairs that configure the default Ajax request. All options are optional.</param>\r\n    /// </signature>\r\n  },\r\n  'ajaxTransport': function() {\r\n    /// <signature>\r\n    ///   <summary>Creates an object that handles the actual transmission of Ajax data.</summary>\r\n    ///   <param name=\"dataType\" type=\"String\">A string identifying the data type to use</param>\r\n    ///   <param name=\"handler(options, originalOptions, jqXHR)\" type=\"Function\">A handler to return the new transport object to use with the data type provided in the first argument.</param>\r\n    /// </signature>\r\n  },\r\n  'boxModel': function() {\r\n    /// <summary>Deprecated in jQuery 1.3 (see jQuery.support). States if the current page, in the user's browser, is being rendered using the W3C CSS Box Model.</summary>\r\n    /// <returns type=\"Boolean\" />\r\n  },\r\n  'browser': function() {\r\n    /// <summary>Contains flags for the useragent, read from navigator.userAgent. We recommend against using this property; please try to use feature detection instead (see jQuery.support). jQuery.browser may be moved to a plugin in a future release of jQuery.</summary>\r\n    /// <returns type=\"PlainObject\" />\r\n  },\r\n  'browser.version': function() {\r\n    /// <summary>The version number of the rendering engine for the user's browser.</summary>\r\n    /// <returns type=\"String\" />\r\n  },\r\n  'Callbacks': function() {\r\n    /// <signature>\r\n    ///   <summary>A multi-purpose callbacks list object that provides a powerful way to manage callback lists.</summary>\r\n    ///   <param name=\"flags\" type=\"String\">An optional list of space-separated flags that change how the callback list behaves.</param>\r\n    ///   <returns type=\"Callbacks\" />\r\n    /// </signature>\r\n  },\r\n  'contains': function() {\r\n    /// <signature>\r\n    ///   <summary>Check to see if a DOM element is a descendant of another DOM element.</summary>\r\n    ///   <param name=\"container\" type=\"Element\">The DOM element that may contain the other element.</param>\r\n    ///   <param name=\"contained\" type=\"Element\">The DOM element that may be contained by (a descendant of) the other element.</param>\r\n    ///   <returns type=\"Boolean\" />\r\n    /// </signature>\r\n  },\r\n  'cssHooks': function() {\r\n    /// <summary>Hook directly into jQuery to override how particular CSS properties are retrieved or set, normalize CSS property naming, or create custom properties.</summary>\r\n    /// <returns type=\"Object\" />\r\n  },\r\n  'data': function() {\r\n    /// <signature>\r\n    ///   <summary>Returns value at named data store for the element, as set by jQuery.data(element, name, value), or the full data store for the element.</summary>\r\n    ///   <param name=\"element\" type=\"Element\">The DOM element to query for the data.</param>\r\n    ///   <param name=\"key\" type=\"String\">Name of the data stored.</param>\r\n    ///   <returns type=\"Object\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Returns value at named data store for the element, as set by jQuery.data(element, name, value), or the full data store for the element.</summary>\r\n    ///   <param name=\"element\" type=\"Element\">The DOM element to query for the data.</param>\r\n    ///   <returns type=\"Object\" />\r\n    /// </signature>\r\n  },\r\n  'Deferred': function() {\r\n    /// <signature>\r\n    ///   <summary>A constructor function that returns a chainable utility object with methods to register multiple callbacks into callback queues, invoke callback queues, and relay the success or failure state of any synchronous or asynchronous function.</summary>\r\n    ///   <param name=\"beforeStart\" type=\"Function\">A function that is called just before the constructor returns.</param>\r\n    ///   <returns type=\"Deferred\" />\r\n    /// </signature>\r\n  },\r\n  'dequeue': function() {\r\n    /// <signature>\r\n    ///   <summary>Execute the next function on the queue for the matched element.</summary>\r\n    ///   <param name=\"element\" type=\"Element\">A DOM element from which to remove and execute a queued function.</param>\r\n    ///   <param name=\"queueName\" type=\"String\">A string containing the name of the queue. Defaults to fx, the standard effects queue.</param>\r\n    /// </signature>\r\n  },\r\n  'each': function() {\r\n    /// <signature>\r\n    ///   <summary>A generic iterator function, which can be used to seamlessly iterate over both objects and arrays. Arrays and array-like objects with a length property (such as a function's arguments object) are iterated by numeric index, from 0 to length-1. Other objects are iterated via their named properties.</summary>\r\n    ///   <param name=\"collection\" type=\"Object\">The object or array to iterate over.</param>\r\n    ///   <param name=\"callback(indexInArray, valueOfElement)\" type=\"Function\">The function that will be executed on every object.</param>\r\n    ///   <returns type=\"Object\" />\r\n    /// </signature>\r\n  },\r\n  'error': function() {\r\n    /// <signature>\r\n    ///   <summary>Takes a string and throws an exception containing it.</summary>\r\n    ///   <param name=\"message\" type=\"String\">The message to send out.</param>\r\n    /// </signature>\r\n  },\r\n  'extend': function() {\r\n    /// <signature>\r\n    ///   <summary>Merge the contents of two or more objects together into the first object.</summary>\r\n    ///   <param name=\"target\" type=\"Object\">An object that will receive the new properties if additional objects are passed in or that will extend the jQuery namespace if it is the sole argument.</param>\r\n    ///   <param name=\"object1\" type=\"Object\">An object containing additional properties to merge in.</param>\r\n    ///   <param name=\"objectN\" type=\"Object\">Additional objects containing properties to merge in.</param>\r\n    ///   <returns type=\"Object\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Merge the contents of two or more objects together into the first object.</summary>\r\n    ///   <param name=\"deep\" type=\"Boolean\">If true, the merge becomes recursive (aka. deep copy).</param>\r\n    ///   <param name=\"target\" type=\"Object\">The object to extend. It will receive the new properties.</param>\r\n    ///   <param name=\"object1\" type=\"Object\">An object containing additional properties to merge in.</param>\r\n    ///   <param name=\"objectN\" type=\"Object\">Additional objects containing properties to merge in.</param>\r\n    ///   <returns type=\"Object\" />\r\n    /// </signature>\r\n  },\r\n  'get': function() {\r\n    /// <signature>\r\n    ///   <summary>Load data from the server using a HTTP GET request.</summary>\r\n    ///   <param name=\"url\" type=\"String\">A string containing the URL to which the request is sent.</param>\r\n    ///   <param name=\"data\" type=\"String\">A plain object or string that is sent to the server with the request.</param>\r\n    ///   <param name=\"success(data, textStatus, jqXHR)\" type=\"Function\">A callback function that is executed if the request succeeds.</param>\r\n    ///   <param name=\"dataType\" type=\"String\">The type of data expected from the server. Default: Intelligent Guess (xml, json, script, or html).</param>\r\n    ///   <returns type=\"jqXHR\" />\r\n    /// </signature>\r\n  },\r\n  'getJSON': function() {\r\n    /// <signature>\r\n    ///   <summary>Load JSON-encoded data from the server using a GET HTTP request.</summary>\r\n    ///   <param name=\"url\" type=\"String\">A string containing the URL to which the request is sent.</param>\r\n    ///   <param name=\"data\" type=\"PlainObject\">A plain object or string that is sent to the server with the request.</param>\r\n    ///   <param name=\"success(data, textStatus, jqXHR)\" type=\"Function\">A callback function that is executed if the request succeeds.</param>\r\n    ///   <returns type=\"jqXHR\" />\r\n    /// </signature>\r\n  },\r\n  'getScript': function() {\r\n    /// <signature>\r\n    ///   <summary>Load a JavaScript file from the server using a GET HTTP request, then execute it.</summary>\r\n    ///   <param name=\"url\" type=\"String\">A string containing the URL to which the request is sent.</param>\r\n    ///   <param name=\"success(script, textStatus, jqXHR)\" type=\"Function\">A callback function that is executed if the request succeeds.</param>\r\n    ///   <returns type=\"jqXHR\" />\r\n    /// </signature>\r\n  },\r\n  'globalEval': function() {\r\n    /// <signature>\r\n    ///   <summary>Execute some JavaScript code globally.</summary>\r\n    ///   <param name=\"code\" type=\"String\">The JavaScript code to execute.</param>\r\n    /// </signature>\r\n  },\r\n  'grep': function() {\r\n    /// <signature>\r\n    ///   <summary>Finds the elements of an array which satisfy a filter function. The original array is not affected.</summary>\r\n    ///   <param name=\"array\" type=\"Array\">The array to search through.</param>\r\n    ///   <param name=\"function(elementOfArray, indexInArray)\" type=\"Function\">The function to process each item against.  The first argument to the function is the item, and the second argument is the index.  The function should return a Boolean value.  this will be the global window object.</param>\r\n    ///   <param name=\"invert\" type=\"Boolean\">If \"invert\" is false, or not provided, then the function returns an array consisting of all elements for which \"callback\" returns true.  If \"invert\" is true, then the function returns an array consisting of all elements for which \"callback\" returns false.</param>\r\n    ///   <returns type=\"Array\" />\r\n    /// </signature>\r\n  },\r\n  'hasData': function() {\r\n    /// <signature>\r\n    ///   <summary>Determine whether an element has any jQuery data associated with it.</summary>\r\n    ///   <param name=\"element\" type=\"Element\">A DOM element to be checked for data.</param>\r\n    ///   <returns type=\"Boolean\" />\r\n    /// </signature>\r\n  },\r\n  'holdReady': function() {\r\n    /// <signature>\r\n    ///   <summary>Holds or releases the execution of jQuery's ready event.</summary>\r\n    ///   <param name=\"hold\" type=\"Boolean\">Indicates whether the ready hold is being requested or released</param>\r\n    /// </signature>\r\n  },\r\n  'inArray': function() {\r\n    /// <signature>\r\n    ///   <summary>Search for a specified value within an array and return its index (or -1 if not found).</summary>\r\n    ///   <param name=\"value\" type=\"Anything\">The value to search for.</param>\r\n    ///   <param name=\"array\" type=\"Array\">An array through which to search.</param>\r\n    ///   <param name=\"fromIndex\" type=\"Number\">The index of the array at which to begin the search. The default is 0, which will search the whole array.</param>\r\n    ///   <returns type=\"Number\" />\r\n    /// </signature>\r\n  },\r\n  'isArray': function() {\r\n    /// <signature>\r\n    ///   <summary>Determine whether the argument is an array.</summary>\r\n    ///   <param name=\"obj\" type=\"Object\">Object to test whether or not it is an array.</param>\r\n    ///   <returns type=\"boolean\" />\r\n    /// </signature>\r\n  },\r\n  'isEmptyObject': function() {\r\n    /// <signature>\r\n    ///   <summary>Check to see if an object is empty (contains no enumerable properties).</summary>\r\n    ///   <param name=\"object\" type=\"Object\">The object that will be checked to see if it's empty.</param>\r\n    ///   <returns type=\"Boolean\" />\r\n    /// </signature>\r\n  },\r\n  'isFunction': function() {\r\n    /// <signature>\r\n    ///   <summary>Determine if the argument passed is a Javascript function object.</summary>\r\n    ///   <param name=\"obj\" type=\"PlainObject\">Object to test whether or not it is a function.</param>\r\n    ///   <returns type=\"boolean\" />\r\n    /// </signature>\r\n  },\r\n  'isNumeric': function() {\r\n    /// <signature>\r\n    ///   <summary>Determines whether its argument is a number.</summary>\r\n    ///   <param name=\"value\" type=\"PlainObject\">The value to be tested.</param>\r\n    ///   <returns type=\"Boolean\" />\r\n    /// </signature>\r\n  },\r\n  'isPlainObject': function() {\r\n    /// <signature>\r\n    ///   <summary>Check to see if an object is a plain object (created using \"{}\" or \"new Object\").</summary>\r\n    ///   <param name=\"object\" type=\"PlainObject\">The object that will be checked to see if it's a plain object.</param>\r\n    ///   <returns type=\"Boolean\" />\r\n    /// </signature>\r\n  },\r\n  'isWindow': function() {\r\n    /// <signature>\r\n    ///   <summary>Determine whether the argument is a window.</summary>\r\n    ///   <param name=\"obj\" type=\"PlainObject\">Object to test whether or not it is a window.</param>\r\n    ///   <returns type=\"boolean\" />\r\n    /// </signature>\r\n  },\r\n  'isXMLDoc': function() {\r\n    /// <signature>\r\n    ///   <summary>Check to see if a DOM node is within an XML document (or is an XML document).</summary>\r\n    ///   <param name=\"node\" type=\"Element\">The DOM node that will be checked to see if it's in an XML document.</param>\r\n    ///   <returns type=\"Boolean\" />\r\n    /// </signature>\r\n  },\r\n  'makeArray': function() {\r\n    /// <signature>\r\n    ///   <summary>Convert an array-like object into a true JavaScript array.</summary>\r\n    ///   <param name=\"obj\" type=\"PlainObject\">Any object to turn into a native Array.</param>\r\n    ///   <returns type=\"Array\" />\r\n    /// </signature>\r\n  },\r\n  'map': function() {\r\n    /// <signature>\r\n    ///   <summary>Translate all items in an array or object to new array of items.</summary>\r\n    ///   <param name=\"array\" type=\"Array\">The Array to translate.</param>\r\n    ///   <param name=\"callback(elementOfArray, indexInArray)\" type=\"Function\">The function to process each item against.  The first argument to the function is the array item, the second argument is the index in array The function can return any value. Within the function, this refers to the global (window) object.</param>\r\n    ///   <returns type=\"Array\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Translate all items in an array or object to new array of items.</summary>\r\n    ///   <param name=\"arrayOrObject\" type=\"Object\">The Array or Object to translate.</param>\r\n    ///   <param name=\"callback( value, indexOrKey )\" type=\"Function\">The function to process each item against.  The first argument to the function is the value; the second argument is the index or key of the array or object property. The function can return any value to add to the array. A returned array will be flattened into the resulting array. Within the function, this refers to the global (window) object.</param>\r\n    ///   <returns type=\"Array\" />\r\n    /// </signature>\r\n  },\r\n  'merge': function() {\r\n    /// <signature>\r\n    ///   <summary>Merge the contents of two arrays together into the first array.</summary>\r\n    ///   <param name=\"first\" type=\"Array\">The first array to merge, the elements of second added.</param>\r\n    ///   <param name=\"second\" type=\"Array\">The second array to merge into the first, unaltered.</param>\r\n    ///   <returns type=\"Array\" />\r\n    /// </signature>\r\n  },\r\n  'noConflict': function() {\r\n    /// <signature>\r\n    ///   <summary>Relinquish jQuery's control of the $ variable.</summary>\r\n    ///   <param name=\"removeAll\" type=\"Boolean\">A Boolean indicating whether to remove all jQuery variables from the global scope (including jQuery itself).</param>\r\n    ///   <returns type=\"Object\" />\r\n    /// </signature>\r\n  },\r\n  'noop': function() {\r\n    /// <summary>An empty function.</summary>\r\n  },\r\n  'now': function() {\r\n    /// <summary>Return a number representing the current time.</summary>\r\n    /// <returns type=\"Number\" />\r\n  },\r\n  'param': function() {\r\n    /// <signature>\r\n    ///   <summary>Create a serialized representation of an array or object, suitable for use in a URL query string or Ajax request.</summary>\r\n    ///   <param name=\"obj\" type=\"Object\">An array or object to serialize.</param>\r\n    ///   <returns type=\"String\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Create a serialized representation of an array or object, suitable for use in a URL query string or Ajax request.</summary>\r\n    ///   <param name=\"obj\" type=\"Object\">An array or object to serialize.</param>\r\n    ///   <param name=\"traditional\" type=\"Boolean\">A Boolean indicating whether to perform a traditional \"shallow\" serialization.</param>\r\n    ///   <returns type=\"String\" />\r\n    /// </signature>\r\n  },\r\n  'parseHTML': function() {\r\n    /// <signature>\r\n    ///   <summary>Parses a string into an array of DOM nodes.</summary>\r\n    ///   <param name=\"data\" type=\"String\">HTML string to be parsed</param>\r\n    ///   <param name=\"context\" type=\"Element\">DOM element to serve as the context in which the HTML fragment will be created</param>\r\n    ///   <param name=\"keepScripts\" type=\"Boolean\">A Boolean indicating whether to include scripts passed in the HTML string</param>\r\n    ///   <returns type=\"Array\" />\r\n    /// </signature>\r\n  },\r\n  'parseJSON': function() {\r\n    /// <signature>\r\n    ///   <summary>Takes a well-formed JSON string and returns the resulting JavaScript object.</summary>\r\n    ///   <param name=\"json\" type=\"String\">The JSON string to parse.</param>\r\n    ///   <returns type=\"Object\" />\r\n    /// </signature>\r\n  },\r\n  'parseXML': function() {\r\n    /// <signature>\r\n    ///   <summary>Parses a string into an XML document.</summary>\r\n    ///   <param name=\"data\" type=\"String\">a well-formed XML string to be parsed</param>\r\n    ///   <returns type=\"XMLDocument\" />\r\n    /// </signature>\r\n  },\r\n  'post': function() {\r\n    /// <signature>\r\n    ///   <summary>Load data from the server using a HTTP POST request.</summary>\r\n    ///   <param name=\"url\" type=\"String\">A string containing the URL to which the request is sent.</param>\r\n    ///   <param name=\"data\" type=\"String\">A plain object or string that is sent to the server with the request.</param>\r\n    ///   <param name=\"success(data, textStatus, jqXHR)\" type=\"Function\">A callback function that is executed if the request succeeds.</param>\r\n    ///   <param name=\"dataType\" type=\"String\">The type of data expected from the server. Default: Intelligent Guess (xml, json, script, text, html).</param>\r\n    ///   <returns type=\"jqXHR\" />\r\n    /// </signature>\r\n  },\r\n  'proxy': function() {\r\n    /// <signature>\r\n    ///   <summary>Takes a function and returns a new one that will always have a particular context.</summary>\r\n    ///   <param name=\"function\" type=\"Function\">The function whose context will be changed.</param>\r\n    ///   <param name=\"context\" type=\"PlainObject\">The object to which the context (this) of the function should be set.</param>\r\n    ///   <returns type=\"Function\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Takes a function and returns a new one that will always have a particular context.</summary>\r\n    ///   <param name=\"context\" type=\"PlainObject\">The object to which the context of the function should be set.</param>\r\n    ///   <param name=\"name\" type=\"String\">The name of the function whose context will be changed (should be a property of the context object).</param>\r\n    ///   <returns type=\"Function\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Takes a function and returns a new one that will always have a particular context.</summary>\r\n    ///   <param name=\"function\" type=\"Function\">The function whose context will be changed.</param>\r\n    ///   <param name=\"context\" type=\"PlainObject\">The object to which the context (this) of the function should be set.</param>\r\n    ///   <param name=\"additionalArguments\" type=\"Anything\">Any number of arguments to be passed to the function referenced in the function argument.</param>\r\n    ///   <returns type=\"Function\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Takes a function and returns a new one that will always have a particular context.</summary>\r\n    ///   <param name=\"context\" type=\"PlainObject\">The object to which the context of the function should be set.</param>\r\n    ///   <param name=\"name\" type=\"String\">The name of the function whose context will be changed (should be a property of the context object).</param>\r\n    ///   <param name=\"additionalArguments\" type=\"Anything\">Any number of arguments to be passed to the function named in the name argument.</param>\r\n    ///   <returns type=\"Function\" />\r\n    /// </signature>\r\n  },\r\n  'queue': function() {\r\n    /// <signature>\r\n    ///   <summary>Manipulate the queue of functions to be executed on the matched element.</summary>\r\n    ///   <param name=\"element\" type=\"Element\">A DOM element where the array of queued functions is attached.</param>\r\n    ///   <param name=\"queueName\" type=\"String\">A string containing the name of the queue. Defaults to fx, the standard effects queue.</param>\r\n    ///   <param name=\"newQueue\" type=\"Array\">An array of functions to replace the current queue contents.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Manipulate the queue of functions to be executed on the matched element.</summary>\r\n    ///   <param name=\"element\" type=\"Element\">A DOM element on which to add a queued function.</param>\r\n    ///   <param name=\"queueName\" type=\"String\">A string containing the name of the queue. Defaults to fx, the standard effects queue.</param>\r\n    ///   <param name=\"callback()\" type=\"Function\">The new function to add to the queue.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'removeData': function() {\r\n    /// <signature>\r\n    ///   <summary>Remove a previously-stored piece of data.</summary>\r\n    ///   <param name=\"element\" type=\"Element\">A DOM element from which to remove data.</param>\r\n    ///   <param name=\"name\" type=\"String\">A string naming the piece of data to remove.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'sub': function() {\r\n    /// <summary>Creates a new copy of jQuery whose properties and methods can be modified without affecting the original jQuery object.</summary>\r\n    /// <returns type=\"jQuery\" />\r\n  },\r\n  'support': function() {\r\n    /// <summary>A collection of properties that represent the presence of different browser features or bugs. Primarily intended for jQuery's internal use; specific properties may be removed when they are no longer needed internally to improve page startup performance.</summary>\r\n    /// <returns type=\"Object\" />\r\n  },\r\n  'trim': function() {\r\n    /// <signature>\r\n    ///   <summary>Remove the whitespace from the beginning and end of a string.</summary>\r\n    ///   <param name=\"str\" type=\"String\">The string to trim.</param>\r\n    ///   <returns type=\"String\" />\r\n    /// </signature>\r\n  },\r\n  'type': function() {\r\n    /// <signature>\r\n    ///   <summary>Determine the internal JavaScript [[Class]] of an object.</summary>\r\n    ///   <param name=\"obj\" type=\"PlainObject\">Object to get the internal JavaScript [[Class]] of.</param>\r\n    ///   <returns type=\"String\" />\r\n    /// </signature>\r\n  },\r\n  'unique': function() {\r\n    /// <signature>\r\n    ///   <summary>Sorts an array of DOM elements, in place, with the duplicates removed. Note that this only works on arrays of DOM elements, not strings or numbers.</summary>\r\n    ///   <param name=\"array\" type=\"Array\">The Array of DOM elements.</param>\r\n    ///   <returns type=\"Array\" />\r\n    /// </signature>\r\n  },\r\n  'when': function() {\r\n    /// <signature>\r\n    ///   <summary>Provides a way to execute callback functions based on one or more objects, usually Deferred objects that represent asynchronous events.</summary>\r\n    ///   <param name=\"deferreds\" type=\"Deferred\">One or more Deferred objects, or plain JavaScript objects.</param>\r\n    ///   <returns type=\"Promise\" />\r\n    /// </signature>\r\n  },\r\n});\r\n\r\nvar _1228819969 = jQuery.Callbacks;\r\njQuery.Callbacks = function(flags) {\r\nvar _object = _1228819969(flags);\r\nintellisense.annotate(_object, {\r\n  'add': function() {\r\n    /// <signature>\r\n    ///   <summary>Add a callback or a collection of callbacks to a callback list.</summary>\r\n    ///   <param name=\"callbacks\" type=\"Array\">A function, or array of functions, that are to be added to the callback list.</param>\r\n    ///   <returns type=\"Callbacks\" />\r\n    /// </signature>\r\n  },\r\n  'disable': function() {\r\n    /// <summary>Disable a callback list from doing anything more.</summary>\r\n    /// <returns type=\"Callbacks\" />\r\n  },\r\n  'disabled': function() {\r\n    /// <summary>Determine if the callbacks list has been disabled.</summary>\r\n    /// <returns type=\"Boolean\" />\r\n  },\r\n  'empty': function() {\r\n    /// <summary>Remove all of the callbacks from a list.</summary>\r\n    /// <returns type=\"Callbacks\" />\r\n  },\r\n  'fire': function() {\r\n    /// <signature>\r\n    ///   <summary>Call all of the callbacks with the given arguments</summary>\r\n    ///   <param name=\"arguments\" type=\"Anything\">The argument or list of arguments to pass back to the callback list.</param>\r\n    ///   <returns type=\"Callbacks\" />\r\n    /// </signature>\r\n  },\r\n  'fired': function() {\r\n    /// <summary>Determine if the callbacks have already been called at least once.</summary>\r\n    /// <returns type=\"Boolean\" />\r\n  },\r\n  'fireWith': function() {\r\n    /// <signature>\r\n    ///   <summary>Call all callbacks in a list with the given context and arguments.</summary>\r\n    ///   <param name=\"context\" type=\"\">A reference to the context in which the callbacks in the list should be fired.</param>\r\n    ///   <param name=\"args\" type=\"\">An argument, or array of arguments, to pass to the callbacks in the list.</param>\r\n    ///   <returns type=\"Callbacks\" />\r\n    /// </signature>\r\n  },\r\n  'has': function() {\r\n    /// <signature>\r\n    ///   <summary>Determine whether a supplied callback is in a list</summary>\r\n    ///   <param name=\"callback\" type=\"Function\">The callback to search for.</param>\r\n    ///   <returns type=\"Boolean\" />\r\n    /// </signature>\r\n  },\r\n  'lock': function() {\r\n    /// <summary>Lock a callback list in its current state.</summary>\r\n    /// <returns type=\"Callbacks\" />\r\n  },\r\n  'locked': function() {\r\n    /// <summary>Determine if the callbacks list has been locked.</summary>\r\n    /// <returns type=\"Boolean\" />\r\n  },\r\n  'remove': function() {\r\n    /// <signature>\r\n    ///   <summary>Remove a callback or a collection of callbacks from a callback list.</summary>\r\n    ///   <param name=\"callbacks\" type=\"Array\">A function, or array of functions, that are to be removed from the callback list.</param>\r\n    ///   <returns type=\"Callbacks\" />\r\n    /// </signature>\r\n  },\r\n});\r\n\r\nreturn _object;\r\n};\r\nintellisense.redirectDefinition(jQuery.Callbacks, _1228819969);\r\n\r\nvar _731531622 = jQuery.Deferred;\r\njQuery.Deferred = function(func) {\r\nvar _object = _731531622(func);\r\nintellisense.annotate(_object, {\r\n  'always': function() {\r\n    /// <signature>\r\n    ///   <summary>Add handlers to be called when the Deferred object is either resolved or rejected.</summary>\r\n    ///   <param name=\"alwaysCallbacks\" type=\"Function\">A function, or array of functions, that is called when the Deferred is resolved or rejected.</param>\r\n    ///   <param name=\"alwaysCallbacks\" type=\"Function\">Optional additional functions, or arrays of functions, that are called when the Deferred is resolved or rejected.</param>\r\n    ///   <returns type=\"Deferred\" />\r\n    /// </signature>\r\n  },\r\n  'done': function() {\r\n    /// <signature>\r\n    ///   <summary>Add handlers to be called when the Deferred object is resolved.</summary>\r\n    ///   <param name=\"doneCallbacks\" type=\"Function\">A function, or array of functions, that are called when the Deferred is resolved.</param>\r\n    ///   <param name=\"doneCallbacks\" type=\"Function\">Optional additional functions, or arrays of functions, that are called when the Deferred is resolved.</param>\r\n    ///   <returns type=\"Deferred\" />\r\n    /// </signature>\r\n  },\r\n  'fail': function() {\r\n    /// <signature>\r\n    ///   <summary>Add handlers to be called when the Deferred object is rejected.</summary>\r\n    ///   <param name=\"failCallbacks\" type=\"Function\">A function, or array of functions, that are called when the Deferred is rejected.</param>\r\n    ///   <param name=\"failCallbacks\" type=\"Function\">Optional additional functions, or arrays of functions, that are called when the Deferred is rejected.</param>\r\n    ///   <returns type=\"Deferred\" />\r\n    /// </signature>\r\n  },\r\n  'isRejected': function() {\r\n    /// <summary>Determine whether a Deferred object has been rejected.</summary>\r\n    /// <returns type=\"Boolean\" />\r\n  },\r\n  'isResolved': function() {\r\n    /// <summary>Determine whether a Deferred object has been resolved.</summary>\r\n    /// <returns type=\"Boolean\" />\r\n  },\r\n  'notify': function() {\r\n    /// <signature>\r\n    ///   <summary>Call the progressCallbacks on a Deferred object with the given args.</summary>\r\n    ///   <param name=\"args\" type=\"Object\">Optional arguments that are passed to the progressCallbacks.</param>\r\n    ///   <returns type=\"Deferred\" />\r\n    /// </signature>\r\n  },\r\n  'notifyWith': function() {\r\n    /// <signature>\r\n    ///   <summary>Call the progressCallbacks on a Deferred object with the given context and args.</summary>\r\n    ///   <param name=\"context\" type=\"Object\">Context passed to the progressCallbacks as the this object.</param>\r\n    ///   <param name=\"args\" type=\"Object\">Optional arguments that are passed to the progressCallbacks.</param>\r\n    ///   <returns type=\"Deferred\" />\r\n    /// </signature>\r\n  },\r\n  'pipe': function() {\r\n    /// <signature>\r\n    ///   <summary>Utility method to filter and/or chain Deferreds.</summary>\r\n    ///   <param name=\"doneFilter\" type=\"Function\">An optional function that is called when the Deferred is resolved.</param>\r\n    ///   <param name=\"failFilter\" type=\"Function\">An optional function that is called when the Deferred is rejected.</param>\r\n    ///   <returns type=\"Promise\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Utility method to filter and/or chain Deferreds.</summary>\r\n    ///   <param name=\"doneFilter\" type=\"Function\">An optional function that is called when the Deferred is resolved.</param>\r\n    ///   <param name=\"failFilter\" type=\"Function\">An optional function that is called when the Deferred is rejected.</param>\r\n    ///   <param name=\"progressFilter\" type=\"Function\">An optional function that is called when progress notifications are sent to the Deferred.</param>\r\n    ///   <returns type=\"Promise\" />\r\n    /// </signature>\r\n  },\r\n  'progress': function() {\r\n    /// <signature>\r\n    ///   <summary>Add handlers to be called when the Deferred object generates progress notifications.</summary>\r\n    ///   <param name=\"progressCallbacks\" type=\"Function\">A function, or array of functions, that is called when the Deferred generates progress notifications.</param>\r\n    ///   <returns type=\"Deferred\" />\r\n    /// </signature>\r\n  },\r\n  'promise': function() {\r\n    /// <signature>\r\n    ///   <summary>Return a Deferred's Promise object.</summary>\r\n    ///   <param name=\"target\" type=\"Object\">Object onto which the promise methods have to be attached</param>\r\n    ///   <returns type=\"Promise\" />\r\n    /// </signature>\r\n  },\r\n  'reject': function() {\r\n    /// <signature>\r\n    ///   <summary>Reject a Deferred object and call any failCallbacks with the given args.</summary>\r\n    ///   <param name=\"args\" type=\"Object\">Optional arguments that are passed to the failCallbacks.</param>\r\n    ///   <returns type=\"Deferred\" />\r\n    /// </signature>\r\n  },\r\n  'rejectWith': function() {\r\n    /// <signature>\r\n    ///   <summary>Reject a Deferred object and call any failCallbacks with the given context and args.</summary>\r\n    ///   <param name=\"context\" type=\"Object\">Context passed to the failCallbacks as the this object.</param>\r\n    ///   <param name=\"args\" type=\"Array\">An optional array of arguments that are passed to the failCallbacks.</param>\r\n    ///   <returns type=\"Deferred\" />\r\n    /// </signature>\r\n  },\r\n  'resolve': function() {\r\n    /// <signature>\r\n    ///   <summary>Resolve a Deferred object and call any doneCallbacks with the given args.</summary>\r\n    ///   <param name=\"args\" type=\"Object\">Optional arguments that are passed to the doneCallbacks.</param>\r\n    ///   <returns type=\"Deferred\" />\r\n    /// </signature>\r\n  },\r\n  'resolveWith': function() {\r\n    /// <signature>\r\n    ///   <summary>Resolve a Deferred object and call any doneCallbacks with the given context and args.</summary>\r\n    ///   <param name=\"context\" type=\"Object\">Context passed to the doneCallbacks as the this object.</param>\r\n    ///   <param name=\"args\" type=\"Array\">An optional array of arguments that are passed to the doneCallbacks.</param>\r\n    ///   <returns type=\"Deferred\" />\r\n    /// </signature>\r\n  },\r\n  'state': function() {\r\n    /// <summary>Determine the current state of a Deferred object.</summary>\r\n    /// <returns type=\"String\" />\r\n  },\r\n  'then': function() {\r\n    /// <signature>\r\n    ///   <summary>Add handlers to be called when the Deferred object is resolved, rejected, or still in progress.</summary>\r\n    ///   <param name=\"doneFilter\" type=\"Function\">A function that is called when the Deferred is resolved.</param>\r\n    ///   <param name=\"failFilter\" type=\"Function\">An optional function that is called when the Deferred is rejected.</param>\r\n    ///   <param name=\"progressFilter\" type=\"Function\">An optional function that is called when progress notifications are sent to the Deferred.</param>\r\n    ///   <returns type=\"Promise\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Add handlers to be called when the Deferred object is resolved, rejected, or still in progress.</summary>\r\n    ///   <param name=\"doneCallbacks\" type=\"Function\">A function, or array of functions, called when the Deferred is resolved.</param>\r\n    ///   <param name=\"failCallbacks\" type=\"Function\">A function, or array of functions, called when the Deferred is rejected.</param>\r\n    ///   <returns type=\"Promise\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Add handlers to be called when the Deferred object is resolved, rejected, or still in progress.</summary>\r\n    ///   <param name=\"doneCallbacks\" type=\"Function\">A function, or array of functions, called when the Deferred is resolved.</param>\r\n    ///   <param name=\"failCallbacks\" type=\"Function\">A function, or array of functions, called when the Deferred is rejected.</param>\r\n    ///   <param name=\"progressCallbacks\" type=\"Function\">A function, or array of functions, called when the Deferred notifies progress.</param>\r\n    ///   <returns type=\"Promise\" />\r\n    /// </signature>\r\n  },\r\n});\r\n\r\nreturn _object;\r\n};\r\nintellisense.redirectDefinition(jQuery.Callbacks, _731531622);\r\n\r\nintellisense.annotate(jQuery.Event.prototype, {\r\n  'currentTarget': function() {\r\n    /// <summary>The current DOM element within the event bubbling phase.</summary>\r\n    /// <returns type=\"Element\" />\r\n  },\r\n  'data': function() {\r\n    /// <summary>An optional object of data passed to an event method when the current executing handler is bound.</summary>\r\n    /// <returns type=\"Object\" />\r\n  },\r\n  'delegateTarget': function() {\r\n    /// <summary>The element where the currently-called jQuery event handler was attached.</summary>\r\n    /// <returns type=\"Element\" />\r\n  },\r\n  'isDefaultPrevented': function() {\r\n    /// <summary>Returns whether event.preventDefault() was ever called on this event object.</summary>\r\n    /// <returns type=\"Boolean\" />\r\n  },\r\n  'isImmediatePropagationStopped': function() {\r\n    /// <summary>Returns whether event.stopImmediatePropagation() was ever called on this event object.</summary>\r\n    /// <returns type=\"Boolean\" />\r\n  },\r\n  'isPropagationStopped': function() {\r\n    /// <summary>Returns whether event.stopPropagation() was ever called on this event object.</summary>\r\n    /// <returns type=\"Boolean\" />\r\n  },\r\n  'metaKey': function() {\r\n    /// <summary>Indicates whether the META key was pressed when the event fired.</summary>\r\n    /// <returns type=\"Boolean\" />\r\n  },\r\n  'namespace': function() {\r\n    /// <summary>The namespace specified when the event was triggered.</summary>\r\n    /// <returns type=\"String\" />\r\n  },\r\n  'pageX': function() {\r\n    /// <summary>The mouse position relative to the left edge of the document.</summary>\r\n    /// <returns type=\"Number\" />\r\n  },\r\n  'pageY': function() {\r\n    /// <summary>The mouse position relative to the top edge of the document.</summary>\r\n    /// <returns type=\"Number\" />\r\n  },\r\n  'preventDefault': function() {\r\n    /// <summary>If this method is called, the default action of the event will not be triggered.</summary>\r\n  },\r\n  'relatedTarget': function() {\r\n    /// <summary>The other DOM element involved in the event, if any.</summary>\r\n    /// <returns type=\"Element\" />\r\n  },\r\n  'result': function() {\r\n    /// <summary>The last value returned by an event handler that was triggered by this event, unless the value was undefined.</summary>\r\n    /// <returns type=\"Object\" />\r\n  },\r\n  'stopImmediatePropagation': function() {\r\n    /// <summary>Keeps the rest of the handlers from being executed and prevents the event from bubbling up the DOM tree.</summary>\r\n  },\r\n  'stopPropagation': function() {\r\n    /// <summary>Prevents the event from bubbling up the DOM tree, preventing any parent handlers from being notified of the event.</summary>\r\n  },\r\n  'target': function() {\r\n    /// <summary>The DOM element that initiated the event.</summary>\r\n    /// <returns type=\"Element\" />\r\n  },\r\n  'timeStamp': function() {\r\n    /// <summary>The difference in milliseconds between the time the browser created the event and January 1, 1970.</summary>\r\n    /// <returns type=\"Number\" />\r\n  },\r\n  'type': function() {\r\n    /// <summary>Describes the nature of the event.</summary>\r\n    /// <returns type=\"String\" />\r\n  },\r\n  'which': function() {\r\n    /// <summary>For key or mouse events, this property indicates the specific key or button that was pressed.</summary>\r\n    /// <returns type=\"Number\" />\r\n  },\r\n});\r\n\r\nintellisense.annotate(jQuery.fn, {\r\n  'add': function() {\r\n    /// <signature>\r\n    ///   <summary>Add elements to the set of matched elements.</summary>\r\n    ///   <param name=\"selector\" type=\"String\">A string representing a selector expression to find additional elements to add to the set of matched elements.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Add elements to the set of matched elements.</summary>\r\n    ///   <param name=\"elements\" type=\"Array\">One or more elements to add to the set of matched elements.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Add elements to the set of matched elements.</summary>\r\n    ///   <param name=\"html\" type=\"String\">An HTML fragment to add to the set of matched elements.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Add elements to the set of matched elements.</summary>\r\n    ///   <param name=\"jQuery object\" type=\"jQuery object \">An existing jQuery object to add to the set of matched elements.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Add elements to the set of matched elements.</summary>\r\n    ///   <param name=\"selector\" type=\"String\">A string representing a selector expression to find additional elements to add to the set of matched elements.</param>\r\n    ///   <param name=\"context\" type=\"Element\">The point in the document at which the selector should begin matching; similar to the context argument of the $(selector, context) method.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'addBack': function() {\r\n    /// <signature>\r\n    ///   <summary>Add the previous set of elements on the stack to the current set, optionally filtered by a selector.</summary>\r\n    ///   <param name=\"selector\" type=\"String\">A string containing a selector expression to match the current set of elements against.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'addClass': function() {\r\n    /// <signature>\r\n    ///   <summary>Adds the specified class(es) to each of the set of matched elements.</summary>\r\n    ///   <param name=\"className\" type=\"String\">One or more space-separated classes to be added to the class attribute of each matched element.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Adds the specified class(es) to each of the set of matched elements.</summary>\r\n    ///   <param name=\"function(index, currentClass)\" type=\"Function\">A function returning one or more space-separated class names to be added to the existing class name(s). Receives the index position of the element in the set and the existing class name(s) as arguments. Within the function, this refers to the current element in the set.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'after': function() {\r\n    /// <signature>\r\n    ///   <summary>Insert content, specified by the parameter, after each element in the set of matched elements.</summary>\r\n    ///   <param name=\"content\" type=\"jQuery\">HTML string, DOM element, or jQuery object to insert after each element in the set of matched elements.</param>\r\n    ///   <param name=\"content\" type=\"jQuery\">One or more additional DOM elements, arrays of elements, HTML strings, or jQuery objects to insert after each element in the set of matched elements.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Insert content, specified by the parameter, after each element in the set of matched elements.</summary>\r\n    ///   <param name=\"function(index)\" type=\"Function\">A function that returns an HTML string, DOM element(s), or jQuery object to insert after each element in the set of matched elements. Receives the index position of the element in the set as an argument. Within the function, this refers to the current element in the set.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'ajaxComplete': function() {\r\n    /// <signature>\r\n    ///   <summary>Register a handler to be called when Ajax requests complete. This is an AjaxEvent.</summary>\r\n    ///   <param name=\"handler(event, XMLHttpRequest, ajaxOptions)\" type=\"Function\">The function to be invoked.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'ajaxError': function() {\r\n    /// <signature>\r\n    ///   <summary>Register a handler to be called when Ajax requests complete with an error. This is an Ajax Event.</summary>\r\n    ///   <param name=\"handler(event, jqXHR, ajaxSettings, thrownError)\" type=\"Function\">The function to be invoked.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'ajaxSend': function() {\r\n    /// <signature>\r\n    ///   <summary>Attach a function to be executed before an Ajax request is sent. This is an Ajax Event.</summary>\r\n    ///   <param name=\"handler(event, jqXHR, ajaxOptions)\" type=\"Function\">The function to be invoked.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'ajaxStart': function() {\r\n    /// <signature>\r\n    ///   <summary>Register a handler to be called when the first Ajax request begins. This is an Ajax Event.</summary>\r\n    ///   <param name=\"handler()\" type=\"Function\">The function to be invoked.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'ajaxStop': function() {\r\n    /// <signature>\r\n    ///   <summary>Register a handler to be called when all Ajax requests have completed. This is an Ajax Event.</summary>\r\n    ///   <param name=\"handler()\" type=\"Function\">The function to be invoked.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'ajaxSuccess': function() {\r\n    /// <signature>\r\n    ///   <summary>Attach a function to be executed whenever an Ajax request completes successfully. This is an Ajax Event.</summary>\r\n    ///   <param name=\"handler(event, XMLHttpRequest, ajaxOptions)\" type=\"Function\">The function to be invoked.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'all': function() {\r\n    /// <summary>Selects all elements.</summary>\r\n  },\r\n  'andSelf': function() {\r\n    /// <summary>Add the previous set of elements on the stack to the current set.</summary>\r\n    /// <returns type=\"jQuery\" />\r\n  },\r\n  'animate': function() {\r\n    /// <signature>\r\n    ///   <summary>Perform a custom animation of a set of CSS properties.</summary>\r\n    ///   <param name=\"properties\" type=\"PlainObject\">An object of CSS properties and values that the animation will move toward.</param>\r\n    ///   <param name=\"duration\" type=\"\">A string or number determining how long the animation will run.</param>\r\n    ///   <param name=\"easing\" type=\"String\">A string indicating which easing function to use for the transition.</param>\r\n    ///   <param name=\"complete\" type=\"Function\">A function to call once the animation is complete.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Perform a custom animation of a set of CSS properties.</summary>\r\n    ///   <param name=\"properties\" type=\"PlainObject\">An object of CSS properties and values that the animation will move toward.</param>\r\n    ///   <param name=\"options\" type=\"PlainObject\">A map of additional options to pass to the method.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'animated': function() {\r\n    /// <summary>Select all elements that are in the progress of an animation at the time the selector is run.</summary>\r\n  },\r\n  'append': function() {\r\n    /// <signature>\r\n    ///   <summary>Insert content, specified by the parameter, to the end of each element in the set of matched elements.</summary>\r\n    ///   <param name=\"content\" type=\"jQuery\">DOM element, HTML string, or jQuery object to insert at the end of each element in the set of matched elements.</param>\r\n    ///   <param name=\"content\" type=\"jQuery\">One or more additional DOM elements, arrays of elements, HTML strings, or jQuery objects to insert at the end of each element in the set of matched elements.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Insert content, specified by the parameter, to the end of each element in the set of matched elements.</summary>\r\n    ///   <param name=\"function(index, html)\" type=\"Function\">A function that returns an HTML string, DOM element(s), or jQuery object to insert at the end of each element in the set of matched elements. Receives the index position of the element in the set and the old HTML value of the element as arguments. Within the function, this refers to the current element in the set.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'appendTo': function() {\r\n    /// <signature>\r\n    ///   <summary>Insert every element in the set of matched elements to the end of the target.</summary>\r\n    ///   <param name=\"target\" type=\"jQuery\">A selector, element, HTML string, or jQuery object; the matched set of elements will be inserted at the end of the element(s) specified by this parameter.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'attr': function() {\r\n    /// <signature>\r\n    ///   <summary>Set one or more attributes for the set of matched elements.</summary>\r\n    ///   <param name=\"attributeName\" type=\"String\">The name of the attribute to set.</param>\r\n    ///   <param name=\"value\" type=\"Number\">A value to set for the attribute.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Set one or more attributes for the set of matched elements.</summary>\r\n    ///   <param name=\"attributes\" type=\"PlainObject\">An object of attribute-value pairs to set.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Set one or more attributes for the set of matched elements.</summary>\r\n    ///   <param name=\"attributeName\" type=\"String\">The name of the attribute to set.</param>\r\n    ///   <param name=\"function(index, attr)\" type=\"Function\">A function returning the value to set. this is the current element. Receives the index position of the element in the set and the old attribute value as arguments.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'attributeContains': function() {\r\n    /// <signature>\r\n    ///   <summary>Selects elements that have the specified attribute with a value containing the a given substring.</summary>\r\n    ///   <param name=\"attribute\" type=\"String\">An attribute name.</param>\r\n    ///   <param name=\"value\" type=\"String\">An attribute value. Can be either an unquoted single word or a quoted string.</param>\r\n    /// </signature>\r\n  },\r\n  'attributeContainsPrefix': function() {\r\n    /// <signature>\r\n    ///   <summary>Selects elements that have the specified attribute with a value either equal to a given string or starting with that string followed by a hyphen (-).</summary>\r\n    ///   <param name=\"attribute\" type=\"String\">An attribute name.</param>\r\n    ///   <param name=\"value\" type=\"String\">An attribute value. Can be either an unquoted single word or a quoted string.</param>\r\n    /// </signature>\r\n  },\r\n  'attributeContainsWord': function() {\r\n    /// <signature>\r\n    ///   <summary>Selects elements that have the specified attribute with a value containing a given word, delimited by spaces.</summary>\r\n    ///   <param name=\"attribute\" type=\"String\">An attribute name.</param>\r\n    ///   <param name=\"value\" type=\"String\">An attribute value. Can be either an unquoted single word or a quoted string.</param>\r\n    /// </signature>\r\n  },\r\n  'attributeEndsWith': function() {\r\n    /// <signature>\r\n    ///   <summary>Selects elements that have the specified attribute with a value ending exactly with a given string. The comparison is case sensitive.</summary>\r\n    ///   <param name=\"attribute\" type=\"String\">An attribute name.</param>\r\n    ///   <param name=\"value\" type=\"String\">An attribute value. Can be either an unquoted single word or a quoted string.</param>\r\n    /// </signature>\r\n  },\r\n  'attributeEquals': function() {\r\n    /// <signature>\r\n    ///   <summary>Selects elements that have the specified attribute with a value exactly equal to a certain value.</summary>\r\n    ///   <param name=\"attribute\" type=\"String\">An attribute name.</param>\r\n    ///   <param name=\"value\" type=\"String\">An attribute value. Can be either an unquoted single word or a quoted string.</param>\r\n    /// </signature>\r\n  },\r\n  'attributeHas': function() {\r\n    /// <signature>\r\n    ///   <summary>Selects elements that have the specified attribute, with any value.</summary>\r\n    ///   <param name=\"attribute\" type=\"String\">An attribute name.</param>\r\n    /// </signature>\r\n  },\r\n  'attributeMultiple': function() {\r\n    /// <signature>\r\n    ///   <summary>Matches elements that match all of the specified attribute filters.</summary>\r\n    ///   <param name=\"attributeFilter1\" type=\"String\">An attribute filter.</param>\r\n    ///   <param name=\"attributeFilter2\" type=\"String\">Another attribute filter, reducing the selection even more</param>\r\n    ///   <param name=\"attributeFilterN\" type=\"String\">As many more attribute filters as necessary</param>\r\n    /// </signature>\r\n  },\r\n  'attributeNotEqual': function() {\r\n    /// <signature>\r\n    ///   <summary>Select elements that either don't have the specified attribute, or do have the specified attribute but not with a certain value.</summary>\r\n    ///   <param name=\"attribute\" type=\"String\">An attribute name.</param>\r\n    ///   <param name=\"value\" type=\"String\">An attribute value. Can be either an unquoted single word or a quoted string.</param>\r\n    /// </signature>\r\n  },\r\n  'attributeStartsWith': function() {\r\n    /// <signature>\r\n    ///   <summary>Selects elements that have the specified attribute with a value beginning exactly with a given string.</summary>\r\n    ///   <param name=\"attribute\" type=\"String\">An attribute name.</param>\r\n    ///   <param name=\"value\" type=\"String\">An attribute value. Can be either an unquoted single word or a quoted string.</param>\r\n    /// </signature>\r\n  },\r\n  'before': function() {\r\n    /// <signature>\r\n    ///   <summary>Insert content, specified by the parameter, before each element in the set of matched elements.</summary>\r\n    ///   <param name=\"content\" type=\"jQuery\">HTML string, DOM element, or jQuery object to insert before each element in the set of matched elements.</param>\r\n    ///   <param name=\"content\" type=\"jQuery\">One or more additional DOM elements, arrays of elements, HTML strings, or jQuery objects to insert before each element in the set of matched elements.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Insert content, specified by the parameter, before each element in the set of matched elements.</summary>\r\n    ///   <param name=\"function\" type=\"Function\">A function that returns an HTML string, DOM element(s), or jQuery object to insert before each element in the set of matched elements. Receives the index position of the element in the set as an argument. Within the function, this refers to the current element in the set.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'bind': function() {\r\n    /// <signature>\r\n    ///   <summary>Attach a handler to an event for the elements.</summary>\r\n    ///   <param name=\"eventType\" type=\"String\">A string containing one or more DOM event types, such as \"click\" or \"submit,\" or custom event names.</param>\r\n    ///   <param name=\"eventData\" type=\"Object\">An object containing data that will be passed to the event handler.</param>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Attach a handler to an event for the elements.</summary>\r\n    ///   <param name=\"eventType\" type=\"String\">A string containing one or more DOM event types, such as \"click\" or \"submit,\" or custom event names.</param>\r\n    ///   <param name=\"eventData\" type=\"Object\">An object containing data that will be passed to the event handler.</param>\r\n    ///   <param name=\"preventBubble\" type=\"Boolean\">Setting the third argument to false will attach a function that prevents the default action from occurring and stops the event from bubbling. The default is true.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Attach a handler to an event for the elements.</summary>\r\n    ///   <param name=\"events\" type=\"Object\">An object containing one or more DOM event types and functions to execute for them.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'blur': function() {\r\n    /// <signature>\r\n    ///   <summary>Bind an event handler to the \"blur\" JavaScript event, or trigger that event on an element.</summary>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Bind an event handler to the \"blur\" JavaScript event, or trigger that event on an element.</summary>\r\n    ///   <param name=\"eventData\" type=\"Object\">An object containing data that will be passed to the event handler.</param>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'button': function() {\r\n    /// <summary>Selects all button elements and elements of type button.</summary>\r\n  },\r\n  'change': function() {\r\n    /// <signature>\r\n    ///   <summary>Bind an event handler to the \"change\" JavaScript event, or trigger that event on an element.</summary>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Bind an event handler to the \"change\" JavaScript event, or trigger that event on an element.</summary>\r\n    ///   <param name=\"eventData\" type=\"Object\">An object containing data that will be passed to the event handler.</param>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'checkbox': function() {\r\n    /// <summary>Selects all elements of type checkbox.</summary>\r\n  },\r\n  'checked': function() {\r\n    /// <summary>Matches all elements that are checked.</summary>\r\n  },\r\n  'child': function() {\r\n    /// <signature>\r\n    ///   <summary>Selects all direct child elements specified by \"child\" of elements specified by \"parent\".</summary>\r\n    ///   <param name=\"parent\" type=\"String\">Any valid selector.</param>\r\n    ///   <param name=\"child\" type=\"String\">A selector to filter the child elements.</param>\r\n    /// </signature>\r\n  },\r\n  'children': function() {\r\n    /// <signature>\r\n    ///   <summary>Get the children of each element in the set of matched elements, optionally filtered by a selector.</summary>\r\n    ///   <param name=\"selector\" type=\"String\">A string containing a selector expression to match elements against.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'class': function() {\r\n    /// <signature>\r\n    ///   <summary>Selects all elements with the given class.</summary>\r\n    ///   <param name=\"class\" type=\"String\">A class to search for. An element can have multiple classes; only one of them must match.</param>\r\n    /// </signature>\r\n  },\r\n  'clearQueue': function() {\r\n    /// <signature>\r\n    ///   <summary>Remove from the queue all items that have not yet been run.</summary>\r\n    ///   <param name=\"queueName\" type=\"String\">A string containing the name of the queue. Defaults to fx, the standard effects queue.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'click': function() {\r\n    /// <signature>\r\n    ///   <summary>Bind an event handler to the \"click\" JavaScript event, or trigger that event on an element.</summary>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Bind an event handler to the \"click\" JavaScript event, or trigger that event on an element.</summary>\r\n    ///   <param name=\"eventData\" type=\"Object\">An object containing data that will be passed to the event handler.</param>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'clone': function() {\r\n    /// <signature>\r\n    ///   <summary>Create a deep copy of the set of matched elements.</summary>\r\n    ///   <param name=\"withDataAndEvents\" type=\"Boolean\">A Boolean indicating whether event handlers should be copied along with the elements. As of jQuery 1.4, element data will be copied as well.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Create a deep copy of the set of matched elements.</summary>\r\n    ///   <param name=\"withDataAndEvents\" type=\"Boolean\">A Boolean indicating whether event handlers and data should be copied along with the elements. The default value is false. *In jQuery 1.5.0 the default value was incorrectly true; it was changed back to false in 1.5.1 and up.</param>\r\n    ///   <param name=\"deepWithDataAndEvents\" type=\"Boolean\">A Boolean indicating whether event handlers and data for all children of the cloned element should be copied. By default its value matches the first argument's value (which defaults to false).</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'closest': function() {\r\n    /// <signature>\r\n    ///   <summary>For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree.</summary>\r\n    ///   <param name=\"selector\" type=\"String\">A string containing a selector expression to match elements against.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree.</summary>\r\n    ///   <param name=\"selector\" type=\"String\">A string containing a selector expression to match elements against.</param>\r\n    ///   <param name=\"context\" type=\"Element\">A DOM element within which a matching element may be found. If no context is passed in then the context of the jQuery set will be used instead.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree.</summary>\r\n    ///   <param name=\"jQuery object\" type=\"jQuery\">A jQuery object to match elements against.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree.</summary>\r\n    ///   <param name=\"element\" type=\"Element\">An element to match elements against.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'contains': function() {\r\n    /// <signature>\r\n    ///   <summary>Select all elements that contain the specified text.</summary>\r\n    ///   <param name=\"text\" type=\"String\">A string of text to look for. It's case sensitive.</param>\r\n    /// </signature>\r\n  },\r\n  'contents': function() {\r\n    /// <summary>Get the children of each element in the set of matched elements, including text and comment nodes.</summary>\r\n    /// <returns type=\"jQuery\" />\r\n  },\r\n  'context': function() {\r\n    /// <summary>The DOM node context originally passed to jQuery(); if none was passed then context will likely be the document.</summary>\r\n    /// <returns type=\"Element\" />\r\n  },\r\n  'css': function() {\r\n    /// <signature>\r\n    ///   <summary>Set one or more CSS properties for the set of matched elements.</summary>\r\n    ///   <param name=\"propertyName\" type=\"String\">A CSS property name.</param>\r\n    ///   <param name=\"value\" type=\"Number\">A value to set for the property.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Set one or more CSS properties for the set of matched elements.</summary>\r\n    ///   <param name=\"propertyName\" type=\"String\">A CSS property name.</param>\r\n    ///   <param name=\"function(index, value)\" type=\"Function\">A function returning the value to set. this is the current element. Receives the index position of the element in the set and the old value as arguments.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Set one or more CSS properties for the set of matched elements.</summary>\r\n    ///   <param name=\"properties\" type=\"PlainObject\">An object of property-value pairs to set.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'data': function() {\r\n    /// <signature>\r\n    ///   <summary>Store arbitrary data associated with the matched elements.</summary>\r\n    ///   <param name=\"key\" type=\"String\">A string naming the piece of data to set.</param>\r\n    ///   <param name=\"value\" type=\"Object\">The new data value; it can be any Javascript type including Array or Object.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Store arbitrary data associated with the matched elements.</summary>\r\n    ///   <param name=\"obj\" type=\"Object\">An object of key-value pairs of data to update.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'dblclick': function() {\r\n    /// <signature>\r\n    ///   <summary>Bind an event handler to the \"dblclick\" JavaScript event, or trigger that event on an element.</summary>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Bind an event handler to the \"dblclick\" JavaScript event, or trigger that event on an element.</summary>\r\n    ///   <param name=\"eventData\" type=\"Object\">An object containing data that will be passed to the event handler.</param>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'delay': function() {\r\n    /// <signature>\r\n    ///   <summary>Set a timer to delay execution of subsequent items in the queue.</summary>\r\n    ///   <param name=\"duration\" type=\"Number\">An integer indicating the number of milliseconds to delay execution of the next item in the queue.</param>\r\n    ///   <param name=\"queueName\" type=\"String\">A string containing the name of the queue. Defaults to fx, the standard effects queue.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'delegate': function() {\r\n    /// <signature>\r\n    ///   <summary>Attach a handler to one or more events for all elements that match the selector, now or in the future, based on a specific set of root elements.</summary>\r\n    ///   <param name=\"selector\" type=\"String\">A selector to filter the elements that trigger the event.</param>\r\n    ///   <param name=\"eventType\" type=\"String\">A string containing one or more space-separated JavaScript event types, such as \"click\" or \"keydown,\" or custom event names.</param>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute at the time the event is triggered.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Attach a handler to one or more events for all elements that match the selector, now or in the future, based on a specific set of root elements.</summary>\r\n    ///   <param name=\"selector\" type=\"String\">A selector to filter the elements that trigger the event.</param>\r\n    ///   <param name=\"eventType\" type=\"String\">A string containing one or more space-separated JavaScript event types, such as \"click\" or \"keydown,\" or custom event names.</param>\r\n    ///   <param name=\"eventData\" type=\"Object\">An object containing data that will be passed to the event handler.</param>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute at the time the event is triggered.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Attach a handler to one or more events for all elements that match the selector, now or in the future, based on a specific set of root elements.</summary>\r\n    ///   <param name=\"selector\" type=\"String\">A selector to filter the elements that trigger the event.</param>\r\n    ///   <param name=\"events\" type=\"PlainObject\">A plain object of one or more event types and functions to execute for them.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'dequeue': function() {\r\n    /// <signature>\r\n    ///   <summary>Execute the next function on the queue for the matched elements.</summary>\r\n    ///   <param name=\"queueName\" type=\"String\">A string containing the name of the queue. Defaults to fx, the standard effects queue.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'descendant': function() {\r\n    /// <signature>\r\n    ///   <summary>Selects all elements that are descendants of a given ancestor.</summary>\r\n    ///   <param name=\"ancestor\" type=\"String\">Any valid selector.</param>\r\n    ///   <param name=\"descendant\" type=\"String\">A selector to filter the descendant elements.</param>\r\n    /// </signature>\r\n  },\r\n  'detach': function() {\r\n    /// <signature>\r\n    ///   <summary>Remove the set of matched elements from the DOM.</summary>\r\n    ///   <param name=\"selector\" type=\"String\">A selector expression that filters the set of matched elements to be removed.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'die': function() {\r\n    /// <signature>\r\n    ///   <summary>Remove event handlers previously attached using .live() from the elements.</summary>\r\n    ///   <param name=\"eventType\" type=\"String\">A string containing a JavaScript event type, such as click or keydown.</param>\r\n    ///   <param name=\"handler\" type=\"String\">The function that is no longer to be executed.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Remove event handlers previously attached using .live() from the elements.</summary>\r\n    ///   <param name=\"events\" type=\"PlainObject\">A plain object of one or more event types, such as click or keydown and their corresponding functions that are no longer to be executed.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'disabled': function() {\r\n    /// <summary>Selects all elements that are disabled.</summary>\r\n  },\r\n  'each': function() {\r\n    /// <signature>\r\n    ///   <summary>Iterate over a jQuery object, executing a function for each matched element.</summary>\r\n    ///   <param name=\"function(index, Element)\" type=\"Function\">A function to execute for each matched element.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'element': function() {\r\n    /// <signature>\r\n    ///   <summary>Selects all elements with the given tag name.</summary>\r\n    ///   <param name=\"element\" type=\"String\">An element to search for. Refers to the tagName of DOM nodes.</param>\r\n    /// </signature>\r\n  },\r\n  'empty': function() {\r\n    /// <summary>Select all elements that have no children (including text nodes).</summary>\r\n  },\r\n  'enabled': function() {\r\n    /// <summary>Selects all elements that are enabled.</summary>\r\n  },\r\n  'end': function() {\r\n    /// <summary>End the most recent filtering operation in the current chain and return the set of matched elements to its previous state.</summary>\r\n    /// <returns type=\"jQuery\" />\r\n  },\r\n  'eq': function() {\r\n    /// <signature>\r\n    ///   <summary>Select the element at index n within the matched set.</summary>\r\n    ///   <param name=\"index\" type=\"Number\">Zero-based index of the element to match.</param>\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Select the element at index n within the matched set.</summary>\r\n    ///   <param name=\"-index\" type=\"Number\">Zero-based index of the element to match, counting backwards from the last element.</param>\r\n    /// </signature>\r\n  },\r\n  'error': function() {\r\n    /// <signature>\r\n    ///   <summary>Bind an event handler to the \"error\" JavaScript event.</summary>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute when the event is triggered.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Bind an event handler to the \"error\" JavaScript event.</summary>\r\n    ///   <param name=\"eventData\" type=\"Object\">An object containing data that will be passed to the event handler.</param>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'even': function() {\r\n    /// <summary>Selects even elements, zero-indexed.  See also odd.</summary>\r\n  },\r\n  'fadeIn': function() {\r\n    /// <signature>\r\n    ///   <summary>Display the matched elements by fading them to opaque.</summary>\r\n    ///   <param name=\"duration\" type=\"\">A string or number determining how long the animation will run.</param>\r\n    ///   <param name=\"complete\" type=\"Function\">A function to call once the animation is complete.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Display the matched elements by fading them to opaque.</summary>\r\n    ///   <param name=\"options\" type=\"PlainObject\">A map of additional options to pass to the method.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Display the matched elements by fading them to opaque.</summary>\r\n    ///   <param name=\"duration\" type=\"\">A string or number determining how long the animation will run.</param>\r\n    ///   <param name=\"easing\" type=\"String\">A string indicating which easing function to use for the transition.</param>\r\n    ///   <param name=\"complete\" type=\"Function\">A function to call once the animation is complete.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'fadeOut': function() {\r\n    /// <signature>\r\n    ///   <summary>Hide the matched elements by fading them to transparent.</summary>\r\n    ///   <param name=\"duration\" type=\"\">A string or number determining how long the animation will run.</param>\r\n    ///   <param name=\"complete\" type=\"Function\">A function to call once the animation is complete.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Hide the matched elements by fading them to transparent.</summary>\r\n    ///   <param name=\"options\" type=\"PlainObject\">A map of additional options to pass to the method.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Hide the matched elements by fading them to transparent.</summary>\r\n    ///   <param name=\"duration\" type=\"\">A string or number determining how long the animation will run.</param>\r\n    ///   <param name=\"easing\" type=\"String\">A string indicating which easing function to use for the transition.</param>\r\n    ///   <param name=\"complete\" type=\"Function\">A function to call once the animation is complete.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'fadeTo': function() {\r\n    /// <signature>\r\n    ///   <summary>Adjust the opacity of the matched elements.</summary>\r\n    ///   <param name=\"duration\" type=\"Number\">A string or number determining how long the animation will run.</param>\r\n    ///   <param name=\"opacity\" type=\"Number\">A number between 0 and 1 denoting the target opacity.</param>\r\n    ///   <param name=\"complete\" type=\"Function\">A function to call once the animation is complete.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Adjust the opacity of the matched elements.</summary>\r\n    ///   <param name=\"duration\" type=\"Number\">A string or number determining how long the animation will run.</param>\r\n    ///   <param name=\"opacity\" type=\"Number\">A number between 0 and 1 denoting the target opacity.</param>\r\n    ///   <param name=\"easing\" type=\"String\">A string indicating which easing function to use for the transition.</param>\r\n    ///   <param name=\"complete\" type=\"Function\">A function to call once the animation is complete.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'fadeToggle': function() {\r\n    /// <signature>\r\n    ///   <summary>Display or hide the matched elements by animating their opacity.</summary>\r\n    ///   <param name=\"duration\" type=\"\">A string or number determining how long the animation will run.</param>\r\n    ///   <param name=\"easing\" type=\"String\">A string indicating which easing function to use for the transition.</param>\r\n    ///   <param name=\"complete\" type=\"Function\">A function to call once the animation is complete.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Display or hide the matched elements by animating their opacity.</summary>\r\n    ///   <param name=\"options\" type=\"PlainObject\">A map of additional options to pass to the method.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'file': function() {\r\n    /// <summary>Selects all elements of type file.</summary>\r\n  },\r\n  'filter': function() {\r\n    /// <signature>\r\n    ///   <summary>Reduce the set of matched elements to those that match the selector or pass the function's test.</summary>\r\n    ///   <param name=\"selector\" type=\"String\">A string containing a selector expression to match the current set of elements against.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Reduce the set of matched elements to those that match the selector or pass the function's test.</summary>\r\n    ///   <param name=\"function(index)\" type=\"Function\">A function used as a test for each element in the set. this is the current DOM element.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Reduce the set of matched elements to those that match the selector or pass the function's test.</summary>\r\n    ///   <param name=\"element\" type=\"Element\">An element to match the current set of elements against.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Reduce the set of matched elements to those that match the selector or pass the function's test.</summary>\r\n    ///   <param name=\"jQuery object\" type=\"Object\">An existing jQuery object to match the current set of elements against.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'find': function() {\r\n    /// <signature>\r\n    ///   <summary>Get the descendants of each element in the current set of matched elements, filtered by a selector, jQuery object, or element.</summary>\r\n    ///   <param name=\"selector\" type=\"String\">A string containing a selector expression to match elements against.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Get the descendants of each element in the current set of matched elements, filtered by a selector, jQuery object, or element.</summary>\r\n    ///   <param name=\"jQuery object\" type=\"Object\">A jQuery object to match elements against.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Get the descendants of each element in the current set of matched elements, filtered by a selector, jQuery object, or element.</summary>\r\n    ///   <param name=\"element\" type=\"Element\">An element to match elements against.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'finish': function() {\r\n    /// <signature>\r\n    ///   <summary>Stop the currently-running animation, remove all queued animations, and complete all animations for the matched elements.</summary>\r\n    ///   <param name=\"queue\" type=\"String\">The name of the queue in which to stop animations.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'first': function() {\r\n    /// <summary>Selects the first matched element.</summary>\r\n  },\r\n  'first-child': function() {\r\n    /// <summary>Selects all elements that are the first child of their parent.</summary>\r\n  },\r\n  'first-of-type': function() {\r\n    /// <summary>Selects all elements that are the first among siblings of the same element name.</summary>\r\n  },\r\n  'focus': function() {\r\n    /// <signature>\r\n    ///   <summary>Bind an event handler to the \"focus\" JavaScript event, or trigger that event on an element.</summary>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Bind an event handler to the \"focus\" JavaScript event, or trigger that event on an element.</summary>\r\n    ///   <param name=\"eventData\" type=\"Object\">An object containing data that will be passed to the event handler.</param>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'focusin': function() {\r\n    /// <signature>\r\n    ///   <summary>Bind an event handler to the \"focusin\" event.</summary>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Bind an event handler to the \"focusin\" event.</summary>\r\n    ///   <param name=\"eventData\" type=\"Object\">An object containing data that will be passed to the event handler.</param>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'focusout': function() {\r\n    /// <signature>\r\n    ///   <summary>Bind an event handler to the \"focusout\" JavaScript event.</summary>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Bind an event handler to the \"focusout\" JavaScript event.</summary>\r\n    ///   <param name=\"eventData\" type=\"Object\">An object containing data that will be passed to the event handler.</param>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'get': function() {\r\n    /// <signature>\r\n    ///   <summary>Retrieve the DOM elements matched by the jQuery object.</summary>\r\n    ///   <param name=\"index\" type=\"Number\">A zero-based integer indicating which element to retrieve.</param>\r\n    ///   <returns type=\"Element, Array\" />\r\n    /// </signature>\r\n  },\r\n  'gt': function() {\r\n    /// <signature>\r\n    ///   <summary>Select all elements at an index greater than index within the matched set.</summary>\r\n    ///   <param name=\"index\" type=\"Number\">Zero-based index.</param>\r\n    /// </signature>\r\n  },\r\n  'has': function() {\r\n    /// <signature>\r\n    ///   <summary>Reduce the set of matched elements to those that have a descendant that matches the selector or DOM element.</summary>\r\n    ///   <param name=\"selector\" type=\"String\">A string containing a selector expression to match elements against.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Reduce the set of matched elements to those that have a descendant that matches the selector or DOM element.</summary>\r\n    ///   <param name=\"contained\" type=\"Element\">A DOM element to match elements against.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'hasClass': function() {\r\n    /// <signature>\r\n    ///   <summary>Determine whether any of the matched elements are assigned the given class.</summary>\r\n    ///   <param name=\"className\" type=\"String\">The class name to search for.</param>\r\n    ///   <returns type=\"Boolean\" />\r\n    /// </signature>\r\n  },\r\n  'header': function() {\r\n    /// <summary>Selects all elements that are headers, like h1, h2, h3 and so on.</summary>\r\n  },\r\n  'height': function() {\r\n    /// <signature>\r\n    ///   <summary>Set the CSS height of every matched element.</summary>\r\n    ///   <param name=\"value\" type=\"Number\">An integer representing the number of pixels, or an integer with an optional unit of measure appended (as a string).</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Set the CSS height of every matched element.</summary>\r\n    ///   <param name=\"function(index, height)\" type=\"Function\">A function returning the height to set. Receives the index position of the element in the set and the old height as arguments. Within the function, this refers to the current element in the set.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'hidden': function() {\r\n    /// <summary>Selects all elements that are hidden.</summary>\r\n  },\r\n  'hide': function() {\r\n    /// <signature>\r\n    ///   <summary>Hide the matched elements.</summary>\r\n    ///   <param name=\"duration\" type=\"\">A string or number determining how long the animation will run.</param>\r\n    ///   <param name=\"complete\" type=\"Function\">A function to call once the animation is complete.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Hide the matched elements.</summary>\r\n    ///   <param name=\"options\" type=\"PlainObject\">A map of additional options to pass to the method.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Hide the matched elements.</summary>\r\n    ///   <param name=\"duration\" type=\"\">A string or number determining how long the animation will run.</param>\r\n    ///   <param name=\"easing\" type=\"String\">A string indicating which easing function to use for the transition.</param>\r\n    ///   <param name=\"complete\" type=\"Function\">A function to call once the animation is complete.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'hover': function() {\r\n    /// <signature>\r\n    ///   <summary>Bind two handlers to the matched elements, to be executed when the mouse pointer enters and leaves the elements.</summary>\r\n    ///   <param name=\"handlerIn(eventObject)\" type=\"Function\">A function to execute when the mouse pointer enters the element.</param>\r\n    ///   <param name=\"handlerOut(eventObject)\" type=\"Function\">A function to execute when the mouse pointer leaves the element.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'html': function() {\r\n    /// <signature>\r\n    ///   <summary>Set the HTML contents of each element in the set of matched elements.</summary>\r\n    ///   <param name=\"htmlString\" type=\"String\">A string of HTML to set as the content of each matched element.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Set the HTML contents of each element in the set of matched elements.</summary>\r\n    ///   <param name=\"function(index, oldhtml)\" type=\"Function\">A function returning the HTML content to set. Receives the           index position of the element in the set and the old HTML value as arguments.           jQuery empties the element before calling the function;           use the oldhtml argument to reference the previous content.           Within the function, this refers to the current element in the set.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'id': function() {\r\n    /// <signature>\r\n    ///   <summary>Selects a single element with the given id attribute.</summary>\r\n    ///   <param name=\"id\" type=\"String\">An ID to search for, specified via the id attribute of an element.</param>\r\n    /// </signature>\r\n  },\r\n  'image': function() {\r\n    /// <summary>Selects all elements of type image.</summary>\r\n  },\r\n  'index': function() {\r\n    /// <signature>\r\n    ///   <summary>Search for a given element from among the matched elements.</summary>\r\n    ///   <param name=\"selector\" type=\"String\">A selector representing a jQuery collection in which to look for an element.</param>\r\n    ///   <returns type=\"Number\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Search for a given element from among the matched elements.</summary>\r\n    ///   <param name=\"element\" type=\"jQuery\">The DOM element or first element within the jQuery object to look for.</param>\r\n    ///   <returns type=\"Number\" />\r\n    /// </signature>\r\n  },\r\n  'init': function() {\r\n    /// <signature>\r\n    ///   <summary>Accepts a string containing a CSS selector which is then used to match a set of elements.</summary>\r\n    ///   <param name=\"selector\" type=\"String\">A string containing a selector expression</param>\r\n    ///   <param name=\"context\" type=\"jQuery\">A DOM Element, Document, or jQuery to use as context</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Accepts a string containing a CSS selector which is then used to match a set of elements.</summary>\r\n    ///   <param name=\"element\" type=\"Element\">A DOM element to wrap in a jQuery object.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Accepts a string containing a CSS selector which is then used to match a set of elements.</summary>\r\n    ///   <param name=\"elementArray\" type=\"Array\">An array containing a set of DOM elements to wrap in a jQuery object.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Accepts a string containing a CSS selector which is then used to match a set of elements.</summary>\r\n    ///   <param name=\"object\" type=\"PlainObject\">A plain object to wrap in a jQuery object.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Accepts a string containing a CSS selector which is then used to match a set of elements.</summary>\r\n    ///   <param name=\"jQuery object\" type=\"PlainObject\">An existing jQuery object to clone.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'innerHeight': function() {\r\n    /// <summary>Get the current computed height for the first element in the set of matched elements, including padding but not border.</summary>\r\n    /// <returns type=\"Integer\" />\r\n  },\r\n  'innerWidth': function() {\r\n    /// <summary>Get the current computed width for the first element in the set of matched elements, including padding but not border.</summary>\r\n    /// <returns type=\"Integer\" />\r\n  },\r\n  'input': function() {\r\n    /// <summary>Selects all input, textarea, select and button elements.</summary>\r\n  },\r\n  'insertAfter': function() {\r\n    /// <signature>\r\n    ///   <summary>Insert every element in the set of matched elements after the target.</summary>\r\n    ///   <param name=\"target\" type=\"jQuery\">A selector, element, HTML string, or jQuery object; the matched set of elements will be inserted after the element(s) specified by this parameter.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'insertBefore': function() {\r\n    /// <signature>\r\n    ///   <summary>Insert every element in the set of matched elements before the target.</summary>\r\n    ///   <param name=\"target\" type=\"jQuery\">A selector, element, HTML string, or jQuery object; the matched set of elements will be inserted before the element(s) specified by this parameter.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'is': function() {\r\n    /// <signature>\r\n    ///   <summary>Check the current matched set of elements against a selector, element, or jQuery object and return true if at least one of these elements matches the given arguments.</summary>\r\n    ///   <param name=\"selector\" type=\"String\">A string containing a selector expression to match elements against.</param>\r\n    ///   <returns type=\"Boolean\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Check the current matched set of elements against a selector, element, or jQuery object and return true if at least one of these elements matches the given arguments.</summary>\r\n    ///   <param name=\"function(index)\" type=\"Function\">A function used as a test for the set of elements. It accepts one argument, index, which is the element's index in the jQuery collection.Within the function, this refers to the current DOM element.</param>\r\n    ///   <returns type=\"Boolean\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Check the current matched set of elements against a selector, element, or jQuery object and return true if at least one of these elements matches the given arguments.</summary>\r\n    ///   <param name=\"jQuery object\" type=\"Object\">An existing jQuery object to match the current set of elements against.</param>\r\n    ///   <returns type=\"Boolean\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Check the current matched set of elements against a selector, element, or jQuery object and return true if at least one of these elements matches the given arguments.</summary>\r\n    ///   <param name=\"element\" type=\"Element\">An element to match the current set of elements against.</param>\r\n    ///   <returns type=\"Boolean\" />\r\n    /// </signature>\r\n  },\r\n  'jquery': function() {\r\n    /// <summary>A string containing the jQuery version number.</summary>\r\n    /// <returns type=\"String\" />\r\n  },\r\n  'keydown': function() {\r\n    /// <signature>\r\n    ///   <summary>Bind an event handler to the \"keydown\" JavaScript event, or trigger that event on an element.</summary>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Bind an event handler to the \"keydown\" JavaScript event, or trigger that event on an element.</summary>\r\n    ///   <param name=\"eventData\" type=\"PlainObject\">An object containing data that will be passed to the event handler.</param>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'keypress': function() {\r\n    /// <signature>\r\n    ///   <summary>Bind an event handler to the \"keypress\" JavaScript event, or trigger that event on an element.</summary>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Bind an event handler to the \"keypress\" JavaScript event, or trigger that event on an element.</summary>\r\n    ///   <param name=\"eventData\" type=\"PlainObject\">An object containing data that will be passed to the event handler.</param>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'keyup': function() {\r\n    /// <signature>\r\n    ///   <summary>Bind an event handler to the \"keyup\" JavaScript event, or trigger that event on an element.</summary>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Bind an event handler to the \"keyup\" JavaScript event, or trigger that event on an element.</summary>\r\n    ///   <param name=\"eventData\" type=\"PlainObject\">An object containing data that will be passed to the event handler.</param>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'lang': function() {\r\n    /// <signature>\r\n    ///   <summary>Selects all elements of the specified language.</summary>\r\n    ///   <param name=\"language\" type=\"String\">A language code.</param>\r\n    /// </signature>\r\n  },\r\n  'last': function() {\r\n    /// <summary>Selects the last matched element.</summary>\r\n  },\r\n  'last-child': function() {\r\n    /// <summary>Selects all elements that are the last child of their parent.</summary>\r\n  },\r\n  'last-of-type': function() {\r\n    /// <summary>Selects all elements that are the last among siblings of the same element name.</summary>\r\n  },\r\n  'length': function() {\r\n    /// <summary>The number of elements in the jQuery object.</summary>\r\n    /// <returns type=\"Number\" />\r\n  },\r\n  'live': function() {\r\n    /// <signature>\r\n    ///   <summary>Attach an event handler for all elements which match the current selector, now and in the future.</summary>\r\n    ///   <param name=\"events\" type=\"String\">A string containing a JavaScript event type, such as \"click\" or \"keydown.\" As of jQuery 1.4 the string can contain multiple, space-separated event types or custom event names.</param>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute at the time the event is triggered.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Attach an event handler for all elements which match the current selector, now and in the future.</summary>\r\n    ///   <param name=\"events\" type=\"String\">A string containing a JavaScript event type, such as \"click\" or \"keydown.\" As of jQuery 1.4 the string can contain multiple, space-separated event types or custom event names.</param>\r\n    ///   <param name=\"data\" type=\"PlainObject\">An object containing data that will be passed to the event handler.</param>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute at the time the event is triggered.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Attach an event handler for all elements which match the current selector, now and in the future.</summary>\r\n    ///   <param name=\"events\" type=\"PlainObject\">A plain object of one or more JavaScript event types and functions to execute for them.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'load': function() {\r\n    /// <signature>\r\n    ///   <summary>Bind an event handler to the \"load\" JavaScript event.</summary>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute when the event is triggered.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Bind an event handler to the \"load\" JavaScript event.</summary>\r\n    ///   <param name=\"eventData\" type=\"PlainObject\">An object containing data that will be passed to the event handler.</param>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'lt': function() {\r\n    /// <signature>\r\n    ///   <summary>Select all elements at an index less than index within the matched set.</summary>\r\n    ///   <param name=\"index\" type=\"Number\">Zero-based index.</param>\r\n    /// </signature>\r\n  },\r\n  'map': function() {\r\n    /// <signature>\r\n    ///   <summary>Pass each element in the current matched set through a function, producing a new jQuery object containing the return values.</summary>\r\n    ///   <param name=\"callback(index, domElement)\" type=\"Function\">A function object that will be invoked for each element in the current set.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'mousedown': function() {\r\n    /// <signature>\r\n    ///   <summary>Bind an event handler to the \"mousedown\" JavaScript event, or trigger that event on an element.</summary>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Bind an event handler to the \"mousedown\" JavaScript event, or trigger that event on an element.</summary>\r\n    ///   <param name=\"eventData\" type=\"PlainObject\">An object containing data that will be passed to the event handler.</param>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'mouseenter': function() {\r\n    /// <signature>\r\n    ///   <summary>Bind an event handler to be fired when the mouse enters an element, or trigger that handler on an element.</summary>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Bind an event handler to be fired when the mouse enters an element, or trigger that handler on an element.</summary>\r\n    ///   <param name=\"eventData\" type=\"PlainObject\">An object containing data that will be passed to the event handler.</param>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'mouseleave': function() {\r\n    /// <signature>\r\n    ///   <summary>Bind an event handler to be fired when the mouse leaves an element, or trigger that handler on an element.</summary>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Bind an event handler to be fired when the mouse leaves an element, or trigger that handler on an element.</summary>\r\n    ///   <param name=\"eventData\" type=\"PlainObject\">An object containing data that will be passed to the event handler.</param>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'mousemove': function() {\r\n    /// <signature>\r\n    ///   <summary>Bind an event handler to the \"mousemove\" JavaScript event, or trigger that event on an element.</summary>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Bind an event handler to the \"mousemove\" JavaScript event, or trigger that event on an element.</summary>\r\n    ///   <param name=\"eventData\" type=\"PlainObject\">An object containing data that will be passed to the event handler.</param>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'mouseout': function() {\r\n    /// <signature>\r\n    ///   <summary>Bind an event handler to the \"mouseout\" JavaScript event, or trigger that event on an element.</summary>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Bind an event handler to the \"mouseout\" JavaScript event, or trigger that event on an element.</summary>\r\n    ///   <param name=\"eventData\" type=\"PlainObject\">An object containing data that will be passed to the event handler.</param>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'mouseover': function() {\r\n    /// <signature>\r\n    ///   <summary>Bind an event handler to the \"mouseover\" JavaScript event, or trigger that event on an element.</summary>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Bind an event handler to the \"mouseover\" JavaScript event, or trigger that event on an element.</summary>\r\n    ///   <param name=\"eventData\" type=\"PlainObject\">An object containing data that will be passed to the event handler.</param>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'mouseup': function() {\r\n    /// <signature>\r\n    ///   <summary>Bind an event handler to the \"mouseup\" JavaScript event, or trigger that event on an element.</summary>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Bind an event handler to the \"mouseup\" JavaScript event, or trigger that event on an element.</summary>\r\n    ///   <param name=\"eventData\" type=\"PlainObject\">An object containing data that will be passed to the event handler.</param>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'multiple': function() {\r\n    /// <signature>\r\n    ///   <summary>Selects the combined results of all the specified selectors.</summary>\r\n    ///   <param name=\"selector1\" type=\"String\">Any valid selector.</param>\r\n    ///   <param name=\"selector2\" type=\"String\">Another valid selector.</param>\r\n    ///   <param name=\"selectorN\" type=\"String\">As many more valid selectors as you like.</param>\r\n    /// </signature>\r\n  },\r\n  'next': function() {\r\n    /// <signature>\r\n    ///   <summary>Get the immediately following sibling of each element in the set of matched elements. If a selector is provided, it retrieves the next sibling only if it matches that selector.</summary>\r\n    ///   <param name=\"selector\" type=\"String\">A string containing a selector expression to match elements against.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'next adjacent': function() {\r\n    /// <signature>\r\n    ///   <summary>Selects all next elements matching \"next\" that are immediately preceded by a sibling \"prev\".</summary>\r\n    ///   <param name=\"prev\" type=\"String\">Any valid selector.</param>\r\n    ///   <param name=\"next\" type=\"String\">A selector to match the element that is next to the first selector.</param>\r\n    /// </signature>\r\n  },\r\n  'next siblings': function() {\r\n    /// <signature>\r\n    ///   <summary>Selects all sibling elements that follow after the \"prev\" element, have the same parent, and match the filtering \"siblings\" selector.</summary>\r\n    ///   <param name=\"prev\" type=\"String\">Any valid selector.</param>\r\n    ///   <param name=\"siblings\" type=\"String\">A selector to filter elements that are the following siblings of the first selector.</param>\r\n    /// </signature>\r\n  },\r\n  'nextAll': function() {\r\n    /// <signature>\r\n    ///   <summary>Get all following siblings of each element in the set of matched elements, optionally filtered by a selector.</summary>\r\n    ///   <param name=\"selector\" type=\"String\">A string containing a selector expression to match elements against.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'nextUntil': function() {\r\n    /// <signature>\r\n    ///   <summary>Get all following siblings of each element up to but not including the element matched by the selector, DOM node, or jQuery object passed.</summary>\r\n    ///   <param name=\"selector\" type=\"String\">A string containing a selector expression to indicate where to stop matching following sibling elements.</param>\r\n    ///   <param name=\"filter\" type=\"String\">A string containing a selector expression to match elements against.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Get all following siblings of each element up to but not including the element matched by the selector, DOM node, or jQuery object passed.</summary>\r\n    ///   <param name=\"element\" type=\"Element\">A DOM node or jQuery object indicating where to stop matching following sibling elements.</param>\r\n    ///   <param name=\"filter\" type=\"String\">A string containing a selector expression to match elements against.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'not': function() {\r\n    /// <signature>\r\n    ///   <summary>Remove elements from the set of matched elements.</summary>\r\n    ///   <param name=\"selector\" type=\"String\">A string containing a selector expression to match elements against.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Remove elements from the set of matched elements.</summary>\r\n    ///   <param name=\"elements\" type=\"Array\">One or more DOM elements to remove from the matched set.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Remove elements from the set of matched elements.</summary>\r\n    ///   <param name=\"function(index)\" type=\"Function\">A function used as a test for each element in the set. this is the current DOM element.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Remove elements from the set of matched elements.</summary>\r\n    ///   <param name=\"jQuery object\" type=\"PlainObject\">An existing jQuery object to match the current set of elements against.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'nth-child': function() {\r\n    /// <signature>\r\n    ///   <summary>Selects all elements that are the nth-child of their parent.</summary>\r\n    ///   <param name=\"index\" type=\"String\">The index of each child to match, starting with 1, the string even or odd, or an equation ( eg. :nth-child(even), :nth-child(4n) )</param>\r\n    /// </signature>\r\n  },\r\n  'nth-last-child': function() {\r\n    /// <signature>\r\n    ///   <summary>Selects all elements that are the nth-child of their parent, counting from the last element to the first.</summary>\r\n    ///   <param name=\"index\" type=\"String\">The index of each child to match, starting with the last one (1), the string even or odd, or an equation ( eg. :nth-last-child(even), :nth-last-child(4n) )</param>\r\n    /// </signature>\r\n  },\r\n  'nth-last-of-type': function() {\r\n    /// <signature>\r\n    ///   <summary>Selects all elements that are the nth-child of their parent, counting from the last element to the first.</summary>\r\n    ///   <param name=\"index\" type=\"String\">The index of each child to match, starting with the last one (1), the string even or odd, or an equation ( eg. :nth-last-of-type(even), :nth-last-of-type(4n) )</param>\r\n    /// </signature>\r\n  },\r\n  'nth-of-type': function() {\r\n    /// <signature>\r\n    ///   <summary>Selects all elements that are the nth child of their parent in relation to siblings with the same element name.</summary>\r\n    ///   <param name=\"index\" type=\"String\">The index of each child to match, starting with 1, the string even or odd, or an equation ( eg. :nth-of-type(even), :nth-of-type(4n) )</param>\r\n    /// </signature>\r\n  },\r\n  'odd': function() {\r\n    /// <summary>Selects odd elements, zero-indexed.  See also even.</summary>\r\n  },\r\n  'off': function() {\r\n    /// <signature>\r\n    ///   <summary>Remove an event handler.</summary>\r\n    ///   <param name=\"events\" type=\"String\">One or more space-separated event types and optional namespaces, or just namespaces, such as \"click\", \"keydown.myPlugin\", or \".myPlugin\".</param>\r\n    ///   <param name=\"selector\" type=\"String\">A selector which should match the one originally passed to .on() when attaching event handlers.</param>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A handler function previously attached for the event(s), or the special value false.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Remove an event handler.</summary>\r\n    ///   <param name=\"events\" type=\"PlainObject\">An object where the string keys represent one or more space-separated event types and optional namespaces, and the values represent handler functions previously attached for the event(s).</param>\r\n    ///   <param name=\"selector\" type=\"String\">A selector which should match the one originally passed to .on() when attaching event handlers.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'offset': function() {\r\n    /// <signature>\r\n    ///   <summary>Set the current coordinates of every element in the set of matched elements, relative to the document.</summary>\r\n    ///   <param name=\"coordinates\" type=\"PlainObject\">An object containing the properties top and left, which are integers indicating the new top and left coordinates for the elements.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Set the current coordinates of every element in the set of matched elements, relative to the document.</summary>\r\n    ///   <param name=\"function(index, coords)\" type=\"Function\">A function to return the coordinates to set. Receives the index of the element in the collection as the first argument and the current coordinates as the second argument. The function should return an object with the new top and left properties.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'offsetParent': function() {\r\n    /// <summary>Get the closest ancestor element that is positioned.</summary>\r\n    /// <returns type=\"jQuery\" />\r\n  },\r\n  'on': function() {\r\n    /// <signature>\r\n    ///   <summary>Attach an event handler function for one or more events to the selected elements.</summary>\r\n    ///   <param name=\"events\" type=\"String\">One or more space-separated event types and optional namespaces, such as \"click\" or \"keydown.myPlugin\".</param>\r\n    ///   <param name=\"selector\" type=\"String\">A selector string to filter the descendants of the selected elements that trigger the event. If the selector is null or omitted, the event is always triggered when it reaches the selected element.</param>\r\n    ///   <param name=\"data\" type=\"Anything\">Data to be passed to the handler in event.data when an event is triggered.</param>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute when the event is triggered. The value false is also allowed as a shorthand for a function that simply does return false.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Attach an event handler function for one or more events to the selected elements.</summary>\r\n    ///   <param name=\"events\" type=\"PlainObject\">An object in which the string keys represent one or more space-separated event types and optional namespaces, and the values represent a handler function to be called for the event(s).</param>\r\n    ///   <param name=\"selector\" type=\"String\">A selector string to filter the descendants of the selected elements that will call the handler. If the selector is null or omitted, the handler is always called when it reaches the selected element.</param>\r\n    ///   <param name=\"data\" type=\"Anything\">Data to be passed to the handler in event.data when an event occurs.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'one': function() {\r\n    /// <signature>\r\n    ///   <summary>Attach a handler to an event for the elements. The handler is executed at most once per element.</summary>\r\n    ///   <param name=\"events\" type=\"String\">A string containing one or more JavaScript event types, such as \"click\" or \"submit,\" or custom event names.</param>\r\n    ///   <param name=\"data\" type=\"PlainObject\">An object containing data that will be passed to the event handler.</param>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute at the time the event is triggered.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Attach a handler to an event for the elements. The handler is executed at most once per element.</summary>\r\n    ///   <param name=\"events\" type=\"String\">One or more space-separated event types and optional namespaces, such as \"click\" or \"keydown.myPlugin\".</param>\r\n    ///   <param name=\"selector\" type=\"String\">A selector string to filter the descendants of the selected elements that trigger the event. If the selector is null or omitted, the event is always triggered when it reaches the selected element.</param>\r\n    ///   <param name=\"data\" type=\"Anything\">Data to be passed to the handler in event.data when an event is triggered.</param>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute when the event is triggered. The value false is also allowed as a shorthand for a function that simply does return false.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Attach a handler to an event for the elements. The handler is executed at most once per element.</summary>\r\n    ///   <param name=\"events\" type=\"PlainObject\">An object in which the string keys represent one or more space-separated event types and optional namespaces, and the values represent a handler function to be called for the event(s).</param>\r\n    ///   <param name=\"selector\" type=\"String\">A selector string to filter the descendants of the selected elements that will call the handler. If the selector is null or omitted, the handler is always called when it reaches the selected element.</param>\r\n    ///   <param name=\"data\" type=\"Anything\">Data to be passed to the handler in event.data when an event occurs.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'only-child': function() {\r\n    /// <summary>Selects all elements that are the only child of their parent.</summary>\r\n  },\r\n  'only-of-type': function() {\r\n    /// <summary>Selects all elements that have no siblings with the same element name.</summary>\r\n  },\r\n  'outerHeight': function() {\r\n    /// <signature>\r\n    ///   <summary>Get the current computed height for the first element in the set of matched elements, including padding, border, and optionally margin. Returns an integer (without \"px\") representation of the value or null if called on an empty set of elements.</summary>\r\n    ///   <param name=\"includeMargin\" type=\"Boolean\">A Boolean indicating whether to include the element's margin in the calculation.</param>\r\n    ///   <returns type=\"Integer\" />\r\n    /// </signature>\r\n  },\r\n  'outerWidth': function() {\r\n    /// <signature>\r\n    ///   <summary>Get the current computed width for the first element in the set of matched elements, including padding and border.</summary>\r\n    ///   <param name=\"includeMargin\" type=\"Boolean\">A Boolean indicating whether to include the element's margin in the calculation.</param>\r\n    ///   <returns type=\"Integer\" />\r\n    /// </signature>\r\n  },\r\n  'parent': function() {\r\n    /// <signature>\r\n    ///   <summary>Get the parent of each element in the current set of matched elements, optionally filtered by a selector.</summary>\r\n    ///   <param name=\"selector\" type=\"String\">A string containing a selector expression to match elements against.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'parents': function() {\r\n    /// <signature>\r\n    ///   <summary>Get the ancestors of each element in the current set of matched elements, optionally filtered by a selector.</summary>\r\n    ///   <param name=\"selector\" type=\"String\">A string containing a selector expression to match elements against.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'parentsUntil': function() {\r\n    /// <signature>\r\n    ///   <summary>Get the ancestors of each element in the current set of matched elements, up to but not including the element matched by the selector, DOM node, or jQuery object.</summary>\r\n    ///   <param name=\"selector\" type=\"String\">A string containing a selector expression to indicate where to stop matching ancestor elements.</param>\r\n    ///   <param name=\"filter\" type=\"String\">A string containing a selector expression to match elements against.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Get the ancestors of each element in the current set of matched elements, up to but not including the element matched by the selector, DOM node, or jQuery object.</summary>\r\n    ///   <param name=\"element\" type=\"Element\">A DOM node or jQuery object indicating where to stop matching ancestor elements.</param>\r\n    ///   <param name=\"filter\" type=\"String\">A string containing a selector expression to match elements against.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'password': function() {\r\n    /// <summary>Selects all elements of type password.</summary>\r\n  },\r\n  'position': function() {\r\n    /// <summary>Get the current coordinates of the first element in the set of matched elements, relative to the offset parent.</summary>\r\n    /// <returns type=\"Object\" />\r\n  },\r\n  'prepend': function() {\r\n    /// <signature>\r\n    ///   <summary>Insert content, specified by the parameter, to the beginning of each element in the set of matched elements.</summary>\r\n    ///   <param name=\"content\" type=\"jQuery\">DOM element, array of elements, HTML string, or jQuery object to insert at the beginning of each element in the set of matched elements.</param>\r\n    ///   <param name=\"content\" type=\"jQuery\">One or more additional DOM elements, arrays of elements, HTML strings, or jQuery objects to insert at the beginning of each element in the set of matched elements.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Insert content, specified by the parameter, to the beginning of each element in the set of matched elements.</summary>\r\n    ///   <param name=\"function(index, html)\" type=\"Function\">A function that returns an HTML string, DOM element(s), or jQuery object to insert at the beginning of each element in the set of matched elements. Receives the index position of the element in the set and the old HTML value of the element as arguments. Within the function, this refers to the current element in the set.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'prependTo': function() {\r\n    /// <signature>\r\n    ///   <summary>Insert every element in the set of matched elements to the beginning of the target.</summary>\r\n    ///   <param name=\"target\" type=\"jQuery\">A selector, element, HTML string, or jQuery object; the matched set of elements will be inserted at the beginning of the element(s) specified by this parameter.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'prev': function() {\r\n    /// <signature>\r\n    ///   <summary>Get the immediately preceding sibling of each element in the set of matched elements, optionally filtered by a selector.</summary>\r\n    ///   <param name=\"selector\" type=\"String\">A string containing a selector expression to match elements against.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'prevAll': function() {\r\n    /// <signature>\r\n    ///   <summary>Get all preceding siblings of each element in the set of matched elements, optionally filtered by a selector.</summary>\r\n    ///   <param name=\"selector\" type=\"String\">A string containing a selector expression to match elements against.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'prevUntil': function() {\r\n    /// <signature>\r\n    ///   <summary>Get all preceding siblings of each element up to but not including the element matched by the selector, DOM node, or jQuery object.</summary>\r\n    ///   <param name=\"selector\" type=\"String\">A string containing a selector expression to indicate where to stop matching preceding sibling elements.</param>\r\n    ///   <param name=\"filter\" type=\"String\">A string containing a selector expression to match elements against.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Get all preceding siblings of each element up to but not including the element matched by the selector, DOM node, or jQuery object.</summary>\r\n    ///   <param name=\"element\" type=\"Element\">A DOM node or jQuery object indicating where to stop matching preceding sibling elements.</param>\r\n    ///   <param name=\"filter\" type=\"String\">A string containing a selector expression to match elements against.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'promise': function() {\r\n    /// <signature>\r\n    ///   <summary>Return a Promise object to observe when all actions of a certain type bound to the collection, queued or not, have finished.</summary>\r\n    ///   <param name=\"type\" type=\"String\">The type of queue that needs to be observed.</param>\r\n    ///   <param name=\"target\" type=\"PlainObject\">Object onto which the promise methods have to be attached</param>\r\n    ///   <returns type=\"Promise\" />\r\n    /// </signature>\r\n  },\r\n  'prop': function() {\r\n    /// <signature>\r\n    ///   <summary>Set one or more properties for the set of matched elements.</summary>\r\n    ///   <param name=\"propertyName\" type=\"String\">The name of the property to set.</param>\r\n    ///   <param name=\"value\" type=\"Boolean\">A value to set for the property.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Set one or more properties for the set of matched elements.</summary>\r\n    ///   <param name=\"properties\" type=\"PlainObject\">An object of property-value pairs to set.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Set one or more properties for the set of matched elements.</summary>\r\n    ///   <param name=\"propertyName\" type=\"String\">The name of the property to set.</param>\r\n    ///   <param name=\"function(index, oldPropertyValue)\" type=\"Function\">A function returning the value to set. Receives the index position of the element in the set and the old property value as arguments. Within the function, the keyword this refers to the current element.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'pushStack': function() {\r\n    /// <signature>\r\n    ///   <summary>Add a collection of DOM elements onto the jQuery stack.</summary>\r\n    ///   <param name=\"elements\" type=\"Array\">An array of elements to push onto the stack and make into a new jQuery object.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Add a collection of DOM elements onto the jQuery stack.</summary>\r\n    ///   <param name=\"elements\" type=\"Array\">An array of elements to push onto the stack and make into a new jQuery object.</param>\r\n    ///   <param name=\"name\" type=\"String\">The name of a jQuery method that generated the array of elements.</param>\r\n    ///   <param name=\"arguments\" type=\"Array\">The arguments that were passed in to the jQuery method (for serialization).</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'queue': function() {\r\n    /// <signature>\r\n    ///   <summary>Manipulate the queue of functions to be executed, once for each matched element.</summary>\r\n    ///   <param name=\"queueName\" type=\"String\">A string containing the name of the queue. Defaults to fx, the standard effects queue.</param>\r\n    ///   <param name=\"newQueue\" type=\"Array\">An array of functions to replace the current queue contents.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Manipulate the queue of functions to be executed, once for each matched element.</summary>\r\n    ///   <param name=\"queueName\" type=\"String\">A string containing the name of the queue. Defaults to fx, the standard effects queue.</param>\r\n    ///   <param name=\"callback( next )\" type=\"Function\">The new function to add to the queue, with a function to call that will dequeue the next item.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'radio': function() {\r\n    /// <summary>Selects all  elements of type radio.</summary>\r\n  },\r\n  'ready': function() {\r\n    /// <signature>\r\n    ///   <summary>Specify a function to execute when the DOM is fully loaded.</summary>\r\n    ///   <param name=\"handler\" type=\"Function\">A function to execute after the DOM is ready.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'remove': function() {\r\n    /// <signature>\r\n    ///   <summary>Remove the set of matched elements from the DOM.</summary>\r\n    ///   <param name=\"selector\" type=\"String\">A selector expression that filters the set of matched elements to be removed.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'removeAttr': function() {\r\n    /// <signature>\r\n    ///   <summary>Remove an attribute from each element in the set of matched elements.</summary>\r\n    ///   <param name=\"attributeName\" type=\"String\">An attribute to remove; as of version 1.7, it can be a space-separated list of attributes.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'removeClass': function() {\r\n    /// <signature>\r\n    ///   <summary>Remove a single class, multiple classes, or all classes from each element in the set of matched elements.</summary>\r\n    ///   <param name=\"className\" type=\"String\">One or more space-separated classes to be removed from the class attribute of each matched element.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Remove a single class, multiple classes, or all classes from each element in the set of matched elements.</summary>\r\n    ///   <param name=\"function(index, class)\" type=\"Function\">A function returning one or more space-separated class names to be removed. Receives the index position of the element in the set and the old class value as arguments.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'removeData': function() {\r\n    /// <signature>\r\n    ///   <summary>Remove a previously-stored piece of data.</summary>\r\n    ///   <param name=\"name\" type=\"String\">A string naming the piece of data to delete.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Remove a previously-stored piece of data.</summary>\r\n    ///   <param name=\"list\" type=\"String\">An array or space-separated string naming the pieces of data to delete.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'removeProp': function() {\r\n    /// <signature>\r\n    ///   <summary>Remove a property for the set of matched elements.</summary>\r\n    ///   <param name=\"propertyName\" type=\"String\">The name of the property to remove.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'replaceAll': function() {\r\n    /// <signature>\r\n    ///   <summary>Replace each target element with the set of matched elements.</summary>\r\n    ///   <param name=\"target\" type=\"String\">A selector expression indicating which element(s) to replace.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'replaceWith': function() {\r\n    /// <signature>\r\n    ///   <summary>Replace each element in the set of matched elements with the provided new content and return the set of elements that was removed.</summary>\r\n    ///   <param name=\"newContent\" type=\"jQuery\">The content to insert. May be an HTML string, DOM element, or jQuery object.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Replace each element in the set of matched elements with the provided new content and return the set of elements that was removed.</summary>\r\n    ///   <param name=\"function\" type=\"Function\">A function that returns content with which to replace the set of matched elements.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'reset': function() {\r\n    /// <summary>Selects all elements of type reset.</summary>\r\n  },\r\n  'resize': function() {\r\n    /// <signature>\r\n    ///   <summary>Bind an event handler to the \"resize\" JavaScript event, or trigger that event on an element.</summary>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Bind an event handler to the \"resize\" JavaScript event, or trigger that event on an element.</summary>\r\n    ///   <param name=\"eventData\" type=\"PlainObject\">An object containing data that will be passed to the event handler.</param>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'root': function() {\r\n    /// <signature>\r\n    ///   <summary>Selects the element that is the root of the document.</summary>\r\n    ///   <param name=\"index\" type=\"String\">The index of each child to match, starting with 1, the string even or odd, or an equation ( eg. :nth-last-child(even), :nth-last-child(4n) )</param>\r\n    /// </signature>\r\n  },\r\n  'scroll': function() {\r\n    /// <signature>\r\n    ///   <summary>Bind an event handler to the \"scroll\" JavaScript event, or trigger that event on an element.</summary>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Bind an event handler to the \"scroll\" JavaScript event, or trigger that event on an element.</summary>\r\n    ///   <param name=\"eventData\" type=\"PlainObject\">An object containing data that will be passed to the event handler.</param>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'scrollLeft': function() {\r\n    /// <signature>\r\n    ///   <summary>Set the current horizontal position of the scroll bar for each of the set of matched elements.</summary>\r\n    ///   <param name=\"value\" type=\"Number\">An integer indicating the new position to set the scroll bar to.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'scrollTop': function() {\r\n    /// <signature>\r\n    ///   <summary>Set the current vertical position of the scroll bar for each of the set of matched elements.</summary>\r\n    ///   <param name=\"value\" type=\"Number\">An integer indicating the new position to set the scroll bar to.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'select': function() {\r\n    /// <signature>\r\n    ///   <summary>Bind an event handler to the \"select\" JavaScript event, or trigger that event on an element.</summary>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Bind an event handler to the \"select\" JavaScript event, or trigger that event on an element.</summary>\r\n    ///   <param name=\"eventData\" type=\"PlainObject\">An object containing data that will be passed to the event handler.</param>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'selected': function() {\r\n    /// <summary>Selects all elements that are selected.</summary>\r\n  },\r\n  'selector': function() {\r\n    /// <summary>A selector representing selector originally passed to jQuery().</summary>\r\n    /// <returns type=\"String\" />\r\n  },\r\n  'serialize': function() {\r\n    /// <summary>Encode a set of form elements as a string for submission.</summary>\r\n    /// <returns type=\"String\" />\r\n  },\r\n  'serializeArray': function() {\r\n    /// <summary>Encode a set of form elements as an array of names and values.</summary>\r\n    /// <returns type=\"Array\" />\r\n  },\r\n  'show': function() {\r\n    /// <signature>\r\n    ///   <summary>Display the matched elements.</summary>\r\n    ///   <param name=\"duration\" type=\"\">A string or number determining how long the animation will run.</param>\r\n    ///   <param name=\"complete\" type=\"Function\">A function to call once the animation is complete.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Display the matched elements.</summary>\r\n    ///   <param name=\"options\" type=\"PlainObject\">A map of additional options to pass to the method.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Display the matched elements.</summary>\r\n    ///   <param name=\"duration\" type=\"\">A string or number determining how long the animation will run.</param>\r\n    ///   <param name=\"easing\" type=\"String\">A string indicating which easing function to use for the transition.</param>\r\n    ///   <param name=\"complete\" type=\"Function\">A function to call once the animation is complete.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'siblings': function() {\r\n    /// <signature>\r\n    ///   <summary>Get the siblings of each element in the set of matched elements, optionally filtered by a selector.</summary>\r\n    ///   <param name=\"selector\" type=\"String\">A string containing a selector expression to match elements against.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'size': function() {\r\n    /// <summary>Return the number of elements in the jQuery object.</summary>\r\n    /// <returns type=\"Number\" />\r\n  },\r\n  'slice': function() {\r\n    /// <signature>\r\n    ///   <summary>Reduce the set of matched elements to a subset specified by a range of indices.</summary>\r\n    ///   <param name=\"start\" type=\"Number\">An integer indicating the 0-based position at which the elements begin to be selected. If negative, it indicates an offset from the end of the set.</param>\r\n    ///   <param name=\"end\" type=\"Number\">An integer indicating the 0-based position at which the elements stop being selected. If negative, it indicates an offset from the end of the set. If omitted, the range continues until the end of the set.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'slideDown': function() {\r\n    /// <signature>\r\n    ///   <summary>Display the matched elements with a sliding motion.</summary>\r\n    ///   <param name=\"duration\" type=\"\">A string or number determining how long the animation will run.</param>\r\n    ///   <param name=\"complete\" type=\"Function\">A function to call once the animation is complete.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Display the matched elements with a sliding motion.</summary>\r\n    ///   <param name=\"options\" type=\"PlainObject\">A map of additional options to pass to the method.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Display the matched elements with a sliding motion.</summary>\r\n    ///   <param name=\"duration\" type=\"\">A string or number determining how long the animation will run.</param>\r\n    ///   <param name=\"easing\" type=\"String\">A string indicating which easing function to use for the transition.</param>\r\n    ///   <param name=\"complete\" type=\"Function\">A function to call once the animation is complete.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'slideToggle': function() {\r\n    /// <signature>\r\n    ///   <summary>Display or hide the matched elements with a sliding motion.</summary>\r\n    ///   <param name=\"duration\" type=\"\">A string or number determining how long the animation will run.</param>\r\n    ///   <param name=\"complete\" type=\"Function\">A function to call once the animation is complete.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Display or hide the matched elements with a sliding motion.</summary>\r\n    ///   <param name=\"options\" type=\"PlainObject\">A map of additional options to pass to the method.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Display or hide the matched elements with a sliding motion.</summary>\r\n    ///   <param name=\"duration\" type=\"\">A string or number determining how long the animation will run.</param>\r\n    ///   <param name=\"easing\" type=\"String\">A string indicating which easing function to use for the transition.</param>\r\n    ///   <param name=\"complete\" type=\"Function\">A function to call once the animation is complete.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'slideUp': function() {\r\n    /// <signature>\r\n    ///   <summary>Hide the matched elements with a sliding motion.</summary>\r\n    ///   <param name=\"duration\" type=\"\">A string or number determining how long the animation will run.</param>\r\n    ///   <param name=\"complete\" type=\"Function\">A function to call once the animation is complete.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Hide the matched elements with a sliding motion.</summary>\r\n    ///   <param name=\"options\" type=\"PlainObject\">A map of additional options to pass to the method.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Hide the matched elements with a sliding motion.</summary>\r\n    ///   <param name=\"duration\" type=\"\">A string or number determining how long the animation will run.</param>\r\n    ///   <param name=\"easing\" type=\"String\">A string indicating which easing function to use for the transition.</param>\r\n    ///   <param name=\"complete\" type=\"Function\">A function to call once the animation is complete.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'stop': function() {\r\n    /// <signature>\r\n    ///   <summary>Stop the currently-running animation on the matched elements.</summary>\r\n    ///   <param name=\"clearQueue\" type=\"Boolean\">A Boolean indicating whether to remove queued animation as well. Defaults to false.</param>\r\n    ///   <param name=\"jumpToEnd\" type=\"Boolean\">A Boolean indicating whether to complete the current animation immediately. Defaults to false.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Stop the currently-running animation on the matched elements.</summary>\r\n    ///   <param name=\"queue\" type=\"String\">The name of the queue in which to stop animations.</param>\r\n    ///   <param name=\"clearQueue\" type=\"Boolean\">A Boolean indicating whether to remove queued animation as well. Defaults to false.</param>\r\n    ///   <param name=\"jumpToEnd\" type=\"Boolean\">A Boolean indicating whether to complete the current animation immediately. Defaults to false.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'submit': function() {\r\n    /// <signature>\r\n    ///   <summary>Bind an event handler to the \"submit\" JavaScript event, or trigger that event on an element.</summary>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Bind an event handler to the \"submit\" JavaScript event, or trigger that event on an element.</summary>\r\n    ///   <param name=\"eventData\" type=\"PlainObject\">An object containing data that will be passed to the event handler.</param>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'target': function() {\r\n    /// <summary>Selects the target element indicated by the fragment identifier of the document's URI.</summary>\r\n  },\r\n  'text': function() {\r\n    /// <signature>\r\n    ///   <summary>Set the content of each element in the set of matched elements to the specified text.</summary>\r\n    ///   <param name=\"textString\" type=\"String\">A string of text to set as the content of each matched element.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Set the content of each element in the set of matched elements to the specified text.</summary>\r\n    ///   <param name=\"function(index, text)\" type=\"Function\">A function returning the text content to set. Receives the index position of the element in the set and the old text value as arguments.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'toArray': function() {\r\n    /// <summary>Retrieve all the DOM elements contained in the jQuery set, as an array.</summary>\r\n    /// <returns type=\"Array\" />\r\n  },\r\n  'toggle': function() {\r\n    /// <signature>\r\n    ///   <summary>Display or hide the matched elements.</summary>\r\n    ///   <param name=\"duration\" type=\"\">A string or number determining how long the animation will run.</param>\r\n    ///   <param name=\"complete\" type=\"Function\">A function to call once the animation is complete.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Display or hide the matched elements.</summary>\r\n    ///   <param name=\"options\" type=\"PlainObject\">A map of additional options to pass to the method.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Display or hide the matched elements.</summary>\r\n    ///   <param name=\"duration\" type=\"\">A string or number determining how long the animation will run.</param>\r\n    ///   <param name=\"easing\" type=\"String\">A string indicating which easing function to use for the transition.</param>\r\n    ///   <param name=\"complete\" type=\"Function\">A function to call once the animation is complete.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Display or hide the matched elements.</summary>\r\n    ///   <param name=\"showOrHide\" type=\"Boolean\">A Boolean indicating whether to show or hide the elements.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'toggleClass': function() {\r\n    /// <signature>\r\n    ///   <summary>Add or remove one or more classes from each element in the set of matched elements, depending on either the class's presence or the value of the switch argument.</summary>\r\n    ///   <param name=\"className\" type=\"String\">One or more class names (separated by spaces) to be toggled for each element in the matched set.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Add or remove one or more classes from each element in the set of matched elements, depending on either the class's presence or the value of the switch argument.</summary>\r\n    ///   <param name=\"className\" type=\"String\">One or more class names (separated by spaces) to be toggled for each element in the matched set.</param>\r\n    ///   <param name=\"switch\" type=\"Boolean\">A Boolean (not just truthy/falsy) value to determine whether the class should be added or removed.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Add or remove one or more classes from each element in the set of matched elements, depending on either the class's presence or the value of the switch argument.</summary>\r\n    ///   <param name=\"switch\" type=\"Boolean\">A boolean value to determine whether the class should be added or removed.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Add or remove one or more classes from each element in the set of matched elements, depending on either the class's presence or the value of the switch argument.</summary>\r\n    ///   <param name=\"function(index, class, switch)\" type=\"Function\">A function that returns class names to be toggled in the class attribute of each element in the matched set. Receives the index position of the element in the set, the old class value, and the switch as arguments.</param>\r\n    ///   <param name=\"switch\" type=\"Boolean\">A boolean value to determine whether the class should be added or removed.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'trigger': function() {\r\n    /// <signature>\r\n    ///   <summary>Execute all handlers and behaviors attached to the matched elements for the given event type.</summary>\r\n    ///   <param name=\"eventType\" type=\"String\">A string containing a JavaScript event type, such as click or submit.</param>\r\n    ///   <param name=\"extraParameters\" type=\"PlainObject\">Additional parameters to pass along to the event handler.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Execute all handlers and behaviors attached to the matched elements for the given event type.</summary>\r\n    ///   <param name=\"event\" type=\"Event\">A jQuery.Event object.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'triggerHandler': function() {\r\n    /// <signature>\r\n    ///   <summary>Execute all handlers attached to an element for an event.</summary>\r\n    ///   <param name=\"eventType\" type=\"String\">A string containing a JavaScript event type, such as click or submit.</param>\r\n    ///   <param name=\"extraParameters\" type=\"Array\">An array of additional parameters to pass along to the event handler.</param>\r\n    ///   <returns type=\"Object\" />\r\n    /// </signature>\r\n  },\r\n  'unbind': function() {\r\n    /// <signature>\r\n    ///   <summary>Remove a previously-attached event handler from the elements.</summary>\r\n    ///   <param name=\"eventType\" type=\"String\">A string containing a JavaScript event type, such as click or submit.</param>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">The function that is to be no longer executed.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Remove a previously-attached event handler from the elements.</summary>\r\n    ///   <param name=\"eventType\" type=\"String\">A string containing a JavaScript event type, such as click or submit.</param>\r\n    ///   <param name=\"false\" type=\"Boolean\">Unbinds the corresponding 'return false' function that was bound using .bind( eventType, false ).</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Remove a previously-attached event handler from the elements.</summary>\r\n    ///   <param name=\"event\" type=\"Object\">A JavaScript event object as passed to an event handler.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'undelegate': function() {\r\n    /// <signature>\r\n    ///   <summary>Remove a handler from the event for all elements which match the current selector, based upon a specific set of root elements.</summary>\r\n    ///   <param name=\"selector\" type=\"String\">A selector which will be used to filter the event results.</param>\r\n    ///   <param name=\"eventType\" type=\"String\">A string containing a JavaScript event type, such as \"click\" or \"keydown\"</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Remove a handler from the event for all elements which match the current selector, based upon a specific set of root elements.</summary>\r\n    ///   <param name=\"selector\" type=\"String\">A selector which will be used to filter the event results.</param>\r\n    ///   <param name=\"eventType\" type=\"String\">A string containing a JavaScript event type, such as \"click\" or \"keydown\"</param>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute at the time the event is triggered.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Remove a handler from the event for all elements which match the current selector, based upon a specific set of root elements.</summary>\r\n    ///   <param name=\"selector\" type=\"String\">A selector which will be used to filter the event results.</param>\r\n    ///   <param name=\"events\" type=\"PlainObject\">An object of one or more event types and previously bound functions to unbind from them.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Remove a handler from the event for all elements which match the current selector, based upon a specific set of root elements.</summary>\r\n    ///   <param name=\"namespace\" type=\"String\">A string containing a namespace to unbind all events from.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'unload': function() {\r\n    /// <signature>\r\n    ///   <summary>Bind an event handler to the \"unload\" JavaScript event.</summary>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute when the event is triggered.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Bind an event handler to the \"unload\" JavaScript event.</summary>\r\n    ///   <param name=\"eventData\" type=\"Object\">A plain object of data that will be passed to the event handler.</param>\r\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'unwrap': function() {\r\n    /// <summary>Remove the parents of the set of matched elements from the DOM, leaving the matched elements in their place.</summary>\r\n    /// <returns type=\"jQuery\" />\r\n  },\r\n  'val': function() {\r\n    /// <signature>\r\n    ///   <summary>Set the value of each element in the set of matched elements.</summary>\r\n    ///   <param name=\"value\" type=\"Array\">A string of text or an array of strings corresponding to the value of each matched element to set as selected/checked.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Set the value of each element in the set of matched elements.</summary>\r\n    ///   <param name=\"function(index, value)\" type=\"Function\">A function returning the value to set. this is the current element. Receives the index position of the element in the set and the old value as arguments.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'visible': function() {\r\n    /// <summary>Selects all elements that are visible.</summary>\r\n  },\r\n  'width': function() {\r\n    /// <signature>\r\n    ///   <summary>Set the CSS width of each element in the set of matched elements.</summary>\r\n    ///   <param name=\"value\" type=\"Number\">An integer representing the number of pixels, or an integer along with an optional unit of measure appended (as a string).</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Set the CSS width of each element in the set of matched elements.</summary>\r\n    ///   <param name=\"function(index, width)\" type=\"Function\">A function returning the width to set. Receives the index position of the element in the set and the old width as arguments. Within the function, this refers to the current element in the set.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'wrap': function() {\r\n    /// <signature>\r\n    ///   <summary>Wrap an HTML structure around each element in the set of matched elements.</summary>\r\n    ///   <param name=\"wrappingElement\" type=\"jQuery\">An HTML snippet, selector expression, jQuery object, or DOM element specifying the structure to wrap around the matched elements.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Wrap an HTML structure around each element in the set of matched elements.</summary>\r\n    ///   <param name=\"function(index)\" type=\"Function\">A callback function returning the HTML content or jQuery object to wrap around the matched elements. Receives the index position of the element in the set as an argument. Within the function, this refers to the current element in the set.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'wrapAll': function() {\r\n    /// <signature>\r\n    ///   <summary>Wrap an HTML structure around all elements in the set of matched elements.</summary>\r\n    ///   <param name=\"wrappingElement\" type=\"jQuery\">An HTML snippet, selector expression, jQuery object, or DOM element specifying the structure to wrap around the matched elements.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n  'wrapInner': function() {\r\n    /// <signature>\r\n    ///   <summary>Wrap an HTML structure around the content of each element in the set of matched elements.</summary>\r\n    ///   <param name=\"wrappingElement\" type=\"String\">An HTML snippet, selector expression, jQuery object, or DOM element specifying the structure to wrap around the content of the matched elements.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Wrap an HTML structure around the content of each element in the set of matched elements.</summary>\r\n    ///   <param name=\"function(index)\" type=\"Function\">A callback function which generates a structure to wrap around the content of the matched elements. Receives the index position of the element in the set as an argument. Within the function, this refers to the current element in the set.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n});\r\n\r\nintellisense.annotate(window, {\r\n  '$': function() {\r\n    /// <signature>\r\n    ///   <summary>Accepts a string containing a CSS selector which is then used to match a set of elements.</summary>\r\n    ///   <param name=\"selector\" type=\"String\">A string containing a selector expression</param>\r\n    ///   <param name=\"context\" type=\"jQuery\">A DOM Element, Document, or jQuery to use as context</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Accepts a string containing a CSS selector which is then used to match a set of elements.</summary>\r\n    ///   <param name=\"element\" type=\"Element\">A DOM element to wrap in a jQuery object.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Accepts a string containing a CSS selector which is then used to match a set of elements.</summary>\r\n    ///   <param name=\"elementArray\" type=\"Array\">An array containing a set of DOM elements to wrap in a jQuery object.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Accepts a string containing a CSS selector which is then used to match a set of elements.</summary>\r\n    ///   <param name=\"object\" type=\"PlainObject\">A plain object to wrap in a jQuery object.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n    /// <signature>\r\n    ///   <summary>Accepts a string containing a CSS selector which is then used to match a set of elements.</summary>\r\n    ///   <param name=\"jQuery object\" type=\"PlainObject\">An existing jQuery object to clone.</param>\r\n    ///   <returns type=\"jQuery\" />\r\n    /// </signature>\r\n  },\r\n});\r\n\r\n"
  },
  {
    "path": "23 - Architecting Application User Interfaces/PPPSSS.Dist.UIComp/PPPSSS.Dist.UIComp/Scripts/jquery-1.10.2.js",
    "content": "/* NUGET: BEGIN LICENSE TEXT\n *\n * Microsoft grants you the right to use these script files for the sole\n * purpose of either: (i) interacting through your browser with the Microsoft\n * website or online service, subject to the applicable licensing or use\n * terms; or (ii) using the files as included with a Microsoft product subject\n * to that product's license terms. Microsoft reserves all other rights to the\n * files not expressly granted by Microsoft, whether by implication, estoppel\n * or otherwise. Insofar as a script file is dual licensed under GPL,\n * Microsoft neither took the code under GPL nor distributes it thereunder but\n * under the terms set out in this paragraph. All notices and licenses\n * below are for informational purposes only.\n *\n * NUGET: END LICENSE TEXT */\n/*!\n * jQuery JavaScript Library v1.10.2\n * http://jquery.com/\n *\n * Includes Sizzle.js\n * http://sizzlejs.com/\n *\n * Copyright 2005, 2013 jQuery Foundation, Inc. and other contributors\n * Released under the MIT license\n * http://jquery.org/license\n *\n * Date: 2013-07-03T13:48Z\n */\n(function( window, undefined ) {\n\n// Can't do this because several apps including ASP.NET trace\n// the stack via arguments.caller.callee and Firefox dies if\n// you try to trace through \"use strict\" call chains. (#13335)\n// Support: Firefox 18+\n//\"use strict\";\nvar\n\t// The deferred used on DOM ready\n\treadyList,\n\n\t// A central reference to the root jQuery(document)\n\trootjQuery,\n\n\t// Support: IE<10\n\t// For `typeof xmlNode.method` instead of `xmlNode.method !== undefined`\n\tcore_strundefined = typeof undefined,\n\n\t// Use the correct document accordingly with window argument (sandbox)\n\tlocation = window.location,\n\tdocument = window.document,\n\tdocElem = document.documentElement,\n\n\t// Map over jQuery in case of overwrite\n\t_jQuery = window.jQuery,\n\n\t// Map over the $ in case of overwrite\n\t_$ = window.$,\n\n\t// [[Class]] -> type pairs\n\tclass2type = {},\n\n\t// List of deleted data cache ids, so we can reuse them\n\tcore_deletedIds = [],\n\n\tcore_version = \"1.10.2\",\n\n\t// Save a reference to some core methods\n\tcore_concat = core_deletedIds.concat,\n\tcore_push = core_deletedIds.push,\n\tcore_slice = core_deletedIds.slice,\n\tcore_indexOf = core_deletedIds.indexOf,\n\tcore_toString = class2type.toString,\n\tcore_hasOwn = class2type.hasOwnProperty,\n\tcore_trim = core_version.trim,\n\n\t// Define a local copy of jQuery\n\tjQuery = function( selector, context ) {\n\t\t// The jQuery object is actually just the init constructor 'enhanced'\n\t\treturn new jQuery.fn.init( selector, context, rootjQuery );\n\t},\n\n\t// Used for matching numbers\n\tcore_pnum = /[+-]?(?:\\d*\\.|)\\d+(?:[eE][+-]?\\d+|)/.source,\n\n\t// Used for splitting on whitespace\n\tcore_rnotwhite = /\\S+/g,\n\n\t// Make sure we trim BOM and NBSP (here's looking at you, Safari 5.0 and IE)\n\trtrim = /^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g,\n\n\t// A simple way to check for HTML strings\n\t// Prioritize #id over <tag> to avoid XSS via location.hash (#9521)\n\t// Strict HTML recognition (#11290: must start with <)\n\trquickExpr = /^(?:\\s*(<[\\w\\W]+>)[^>]*|#([\\w-]*))$/,\n\n\t// Match a standalone tag\n\trsingleTag = /^<(\\w+)\\s*\\/?>(?:<\\/\\1>|)$/,\n\n\t// JSON RegExp\n\trvalidchars = /^[\\],:{}\\s]*$/,\n\trvalidbraces = /(?:^|:|,)(?:\\s*\\[)+/g,\n\trvalidescape = /\\\\(?:[\"\\\\\\/bfnrt]|u[\\da-fA-F]{4})/g,\n\trvalidtokens = /\"[^\"\\\\\\r\\n]*\"|true|false|null|-?(?:\\d+\\.|)\\d+(?:[eE][+-]?\\d+|)/g,\n\n\t// Matches dashed string for camelizing\n\trmsPrefix = /^-ms-/,\n\trdashAlpha = /-([\\da-z])/gi,\n\n\t// Used by jQuery.camelCase as callback to replace()\n\tfcamelCase = function( all, letter ) {\n\t\treturn letter.toUpperCase();\n\t},\n\n\t// The ready event handler\n\tcompleted = function( event ) {\n\n\t\t// readyState === \"complete\" is good enough for us to call the dom ready in oldIE\n\t\tif ( document.addEventListener || event.type === \"load\" || document.readyState === \"complete\" ) {\n\t\t\tdetach();\n\t\t\tjQuery.ready();\n\t\t}\n\t},\n\t// Clean-up method for dom ready events\n\tdetach = function() {\n\t\tif ( document.addEventListener ) {\n\t\t\tdocument.removeEventListener( \"DOMContentLoaded\", completed, false );\n\t\t\twindow.removeEventListener( \"load\", completed, false );\n\n\t\t} else {\n\t\t\tdocument.detachEvent( \"onreadystatechange\", completed );\n\t\t\twindow.detachEvent( \"onload\", completed );\n\t\t}\n\t};\n\njQuery.fn = jQuery.prototype = {\n\t// The current version of jQuery being used\n\tjquery: core_version,\n\n\tconstructor: jQuery,\n\tinit: function( selector, context, rootjQuery ) {\n\t\tvar match, elem;\n\n\t\t// HANDLE: $(\"\"), $(null), $(undefined), $(false)\n\t\tif ( !selector ) {\n\t\t\treturn this;\n\t\t}\n\n\t\t// Handle HTML strings\n\t\tif ( typeof selector === \"string\" ) {\n\t\t\tif ( selector.charAt(0) === \"<\" && selector.charAt( selector.length - 1 ) === \">\" && selector.length >= 3 ) {\n\t\t\t\t// Assume that strings that start and end with <> are HTML and skip the regex check\n\t\t\t\tmatch = [ null, selector, null ];\n\n\t\t\t} else {\n\t\t\t\tmatch = rquickExpr.exec( selector );\n\t\t\t}\n\n\t\t\t// Match html or make sure no context is specified for #id\n\t\t\tif ( match && (match[1] || !context) ) {\n\n\t\t\t\t// HANDLE: $(html) -> $(array)\n\t\t\t\tif ( match[1] ) {\n\t\t\t\t\tcontext = context instanceof jQuery ? context[0] : context;\n\n\t\t\t\t\t// scripts is true for back-compat\n\t\t\t\t\tjQuery.merge( this, jQuery.parseHTML(\n\t\t\t\t\t\tmatch[1],\n\t\t\t\t\t\tcontext && context.nodeType ? context.ownerDocument || context : document,\n\t\t\t\t\t\ttrue\n\t\t\t\t\t) );\n\n\t\t\t\t\t// HANDLE: $(html, props)\n\t\t\t\t\tif ( rsingleTag.test( match[1] ) && jQuery.isPlainObject( context ) ) {\n\t\t\t\t\t\tfor ( match in context ) {\n\t\t\t\t\t\t\t// Properties of context are called as methods if possible\n\t\t\t\t\t\t\tif ( jQuery.isFunction( this[ match ] ) ) {\n\t\t\t\t\t\t\t\tthis[ match ]( context[ match ] );\n\n\t\t\t\t\t\t\t// ...and otherwise set as attributes\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthis.attr( match, context[ match ] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\treturn this;\n\n\t\t\t\t// HANDLE: $(#id)\n\t\t\t\t} else {\n\t\t\t\t\telem = document.getElementById( match[2] );\n\n\t\t\t\t\t// Check parentNode to catch when Blackberry 4.6 returns\n\t\t\t\t\t// nodes that are no longer in the document #6963\n\t\t\t\t\tif ( elem && elem.parentNode ) {\n\t\t\t\t\t\t// Handle the case where IE and Opera return items\n\t\t\t\t\t\t// by name instead of ID\n\t\t\t\t\t\tif ( elem.id !== match[2] ) {\n\t\t\t\t\t\t\treturn rootjQuery.find( selector );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Otherwise, we inject the element directly into the jQuery object\n\t\t\t\t\t\tthis.length = 1;\n\t\t\t\t\t\tthis[0] = elem;\n\t\t\t\t\t}\n\n\t\t\t\t\tthis.context = document;\n\t\t\t\t\tthis.selector = selector;\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\n\t\t\t// HANDLE: $(expr, $(...))\n\t\t\t} else if ( !context || context.jquery ) {\n\t\t\t\treturn ( context || rootjQuery ).find( selector );\n\n\t\t\t// HANDLE: $(expr, context)\n\t\t\t// (which is just equivalent to: $(context).find(expr)\n\t\t\t} else {\n\t\t\t\treturn this.constructor( context ).find( selector );\n\t\t\t}\n\n\t\t// HANDLE: $(DOMElement)\n\t\t} else if ( selector.nodeType ) {\n\t\t\tthis.context = this[0] = selector;\n\t\t\tthis.length = 1;\n\t\t\treturn this;\n\n\t\t// HANDLE: $(function)\n\t\t// Shortcut for document ready\n\t\t} else if ( jQuery.isFunction( selector ) ) {\n\t\t\treturn rootjQuery.ready( selector );\n\t\t}\n\n\t\tif ( selector.selector !== undefined ) {\n\t\t\tthis.selector = selector.selector;\n\t\t\tthis.context = selector.context;\n\t\t}\n\n\t\treturn jQuery.makeArray( selector, this );\n\t},\n\n\t// Start with an empty selector\n\tselector: \"\",\n\n\t// The default length of a jQuery object is 0\n\tlength: 0,\n\n\ttoArray: function() {\n\t\treturn core_slice.call( this );\n\t},\n\n\t// Get the Nth element in the matched element set OR\n\t// Get the whole matched element set as a clean array\n\tget: function( num ) {\n\t\treturn num == null ?\n\n\t\t\t// Return a 'clean' array\n\t\t\tthis.toArray() :\n\n\t\t\t// Return just the object\n\t\t\t( num < 0 ? this[ this.length + num ] : this[ num ] );\n\t},\n\n\t// Take an array of elements and push it onto the stack\n\t// (returning the new matched element set)\n\tpushStack: function( elems ) {\n\n\t\t// Build a new jQuery matched element set\n\t\tvar ret = jQuery.merge( this.constructor(), elems );\n\n\t\t// Add the old object onto the stack (as a reference)\n\t\tret.prevObject = this;\n\t\tret.context = this.context;\n\n\t\t// Return the newly-formed element set\n\t\treturn ret;\n\t},\n\n\t// Execute a callback for every element in the matched set.\n\t// (You can seed the arguments with an array of args, but this is\n\t// only used internally.)\n\teach: function( callback, args ) {\n\t\treturn jQuery.each( this, callback, args );\n\t},\n\n\tready: function( fn ) {\n\t\t// Add the callback\n\t\tjQuery.ready.promise().done( fn );\n\n\t\treturn this;\n\t},\n\n\tslice: function() {\n\t\treturn this.pushStack( core_slice.apply( this, arguments ) );\n\t},\n\n\tfirst: function() {\n\t\treturn this.eq( 0 );\n\t},\n\n\tlast: function() {\n\t\treturn this.eq( -1 );\n\t},\n\n\teq: function( i ) {\n\t\tvar len = this.length,\n\t\t\tj = +i + ( i < 0 ? len : 0 );\n\t\treturn this.pushStack( j >= 0 && j < len ? [ this[j] ] : [] );\n\t},\n\n\tmap: function( callback ) {\n\t\treturn this.pushStack( jQuery.map(this, function( elem, i ) {\n\t\t\treturn callback.call( elem, i, elem );\n\t\t}));\n\t},\n\n\tend: function() {\n\t\treturn this.prevObject || this.constructor(null);\n\t},\n\n\t// For internal use only.\n\t// Behaves like an Array's method, not like a jQuery method.\n\tpush: core_push,\n\tsort: [].sort,\n\tsplice: [].splice\n};\n\n// Give the init function the jQuery prototype for later instantiation\njQuery.fn.init.prototype = jQuery.fn;\n\njQuery.extend = jQuery.fn.extend = function() {\n\tvar src, copyIsArray, copy, name, options, clone,\n\t\ttarget = arguments[0] || {},\n\t\ti = 1,\n\t\tlength = arguments.length,\n\t\tdeep = false;\n\n\t// Handle a deep copy situation\n\tif ( typeof target === \"boolean\" ) {\n\t\tdeep = target;\n\t\ttarget = arguments[1] || {};\n\t\t// skip the boolean and the target\n\t\ti = 2;\n\t}\n\n\t// Handle case when target is a string or something (possible in deep copy)\n\tif ( typeof target !== \"object\" && !jQuery.isFunction(target) ) {\n\t\ttarget = {};\n\t}\n\n\t// extend jQuery itself if only one argument is passed\n\tif ( length === i ) {\n\t\ttarget = this;\n\t\t--i;\n\t}\n\n\tfor ( ; i < length; i++ ) {\n\t\t// Only deal with non-null/undefined values\n\t\tif ( (options = arguments[ i ]) != null ) {\n\t\t\t// Extend the base object\n\t\t\tfor ( name in options ) {\n\t\t\t\tsrc = target[ name ];\n\t\t\t\tcopy = options[ name ];\n\n\t\t\t\t// Prevent never-ending loop\n\t\t\t\tif ( target === copy ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// Recurse if we're merging plain objects or arrays\n\t\t\t\tif ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) {\n\t\t\t\t\tif ( copyIsArray ) {\n\t\t\t\t\t\tcopyIsArray = false;\n\t\t\t\t\t\tclone = src && jQuery.isArray(src) ? src : [];\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\tclone = src && jQuery.isPlainObject(src) ? src : {};\n\t\t\t\t\t}\n\n\t\t\t\t\t// Never move original objects, clone them\n\t\t\t\t\ttarget[ name ] = jQuery.extend( deep, clone, copy );\n\n\t\t\t\t// Don't bring in undefined values\n\t\t\t\t} else if ( copy !== undefined ) {\n\t\t\t\t\ttarget[ name ] = copy;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Return the modified object\n\treturn target;\n};\n\njQuery.extend({\n\t// Unique for each copy of jQuery on the page\n\t// Non-digits removed to match rinlinejQuery\n\texpando: \"jQuery\" + ( core_version + Math.random() ).replace( /\\D/g, \"\" ),\n\n\tnoConflict: function( deep ) {\n\t\tif ( window.$ === jQuery ) {\n\t\t\twindow.$ = _$;\n\t\t}\n\n\t\tif ( deep && window.jQuery === jQuery ) {\n\t\t\twindow.jQuery = _jQuery;\n\t\t}\n\n\t\treturn jQuery;\n\t},\n\n\t// Is the DOM ready to be used? Set to true once it occurs.\n\tisReady: false,\n\n\t// A counter to track how many items to wait for before\n\t// the ready event fires. See #6781\n\treadyWait: 1,\n\n\t// Hold (or release) the ready event\n\tholdReady: function( hold ) {\n\t\tif ( hold ) {\n\t\t\tjQuery.readyWait++;\n\t\t} else {\n\t\t\tjQuery.ready( true );\n\t\t}\n\t},\n\n\t// Handle when the DOM is ready\n\tready: function( wait ) {\n\n\t\t// Abort if there are pending holds or we're already ready\n\t\tif ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).\n\t\tif ( !document.body ) {\n\t\t\treturn setTimeout( jQuery.ready );\n\t\t}\n\n\t\t// Remember that the DOM is ready\n\t\tjQuery.isReady = true;\n\n\t\t// If a normal DOM Ready event fired, decrement, and wait if need be\n\t\tif ( wait !== true && --jQuery.readyWait > 0 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// If there are functions bound, to execute\n\t\treadyList.resolveWith( document, [ jQuery ] );\n\n\t\t// Trigger any bound ready events\n\t\tif ( jQuery.fn.trigger ) {\n\t\t\tjQuery( document ).trigger(\"ready\").off(\"ready\");\n\t\t}\n\t},\n\n\t// See test/unit/core.js for details concerning isFunction.\n\t// Since version 1.3, DOM methods and functions like alert\n\t// aren't supported. They return false on IE (#2968).\n\tisFunction: function( obj ) {\n\t\treturn jQuery.type(obj) === \"function\";\n\t},\n\n\tisArray: Array.isArray || function( obj ) {\n\t\treturn jQuery.type(obj) === \"array\";\n\t},\n\n\tisWindow: function( obj ) {\n\t\t/* jshint eqeqeq: false */\n\t\treturn obj != null && obj == obj.window;\n\t},\n\n\tisNumeric: function( obj ) {\n\t\treturn !isNaN( parseFloat(obj) ) && isFinite( obj );\n\t},\n\n\ttype: function( obj ) {\n\t\tif ( obj == null ) {\n\t\t\treturn String( obj );\n\t\t}\n\t\treturn typeof obj === \"object\" || typeof obj === \"function\" ?\n\t\t\tclass2type[ core_toString.call(obj) ] || \"object\" :\n\t\t\ttypeof obj;\n\t},\n\n\tisPlainObject: function( obj ) {\n\t\tvar key;\n\n\t\t// Must be an Object.\n\t\t// Because of IE, we also have to check the presence of the constructor property.\n\t\t// Make sure that DOM nodes and window objects don't pass through, as well\n\t\tif ( !obj || jQuery.type(obj) !== \"object\" || obj.nodeType || jQuery.isWindow( obj ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\ttry {\n\t\t\t// Not own constructor property must be Object\n\t\t\tif ( obj.constructor &&\n\t\t\t\t!core_hasOwn.call(obj, \"constructor\") &&\n\t\t\t\t!core_hasOwn.call(obj.constructor.prototype, \"isPrototypeOf\") ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} catch ( e ) {\n\t\t\t// IE8,9 Will throw exceptions on certain host objects #9897\n\t\t\treturn false;\n\t\t}\n\n\t\t// Support: IE<9\n\t\t// Handle iteration over inherited properties before own properties.\n\t\tif ( jQuery.support.ownLast ) {\n\t\t\tfor ( key in obj ) {\n\t\t\t\treturn core_hasOwn.call( obj, key );\n\t\t\t}\n\t\t}\n\n\t\t// Own properties are enumerated firstly, so to speed up,\n\t\t// if last one is own, then all properties are own.\n\t\tfor ( key in obj ) {}\n\n\t\treturn key === undefined || core_hasOwn.call( obj, key );\n\t},\n\n\tisEmptyObject: function( obj ) {\n\t\tvar name;\n\t\tfor ( name in obj ) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t},\n\n\terror: function( msg ) {\n\t\tthrow new Error( msg );\n\t},\n\n\t// data: string of html\n\t// context (optional): If specified, the fragment will be created in this context, defaults to document\n\t// keepScripts (optional): If true, will include scripts passed in the html string\n\tparseHTML: function( data, context, keepScripts ) {\n\t\tif ( !data || typeof data !== \"string\" ) {\n\t\t\treturn null;\n\t\t}\n\t\tif ( typeof context === \"boolean\" ) {\n\t\t\tkeepScripts = context;\n\t\t\tcontext = false;\n\t\t}\n\t\tcontext = context || document;\n\n\t\tvar parsed = rsingleTag.exec( data ),\n\t\t\tscripts = !keepScripts && [];\n\n\t\t// Single tag\n\t\tif ( parsed ) {\n\t\t\treturn [ context.createElement( parsed[1] ) ];\n\t\t}\n\n\t\tparsed = jQuery.buildFragment( [ data ], context, scripts );\n\t\tif ( scripts ) {\n\t\t\tjQuery( scripts ).remove();\n\t\t}\n\t\treturn jQuery.merge( [], parsed.childNodes );\n\t},\n\n\tparseJSON: function( data ) {\n\t\t// Attempt to parse using the native JSON parser first\n\t\tif ( window.JSON && window.JSON.parse ) {\n\t\t\treturn window.JSON.parse( data );\n\t\t}\n\n\t\tif ( data === null ) {\n\t\t\treturn data;\n\t\t}\n\n\t\tif ( typeof data === \"string\" ) {\n\n\t\t\t// Make sure leading/trailing whitespace is removed (IE can't handle it)\n\t\t\tdata = jQuery.trim( data );\n\n\t\t\tif ( data ) {\n\t\t\t\t// Make sure the incoming data is actual JSON\n\t\t\t\t// Logic borrowed from http://json.org/json2.js\n\t\t\t\tif ( rvalidchars.test( data.replace( rvalidescape, \"@\" )\n\t\t\t\t\t.replace( rvalidtokens, \"]\" )\n\t\t\t\t\t.replace( rvalidbraces, \"\")) ) {\n\n\t\t\t\t\treturn ( new Function( \"return \" + data ) )();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tjQuery.error( \"Invalid JSON: \" + data );\n\t},\n\n\t// Cross-browser xml parsing\n\tparseXML: function( data ) {\n\t\tvar xml, tmp;\n\t\tif ( !data || typeof data !== \"string\" ) {\n\t\t\treturn null;\n\t\t}\n\t\ttry {\n\t\t\tif ( window.DOMParser ) { // Standard\n\t\t\t\ttmp = new DOMParser();\n\t\t\t\txml = tmp.parseFromString( data , \"text/xml\" );\n\t\t\t} else { // IE\n\t\t\t\txml = new ActiveXObject( \"Microsoft.XMLDOM\" );\n\t\t\t\txml.async = \"false\";\n\t\t\t\txml.loadXML( data );\n\t\t\t}\n\t\t} catch( e ) {\n\t\t\txml = undefined;\n\t\t}\n\t\tif ( !xml || !xml.documentElement || xml.getElementsByTagName( \"parsererror\" ).length ) {\n\t\t\tjQuery.error( \"Invalid XML: \" + data );\n\t\t}\n\t\treturn xml;\n\t},\n\n\tnoop: function() {},\n\n\t// Evaluates a script in a global context\n\t// Workarounds based on findings by Jim Driscoll\n\t// http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context\n\tglobalEval: function( data ) {\n\t\tif ( data && jQuery.trim( data ) ) {\n\t\t\t// We use execScript on Internet Explorer\n\t\t\t// We use an anonymous function so that context is window\n\t\t\t// rather than jQuery in Firefox\n\t\t\t( window.execScript || function( data ) {\n\t\t\t\twindow[ \"eval\" ].call( window, data );\n\t\t\t} )( data );\n\t\t}\n\t},\n\n\t// Convert dashed to camelCase; used by the css and data modules\n\t// Microsoft forgot to hump their vendor prefix (#9572)\n\tcamelCase: function( string ) {\n\t\treturn string.replace( rmsPrefix, \"ms-\" ).replace( rdashAlpha, fcamelCase );\n\t},\n\n\tnodeName: function( elem, name ) {\n\t\treturn elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();\n\t},\n\n\t// args is for internal usage only\n\teach: function( obj, callback, args ) {\n\t\tvar value,\n\t\t\ti = 0,\n\t\t\tlength = obj.length,\n\t\t\tisArray = isArraylike( obj );\n\n\t\tif ( args ) {\n\t\t\tif ( isArray ) {\n\t\t\t\tfor ( ; i < length; i++ ) {\n\t\t\t\t\tvalue = callback.apply( obj[ i ], args );\n\n\t\t\t\t\tif ( value === false ) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfor ( i in obj ) {\n\t\t\t\t\tvalue = callback.apply( obj[ i ], args );\n\n\t\t\t\t\tif ( value === false ) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t// A special, fast, case for the most common use of each\n\t\t} else {\n\t\t\tif ( isArray ) {\n\t\t\t\tfor ( ; i < length; i++ ) {\n\t\t\t\t\tvalue = callback.call( obj[ i ], i, obj[ i ] );\n\n\t\t\t\t\tif ( value === false ) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfor ( i in obj ) {\n\t\t\t\t\tvalue = callback.call( obj[ i ], i, obj[ i ] );\n\n\t\t\t\t\tif ( value === false ) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn obj;\n\t},\n\n\t// Use native String.trim function wherever possible\n\ttrim: core_trim && !core_trim.call(\"\\uFEFF\\xA0\") ?\n\t\tfunction( text ) {\n\t\t\treturn text == null ?\n\t\t\t\t\"\" :\n\t\t\t\tcore_trim.call( text );\n\t\t} :\n\n\t\t// Otherwise use our own trimming functionality\n\t\tfunction( text ) {\n\t\t\treturn text == null ?\n\t\t\t\t\"\" :\n\t\t\t\t( text + \"\" ).replace( rtrim, \"\" );\n\t\t},\n\n\t// results is for internal usage only\n\tmakeArray: function( arr, results ) {\n\t\tvar ret = results || [];\n\n\t\tif ( arr != null ) {\n\t\t\tif ( isArraylike( Object(arr) ) ) {\n\t\t\t\tjQuery.merge( ret,\n\t\t\t\t\ttypeof arr === \"string\" ?\n\t\t\t\t\t[ arr ] : arr\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tcore_push.call( ret, arr );\n\t\t\t}\n\t\t}\n\n\t\treturn ret;\n\t},\n\n\tinArray: function( elem, arr, i ) {\n\t\tvar len;\n\n\t\tif ( arr ) {\n\t\t\tif ( core_indexOf ) {\n\t\t\t\treturn core_indexOf.call( arr, elem, i );\n\t\t\t}\n\n\t\t\tlen = arr.length;\n\t\t\ti = i ? i < 0 ? Math.max( 0, len + i ) : i : 0;\n\n\t\t\tfor ( ; i < len; i++ ) {\n\t\t\t\t// Skip accessing in sparse arrays\n\t\t\t\tif ( i in arr && arr[ i ] === elem ) {\n\t\t\t\t\treturn i;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn -1;\n\t},\n\n\tmerge: function( first, second ) {\n\t\tvar l = second.length,\n\t\t\ti = first.length,\n\t\t\tj = 0;\n\n\t\tif ( typeof l === \"number\" ) {\n\t\t\tfor ( ; j < l; j++ ) {\n\t\t\t\tfirst[ i++ ] = second[ j ];\n\t\t\t}\n\t\t} else {\n\t\t\twhile ( second[j] !== undefined ) {\n\t\t\t\tfirst[ i++ ] = second[ j++ ];\n\t\t\t}\n\t\t}\n\n\t\tfirst.length = i;\n\n\t\treturn first;\n\t},\n\n\tgrep: function( elems, callback, inv ) {\n\t\tvar retVal,\n\t\t\tret = [],\n\t\t\ti = 0,\n\t\t\tlength = elems.length;\n\t\tinv = !!inv;\n\n\t\t// Go through the array, only saving the items\n\t\t// that pass the validator function\n\t\tfor ( ; i < length; i++ ) {\n\t\t\tretVal = !!callback( elems[ i ], i );\n\t\t\tif ( inv !== retVal ) {\n\t\t\t\tret.push( elems[ i ] );\n\t\t\t}\n\t\t}\n\n\t\treturn ret;\n\t},\n\n\t// arg is for internal usage only\n\tmap: function( elems, callback, arg ) {\n\t\tvar value,\n\t\t\ti = 0,\n\t\t\tlength = elems.length,\n\t\t\tisArray = isArraylike( elems ),\n\t\t\tret = [];\n\n\t\t// Go through the array, translating each of the items to their\n\t\tif ( isArray ) {\n\t\t\tfor ( ; i < length; i++ ) {\n\t\t\t\tvalue = callback( elems[ i ], i, arg );\n\n\t\t\t\tif ( value != null ) {\n\t\t\t\t\tret[ ret.length ] = value;\n\t\t\t\t}\n\t\t\t}\n\n\t\t// Go through every key on the object,\n\t\t} else {\n\t\t\tfor ( i in elems ) {\n\t\t\t\tvalue = callback( elems[ i ], i, arg );\n\n\t\t\t\tif ( value != null ) {\n\t\t\t\t\tret[ ret.length ] = value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Flatten any nested arrays\n\t\treturn core_concat.apply( [], ret );\n\t},\n\n\t// A global GUID counter for objects\n\tguid: 1,\n\n\t// Bind a function to a context, optionally partially applying any\n\t// arguments.\n\tproxy: function( fn, context ) {\n\t\tvar args, proxy, tmp;\n\n\t\tif ( typeof context === \"string\" ) {\n\t\t\ttmp = fn[ context ];\n\t\t\tcontext = fn;\n\t\t\tfn = tmp;\n\t\t}\n\n\t\t// Quick check to determine if target is callable, in the spec\n\t\t// this throws a TypeError, but we will just return undefined.\n\t\tif ( !jQuery.isFunction( fn ) ) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\t// Simulated bind\n\t\targs = core_slice.call( arguments, 2 );\n\t\tproxy = function() {\n\t\t\treturn fn.apply( context || this, args.concat( core_slice.call( arguments ) ) );\n\t\t};\n\n\t\t// Set the guid of unique handler to the same of original handler, so it can be removed\n\t\tproxy.guid = fn.guid = fn.guid || jQuery.guid++;\n\n\t\treturn proxy;\n\t},\n\n\t// Multifunctional method to get and set values of a collection\n\t// The value/s can optionally be executed if it's a function\n\taccess: function( elems, fn, key, value, chainable, emptyGet, raw ) {\n\t\tvar i = 0,\n\t\t\tlength = elems.length,\n\t\t\tbulk = key == null;\n\n\t\t// Sets many values\n\t\tif ( jQuery.type( key ) === \"object\" ) {\n\t\t\tchainable = true;\n\t\t\tfor ( i in key ) {\n\t\t\t\tjQuery.access( elems, fn, i, key[i], true, emptyGet, raw );\n\t\t\t}\n\n\t\t// Sets one value\n\t\t} else if ( value !== undefined ) {\n\t\t\tchainable = true;\n\n\t\t\tif ( !jQuery.isFunction( value ) ) {\n\t\t\t\traw = true;\n\t\t\t}\n\n\t\t\tif ( bulk ) {\n\t\t\t\t// Bulk operations run against the entire set\n\t\t\t\tif ( raw ) {\n\t\t\t\t\tfn.call( elems, value );\n\t\t\t\t\tfn = null;\n\n\t\t\t\t// ...except when executing function values\n\t\t\t\t} else {\n\t\t\t\t\tbulk = fn;\n\t\t\t\t\tfn = function( elem, key, value ) {\n\t\t\t\t\t\treturn bulk.call( jQuery( elem ), value );\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( fn ) {\n\t\t\t\tfor ( ; i < length; i++ ) {\n\t\t\t\t\tfn( elems[i], key, raw ? value : value.call( elems[i], i, fn( elems[i], key ) ) );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn chainable ?\n\t\t\telems :\n\n\t\t\t// Gets\n\t\t\tbulk ?\n\t\t\t\tfn.call( elems ) :\n\t\t\t\tlength ? fn( elems[0], key ) : emptyGet;\n\t},\n\n\tnow: function() {\n\t\treturn ( new Date() ).getTime();\n\t},\n\n\t// A method for quickly swapping in/out CSS properties to get correct calculations.\n\t// Note: this method belongs to the css module but it's needed here for the support module.\n\t// If support gets modularized, this method should be moved back to the css module.\n\tswap: function( elem, options, callback, args ) {\n\t\tvar ret, name,\n\t\t\told = {};\n\n\t\t// Remember the old values, and insert the new ones\n\t\tfor ( name in options ) {\n\t\t\told[ name ] = elem.style[ name ];\n\t\t\telem.style[ name ] = options[ name ];\n\t\t}\n\n\t\tret = callback.apply( elem, args || [] );\n\n\t\t// Revert the old values\n\t\tfor ( name in options ) {\n\t\t\telem.style[ name ] = old[ name ];\n\t\t}\n\n\t\treturn ret;\n\t}\n});\n\njQuery.ready.promise = function( obj ) {\n\tif ( !readyList ) {\n\n\t\treadyList = jQuery.Deferred();\n\n\t\t// Catch cases where $(document).ready() is called after the browser event has already occurred.\n\t\t// we once tried to use readyState \"interactive\" here, but it caused issues like the one\n\t\t// discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15\n\t\tif ( document.readyState === \"complete\" ) {\n\t\t\t// Handle it asynchronously to allow scripts the opportunity to delay ready\n\t\t\tsetTimeout( jQuery.ready );\n\n\t\t// Standards-based browsers support DOMContentLoaded\n\t\t} else if ( document.addEventListener ) {\n\t\t\t// Use the handy event callback\n\t\t\tdocument.addEventListener( \"DOMContentLoaded\", completed, false );\n\n\t\t\t// A fallback to window.onload, that will always work\n\t\t\twindow.addEventListener( \"load\", completed, false );\n\n\t\t// If IE event model is used\n\t\t} else {\n\t\t\t// Ensure firing before onload, maybe late but safe also for iframes\n\t\t\tdocument.attachEvent( \"onreadystatechange\", completed );\n\n\t\t\t// A fallback to window.onload, that will always work\n\t\t\twindow.attachEvent( \"onload\", completed );\n\n\t\t\t// If IE and not a frame\n\t\t\t// continually check to see if the document is ready\n\t\t\tvar top = false;\n\n\t\t\ttry {\n\t\t\t\ttop = window.frameElement == null && document.documentElement;\n\t\t\t} catch(e) {}\n\n\t\t\tif ( top && top.doScroll ) {\n\t\t\t\t(function doScrollCheck() {\n\t\t\t\t\tif ( !jQuery.isReady ) {\n\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t// Use the trick by Diego Perini\n\t\t\t\t\t\t\t// http://javascript.nwbox.com/IEContentLoaded/\n\t\t\t\t\t\t\ttop.doScroll(\"left\");\n\t\t\t\t\t\t} catch(e) {\n\t\t\t\t\t\t\treturn setTimeout( doScrollCheck, 50 );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// detach all dom ready events\n\t\t\t\t\t\tdetach();\n\n\t\t\t\t\t\t// and execute any waiting functions\n\t\t\t\t\t\tjQuery.ready();\n\t\t\t\t\t}\n\t\t\t\t})();\n\t\t\t}\n\t\t}\n\t}\n\treturn readyList.promise( obj );\n};\n\n// Populate the class2type map\njQuery.each(\"Boolean Number String Function Array Date RegExp Object Error\".split(\" \"), function(i, name) {\n\tclass2type[ \"[object \" + name + \"]\" ] = name.toLowerCase();\n});\n\nfunction isArraylike( obj ) {\n\tvar length = obj.length,\n\t\ttype = jQuery.type( obj );\n\n\tif ( jQuery.isWindow( obj ) ) {\n\t\treturn false;\n\t}\n\n\tif ( obj.nodeType === 1 && length ) {\n\t\treturn true;\n\t}\n\n\treturn type === \"array\" || type !== \"function\" &&\n\t\t( length === 0 ||\n\t\ttypeof length === \"number\" && length > 0 && ( length - 1 ) in obj );\n}\n\n// All jQuery objects should point back to these\nrootjQuery = jQuery(document);\n/*!\n * Sizzle CSS Selector Engine v1.10.2\n * http://sizzlejs.com/\n *\n * Copyright 2013 jQuery Foundation, Inc. and other contributors\n * Released under the MIT license\n * http://jquery.org/license\n *\n * Date: 2013-07-03\n */\n(function( window, undefined ) {\n\nvar i,\n\tsupport,\n\tcachedruns,\n\tExpr,\n\tgetText,\n\tisXML,\n\tcompile,\n\toutermostContext,\n\tsortInput,\n\n\t// Local document vars\n\tsetDocument,\n\tdocument,\n\tdocElem,\n\tdocumentIsHTML,\n\trbuggyQSA,\n\trbuggyMatches,\n\tmatches,\n\tcontains,\n\n\t// Instance-specific data\n\texpando = \"sizzle\" + -(new Date()),\n\tpreferredDoc = window.document,\n\tdirruns = 0,\n\tdone = 0,\n\tclassCache = createCache(),\n\ttokenCache = createCache(),\n\tcompilerCache = createCache(),\n\thasDuplicate = false,\n\tsortOrder = function( a, b ) {\n\t\tif ( a === b ) {\n\t\t\thasDuplicate = true;\n\t\t\treturn 0;\n\t\t}\n\t\treturn 0;\n\t},\n\n\t// General-purpose constants\n\tstrundefined = typeof undefined,\n\tMAX_NEGATIVE = 1 << 31,\n\n\t// Instance methods\n\thasOwn = ({}).hasOwnProperty,\n\tarr = [],\n\tpop = arr.pop,\n\tpush_native = arr.push,\n\tpush = arr.push,\n\tslice = arr.slice,\n\t// Use a stripped-down indexOf if we can't use a native one\n\tindexOf = arr.indexOf || function( elem ) {\n\t\tvar i = 0,\n\t\t\tlen = this.length;\n\t\tfor ( ; i < len; i++ ) {\n\t\t\tif ( this[i] === elem ) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t},\n\n\tbooleans = \"checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped\",\n\n\t// Regular expressions\n\n\t// Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace\n\twhitespace = \"[\\\\x20\\\\t\\\\r\\\\n\\\\f]\",\n\t// http://www.w3.org/TR/css3-syntax/#characters\n\tcharacterEncoding = \"(?:\\\\\\\\.|[\\\\w-]|[^\\\\x00-\\\\xa0])+\",\n\n\t// Loosely modeled on CSS identifier characters\n\t// An unquoted value should be a CSS identifier http://www.w3.org/TR/css3-selectors/#attribute-selectors\n\t// Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier\n\tidentifier = characterEncoding.replace( \"w\", \"w#\" ),\n\n\t// Acceptable operators http://www.w3.org/TR/selectors/#attribute-selectors\n\tattributes = \"\\\\[\" + whitespace + \"*(\" + characterEncoding + \")\" + whitespace +\n\t\t\"*(?:([*^$|!~]?=)\" + whitespace + \"*(?:(['\\\"])((?:\\\\\\\\.|[^\\\\\\\\])*?)\\\\3|(\" + identifier + \")|)|)\" + whitespace + \"*\\\\]\",\n\n\t// Prefer arguments quoted,\n\t//   then not containing pseudos/brackets,\n\t//   then attribute selectors/non-parenthetical expressions,\n\t//   then anything else\n\t// These preferences are here to reduce the number of selectors\n\t//   needing tokenize in the PSEUDO preFilter\n\tpseudos = \":(\" + characterEncoding + \")(?:\\\\(((['\\\"])((?:\\\\\\\\.|[^\\\\\\\\])*?)\\\\3|((?:\\\\\\\\.|[^\\\\\\\\()[\\\\]]|\" + attributes.replace( 3, 8 ) + \")*)|.*)\\\\)|)\",\n\n\t// Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter\n\trtrim = new RegExp( \"^\" + whitespace + \"+|((?:^|[^\\\\\\\\])(?:\\\\\\\\.)*)\" + whitespace + \"+$\", \"g\" ),\n\n\trcomma = new RegExp( \"^\" + whitespace + \"*,\" + whitespace + \"*\" ),\n\trcombinators = new RegExp( \"^\" + whitespace + \"*([>+~]|\" + whitespace + \")\" + whitespace + \"*\" ),\n\n\trsibling = new RegExp( whitespace + \"*[+~]\" ),\n\trattributeQuotes = new RegExp( \"=\" + whitespace + \"*([^\\\\]'\\\"]*)\" + whitespace + \"*\\\\]\", \"g\" ),\n\n\trpseudo = new RegExp( pseudos ),\n\tridentifier = new RegExp( \"^\" + identifier + \"$\" ),\n\n\tmatchExpr = {\n\t\t\"ID\": new RegExp( \"^#(\" + characterEncoding + \")\" ),\n\t\t\"CLASS\": new RegExp( \"^\\\\.(\" + characterEncoding + \")\" ),\n\t\t\"TAG\": new RegExp( \"^(\" + characterEncoding.replace( \"w\", \"w*\" ) + \")\" ),\n\t\t\"ATTR\": new RegExp( \"^\" + attributes ),\n\t\t\"PSEUDO\": new RegExp( \"^\" + pseudos ),\n\t\t\"CHILD\": new RegExp( \"^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\\\(\" + whitespace +\n\t\t\t\"*(even|odd|(([+-]|)(\\\\d*)n|)\" + whitespace + \"*(?:([+-]|)\" + whitespace +\n\t\t\t\"*(\\\\d+)|))\" + whitespace + \"*\\\\)|)\", \"i\" ),\n\t\t\"bool\": new RegExp( \"^(?:\" + booleans + \")$\", \"i\" ),\n\t\t// For use in libraries implementing .is()\n\t\t// We use this for POS matching in `select`\n\t\t\"needsContext\": new RegExp( \"^\" + whitespace + \"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\\\(\" +\n\t\t\twhitespace + \"*((?:-\\\\d)?\\\\d*)\" + whitespace + \"*\\\\)|)(?=[^-]|$)\", \"i\" )\n\t},\n\n\trnative = /^[^{]+\\{\\s*\\[native \\w/,\n\n\t// Easily-parseable/retrievable ID or TAG or CLASS selectors\n\trquickExpr = /^(?:#([\\w-]+)|(\\w+)|\\.([\\w-]+))$/,\n\n\trinputs = /^(?:input|select|textarea|button)$/i,\n\trheader = /^h\\d$/i,\n\n\trescape = /'|\\\\/g,\n\n\t// CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters\n\trunescape = new RegExp( \"\\\\\\\\([\\\\da-f]{1,6}\" + whitespace + \"?|(\" + whitespace + \")|.)\", \"ig\" ),\n\tfunescape = function( _, escaped, escapedWhitespace ) {\n\t\tvar high = \"0x\" + escaped - 0x10000;\n\t\t// NaN means non-codepoint\n\t\t// Support: Firefox\n\t\t// Workaround erroneous numeric interpretation of +\"0x\"\n\t\treturn high !== high || escapedWhitespace ?\n\t\t\tescaped :\n\t\t\t// BMP codepoint\n\t\t\thigh < 0 ?\n\t\t\t\tString.fromCharCode( high + 0x10000 ) :\n\t\t\t\t// Supplemental Plane codepoint (surrogate pair)\n\t\t\t\tString.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );\n\t};\n\n// Optimize for push.apply( _, NodeList )\ntry {\n\tpush.apply(\n\t\t(arr = slice.call( preferredDoc.childNodes )),\n\t\tpreferredDoc.childNodes\n\t);\n\t// Support: Android<4.0\n\t// Detect silently failing push.apply\n\tarr[ preferredDoc.childNodes.length ].nodeType;\n} catch ( e ) {\n\tpush = { apply: arr.length ?\n\n\t\t// Leverage slice if possible\n\t\tfunction( target, els ) {\n\t\t\tpush_native.apply( target, slice.call(els) );\n\t\t} :\n\n\t\t// Support: IE<9\n\t\t// Otherwise append directly\n\t\tfunction( target, els ) {\n\t\t\tvar j = target.length,\n\t\t\t\ti = 0;\n\t\t\t// Can't trust NodeList.length\n\t\t\twhile ( (target[j++] = els[i++]) ) {}\n\t\t\ttarget.length = j - 1;\n\t\t}\n\t};\n}\n\nfunction Sizzle( selector, context, results, seed ) {\n\tvar match, elem, m, nodeType,\n\t\t// QSA vars\n\t\ti, groups, old, nid, newContext, newSelector;\n\n\tif ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) {\n\t\tsetDocument( context );\n\t}\n\n\tcontext = context || document;\n\tresults = results || [];\n\n\tif ( !selector || typeof selector !== \"string\" ) {\n\t\treturn results;\n\t}\n\n\tif ( (nodeType = context.nodeType) !== 1 && nodeType !== 9 ) {\n\t\treturn [];\n\t}\n\n\tif ( documentIsHTML && !seed ) {\n\n\t\t// Shortcuts\n\t\tif ( (match = rquickExpr.exec( selector )) ) {\n\t\t\t// Speed-up: Sizzle(\"#ID\")\n\t\t\tif ( (m = match[1]) ) {\n\t\t\t\tif ( nodeType === 9 ) {\n\t\t\t\t\telem = context.getElementById( m );\n\t\t\t\t\t// Check parentNode to catch when Blackberry 4.6 returns\n\t\t\t\t\t// nodes that are no longer in the document #6963\n\t\t\t\t\tif ( elem && elem.parentNode ) {\n\t\t\t\t\t\t// Handle the case where IE, Opera, and Webkit return items\n\t\t\t\t\t\t// by name instead of ID\n\t\t\t\t\t\tif ( elem.id === m ) {\n\t\t\t\t\t\t\tresults.push( elem );\n\t\t\t\t\t\t\treturn results;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn results;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// Context is not a document\n\t\t\t\t\tif ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) &&\n\t\t\t\t\t\tcontains( context, elem ) && elem.id === m ) {\n\t\t\t\t\t\tresults.push( elem );\n\t\t\t\t\t\treturn results;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t// Speed-up: Sizzle(\"TAG\")\n\t\t\t} else if ( match[2] ) {\n\t\t\t\tpush.apply( results, context.getElementsByTagName( selector ) );\n\t\t\t\treturn results;\n\n\t\t\t// Speed-up: Sizzle(\".CLASS\")\n\t\t\t} else if ( (m = match[3]) && support.getElementsByClassName && context.getElementsByClassName ) {\n\t\t\t\tpush.apply( results, context.getElementsByClassName( m ) );\n\t\t\t\treturn results;\n\t\t\t}\n\t\t}\n\n\t\t// QSA path\n\t\tif ( support.qsa && (!rbuggyQSA || !rbuggyQSA.test( selector )) ) {\n\t\t\tnid = old = expando;\n\t\t\tnewContext = context;\n\t\t\tnewSelector = nodeType === 9 && selector;\n\n\t\t\t// qSA works strangely on Element-rooted queries\n\t\t\t// We can work around this by specifying an extra ID on the root\n\t\t\t// and working up from there (Thanks to Andrew Dupont for the technique)\n\t\t\t// IE 8 doesn't work on object elements\n\t\t\tif ( nodeType === 1 && context.nodeName.toLowerCase() !== \"object\" ) {\n\t\t\t\tgroups = tokenize( selector );\n\n\t\t\t\tif ( (old = context.getAttribute(\"id\")) ) {\n\t\t\t\t\tnid = old.replace( rescape, \"\\\\$&\" );\n\t\t\t\t} else {\n\t\t\t\t\tcontext.setAttribute( \"id\", nid );\n\t\t\t\t}\n\t\t\t\tnid = \"[id='\" + nid + \"'] \";\n\n\t\t\t\ti = groups.length;\n\t\t\t\twhile ( i-- ) {\n\t\t\t\t\tgroups[i] = nid + toSelector( groups[i] );\n\t\t\t\t}\n\t\t\t\tnewContext = rsibling.test( selector ) && context.parentNode || context;\n\t\t\t\tnewSelector = groups.join(\",\");\n\t\t\t}\n\n\t\t\tif ( newSelector ) {\n\t\t\t\ttry {\n\t\t\t\t\tpush.apply( results,\n\t\t\t\t\t\tnewContext.querySelectorAll( newSelector )\n\t\t\t\t\t);\n\t\t\t\t\treturn results;\n\t\t\t\t} catch(qsaError) {\n\t\t\t\t} finally {\n\t\t\t\t\tif ( !old ) {\n\t\t\t\t\t\tcontext.removeAttribute(\"id\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// All others\n\treturn select( selector.replace( rtrim, \"$1\" ), context, results, seed );\n}\n\n/**\n * Create key-value caches of limited size\n * @returns {Function(string, Object)} Returns the Object data after storing it on itself with\n *\tproperty name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)\n *\tdeleting the oldest entry\n */\nfunction createCache() {\n\tvar keys = [];\n\n\tfunction cache( key, value ) {\n\t\t// Use (key + \" \") to avoid collision with native prototype properties (see Issue #157)\n\t\tif ( keys.push( key += \" \" ) > Expr.cacheLength ) {\n\t\t\t// Only keep the most recent entries\n\t\t\tdelete cache[ keys.shift() ];\n\t\t}\n\t\treturn (cache[ key ] = value);\n\t}\n\treturn cache;\n}\n\n/**\n * Mark a function for special use by Sizzle\n * @param {Function} fn The function to mark\n */\nfunction markFunction( fn ) {\n\tfn[ expando ] = true;\n\treturn fn;\n}\n\n/**\n * Support testing using an element\n * @param {Function} fn Passed the created div and expects a boolean result\n */\nfunction assert( fn ) {\n\tvar div = document.createElement(\"div\");\n\n\ttry {\n\t\treturn !!fn( div );\n\t} catch (e) {\n\t\treturn false;\n\t} finally {\n\t\t// Remove from its parent by default\n\t\tif ( div.parentNode ) {\n\t\t\tdiv.parentNode.removeChild( div );\n\t\t}\n\t\t// release memory in IE\n\t\tdiv = null;\n\t}\n}\n\n/**\n * Adds the same handler for all of the specified attrs\n * @param {String} attrs Pipe-separated list of attributes\n * @param {Function} handler The method that will be applied\n */\nfunction addHandle( attrs, handler ) {\n\tvar arr = attrs.split(\"|\"),\n\t\ti = attrs.length;\n\n\twhile ( i-- ) {\n\t\tExpr.attrHandle[ arr[i] ] = handler;\n\t}\n}\n\n/**\n * Checks document order of two siblings\n * @param {Element} a\n * @param {Element} b\n * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b\n */\nfunction siblingCheck( a, b ) {\n\tvar cur = b && a,\n\t\tdiff = cur && a.nodeType === 1 && b.nodeType === 1 &&\n\t\t\t( ~b.sourceIndex || MAX_NEGATIVE ) -\n\t\t\t( ~a.sourceIndex || MAX_NEGATIVE );\n\n\t// Use IE sourceIndex if available on both nodes\n\tif ( diff ) {\n\t\treturn diff;\n\t}\n\n\t// Check if b follows a\n\tif ( cur ) {\n\t\twhile ( (cur = cur.nextSibling) ) {\n\t\t\tif ( cur === b ) {\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn a ? 1 : -1;\n}\n\n/**\n * Returns a function to use in pseudos for input types\n * @param {String} type\n */\nfunction createInputPseudo( type ) {\n\treturn function( elem ) {\n\t\tvar name = elem.nodeName.toLowerCase();\n\t\treturn name === \"input\" && elem.type === type;\n\t};\n}\n\n/**\n * Returns a function to use in pseudos for buttons\n * @param {String} type\n */\nfunction createButtonPseudo( type ) {\n\treturn function( elem ) {\n\t\tvar name = elem.nodeName.toLowerCase();\n\t\treturn (name === \"input\" || name === \"button\") && elem.type === type;\n\t};\n}\n\n/**\n * Returns a function to use in pseudos for positionals\n * @param {Function} fn\n */\nfunction createPositionalPseudo( fn ) {\n\treturn markFunction(function( argument ) {\n\t\targument = +argument;\n\t\treturn markFunction(function( seed, matches ) {\n\t\t\tvar j,\n\t\t\t\tmatchIndexes = fn( [], seed.length, argument ),\n\t\t\t\ti = matchIndexes.length;\n\n\t\t\t// Match elements found at the specified indexes\n\t\t\twhile ( i-- ) {\n\t\t\t\tif ( seed[ (j = matchIndexes[i]) ] ) {\n\t\t\t\t\tseed[j] = !(matches[j] = seed[j]);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t});\n}\n\n/**\n * Detect xml\n * @param {Element|Object} elem An element or a document\n */\nisXML = Sizzle.isXML = function( elem ) {\n\t// documentElement is verified for cases where it doesn't yet exist\n\t// (such as loading iframes in IE - #4833)\n\tvar documentElement = elem && (elem.ownerDocument || elem).documentElement;\n\treturn documentElement ? documentElement.nodeName !== \"HTML\" : false;\n};\n\n// Expose support vars for convenience\nsupport = Sizzle.support = {};\n\n/**\n * Sets document-related variables once based on the current document\n * @param {Element|Object} [doc] An element or document object to use to set the document\n * @returns {Object} Returns the current document\n */\nsetDocument = Sizzle.setDocument = function( node ) {\n\tvar doc = node ? node.ownerDocument || node : preferredDoc,\n\t\tparent = doc.defaultView;\n\n\t// If no document and documentElement is available, return\n\tif ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) {\n\t\treturn document;\n\t}\n\n\t// Set our document\n\tdocument = doc;\n\tdocElem = doc.documentElement;\n\n\t// Support tests\n\tdocumentIsHTML = !isXML( doc );\n\n\t// Support: IE>8\n\t// If iframe document is assigned to \"document\" variable and if iframe has been reloaded,\n\t// IE will throw \"permission denied\" error when accessing \"document\" variable, see jQuery #13936\n\t// IE6-8 do not support the defaultView property so parent will be undefined\n\tif ( parent && parent.attachEvent && parent !== parent.top ) {\n\t\tparent.attachEvent( \"onbeforeunload\", function() {\n\t\t\tsetDocument();\n\t\t});\n\t}\n\n\t/* Attributes\n\t---------------------------------------------------------------------- */\n\n\t// Support: IE<8\n\t// Verify that getAttribute really returns attributes and not properties (excepting IE8 booleans)\n\tsupport.attributes = assert(function( div ) {\n\t\tdiv.className = \"i\";\n\t\treturn !div.getAttribute(\"className\");\n\t});\n\n\t/* getElement(s)By*\n\t---------------------------------------------------------------------- */\n\n\t// Check if getElementsByTagName(\"*\") returns only elements\n\tsupport.getElementsByTagName = assert(function( div ) {\n\t\tdiv.appendChild( doc.createComment(\"\") );\n\t\treturn !div.getElementsByTagName(\"*\").length;\n\t});\n\n\t// Check if getElementsByClassName can be trusted\n\tsupport.getElementsByClassName = assert(function( div ) {\n\t\tdiv.innerHTML = \"<div class='a'></div><div class='a i'></div>\";\n\n\t\t// Support: Safari<4\n\t\t// Catch class over-caching\n\t\tdiv.firstChild.className = \"i\";\n\t\t// Support: Opera<10\n\t\t// Catch gEBCN failure to find non-leading classes\n\t\treturn div.getElementsByClassName(\"i\").length === 2;\n\t});\n\n\t// Support: IE<10\n\t// Check if getElementById returns elements by name\n\t// The broken getElementById methods don't pick up programatically-set names,\n\t// so use a roundabout getElementsByName test\n\tsupport.getById = assert(function( div ) {\n\t\tdocElem.appendChild( div ).id = expando;\n\t\treturn !doc.getElementsByName || !doc.getElementsByName( expando ).length;\n\t});\n\n\t// ID find and filter\n\tif ( support.getById ) {\n\t\tExpr.find[\"ID\"] = function( id, context ) {\n\t\t\tif ( typeof context.getElementById !== strundefined && documentIsHTML ) {\n\t\t\t\tvar m = context.getElementById( id );\n\t\t\t\t// Check parentNode to catch when Blackberry 4.6 returns\n\t\t\t\t// nodes that are no longer in the document #6963\n\t\t\t\treturn m && m.parentNode ? [m] : [];\n\t\t\t}\n\t\t};\n\t\tExpr.filter[\"ID\"] = function( id ) {\n\t\t\tvar attrId = id.replace( runescape, funescape );\n\t\t\treturn function( elem ) {\n\t\t\t\treturn elem.getAttribute(\"id\") === attrId;\n\t\t\t};\n\t\t};\n\t} else {\n\t\t// Support: IE6/7\n\t\t// getElementById is not reliable as a find shortcut\n\t\tdelete Expr.find[\"ID\"];\n\n\t\tExpr.filter[\"ID\"] =  function( id ) {\n\t\t\tvar attrId = id.replace( runescape, funescape );\n\t\t\treturn function( elem ) {\n\t\t\t\tvar node = typeof elem.getAttributeNode !== strundefined && elem.getAttributeNode(\"id\");\n\t\t\t\treturn node && node.value === attrId;\n\t\t\t};\n\t\t};\n\t}\n\n\t// Tag\n\tExpr.find[\"TAG\"] = support.getElementsByTagName ?\n\t\tfunction( tag, context ) {\n\t\t\tif ( typeof context.getElementsByTagName !== strundefined ) {\n\t\t\t\treturn context.getElementsByTagName( tag );\n\t\t\t}\n\t\t} :\n\t\tfunction( tag, context ) {\n\t\t\tvar elem,\n\t\t\t\ttmp = [],\n\t\t\t\ti = 0,\n\t\t\t\tresults = context.getElementsByTagName( tag );\n\n\t\t\t// Filter out possible comments\n\t\t\tif ( tag === \"*\" ) {\n\t\t\t\twhile ( (elem = results[i++]) ) {\n\t\t\t\t\tif ( elem.nodeType === 1 ) {\n\t\t\t\t\t\ttmp.push( elem );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn tmp;\n\t\t\t}\n\t\t\treturn results;\n\t\t};\n\n\t// Class\n\tExpr.find[\"CLASS\"] = support.getElementsByClassName && function( className, context ) {\n\t\tif ( typeof context.getElementsByClassName !== strundefined && documentIsHTML ) {\n\t\t\treturn context.getElementsByClassName( className );\n\t\t}\n\t};\n\n\t/* QSA/matchesSelector\n\t---------------------------------------------------------------------- */\n\n\t// QSA and matchesSelector support\n\n\t// matchesSelector(:active) reports false when true (IE9/Opera 11.5)\n\trbuggyMatches = [];\n\n\t// qSa(:focus) reports false when true (Chrome 21)\n\t// We allow this because of a bug in IE8/9 that throws an error\n\t// whenever `document.activeElement` is accessed on an iframe\n\t// So, we allow :focus to pass through QSA all the time to avoid the IE error\n\t// See http://bugs.jquery.com/ticket/13378\n\trbuggyQSA = [];\n\n\tif ( (support.qsa = rnative.test( doc.querySelectorAll )) ) {\n\t\t// Build QSA regex\n\t\t// Regex strategy adopted from Diego Perini\n\t\tassert(function( div ) {\n\t\t\t// Select is set to empty string on purpose\n\t\t\t// This is to test IE's treatment of not explicitly\n\t\t\t// setting a boolean content attribute,\n\t\t\t// since its presence should be enough\n\t\t\t// http://bugs.jquery.com/ticket/12359\n\t\t\tdiv.innerHTML = \"<select><option selected=''></option></select>\";\n\n\t\t\t// Support: IE8\n\t\t\t// Boolean attributes and \"value\" are not treated correctly\n\t\t\tif ( !div.querySelectorAll(\"[selected]\").length ) {\n\t\t\t\trbuggyQSA.push( \"\\\\[\" + whitespace + \"*(?:value|\" + booleans + \")\" );\n\t\t\t}\n\n\t\t\t// Webkit/Opera - :checked should return selected option elements\n\t\t\t// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked\n\t\t\t// IE8 throws error here and will not see later tests\n\t\t\tif ( !div.querySelectorAll(\":checked\").length ) {\n\t\t\t\trbuggyQSA.push(\":checked\");\n\t\t\t}\n\t\t});\n\n\t\tassert(function( div ) {\n\n\t\t\t// Support: Opera 10-12/IE8\n\t\t\t// ^= $= *= and empty values\n\t\t\t// Should not select anything\n\t\t\t// Support: Windows 8 Native Apps\n\t\t\t// The type attribute is restricted during .innerHTML assignment\n\t\t\tvar input = doc.createElement(\"input\");\n\t\t\tinput.setAttribute( \"type\", \"hidden\" );\n\t\t\tdiv.appendChild( input ).setAttribute( \"t\", \"\" );\n\n\t\t\tif ( div.querySelectorAll(\"[t^='']\").length ) {\n\t\t\t\trbuggyQSA.push( \"[*^$]=\" + whitespace + \"*(?:''|\\\"\\\")\" );\n\t\t\t}\n\n\t\t\t// FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)\n\t\t\t// IE8 throws error here and will not see later tests\n\t\t\tif ( !div.querySelectorAll(\":enabled\").length ) {\n\t\t\t\trbuggyQSA.push( \":enabled\", \":disabled\" );\n\t\t\t}\n\n\t\t\t// Opera 10-11 does not throw on post-comma invalid pseudos\n\t\t\tdiv.querySelectorAll(\"*,:x\");\n\t\t\trbuggyQSA.push(\",.*:\");\n\t\t});\n\t}\n\n\tif ( (support.matchesSelector = rnative.test( (matches = docElem.webkitMatchesSelector ||\n\t\tdocElem.mozMatchesSelector ||\n\t\tdocElem.oMatchesSelector ||\n\t\tdocElem.msMatchesSelector) )) ) {\n\n\t\tassert(function( div ) {\n\t\t\t// Check to see if it's possible to do matchesSelector\n\t\t\t// on a disconnected node (IE 9)\n\t\t\tsupport.disconnectedMatch = matches.call( div, \"div\" );\n\n\t\t\t// This should fail with an exception\n\t\t\t// Gecko does not error, returns false instead\n\t\t\tmatches.call( div, \"[s!='']:x\" );\n\t\t\trbuggyMatches.push( \"!=\", pseudos );\n\t\t});\n\t}\n\n\trbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join(\"|\") );\n\trbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join(\"|\") );\n\n\t/* Contains\n\t---------------------------------------------------------------------- */\n\n\t// Element contains another\n\t// Purposefully does not implement inclusive descendent\n\t// As in, an element does not contain itself\n\tcontains = rnative.test( docElem.contains ) || docElem.compareDocumentPosition ?\n\t\tfunction( a, b ) {\n\t\t\tvar adown = a.nodeType === 9 ? a.documentElement : a,\n\t\t\t\tbup = b && b.parentNode;\n\t\t\treturn a === bup || !!( bup && bup.nodeType === 1 && (\n\t\t\t\tadown.contains ?\n\t\t\t\t\tadown.contains( bup ) :\n\t\t\t\t\ta.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16\n\t\t\t));\n\t\t} :\n\t\tfunction( a, b ) {\n\t\t\tif ( b ) {\n\t\t\t\twhile ( (b = b.parentNode) ) {\n\t\t\t\t\tif ( b === a ) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t};\n\n\t/* Sorting\n\t---------------------------------------------------------------------- */\n\n\t// Document order sorting\n\tsortOrder = docElem.compareDocumentPosition ?\n\tfunction( a, b ) {\n\n\t\t// Flag for duplicate removal\n\t\tif ( a === b ) {\n\t\t\thasDuplicate = true;\n\t\t\treturn 0;\n\t\t}\n\n\t\tvar compare = b.compareDocumentPosition && a.compareDocumentPosition && a.compareDocumentPosition( b );\n\n\t\tif ( compare ) {\n\t\t\t// Disconnected nodes\n\t\t\tif ( compare & 1 ||\n\t\t\t\t(!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) {\n\n\t\t\t\t// Choose the first element that is related to our preferred document\n\t\t\t\tif ( a === doc || contains(preferredDoc, a) ) {\n\t\t\t\t\treturn -1;\n\t\t\t\t}\n\t\t\t\tif ( b === doc || contains(preferredDoc, b) ) {\n\t\t\t\t\treturn 1;\n\t\t\t\t}\n\n\t\t\t\t// Maintain original order\n\t\t\t\treturn sortInput ?\n\t\t\t\t\t( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) :\n\t\t\t\t\t0;\n\t\t\t}\n\n\t\t\treturn compare & 4 ? -1 : 1;\n\t\t}\n\n\t\t// Not directly comparable, sort on existence of method\n\t\treturn a.compareDocumentPosition ? -1 : 1;\n\t} :\n\tfunction( a, b ) {\n\t\tvar cur,\n\t\t\ti = 0,\n\t\t\taup = a.parentNode,\n\t\t\tbup = b.parentNode,\n\t\t\tap = [ a ],\n\t\t\tbp = [ b ];\n\n\t\t// Exit early if the nodes are identical\n\t\tif ( a === b ) {\n\t\t\thasDuplicate = true;\n\t\t\treturn 0;\n\n\t\t// Parentless nodes are either documents or disconnected\n\t\t} else if ( !aup || !bup ) {\n\t\t\treturn a === doc ? -1 :\n\t\t\t\tb === doc ? 1 :\n\t\t\t\taup ? -1 :\n\t\t\t\tbup ? 1 :\n\t\t\t\tsortInput ?\n\t\t\t\t( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) :\n\t\t\t\t0;\n\n\t\t// If the nodes are siblings, we can do a quick check\n\t\t} else if ( aup === bup ) {\n\t\t\treturn siblingCheck( a, b );\n\t\t}\n\n\t\t// Otherwise we need full lists of their ancestors for comparison\n\t\tcur = a;\n\t\twhile ( (cur = cur.parentNode) ) {\n\t\t\tap.unshift( cur );\n\t\t}\n\t\tcur = b;\n\t\twhile ( (cur = cur.parentNode) ) {\n\t\t\tbp.unshift( cur );\n\t\t}\n\n\t\t// Walk down the tree looking for a discrepancy\n\t\twhile ( ap[i] === bp[i] ) {\n\t\t\ti++;\n\t\t}\n\n\t\treturn i ?\n\t\t\t// Do a sibling check if the nodes have a common ancestor\n\t\t\tsiblingCheck( ap[i], bp[i] ) :\n\n\t\t\t// Otherwise nodes in our document sort first\n\t\t\tap[i] === preferredDoc ? -1 :\n\t\t\tbp[i] === preferredDoc ? 1 :\n\t\t\t0;\n\t};\n\n\treturn doc;\n};\n\nSizzle.matches = function( expr, elements ) {\n\treturn Sizzle( expr, null, null, elements );\n};\n\nSizzle.matchesSelector = function( elem, expr ) {\n\t// Set document vars if needed\n\tif ( ( elem.ownerDocument || elem ) !== document ) {\n\t\tsetDocument( elem );\n\t}\n\n\t// Make sure that attribute selectors are quoted\n\texpr = expr.replace( rattributeQuotes, \"='$1']\" );\n\n\tif ( support.matchesSelector && documentIsHTML &&\n\t\t( !rbuggyMatches || !rbuggyMatches.test( expr ) ) &&\n\t\t( !rbuggyQSA     || !rbuggyQSA.test( expr ) ) ) {\n\n\t\ttry {\n\t\t\tvar ret = matches.call( elem, expr );\n\n\t\t\t// IE 9's matchesSelector returns false on disconnected nodes\n\t\t\tif ( ret || support.disconnectedMatch ||\n\t\t\t\t\t// As well, disconnected nodes are said to be in a document\n\t\t\t\t\t// fragment in IE 9\n\t\t\t\t\telem.document && elem.document.nodeType !== 11 ) {\n\t\t\t\treturn ret;\n\t\t\t}\n\t\t} catch(e) {}\n\t}\n\n\treturn Sizzle( expr, document, null, [elem] ).length > 0;\n};\n\nSizzle.contains = function( context, elem ) {\n\t// Set document vars if needed\n\tif ( ( context.ownerDocument || context ) !== document ) {\n\t\tsetDocument( context );\n\t}\n\treturn contains( context, elem );\n};\n\nSizzle.attr = function( elem, name ) {\n\t// Set document vars if needed\n\tif ( ( elem.ownerDocument || elem ) !== document ) {\n\t\tsetDocument( elem );\n\t}\n\n\tvar fn = Expr.attrHandle[ name.toLowerCase() ],\n\t\t// Don't get fooled by Object.prototype properties (jQuery #13807)\n\t\tval = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?\n\t\t\tfn( elem, name, !documentIsHTML ) :\n\t\t\tundefined;\n\n\treturn val === undefined ?\n\t\tsupport.attributes || !documentIsHTML ?\n\t\t\telem.getAttribute( name ) :\n\t\t\t(val = elem.getAttributeNode(name)) && val.specified ?\n\t\t\t\tval.value :\n\t\t\t\tnull :\n\t\tval;\n};\n\nSizzle.error = function( msg ) {\n\tthrow new Error( \"Syntax error, unrecognized expression: \" + msg );\n};\n\n/**\n * Document sorting and removing duplicates\n * @param {ArrayLike} results\n */\nSizzle.uniqueSort = function( results ) {\n\tvar elem,\n\t\tduplicates = [],\n\t\tj = 0,\n\t\ti = 0;\n\n\t// Unless we *know* we can detect duplicates, assume their presence\n\thasDuplicate = !support.detectDuplicates;\n\tsortInput = !support.sortStable && results.slice( 0 );\n\tresults.sort( sortOrder );\n\n\tif ( hasDuplicate ) {\n\t\twhile ( (elem = results[i++]) ) {\n\t\t\tif ( elem === results[ i ] ) {\n\t\t\t\tj = duplicates.push( i );\n\t\t\t}\n\t\t}\n\t\twhile ( j-- ) {\n\t\t\tresults.splice( duplicates[ j ], 1 );\n\t\t}\n\t}\n\n\treturn results;\n};\n\n/**\n * Utility function for retrieving the text value of an array of DOM nodes\n * @param {Array|Element} elem\n */\ngetText = Sizzle.getText = function( elem ) {\n\tvar node,\n\t\tret = \"\",\n\t\ti = 0,\n\t\tnodeType = elem.nodeType;\n\n\tif ( !nodeType ) {\n\t\t// If no nodeType, this is expected to be an array\n\t\tfor ( ; (node = elem[i]); i++ ) {\n\t\t\t// Do not traverse comment nodes\n\t\t\tret += getText( node );\n\t\t}\n\t} else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {\n\t\t// Use textContent for elements\n\t\t// innerText usage removed for consistency of new lines (see #11153)\n\t\tif ( typeof elem.textContent === \"string\" ) {\n\t\t\treturn elem.textContent;\n\t\t} else {\n\t\t\t// Traverse its children\n\t\t\tfor ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {\n\t\t\t\tret += getText( elem );\n\t\t\t}\n\t\t}\n\t} else if ( nodeType === 3 || nodeType === 4 ) {\n\t\treturn elem.nodeValue;\n\t}\n\t// Do not include comment or processing instruction nodes\n\n\treturn ret;\n};\n\nExpr = Sizzle.selectors = {\n\n\t// Can be adjusted by the user\n\tcacheLength: 50,\n\n\tcreatePseudo: markFunction,\n\n\tmatch: matchExpr,\n\n\tattrHandle: {},\n\n\tfind: {},\n\n\trelative: {\n\t\t\">\": { dir: \"parentNode\", first: true },\n\t\t\" \": { dir: \"parentNode\" },\n\t\t\"+\": { dir: \"previousSibling\", first: true },\n\t\t\"~\": { dir: \"previousSibling\" }\n\t},\n\n\tpreFilter: {\n\t\t\"ATTR\": function( match ) {\n\t\t\tmatch[1] = match[1].replace( runescape, funescape );\n\n\t\t\t// Move the given value to match[3] whether quoted or unquoted\n\t\t\tmatch[3] = ( match[4] || match[5] || \"\" ).replace( runescape, funescape );\n\n\t\t\tif ( match[2] === \"~=\" ) {\n\t\t\t\tmatch[3] = \" \" + match[3] + \" \";\n\t\t\t}\n\n\t\t\treturn match.slice( 0, 4 );\n\t\t},\n\n\t\t\"CHILD\": function( match ) {\n\t\t\t/* matches from matchExpr[\"CHILD\"]\n\t\t\t\t1 type (only|nth|...)\n\t\t\t\t2 what (child|of-type)\n\t\t\t\t3 argument (even|odd|\\d*|\\d*n([+-]\\d+)?|...)\n\t\t\t\t4 xn-component of xn+y argument ([+-]?\\d*n|)\n\t\t\t\t5 sign of xn-component\n\t\t\t\t6 x of xn-component\n\t\t\t\t7 sign of y-component\n\t\t\t\t8 y of y-component\n\t\t\t*/\n\t\t\tmatch[1] = match[1].toLowerCase();\n\n\t\t\tif ( match[1].slice( 0, 3 ) === \"nth\" ) {\n\t\t\t\t// nth-* requires argument\n\t\t\t\tif ( !match[3] ) {\n\t\t\t\t\tSizzle.error( match[0] );\n\t\t\t\t}\n\n\t\t\t\t// numeric x and y parameters for Expr.filter.CHILD\n\t\t\t\t// remember that false/true cast respectively to 0/1\n\t\t\t\tmatch[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === \"even\" || match[3] === \"odd\" ) );\n\t\t\t\tmatch[5] = +( ( match[7] + match[8] ) || match[3] === \"odd\" );\n\n\t\t\t// other types prohibit arguments\n\t\t\t} else if ( match[3] ) {\n\t\t\t\tSizzle.error( match[0] );\n\t\t\t}\n\n\t\t\treturn match;\n\t\t},\n\n\t\t\"PSEUDO\": function( match ) {\n\t\t\tvar excess,\n\t\t\t\tunquoted = !match[5] && match[2];\n\n\t\t\tif ( matchExpr[\"CHILD\"].test( match[0] ) ) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\t// Accept quoted arguments as-is\n\t\t\tif ( match[3] && match[4] !== undefined ) {\n\t\t\t\tmatch[2] = match[4];\n\n\t\t\t// Strip excess characters from unquoted arguments\n\t\t\t} else if ( unquoted && rpseudo.test( unquoted ) &&\n\t\t\t\t// Get excess from tokenize (recursively)\n\t\t\t\t(excess = tokenize( unquoted, true )) &&\n\t\t\t\t// advance to the next closing parenthesis\n\t\t\t\t(excess = unquoted.indexOf( \")\", unquoted.length - excess ) - unquoted.length) ) {\n\n\t\t\t\t// excess is a negative index\n\t\t\t\tmatch[0] = match[0].slice( 0, excess );\n\t\t\t\tmatch[2] = unquoted.slice( 0, excess );\n\t\t\t}\n\n\t\t\t// Return only captures needed by the pseudo filter method (type and argument)\n\t\t\treturn match.slice( 0, 3 );\n\t\t}\n\t},\n\n\tfilter: {\n\n\t\t\"TAG\": function( nodeNameSelector ) {\n\t\t\tvar nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase();\n\t\t\treturn nodeNameSelector === \"*\" ?\n\t\t\t\tfunction() { return true; } :\n\t\t\t\tfunction( elem ) {\n\t\t\t\t\treturn elem.nodeName && elem.nodeName.toLowerCase() === nodeName;\n\t\t\t\t};\n\t\t},\n\n\t\t\"CLASS\": function( className ) {\n\t\t\tvar pattern = classCache[ className + \" \" ];\n\n\t\t\treturn pattern ||\n\t\t\t\t(pattern = new RegExp( \"(^|\" + whitespace + \")\" + className + \"(\" + whitespace + \"|$)\" )) &&\n\t\t\t\tclassCache( className, function( elem ) {\n\t\t\t\t\treturn pattern.test( typeof elem.className === \"string\" && elem.className || typeof elem.getAttribute !== strundefined && elem.getAttribute(\"class\") || \"\" );\n\t\t\t\t});\n\t\t},\n\n\t\t\"ATTR\": function( name, operator, check ) {\n\t\t\treturn function( elem ) {\n\t\t\t\tvar result = Sizzle.attr( elem, name );\n\n\t\t\t\tif ( result == null ) {\n\t\t\t\t\treturn operator === \"!=\";\n\t\t\t\t}\n\t\t\t\tif ( !operator ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\tresult += \"\";\n\n\t\t\t\treturn operator === \"=\" ? result === check :\n\t\t\t\t\toperator === \"!=\" ? result !== check :\n\t\t\t\t\toperator === \"^=\" ? check && result.indexOf( check ) === 0 :\n\t\t\t\t\toperator === \"*=\" ? check && result.indexOf( check ) > -1 :\n\t\t\t\t\toperator === \"$=\" ? check && result.slice( -check.length ) === check :\n\t\t\t\t\toperator === \"~=\" ? ( \" \" + result + \" \" ).indexOf( check ) > -1 :\n\t\t\t\t\toperator === \"|=\" ? result === check || result.slice( 0, check.length + 1 ) === check + \"-\" :\n\t\t\t\t\tfalse;\n\t\t\t};\n\t\t},\n\n\t\t\"CHILD\": function( type, what, argument, first, last ) {\n\t\t\tvar simple = type.slice( 0, 3 ) !== \"nth\",\n\t\t\t\tforward = type.slice( -4 ) !== \"last\",\n\t\t\t\tofType = what === \"of-type\";\n\n\t\t\treturn first === 1 && last === 0 ?\n\n\t\t\t\t// Shortcut for :nth-*(n)\n\t\t\t\tfunction( elem ) {\n\t\t\t\t\treturn !!elem.parentNode;\n\t\t\t\t} :\n\n\t\t\t\tfunction( elem, context, xml ) {\n\t\t\t\t\tvar cache, outerCache, node, diff, nodeIndex, start,\n\t\t\t\t\t\tdir = simple !== forward ? \"nextSibling\" : \"previousSibling\",\n\t\t\t\t\t\tparent = elem.parentNode,\n\t\t\t\t\t\tname = ofType && elem.nodeName.toLowerCase(),\n\t\t\t\t\t\tuseCache = !xml && !ofType;\n\n\t\t\t\t\tif ( parent ) {\n\n\t\t\t\t\t\t// :(first|last|only)-(child|of-type)\n\t\t\t\t\t\tif ( simple ) {\n\t\t\t\t\t\t\twhile ( dir ) {\n\t\t\t\t\t\t\t\tnode = elem;\n\t\t\t\t\t\t\t\twhile ( (node = node[ dir ]) ) {\n\t\t\t\t\t\t\t\t\tif ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) {\n\t\t\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// Reverse direction for :only-* (if we haven't yet done so)\n\t\t\t\t\t\t\t\tstart = dir = type === \"only\" && !start && \"nextSibling\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tstart = [ forward ? parent.firstChild : parent.lastChild ];\n\n\t\t\t\t\t\t// non-xml :nth-child(...) stores cache data on `parent`\n\t\t\t\t\t\tif ( forward && useCache ) {\n\t\t\t\t\t\t\t// Seek `elem` from a previously-cached index\n\t\t\t\t\t\t\touterCache = parent[ expando ] || (parent[ expando ] = {});\n\t\t\t\t\t\t\tcache = outerCache[ type ] || [];\n\t\t\t\t\t\t\tnodeIndex = cache[0] === dirruns && cache[1];\n\t\t\t\t\t\t\tdiff = cache[0] === dirruns && cache[2];\n\t\t\t\t\t\t\tnode = nodeIndex && parent.childNodes[ nodeIndex ];\n\n\t\t\t\t\t\t\twhile ( (node = ++nodeIndex && node && node[ dir ] ||\n\n\t\t\t\t\t\t\t\t// Fallback to seeking `elem` from the start\n\t\t\t\t\t\t\t\t(diff = nodeIndex = 0) || start.pop()) ) {\n\n\t\t\t\t\t\t\t\t// When found, cache indexes on `parent` and break\n\t\t\t\t\t\t\t\tif ( node.nodeType === 1 && ++diff && node === elem ) {\n\t\t\t\t\t\t\t\t\touterCache[ type ] = [ dirruns, nodeIndex, diff ];\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Use previously-cached element index if available\n\t\t\t\t\t\t} else if ( useCache && (cache = (elem[ expando ] || (elem[ expando ] = {}))[ type ]) && cache[0] === dirruns ) {\n\t\t\t\t\t\t\tdiff = cache[1];\n\n\t\t\t\t\t\t// xml :nth-child(...) or :nth-last-child(...) or :nth(-last)?-of-type(...)\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// Use the same loop as above to seek `elem` from the start\n\t\t\t\t\t\t\twhile ( (node = ++nodeIndex && node && node[ dir ] ||\n\t\t\t\t\t\t\t\t(diff = nodeIndex = 0) || start.pop()) ) {\n\n\t\t\t\t\t\t\t\tif ( ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) && ++diff ) {\n\t\t\t\t\t\t\t\t\t// Cache the index of each encountered element\n\t\t\t\t\t\t\t\t\tif ( useCache ) {\n\t\t\t\t\t\t\t\t\t\t(node[ expando ] || (node[ expando ] = {}))[ type ] = [ dirruns, diff ];\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\tif ( node === elem ) {\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Incorporate the offset, then check against cycle size\n\t\t\t\t\t\tdiff -= last;\n\t\t\t\t\t\treturn diff === first || ( diff % first === 0 && diff / first >= 0 );\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t},\n\n\t\t\"PSEUDO\": function( pseudo, argument ) {\n\t\t\t// pseudo-class names are case-insensitive\n\t\t\t// http://www.w3.org/TR/selectors/#pseudo-classes\n\t\t\t// Prioritize by case sensitivity in case custom pseudos are added with uppercase letters\n\t\t\t// Remember that setFilters inherits from pseudos\n\t\t\tvar args,\n\t\t\t\tfn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||\n\t\t\t\t\tSizzle.error( \"unsupported pseudo: \" + pseudo );\n\n\t\t\t// The user may use createPseudo to indicate that\n\t\t\t// arguments are needed to create the filter function\n\t\t\t// just as Sizzle does\n\t\t\tif ( fn[ expando ] ) {\n\t\t\t\treturn fn( argument );\n\t\t\t}\n\n\t\t\t// But maintain support for old signatures\n\t\t\tif ( fn.length > 1 ) {\n\t\t\t\targs = [ pseudo, pseudo, \"\", argument ];\n\t\t\t\treturn Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?\n\t\t\t\t\tmarkFunction(function( seed, matches ) {\n\t\t\t\t\t\tvar idx,\n\t\t\t\t\t\t\tmatched = fn( seed, argument ),\n\t\t\t\t\t\t\ti = matched.length;\n\t\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\t\tidx = indexOf.call( seed, matched[i] );\n\t\t\t\t\t\t\tseed[ idx ] = !( matches[ idx ] = matched[i] );\n\t\t\t\t\t\t}\n\t\t\t\t\t}) :\n\t\t\t\t\tfunction( elem ) {\n\t\t\t\t\t\treturn fn( elem, 0, args );\n\t\t\t\t\t};\n\t\t\t}\n\n\t\t\treturn fn;\n\t\t}\n\t},\n\n\tpseudos: {\n\t\t// Potentially complex pseudos\n\t\t\"not\": markFunction(function( selector ) {\n\t\t\t// Trim the selector passed to compile\n\t\t\t// to avoid treating leading and trailing\n\t\t\t// spaces as combinators\n\t\t\tvar input = [],\n\t\t\t\tresults = [],\n\t\t\t\tmatcher = compile( selector.replace( rtrim, \"$1\" ) );\n\n\t\t\treturn matcher[ expando ] ?\n\t\t\t\tmarkFunction(function( seed, matches, context, xml ) {\n\t\t\t\t\tvar elem,\n\t\t\t\t\t\tunmatched = matcher( seed, null, xml, [] ),\n\t\t\t\t\t\ti = seed.length;\n\n\t\t\t\t\t// Match elements unmatched by `matcher`\n\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\tif ( (elem = unmatched[i]) ) {\n\t\t\t\t\t\t\tseed[i] = !(matches[i] = elem);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}) :\n\t\t\t\tfunction( elem, context, xml ) {\n\t\t\t\t\tinput[0] = elem;\n\t\t\t\t\tmatcher( input, null, xml, results );\n\t\t\t\t\treturn !results.pop();\n\t\t\t\t};\n\t\t}),\n\n\t\t\"has\": markFunction(function( selector ) {\n\t\t\treturn function( elem ) {\n\t\t\t\treturn Sizzle( selector, elem ).length > 0;\n\t\t\t};\n\t\t}),\n\n\t\t\"contains\": markFunction(function( text ) {\n\t\t\treturn function( elem ) {\n\t\t\t\treturn ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1;\n\t\t\t};\n\t\t}),\n\n\t\t// \"Whether an element is represented by a :lang() selector\n\t\t// is based solely on the element's language value\n\t\t// being equal to the identifier C,\n\t\t// or beginning with the identifier C immediately followed by \"-\".\n\t\t// The matching of C against the element's language value is performed case-insensitively.\n\t\t// The identifier C does not have to be a valid language name.\"\n\t\t// http://www.w3.org/TR/selectors/#lang-pseudo\n\t\t\"lang\": markFunction( function( lang ) {\n\t\t\t// lang value must be a valid identifier\n\t\t\tif ( !ridentifier.test(lang || \"\") ) {\n\t\t\t\tSizzle.error( \"unsupported lang: \" + lang );\n\t\t\t}\n\t\t\tlang = lang.replace( runescape, funescape ).toLowerCase();\n\t\t\treturn function( elem ) {\n\t\t\t\tvar elemLang;\n\t\t\t\tdo {\n\t\t\t\t\tif ( (elemLang = documentIsHTML ?\n\t\t\t\t\t\telem.lang :\n\t\t\t\t\t\telem.getAttribute(\"xml:lang\") || elem.getAttribute(\"lang\")) ) {\n\n\t\t\t\t\t\telemLang = elemLang.toLowerCase();\n\t\t\t\t\t\treturn elemLang === lang || elemLang.indexOf( lang + \"-\" ) === 0;\n\t\t\t\t\t}\n\t\t\t\t} while ( (elem = elem.parentNode) && elem.nodeType === 1 );\n\t\t\t\treturn false;\n\t\t\t};\n\t\t}),\n\n\t\t// Miscellaneous\n\t\t\"target\": function( elem ) {\n\t\t\tvar hash = window.location && window.location.hash;\n\t\t\treturn hash && hash.slice( 1 ) === elem.id;\n\t\t},\n\n\t\t\"root\": function( elem ) {\n\t\t\treturn elem === docElem;\n\t\t},\n\n\t\t\"focus\": function( elem ) {\n\t\t\treturn elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex);\n\t\t},\n\n\t\t// Boolean properties\n\t\t\"enabled\": function( elem ) {\n\t\t\treturn elem.disabled === false;\n\t\t},\n\n\t\t\"disabled\": function( elem ) {\n\t\t\treturn elem.disabled === true;\n\t\t},\n\n\t\t\"checked\": function( elem ) {\n\t\t\t// In CSS3, :checked should return both checked and selected elements\n\t\t\t// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked\n\t\t\tvar nodeName = elem.nodeName.toLowerCase();\n\t\t\treturn (nodeName === \"input\" && !!elem.checked) || (nodeName === \"option\" && !!elem.selected);\n\t\t},\n\n\t\t\"selected\": function( elem ) {\n\t\t\t// Accessing this property makes selected-by-default\n\t\t\t// options in Safari work properly\n\t\t\tif ( elem.parentNode ) {\n\t\t\t\telem.parentNode.selectedIndex;\n\t\t\t}\n\n\t\t\treturn elem.selected === true;\n\t\t},\n\n\t\t// Contents\n\t\t\"empty\": function( elem ) {\n\t\t\t// http://www.w3.org/TR/selectors/#empty-pseudo\n\t\t\t// :empty is only affected by element nodes and content nodes(including text(3), cdata(4)),\n\t\t\t//   not comment, processing instructions, or others\n\t\t\t// Thanks to Diego Perini for the nodeName shortcut\n\t\t\t//   Greater than \"@\" means alpha characters (specifically not starting with \"#\" or \"?\")\n\t\t\tfor ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {\n\t\t\t\tif ( elem.nodeName > \"@\" || elem.nodeType === 3 || elem.nodeType === 4 ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t},\n\n\t\t\"parent\": function( elem ) {\n\t\t\treturn !Expr.pseudos[\"empty\"]( elem );\n\t\t},\n\n\t\t// Element/input types\n\t\t\"header\": function( elem ) {\n\t\t\treturn rheader.test( elem.nodeName );\n\t\t},\n\n\t\t\"input\": function( elem ) {\n\t\t\treturn rinputs.test( elem.nodeName );\n\t\t},\n\n\t\t\"button\": function( elem ) {\n\t\t\tvar name = elem.nodeName.toLowerCase();\n\t\t\treturn name === \"input\" && elem.type === \"button\" || name === \"button\";\n\t\t},\n\n\t\t\"text\": function( elem ) {\n\t\t\tvar attr;\n\t\t\t// IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc)\n\t\t\t// use getAttribute instead to test this case\n\t\t\treturn elem.nodeName.toLowerCase() === \"input\" &&\n\t\t\t\telem.type === \"text\" &&\n\t\t\t\t( (attr = elem.getAttribute(\"type\")) == null || attr.toLowerCase() === elem.type );\n\t\t},\n\n\t\t// Position-in-collection\n\t\t\"first\": createPositionalPseudo(function() {\n\t\t\treturn [ 0 ];\n\t\t}),\n\n\t\t\"last\": createPositionalPseudo(function( matchIndexes, length ) {\n\t\t\treturn [ length - 1 ];\n\t\t}),\n\n\t\t\"eq\": createPositionalPseudo(function( matchIndexes, length, argument ) {\n\t\t\treturn [ argument < 0 ? argument + length : argument ];\n\t\t}),\n\n\t\t\"even\": createPositionalPseudo(function( matchIndexes, length ) {\n\t\t\tvar i = 0;\n\t\t\tfor ( ; i < length; i += 2 ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t}),\n\n\t\t\"odd\": createPositionalPseudo(function( matchIndexes, length ) {\n\t\t\tvar i = 1;\n\t\t\tfor ( ; i < length; i += 2 ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t}),\n\n\t\t\"lt\": createPositionalPseudo(function( matchIndexes, length, argument ) {\n\t\t\tvar i = argument < 0 ? argument + length : argument;\n\t\t\tfor ( ; --i >= 0; ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t}),\n\n\t\t\"gt\": createPositionalPseudo(function( matchIndexes, length, argument ) {\n\t\t\tvar i = argument < 0 ? argument + length : argument;\n\t\t\tfor ( ; ++i < length; ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t})\n\t}\n};\n\nExpr.pseudos[\"nth\"] = Expr.pseudos[\"eq\"];\n\n// Add button/input type pseudos\nfor ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {\n\tExpr.pseudos[ i ] = createInputPseudo( i );\n}\nfor ( i in { submit: true, reset: true } ) {\n\tExpr.pseudos[ i ] = createButtonPseudo( i );\n}\n\n// Easy API for creating new setFilters\nfunction setFilters() {}\nsetFilters.prototype = Expr.filters = Expr.pseudos;\nExpr.setFilters = new setFilters();\n\nfunction tokenize( selector, parseOnly ) {\n\tvar matched, match, tokens, type,\n\t\tsoFar, groups, preFilters,\n\t\tcached = tokenCache[ selector + \" \" ];\n\n\tif ( cached ) {\n\t\treturn parseOnly ? 0 : cached.slice( 0 );\n\t}\n\n\tsoFar = selector;\n\tgroups = [];\n\tpreFilters = Expr.preFilter;\n\n\twhile ( soFar ) {\n\n\t\t// Comma and first run\n\t\tif ( !matched || (match = rcomma.exec( soFar )) ) {\n\t\t\tif ( match ) {\n\t\t\t\t// Don't consume trailing commas as valid\n\t\t\t\tsoFar = soFar.slice( match[0].length ) || soFar;\n\t\t\t}\n\t\t\tgroups.push( tokens = [] );\n\t\t}\n\n\t\tmatched = false;\n\n\t\t// Combinators\n\t\tif ( (match = rcombinators.exec( soFar )) ) {\n\t\t\tmatched = match.shift();\n\t\t\ttokens.push({\n\t\t\t\tvalue: matched,\n\t\t\t\t// Cast descendant combinators to space\n\t\t\t\ttype: match[0].replace( rtrim, \" \" )\n\t\t\t});\n\t\t\tsoFar = soFar.slice( matched.length );\n\t\t}\n\n\t\t// Filters\n\t\tfor ( type in Expr.filter ) {\n\t\t\tif ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] ||\n\t\t\t\t(match = preFilters[ type ]( match ))) ) {\n\t\t\t\tmatched = match.shift();\n\t\t\t\ttokens.push({\n\t\t\t\t\tvalue: matched,\n\t\t\t\t\ttype: type,\n\t\t\t\t\tmatches: match\n\t\t\t\t});\n\t\t\t\tsoFar = soFar.slice( matched.length );\n\t\t\t}\n\t\t}\n\n\t\tif ( !matched ) {\n\t\t\tbreak;\n\t\t}\n\t}\n\n\t// Return the length of the invalid excess\n\t// if we're just parsing\n\t// Otherwise, throw an error or return tokens\n\treturn parseOnly ?\n\t\tsoFar.length :\n\t\tsoFar ?\n\t\t\tSizzle.error( selector ) :\n\t\t\t// Cache the tokens\n\t\t\ttokenCache( selector, groups ).slice( 0 );\n}\n\nfunction toSelector( tokens ) {\n\tvar i = 0,\n\t\tlen = tokens.length,\n\t\tselector = \"\";\n\tfor ( ; i < len; i++ ) {\n\t\tselector += tokens[i].value;\n\t}\n\treturn selector;\n}\n\nfunction addCombinator( matcher, combinator, base ) {\n\tvar dir = combinator.dir,\n\t\tcheckNonElements = base && dir === \"parentNode\",\n\t\tdoneName = done++;\n\n\treturn combinator.first ?\n\t\t// Check against closest ancestor/preceding element\n\t\tfunction( elem, context, xml ) {\n\t\t\twhile ( (elem = elem[ dir ]) ) {\n\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\n\t\t\t\t\treturn matcher( elem, context, xml );\n\t\t\t\t}\n\t\t\t}\n\t\t} :\n\n\t\t// Check against all ancestor/preceding elements\n\t\tfunction( elem, context, xml ) {\n\t\t\tvar data, cache, outerCache,\n\t\t\t\tdirkey = dirruns + \" \" + doneName;\n\n\t\t\t// We can't set arbitrary data on XML nodes, so they don't benefit from dir caching\n\t\t\tif ( xml ) {\n\t\t\t\twhile ( (elem = elem[ dir ]) ) {\n\t\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\n\t\t\t\t\t\tif ( matcher( elem, context, xml ) ) {\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\twhile ( (elem = elem[ dir ]) ) {\n\t\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\n\t\t\t\t\t\touterCache = elem[ expando ] || (elem[ expando ] = {});\n\t\t\t\t\t\tif ( (cache = outerCache[ dir ]) && cache[0] === dirkey ) {\n\t\t\t\t\t\t\tif ( (data = cache[1]) === true || data === cachedruns ) {\n\t\t\t\t\t\t\t\treturn data === true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tcache = outerCache[ dir ] = [ dirkey ];\n\t\t\t\t\t\t\tcache[1] = matcher( elem, context, xml ) || cachedruns;\n\t\t\t\t\t\t\tif ( cache[1] === true ) {\n\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t};\n}\n\nfunction elementMatcher( matchers ) {\n\treturn matchers.length > 1 ?\n\t\tfunction( elem, context, xml ) {\n\t\t\tvar i = matchers.length;\n\t\t\twhile ( i-- ) {\n\t\t\t\tif ( !matchers[i]( elem, context, xml ) ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t} :\n\t\tmatchers[0];\n}\n\nfunction condense( unmatched, map, filter, context, xml ) {\n\tvar elem,\n\t\tnewUnmatched = [],\n\t\ti = 0,\n\t\tlen = unmatched.length,\n\t\tmapped = map != null;\n\n\tfor ( ; i < len; i++ ) {\n\t\tif ( (elem = unmatched[i]) ) {\n\t\t\tif ( !filter || filter( elem, context, xml ) ) {\n\t\t\t\tnewUnmatched.push( elem );\n\t\t\t\tif ( mapped ) {\n\t\t\t\t\tmap.push( i );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn newUnmatched;\n}\n\nfunction setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {\n\tif ( postFilter && !postFilter[ expando ] ) {\n\t\tpostFilter = setMatcher( postFilter );\n\t}\n\tif ( postFinder && !postFinder[ expando ] ) {\n\t\tpostFinder = setMatcher( postFinder, postSelector );\n\t}\n\treturn markFunction(function( seed, results, context, xml ) {\n\t\tvar temp, i, elem,\n\t\t\tpreMap = [],\n\t\t\tpostMap = [],\n\t\t\tpreexisting = results.length,\n\n\t\t\t// Get initial elements from seed or context\n\t\t\telems = seed || multipleContexts( selector || \"*\", context.nodeType ? [ context ] : context, [] ),\n\n\t\t\t// Prefilter to get matcher input, preserving a map for seed-results synchronization\n\t\t\tmatcherIn = preFilter && ( seed || !selector ) ?\n\t\t\t\tcondense( elems, preMap, preFilter, context, xml ) :\n\t\t\t\telems,\n\n\t\t\tmatcherOut = matcher ?\n\t\t\t\t// If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results,\n\t\t\t\tpostFinder || ( seed ? preFilter : preexisting || postFilter ) ?\n\n\t\t\t\t\t// ...intermediate processing is necessary\n\t\t\t\t\t[] :\n\n\t\t\t\t\t// ...otherwise use results directly\n\t\t\t\t\tresults :\n\t\t\t\tmatcherIn;\n\n\t\t// Find primary matches\n\t\tif ( matcher ) {\n\t\t\tmatcher( matcherIn, matcherOut, context, xml );\n\t\t}\n\n\t\t// Apply postFilter\n\t\tif ( postFilter ) {\n\t\t\ttemp = condense( matcherOut, postMap );\n\t\t\tpostFilter( temp, [], context, xml );\n\n\t\t\t// Un-match failing elements by moving them back to matcherIn\n\t\t\ti = temp.length;\n\t\t\twhile ( i-- ) {\n\t\t\t\tif ( (elem = temp[i]) ) {\n\t\t\t\t\tmatcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ( seed ) {\n\t\t\tif ( postFinder || preFilter ) {\n\t\t\t\tif ( postFinder ) {\n\t\t\t\t\t// Get the final matcherOut by condensing this intermediate into postFinder contexts\n\t\t\t\t\ttemp = [];\n\t\t\t\t\ti = matcherOut.length;\n\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\tif ( (elem = matcherOut[i]) ) {\n\t\t\t\t\t\t\t// Restore matcherIn since elem is not yet a final match\n\t\t\t\t\t\t\ttemp.push( (matcherIn[i] = elem) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tpostFinder( null, (matcherOut = []), temp, xml );\n\t\t\t\t}\n\n\t\t\t\t// Move matched elements from seed to results to keep them synchronized\n\t\t\t\ti = matcherOut.length;\n\t\t\t\twhile ( i-- ) {\n\t\t\t\t\tif ( (elem = matcherOut[i]) &&\n\t\t\t\t\t\t(temp = postFinder ? indexOf.call( seed, elem ) : preMap[i]) > -1 ) {\n\n\t\t\t\t\t\tseed[temp] = !(results[temp] = elem);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t// Add elements to results, through postFinder if defined\n\t\t} else {\n\t\t\tmatcherOut = condense(\n\t\t\t\tmatcherOut === results ?\n\t\t\t\t\tmatcherOut.splice( preexisting, matcherOut.length ) :\n\t\t\t\t\tmatcherOut\n\t\t\t);\n\t\t\tif ( postFinder ) {\n\t\t\t\tpostFinder( null, results, matcherOut, xml );\n\t\t\t} else {\n\t\t\t\tpush.apply( results, matcherOut );\n\t\t\t}\n\t\t}\n\t});\n}\n\nfunction matcherFromTokens( tokens ) {\n\tvar checkContext, matcher, j,\n\t\tlen = tokens.length,\n\t\tleadingRelative = Expr.relative[ tokens[0].type ],\n\t\timplicitRelative = leadingRelative || Expr.relative[\" \"],\n\t\ti = leadingRelative ? 1 : 0,\n\n\t\t// The foundational matcher ensures that elements are reachable from top-level context(s)\n\t\tmatchContext = addCombinator( function( elem ) {\n\t\t\treturn elem === checkContext;\n\t\t}, implicitRelative, true ),\n\t\tmatchAnyContext = addCombinator( function( elem ) {\n\t\t\treturn indexOf.call( checkContext, elem ) > -1;\n\t\t}, implicitRelative, true ),\n\t\tmatchers = [ function( elem, context, xml ) {\n\t\t\treturn ( !leadingRelative && ( xml || context !== outermostContext ) ) || (\n\t\t\t\t(checkContext = context).nodeType ?\n\t\t\t\t\tmatchContext( elem, context, xml ) :\n\t\t\t\t\tmatchAnyContext( elem, context, xml ) );\n\t\t} ];\n\n\tfor ( ; i < len; i++ ) {\n\t\tif ( (matcher = Expr.relative[ tokens[i].type ]) ) {\n\t\t\tmatchers = [ addCombinator(elementMatcher( matchers ), matcher) ];\n\t\t} else {\n\t\t\tmatcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches );\n\n\t\t\t// Return special upon seeing a positional matcher\n\t\t\tif ( matcher[ expando ] ) {\n\t\t\t\t// Find the next relative operator (if any) for proper handling\n\t\t\t\tj = ++i;\n\t\t\t\tfor ( ; j < len; j++ ) {\n\t\t\t\t\tif ( Expr.relative[ tokens[j].type ] ) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn setMatcher(\n\t\t\t\t\ti > 1 && elementMatcher( matchers ),\n\t\t\t\t\ti > 1 && toSelector(\n\t\t\t\t\t\t// If the preceding token was a descendant combinator, insert an implicit any-element `*`\n\t\t\t\t\t\ttokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === \" \" ? \"*\" : \"\" })\n\t\t\t\t\t).replace( rtrim, \"$1\" ),\n\t\t\t\t\tmatcher,\n\t\t\t\t\ti < j && matcherFromTokens( tokens.slice( i, j ) ),\n\t\t\t\t\tj < len && matcherFromTokens( (tokens = tokens.slice( j )) ),\n\t\t\t\t\tj < len && toSelector( tokens )\n\t\t\t\t);\n\t\t\t}\n\t\t\tmatchers.push( matcher );\n\t\t}\n\t}\n\n\treturn elementMatcher( matchers );\n}\n\nfunction matcherFromGroupMatchers( elementMatchers, setMatchers ) {\n\t// A counter to specify which element is currently being matched\n\tvar matcherCachedRuns = 0,\n\t\tbySet = setMatchers.length > 0,\n\t\tbyElement = elementMatchers.length > 0,\n\t\tsuperMatcher = function( seed, context, xml, results, expandContext ) {\n\t\t\tvar elem, j, matcher,\n\t\t\t\tsetMatched = [],\n\t\t\t\tmatchedCount = 0,\n\t\t\t\ti = \"0\",\n\t\t\t\tunmatched = seed && [],\n\t\t\t\toutermost = expandContext != null,\n\t\t\t\tcontextBackup = outermostContext,\n\t\t\t\t// We must always have either seed elements or context\n\t\t\t\telems = seed || byElement && Expr.find[\"TAG\"]( \"*\", expandContext && context.parentNode || context ),\n\t\t\t\t// Use integer dirruns iff this is the outermost matcher\n\t\t\t\tdirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1);\n\n\t\t\tif ( outermost ) {\n\t\t\t\toutermostContext = context !== document && context;\n\t\t\t\tcachedruns = matcherCachedRuns;\n\t\t\t}\n\n\t\t\t// Add elements passing elementMatchers directly to results\n\t\t\t// Keep `i` a string if there are no elements so `matchedCount` will be \"00\" below\n\t\t\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\t\t\tif ( byElement && elem ) {\n\t\t\t\t\tj = 0;\n\t\t\t\t\twhile ( (matcher = elementMatchers[j++]) ) {\n\t\t\t\t\t\tif ( matcher( elem, context, xml ) ) {\n\t\t\t\t\t\t\tresults.push( elem );\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif ( outermost ) {\n\t\t\t\t\t\tdirruns = dirrunsUnique;\n\t\t\t\t\t\tcachedruns = ++matcherCachedRuns;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Track unmatched elements for set filters\n\t\t\t\tif ( bySet ) {\n\t\t\t\t\t// They will have gone through all possible matchers\n\t\t\t\t\tif ( (elem = !matcher && elem) ) {\n\t\t\t\t\t\tmatchedCount--;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Lengthen the array for every element, matched or not\n\t\t\t\t\tif ( seed ) {\n\t\t\t\t\t\tunmatched.push( elem );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Apply set filters to unmatched elements\n\t\t\tmatchedCount += i;\n\t\t\tif ( bySet && i !== matchedCount ) {\n\t\t\t\tj = 0;\n\t\t\t\twhile ( (matcher = setMatchers[j++]) ) {\n\t\t\t\t\tmatcher( unmatched, setMatched, context, xml );\n\t\t\t\t}\n\n\t\t\t\tif ( seed ) {\n\t\t\t\t\t// Reintegrate element matches to eliminate the need for sorting\n\t\t\t\t\tif ( matchedCount > 0 ) {\n\t\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\t\tif ( !(unmatched[i] || setMatched[i]) ) {\n\t\t\t\t\t\t\t\tsetMatched[i] = pop.call( results );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Discard index placeholder values to get only actual matches\n\t\t\t\t\tsetMatched = condense( setMatched );\n\t\t\t\t}\n\n\t\t\t\t// Add matches to results\n\t\t\t\tpush.apply( results, setMatched );\n\n\t\t\t\t// Seedless set matches succeeding multiple successful matchers stipulate sorting\n\t\t\t\tif ( outermost && !seed && setMatched.length > 0 &&\n\t\t\t\t\t( matchedCount + setMatchers.length ) > 1 ) {\n\n\t\t\t\t\tSizzle.uniqueSort( results );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Override manipulation of globals by nested matchers\n\t\t\tif ( outermost ) {\n\t\t\t\tdirruns = dirrunsUnique;\n\t\t\t\toutermostContext = contextBackup;\n\t\t\t}\n\n\t\t\treturn unmatched;\n\t\t};\n\n\treturn bySet ?\n\t\tmarkFunction( superMatcher ) :\n\t\tsuperMatcher;\n}\n\ncompile = Sizzle.compile = function( selector, group /* Internal Use Only */ ) {\n\tvar i,\n\t\tsetMatchers = [],\n\t\telementMatchers = [],\n\t\tcached = compilerCache[ selector + \" \" ];\n\n\tif ( !cached ) {\n\t\t// Generate a function of recursive functions that can be used to check each element\n\t\tif ( !group ) {\n\t\t\tgroup = tokenize( selector );\n\t\t}\n\t\ti = group.length;\n\t\twhile ( i-- ) {\n\t\t\tcached = matcherFromTokens( group[i] );\n\t\t\tif ( cached[ expando ] ) {\n\t\t\t\tsetMatchers.push( cached );\n\t\t\t} else {\n\t\t\t\telementMatchers.push( cached );\n\t\t\t}\n\t\t}\n\n\t\t// Cache the compiled function\n\t\tcached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) );\n\t}\n\treturn cached;\n};\n\nfunction multipleContexts( selector, contexts, results ) {\n\tvar i = 0,\n\t\tlen = contexts.length;\n\tfor ( ; i < len; i++ ) {\n\t\tSizzle( selector, contexts[i], results );\n\t}\n\treturn results;\n}\n\nfunction select( selector, context, results, seed ) {\n\tvar i, tokens, token, type, find,\n\t\tmatch = tokenize( selector );\n\n\tif ( !seed ) {\n\t\t// Try to minimize operations if there is only one group\n\t\tif ( match.length === 1 ) {\n\n\t\t\t// Take a shortcut and set the context if the root selector is an ID\n\t\t\ttokens = match[0] = match[0].slice( 0 );\n\t\t\tif ( tokens.length > 2 && (token = tokens[0]).type === \"ID\" &&\n\t\t\t\t\tsupport.getById && context.nodeType === 9 && documentIsHTML &&\n\t\t\t\t\tExpr.relative[ tokens[1].type ] ) {\n\n\t\t\t\tcontext = ( Expr.find[\"ID\"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0];\n\t\t\t\tif ( !context ) {\n\t\t\t\t\treturn results;\n\t\t\t\t}\n\t\t\t\tselector = selector.slice( tokens.shift().value.length );\n\t\t\t}\n\n\t\t\t// Fetch a seed set for right-to-left matching\n\t\t\ti = matchExpr[\"needsContext\"].test( selector ) ? 0 : tokens.length;\n\t\t\twhile ( i-- ) {\n\t\t\t\ttoken = tokens[i];\n\n\t\t\t\t// Abort if we hit a combinator\n\t\t\t\tif ( Expr.relative[ (type = token.type) ] ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif ( (find = Expr.find[ type ]) ) {\n\t\t\t\t\t// Search, expanding context for leading sibling combinators\n\t\t\t\t\tif ( (seed = find(\n\t\t\t\t\t\ttoken.matches[0].replace( runescape, funescape ),\n\t\t\t\t\t\trsibling.test( tokens[0].type ) && context.parentNode || context\n\t\t\t\t\t)) ) {\n\n\t\t\t\t\t\t// If seed is empty or no tokens remain, we can return early\n\t\t\t\t\t\ttokens.splice( i, 1 );\n\t\t\t\t\t\tselector = seed.length && toSelector( tokens );\n\t\t\t\t\t\tif ( !selector ) {\n\t\t\t\t\t\t\tpush.apply( results, seed );\n\t\t\t\t\t\t\treturn results;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Compile and execute a filtering function\n\t// Provide `match` to avoid retokenization if we modified the selector above\n\tcompile( selector, match )(\n\t\tseed,\n\t\tcontext,\n\t\t!documentIsHTML,\n\t\tresults,\n\t\trsibling.test( selector )\n\t);\n\treturn results;\n}\n\n// One-time assignments\n\n// Sort stability\nsupport.sortStable = expando.split(\"\").sort( sortOrder ).join(\"\") === expando;\n\n// Support: Chrome<14\n// Always assume duplicates if they aren't passed to the comparison function\nsupport.detectDuplicates = hasDuplicate;\n\n// Initialize against the default document\nsetDocument();\n\n// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27)\n// Detached nodes confoundingly follow *each other*\nsupport.sortDetached = assert(function( div1 ) {\n\t// Should return 1, but returns 4 (following)\n\treturn div1.compareDocumentPosition( document.createElement(\"div\") ) & 1;\n});\n\n// Support: IE<8\n// Prevent attribute/property \"interpolation\"\n// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx\nif ( !assert(function( div ) {\n\tdiv.innerHTML = \"<a href='#'></a>\";\n\treturn div.firstChild.getAttribute(\"href\") === \"#\" ;\n}) ) {\n\taddHandle( \"type|href|height|width\", function( elem, name, isXML ) {\n\t\tif ( !isXML ) {\n\t\t\treturn elem.getAttribute( name, name.toLowerCase() === \"type\" ? 1 : 2 );\n\t\t}\n\t});\n}\n\n// Support: IE<9\n// Use defaultValue in place of getAttribute(\"value\")\nif ( !support.attributes || !assert(function( div ) {\n\tdiv.innerHTML = \"<input/>\";\n\tdiv.firstChild.setAttribute( \"value\", \"\" );\n\treturn div.firstChild.getAttribute( \"value\" ) === \"\";\n}) ) {\n\taddHandle( \"value\", function( elem, name, isXML ) {\n\t\tif ( !isXML && elem.nodeName.toLowerCase() === \"input\" ) {\n\t\t\treturn elem.defaultValue;\n\t\t}\n\t});\n}\n\n// Support: IE<9\n// Use getAttributeNode to fetch booleans when getAttribute lies\nif ( !assert(function( div ) {\n\treturn div.getAttribute(\"disabled\") == null;\n}) ) {\n\taddHandle( booleans, function( elem, name, isXML ) {\n\t\tvar val;\n\t\tif ( !isXML ) {\n\t\t\treturn (val = elem.getAttributeNode( name )) && val.specified ?\n\t\t\t\tval.value :\n\t\t\t\telem[ name ] === true ? name.toLowerCase() : null;\n\t\t}\n\t});\n}\n\njQuery.find = Sizzle;\njQuery.expr = Sizzle.selectors;\njQuery.expr[\":\"] = jQuery.expr.pseudos;\njQuery.unique = Sizzle.uniqueSort;\njQuery.text = Sizzle.getText;\njQuery.isXMLDoc = Sizzle.isXML;\njQuery.contains = Sizzle.contains;\n\n\n})( window );\n// String to Object options format cache\nvar optionsCache = {};\n\n// Convert String-formatted options into Object-formatted ones and store in cache\nfunction createOptions( options ) {\n\tvar object = optionsCache[ options ] = {};\n\tjQuery.each( options.match( core_rnotwhite ) || [], function( _, flag ) {\n\t\tobject[ flag ] = true;\n\t});\n\treturn object;\n}\n\n/*\n * Create a callback list using the following parameters:\n *\n *\toptions: an optional list of space-separated options that will change how\n *\t\t\tthe callback list behaves or a more traditional option object\n *\n * By default a callback list will act like an event callback list and can be\n * \"fired\" multiple times.\n *\n * Possible options:\n *\n *\tonce:\t\t\twill ensure the callback list can only be fired once (like a Deferred)\n *\n *\tmemory:\t\t\twill keep track of previous values and will call any callback added\n *\t\t\t\t\tafter the list has been fired right away with the latest \"memorized\"\n *\t\t\t\t\tvalues (like a Deferred)\n *\n *\tunique:\t\t\twill ensure a callback can only be added once (no duplicate in the list)\n *\n *\tstopOnFalse:\tinterrupt callings when a callback returns false\n *\n */\njQuery.Callbacks = function( options ) {\n\n\t// Convert options from String-formatted to Object-formatted if needed\n\t// (we check in cache first)\n\toptions = typeof options === \"string\" ?\n\t\t( optionsCache[ options ] || createOptions( options ) ) :\n\t\tjQuery.extend( {}, options );\n\n\tvar // Flag to know if list is currently firing\n\t\tfiring,\n\t\t// Last fire value (for non-forgettable lists)\n\t\tmemory,\n\t\t// Flag to know if list was already fired\n\t\tfired,\n\t\t// End of the loop when firing\n\t\tfiringLength,\n\t\t// Index of currently firing callback (modified by remove if needed)\n\t\tfiringIndex,\n\t\t// First callback to fire (used internally by add and fireWith)\n\t\tfiringStart,\n\t\t// Actual callback list\n\t\tlist = [],\n\t\t// Stack of fire calls for repeatable lists\n\t\tstack = !options.once && [],\n\t\t// Fire callbacks\n\t\tfire = function( data ) {\n\t\t\tmemory = options.memory && data;\n\t\t\tfired = true;\n\t\t\tfiringIndex = firingStart || 0;\n\t\t\tfiringStart = 0;\n\t\t\tfiringLength = list.length;\n\t\t\tfiring = true;\n\t\t\tfor ( ; list && firingIndex < firingLength; firingIndex++ ) {\n\t\t\t\tif ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false && options.stopOnFalse ) {\n\t\t\t\t\tmemory = false; // To prevent further calls using add\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tfiring = false;\n\t\t\tif ( list ) {\n\t\t\t\tif ( stack ) {\n\t\t\t\t\tif ( stack.length ) {\n\t\t\t\t\t\tfire( stack.shift() );\n\t\t\t\t\t}\n\t\t\t\t} else if ( memory ) {\n\t\t\t\t\tlist = [];\n\t\t\t\t} else {\n\t\t\t\t\tself.disable();\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t// Actual Callbacks object\n\t\tself = {\n\t\t\t// Add a callback or a collection of callbacks to the list\n\t\t\tadd: function() {\n\t\t\t\tif ( list ) {\n\t\t\t\t\t// First, we save the current length\n\t\t\t\t\tvar start = list.length;\n\t\t\t\t\t(function add( args ) {\n\t\t\t\t\t\tjQuery.each( args, function( _, arg ) {\n\t\t\t\t\t\t\tvar type = jQuery.type( arg );\n\t\t\t\t\t\t\tif ( type === \"function\" ) {\n\t\t\t\t\t\t\t\tif ( !options.unique || !self.has( arg ) ) {\n\t\t\t\t\t\t\t\t\tlist.push( arg );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else if ( arg && arg.length && type !== \"string\" ) {\n\t\t\t\t\t\t\t\t// Inspect recursively\n\t\t\t\t\t\t\t\tadd( arg );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t})( arguments );\n\t\t\t\t\t// Do we need to add the callbacks to the\n\t\t\t\t\t// current firing batch?\n\t\t\t\t\tif ( firing ) {\n\t\t\t\t\t\tfiringLength = list.length;\n\t\t\t\t\t// With memory, if we're not firing then\n\t\t\t\t\t// we should call right away\n\t\t\t\t\t} else if ( memory ) {\n\t\t\t\t\t\tfiringStart = start;\n\t\t\t\t\t\tfire( memory );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\t\t\t// Remove a callback from the list\n\t\t\tremove: function() {\n\t\t\t\tif ( list ) {\n\t\t\t\t\tjQuery.each( arguments, function( _, arg ) {\n\t\t\t\t\t\tvar index;\n\t\t\t\t\t\twhile( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {\n\t\t\t\t\t\t\tlist.splice( index, 1 );\n\t\t\t\t\t\t\t// Handle firing indexes\n\t\t\t\t\t\t\tif ( firing ) {\n\t\t\t\t\t\t\t\tif ( index <= firingLength ) {\n\t\t\t\t\t\t\t\t\tfiringLength--;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif ( index <= firingIndex ) {\n\t\t\t\t\t\t\t\t\tfiringIndex--;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\t\t\t// Check if a given callback is in the list.\n\t\t\t// If no argument is given, return whether or not list has callbacks attached.\n\t\t\thas: function( fn ) {\n\t\t\t\treturn fn ? jQuery.inArray( fn, list ) > -1 : !!( list && list.length );\n\t\t\t},\n\t\t\t// Remove all callbacks from the list\n\t\t\tempty: function() {\n\t\t\t\tlist = [];\n\t\t\t\tfiringLength = 0;\n\t\t\t\treturn this;\n\t\t\t},\n\t\t\t// Have the list do nothing anymore\n\t\t\tdisable: function() {\n\t\t\t\tlist = stack = memory = undefined;\n\t\t\t\treturn this;\n\t\t\t},\n\t\t\t// Is it disabled?\n\t\t\tdisabled: function() {\n\t\t\t\treturn !list;\n\t\t\t},\n\t\t\t// Lock the list in its current state\n\t\t\tlock: function() {\n\t\t\t\tstack = undefined;\n\t\t\t\tif ( !memory ) {\n\t\t\t\t\tself.disable();\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\t\t\t// Is it locked?\n\t\t\tlocked: function() {\n\t\t\t\treturn !stack;\n\t\t\t},\n\t\t\t// Call all callbacks with the given context and arguments\n\t\t\tfireWith: function( context, args ) {\n\t\t\t\tif ( list && ( !fired || stack ) ) {\n\t\t\t\t\targs = args || [];\n\t\t\t\t\targs = [ context, args.slice ? args.slice() : args ];\n\t\t\t\t\tif ( firing ) {\n\t\t\t\t\t\tstack.push( args );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfire( args );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\t\t\t// Call all the callbacks with the given arguments\n\t\t\tfire: function() {\n\t\t\t\tself.fireWith( this, arguments );\n\t\t\t\treturn this;\n\t\t\t},\n\t\t\t// To know if the callbacks have already been called at least once\n\t\t\tfired: function() {\n\t\t\t\treturn !!fired;\n\t\t\t}\n\t\t};\n\n\treturn self;\n};\njQuery.extend({\n\n\tDeferred: function( func ) {\n\t\tvar tuples = [\n\t\t\t\t// action, add listener, listener list, final state\n\t\t\t\t[ \"resolve\", \"done\", jQuery.Callbacks(\"once memory\"), \"resolved\" ],\n\t\t\t\t[ \"reject\", \"fail\", jQuery.Callbacks(\"once memory\"), \"rejected\" ],\n\t\t\t\t[ \"notify\", \"progress\", jQuery.Callbacks(\"memory\") ]\n\t\t\t],\n\t\t\tstate = \"pending\",\n\t\t\tpromise = {\n\t\t\t\tstate: function() {\n\t\t\t\t\treturn state;\n\t\t\t\t},\n\t\t\t\talways: function() {\n\t\t\t\t\tdeferred.done( arguments ).fail( arguments );\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\t\t\t\tthen: function( /* fnDone, fnFail, fnProgress */ ) {\n\t\t\t\t\tvar fns = arguments;\n\t\t\t\t\treturn jQuery.Deferred(function( newDefer ) {\n\t\t\t\t\t\tjQuery.each( tuples, function( i, tuple ) {\n\t\t\t\t\t\t\tvar action = tuple[ 0 ],\n\t\t\t\t\t\t\t\tfn = jQuery.isFunction( fns[ i ] ) && fns[ i ];\n\t\t\t\t\t\t\t// deferred[ done | fail | progress ] for forwarding actions to newDefer\n\t\t\t\t\t\t\tdeferred[ tuple[1] ](function() {\n\t\t\t\t\t\t\t\tvar returned = fn && fn.apply( this, arguments );\n\t\t\t\t\t\t\t\tif ( returned && jQuery.isFunction( returned.promise ) ) {\n\t\t\t\t\t\t\t\t\treturned.promise()\n\t\t\t\t\t\t\t\t\t\t.done( newDefer.resolve )\n\t\t\t\t\t\t\t\t\t\t.fail( newDefer.reject )\n\t\t\t\t\t\t\t\t\t\t.progress( newDefer.notify );\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tnewDefer[ action + \"With\" ]( this === promise ? newDefer.promise() : this, fn ? [ returned ] : arguments );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t});\n\t\t\t\t\t\tfns = null;\n\t\t\t\t\t}).promise();\n\t\t\t\t},\n\t\t\t\t// Get a promise for this deferred\n\t\t\t\t// If obj is provided, the promise aspect is added to the object\n\t\t\t\tpromise: function( obj ) {\n\t\t\t\t\treturn obj != null ? jQuery.extend( obj, promise ) : promise;\n\t\t\t\t}\n\t\t\t},\n\t\t\tdeferred = {};\n\n\t\t// Keep pipe for back-compat\n\t\tpromise.pipe = promise.then;\n\n\t\t// Add list-specific methods\n\t\tjQuery.each( tuples, function( i, tuple ) {\n\t\t\tvar list = tuple[ 2 ],\n\t\t\t\tstateString = tuple[ 3 ];\n\n\t\t\t// promise[ done | fail | progress ] = list.add\n\t\t\tpromise[ tuple[1] ] = list.add;\n\n\t\t\t// Handle state\n\t\t\tif ( stateString ) {\n\t\t\t\tlist.add(function() {\n\t\t\t\t\t// state = [ resolved | rejected ]\n\t\t\t\t\tstate = stateString;\n\n\t\t\t\t// [ reject_list | resolve_list ].disable; progress_list.lock\n\t\t\t\t}, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock );\n\t\t\t}\n\n\t\t\t// deferred[ resolve | reject | notify ]\n\t\t\tdeferred[ tuple[0] ] = function() {\n\t\t\t\tdeferred[ tuple[0] + \"With\" ]( this === deferred ? promise : this, arguments );\n\t\t\t\treturn this;\n\t\t\t};\n\t\t\tdeferred[ tuple[0] + \"With\" ] = list.fireWith;\n\t\t});\n\n\t\t// Make the deferred a promise\n\t\tpromise.promise( deferred );\n\n\t\t// Call given func if any\n\t\tif ( func ) {\n\t\t\tfunc.call( deferred, deferred );\n\t\t}\n\n\t\t// All done!\n\t\treturn deferred;\n\t},\n\n\t// Deferred helper\n\twhen: function( subordinate /* , ..., subordinateN */ ) {\n\t\tvar i = 0,\n\t\t\tresolveValues = core_slice.call( arguments ),\n\t\t\tlength = resolveValues.length,\n\n\t\t\t// the count of uncompleted subordinates\n\t\t\tremaining = length !== 1 || ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0,\n\n\t\t\t// the master Deferred. If resolveValues consist of only a single Deferred, just use that.\n\t\t\tdeferred = remaining === 1 ? subordinate : jQuery.Deferred(),\n\n\t\t\t// Update function for both resolve and progress values\n\t\t\tupdateFunc = function( i, contexts, values ) {\n\t\t\t\treturn function( value ) {\n\t\t\t\t\tcontexts[ i ] = this;\n\t\t\t\t\tvalues[ i ] = arguments.length > 1 ? core_slice.call( arguments ) : value;\n\t\t\t\t\tif( values === progressValues ) {\n\t\t\t\t\t\tdeferred.notifyWith( contexts, values );\n\t\t\t\t\t} else if ( !( --remaining ) ) {\n\t\t\t\t\t\tdeferred.resolveWith( contexts, values );\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t},\n\n\t\t\tprogressValues, progressContexts, resolveContexts;\n\n\t\t// add listeners to Deferred subordinates; treat others as resolved\n\t\tif ( length > 1 ) {\n\t\t\tprogressValues = new Array( length );\n\t\t\tprogressContexts = new Array( length );\n\t\t\tresolveContexts = new Array( length );\n\t\t\tfor ( ; i < length; i++ ) {\n\t\t\t\tif ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) {\n\t\t\t\t\tresolveValues[ i ].promise()\n\t\t\t\t\t\t.done( updateFunc( i, resolveContexts, resolveValues ) )\n\t\t\t\t\t\t.fail( deferred.reject )\n\t\t\t\t\t\t.progress( updateFunc( i, progressContexts, progressValues ) );\n\t\t\t\t} else {\n\t\t\t\t\t--remaining;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// if we're not waiting on anything, resolve the master\n\t\tif ( !remaining ) {\n\t\t\tdeferred.resolveWith( resolveContexts, resolveValues );\n\t\t}\n\n\t\treturn deferred.promise();\n\t}\n});\njQuery.support = (function( support ) {\n\n\tvar all, a, input, select, fragment, opt, eventName, isSupported, i,\n\t\tdiv = document.createElement(\"div\");\n\n\t// Setup\n\tdiv.setAttribute( \"className\", \"t\" );\n\tdiv.innerHTML = \"  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>\";\n\n\t// Finish early in limited (non-browser) environments\n\tall = div.getElementsByTagName(\"*\") || [];\n\ta = div.getElementsByTagName(\"a\")[ 0 ];\n\tif ( !a || !a.style || !all.length ) {\n\t\treturn support;\n\t}\n\n\t// First batch of tests\n\tselect = document.createElement(\"select\");\n\topt = select.appendChild( document.createElement(\"option\") );\n\tinput = div.getElementsByTagName(\"input\")[ 0 ];\n\n\ta.style.cssText = \"top:1px;float:left;opacity:.5\";\n\n\t// Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7)\n\tsupport.getSetAttribute = div.className !== \"t\";\n\n\t// IE strips leading whitespace when .innerHTML is used\n\tsupport.leadingWhitespace = div.firstChild.nodeType === 3;\n\n\t// Make sure that tbody elements aren't automatically inserted\n\t// IE will insert them into empty tables\n\tsupport.tbody = !div.getElementsByTagName(\"tbody\").length;\n\n\t// Make sure that link elements get serialized correctly by innerHTML\n\t// This requires a wrapper element in IE\n\tsupport.htmlSerialize = !!div.getElementsByTagName(\"link\").length;\n\n\t// Get the style information from getAttribute\n\t// (IE uses .cssText instead)\n\tsupport.style = /top/.test( a.getAttribute(\"style\") );\n\n\t// Make sure that URLs aren't manipulated\n\t// (IE normalizes it by default)\n\tsupport.hrefNormalized = a.getAttribute(\"href\") === \"/a\";\n\n\t// Make sure that element opacity exists\n\t// (IE uses filter instead)\n\t// Use a regex to work around a WebKit issue. See #5145\n\tsupport.opacity = /^0.5/.test( a.style.opacity );\n\n\t// Verify style float existence\n\t// (IE uses styleFloat instead of cssFloat)\n\tsupport.cssFloat = !!a.style.cssFloat;\n\n\t// Check the default checkbox/radio value (\"\" on WebKit; \"on\" elsewhere)\n\tsupport.checkOn = !!input.value;\n\n\t// Make sure that a selected-by-default option has a working selected property.\n\t// (WebKit defaults to false instead of true, IE too, if it's in an optgroup)\n\tsupport.optSelected = opt.selected;\n\n\t// Tests for enctype support on a form (#6743)\n\tsupport.enctype = !!document.createElement(\"form\").enctype;\n\n\t// Makes sure cloning an html5 element does not cause problems\n\t// Where outerHTML is undefined, this still works\n\tsupport.html5Clone = document.createElement(\"nav\").cloneNode( true ).outerHTML !== \"<:nav></:nav>\";\n\n\t// Will be defined later\n\tsupport.inlineBlockNeedsLayout = false;\n\tsupport.shrinkWrapBlocks = false;\n\tsupport.pixelPosition = false;\n\tsupport.deleteExpando = true;\n\tsupport.noCloneEvent = true;\n\tsupport.reliableMarginRight = true;\n\tsupport.boxSizingReliable = true;\n\n\t// Make sure checked status is properly cloned\n\tinput.checked = true;\n\tsupport.noCloneChecked = input.cloneNode( true ).checked;\n\n\t// Make sure that the options inside disabled selects aren't marked as disabled\n\t// (WebKit marks them as disabled)\n\tselect.disabled = true;\n\tsupport.optDisabled = !opt.disabled;\n\n\t// Support: IE<9\n\ttry {\n\t\tdelete div.test;\n\t} catch( e ) {\n\t\tsupport.deleteExpando = false;\n\t}\n\n\t// Check if we can trust getAttribute(\"value\")\n\tinput = document.createElement(\"input\");\n\tinput.setAttribute( \"value\", \"\" );\n\tsupport.input = input.getAttribute( \"value\" ) === \"\";\n\n\t// Check if an input maintains its value after becoming a radio\n\tinput.value = \"t\";\n\tinput.setAttribute( \"type\", \"radio\" );\n\tsupport.radioValue = input.value === \"t\";\n\n\t// #11217 - WebKit loses check when the name is after the checked attribute\n\tinput.setAttribute( \"checked\", \"t\" );\n\tinput.setAttribute( \"name\", \"t\" );\n\n\tfragment = document.createDocumentFragment();\n\tfragment.appendChild( input );\n\n\t// Check if a disconnected checkbox will retain its checked\n\t// value of true after appended to the DOM (IE6/7)\n\tsupport.appendChecked = input.checked;\n\n\t// WebKit doesn't clone checked state correctly in fragments\n\tsupport.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked;\n\n\t// Support: IE<9\n\t// Opera does not clone events (and typeof div.attachEvent === undefined).\n\t// IE9-10 clones events bound via attachEvent, but they don't trigger with .click()\n\tif ( div.attachEvent ) {\n\t\tdiv.attachEvent( \"onclick\", function() {\n\t\t\tsupport.noCloneEvent = false;\n\t\t});\n\n\t\tdiv.cloneNode( true ).click();\n\t}\n\n\t// Support: IE<9 (lack submit/change bubble), Firefox 17+ (lack focusin event)\n\t// Beware of CSP restrictions (https://developer.mozilla.org/en/Security/CSP)\n\tfor ( i in { submit: true, change: true, focusin: true }) {\n\t\tdiv.setAttribute( eventName = \"on\" + i, \"t\" );\n\n\t\tsupport[ i + \"Bubbles\" ] = eventName in window || div.attributes[ eventName ].expando === false;\n\t}\n\n\tdiv.style.backgroundClip = \"content-box\";\n\tdiv.cloneNode( true ).style.backgroundClip = \"\";\n\tsupport.clearCloneStyle = div.style.backgroundClip === \"content-box\";\n\n\t// Support: IE<9\n\t// Iteration over object's inherited properties before its own.\n\tfor ( i in jQuery( support ) ) {\n\t\tbreak;\n\t}\n\tsupport.ownLast = i !== \"0\";\n\n\t// Run tests that need a body at doc ready\n\tjQuery(function() {\n\t\tvar container, marginDiv, tds,\n\t\t\tdivReset = \"padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;\",\n\t\t\tbody = document.getElementsByTagName(\"body\")[0];\n\n\t\tif ( !body ) {\n\t\t\t// Return for frameset docs that don't have a body\n\t\t\treturn;\n\t\t}\n\n\t\tcontainer = document.createElement(\"div\");\n\t\tcontainer.style.cssText = \"border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px\";\n\n\t\tbody.appendChild( container ).appendChild( div );\n\n\t\t// Support: IE8\n\t\t// Check if table cells still have offsetWidth/Height when they are set\n\t\t// to display:none and there are still other visible table cells in a\n\t\t// table row; if so, offsetWidth/Height are not reliable for use when\n\t\t// determining if an element has been hidden directly using\n\t\t// display:none (it is still safe to use offsets if a parent element is\n\t\t// hidden; don safety goggles and see bug #4512 for more information).\n\t\tdiv.innerHTML = \"<table><tr><td></td><td>t</td></tr></table>\";\n\t\ttds = div.getElementsByTagName(\"td\");\n\t\ttds[ 0 ].style.cssText = \"padding:0;margin:0;border:0;display:none\";\n\t\tisSupported = ( tds[ 0 ].offsetHeight === 0 );\n\n\t\ttds[ 0 ].style.display = \"\";\n\t\ttds[ 1 ].style.display = \"none\";\n\n\t\t// Support: IE8\n\t\t// Check if empty table cells still have offsetWidth/Height\n\t\tsupport.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 );\n\n\t\t// Check box-sizing and margin behavior.\n\t\tdiv.innerHTML = \"\";\n\t\tdiv.style.cssText = \"box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;\";\n\n\t\t// Workaround failing boxSizing test due to offsetWidth returning wrong value\n\t\t// with some non-1 values of body zoom, ticket #13543\n\t\tjQuery.swap( body, body.style.zoom != null ? { zoom: 1 } : {}, function() {\n\t\t\tsupport.boxSizing = div.offsetWidth === 4;\n\t\t});\n\n\t\t// Use window.getComputedStyle because jsdom on node.js will break without it.\n\t\tif ( window.getComputedStyle ) {\n\t\t\tsupport.pixelPosition = ( window.getComputedStyle( div, null ) || {} ).top !== \"1%\";\n\t\t\tsupport.boxSizingReliable = ( window.getComputedStyle( div, null ) || { width: \"4px\" } ).width === \"4px\";\n\n\t\t\t// Check if div with explicit width and no margin-right incorrectly\n\t\t\t// gets computed margin-right based on width of container. (#3333)\n\t\t\t// Fails in WebKit before Feb 2011 nightlies\n\t\t\t// WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right\n\t\t\tmarginDiv = div.appendChild( document.createElement(\"div\") );\n\t\t\tmarginDiv.style.cssText = div.style.cssText = divReset;\n\t\t\tmarginDiv.style.marginRight = marginDiv.style.width = \"0\";\n\t\t\tdiv.style.width = \"1px\";\n\n\t\t\tsupport.reliableMarginRight =\n\t\t\t\t!parseFloat( ( window.getComputedStyle( marginDiv, null ) || {} ).marginRight );\n\t\t}\n\n\t\tif ( typeof div.style.zoom !== core_strundefined ) {\n\t\t\t// Support: IE<8\n\t\t\t// Check if natively block-level elements act like inline-block\n\t\t\t// elements when setting their display to 'inline' and giving\n\t\t\t// them layout\n\t\t\tdiv.innerHTML = \"\";\n\t\t\tdiv.style.cssText = divReset + \"width:1px;padding:1px;display:inline;zoom:1\";\n\t\t\tsupport.inlineBlockNeedsLayout = ( div.offsetWidth === 3 );\n\n\t\t\t// Support: IE6\n\t\t\t// Check if elements with layout shrink-wrap their children\n\t\t\tdiv.style.display = \"block\";\n\t\t\tdiv.innerHTML = \"<div></div>\";\n\t\t\tdiv.firstChild.style.width = \"5px\";\n\t\t\tsupport.shrinkWrapBlocks = ( div.offsetWidth !== 3 );\n\n\t\t\tif ( support.inlineBlockNeedsLayout ) {\n\t\t\t\t// Prevent IE 6 from affecting layout for positioned elements #11048\n\t\t\t\t// Prevent IE from shrinking the body in IE 7 mode #12869\n\t\t\t\t// Support: IE<8\n\t\t\t\tbody.style.zoom = 1;\n\t\t\t}\n\t\t}\n\n\t\tbody.removeChild( container );\n\n\t\t// Null elements to avoid leaks in IE\n\t\tcontainer = div = tds = marginDiv = null;\n\t});\n\n\t// Null elements to avoid leaks in IE\n\tall = select = fragment = opt = a = input = null;\n\n\treturn support;\n})({});\n\nvar rbrace = /(?:\\{[\\s\\S]*\\}|\\[[\\s\\S]*\\])$/,\n\trmultiDash = /([A-Z])/g;\n\nfunction internalData( elem, name, data, pvt /* Internal Use Only */ ){\n\tif ( !jQuery.acceptData( elem ) ) {\n\t\treturn;\n\t}\n\n\tvar ret, thisCache,\n\t\tinternalKey = jQuery.expando,\n\n\t\t// We have to handle DOM nodes and JS objects differently because IE6-7\n\t\t// can't GC object references properly across the DOM-JS boundary\n\t\tisNode = elem.nodeType,\n\n\t\t// Only DOM nodes need the global jQuery cache; JS object data is\n\t\t// attached directly to the object so GC can occur automatically\n\t\tcache = isNode ? jQuery.cache : elem,\n\n\t\t// Only defining an ID for JS objects if its cache already exists allows\n\t\t// the code to shortcut on the same path as a DOM node with no cache\n\t\tid = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey;\n\n\t// Avoid doing any more work than we need to when trying to get data on an\n\t// object that has no data at all\n\tif ( (!id || !cache[id] || (!pvt && !cache[id].data)) && data === undefined && typeof name === \"string\" ) {\n\t\treturn;\n\t}\n\n\tif ( !id ) {\n\t\t// Only DOM nodes need a new unique ID for each element since their data\n\t\t// ends up in the global cache\n\t\tif ( isNode ) {\n\t\t\tid = elem[ internalKey ] = core_deletedIds.pop() || jQuery.guid++;\n\t\t} else {\n\t\t\tid = internalKey;\n\t\t}\n\t}\n\n\tif ( !cache[ id ] ) {\n\t\t// Avoid exposing jQuery metadata on plain JS objects when the object\n\t\t// is serialized using JSON.stringify\n\t\tcache[ id ] = isNode ? {} : { toJSON: jQuery.noop };\n\t}\n\n\t// An object can be passed to jQuery.data instead of a key/value pair; this gets\n\t// shallow copied over onto the existing cache\n\tif ( typeof name === \"object\" || typeof name === \"function\" ) {\n\t\tif ( pvt ) {\n\t\t\tcache[ id ] = jQuery.extend( cache[ id ], name );\n\t\t} else {\n\t\t\tcache[ id ].data = jQuery.extend( cache[ id ].data, name );\n\t\t}\n\t}\n\n\tthisCache = cache[ id ];\n\n\t// jQuery data() is stored in a separate object inside the object's internal data\n\t// cache in order to avoid key collisions between internal data and user-defined\n\t// data.\n\tif ( !pvt ) {\n\t\tif ( !thisCache.data ) {\n\t\t\tthisCache.data = {};\n\t\t}\n\n\t\tthisCache = thisCache.data;\n\t}\n\n\tif ( data !== undefined ) {\n\t\tthisCache[ jQuery.camelCase( name ) ] = data;\n\t}\n\n\t// Check for both converted-to-camel and non-converted data property names\n\t// If a data property was specified\n\tif ( typeof name === \"string\" ) {\n\n\t\t// First Try to find as-is property data\n\t\tret = thisCache[ name ];\n\n\t\t// Test for null|undefined property data\n\t\tif ( ret == null ) {\n\n\t\t\t// Try to find the camelCased property\n\t\t\tret = thisCache[ jQuery.camelCase( name ) ];\n\t\t}\n\t} else {\n\t\tret = thisCache;\n\t}\n\n\treturn ret;\n}\n\nfunction internalRemoveData( elem, name, pvt ) {\n\tif ( !jQuery.acceptData( elem ) ) {\n\t\treturn;\n\t}\n\n\tvar thisCache, i,\n\t\tisNode = elem.nodeType,\n\n\t\t// See jQuery.data for more information\n\t\tcache = isNode ? jQuery.cache : elem,\n\t\tid = isNode ? elem[ jQuery.expando ] : jQuery.expando;\n\n\t// If there is already no cache entry for this object, there is no\n\t// purpose in continuing\n\tif ( !cache[ id ] ) {\n\t\treturn;\n\t}\n\n\tif ( name ) {\n\n\t\tthisCache = pvt ? cache[ id ] : cache[ id ].data;\n\n\t\tif ( thisCache ) {\n\n\t\t\t// Support array or space separated string names for data keys\n\t\t\tif ( !jQuery.isArray( name ) ) {\n\n\t\t\t\t// try the string as a key before any manipulation\n\t\t\t\tif ( name in thisCache ) {\n\t\t\t\t\tname = [ name ];\n\t\t\t\t} else {\n\n\t\t\t\t\t// split the camel cased version by spaces unless a key with the spaces exists\n\t\t\t\t\tname = jQuery.camelCase( name );\n\t\t\t\t\tif ( name in thisCache ) {\n\t\t\t\t\t\tname = [ name ];\n\t\t\t\t\t} else {\n\t\t\t\t\t\tname = name.split(\" \");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// If \"name\" is an array of keys...\n\t\t\t\t// When data is initially created, via (\"key\", \"val\") signature,\n\t\t\t\t// keys will be converted to camelCase.\n\t\t\t\t// Since there is no way to tell _how_ a key was added, remove\n\t\t\t\t// both plain key and camelCase key. #12786\n\t\t\t\t// This will only penalize the array argument path.\n\t\t\t\tname = name.concat( jQuery.map( name, jQuery.camelCase ) );\n\t\t\t}\n\n\t\t\ti = name.length;\n\t\t\twhile ( i-- ) {\n\t\t\t\tdelete thisCache[ name[i] ];\n\t\t\t}\n\n\t\t\t// If there is no data left in the cache, we want to continue\n\t\t\t// and let the cache object itself get destroyed\n\t\t\tif ( pvt ? !isEmptyDataObject(thisCache) : !jQuery.isEmptyObject(thisCache) ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}\n\n\t// See jQuery.data for more information\n\tif ( !pvt ) {\n\t\tdelete cache[ id ].data;\n\n\t\t// Don't destroy the parent cache unless the internal data object\n\t\t// had been the only thing left in it\n\t\tif ( !isEmptyDataObject( cache[ id ] ) ) {\n\t\t\treturn;\n\t\t}\n\t}\n\n\t// Destroy the cache\n\tif ( isNode ) {\n\t\tjQuery.cleanData( [ elem ], true );\n\n\t// Use delete when supported for expandos or `cache` is not a window per isWindow (#10080)\n\t/* jshint eqeqeq: false */\n\t} else if ( jQuery.support.deleteExpando || cache != cache.window ) {\n\t\t/* jshint eqeqeq: true */\n\t\tdelete cache[ id ];\n\n\t// When all else fails, null\n\t} else {\n\t\tcache[ id ] = null;\n\t}\n}\n\njQuery.extend({\n\tcache: {},\n\n\t// The following elements throw uncatchable exceptions if you\n\t// attempt to add expando properties to them.\n\tnoData: {\n\t\t\"applet\": true,\n\t\t\"embed\": true,\n\t\t// Ban all objects except for Flash (which handle expandos)\n\t\t\"object\": \"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\"\n\t},\n\n\thasData: function( elem ) {\n\t\telem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ];\n\t\treturn !!elem && !isEmptyDataObject( elem );\n\t},\n\n\tdata: function( elem, name, data ) {\n\t\treturn internalData( elem, name, data );\n\t},\n\n\tremoveData: function( elem, name ) {\n\t\treturn internalRemoveData( elem, name );\n\t},\n\n\t// For internal use only.\n\t_data: function( elem, name, data ) {\n\t\treturn internalData( elem, name, data, true );\n\t},\n\n\t_removeData: function( elem, name ) {\n\t\treturn internalRemoveData( elem, name, true );\n\t},\n\n\t// A method for determining if a DOM node can handle the data expando\n\tacceptData: function( elem ) {\n\t\t// Do not set data on non-element because it will not be cleared (#8335).\n\t\tif ( elem.nodeType && elem.nodeType !== 1 && elem.nodeType !== 9 ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tvar noData = elem.nodeName && jQuery.noData[ elem.nodeName.toLowerCase() ];\n\n\t\t// nodes accept data unless otherwise specified; rejection can be conditional\n\t\treturn !noData || noData !== true && elem.getAttribute(\"classid\") === noData;\n\t}\n});\n\njQuery.fn.extend({\n\tdata: function( key, value ) {\n\t\tvar attrs, name,\n\t\t\tdata = null,\n\t\t\ti = 0,\n\t\t\telem = this[0];\n\n\t\t// Special expections of .data basically thwart jQuery.access,\n\t\t// so implement the relevant behavior ourselves\n\n\t\t// Gets all values\n\t\tif ( key === undefined ) {\n\t\t\tif ( this.length ) {\n\t\t\t\tdata = jQuery.data( elem );\n\n\t\t\t\tif ( elem.nodeType === 1 && !jQuery._data( elem, \"parsedAttrs\" ) ) {\n\t\t\t\t\tattrs = elem.attributes;\n\t\t\t\t\tfor ( ; i < attrs.length; i++ ) {\n\t\t\t\t\t\tname = attrs[i].name;\n\n\t\t\t\t\t\tif ( name.indexOf(\"data-\") === 0 ) {\n\t\t\t\t\t\t\tname = jQuery.camelCase( name.slice(5) );\n\n\t\t\t\t\t\t\tdataAttr( elem, name, data[ name ] );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tjQuery._data( elem, \"parsedAttrs\", true );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn data;\n\t\t}\n\n\t\t// Sets multiple values\n\t\tif ( typeof key === \"object\" ) {\n\t\t\treturn this.each(function() {\n\t\t\t\tjQuery.data( this, key );\n\t\t\t});\n\t\t}\n\n\t\treturn arguments.length > 1 ?\n\n\t\t\t// Sets one value\n\t\t\tthis.each(function() {\n\t\t\t\tjQuery.data( this, key, value );\n\t\t\t}) :\n\n\t\t\t// Gets one value\n\t\t\t// Try to fetch any internally stored data first\n\t\t\telem ? dataAttr( elem, key, jQuery.data( elem, key ) ) : null;\n\t},\n\n\tremoveData: function( key ) {\n\t\treturn this.each(function() {\n\t\t\tjQuery.removeData( this, key );\n\t\t});\n\t}\n});\n\nfunction dataAttr( elem, key, data ) {\n\t// If nothing was found internally, try to fetch any\n\t// data from the HTML5 data-* attribute\n\tif ( data === undefined && elem.nodeType === 1 ) {\n\n\t\tvar name = \"data-\" + key.replace( rmultiDash, \"-$1\" ).toLowerCase();\n\n\t\tdata = elem.getAttribute( name );\n\n\t\tif ( typeof data === \"string\" ) {\n\t\t\ttry {\n\t\t\t\tdata = data === \"true\" ? true :\n\t\t\t\t\tdata === \"false\" ? false :\n\t\t\t\t\tdata === \"null\" ? null :\n\t\t\t\t\t// Only convert to a number if it doesn't change the string\n\t\t\t\t\t+data + \"\" === data ? +data :\n\t\t\t\t\trbrace.test( data ) ? jQuery.parseJSON( data ) :\n\t\t\t\t\t\tdata;\n\t\t\t} catch( e ) {}\n\n\t\t\t// Make sure we set the data so it isn't changed later\n\t\t\tjQuery.data( elem, key, data );\n\n\t\t} else {\n\t\t\tdata = undefined;\n\t\t}\n\t}\n\n\treturn data;\n}\n\n// checks a cache object for emptiness\nfunction isEmptyDataObject( obj ) {\n\tvar name;\n\tfor ( name in obj ) {\n\n\t\t// if the public data object is empty, the private is still empty\n\t\tif ( name === \"data\" && jQuery.isEmptyObject( obj[name] ) ) {\n\t\t\tcontinue;\n\t\t}\n\t\tif ( name !== \"toJSON\" ) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\treturn true;\n}\njQuery.extend({\n\tqueue: function( elem, type, data ) {\n\t\tvar queue;\n\n\t\tif ( elem ) {\n\t\t\ttype = ( type || \"fx\" ) + \"queue\";\n\t\t\tqueue = jQuery._data( elem, type );\n\n\t\t\t// Speed up dequeue by getting out quickly if this is just a lookup\n\t\t\tif ( data ) {\n\t\t\t\tif ( !queue || jQuery.isArray(data) ) {\n\t\t\t\t\tqueue = jQuery._data( elem, type, jQuery.makeArray(data) );\n\t\t\t\t} else {\n\t\t\t\t\tqueue.push( data );\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn queue || [];\n\t\t}\n\t},\n\n\tdequeue: function( elem, type ) {\n\t\ttype = type || \"fx\";\n\n\t\tvar queue = jQuery.queue( elem, type ),\n\t\t\tstartLength = queue.length,\n\t\t\tfn = queue.shift(),\n\t\t\thooks = jQuery._queueHooks( elem, type ),\n\t\t\tnext = function() {\n\t\t\t\tjQuery.dequeue( elem, type );\n\t\t\t};\n\n\t\t// If the fx queue is dequeued, always remove the progress sentinel\n\t\tif ( fn === \"inprogress\" ) {\n\t\t\tfn = queue.shift();\n\t\t\tstartLength--;\n\t\t}\n\n\t\tif ( fn ) {\n\n\t\t\t// Add a progress sentinel to prevent the fx queue from being\n\t\t\t// automatically dequeued\n\t\t\tif ( type === \"fx\" ) {\n\t\t\t\tqueue.unshift( \"inprogress\" );\n\t\t\t}\n\n\t\t\t// clear up the last queue stop function\n\t\t\tdelete hooks.stop;\n\t\t\tfn.call( elem, next, hooks );\n\t\t}\n\n\t\tif ( !startLength && hooks ) {\n\t\t\thooks.empty.fire();\n\t\t}\n\t},\n\n\t// not intended for public consumption - generates a queueHooks object, or returns the current one\n\t_queueHooks: function( elem, type ) {\n\t\tvar key = type + \"queueHooks\";\n\t\treturn jQuery._data( elem, key ) || jQuery._data( elem, key, {\n\t\t\tempty: jQuery.Callbacks(\"once memory\").add(function() {\n\t\t\t\tjQuery._removeData( elem, type + \"queue\" );\n\t\t\t\tjQuery._removeData( elem, key );\n\t\t\t})\n\t\t});\n\t}\n});\n\njQuery.fn.extend({\n\tqueue: function( type, data ) {\n\t\tvar setter = 2;\n\n\t\tif ( typeof type !== \"string\" ) {\n\t\t\tdata = type;\n\t\t\ttype = \"fx\";\n\t\t\tsetter--;\n\t\t}\n\n\t\tif ( arguments.length < setter ) {\n\t\t\treturn jQuery.queue( this[0], type );\n\t\t}\n\n\t\treturn data === undefined ?\n\t\t\tthis :\n\t\t\tthis.each(function() {\n\t\t\t\tvar queue = jQuery.queue( this, type, data );\n\n\t\t\t\t// ensure a hooks for this queue\n\t\t\t\tjQuery._queueHooks( this, type );\n\n\t\t\t\tif ( type === \"fx\" && queue[0] !== \"inprogress\" ) {\n\t\t\t\t\tjQuery.dequeue( this, type );\n\t\t\t\t}\n\t\t\t});\n\t},\n\tdequeue: function( type ) {\n\t\treturn this.each(function() {\n\t\t\tjQuery.dequeue( this, type );\n\t\t});\n\t},\n\t// Based off of the plugin by Clint Helfers, with permission.\n\t// http://blindsignals.com/index.php/2009/07/jquery-delay/\n\tdelay: function( time, type ) {\n\t\ttime = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;\n\t\ttype = type || \"fx\";\n\n\t\treturn this.queue( type, function( next, hooks ) {\n\t\t\tvar timeout = setTimeout( next, time );\n\t\t\thooks.stop = function() {\n\t\t\t\tclearTimeout( timeout );\n\t\t\t};\n\t\t});\n\t},\n\tclearQueue: function( type ) {\n\t\treturn this.queue( type || \"fx\", [] );\n\t},\n\t// Get a promise resolved when queues of a certain type\n\t// are emptied (fx is the type by default)\n\tpromise: function( type, obj ) {\n\t\tvar tmp,\n\t\t\tcount = 1,\n\t\t\tdefer = jQuery.Deferred(),\n\t\t\telements = this,\n\t\t\ti = this.length,\n\t\t\tresolve = function() {\n\t\t\t\tif ( !( --count ) ) {\n\t\t\t\t\tdefer.resolveWith( elements, [ elements ] );\n\t\t\t\t}\n\t\t\t};\n\n\t\tif ( typeof type !== \"string\" ) {\n\t\t\tobj = type;\n\t\t\ttype = undefined;\n\t\t}\n\t\ttype = type || \"fx\";\n\n\t\twhile( i-- ) {\n\t\t\ttmp = jQuery._data( elements[ i ], type + \"queueHooks\" );\n\t\t\tif ( tmp && tmp.empty ) {\n\t\t\t\tcount++;\n\t\t\t\ttmp.empty.add( resolve );\n\t\t\t}\n\t\t}\n\t\tresolve();\n\t\treturn defer.promise( obj );\n\t}\n});\nvar nodeHook, boolHook,\n\trclass = /[\\t\\r\\n\\f]/g,\n\trreturn = /\\r/g,\n\trfocusable = /^(?:input|select|textarea|button|object)$/i,\n\trclickable = /^(?:a|area)$/i,\n\truseDefault = /^(?:checked|selected)$/i,\n\tgetSetAttribute = jQuery.support.getSetAttribute,\n\tgetSetInput = jQuery.support.input;\n\njQuery.fn.extend({\n\tattr: function( name, value ) {\n\t\treturn jQuery.access( this, jQuery.attr, name, value, arguments.length > 1 );\n\t},\n\n\tremoveAttr: function( name ) {\n\t\treturn this.each(function() {\n\t\t\tjQuery.removeAttr( this, name );\n\t\t});\n\t},\n\n\tprop: function( name, value ) {\n\t\treturn jQuery.access( this, jQuery.prop, name, value, arguments.length > 1 );\n\t},\n\n\tremoveProp: function( name ) {\n\t\tname = jQuery.propFix[ name ] || name;\n\t\treturn this.each(function() {\n\t\t\t// try/catch handles cases where IE balks (such as removing a property on window)\n\t\t\ttry {\n\t\t\t\tthis[ name ] = undefined;\n\t\t\t\tdelete this[ name ];\n\t\t\t} catch( e ) {}\n\t\t});\n\t},\n\n\taddClass: function( value ) {\n\t\tvar classes, elem, cur, clazz, j,\n\t\t\ti = 0,\n\t\t\tlen = this.length,\n\t\t\tproceed = typeof value === \"string\" && value;\n\n\t\tif ( jQuery.isFunction( value ) ) {\n\t\t\treturn this.each(function( j ) {\n\t\t\t\tjQuery( this ).addClass( value.call( this, j, this.className ) );\n\t\t\t});\n\t\t}\n\n\t\tif ( proceed ) {\n\t\t\t// The disjunction here is for better compressibility (see removeClass)\n\t\t\tclasses = ( value || \"\" ).match( core_rnotwhite ) || [];\n\n\t\t\tfor ( ; i < len; i++ ) {\n\t\t\t\telem = this[ i ];\n\t\t\t\tcur = elem.nodeType === 1 && ( elem.className ?\n\t\t\t\t\t( \" \" + elem.className + \" \" ).replace( rclass, \" \" ) :\n\t\t\t\t\t\" \"\n\t\t\t\t);\n\n\t\t\t\tif ( cur ) {\n\t\t\t\t\tj = 0;\n\t\t\t\t\twhile ( (clazz = classes[j++]) ) {\n\t\t\t\t\t\tif ( cur.indexOf( \" \" + clazz + \" \" ) < 0 ) {\n\t\t\t\t\t\t\tcur += clazz + \" \";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telem.className = jQuery.trim( cur );\n\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t},\n\n\tremoveClass: function( value ) {\n\t\tvar classes, elem, cur, clazz, j,\n\t\t\ti = 0,\n\t\t\tlen = this.length,\n\t\t\tproceed = arguments.length === 0 || typeof value === \"string\" && value;\n\n\t\tif ( jQuery.isFunction( value ) ) {\n\t\t\treturn this.each(function( j ) {\n\t\t\t\tjQuery( this ).removeClass( value.call( this, j, this.className ) );\n\t\t\t});\n\t\t}\n\t\tif ( proceed ) {\n\t\t\tclasses = ( value || \"\" ).match( core_rnotwhite ) || [];\n\n\t\t\tfor ( ; i < len; i++ ) {\n\t\t\t\telem = this[ i ];\n\t\t\t\t// This expression is here for better compressibility (see addClass)\n\t\t\t\tcur = elem.nodeType === 1 && ( elem.className ?\n\t\t\t\t\t( \" \" + elem.className + \" \" ).replace( rclass, \" \" ) :\n\t\t\t\t\t\"\"\n\t\t\t\t);\n\n\t\t\t\tif ( cur ) {\n\t\t\t\t\tj = 0;\n\t\t\t\t\twhile ( (clazz = classes[j++]) ) {\n\t\t\t\t\t\t// Remove *all* instances\n\t\t\t\t\t\twhile ( cur.indexOf( \" \" + clazz + \" \" ) >= 0 ) {\n\t\t\t\t\t\t\tcur = cur.replace( \" \" + clazz + \" \", \" \" );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telem.className = value ? jQuery.trim( cur ) : \"\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t},\n\n\ttoggleClass: function( value, stateVal ) {\n\t\tvar type = typeof value;\n\n\t\tif ( typeof stateVal === \"boolean\" && type === \"string\" ) {\n\t\t\treturn stateVal ? this.addClass( value ) : this.removeClass( value );\n\t\t}\n\n\t\tif ( jQuery.isFunction( value ) ) {\n\t\t\treturn this.each(function( i ) {\n\t\t\t\tjQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal );\n\t\t\t});\n\t\t}\n\n\t\treturn this.each(function() {\n\t\t\tif ( type === \"string\" ) {\n\t\t\t\t// toggle individual class names\n\t\t\t\tvar className,\n\t\t\t\t\ti = 0,\n\t\t\t\t\tself = jQuery( this ),\n\t\t\t\t\tclassNames = value.match( core_rnotwhite ) || [];\n\n\t\t\t\twhile ( (className = classNames[ i++ ]) ) {\n\t\t\t\t\t// check each className given, space separated list\n\t\t\t\t\tif ( self.hasClass( className ) ) {\n\t\t\t\t\t\tself.removeClass( className );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tself.addClass( className );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t// Toggle whole class name\n\t\t\t} else if ( type === core_strundefined || type === \"boolean\" ) {\n\t\t\t\tif ( this.className ) {\n\t\t\t\t\t// store className if set\n\t\t\t\t\tjQuery._data( this, \"__className__\", this.className );\n\t\t\t\t}\n\n\t\t\t\t// If the element has a class name or if we're passed \"false\",\n\t\t\t\t// then remove the whole classname (if there was one, the above saved it).\n\t\t\t\t// Otherwise bring back whatever was previously saved (if anything),\n\t\t\t\t// falling back to the empty string if nothing was stored.\n\t\t\t\tthis.className = this.className || value === false ? \"\" : jQuery._data( this, \"__className__\" ) || \"\";\n\t\t\t}\n\t\t});\n\t},\n\n\thasClass: function( selector ) {\n\t\tvar className = \" \" + selector + \" \",\n\t\t\ti = 0,\n\t\t\tl = this.length;\n\t\tfor ( ; i < l; i++ ) {\n\t\t\tif ( this[i].nodeType === 1 && (\" \" + this[i].className + \" \").replace(rclass, \" \").indexOf( className ) >= 0 ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t},\n\n\tval: function( value ) {\n\t\tvar ret, hooks, isFunction,\n\t\t\telem = this[0];\n\n\t\tif ( !arguments.length ) {\n\t\t\tif ( elem ) {\n\t\t\t\thooks = jQuery.valHooks[ elem.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase() ];\n\n\t\t\t\tif ( hooks && \"get\" in hooks && (ret = hooks.get( elem, \"value\" )) !== undefined ) {\n\t\t\t\t\treturn ret;\n\t\t\t\t}\n\n\t\t\t\tret = elem.value;\n\n\t\t\t\treturn typeof ret === \"string\" ?\n\t\t\t\t\t// handle most common string cases\n\t\t\t\t\tret.replace(rreturn, \"\") :\n\t\t\t\t\t// handle cases where value is null/undef or number\n\t\t\t\t\tret == null ? \"\" : ret;\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\n\t\tisFunction = jQuery.isFunction( value );\n\n\t\treturn this.each(function( i ) {\n\t\t\tvar val;\n\n\t\t\tif ( this.nodeType !== 1 ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( isFunction ) {\n\t\t\t\tval = value.call( this, i, jQuery( this ).val() );\n\t\t\t} else {\n\t\t\t\tval = value;\n\t\t\t}\n\n\t\t\t// Treat null/undefined as \"\"; convert numbers to string\n\t\t\tif ( val == null ) {\n\t\t\t\tval = \"\";\n\t\t\t} else if ( typeof val === \"number\" ) {\n\t\t\t\tval += \"\";\n\t\t\t} else if ( jQuery.isArray( val ) ) {\n\t\t\t\tval = jQuery.map(val, function ( value ) {\n\t\t\t\t\treturn value == null ? \"\" : value + \"\";\n\t\t\t\t});\n\t\t\t}\n\n\t\t\thooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];\n\n\t\t\t// If set returns undefined, fall back to normal setting\n\t\t\tif ( !hooks || !(\"set\" in hooks) || hooks.set( this, val, \"value\" ) === undefined ) {\n\t\t\t\tthis.value = val;\n\t\t\t}\n\t\t});\n\t}\n});\n\njQuery.extend({\n\tvalHooks: {\n\t\toption: {\n\t\t\tget: function( elem ) {\n\t\t\t\t// Use proper attribute retrieval(#6932, #12072)\n\t\t\t\tvar val = jQuery.find.attr( elem, \"value\" );\n\t\t\t\treturn val != null ?\n\t\t\t\t\tval :\n\t\t\t\t\telem.text;\n\t\t\t}\n\t\t},\n\t\tselect: {\n\t\t\tget: function( elem ) {\n\t\t\t\tvar value, option,\n\t\t\t\t\toptions = elem.options,\n\t\t\t\t\tindex = elem.selectedIndex,\n\t\t\t\t\tone = elem.type === \"select-one\" || index < 0,\n\t\t\t\t\tvalues = one ? null : [],\n\t\t\t\t\tmax = one ? index + 1 : options.length,\n\t\t\t\t\ti = index < 0 ?\n\t\t\t\t\t\tmax :\n\t\t\t\t\t\tone ? index : 0;\n\n\t\t\t\t// Loop through all the selected options\n\t\t\t\tfor ( ; i < max; i++ ) {\n\t\t\t\t\toption = options[ i ];\n\n\t\t\t\t\t// oldIE doesn't update selected after form reset (#2551)\n\t\t\t\t\tif ( ( option.selected || i === index ) &&\n\t\t\t\t\t\t\t// Don't return options that are disabled or in a disabled optgroup\n\t\t\t\t\t\t\t( jQuery.support.optDisabled ? !option.disabled : option.getAttribute(\"disabled\") === null ) &&\n\t\t\t\t\t\t\t( !option.parentNode.disabled || !jQuery.nodeName( option.parentNode, \"optgroup\" ) ) ) {\n\n\t\t\t\t\t\t// Get the specific value for the option\n\t\t\t\t\t\tvalue = jQuery( option ).val();\n\n\t\t\t\t\t\t// We don't need an array for one selects\n\t\t\t\t\t\tif ( one ) {\n\t\t\t\t\t\t\treturn value;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Multi-Selects return an array\n\t\t\t\t\t\tvalues.push( value );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn values;\n\t\t\t},\n\n\t\t\tset: function( elem, value ) {\n\t\t\t\tvar optionSet, option,\n\t\t\t\t\toptions = elem.options,\n\t\t\t\t\tvalues = jQuery.makeArray( value ),\n\t\t\t\t\ti = options.length;\n\n\t\t\t\twhile ( i-- ) {\n\t\t\t\t\toption = options[ i ];\n\t\t\t\t\tif ( (option.selected = jQuery.inArray( jQuery(option).val(), values ) >= 0) ) {\n\t\t\t\t\t\toptionSet = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// force browsers to behave consistently when non-matching value is set\n\t\t\t\tif ( !optionSet ) {\n\t\t\t\t\telem.selectedIndex = -1;\n\t\t\t\t}\n\t\t\t\treturn values;\n\t\t\t}\n\t\t}\n\t},\n\n\tattr: function( elem, name, value ) {\n\t\tvar hooks, ret,\n\t\t\tnType = elem.nodeType;\n\n\t\t// don't get/set attributes on text, comment and attribute nodes\n\t\tif ( !elem || nType === 3 || nType === 8 || nType === 2 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Fallback to prop when attributes are not supported\n\t\tif ( typeof elem.getAttribute === core_strundefined ) {\n\t\t\treturn jQuery.prop( elem, name, value );\n\t\t}\n\n\t\t// All attributes are lowercase\n\t\t// Grab necessary hook if one is defined\n\t\tif ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {\n\t\t\tname = name.toLowerCase();\n\t\t\thooks = jQuery.attrHooks[ name ] ||\n\t\t\t\t( jQuery.expr.match.bool.test( name ) ? boolHook : nodeHook );\n\t\t}\n\n\t\tif ( value !== undefined ) {\n\n\t\t\tif ( value === null ) {\n\t\t\t\tjQuery.removeAttr( elem, name );\n\n\t\t\t} else if ( hooks && \"set\" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) {\n\t\t\t\treturn ret;\n\n\t\t\t} else {\n\t\t\t\telem.setAttribute( name, value + \"\" );\n\t\t\t\treturn value;\n\t\t\t}\n\n\t\t} else if ( hooks && \"get\" in hooks && (ret = hooks.get( elem, name )) !== null ) {\n\t\t\treturn ret;\n\n\t\t} else {\n\t\t\tret = jQuery.find.attr( elem, name );\n\n\t\t\t// Non-existent attributes return null, we normalize to undefined\n\t\t\treturn ret == null ?\n\t\t\t\tundefined :\n\t\t\t\tret;\n\t\t}\n\t},\n\n\tremoveAttr: function( elem, value ) {\n\t\tvar name, propName,\n\t\t\ti = 0,\n\t\t\tattrNames = value && value.match( core_rnotwhite );\n\n\t\tif ( attrNames && elem.nodeType === 1 ) {\n\t\t\twhile ( (name = attrNames[i++]) ) {\n\t\t\t\tpropName = jQuery.propFix[ name ] || name;\n\n\t\t\t\t// Boolean attributes get special treatment (#10870)\n\t\t\t\tif ( jQuery.expr.match.bool.test( name ) ) {\n\t\t\t\t\t// Set corresponding property to false\n\t\t\t\t\tif ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) {\n\t\t\t\t\t\telem[ propName ] = false;\n\t\t\t\t\t// Support: IE<9\n\t\t\t\t\t// Also clear defaultChecked/defaultSelected (if appropriate)\n\t\t\t\t\t} else {\n\t\t\t\t\t\telem[ jQuery.camelCase( \"default-\" + name ) ] =\n\t\t\t\t\t\t\telem[ propName ] = false;\n\t\t\t\t\t}\n\n\t\t\t\t// See #9699 for explanation of this approach (setting first, then removal)\n\t\t\t\t} else {\n\t\t\t\t\tjQuery.attr( elem, name, \"\" );\n\t\t\t\t}\n\n\t\t\t\telem.removeAttribute( getSetAttribute ? name : propName );\n\t\t\t}\n\t\t}\n\t},\n\n\tattrHooks: {\n\t\ttype: {\n\t\t\tset: function( elem, value ) {\n\t\t\t\tif ( !jQuery.support.radioValue && value === \"radio\" && jQuery.nodeName(elem, \"input\") ) {\n\t\t\t\t\t// Setting the type on a radio button after the value resets the value in IE6-9\n\t\t\t\t\t// Reset value to default in case type is set after value during creation\n\t\t\t\t\tvar val = elem.value;\n\t\t\t\t\telem.setAttribute( \"type\", value );\n\t\t\t\t\tif ( val ) {\n\t\t\t\t\t\telem.value = val;\n\t\t\t\t\t}\n\t\t\t\t\treturn value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\n\tpropFix: {\n\t\t\"for\": \"htmlFor\",\n\t\t\"class\": \"className\"\n\t},\n\n\tprop: function( elem, name, value ) {\n\t\tvar ret, hooks, notxml,\n\t\t\tnType = elem.nodeType;\n\n\t\t// don't get/set properties on text, comment and attribute nodes\n\t\tif ( !elem || nType === 3 || nType === 8 || nType === 2 ) {\n\t\t\treturn;\n\t\t}\n\n\t\tnotxml = nType !== 1 || !jQuery.isXMLDoc( elem );\n\n\t\tif ( notxml ) {\n\t\t\t// Fix name and attach hooks\n\t\t\tname = jQuery.propFix[ name ] || name;\n\t\t\thooks = jQuery.propHooks[ name ];\n\t\t}\n\n\t\tif ( value !== undefined ) {\n\t\t\treturn hooks && \"set\" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ?\n\t\t\t\tret :\n\t\t\t\t( elem[ name ] = value );\n\n\t\t} else {\n\t\t\treturn hooks && \"get\" in hooks && (ret = hooks.get( elem, name )) !== null ?\n\t\t\t\tret :\n\t\t\t\telem[ name ];\n\t\t}\n\t},\n\n\tpropHooks: {\n\t\ttabIndex: {\n\t\t\tget: function( elem ) {\n\t\t\t\t// elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set\n\t\t\t\t// http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/\n\t\t\t\t// Use proper attribute retrieval(#12072)\n\t\t\t\tvar tabindex = jQuery.find.attr( elem, \"tabindex\" );\n\n\t\t\t\treturn tabindex ?\n\t\t\t\t\tparseInt( tabindex, 10 ) :\n\t\t\t\t\trfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ?\n\t\t\t\t\t\t0 :\n\t\t\t\t\t\t-1;\n\t\t\t}\n\t\t}\n\t}\n});\n\n// Hooks for boolean attributes\nboolHook = {\n\tset: function( elem, value, name ) {\n\t\tif ( value === false ) {\n\t\t\t// Remove boolean attributes when set to false\n\t\t\tjQuery.removeAttr( elem, name );\n\t\t} else if ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) {\n\t\t\t// IE<8 needs the *property* name\n\t\t\telem.setAttribute( !getSetAttribute && jQuery.propFix[ name ] || name, name );\n\n\t\t// Use defaultChecked and defaultSelected for oldIE\n\t\t} else {\n\t\t\telem[ jQuery.camelCase( \"default-\" + name ) ] = elem[ name ] = true;\n\t\t}\n\n\t\treturn name;\n\t}\n};\njQuery.each( jQuery.expr.match.bool.source.match( /\\w+/g ), function( i, name ) {\n\tvar getter = jQuery.expr.attrHandle[ name ] || jQuery.find.attr;\n\n\tjQuery.expr.attrHandle[ name ] = getSetInput && getSetAttribute || !ruseDefault.test( name ) ?\n\t\tfunction( elem, name, isXML ) {\n\t\t\tvar fn = jQuery.expr.attrHandle[ name ],\n\t\t\t\tret = isXML ?\n\t\t\t\t\tundefined :\n\t\t\t\t\t/* jshint eqeqeq: false */\n\t\t\t\t\t(jQuery.expr.attrHandle[ name ] = undefined) !=\n\t\t\t\t\t\tgetter( elem, name, isXML ) ?\n\n\t\t\t\t\t\tname.toLowerCase() :\n\t\t\t\t\t\tnull;\n\t\t\tjQuery.expr.attrHandle[ name ] = fn;\n\t\t\treturn ret;\n\t\t} :\n\t\tfunction( elem, name, isXML ) {\n\t\t\treturn isXML ?\n\t\t\t\tundefined :\n\t\t\t\telem[ jQuery.camelCase( \"default-\" + name ) ] ?\n\t\t\t\t\tname.toLowerCase() :\n\t\t\t\t\tnull;\n\t\t};\n});\n\n// fix oldIE attroperties\nif ( !getSetInput || !getSetAttribute ) {\n\tjQuery.attrHooks.value = {\n\t\tset: function( elem, value, name ) {\n\t\t\tif ( jQuery.nodeName( elem, \"input\" ) ) {\n\t\t\t\t// Does not return so that setAttribute is also used\n\t\t\t\telem.defaultValue = value;\n\t\t\t} else {\n\t\t\t\t// Use nodeHook if defined (#1954); otherwise setAttribute is fine\n\t\t\t\treturn nodeHook && nodeHook.set( elem, value, name );\n\t\t\t}\n\t\t}\n\t};\n}\n\n// IE6/7 do not support getting/setting some attributes with get/setAttribute\nif ( !getSetAttribute ) {\n\n\t// Use this for any attribute in IE6/7\n\t// This fixes almost every IE6/7 issue\n\tnodeHook = {\n\t\tset: function( elem, value, name ) {\n\t\t\t// Set the existing or create a new attribute node\n\t\t\tvar ret = elem.getAttributeNode( name );\n\t\t\tif ( !ret ) {\n\t\t\t\telem.setAttributeNode(\n\t\t\t\t\t(ret = elem.ownerDocument.createAttribute( name ))\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tret.value = value += \"\";\n\n\t\t\t// Break association with cloned elements by also using setAttribute (#9646)\n\t\t\treturn name === \"value\" || value === elem.getAttribute( name ) ?\n\t\t\t\tvalue :\n\t\t\t\tundefined;\n\t\t}\n\t};\n\tjQuery.expr.attrHandle.id = jQuery.expr.attrHandle.name = jQuery.expr.attrHandle.coords =\n\t\t// Some attributes are constructed with empty-string values when not defined\n\t\tfunction( elem, name, isXML ) {\n\t\t\tvar ret;\n\t\t\treturn isXML ?\n\t\t\t\tundefined :\n\t\t\t\t(ret = elem.getAttributeNode( name )) && ret.value !== \"\" ?\n\t\t\t\t\tret.value :\n\t\t\t\t\tnull;\n\t\t};\n\tjQuery.valHooks.button = {\n\t\tget: function( elem, name ) {\n\t\t\tvar ret = elem.getAttributeNode( name );\n\t\t\treturn ret && ret.specified ?\n\t\t\t\tret.value :\n\t\t\t\tundefined;\n\t\t},\n\t\tset: nodeHook.set\n\t};\n\n\t// Set contenteditable to false on removals(#10429)\n\t// Setting to empty string throws an error as an invalid value\n\tjQuery.attrHooks.contenteditable = {\n\t\tset: function( elem, value, name ) {\n\t\t\tnodeHook.set( elem, value === \"\" ? false : value, name );\n\t\t}\n\t};\n\n\t// Set width and height to auto instead of 0 on empty string( Bug #8150 )\n\t// This is for removals\n\tjQuery.each([ \"width\", \"height\" ], function( i, name ) {\n\t\tjQuery.attrHooks[ name ] = {\n\t\t\tset: function( elem, value ) {\n\t\t\t\tif ( value === \"\" ) {\n\t\t\t\t\telem.setAttribute( name, \"auto\" );\n\t\t\t\t\treturn value;\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t});\n}\n\n\n// Some attributes require a special call on IE\n// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx\nif ( !jQuery.support.hrefNormalized ) {\n\t// href/src property should get the full normalized URL (#10299/#12915)\n\tjQuery.each([ \"href\", \"src\" ], function( i, name ) {\n\t\tjQuery.propHooks[ name ] = {\n\t\t\tget: function( elem ) {\n\t\t\t\treturn elem.getAttribute( name, 4 );\n\t\t\t}\n\t\t};\n\t});\n}\n\nif ( !jQuery.support.style ) {\n\tjQuery.attrHooks.style = {\n\t\tget: function( elem ) {\n\t\t\t// Return undefined in the case of empty string\n\t\t\t// Note: IE uppercases css property names, but if we were to .toLowerCase()\n\t\t\t// .cssText, that would destroy case senstitivity in URL's, like in \"background\"\n\t\t\treturn elem.style.cssText || undefined;\n\t\t},\n\t\tset: function( elem, value ) {\n\t\t\treturn ( elem.style.cssText = value + \"\" );\n\t\t}\n\t};\n}\n\n// Safari mis-reports the default selected property of an option\n// Accessing the parent's selectedIndex property fixes it\nif ( !jQuery.support.optSelected ) {\n\tjQuery.propHooks.selected = {\n\t\tget: function( elem ) {\n\t\t\tvar parent = elem.parentNode;\n\n\t\t\tif ( parent ) {\n\t\t\t\tparent.selectedIndex;\n\n\t\t\t\t// Make sure that it also works with optgroups, see #5701\n\t\t\t\tif ( parent.parentNode ) {\n\t\t\t\t\tparent.parentNode.selectedIndex;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn null;\n\t\t}\n\t};\n}\n\njQuery.each([\n\t\"tabIndex\",\n\t\"readOnly\",\n\t\"maxLength\",\n\t\"cellSpacing\",\n\t\"cellPadding\",\n\t\"rowSpan\",\n\t\"colSpan\",\n\t\"useMap\",\n\t\"frameBorder\",\n\t\"contentEditable\"\n], function() {\n\tjQuery.propFix[ this.toLowerCase() ] = this;\n});\n\n// IE6/7 call enctype encoding\nif ( !jQuery.support.enctype ) {\n\tjQuery.propFix.enctype = \"encoding\";\n}\n\n// Radios and checkboxes getter/setter\njQuery.each([ \"radio\", \"checkbox\" ], function() {\n\tjQuery.valHooks[ this ] = {\n\t\tset: function( elem, value ) {\n\t\t\tif ( jQuery.isArray( value ) ) {\n\t\t\t\treturn ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 );\n\t\t\t}\n\t\t}\n\t};\n\tif ( !jQuery.support.checkOn ) {\n\t\tjQuery.valHooks[ this ].get = function( elem ) {\n\t\t\t// Support: Webkit\n\t\t\t// \"\" is returned instead of \"on\" if a value isn't specified\n\t\t\treturn elem.getAttribute(\"value\") === null ? \"on\" : elem.value;\n\t\t};\n\t}\n});\nvar rformElems = /^(?:input|select|textarea)$/i,\n\trkeyEvent = /^key/,\n\trmouseEvent = /^(?:mouse|contextmenu)|click/,\n\trfocusMorph = /^(?:focusinfocus|focusoutblur)$/,\n\trtypenamespace = /^([^.]*)(?:\\.(.+)|)$/;\n\nfunction returnTrue() {\n\treturn true;\n}\n\nfunction returnFalse() {\n\treturn false;\n}\n\nfunction safeActiveElement() {\n\ttry {\n\t\treturn document.activeElement;\n\t} catch ( err ) { }\n}\n\n/*\n * Helper functions for managing events -- not part of the public interface.\n * Props to Dean Edwards' addEvent library for many of the ideas.\n */\njQuery.event = {\n\n\tglobal: {},\n\n\tadd: function( elem, types, handler, data, selector ) {\n\t\tvar tmp, events, t, handleObjIn,\n\t\t\tspecial, eventHandle, handleObj,\n\t\t\thandlers, type, namespaces, origType,\n\t\t\telemData = jQuery._data( elem );\n\n\t\t// Don't attach events to noData or text/comment nodes (but allow plain objects)\n\t\tif ( !elemData ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Caller can pass in an object of custom data in lieu of the handler\n\t\tif ( handler.handler ) {\n\t\t\thandleObjIn = handler;\n\t\t\thandler = handleObjIn.handler;\n\t\t\tselector = handleObjIn.selector;\n\t\t}\n\n\t\t// Make sure that the handler has a unique ID, used to find/remove it later\n\t\tif ( !handler.guid ) {\n\t\t\thandler.guid = jQuery.guid++;\n\t\t}\n\n\t\t// Init the element's event structure and main handler, if this is the first\n\t\tif ( !(events = elemData.events) ) {\n\t\t\tevents = elemData.events = {};\n\t\t}\n\t\tif ( !(eventHandle = elemData.handle) ) {\n\t\t\teventHandle = elemData.handle = function( e ) {\n\t\t\t\t// Discard the second event of a jQuery.event.trigger() and\n\t\t\t\t// when an event is called after a page has unloaded\n\t\t\t\treturn typeof jQuery !== core_strundefined && (!e || jQuery.event.triggered !== e.type) ?\n\t\t\t\t\tjQuery.event.dispatch.apply( eventHandle.elem, arguments ) :\n\t\t\t\t\tundefined;\n\t\t\t};\n\t\t\t// Add elem as a property of the handle fn to prevent a memory leak with IE non-native events\n\t\t\teventHandle.elem = elem;\n\t\t}\n\n\t\t// Handle multiple events separated by a space\n\t\ttypes = ( types || \"\" ).match( core_rnotwhite ) || [\"\"];\n\t\tt = types.length;\n\t\twhile ( t-- ) {\n\t\t\ttmp = rtypenamespace.exec( types[t] ) || [];\n\t\t\ttype = origType = tmp[1];\n\t\t\tnamespaces = ( tmp[2] || \"\" ).split( \".\" ).sort();\n\n\t\t\t// There *must* be a type, no attaching namespace-only handlers\n\t\t\tif ( !type ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// If event changes its type, use the special event handlers for the changed type\n\t\t\tspecial = jQuery.event.special[ type ] || {};\n\n\t\t\t// If selector defined, determine special event api type, otherwise given type\n\t\t\ttype = ( selector ? special.delegateType : special.bindType ) || type;\n\n\t\t\t// Update special based on newly reset type\n\t\t\tspecial = jQuery.event.special[ type ] || {};\n\n\t\t\t// handleObj is passed to all event handlers\n\t\t\thandleObj = jQuery.extend({\n\t\t\t\ttype: type,\n\t\t\t\torigType: origType,\n\t\t\t\tdata: data,\n\t\t\t\thandler: handler,\n\t\t\t\tguid: handler.guid,\n\t\t\t\tselector: selector,\n\t\t\t\tneedsContext: selector && jQuery.expr.match.needsContext.test( selector ),\n\t\t\t\tnamespace: namespaces.join(\".\")\n\t\t\t}, handleObjIn );\n\n\t\t\t// Init the event handler queue if we're the first\n\t\t\tif ( !(handlers = events[ type ]) ) {\n\t\t\t\thandlers = events[ type ] = [];\n\t\t\t\thandlers.delegateCount = 0;\n\n\t\t\t\t// Only use addEventListener/attachEvent if the special events handler returns false\n\t\t\t\tif ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) {\n\t\t\t\t\t// Bind the global event handler to the element\n\t\t\t\t\tif ( elem.addEventListener ) {\n\t\t\t\t\t\telem.addEventListener( type, eventHandle, false );\n\n\t\t\t\t\t} else if ( elem.attachEvent ) {\n\t\t\t\t\t\telem.attachEvent( \"on\" + type, eventHandle );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( special.add ) {\n\t\t\t\tspecial.add.call( elem, handleObj );\n\n\t\t\t\tif ( !handleObj.handler.guid ) {\n\t\t\t\t\thandleObj.handler.guid = handler.guid;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Add to the element's handler list, delegates in front\n\t\t\tif ( selector ) {\n\t\t\t\thandlers.splice( handlers.delegateCount++, 0, handleObj );\n\t\t\t} else {\n\t\t\t\thandlers.push( handleObj );\n\t\t\t}\n\n\t\t\t// Keep track of which events have ever been used, for event optimization\n\t\t\tjQuery.event.global[ type ] = true;\n\t\t}\n\n\t\t// Nullify elem to prevent memory leaks in IE\n\t\telem = null;\n\t},\n\n\t// Detach an event or set of events from an element\n\tremove: function( elem, types, handler, selector, mappedTypes ) {\n\t\tvar j, handleObj, tmp,\n\t\t\torigCount, t, events,\n\t\t\tspecial, handlers, type,\n\t\t\tnamespaces, origType,\n\t\t\telemData = jQuery.hasData( elem ) && jQuery._data( elem );\n\n\t\tif ( !elemData || !(events = elemData.events) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Once for each type.namespace in types; type may be omitted\n\t\ttypes = ( types || \"\" ).match( core_rnotwhite ) || [\"\"];\n\t\tt = types.length;\n\t\twhile ( t-- ) {\n\t\t\ttmp = rtypenamespace.exec( types[t] ) || [];\n\t\t\ttype = origType = tmp[1];\n\t\t\tnamespaces = ( tmp[2] || \"\" ).split( \".\" ).sort();\n\n\t\t\t// Unbind all events (on this namespace, if provided) for the element\n\t\t\tif ( !type ) {\n\t\t\t\tfor ( type in events ) {\n\t\t\t\t\tjQuery.event.remove( elem, type + types[ t ], handler, selector, true );\n\t\t\t\t}\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tspecial = jQuery.event.special[ type ] || {};\n\t\t\ttype = ( selector ? special.delegateType : special.bindType ) || type;\n\t\t\thandlers = events[ type ] || [];\n\t\t\ttmp = tmp[2] && new RegExp( \"(^|\\\\.)\" + namespaces.join(\"\\\\.(?:.*\\\\.|)\") + \"(\\\\.|$)\" );\n\n\t\t\t// Remove matching events\n\t\t\torigCount = j = handlers.length;\n\t\t\twhile ( j-- ) {\n\t\t\t\thandleObj = handlers[ j ];\n\n\t\t\t\tif ( ( mappedTypes || origType === handleObj.origType ) &&\n\t\t\t\t\t( !handler || handler.guid === handleObj.guid ) &&\n\t\t\t\t\t( !tmp || tmp.test( handleObj.namespace ) ) &&\n\t\t\t\t\t( !selector || selector === handleObj.selector || selector === \"**\" && handleObj.selector ) ) {\n\t\t\t\t\thandlers.splice( j, 1 );\n\n\t\t\t\t\tif ( handleObj.selector ) {\n\t\t\t\t\t\thandlers.delegateCount--;\n\t\t\t\t\t}\n\t\t\t\t\tif ( special.remove ) {\n\t\t\t\t\t\tspecial.remove.call( elem, handleObj );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Remove generic event handler if we removed something and no more handlers exist\n\t\t\t// (avoids potential for endless recursion during removal of special event handlers)\n\t\t\tif ( origCount && !handlers.length ) {\n\t\t\t\tif ( !special.teardown || special.teardown.call( elem, namespaces, elemData.handle ) === false ) {\n\t\t\t\t\tjQuery.removeEvent( elem, type, elemData.handle );\n\t\t\t\t}\n\n\t\t\t\tdelete events[ type ];\n\t\t\t}\n\t\t}\n\n\t\t// Remove the expando if it's no longer used\n\t\tif ( jQuery.isEmptyObject( events ) ) {\n\t\t\tdelete elemData.handle;\n\n\t\t\t// removeData also checks for emptiness and clears the expando if empty\n\t\t\t// so use it instead of delete\n\t\t\tjQuery._removeData( elem, \"events\" );\n\t\t}\n\t},\n\n\ttrigger: function( event, data, elem, onlyHandlers ) {\n\t\tvar handle, ontype, cur,\n\t\t\tbubbleType, special, tmp, i,\n\t\t\teventPath = [ elem || document ],\n\t\t\ttype = core_hasOwn.call( event, \"type\" ) ? event.type : event,\n\t\t\tnamespaces = core_hasOwn.call( event, \"namespace\" ) ? event.namespace.split(\".\") : [];\n\n\t\tcur = tmp = elem = elem || document;\n\n\t\t// Don't do events on text and comment nodes\n\t\tif ( elem.nodeType === 3 || elem.nodeType === 8 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// focus/blur morphs to focusin/out; ensure we're not firing them right now\n\t\tif ( rfocusMorph.test( type + jQuery.event.triggered ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( type.indexOf(\".\") >= 0 ) {\n\t\t\t// Namespaced trigger; create a regexp to match event type in handle()\n\t\t\tnamespaces = type.split(\".\");\n\t\t\ttype = namespaces.shift();\n\t\t\tnamespaces.sort();\n\t\t}\n\t\tontype = type.indexOf(\":\") < 0 && \"on\" + type;\n\n\t\t// Caller can pass in a jQuery.Event object, Object, or just an event type string\n\t\tevent = event[ jQuery.expando ] ?\n\t\t\tevent :\n\t\t\tnew jQuery.Event( type, typeof event === \"object\" && event );\n\n\t\t// Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true)\n\t\tevent.isTrigger = onlyHandlers ? 2 : 3;\n\t\tevent.namespace = namespaces.join(\".\");\n\t\tevent.namespace_re = event.namespace ?\n\t\t\tnew RegExp( \"(^|\\\\.)\" + namespaces.join(\"\\\\.(?:.*\\\\.|)\") + \"(\\\\.|$)\" ) :\n\t\t\tnull;\n\n\t\t// Clean up the event in case it is being reused\n\t\tevent.result = undefined;\n\t\tif ( !event.target ) {\n\t\t\tevent.target = elem;\n\t\t}\n\n\t\t// Clone any incoming data and prepend the event, creating the handler arg list\n\t\tdata = data == null ?\n\t\t\t[ event ] :\n\t\t\tjQuery.makeArray( data, [ event ] );\n\n\t\t// Allow special events to draw outside the lines\n\t\tspecial = jQuery.event.special[ type ] || {};\n\t\tif ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Determine event propagation path in advance, per W3C events spec (#9951)\n\t\t// Bubble up to document, then to window; watch for a global ownerDocument var (#9724)\n\t\tif ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) {\n\n\t\t\tbubbleType = special.delegateType || type;\n\t\t\tif ( !rfocusMorph.test( bubbleType + type ) ) {\n\t\t\t\tcur = cur.parentNode;\n\t\t\t}\n\t\t\tfor ( ; cur; cur = cur.parentNode ) {\n\t\t\t\teventPath.push( cur );\n\t\t\t\ttmp = cur;\n\t\t\t}\n\n\t\t\t// Only add window if we got to document (e.g., not plain obj or detached DOM)\n\t\t\tif ( tmp === (elem.ownerDocument || document) ) {\n\t\t\t\teventPath.push( tmp.defaultView || tmp.parentWindow || window );\n\t\t\t}\n\t\t}\n\n\t\t// Fire handlers on the event path\n\t\ti = 0;\n\t\twhile ( (cur = eventPath[i++]) && !event.isPropagationStopped() ) {\n\n\t\t\tevent.type = i > 1 ?\n\t\t\t\tbubbleType :\n\t\t\t\tspecial.bindType || type;\n\n\t\t\t// jQuery handler\n\t\t\thandle = ( jQuery._data( cur, \"events\" ) || {} )[ event.type ] && jQuery._data( cur, \"handle\" );\n\t\t\tif ( handle ) {\n\t\t\t\thandle.apply( cur, data );\n\t\t\t}\n\n\t\t\t// Native handler\n\t\t\thandle = ontype && cur[ ontype ];\n\t\t\tif ( handle && jQuery.acceptData( cur ) && handle.apply && handle.apply( cur, data ) === false ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t}\n\t\t}\n\t\tevent.type = type;\n\n\t\t// If nobody prevented the default action, do it now\n\t\tif ( !onlyHandlers && !event.isDefaultPrevented() ) {\n\n\t\t\tif ( (!special._default || special._default.apply( eventPath.pop(), data ) === false) &&\n\t\t\t\tjQuery.acceptData( elem ) ) {\n\n\t\t\t\t// Call a native DOM method on the target with the same name name as the event.\n\t\t\t\t// Can't use an .isFunction() check here because IE6/7 fails that test.\n\t\t\t\t// Don't do default actions on window, that's where global variables be (#6170)\n\t\t\t\tif ( ontype && elem[ type ] && !jQuery.isWindow( elem ) ) {\n\n\t\t\t\t\t// Don't re-trigger an onFOO event when we call its FOO() method\n\t\t\t\t\ttmp = elem[ ontype ];\n\n\t\t\t\t\tif ( tmp ) {\n\t\t\t\t\t\telem[ ontype ] = null;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Prevent re-triggering of the same event, since we already bubbled it above\n\t\t\t\t\tjQuery.event.triggered = type;\n\t\t\t\t\ttry {\n\t\t\t\t\t\telem[ type ]();\n\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t// IE<9 dies on focus/blur to hidden element (#1486,#12518)\n\t\t\t\t\t\t// only reproducible on winXP IE8 native, not IE9 in IE8 mode\n\t\t\t\t\t}\n\t\t\t\t\tjQuery.event.triggered = undefined;\n\n\t\t\t\t\tif ( tmp ) {\n\t\t\t\t\t\telem[ ontype ] = tmp;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn event.result;\n\t},\n\n\tdispatch: function( event ) {\n\n\t\t// Make a writable jQuery.Event from the native event object\n\t\tevent = jQuery.event.fix( event );\n\n\t\tvar i, ret, handleObj, matched, j,\n\t\t\thandlerQueue = [],\n\t\t\targs = core_slice.call( arguments ),\n\t\t\thandlers = ( jQuery._data( this, \"events\" ) || {} )[ event.type ] || [],\n\t\t\tspecial = jQuery.event.special[ event.type ] || {};\n\n\t\t// Use the fix-ed jQuery.Event rather than the (read-only) native event\n\t\targs[0] = event;\n\t\tevent.delegateTarget = this;\n\n\t\t// Call the preDispatch hook for the mapped type, and let it bail if desired\n\t\tif ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Determine handlers\n\t\thandlerQueue = jQuery.event.handlers.call( this, event, handlers );\n\n\t\t// Run delegates first; they may want to stop propagation beneath us\n\t\ti = 0;\n\t\twhile ( (matched = handlerQueue[ i++ ]) && !event.isPropagationStopped() ) {\n\t\t\tevent.currentTarget = matched.elem;\n\n\t\t\tj = 0;\n\t\t\twhile ( (handleObj = matched.handlers[ j++ ]) && !event.isImmediatePropagationStopped() ) {\n\n\t\t\t\t// Triggered event must either 1) have no namespace, or\n\t\t\t\t// 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace).\n\t\t\t\tif ( !event.namespace_re || event.namespace_re.test( handleObj.namespace ) ) {\n\n\t\t\t\t\tevent.handleObj = handleObj;\n\t\t\t\t\tevent.data = handleObj.data;\n\n\t\t\t\t\tret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler )\n\t\t\t\t\t\t\t.apply( matched.elem, args );\n\n\t\t\t\t\tif ( ret !== undefined ) {\n\t\t\t\t\t\tif ( (event.result = ret) === false ) {\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Call the postDispatch hook for the mapped type\n\t\tif ( special.postDispatch ) {\n\t\t\tspecial.postDispatch.call( this, event );\n\t\t}\n\n\t\treturn event.result;\n\t},\n\n\thandlers: function( event, handlers ) {\n\t\tvar sel, handleObj, matches, i,\n\t\t\thandlerQueue = [],\n\t\t\tdelegateCount = handlers.delegateCount,\n\t\t\tcur = event.target;\n\n\t\t// Find delegate handlers\n\t\t// Black-hole SVG <use> instance trees (#13180)\n\t\t// Avoid non-left-click bubbling in Firefox (#3861)\n\t\tif ( delegateCount && cur.nodeType && (!event.button || event.type !== \"click\") ) {\n\n\t\t\t/* jshint eqeqeq: false */\n\t\t\tfor ( ; cur != this; cur = cur.parentNode || this ) {\n\t\t\t\t/* jshint eqeqeq: true */\n\n\t\t\t\t// Don't check non-elements (#13208)\n\t\t\t\t// Don't process clicks on disabled elements (#6911, #8165, #11382, #11764)\n\t\t\t\tif ( cur.nodeType === 1 && (cur.disabled !== true || event.type !== \"click\") ) {\n\t\t\t\t\tmatches = [];\n\t\t\t\t\tfor ( i = 0; i < delegateCount; i++ ) {\n\t\t\t\t\t\thandleObj = handlers[ i ];\n\n\t\t\t\t\t\t// Don't conflict with Object.prototype properties (#13203)\n\t\t\t\t\t\tsel = handleObj.selector + \" \";\n\n\t\t\t\t\t\tif ( matches[ sel ] === undefined ) {\n\t\t\t\t\t\t\tmatches[ sel ] = handleObj.needsContext ?\n\t\t\t\t\t\t\t\tjQuery( sel, this ).index( cur ) >= 0 :\n\t\t\t\t\t\t\t\tjQuery.find( sel, this, null, [ cur ] ).length;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ( matches[ sel ] ) {\n\t\t\t\t\t\t\tmatches.push( handleObj );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif ( matches.length ) {\n\t\t\t\t\t\thandlerQueue.push({ elem: cur, handlers: matches });\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Add the remaining (directly-bound) handlers\n\t\tif ( delegateCount < handlers.length ) {\n\t\t\thandlerQueue.push({ elem: this, handlers: handlers.slice( delegateCount ) });\n\t\t}\n\n\t\treturn handlerQueue;\n\t},\n\n\tfix: function( event ) {\n\t\tif ( event[ jQuery.expando ] ) {\n\t\t\treturn event;\n\t\t}\n\n\t\t// Create a writable copy of the event object and normalize some properties\n\t\tvar i, prop, copy,\n\t\t\ttype = event.type,\n\t\t\toriginalEvent = event,\n\t\t\tfixHook = this.fixHooks[ type ];\n\n\t\tif ( !fixHook ) {\n\t\t\tthis.fixHooks[ type ] = fixHook =\n\t\t\t\trmouseEvent.test( type ) ? this.mouseHooks :\n\t\t\t\trkeyEvent.test( type ) ? this.keyHooks :\n\t\t\t\t{};\n\t\t}\n\t\tcopy = fixHook.props ? this.props.concat( fixHook.props ) : this.props;\n\n\t\tevent = new jQuery.Event( originalEvent );\n\n\t\ti = copy.length;\n\t\twhile ( i-- ) {\n\t\t\tprop = copy[ i ];\n\t\t\tevent[ prop ] = originalEvent[ prop ];\n\t\t}\n\n\t\t// Support: IE<9\n\t\t// Fix target property (#1925)\n\t\tif ( !event.target ) {\n\t\t\tevent.target = originalEvent.srcElement || document;\n\t\t}\n\n\t\t// Support: Chrome 23+, Safari?\n\t\t// Target should not be a text node (#504, #13143)\n\t\tif ( event.target.nodeType === 3 ) {\n\t\t\tevent.target = event.target.parentNode;\n\t\t}\n\n\t\t// Support: IE<9\n\t\t// For mouse/key events, metaKey==false if it's undefined (#3368, #11328)\n\t\tevent.metaKey = !!event.metaKey;\n\n\t\treturn fixHook.filter ? fixHook.filter( event, originalEvent ) : event;\n\t},\n\n\t// Includes some event props shared by KeyEvent and MouseEvent\n\tprops: \"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which\".split(\" \"),\n\n\tfixHooks: {},\n\n\tkeyHooks: {\n\t\tprops: \"char charCode key keyCode\".split(\" \"),\n\t\tfilter: function( event, original ) {\n\n\t\t\t// Add which for key events\n\t\t\tif ( event.which == null ) {\n\t\t\t\tevent.which = original.charCode != null ? original.charCode : original.keyCode;\n\t\t\t}\n\n\t\t\treturn event;\n\t\t}\n\t},\n\n\tmouseHooks: {\n\t\tprops: \"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement\".split(\" \"),\n\t\tfilter: function( event, original ) {\n\t\t\tvar body, eventDoc, doc,\n\t\t\t\tbutton = original.button,\n\t\t\t\tfromElement = original.fromElement;\n\n\t\t\t// Calculate pageX/Y if missing and clientX/Y available\n\t\t\tif ( event.pageX == null && original.clientX != null ) {\n\t\t\t\teventDoc = event.target.ownerDocument || document;\n\t\t\t\tdoc = eventDoc.documentElement;\n\t\t\t\tbody = eventDoc.body;\n\n\t\t\t\tevent.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 );\n\t\t\t\tevent.pageY = original.clientY + ( doc && doc.scrollTop  || body && body.scrollTop  || 0 ) - ( doc && doc.clientTop  || body && body.clientTop  || 0 );\n\t\t\t}\n\n\t\t\t// Add relatedTarget, if necessary\n\t\t\tif ( !event.relatedTarget && fromElement ) {\n\t\t\t\tevent.relatedTarget = fromElement === event.target ? original.toElement : fromElement;\n\t\t\t}\n\n\t\t\t// Add which for click: 1 === left; 2 === middle; 3 === right\n\t\t\t// Note: button is not normalized, so don't use it\n\t\t\tif ( !event.which && button !== undefined ) {\n\t\t\t\tevent.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) );\n\t\t\t}\n\n\t\t\treturn event;\n\t\t}\n\t},\n\n\tspecial: {\n\t\tload: {\n\t\t\t// Prevent triggered image.load events from bubbling to window.load\n\t\t\tnoBubble: true\n\t\t},\n\t\tfocus: {\n\t\t\t// Fire native event if possible so blur/focus sequence is correct\n\t\t\ttrigger: function() {\n\t\t\t\tif ( this !== safeActiveElement() && this.focus ) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tthis.focus();\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t// Support: IE<9\n\t\t\t\t\t\t// If we error on focus to hidden element (#1486, #12518),\n\t\t\t\t\t\t// let .trigger() run the handlers\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\tdelegateType: \"focusin\"\n\t\t},\n\t\tblur: {\n\t\t\ttrigger: function() {\n\t\t\t\tif ( this === safeActiveElement() && this.blur ) {\n\t\t\t\t\tthis.blur();\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t},\n\t\t\tdelegateType: \"focusout\"\n\t\t},\n\t\tclick: {\n\t\t\t// For checkbox, fire native event so checked state will be right\n\t\t\ttrigger: function() {\n\t\t\t\tif ( jQuery.nodeName( this, \"input\" ) && this.type === \"checkbox\" && this.click ) {\n\t\t\t\t\tthis.click();\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t},\n\n\t\t\t// For cross-browser consistency, don't fire native .click() on links\n\t\t\t_default: function( event ) {\n\t\t\t\treturn jQuery.nodeName( event.target, \"a\" );\n\t\t\t}\n\t\t},\n\n\t\tbeforeunload: {\n\t\t\tpostDispatch: function( event ) {\n\n\t\t\t\t// Even when returnValue equals to undefined Firefox will still show alert\n\t\t\t\tif ( event.result !== undefined ) {\n\t\t\t\t\tevent.originalEvent.returnValue = event.result;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\n\tsimulate: function( type, elem, event, bubble ) {\n\t\t// Piggyback on a donor event to simulate a different one.\n\t\t// Fake originalEvent to avoid donor's stopPropagation, but if the\n\t\t// simulated event prevents default then we do the same on the donor.\n\t\tvar e = jQuery.extend(\n\t\t\tnew jQuery.Event(),\n\t\t\tevent,\n\t\t\t{\n\t\t\t\ttype: type,\n\t\t\t\tisSimulated: true,\n\t\t\t\toriginalEvent: {}\n\t\t\t}\n\t\t);\n\t\tif ( bubble ) {\n\t\t\tjQuery.event.trigger( e, null, elem );\n\t\t} else {\n\t\t\tjQuery.event.dispatch.call( elem, e );\n\t\t}\n\t\tif ( e.isDefaultPrevented() ) {\n\t\t\tevent.preventDefault();\n\t\t}\n\t}\n};\n\njQuery.removeEvent = document.removeEventListener ?\n\tfunction( elem, type, handle ) {\n\t\tif ( elem.removeEventListener ) {\n\t\t\telem.removeEventListener( type, handle, false );\n\t\t}\n\t} :\n\tfunction( elem, type, handle ) {\n\t\tvar name = \"on\" + type;\n\n\t\tif ( elem.detachEvent ) {\n\n\t\t\t// #8545, #7054, preventing memory leaks for custom events in IE6-8\n\t\t\t// detachEvent needed property on element, by name of that event, to properly expose it to GC\n\t\t\tif ( typeof elem[ name ] === core_strundefined ) {\n\t\t\t\telem[ name ] = null;\n\t\t\t}\n\n\t\t\telem.detachEvent( name, handle );\n\t\t}\n\t};\n\njQuery.Event = function( src, props ) {\n\t// Allow instantiation without the 'new' keyword\n\tif ( !(this instanceof jQuery.Event) ) {\n\t\treturn new jQuery.Event( src, props );\n\t}\n\n\t// Event object\n\tif ( src && src.type ) {\n\t\tthis.originalEvent = src;\n\t\tthis.type = src.type;\n\n\t\t// Events bubbling up the document may have been marked as prevented\n\t\t// by a handler lower down the tree; reflect the correct value.\n\t\tthis.isDefaultPrevented = ( src.defaultPrevented || src.returnValue === false ||\n\t\t\tsrc.getPreventDefault && src.getPreventDefault() ) ? returnTrue : returnFalse;\n\n\t// Event type\n\t} else {\n\t\tthis.type = src;\n\t}\n\n\t// Put explicitly provided properties onto the event object\n\tif ( props ) {\n\t\tjQuery.extend( this, props );\n\t}\n\n\t// Create a timestamp if incoming event doesn't have one\n\tthis.timeStamp = src && src.timeStamp || jQuery.now();\n\n\t// Mark it as fixed\n\tthis[ jQuery.expando ] = true;\n};\n\n// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding\n// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html\njQuery.Event.prototype = {\n\tisDefaultPrevented: returnFalse,\n\tisPropagationStopped: returnFalse,\n\tisImmediatePropagationStopped: returnFalse,\n\n\tpreventDefault: function() {\n\t\tvar e = this.originalEvent;\n\n\t\tthis.isDefaultPrevented = returnTrue;\n\t\tif ( !e ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// If preventDefault exists, run it on the original event\n\t\tif ( e.preventDefault ) {\n\t\t\te.preventDefault();\n\n\t\t// Support: IE\n\t\t// Otherwise set the returnValue property of the original event to false\n\t\t} else {\n\t\t\te.returnValue = false;\n\t\t}\n\t},\n\tstopPropagation: function() {\n\t\tvar e = this.originalEvent;\n\n\t\tthis.isPropagationStopped = returnTrue;\n\t\tif ( !e ) {\n\t\t\treturn;\n\t\t}\n\t\t// If stopPropagation exists, run it on the original event\n\t\tif ( e.stopPropagation ) {\n\t\t\te.stopPropagation();\n\t\t}\n\n\t\t// Support: IE\n\t\t// Set the cancelBubble property of the original event to true\n\t\te.cancelBubble = true;\n\t},\n\tstopImmediatePropagation: function() {\n\t\tthis.isImmediatePropagationStopped = returnTrue;\n\t\tthis.stopPropagation();\n\t}\n};\n\n// Create mouseenter/leave events using mouseover/out and event-time checks\njQuery.each({\n\tmouseenter: \"mouseover\",\n\tmouseleave: \"mouseout\"\n}, function( orig, fix ) {\n\tjQuery.event.special[ orig ] = {\n\t\tdelegateType: fix,\n\t\tbindType: fix,\n\n\t\thandle: function( event ) {\n\t\t\tvar ret,\n\t\t\t\ttarget = this,\n\t\t\t\trelated = event.relatedTarget,\n\t\t\t\thandleObj = event.handleObj;\n\n\t\t\t// For mousenter/leave call the handler if related is outside the target.\n\t\t\t// NB: No relatedTarget if the mouse left/entered the browser window\n\t\t\tif ( !related || (related !== target && !jQuery.contains( target, related )) ) {\n\t\t\t\tevent.type = handleObj.origType;\n\t\t\t\tret = handleObj.handler.apply( this, arguments );\n\t\t\t\tevent.type = fix;\n\t\t\t}\n\t\t\treturn ret;\n\t\t}\n\t};\n});\n\n// IE submit delegation\nif ( !jQuery.support.submitBubbles ) {\n\n\tjQuery.event.special.submit = {\n\t\tsetup: function() {\n\t\t\t// Only need this for delegated form submit events\n\t\t\tif ( jQuery.nodeName( this, \"form\" ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// Lazy-add a submit handler when a descendant form may potentially be submitted\n\t\t\tjQuery.event.add( this, \"click._submit keypress._submit\", function( e ) {\n\t\t\t\t// Node name check avoids a VML-related crash in IE (#9807)\n\t\t\t\tvar elem = e.target,\n\t\t\t\t\tform = jQuery.nodeName( elem, \"input\" ) || jQuery.nodeName( elem, \"button\" ) ? elem.form : undefined;\n\t\t\t\tif ( form && !jQuery._data( form, \"submitBubbles\" ) ) {\n\t\t\t\t\tjQuery.event.add( form, \"submit._submit\", function( event ) {\n\t\t\t\t\t\tevent._submit_bubble = true;\n\t\t\t\t\t});\n\t\t\t\t\tjQuery._data( form, \"submitBubbles\", true );\n\t\t\t\t}\n\t\t\t});\n\t\t\t// return undefined since we don't need an event listener\n\t\t},\n\n\t\tpostDispatch: function( event ) {\n\t\t\t// If form was submitted by the user, bubble the event up the tree\n\t\t\tif ( event._submit_bubble ) {\n\t\t\t\tdelete event._submit_bubble;\n\t\t\t\tif ( this.parentNode && !event.isTrigger ) {\n\t\t\t\t\tjQuery.event.simulate( \"submit\", this.parentNode, event, true );\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\tteardown: function() {\n\t\t\t// Only need this for delegated form submit events\n\t\t\tif ( jQuery.nodeName( this, \"form\" ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// Remove delegated handlers; cleanData eventually reaps submit handlers attached above\n\t\t\tjQuery.event.remove( this, \"._submit\" );\n\t\t}\n\t};\n}\n\n// IE change delegation and checkbox/radio fix\nif ( !jQuery.support.changeBubbles ) {\n\n\tjQuery.event.special.change = {\n\n\t\tsetup: function() {\n\n\t\t\tif ( rformElems.test( this.nodeName ) ) {\n\t\t\t\t// IE doesn't fire change on a check/radio until blur; trigger it on click\n\t\t\t\t// after a propertychange. Eat the blur-change in special.change.handle.\n\t\t\t\t// This still fires onchange a second time for check/radio after blur.\n\t\t\t\tif ( this.type === \"checkbox\" || this.type === \"radio\" ) {\n\t\t\t\t\tjQuery.event.add( this, \"propertychange._change\", function( event ) {\n\t\t\t\t\t\tif ( event.originalEvent.propertyName === \"checked\" ) {\n\t\t\t\t\t\t\tthis._just_changed = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\tjQuery.event.add( this, \"click._change\", function( event ) {\n\t\t\t\t\t\tif ( this._just_changed && !event.isTrigger ) {\n\t\t\t\t\t\t\tthis._just_changed = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Allow triggered, simulated change events (#11500)\n\t\t\t\t\t\tjQuery.event.simulate( \"change\", this, event, true );\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t// Delegated event; lazy-add a change handler on descendant inputs\n\t\t\tjQuery.event.add( this, \"beforeactivate._change\", function( e ) {\n\t\t\t\tvar elem = e.target;\n\n\t\t\t\tif ( rformElems.test( elem.nodeName ) && !jQuery._data( elem, \"changeBubbles\" ) ) {\n\t\t\t\t\tjQuery.event.add( elem, \"change._change\", function( event ) {\n\t\t\t\t\t\tif ( this.parentNode && !event.isSimulated && !event.isTrigger ) {\n\t\t\t\t\t\t\tjQuery.event.simulate( \"change\", this.parentNode, event, true );\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\tjQuery._data( elem, \"changeBubbles\", true );\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\n\t\thandle: function( event ) {\n\t\t\tvar elem = event.target;\n\n\t\t\t// Swallow native change events from checkbox/radio, we already triggered them above\n\t\t\tif ( this !== elem || event.isSimulated || event.isTrigger || (elem.type !== \"radio\" && elem.type !== \"checkbox\") ) {\n\t\t\t\treturn event.handleObj.handler.apply( this, arguments );\n\t\t\t}\n\t\t},\n\n\t\tteardown: function() {\n\t\t\tjQuery.event.remove( this, \"._change\" );\n\n\t\t\treturn !rformElems.test( this.nodeName );\n\t\t}\n\t};\n}\n\n// Create \"bubbling\" focus and blur events\nif ( !jQuery.support.focusinBubbles ) {\n\tjQuery.each({ focus: \"focusin\", blur: \"focusout\" }, function( orig, fix ) {\n\n\t\t// Attach a single capturing handler while someone wants focusin/focusout\n\t\tvar attaches = 0,\n\t\t\thandler = function( event ) {\n\t\t\t\tjQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true );\n\t\t\t};\n\n\t\tjQuery.event.special[ fix ] = {\n\t\t\tsetup: function() {\n\t\t\t\tif ( attaches++ === 0 ) {\n\t\t\t\t\tdocument.addEventListener( orig, handler, true );\n\t\t\t\t}\n\t\t\t},\n\t\t\tteardown: function() {\n\t\t\t\tif ( --attaches === 0 ) {\n\t\t\t\t\tdocument.removeEventListener( orig, handler, true );\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t});\n}\n\njQuery.fn.extend({\n\n\ton: function( types, selector, data, fn, /*INTERNAL*/ one ) {\n\t\tvar type, origFn;\n\n\t\t// Types can be a map of types/handlers\n\t\tif ( typeof types === \"object\" ) {\n\t\t\t// ( types-Object, selector, data )\n\t\t\tif ( typeof selector !== \"string\" ) {\n\t\t\t\t// ( types-Object, data )\n\t\t\t\tdata = data || selector;\n\t\t\t\tselector = undefined;\n\t\t\t}\n\t\t\tfor ( type in types ) {\n\t\t\t\tthis.on( type, selector, data, types[ type ], one );\n\t\t\t}\n\t\t\treturn this;\n\t\t}\n\n\t\tif ( data == null && fn == null ) {\n\t\t\t// ( types, fn )\n\t\t\tfn = selector;\n\t\t\tdata = selector = undefined;\n\t\t} else if ( fn == null ) {\n\t\t\tif ( typeof selector === \"string\" ) {\n\t\t\t\t// ( types, selector, fn )\n\t\t\t\tfn = data;\n\t\t\t\tdata = undefined;\n\t\t\t} else {\n\t\t\t\t// ( types, data, fn )\n\t\t\t\tfn = data;\n\t\t\t\tdata = selector;\n\t\t\t\tselector = undefined;\n\t\t\t}\n\t\t}\n\t\tif ( fn === false ) {\n\t\t\tfn = returnFalse;\n\t\t} else if ( !fn ) {\n\t\t\treturn this;\n\t\t}\n\n\t\tif ( one === 1 ) {\n\t\t\torigFn = fn;\n\t\t\tfn = function( event ) {\n\t\t\t\t// Can use an empty set, since event contains the info\n\t\t\t\tjQuery().off( event );\n\t\t\t\treturn origFn.apply( this, arguments );\n\t\t\t};\n\t\t\t// Use same guid so caller can remove using origFn\n\t\t\tfn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );\n\t\t}\n\t\treturn this.each( function() {\n\t\t\tjQuery.event.add( this, types, fn, data, selector );\n\t\t});\n\t},\n\tone: function( types, selector, data, fn ) {\n\t\treturn this.on( types, selector, data, fn, 1 );\n\t},\n\toff: function( types, selector, fn ) {\n\t\tvar handleObj, type;\n\t\tif ( types && types.preventDefault && types.handleObj ) {\n\t\t\t// ( event )  dispatched jQuery.Event\n\t\t\thandleObj = types.handleObj;\n\t\t\tjQuery( types.delegateTarget ).off(\n\t\t\t\thandleObj.namespace ? handleObj.origType + \".\" + handleObj.namespace : handleObj.origType,\n\t\t\t\thandleObj.selector,\n\t\t\t\thandleObj.handler\n\t\t\t);\n\t\t\treturn this;\n\t\t}\n\t\tif ( typeof types === \"object\" ) {\n\t\t\t// ( types-object [, selector] )\n\t\t\tfor ( type in types ) {\n\t\t\t\tthis.off( type, selector, types[ type ] );\n\t\t\t}\n\t\t\treturn this;\n\t\t}\n\t\tif ( selector === false || typeof selector === \"function\" ) {\n\t\t\t// ( types [, fn] )\n\t\t\tfn = selector;\n\t\t\tselector = undefined;\n\t\t}\n\t\tif ( fn === false ) {\n\t\t\tfn = returnFalse;\n\t\t}\n\t\treturn this.each(function() {\n\t\t\tjQuery.event.remove( this, types, fn, selector );\n\t\t});\n\t},\n\n\ttrigger: function( type, data ) {\n\t\treturn this.each(function() {\n\t\t\tjQuery.event.trigger( type, data, this );\n\t\t});\n\t},\n\ttriggerHandler: function( type, data ) {\n\t\tvar elem = this[0];\n\t\tif ( elem ) {\n\t\t\treturn jQuery.event.trigger( type, data, elem, true );\n\t\t}\n\t}\n});\nvar isSimple = /^.[^:#\\[\\.,]*$/,\n\trparentsprev = /^(?:parents|prev(?:Until|All))/,\n\trneedsContext = jQuery.expr.match.needsContext,\n\t// methods guaranteed to produce a unique set when starting from a unique set\n\tguaranteedUnique = {\n\t\tchildren: true,\n\t\tcontents: true,\n\t\tnext: true,\n\t\tprev: true\n\t};\n\njQuery.fn.extend({\n\tfind: function( selector ) {\n\t\tvar i,\n\t\t\tret = [],\n\t\t\tself = this,\n\t\t\tlen = self.length;\n\n\t\tif ( typeof selector !== \"string\" ) {\n\t\t\treturn this.pushStack( jQuery( selector ).filter(function() {\n\t\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\t\tif ( jQuery.contains( self[ i ], this ) ) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}) );\n\t\t}\n\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tjQuery.find( selector, self[ i ], ret );\n\t\t}\n\n\t\t// Needed because $( selector, context ) becomes $( context ).find( selector )\n\t\tret = this.pushStack( len > 1 ? jQuery.unique( ret ) : ret );\n\t\tret.selector = this.selector ? this.selector + \" \" + selector : selector;\n\t\treturn ret;\n\t},\n\n\thas: function( target ) {\n\t\tvar i,\n\t\t\ttargets = jQuery( target, this ),\n\t\t\tlen = targets.length;\n\n\t\treturn this.filter(function() {\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tif ( jQuery.contains( this, targets[i] ) ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t},\n\n\tnot: function( selector ) {\n\t\treturn this.pushStack( winnow(this, selector || [], true) );\n\t},\n\n\tfilter: function( selector ) {\n\t\treturn this.pushStack( winnow(this, selector || [], false) );\n\t},\n\n\tis: function( selector ) {\n\t\treturn !!winnow(\n\t\t\tthis,\n\n\t\t\t// If this is a positional/relative selector, check membership in the returned set\n\t\t\t// so $(\"p:first\").is(\"p:last\") won't return true for a doc with two \"p\".\n\t\t\ttypeof selector === \"string\" && rneedsContext.test( selector ) ?\n\t\t\t\tjQuery( selector ) :\n\t\t\t\tselector || [],\n\t\t\tfalse\n\t\t).length;\n\t},\n\n\tclosest: function( selectors, context ) {\n\t\tvar cur,\n\t\t\ti = 0,\n\t\t\tl = this.length,\n\t\t\tret = [],\n\t\t\tpos = rneedsContext.test( selectors ) || typeof selectors !== \"string\" ?\n\t\t\t\tjQuery( selectors, context || this.context ) :\n\t\t\t\t0;\n\n\t\tfor ( ; i < l; i++ ) {\n\t\t\tfor ( cur = this[i]; cur && cur !== context; cur = cur.parentNode ) {\n\t\t\t\t// Always skip document fragments\n\t\t\t\tif ( cur.nodeType < 11 && (pos ?\n\t\t\t\t\tpos.index(cur) > -1 :\n\n\t\t\t\t\t// Don't pass non-elements to Sizzle\n\t\t\t\t\tcur.nodeType === 1 &&\n\t\t\t\t\t\tjQuery.find.matchesSelector(cur, selectors)) ) {\n\n\t\t\t\t\tcur = ret.push( cur );\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn this.pushStack( ret.length > 1 ? jQuery.unique( ret ) : ret );\n\t},\n\n\t// Determine the position of an element within\n\t// the matched set of elements\n\tindex: function( elem ) {\n\n\t\t// No argument, return index in parent\n\t\tif ( !elem ) {\n\t\t\treturn ( this[0] && this[0].parentNode ) ? this.first().prevAll().length : -1;\n\t\t}\n\n\t\t// index in selector\n\t\tif ( typeof elem === \"string\" ) {\n\t\t\treturn jQuery.inArray( this[0], jQuery( elem ) );\n\t\t}\n\n\t\t// Locate the position of the desired element\n\t\treturn jQuery.inArray(\n\t\t\t// If it receives a jQuery object, the first element is used\n\t\t\telem.jquery ? elem[0] : elem, this );\n\t},\n\n\tadd: function( selector, context ) {\n\t\tvar set = typeof selector === \"string\" ?\n\t\t\t\tjQuery( selector, context ) :\n\t\t\t\tjQuery.makeArray( selector && selector.nodeType ? [ selector ] : selector ),\n\t\t\tall = jQuery.merge( this.get(), set );\n\n\t\treturn this.pushStack( jQuery.unique(all) );\n\t},\n\n\taddBack: function( selector ) {\n\t\treturn this.add( selector == null ?\n\t\t\tthis.prevObject : this.prevObject.filter(selector)\n\t\t);\n\t}\n});\n\nfunction sibling( cur, dir ) {\n\tdo {\n\t\tcur = cur[ dir ];\n\t} while ( cur && cur.nodeType !== 1 );\n\n\treturn cur;\n}\n\njQuery.each({\n\tparent: function( elem ) {\n\t\tvar parent = elem.parentNode;\n\t\treturn parent && parent.nodeType !== 11 ? parent : null;\n\t},\n\tparents: function( elem ) {\n\t\treturn jQuery.dir( elem, \"parentNode\" );\n\t},\n\tparentsUntil: function( elem, i, until ) {\n\t\treturn jQuery.dir( elem, \"parentNode\", until );\n\t},\n\tnext: function( elem ) {\n\t\treturn sibling( elem, \"nextSibling\" );\n\t},\n\tprev: function( elem ) {\n\t\treturn sibling( elem, \"previousSibling\" );\n\t},\n\tnextAll: function( elem ) {\n\t\treturn jQuery.dir( elem, \"nextSibling\" );\n\t},\n\tprevAll: function( elem ) {\n\t\treturn jQuery.dir( elem, \"previousSibling\" );\n\t},\n\tnextUntil: function( elem, i, until ) {\n\t\treturn jQuery.dir( elem, \"nextSibling\", until );\n\t},\n\tprevUntil: function( elem, i, until ) {\n\t\treturn jQuery.dir( elem, \"previousSibling\", until );\n\t},\n\tsiblings: function( elem ) {\n\t\treturn jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem );\n\t},\n\tchildren: function( elem ) {\n\t\treturn jQuery.sibling( elem.firstChild );\n\t},\n\tcontents: function( elem ) {\n\t\treturn jQuery.nodeName( elem, \"iframe\" ) ?\n\t\t\telem.contentDocument || elem.contentWindow.document :\n\t\t\tjQuery.merge( [], elem.childNodes );\n\t}\n}, function( name, fn ) {\n\tjQuery.fn[ name ] = function( until, selector ) {\n\t\tvar ret = jQuery.map( this, fn, until );\n\n\t\tif ( name.slice( -5 ) !== \"Until\" ) {\n\t\t\tselector = until;\n\t\t}\n\n\t\tif ( selector && typeof selector === \"string\" ) {\n\t\t\tret = jQuery.filter( selector, ret );\n\t\t}\n\n\t\tif ( this.length > 1 ) {\n\t\t\t// Remove duplicates\n\t\t\tif ( !guaranteedUnique[ name ] ) {\n\t\t\t\tret = jQuery.unique( ret );\n\t\t\t}\n\n\t\t\t// Reverse order for parents* and prev-derivatives\n\t\t\tif ( rparentsprev.test( name ) ) {\n\t\t\t\tret = ret.reverse();\n\t\t\t}\n\t\t}\n\n\t\treturn this.pushStack( ret );\n\t};\n});\n\njQuery.extend({\n\tfilter: function( expr, elems, not ) {\n\t\tvar elem = elems[ 0 ];\n\n\t\tif ( not ) {\n\t\t\texpr = \":not(\" + expr + \")\";\n\t\t}\n\n\t\treturn elems.length === 1 && elem.nodeType === 1 ?\n\t\t\tjQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [] :\n\t\t\tjQuery.find.matches( expr, jQuery.grep( elems, function( elem ) {\n\t\t\t\treturn elem.nodeType === 1;\n\t\t\t}));\n\t},\n\n\tdir: function( elem, dir, until ) {\n\t\tvar matched = [],\n\t\t\tcur = elem[ dir ];\n\n\t\twhile ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) {\n\t\t\tif ( cur.nodeType === 1 ) {\n\t\t\t\tmatched.push( cur );\n\t\t\t}\n\t\t\tcur = cur[dir];\n\t\t}\n\t\treturn matched;\n\t},\n\n\tsibling: function( n, elem ) {\n\t\tvar r = [];\n\n\t\tfor ( ; n; n = n.nextSibling ) {\n\t\t\tif ( n.nodeType === 1 && n !== elem ) {\n\t\t\t\tr.push( n );\n\t\t\t}\n\t\t}\n\n\t\treturn r;\n\t}\n});\n\n// Implement the identical functionality for filter and not\nfunction winnow( elements, qualifier, not ) {\n\tif ( jQuery.isFunction( qualifier ) ) {\n\t\treturn jQuery.grep( elements, function( elem, i ) {\n\t\t\t/* jshint -W018 */\n\t\t\treturn !!qualifier.call( elem, i, elem ) !== not;\n\t\t});\n\n\t}\n\n\tif ( qualifier.nodeType ) {\n\t\treturn jQuery.grep( elements, function( elem ) {\n\t\t\treturn ( elem === qualifier ) !== not;\n\t\t});\n\n\t}\n\n\tif ( typeof qualifier === \"string\" ) {\n\t\tif ( isSimple.test( qualifier ) ) {\n\t\t\treturn jQuery.filter( qualifier, elements, not );\n\t\t}\n\n\t\tqualifier = jQuery.filter( qualifier, elements );\n\t}\n\n\treturn jQuery.grep( elements, function( elem ) {\n\t\treturn ( jQuery.inArray( elem, qualifier ) >= 0 ) !== not;\n\t});\n}\nfunction createSafeFragment( document ) {\n\tvar list = nodeNames.split( \"|\" ),\n\t\tsafeFrag = document.createDocumentFragment();\n\n\tif ( safeFrag.createElement ) {\n\t\twhile ( list.length ) {\n\t\t\tsafeFrag.createElement(\n\t\t\t\tlist.pop()\n\t\t\t);\n\t\t}\n\t}\n\treturn safeFrag;\n}\n\nvar nodeNames = \"abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|\" +\n\t\t\"header|hgroup|mark|meter|nav|output|progress|section|summary|time|video\",\n\trinlinejQuery = / jQuery\\d+=\"(?:null|\\d+)\"/g,\n\trnoshimcache = new RegExp(\"<(?:\" + nodeNames + \")[\\\\s/>]\", \"i\"),\n\trleadingWhitespace = /^\\s+/,\n\trxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\\w:]+)[^>]*)\\/>/gi,\n\trtagName = /<([\\w:]+)/,\n\trtbody = /<tbody/i,\n\trhtml = /<|&#?\\w+;/,\n\trnoInnerhtml = /<(?:script|style|link)/i,\n\tmanipulation_rcheckableType = /^(?:checkbox|radio)$/i,\n\t// checked=\"checked\" or checked\n\trchecked = /checked\\s*(?:[^=]|=\\s*.checked.)/i,\n\trscriptType = /^$|\\/(?:java|ecma)script/i,\n\trscriptTypeMasked = /^true\\/(.*)/,\n\trcleanScript = /^\\s*<!(?:\\[CDATA\\[|--)|(?:\\]\\]|--)>\\s*$/g,\n\n\t// We have to close these tags to support XHTML (#13200)\n\twrapMap = {\n\t\toption: [ 1, \"<select multiple='multiple'>\", \"</select>\" ],\n\t\tlegend: [ 1, \"<fieldset>\", \"</fieldset>\" ],\n\t\tarea: [ 1, \"<map>\", \"</map>\" ],\n\t\tparam: [ 1, \"<object>\", \"</object>\" ],\n\t\tthead: [ 1, \"<table>\", \"</table>\" ],\n\t\ttr: [ 2, \"<table><tbody>\", \"</tbody></table>\" ],\n\t\tcol: [ 2, \"<table><tbody></tbody><colgroup>\", \"</colgroup></table>\" ],\n\t\ttd: [ 3, \"<table><tbody><tr>\", \"</tr></tbody></table>\" ],\n\n\t\t// IE6-8 can't serialize link, script, style, or any html5 (NoScope) tags,\n\t\t// unless wrapped in a div with non-breaking characters in front of it.\n\t\t_default: jQuery.support.htmlSerialize ? [ 0, \"\", \"\" ] : [ 1, \"X<div>\", \"</div>\"  ]\n\t},\n\tsafeFragment = createSafeFragment( document ),\n\tfragmentDiv = safeFragment.appendChild( document.createElement(\"div\") );\n\nwrapMap.optgroup = wrapMap.option;\nwrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;\nwrapMap.th = wrapMap.td;\n\njQuery.fn.extend({\n\ttext: function( value ) {\n\t\treturn jQuery.access( this, function( value ) {\n\t\t\treturn value === undefined ?\n\t\t\t\tjQuery.text( this ) :\n\t\t\t\tthis.empty().append( ( this[0] && this[0].ownerDocument || document ).createTextNode( value ) );\n\t\t}, null, value, arguments.length );\n\t},\n\n\tappend: function() {\n\t\treturn this.domManip( arguments, function( elem ) {\n\t\t\tif ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {\n\t\t\t\tvar target = manipulationTarget( this, elem );\n\t\t\t\ttarget.appendChild( elem );\n\t\t\t}\n\t\t});\n\t},\n\n\tprepend: function() {\n\t\treturn this.domManip( arguments, function( elem ) {\n\t\t\tif ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {\n\t\t\t\tvar target = manipulationTarget( this, elem );\n\t\t\t\ttarget.insertBefore( elem, target.firstChild );\n\t\t\t}\n\t\t});\n\t},\n\n\tbefore: function() {\n\t\treturn this.domManip( arguments, function( elem ) {\n\t\t\tif ( this.parentNode ) {\n\t\t\t\tthis.parentNode.insertBefore( elem, this );\n\t\t\t}\n\t\t});\n\t},\n\n\tafter: function() {\n\t\treturn this.domManip( arguments, function( elem ) {\n\t\t\tif ( this.parentNode ) {\n\t\t\t\tthis.parentNode.insertBefore( elem, this.nextSibling );\n\t\t\t}\n\t\t});\n\t},\n\n\t// keepData is for internal use only--do not document\n\tremove: function( selector, keepData ) {\n\t\tvar elem,\n\t\t\telems = selector ? jQuery.filter( selector, this ) : this,\n\t\t\ti = 0;\n\n\t\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\n\t\t\tif ( !keepData && elem.nodeType === 1 ) {\n\t\t\t\tjQuery.cleanData( getAll( elem ) );\n\t\t\t}\n\n\t\t\tif ( elem.parentNode ) {\n\t\t\t\tif ( keepData && jQuery.contains( elem.ownerDocument, elem ) ) {\n\t\t\t\t\tsetGlobalEval( getAll( elem, \"script\" ) );\n\t\t\t\t}\n\t\t\t\telem.parentNode.removeChild( elem );\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t},\n\n\tempty: function() {\n\t\tvar elem,\n\t\t\ti = 0;\n\n\t\tfor ( ; (elem = this[i]) != null; i++ ) {\n\t\t\t// Remove element nodes and prevent memory leaks\n\t\t\tif ( elem.nodeType === 1 ) {\n\t\t\t\tjQuery.cleanData( getAll( elem, false ) );\n\t\t\t}\n\n\t\t\t// Remove any remaining nodes\n\t\t\twhile ( elem.firstChild ) {\n\t\t\t\telem.removeChild( elem.firstChild );\n\t\t\t}\n\n\t\t\t// If this is a select, ensure that it displays empty (#12336)\n\t\t\t// Support: IE<9\n\t\t\tif ( elem.options && jQuery.nodeName( elem, \"select\" ) ) {\n\t\t\t\telem.options.length = 0;\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t},\n\n\tclone: function( dataAndEvents, deepDataAndEvents ) {\n\t\tdataAndEvents = dataAndEvents == null ? false : dataAndEvents;\n\t\tdeepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;\n\n\t\treturn this.map( function () {\n\t\t\treturn jQuery.clone( this, dataAndEvents, deepDataAndEvents );\n\t\t});\n\t},\n\n\thtml: function( value ) {\n\t\treturn jQuery.access( this, function( value ) {\n\t\t\tvar elem = this[0] || {},\n\t\t\t\ti = 0,\n\t\t\t\tl = this.length;\n\n\t\t\tif ( value === undefined ) {\n\t\t\t\treturn elem.nodeType === 1 ?\n\t\t\t\t\telem.innerHTML.replace( rinlinejQuery, \"\" ) :\n\t\t\t\t\tundefined;\n\t\t\t}\n\n\t\t\t// See if we can take a shortcut and just use innerHTML\n\t\t\tif ( typeof value === \"string\" && !rnoInnerhtml.test( value ) &&\n\t\t\t\t( jQuery.support.htmlSerialize || !rnoshimcache.test( value )  ) &&\n\t\t\t\t( jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value ) ) &&\n\t\t\t\t!wrapMap[ ( rtagName.exec( value ) || [\"\", \"\"] )[1].toLowerCase() ] ) {\n\n\t\t\t\tvalue = value.replace( rxhtmlTag, \"<$1></$2>\" );\n\n\t\t\t\ttry {\n\t\t\t\t\tfor (; i < l; i++ ) {\n\t\t\t\t\t\t// Remove element nodes and prevent memory leaks\n\t\t\t\t\t\telem = this[i] || {};\n\t\t\t\t\t\tif ( elem.nodeType === 1 ) {\n\t\t\t\t\t\t\tjQuery.cleanData( getAll( elem, false ) );\n\t\t\t\t\t\t\telem.innerHTML = value;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\telem = 0;\n\n\t\t\t\t// If using innerHTML throws an exception, use the fallback method\n\t\t\t\t} catch(e) {}\n\t\t\t}\n\n\t\t\tif ( elem ) {\n\t\t\t\tthis.empty().append( value );\n\t\t\t}\n\t\t}, null, value, arguments.length );\n\t},\n\n\treplaceWith: function() {\n\t\tvar\n\t\t\t// Snapshot the DOM in case .domManip sweeps something relevant into its fragment\n\t\t\targs = jQuery.map( this, function( elem ) {\n\t\t\t\treturn [ elem.nextSibling, elem.parentNode ];\n\t\t\t}),\n\t\t\ti = 0;\n\n\t\t// Make the changes, replacing each context element with the new content\n\t\tthis.domManip( arguments, function( elem ) {\n\t\t\tvar next = args[ i++ ],\n\t\t\t\tparent = args[ i++ ];\n\n\t\t\tif ( parent ) {\n\t\t\t\t// Don't use the snapshot next if it has moved (#13810)\n\t\t\t\tif ( next && next.parentNode !== parent ) {\n\t\t\t\t\tnext = this.nextSibling;\n\t\t\t\t}\n\t\t\t\tjQuery( this ).remove();\n\t\t\t\tparent.insertBefore( elem, next );\n\t\t\t}\n\t\t// Allow new content to include elements from the context set\n\t\t}, true );\n\n\t\t// Force removal if there was no new content (e.g., from empty arguments)\n\t\treturn i ? this : this.remove();\n\t},\n\n\tdetach: function( selector ) {\n\t\treturn this.remove( selector, true );\n\t},\n\n\tdomManip: function( args, callback, allowIntersection ) {\n\n\t\t// Flatten any nested arrays\n\t\targs = core_concat.apply( [], args );\n\n\t\tvar first, node, hasScripts,\n\t\t\tscripts, doc, fragment,\n\t\t\ti = 0,\n\t\t\tl = this.length,\n\t\t\tset = this,\n\t\t\tiNoClone = l - 1,\n\t\t\tvalue = args[0],\n\t\t\tisFunction = jQuery.isFunction( value );\n\n\t\t// We can't cloneNode fragments that contain checked, in WebKit\n\t\tif ( isFunction || !( l <= 1 || typeof value !== \"string\" || jQuery.support.checkClone || !rchecked.test( value ) ) ) {\n\t\t\treturn this.each(function( index ) {\n\t\t\t\tvar self = set.eq( index );\n\t\t\t\tif ( isFunction ) {\n\t\t\t\t\targs[0] = value.call( this, index, self.html() );\n\t\t\t\t}\n\t\t\t\tself.domManip( args, callback, allowIntersection );\n\t\t\t});\n\t\t}\n\n\t\tif ( l ) {\n\t\t\tfragment = jQuery.buildFragment( args, this[ 0 ].ownerDocument, false, !allowIntersection && this );\n\t\t\tfirst = fragment.firstChild;\n\n\t\t\tif ( fragment.childNodes.length === 1 ) {\n\t\t\t\tfragment = first;\n\t\t\t}\n\n\t\t\tif ( first ) {\n\t\t\t\tscripts = jQuery.map( getAll( fragment, \"script\" ), disableScript );\n\t\t\t\thasScripts = scripts.length;\n\n\t\t\t\t// Use the original fragment for the last item instead of the first because it can end up\n\t\t\t\t// being emptied incorrectly in certain situations (#8070).\n\t\t\t\tfor ( ; i < l; i++ ) {\n\t\t\t\t\tnode = fragment;\n\n\t\t\t\t\tif ( i !== iNoClone ) {\n\t\t\t\t\t\tnode = jQuery.clone( node, true, true );\n\n\t\t\t\t\t\t// Keep references to cloned scripts for later restoration\n\t\t\t\t\t\tif ( hasScripts ) {\n\t\t\t\t\t\t\tjQuery.merge( scripts, getAll( node, \"script\" ) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tcallback.call( this[i], node, i );\n\t\t\t\t}\n\n\t\t\t\tif ( hasScripts ) {\n\t\t\t\t\tdoc = scripts[ scripts.length - 1 ].ownerDocument;\n\n\t\t\t\t\t// Reenable scripts\n\t\t\t\t\tjQuery.map( scripts, restoreScript );\n\n\t\t\t\t\t// Evaluate executable scripts on first document insertion\n\t\t\t\t\tfor ( i = 0; i < hasScripts; i++ ) {\n\t\t\t\t\t\tnode = scripts[ i ];\n\t\t\t\t\t\tif ( rscriptType.test( node.type || \"\" ) &&\n\t\t\t\t\t\t\t!jQuery._data( node, \"globalEval\" ) && jQuery.contains( doc, node ) ) {\n\n\t\t\t\t\t\t\tif ( node.src ) {\n\t\t\t\t\t\t\t\t// Hope ajax is available...\n\t\t\t\t\t\t\t\tjQuery._evalUrl( node.src );\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tjQuery.globalEval( ( node.text || node.textContent || node.innerHTML || \"\" ).replace( rcleanScript, \"\" ) );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Fix #11809: Avoid leaking memory\n\t\t\t\tfragment = first = null;\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t}\n});\n\n// Support: IE<8\n// Manipulating tables requires a tbody\nfunction manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType === 1 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}\n\n// Replace/restore the type attribute of script elements for safe DOM manipulation\nfunction disableScript( elem ) {\n\telem.type = (jQuery.find.attr( elem, \"type\" ) !== null) + \"/\" + elem.type;\n\treturn elem;\n}\nfunction restoreScript( elem ) {\n\tvar match = rscriptTypeMasked.exec( elem.type );\n\tif ( match ) {\n\t\telem.type = match[1];\n\t} else {\n\t\telem.removeAttribute(\"type\");\n\t}\n\treturn elem;\n}\n\n// Mark scripts as having already been evaluated\nfunction setGlobalEval( elems, refElements ) {\n\tvar elem,\n\t\ti = 0;\n\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n\t}\n}\n\nfunction cloneCopyEvent( src, dest ) {\n\n\tif ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) {\n\t\treturn;\n\t}\n\n\tvar type, i, l,\n\t\toldData = jQuery._data( src ),\n\t\tcurData = jQuery._data( dest, oldData ),\n\t\tevents = oldData.events;\n\n\tif ( events ) {\n\t\tdelete curData.handle;\n\t\tcurData.events = {};\n\n\t\tfor ( type in events ) {\n\t\t\tfor ( i = 0, l = events[ type ].length; i < l; i++ ) {\n\t\t\t\tjQuery.event.add( dest, type, events[ type ][ i ] );\n\t\t\t}\n\t\t}\n\t}\n\n\t// make the cloned public data object a copy from the original\n\tif ( curData.data ) {\n\t\tcurData.data = jQuery.extend( {}, curData.data );\n\t}\n}\n\nfunction fixCloneNodeIssues( src, dest ) {\n\tvar nodeName, e, data;\n\n\t// We do not need to do anything for non-Elements\n\tif ( dest.nodeType !== 1 ) {\n\t\treturn;\n\t}\n\n\tnodeName = dest.nodeName.toLowerCase();\n\n\t// IE6-8 copies events bound via attachEvent when using cloneNode.\n\tif ( !jQuery.support.noCloneEvent && dest[ jQuery.expando ] ) {\n\t\tdata = jQuery._data( dest );\n\n\t\tfor ( e in data.events ) {\n\t\t\tjQuery.removeEvent( dest, e, data.handle );\n\t\t}\n\n\t\t// Event data gets referenced instead of copied if the expando gets copied too\n\t\tdest.removeAttribute( jQuery.expando );\n\t}\n\n\t// IE blanks contents when cloning scripts, and tries to evaluate newly-set text\n\tif ( nodeName === \"script\" && dest.text !== src.text ) {\n\t\tdisableScript( dest ).text = src.text;\n\t\trestoreScript( dest );\n\n\t// IE6-10 improperly clones children of object elements using classid.\n\t// IE10 throws NoModificationAllowedError if parent is null, #12132.\n\t} else if ( nodeName === \"object\" ) {\n\t\tif ( dest.parentNode ) {\n\t\t\tdest.outerHTML = src.outerHTML;\n\t\t}\n\n\t\t// This path appears unavoidable for IE9. When cloning an object\n\t\t// element in IE9, the outerHTML strategy above is not sufficient.\n\t\t// If the src has innerHTML and the destination does not,\n\t\t// copy the src.innerHTML into the dest.innerHTML. #10324\n\t\tif ( jQuery.support.html5Clone && ( src.innerHTML && !jQuery.trim(dest.innerHTML) ) ) {\n\t\t\tdest.innerHTML = src.innerHTML;\n\t\t}\n\n\t} else if ( nodeName === \"input\" && manipulation_rcheckableType.test( src.type ) ) {\n\t\t// IE6-8 fails to persist the checked state of a cloned checkbox\n\t\t// or radio button. Worse, IE6-7 fail to give the cloned element\n\t\t// a checked appearance if the defaultChecked value isn't also set\n\n\t\tdest.defaultChecked = dest.checked = src.checked;\n\n\t\t// IE6-7 get confused and end up setting the value of a cloned\n\t\t// checkbox/radio button to an empty string instead of \"on\"\n\t\tif ( dest.value !== src.value ) {\n\t\t\tdest.value = src.value;\n\t\t}\n\n\t// IE6-8 fails to return the selected option to the default selected\n\t// state when cloning options\n\t} else if ( nodeName === \"option\" ) {\n\t\tdest.defaultSelected = dest.selected = src.defaultSelected;\n\n\t// IE6-8 fails to set the defaultValue to the correct value when\n\t// cloning other types of input fields\n\t} else if ( nodeName === \"input\" || nodeName === \"textarea\" ) {\n\t\tdest.defaultValue = src.defaultValue;\n\t}\n}\n\njQuery.each({\n\tappendTo: \"append\",\n\tprependTo: \"prepend\",\n\tinsertBefore: \"before\",\n\tinsertAfter: \"after\",\n\treplaceAll: \"replaceWith\"\n}, function( name, original ) {\n\tjQuery.fn[ name ] = function( selector ) {\n\t\tvar elems,\n\t\t\ti = 0,\n\t\t\tret = [],\n\t\t\tinsert = jQuery( selector ),\n\t\t\tlast = insert.length - 1;\n\n\t\tfor ( ; i <= last; i++ ) {\n\t\t\telems = i === last ? this : this.clone(true);\n\t\t\tjQuery( insert[i] )[ original ]( elems );\n\n\t\t\t// Modern browsers can apply jQuery collections as arrays, but oldIE needs a .get()\n\t\t\tcore_push.apply( ret, elems.get() );\n\t\t}\n\n\t\treturn this.pushStack( ret );\n\t};\n});\n\nfunction getAll( context, tag ) {\n\tvar elems, elem,\n\t\ti = 0,\n\t\tfound = typeof context.getElementsByTagName !== core_strundefined ? context.getElementsByTagName( tag || \"*\" ) :\n\t\t\ttypeof context.querySelectorAll !== core_strundefined ? context.querySelectorAll( tag || \"*\" ) :\n\t\t\tundefined;\n\n\tif ( !found ) {\n\t\tfor ( found = [], elems = context.childNodes || context; (elem = elems[i]) != null; i++ ) {\n\t\t\tif ( !tag || jQuery.nodeName( elem, tag ) ) {\n\t\t\t\tfound.push( elem );\n\t\t\t} else {\n\t\t\t\tjQuery.merge( found, getAll( elem, tag ) );\n\t\t\t}\n\t\t}\n\t}\n\n\treturn tag === undefined || tag && jQuery.nodeName( context, tag ) ?\n\t\tjQuery.merge( [ context ], found ) :\n\t\tfound;\n}\n\n// Used in buildFragment, fixes the defaultChecked property\nfunction fixDefaultChecked( elem ) {\n\tif ( manipulation_rcheckableType.test( elem.type ) ) {\n\t\telem.defaultChecked = elem.checked;\n\t}\n}\n\njQuery.extend({\n\tclone: function( elem, dataAndEvents, deepDataAndEvents ) {\n\t\tvar destElements, node, clone, i, srcElements,\n\t\t\tinPage = jQuery.contains( elem.ownerDocument, elem );\n\n\t\tif ( jQuery.support.html5Clone || jQuery.isXMLDoc(elem) || !rnoshimcache.test( \"<\" + elem.nodeName + \">\" ) ) {\n\t\t\tclone = elem.cloneNode( true );\n\n\t\t// IE<=8 does not properly clone detached, unknown element nodes\n\t\t} else {\n\t\t\tfragmentDiv.innerHTML = elem.outerHTML;\n\t\t\tfragmentDiv.removeChild( clone = fragmentDiv.firstChild );\n\t\t}\n\n\t\tif ( (!jQuery.support.noCloneEvent || !jQuery.support.noCloneChecked) &&\n\t\t\t\t(elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem) ) {\n\n\t\t\t// We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2\n\t\t\tdestElements = getAll( clone );\n\t\t\tsrcElements = getAll( elem );\n\n\t\t\t// Fix all IE cloning issues\n\t\t\tfor ( i = 0; (node = srcElements[i]) != null; ++i ) {\n\t\t\t\t// Ensure that the destination node is not null; Fixes #9587\n\t\t\t\tif ( destElements[i] ) {\n\t\t\t\t\tfixCloneNodeIssues( node, destElements[i] );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Copy the events from the original to the clone\n\t\tif ( dataAndEvents ) {\n\t\t\tif ( deepDataAndEvents ) {\n\t\t\t\tsrcElements = srcElements || getAll( elem );\n\t\t\t\tdestElements = destElements || getAll( clone );\n\n\t\t\t\tfor ( i = 0; (node = srcElements[i]) != null; i++ ) {\n\t\t\t\t\tcloneCopyEvent( node, destElements[i] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tcloneCopyEvent( elem, clone );\n\t\t\t}\n\t\t}\n\n\t\t// Preserve script evaluation history\n\t\tdestElements = getAll( clone, \"script\" );\n\t\tif ( destElements.length > 0 ) {\n\t\t\tsetGlobalEval( destElements, !inPage && getAll( elem, \"script\" ) );\n\t\t}\n\n\t\tdestElements = srcElements = node = null;\n\n\t\t// Return the cloned set\n\t\treturn clone;\n\t},\n\n\tbuildFragment: function( elems, context, scripts, selection ) {\n\t\tvar j, elem, contains,\n\t\t\ttmp, tag, tbody, wrap,\n\t\t\tl = elems.length,\n\n\t\t\t// Ensure a safe fragment\n\t\t\tsafe = createSafeFragment( context ),\n\n\t\t\tnodes = [],\n\t\t\ti = 0;\n\n\t\tfor ( ; i < l; i++ ) {\n\t\t\telem = elems[ i ];\n\n\t\t\tif ( elem || elem === 0 ) {\n\n\t\t\t\t// Add nodes directly\n\t\t\t\tif ( jQuery.type( elem ) === \"object\" ) {\n\t\t\t\t\tjQuery.merge( nodes, elem.nodeType ? [ elem ] : elem );\n\n\t\t\t\t// Convert non-html into a text node\n\t\t\t\t} else if ( !rhtml.test( elem ) ) {\n\t\t\t\t\tnodes.push( context.createTextNode( elem ) );\n\n\t\t\t\t// Convert html into DOM nodes\n\t\t\t\t} else {\n\t\t\t\t\ttmp = tmp || safe.appendChild( context.createElement(\"div\") );\n\n\t\t\t\t\t// Deserialize a standard representation\n\t\t\t\t\ttag = ( rtagName.exec( elem ) || [\"\", \"\"] )[1].toLowerCase();\n\t\t\t\t\twrap = wrapMap[ tag ] || wrapMap._default;\n\n\t\t\t\t\ttmp.innerHTML = wrap[1] + elem.replace( rxhtmlTag, \"<$1></$2>\" ) + wrap[2];\n\n\t\t\t\t\t// Descend through wrappers to the right content\n\t\t\t\t\tj = wrap[0];\n\t\t\t\t\twhile ( j-- ) {\n\t\t\t\t\t\ttmp = tmp.lastChild;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Manually add leading whitespace removed by IE\n\t\t\t\t\tif ( !jQuery.support.leadingWhitespace && rleadingWhitespace.test( elem ) ) {\n\t\t\t\t\t\tnodes.push( context.createTextNode( rleadingWhitespace.exec( elem )[0] ) );\n\t\t\t\t\t}\n\n\t\t\t\t\t// Remove IE's autoinserted <tbody> from table fragments\n\t\t\t\t\tif ( !jQuery.support.tbody ) {\n\n\t\t\t\t\t\t// String was a <table>, *may* have spurious <tbody>\n\t\t\t\t\t\telem = tag === \"table\" && !rtbody.test( elem ) ?\n\t\t\t\t\t\t\ttmp.firstChild :\n\n\t\t\t\t\t\t\t// String was a bare <thead> or <tfoot>\n\t\t\t\t\t\t\twrap[1] === \"<table>\" && !rtbody.test( elem ) ?\n\t\t\t\t\t\t\t\ttmp :\n\t\t\t\t\t\t\t\t0;\n\n\t\t\t\t\t\tj = elem && elem.childNodes.length;\n\t\t\t\t\t\twhile ( j-- ) {\n\t\t\t\t\t\t\tif ( jQuery.nodeName( (tbody = elem.childNodes[j]), \"tbody\" ) && !tbody.childNodes.length ) {\n\t\t\t\t\t\t\t\telem.removeChild( tbody );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tjQuery.merge( nodes, tmp.childNodes );\n\n\t\t\t\t\t// Fix #12392 for WebKit and IE > 9\n\t\t\t\t\ttmp.textContent = \"\";\n\n\t\t\t\t\t// Fix #12392 for oldIE\n\t\t\t\t\twhile ( tmp.firstChild ) {\n\t\t\t\t\t\ttmp.removeChild( tmp.firstChild );\n\t\t\t\t\t}\n\n\t\t\t\t\t// Remember the top-level container for proper cleanup\n\t\t\t\t\ttmp = safe.lastChild;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Fix #11356: Clear elements from fragment\n\t\tif ( tmp ) {\n\t\t\tsafe.removeChild( tmp );\n\t\t}\n\n\t\t// Reset defaultChecked for any radios and checkboxes\n\t\t// about to be appended to the DOM in IE 6/7 (#8060)\n\t\tif ( !jQuery.support.appendChecked ) {\n\t\t\tjQuery.grep( getAll( nodes, \"input\" ), fixDefaultChecked );\n\t\t}\n\n\t\ti = 0;\n\t\twhile ( (elem = nodes[ i++ ]) ) {\n\n\t\t\t// #4087 - If origin and destination elements are the same, and this is\n\t\t\t// that element, do not do anything\n\t\t\tif ( selection && jQuery.inArray( elem, selection ) !== -1 ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tcontains = jQuery.contains( elem.ownerDocument, elem );\n\n\t\t\t// Append to fragment\n\t\t\ttmp = getAll( safe.appendChild( elem ), \"script\" );\n\n\t\t\t// Preserve script evaluation history\n\t\t\tif ( contains ) {\n\t\t\t\tsetGlobalEval( tmp );\n\t\t\t}\n\n\t\t\t// Capture executables\n\t\t\tif ( scripts ) {\n\t\t\t\tj = 0;\n\t\t\t\twhile ( (elem = tmp[ j++ ]) ) {\n\t\t\t\t\tif ( rscriptType.test( elem.type || \"\" ) ) {\n\t\t\t\t\t\tscripts.push( elem );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\ttmp = null;\n\n\t\treturn safe;\n\t},\n\n\tcleanData: function( elems, /* internal */ acceptData ) {\n\t\tvar elem, type, id, data,\n\t\t\ti = 0,\n\t\t\tinternalKey = jQuery.expando,\n\t\t\tcache = jQuery.cache,\n\t\t\tdeleteExpando = jQuery.support.deleteExpando,\n\t\t\tspecial = jQuery.event.special;\n\n\t\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\n\t\t\tif ( acceptData || jQuery.acceptData( elem ) ) {\n\n\t\t\t\tid = elem[ internalKey ];\n\t\t\t\tdata = id && cache[ id ];\n\n\t\t\t\tif ( data ) {\n\t\t\t\t\tif ( data.events ) {\n\t\t\t\t\t\tfor ( type in data.events ) {\n\t\t\t\t\t\t\tif ( special[ type ] ) {\n\t\t\t\t\t\t\t\tjQuery.event.remove( elem, type );\n\n\t\t\t\t\t\t\t// This is a shortcut to avoid jQuery.event.remove's overhead\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tjQuery.removeEvent( elem, type, data.handle );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Remove cache only if it was not already removed by jQuery.event.remove\n\t\t\t\t\tif ( cache[ id ] ) {\n\n\t\t\t\t\t\tdelete cache[ id ];\n\n\t\t\t\t\t\t// IE does not allow us to delete expando properties from nodes,\n\t\t\t\t\t\t// nor does it have a removeAttribute function on Document nodes;\n\t\t\t\t\t\t// we must handle all of these cases\n\t\t\t\t\t\tif ( deleteExpando ) {\n\t\t\t\t\t\t\tdelete elem[ internalKey ];\n\n\t\t\t\t\t\t} else if ( typeof elem.removeAttribute !== core_strundefined ) {\n\t\t\t\t\t\t\telem.removeAttribute( internalKey );\n\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\telem[ internalKey ] = null;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tcore_deletedIds.push( id );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\n\t_evalUrl: function( url ) {\n\t\treturn jQuery.ajax({\n\t\t\turl: url,\n\t\t\ttype: \"GET\",\n\t\t\tdataType: \"script\",\n\t\t\tasync: false,\n\t\t\tglobal: false,\n\t\t\t\"throws\": true\n\t\t});\n\t}\n});\njQuery.fn.extend({\n\twrapAll: function( html ) {\n\t\tif ( jQuery.isFunction( html ) ) {\n\t\t\treturn this.each(function(i) {\n\t\t\t\tjQuery(this).wrapAll( html.call(this, i) );\n\t\t\t});\n\t\t}\n\n\t\tif ( this[0] ) {\n\t\t\t// The elements to wrap the target around\n\t\t\tvar wrap = jQuery( html, this[0].ownerDocument ).eq(0).clone(true);\n\n\t\t\tif ( this[0].parentNode ) {\n\t\t\t\twrap.insertBefore( this[0] );\n\t\t\t}\n\n\t\t\twrap.map(function() {\n\t\t\t\tvar elem = this;\n\n\t\t\t\twhile ( elem.firstChild && elem.firstChild.nodeType === 1 ) {\n\t\t\t\t\telem = elem.firstChild;\n\t\t\t\t}\n\n\t\t\t\treturn elem;\n\t\t\t}).append( this );\n\t\t}\n\n\t\treturn this;\n\t},\n\n\twrapInner: function( html ) {\n\t\tif ( jQuery.isFunction( html ) ) {\n\t\t\treturn this.each(function(i) {\n\t\t\t\tjQuery(this).wrapInner( html.call(this, i) );\n\t\t\t});\n\t\t}\n\n\t\treturn this.each(function() {\n\t\t\tvar self = jQuery( this ),\n\t\t\t\tcontents = self.contents();\n\n\t\t\tif ( contents.length ) {\n\t\t\t\tcontents.wrapAll( html );\n\n\t\t\t} else {\n\t\t\t\tself.append( html );\n\t\t\t}\n\t\t});\n\t},\n\n\twrap: function( html ) {\n\t\tvar isFunction = jQuery.isFunction( html );\n\n\t\treturn this.each(function(i) {\n\t\t\tjQuery( this ).wrapAll( isFunction ? html.call(this, i) : html );\n\t\t});\n\t},\n\n\tunwrap: function() {\n\t\treturn this.parent().each(function() {\n\t\t\tif ( !jQuery.nodeName( this, \"body\" ) ) {\n\t\t\t\tjQuery( this ).replaceWith( this.childNodes );\n\t\t\t}\n\t\t}).end();\n\t}\n});\nvar iframe, getStyles, curCSS,\n\tralpha = /alpha\\([^)]*\\)/i,\n\tropacity = /opacity\\s*=\\s*([^)]*)/,\n\trposition = /^(top|right|bottom|left)$/,\n\t// swappable if display is none or starts with table except \"table\", \"table-cell\", or \"table-caption\"\n\t// see here for display values: https://developer.mozilla.org/en-US/docs/CSS/display\n\trdisplayswap = /^(none|table(?!-c[ea]).+)/,\n\trmargin = /^margin/,\n\trnumsplit = new RegExp( \"^(\" + core_pnum + \")(.*)$\", \"i\" ),\n\trnumnonpx = new RegExp( \"^(\" + core_pnum + \")(?!px)[a-z%]+$\", \"i\" ),\n\trrelNum = new RegExp( \"^([+-])=(\" + core_pnum + \")\", \"i\" ),\n\telemdisplay = { BODY: \"block\" },\n\n\tcssShow = { position: \"absolute\", visibility: \"hidden\", display: \"block\" },\n\tcssNormalTransform = {\n\t\tletterSpacing: 0,\n\t\tfontWeight: 400\n\t},\n\n\tcssExpand = [ \"Top\", \"Right\", \"Bottom\", \"Left\" ],\n\tcssPrefixes = [ \"Webkit\", \"O\", \"Moz\", \"ms\" ];\n\n// return a css property mapped to a potentially vendor prefixed property\nfunction vendorPropName( style, name ) {\n\n\t// shortcut for names that are not vendor prefixed\n\tif ( name in style ) {\n\t\treturn name;\n\t}\n\n\t// check for vendor prefixed names\n\tvar capName = name.charAt(0).toUpperCase() + name.slice(1),\n\t\torigName = name,\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in style ) {\n\t\t\treturn name;\n\t\t}\n\t}\n\n\treturn origName;\n}\n\nfunction isHidden( elem, el ) {\n\t// isHidden might be called from jQuery#filter function;\n\t// in that case, element will be second argument\n\telem = el || elem;\n\treturn jQuery.css( elem, \"display\" ) === \"none\" || !jQuery.contains( elem.ownerDocument, elem );\n}\n\nfunction showHide( elements, show ) {\n\tvar display, elem, hidden,\n\t\tvalues = [],\n\t\tindex = 0,\n\t\tlength = elements.length;\n\n\tfor ( ; index < length; index++ ) {\n\t\telem = elements[ index ];\n\t\tif ( !elem.style ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tvalues[ index ] = jQuery._data( elem, \"olddisplay\" );\n\t\tdisplay = elem.style.display;\n\t\tif ( show ) {\n\t\t\t// Reset the inline display of this element to learn if it is\n\t\t\t// being hidden by cascaded rules or not\n\t\t\tif ( !values[ index ] && display === \"none\" ) {\n\t\t\t\telem.style.display = \"\";\n\t\t\t}\n\n\t\t\t// Set elements which have been overridden with display: none\n\t\t\t// in a stylesheet to whatever the default browser style is\n\t\t\t// for such an element\n\t\t\tif ( elem.style.display === \"\" && isHidden( elem ) ) {\n\t\t\t\tvalues[ index ] = jQuery._data( elem, \"olddisplay\", css_defaultDisplay(elem.nodeName) );\n\t\t\t}\n\t\t} else {\n\n\t\t\tif ( !values[ index ] ) {\n\t\t\t\thidden = isHidden( elem );\n\n\t\t\t\tif ( display && display !== \"none\" || !hidden ) {\n\t\t\t\t\tjQuery._data( elem, \"olddisplay\", hidden ? display : jQuery.css( elem, \"display\" ) );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Set the display of most of the elements in a second loop\n\t// to avoid the constant reflow\n\tfor ( index = 0; index < length; index++ ) {\n\t\telem = elements[ index ];\n\t\tif ( !elem.style ) {\n\t\t\tcontinue;\n\t\t}\n\t\tif ( !show || elem.style.display === \"none\" || elem.style.display === \"\" ) {\n\t\t\telem.style.display = show ? values[ index ] || \"\" : \"none\";\n\t\t}\n\t}\n\n\treturn elements;\n}\n\njQuery.fn.extend({\n\tcss: function( name, value ) {\n\t\treturn jQuery.access( this, function( elem, name, value ) {\n\t\t\tvar len, styles,\n\t\t\t\tmap = {},\n\t\t\t\ti = 0;\n\n\t\t\tif ( jQuery.isArray( name ) ) {\n\t\t\t\tstyles = getStyles( elem );\n\t\t\t\tlen = name.length;\n\n\t\t\t\tfor ( ; i < len; i++ ) {\n\t\t\t\t\tmap[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles );\n\t\t\t\t}\n\n\t\t\t\treturn map;\n\t\t\t}\n\n\t\t\treturn value !== undefined ?\n\t\t\t\tjQuery.style( elem, name, value ) :\n\t\t\t\tjQuery.css( elem, name );\n\t\t}, name, value, arguments.length > 1 );\n\t},\n\tshow: function() {\n\t\treturn showHide( this, true );\n\t},\n\thide: function() {\n\t\treturn showHide( this );\n\t},\n\ttoggle: function( state ) {\n\t\tif ( typeof state === \"boolean\" ) {\n\t\t\treturn state ? this.show() : this.hide();\n\t\t}\n\n\t\treturn this.each(function() {\n\t\t\tif ( isHidden( this ) ) {\n\t\t\t\tjQuery( this ).show();\n\t\t\t} else {\n\t\t\t\tjQuery( this ).hide();\n\t\t\t}\n\t\t});\n\t}\n});\n\njQuery.extend({\n\t// Add in style property hooks for overriding the default\n\t// behavior of getting and setting a style property\n\tcssHooks: {\n\t\topacity: {\n\t\t\tget: function( elem, computed ) {\n\t\t\t\tif ( computed ) {\n\t\t\t\t\t// We should always get a number back from opacity\n\t\t\t\t\tvar ret = curCSS( elem, \"opacity\" );\n\t\t\t\t\treturn ret === \"\" ? \"1\" : ret;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\n\t// Don't automatically add \"px\" to these possibly-unitless properties\n\tcssNumber: {\n\t\t\"columnCount\": true,\n\t\t\"fillOpacity\": true,\n\t\t\"fontWeight\": true,\n\t\t\"lineHeight\": true,\n\t\t\"opacity\": true,\n\t\t\"order\": true,\n\t\t\"orphans\": true,\n\t\t\"widows\": true,\n\t\t\"zIndex\": true,\n\t\t\"zoom\": true\n\t},\n\n\t// Add in properties whose names you wish to fix before\n\t// setting or getting the value\n\tcssProps: {\n\t\t// normalize float css property\n\t\t\"float\": jQuery.support.cssFloat ? \"cssFloat\" : \"styleFloat\"\n\t},\n\n\t// Get and set the style property on a DOM Node\n\tstyle: function( elem, name, value, extra ) {\n\t\t// Don't set styles on text and comment nodes\n\t\tif ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Make sure that we're working with the right name\n\t\tvar ret, type, hooks,\n\t\t\torigName = jQuery.camelCase( name ),\n\t\t\tstyle = elem.style;\n\n\t\tname = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( style, origName ) );\n\n\t\t// gets hook for the prefixed version\n\t\t// followed by the unprefixed version\n\t\thooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];\n\n\t\t// Check if we're setting a value\n\t\tif ( value !== undefined ) {\n\t\t\ttype = typeof value;\n\n\t\t\t// convert relative number strings (+= or -=) to relative numbers. #7345\n\t\t\tif ( type === \"string\" && (ret = rrelNum.exec( value )) ) {\n\t\t\t\tvalue = ( ret[1] + 1 ) * ret[2] + parseFloat( jQuery.css( elem, name ) );\n\t\t\t\t// Fixes bug #9237\n\t\t\t\ttype = \"number\";\n\t\t\t}\n\n\t\t\t// Make sure that NaN and null values aren't set. See: #7116\n\t\t\tif ( value == null || type === \"number\" && isNaN( value ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// If a number was passed in, add 'px' to the (except for certain CSS properties)\n\t\t\tif ( type === \"number\" && !jQuery.cssNumber[ origName ] ) {\n\t\t\t\tvalue += \"px\";\n\t\t\t}\n\n\t\t\t// Fixes #8908, it can be done more correctly by specifing setters in cssHooks,\n\t\t\t// but it would mean to define eight (for every problematic property) identical functions\n\t\t\tif ( !jQuery.support.clearCloneStyle && value === \"\" && name.indexOf(\"background\") === 0 ) {\n\t\t\t\tstyle[ name ] = \"inherit\";\n\t\t\t}\n\n\t\t\t// If a hook was provided, use that value, otherwise just set the specified value\n\t\t\tif ( !hooks || !(\"set\" in hooks) || (value = hooks.set( elem, value, extra )) !== undefined ) {\n\n\t\t\t\t// Wrapped to prevent IE from throwing errors when 'invalid' values are provided\n\t\t\t\t// Fixes bug #5509\n\t\t\t\ttry {\n\t\t\t\t\tstyle[ name ] = value;\n\t\t\t\t} catch(e) {}\n\t\t\t}\n\n\t\t} else {\n\t\t\t// If a hook was provided get the non-computed value from there\n\t\t\tif ( hooks && \"get\" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) {\n\t\t\t\treturn ret;\n\t\t\t}\n\n\t\t\t// Otherwise just get the value from the style object\n\t\t\treturn style[ name ];\n\t\t}\n\t},\n\n\tcss: function( elem, name, extra, styles ) {\n\t\tvar num, val, hooks,\n\t\t\torigName = jQuery.camelCase( name );\n\n\t\t// Make sure that we're working with the right name\n\t\tname = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( elem.style, origName ) );\n\n\t\t// gets hook for the prefixed version\n\t\t// followed by the unprefixed version\n\t\thooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];\n\n\t\t// If a hook was provided get the computed value from there\n\t\tif ( hooks && \"get\" in hooks ) {\n\t\t\tval = hooks.get( elem, true, extra );\n\t\t}\n\n\t\t// Otherwise, if a way to get the computed value exists, use that\n\t\tif ( val === undefined ) {\n\t\t\tval = curCSS( elem, name, styles );\n\t\t}\n\n\t\t//convert \"normal\" to computed value\n\t\tif ( val === \"normal\" && name in cssNormalTransform ) {\n\t\t\tval = cssNormalTransform[ name ];\n\t\t}\n\n\t\t// Return, converting to number if forced or a qualifier was provided and val looks numeric\n\t\tif ( extra === \"\" || extra ) {\n\t\t\tnum = parseFloat( val );\n\t\t\treturn extra === true || jQuery.isNumeric( num ) ? num || 0 : val;\n\t\t}\n\t\treturn val;\n\t}\n});\n\n// NOTE: we've included the \"window\" in window.getComputedStyle\n// because jsdom on node.js will break without it.\nif ( window.getComputedStyle ) {\n\tgetStyles = function( elem ) {\n\t\treturn window.getComputedStyle( elem, null );\n\t};\n\n\tcurCSS = function( elem, name, _computed ) {\n\t\tvar width, minWidth, maxWidth,\n\t\t\tcomputed = _computed || getStyles( elem ),\n\n\t\t\t// getPropertyValue is only needed for .css('filter') in IE9, see #12537\n\t\t\tret = computed ? computed.getPropertyValue( name ) || computed[ name ] : undefined,\n\t\t\tstyle = elem.style;\n\n\t\tif ( computed ) {\n\n\t\t\tif ( ret === \"\" && !jQuery.contains( elem.ownerDocument, elem ) ) {\n\t\t\t\tret = jQuery.style( elem, name );\n\t\t\t}\n\n\t\t\t// A tribute to the \"awesome hack by Dean Edwards\"\n\t\t\t// Chrome < 17 and Safari 5.0 uses \"computed value\" instead of \"used value\" for margin-right\n\t\t\t// Safari 5.1.7 (at least) returns percentage for a larger set of values, but width seems to be reliably pixels\n\t\t\t// this is against the CSSOM draft spec: http://dev.w3.org/csswg/cssom/#resolved-values\n\t\t\tif ( rnumnonpx.test( ret ) && rmargin.test( name ) ) {\n\n\t\t\t\t// Remember the original values\n\t\t\t\twidth = style.width;\n\t\t\t\tminWidth = style.minWidth;\n\t\t\t\tmaxWidth = style.maxWidth;\n\n\t\t\t\t// Put in the new values to get a computed value out\n\t\t\t\tstyle.minWidth = style.maxWidth = style.width = ret;\n\t\t\t\tret = computed.width;\n\n\t\t\t\t// Revert the changed values\n\t\t\t\tstyle.width = width;\n\t\t\t\tstyle.minWidth = minWidth;\n\t\t\t\tstyle.maxWidth = maxWidth;\n\t\t\t}\n\t\t}\n\n\t\treturn ret;\n\t};\n} else if ( document.documentElement.currentStyle ) {\n\tgetStyles = function( elem ) {\n\t\treturn elem.currentStyle;\n\t};\n\n\tcurCSS = function( elem, name, _computed ) {\n\t\tvar left, rs, rsLeft,\n\t\t\tcomputed = _computed || getStyles( elem ),\n\t\t\tret = computed ? computed[ name ] : undefined,\n\t\t\tstyle = elem.style;\n\n\t\t// Avoid setting ret to empty string here\n\t\t// so we don't default to auto\n\t\tif ( ret == null && style && style[ name ] ) {\n\t\t\tret = style[ name ];\n\t\t}\n\n\t\t// From the awesome hack by Dean Edwards\n\t\t// http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291\n\n\t\t// If we're not dealing with a regular pixel number\n\t\t// but a number that has a weird ending, we need to convert it to pixels\n\t\t// but not position css attributes, as those are proportional to the parent element instead\n\t\t// and we can't measure the parent instead because it might trigger a \"stacking dolls\" problem\n\t\tif ( rnumnonpx.test( ret ) && !rposition.test( name ) ) {\n\n\t\t\t// Remember the original values\n\t\t\tleft = style.left;\n\t\t\trs = elem.runtimeStyle;\n\t\t\trsLeft = rs && rs.left;\n\n\t\t\t// Put in the new values to get a computed value out\n\t\t\tif ( rsLeft ) {\n\t\t\t\trs.left = elem.currentStyle.left;\n\t\t\t}\n\t\t\tstyle.left = name === \"fontSize\" ? \"1em\" : ret;\n\t\t\tret = style.pixelLeft + \"px\";\n\n\t\t\t// Revert the changed values\n\t\t\tstyle.left = left;\n\t\t\tif ( rsLeft ) {\n\t\t\t\trs.left = rsLeft;\n\t\t\t}\n\t\t}\n\n\t\treturn ret === \"\" ? \"auto\" : ret;\n\t};\n}\n\nfunction setPositiveNumber( elem, value, subtract ) {\n\tvar matches = rnumsplit.exec( value );\n\treturn matches ?\n\t\t// Guard against undefined \"subtract\", e.g., when used as in cssHooks\n\t\tMath.max( 0, matches[ 1 ] - ( subtract || 0 ) ) + ( matches[ 2 ] || \"px\" ) :\n\t\tvalue;\n}\n\nfunction augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) {\n\tvar i = extra === ( isBorderBox ? \"border\" : \"content\" ) ?\n\t\t// If we already have the right measurement, avoid augmentation\n\t\t4 :\n\t\t// Otherwise initialize for horizontal or vertical properties\n\t\tname === \"width\" ? 1 : 0,\n\n\t\tval = 0;\n\n\tfor ( ; i < 4; i += 2 ) {\n\t\t// both box models exclude margin, so add it if we want it\n\t\tif ( extra === \"margin\" ) {\n\t\t\tval += jQuery.css( elem, extra + cssExpand[ i ], true, styles );\n\t\t}\n\n\t\tif ( isBorderBox ) {\n\t\t\t// border-box includes padding, so remove it if we want content\n\t\t\tif ( extra === \"content\" ) {\n\t\t\t\tval -= jQuery.css( elem, \"padding\" + cssExpand[ i ], true, styles );\n\t\t\t}\n\n\t\t\t// at this point, extra isn't border nor margin, so remove border\n\t\t\tif ( extra !== \"margin\" ) {\n\t\t\t\tval -= jQuery.css( elem, \"border\" + cssExpand[ i ] + \"Width\", true, styles );\n\t\t\t}\n\t\t} else {\n\t\t\t// at this point, extra isn't content, so add padding\n\t\t\tval += jQuery.css( elem, \"padding\" + cssExpand[ i ], true, styles );\n\n\t\t\t// at this point, extra isn't content nor padding, so add border\n\t\t\tif ( extra !== \"padding\" ) {\n\t\t\t\tval += jQuery.css( elem, \"border\" + cssExpand[ i ] + \"Width\", true, styles );\n\t\t\t}\n\t\t}\n\t}\n\n\treturn val;\n}\n\nfunction getWidthOrHeight( elem, name, extra ) {\n\n\t// Start with offset property, which is equivalent to the border-box value\n\tvar valueIsBorderBox = true,\n\t\tval = name === \"width\" ? elem.offsetWidth : elem.offsetHeight,\n\t\tstyles = getStyles( elem ),\n\t\tisBorderBox = jQuery.support.boxSizing && jQuery.css( elem, \"boxSizing\", false, styles ) === \"border-box\";\n\n\t// some non-html elements return undefined for offsetWidth, so check for null/undefined\n\t// svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285\n\t// MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668\n\tif ( val <= 0 || val == null ) {\n\t\t// Fall back to computed then uncomputed css if necessary\n\t\tval = curCSS( elem, name, styles );\n\t\tif ( val < 0 || val == null ) {\n\t\t\tval = elem.style[ name ];\n\t\t}\n\n\t\t// Computed unit is not pixels. Stop here and return.\n\t\tif ( rnumnonpx.test(val) ) {\n\t\t\treturn val;\n\t\t}\n\n\t\t// we need the check for style in case a browser which returns unreliable values\n\t\t// for getComputedStyle silently falls back to the reliable elem.style\n\t\tvalueIsBorderBox = isBorderBox && ( jQuery.support.boxSizingReliable || val === elem.style[ name ] );\n\n\t\t// Normalize \"\", auto, and prepare for extra\n\t\tval = parseFloat( val ) || 0;\n\t}\n\n\t// use the active box-sizing model to add/subtract irrelevant styles\n\treturn ( val +\n\t\taugmentWidthOrHeight(\n\t\t\telem,\n\t\t\tname,\n\t\t\textra || ( isBorderBox ? \"border\" : \"content\" ),\n\t\t\tvalueIsBorderBox,\n\t\t\tstyles\n\t\t)\n\t) + \"px\";\n}\n\n// Try to determine the default display value of an element\nfunction css_defaultDisplay( nodeName ) {\n\tvar doc = document,\n\t\tdisplay = elemdisplay[ nodeName ];\n\n\tif ( !display ) {\n\t\tdisplay = actualDisplay( nodeName, doc );\n\n\t\t// If the simple way fails, read from inside an iframe\n\t\tif ( display === \"none\" || !display ) {\n\t\t\t// Use the already-created iframe if possible\n\t\t\tiframe = ( iframe ||\n\t\t\t\tjQuery(\"<iframe frameborder='0' width='0' height='0'/>\")\n\t\t\t\t.css( \"cssText\", \"display:block !important\" )\n\t\t\t).appendTo( doc.documentElement );\n\n\t\t\t// Always write a new HTML skeleton so Webkit and Firefox don't choke on reuse\n\t\t\tdoc = ( iframe[0].contentWindow || iframe[0].contentDocument ).document;\n\t\t\tdoc.write(\"<!doctype html><html><body>\");\n\t\t\tdoc.close();\n\n\t\t\tdisplay = actualDisplay( nodeName, doc );\n\t\t\tiframe.detach();\n\t\t}\n\n\t\t// Store the correct default display\n\t\telemdisplay[ nodeName ] = display;\n\t}\n\n\treturn display;\n}\n\n// Called ONLY from within css_defaultDisplay\nfunction actualDisplay( name, doc ) {\n\tvar elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ),\n\t\tdisplay = jQuery.css( elem[0], \"display\" );\n\telem.remove();\n\treturn display;\n}\n\njQuery.each([ \"height\", \"width\" ], function( i, name ) {\n\tjQuery.cssHooks[ name ] = {\n\t\tget: function( elem, computed, extra ) {\n\t\t\tif ( computed ) {\n\t\t\t\t// certain elements can have dimension info if we invisibly show them\n\t\t\t\t// however, it must have a current display style that would benefit from this\n\t\t\t\treturn elem.offsetWidth === 0 && rdisplayswap.test( jQuery.css( elem, \"display\" ) ) ?\n\t\t\t\t\tjQuery.swap( elem, cssShow, function() {\n\t\t\t\t\t\treturn getWidthOrHeight( elem, name, extra );\n\t\t\t\t\t}) :\n\t\t\t\t\tgetWidthOrHeight( elem, name, extra );\n\t\t\t}\n\t\t},\n\n\t\tset: function( elem, value, extra ) {\n\t\t\tvar styles = extra && getStyles( elem );\n\t\t\treturn setPositiveNumber( elem, value, extra ?\n\t\t\t\taugmentWidthOrHeight(\n\t\t\t\t\telem,\n\t\t\t\t\tname,\n\t\t\t\t\textra,\n\t\t\t\t\tjQuery.support.boxSizing && jQuery.css( elem, \"boxSizing\", false, styles ) === \"border-box\",\n\t\t\t\t\tstyles\n\t\t\t\t) : 0\n\t\t\t);\n\t\t}\n\t};\n});\n\nif ( !jQuery.support.opacity ) {\n\tjQuery.cssHooks.opacity = {\n\t\tget: function( elem, computed ) {\n\t\t\t// IE uses filters for opacity\n\t\t\treturn ropacity.test( (computed && elem.currentStyle ? elem.currentStyle.filter : elem.style.filter) || \"\" ) ?\n\t\t\t\t( 0.01 * parseFloat( RegExp.$1 ) ) + \"\" :\n\t\t\t\tcomputed ? \"1\" : \"\";\n\t\t},\n\n\t\tset: function( elem, value ) {\n\t\t\tvar style = elem.style,\n\t\t\t\tcurrentStyle = elem.currentStyle,\n\t\t\t\topacity = jQuery.isNumeric( value ) ? \"alpha(opacity=\" + value * 100 + \")\" : \"\",\n\t\t\t\tfilter = currentStyle && currentStyle.filter || style.filter || \"\";\n\n\t\t\t// IE has trouble with opacity if it does not have layout\n\t\t\t// Force it by setting the zoom level\n\t\t\tstyle.zoom = 1;\n\n\t\t\t// if setting opacity to 1, and no other filters exist - attempt to remove filter attribute #6652\n\t\t\t// if value === \"\", then remove inline opacity #12685\n\t\t\tif ( ( value >= 1 || value === \"\" ) &&\n\t\t\t\t\tjQuery.trim( filter.replace( ralpha, \"\" ) ) === \"\" &&\n\t\t\t\t\tstyle.removeAttribute ) {\n\n\t\t\t\t// Setting style.filter to null, \"\" & \" \" still leave \"filter:\" in the cssText\n\t\t\t\t// if \"filter:\" is present at all, clearType is disabled, we want to avoid this\n\t\t\t\t// style.removeAttribute is IE Only, but so apparently is this code path...\n\t\t\t\tstyle.removeAttribute( \"filter\" );\n\n\t\t\t\t// if there is no filter style applied in a css rule or unset inline opacity, we are done\n\t\t\t\tif ( value === \"\" || currentStyle && !currentStyle.filter ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// otherwise, set new filter values\n\t\t\tstyle.filter = ralpha.test( filter ) ?\n\t\t\t\tfilter.replace( ralpha, opacity ) :\n\t\t\t\tfilter + \" \" + opacity;\n\t\t}\n\t};\n}\n\n// These hooks cannot be added until DOM ready because the support test\n// for it is not run until after DOM ready\njQuery(function() {\n\tif ( !jQuery.support.reliableMarginRight ) {\n\t\tjQuery.cssHooks.marginRight = {\n\t\t\tget: function( elem, computed ) {\n\t\t\t\tif ( computed ) {\n\t\t\t\t\t// WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right\n\t\t\t\t\t// Work around by temporarily setting element display to inline-block\n\t\t\t\t\treturn jQuery.swap( elem, { \"display\": \"inline-block\" },\n\t\t\t\t\t\tcurCSS, [ elem, \"marginRight\" ] );\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t}\n\n\t// Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084\n\t// getComputedStyle returns percent when specified for top/left/bottom/right\n\t// rather than make the css module depend on the offset module, we just check for it here\n\tif ( !jQuery.support.pixelPosition && jQuery.fn.position ) {\n\t\tjQuery.each( [ \"top\", \"left\" ], function( i, prop ) {\n\t\t\tjQuery.cssHooks[ prop ] = {\n\t\t\t\tget: function( elem, computed ) {\n\t\t\t\t\tif ( computed ) {\n\t\t\t\t\t\tcomputed = curCSS( elem, prop );\n\t\t\t\t\t\t// if curCSS returns percentage, fallback to offset\n\t\t\t\t\t\treturn rnumnonpx.test( computed ) ?\n\t\t\t\t\t\t\tjQuery( elem ).position()[ prop ] + \"px\" :\n\t\t\t\t\t\t\tcomputed;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\t\t});\n\t}\n\n});\n\nif ( jQuery.expr && jQuery.expr.filters ) {\n\tjQuery.expr.filters.hidden = function( elem ) {\n\t\t// Support: Opera <= 12.12\n\t\t// Opera reports offsetWidths and offsetHeights less than zero on some elements\n\t\treturn elem.offsetWidth <= 0 && elem.offsetHeight <= 0 ||\n\t\t\t(!jQuery.support.reliableHiddenOffsets && ((elem.style && elem.style.display) || jQuery.css( elem, \"display\" )) === \"none\");\n\t};\n\n\tjQuery.expr.filters.visible = function( elem ) {\n\t\treturn !jQuery.expr.filters.hidden( elem );\n\t};\n}\n\n// These hooks are used by animate to expand properties\njQuery.each({\n\tmargin: \"\",\n\tpadding: \"\",\n\tborder: \"Width\"\n}, function( prefix, suffix ) {\n\tjQuery.cssHooks[ prefix + suffix ] = {\n\t\texpand: function( value ) {\n\t\t\tvar i = 0,\n\t\t\t\texpanded = {},\n\n\t\t\t\t// assumes a single number if not a string\n\t\t\t\tparts = typeof value === \"string\" ? value.split(\" \") : [ value ];\n\n\t\t\tfor ( ; i < 4; i++ ) {\n\t\t\t\texpanded[ prefix + cssExpand[ i ] + suffix ] =\n\t\t\t\t\tparts[ i ] || parts[ i - 2 ] || parts[ 0 ];\n\t\t\t}\n\n\t\t\treturn expanded;\n\t\t}\n\t};\n\n\tif ( !rmargin.test( prefix ) ) {\n\t\tjQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber;\n\t}\n});\nvar r20 = /%20/g,\n\trbracket = /\\[\\]$/,\n\trCRLF = /\\r?\\n/g,\n\trsubmitterTypes = /^(?:submit|button|image|reset|file)$/i,\n\trsubmittable = /^(?:input|select|textarea|keygen)/i;\n\njQuery.fn.extend({\n\tserialize: function() {\n\t\treturn jQuery.param( this.serializeArray() );\n\t},\n\tserializeArray: function() {\n\t\treturn this.map(function(){\n\t\t\t// Can add propHook for \"elements\" to filter or add form elements\n\t\t\tvar elements = jQuery.prop( this, \"elements\" );\n\t\t\treturn elements ? jQuery.makeArray( elements ) : this;\n\t\t})\n\t\t.filter(function(){\n\t\t\tvar type = this.type;\n\t\t\t// Use .is(\":disabled\") so that fieldset[disabled] works\n\t\t\treturn this.name && !jQuery( this ).is( \":disabled\" ) &&\n\t\t\t\trsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) &&\n\t\t\t\t( this.checked || !manipulation_rcheckableType.test( type ) );\n\t\t})\n\t\t.map(function( i, elem ){\n\t\t\tvar val = jQuery( this ).val();\n\n\t\t\treturn val == null ?\n\t\t\t\tnull :\n\t\t\t\tjQuery.isArray( val ) ?\n\t\t\t\t\tjQuery.map( val, function( val ){\n\t\t\t\t\t\treturn { name: elem.name, value: val.replace( rCRLF, \"\\r\\n\" ) };\n\t\t\t\t\t}) :\n\t\t\t\t\t{ name: elem.name, value: val.replace( rCRLF, \"\\r\\n\" ) };\n\t\t}).get();\n\t}\n});\n\n//Serialize an array of form elements or a set of\n//key/values into a query string\njQuery.param = function( a, traditional ) {\n\tvar prefix,\n\t\ts = [],\n\t\tadd = function( key, value ) {\n\t\t\t// If value is a function, invoke it and return its value\n\t\t\tvalue = jQuery.isFunction( value ) ? value() : ( value == null ? \"\" : value );\n\t\t\ts[ s.length ] = encodeURIComponent( key ) + \"=\" + encodeURIComponent( value );\n\t\t};\n\n\t// Set traditional to true for jQuery <= 1.3.2 behavior.\n\tif ( traditional === undefined ) {\n\t\ttraditional = jQuery.ajaxSettings && jQuery.ajaxSettings.traditional;\n\t}\n\n\t// If an array was passed in, assume that it is an array of form elements.\n\tif ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {\n\t\t// Serialize the form elements\n\t\tjQuery.each( a, function() {\n\t\t\tadd( this.name, this.value );\n\t\t});\n\n\t} else {\n\t\t// If traditional, encode the \"old\" way (the way 1.3.2 or older\n\t\t// did it), otherwise encode params recursively.\n\t\tfor ( prefix in a ) {\n\t\t\tbuildParams( prefix, a[ prefix ], traditional, add );\n\t\t}\n\t}\n\n\t// Return the resulting serialization\n\treturn s.join( \"&\" ).replace( r20, \"+\" );\n};\n\nfunction buildParams( prefix, obj, traditional, add ) {\n\tvar name;\n\n\tif ( jQuery.isArray( obj ) ) {\n\t\t// Serialize array item.\n\t\tjQuery.each( obj, function( i, v ) {\n\t\t\tif ( traditional || rbracket.test( prefix ) ) {\n\t\t\t\t// Treat each array item as a scalar.\n\t\t\t\tadd( prefix, v );\n\n\t\t\t} else {\n\t\t\t\t// Item is non-scalar (array or object), encode its numeric index.\n\t\t\t\tbuildParams( prefix + \"[\" + ( typeof v === \"object\" ? i : \"\" ) + \"]\", v, traditional, add );\n\t\t\t}\n\t\t});\n\n\t} else if ( !traditional && jQuery.type( obj ) === \"object\" ) {\n\t\t// Serialize object item.\n\t\tfor ( name in obj ) {\n\t\t\tbuildParams( prefix + \"[\" + name + \"]\", obj[ name ], traditional, add );\n\t\t}\n\n\t} else {\n\t\t// Serialize scalar item.\n\t\tadd( prefix, obj );\n\t}\n}\njQuery.each( (\"blur focus focusin focusout load resize scroll unload click dblclick \" +\n\t\"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave \" +\n\t\"change select submit keydown keypress keyup error contextmenu\").split(\" \"), function( i, name ) {\n\n\t// Handle event binding\n\tjQuery.fn[ name ] = function( data, fn ) {\n\t\treturn arguments.length > 0 ?\n\t\t\tthis.on( name, null, data, fn ) :\n\t\t\tthis.trigger( name );\n\t};\n});\n\njQuery.fn.extend({\n\thover: function( fnOver, fnOut ) {\n\t\treturn this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );\n\t},\n\n\tbind: function( types, data, fn ) {\n\t\treturn this.on( types, null, data, fn );\n\t},\n\tunbind: function( types, fn ) {\n\t\treturn this.off( types, null, fn );\n\t},\n\n\tdelegate: function( selector, types, data, fn ) {\n\t\treturn this.on( types, selector, data, fn );\n\t},\n\tundelegate: function( selector, types, fn ) {\n\t\t// ( namespace ) or ( selector, types [, fn] )\n\t\treturn arguments.length === 1 ? this.off( selector, \"**\" ) : this.off( types, selector || \"**\", fn );\n\t}\n});\nvar\n\t// Document location\n\tajaxLocParts,\n\tajaxLocation,\n\tajax_nonce = jQuery.now(),\n\n\tajax_rquery = /\\?/,\n\trhash = /#.*$/,\n\trts = /([?&])_=[^&]*/,\n\trheaders = /^(.*?):[ \\t]*([^\\r\\n]*)\\r?$/mg, // IE leaves an \\r character at EOL\n\t// #7653, #8125, #8152: local protocol detection\n\trlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,\n\trnoContent = /^(?:GET|HEAD)$/,\n\trprotocol = /^\\/\\//,\n\trurl = /^([\\w.+-]+:)(?:\\/\\/([^\\/?#:]*)(?::(\\d+)|)|)/,\n\n\t// Keep a copy of the old load method\n\t_load = jQuery.fn.load,\n\n\t/* Prefilters\n\t * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)\n\t * 2) These are called:\n\t *    - BEFORE asking for a transport\n\t *    - AFTER param serialization (s.data is a string if s.processData is true)\n\t * 3) key is the dataType\n\t * 4) the catchall symbol \"*\" can be used\n\t * 5) execution will start with transport dataType and THEN continue down to \"*\" if needed\n\t */\n\tprefilters = {},\n\n\t/* Transports bindings\n\t * 1) key is the dataType\n\t * 2) the catchall symbol \"*\" can be used\n\t * 3) selection will start with transport dataType and THEN go to \"*\" if needed\n\t */\n\ttransports = {},\n\n\t// Avoid comment-prolog char sequence (#10098); must appease lint and evade compression\n\tallTypes = \"*/\".concat(\"*\");\n\n// #8138, IE may throw an exception when accessing\n// a field from window.location if document.domain has been set\ntry {\n\tajaxLocation = location.href;\n} catch( e ) {\n\t// Use the href attribute of an A element\n\t// since IE will modify it given document.location\n\tajaxLocation = document.createElement( \"a\" );\n\tajaxLocation.href = \"\";\n\tajaxLocation = ajaxLocation.href;\n}\n\n// Segment location into parts\najaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || [];\n\n// Base \"constructor\" for jQuery.ajaxPrefilter and jQuery.ajaxTransport\nfunction addToPrefiltersOrTransports( structure ) {\n\n\t// dataTypeExpression is optional and defaults to \"*\"\n\treturn function( dataTypeExpression, func ) {\n\n\t\tif ( typeof dataTypeExpression !== \"string\" ) {\n\t\t\tfunc = dataTypeExpression;\n\t\t\tdataTypeExpression = \"*\";\n\t\t}\n\n\t\tvar dataType,\n\t\t\ti = 0,\n\t\t\tdataTypes = dataTypeExpression.toLowerCase().match( core_rnotwhite ) || [];\n\n\t\tif ( jQuery.isFunction( func ) ) {\n\t\t\t// For each dataType in the dataTypeExpression\n\t\t\twhile ( (dataType = dataTypes[i++]) ) {\n\t\t\t\t// Prepend if requested\n\t\t\t\tif ( dataType[0] === \"+\" ) {\n\t\t\t\t\tdataType = dataType.slice( 1 ) || \"*\";\n\t\t\t\t\t(structure[ dataType ] = structure[ dataType ] || []).unshift( func );\n\n\t\t\t\t// Otherwise append\n\t\t\t\t} else {\n\t\t\t\t\t(structure[ dataType ] = structure[ dataType ] || []).push( func );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n}\n\n// Base inspection function for prefilters and transports\nfunction inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\tvar inspected = {},\n\t\tseekingTransport = ( structure === transports );\n\n\tfunction inspect( dataType ) {\n\t\tvar selected;\n\t\tinspected[ dataType ] = true;\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\tif( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\treturn false;\n\t\t\t} else if ( seekingTransport ) {\n\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t}\n\t\t});\n\t\treturn selected;\n\t}\n\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}\n\n// A special extend for ajax options\n// that takes \"flat\" options (not to be deep extended)\n// Fixes #9887\nfunction ajaxExtend( target, src ) {\n\tvar deep, key,\n\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n\tfor ( key in src ) {\n\t\tif ( src[ key ] !== undefined ) {\n\t\t\t( flatOptions[ key ] ? target : ( deep || (deep = {}) ) )[ key ] = src[ key ];\n\t\t}\n\t}\n\tif ( deep ) {\n\t\tjQuery.extend( true, target, deep );\n\t}\n\n\treturn target;\n}\n\njQuery.fn.load = function( url, params, callback ) {\n\tif ( typeof url !== \"string\" && _load ) {\n\t\treturn _load.apply( this, arguments );\n\t}\n\n\tvar selector, response, type,\n\t\tself = this,\n\t\toff = url.indexOf(\" \");\n\n\tif ( off >= 0 ) {\n\t\tselector = url.slice( off, url.length );\n\t\turl = url.slice( 0, off );\n\t}\n\n\t// If it's a function\n\tif ( jQuery.isFunction( params ) ) {\n\n\t\t// We assume that it's the callback\n\t\tcallback = params;\n\t\tparams = undefined;\n\n\t// Otherwise, build a param string\n\t} else if ( params && typeof params === \"object\" ) {\n\t\ttype = \"POST\";\n\t}\n\n\t// If we have elements to modify, make the request\n\tif ( self.length > 0 ) {\n\t\tjQuery.ajax({\n\t\t\turl: url,\n\n\t\t\t// if \"type\" variable is undefined, then \"GET\" method will be used\n\t\t\ttype: type,\n\t\t\tdataType: \"html\",\n\t\t\tdata: params\n\t\t}).done(function( responseText ) {\n\n\t\t\t// Save response for use in complete callback\n\t\t\tresponse = arguments;\n\n\t\t\tself.html( selector ?\n\n\t\t\t\t// If a selector was specified, locate the right elements in a dummy div\n\t\t\t\t// Exclude scripts to avoid IE 'Permission Denied' errors\n\t\t\t\tjQuery(\"<div>\").append( jQuery.parseHTML( responseText ) ).find( selector ) :\n\n\t\t\t\t// Otherwise use the full result\n\t\t\t\tresponseText );\n\n\t\t}).complete( callback && function( jqXHR, status ) {\n\t\t\tself.each( callback, response || [ jqXHR.responseText, status, jqXHR ] );\n\t\t});\n\t}\n\n\treturn this;\n};\n\n// Attach a bunch of functions for handling common AJAX events\njQuery.each( [ \"ajaxStart\", \"ajaxStop\", \"ajaxComplete\", \"ajaxError\", \"ajaxSuccess\", \"ajaxSend\" ], function( i, type ){\n\tjQuery.fn[ type ] = function( fn ){\n\t\treturn this.on( type, fn );\n\t};\n});\n\njQuery.extend({\n\n\t// Counter for holding the number of active queries\n\tactive: 0,\n\n\t// Last-Modified header cache for next request\n\tlastModified: {},\n\tetag: {},\n\n\tajaxSettings: {\n\t\turl: ajaxLocation,\n\t\ttype: \"GET\",\n\t\tisLocal: rlocalProtocol.test( ajaxLocParts[ 1 ] ),\n\t\tglobal: true,\n\t\tprocessData: true,\n\t\tasync: true,\n\t\tcontentType: \"application/x-www-form-urlencoded; charset=UTF-8\",\n\t\t/*\n\t\ttimeout: 0,\n\t\tdata: null,\n\t\tdataType: null,\n\t\tusername: null,\n\t\tpassword: null,\n\t\tcache: null,\n\t\tthrows: false,\n\t\ttraditional: false,\n\t\theaders: {},\n\t\t*/\n\n\t\taccepts: {\n\t\t\t\"*\": allTypes,\n\t\t\ttext: \"text/plain\",\n\t\t\thtml: \"text/html\",\n\t\t\txml: \"application/xml, text/xml\",\n\t\t\tjson: \"application/json, text/javascript\"\n\t\t},\n\n\t\tcontents: {\n\t\t\txml: /xml/,\n\t\t\thtml: /html/,\n\t\t\tjson: /json/\n\t\t},\n\n\t\tresponseFields: {\n\t\t\txml: \"responseXML\",\n\t\t\ttext: \"responseText\",\n\t\t\tjson: \"responseJSON\"\n\t\t},\n\n\t\t// Data converters\n\t\t// Keys separate source (or catchall \"*\") and destination types with a single space\n\t\tconverters: {\n\n\t\t\t// Convert anything to text\n\t\t\t\"* text\": String,\n\n\t\t\t// Text to html (true = no transformation)\n\t\t\t\"text html\": true,\n\n\t\t\t// Evaluate text as a json expression\n\t\t\t\"text json\": jQuery.parseJSON,\n\n\t\t\t// Parse text as xml\n\t\t\t\"text xml\": jQuery.parseXML\n\t\t},\n\n\t\t// For options that shouldn't be deep extended:\n\t\t// you can add your own custom options here if\n\t\t// and when you create one that shouldn't be\n\t\t// deep extended (see ajaxExtend)\n\t\tflatOptions: {\n\t\t\turl: true,\n\t\t\tcontext: true\n\t\t}\n\t},\n\n\t// Creates a full fledged settings object into target\n\t// with both ajaxSettings and settings fields.\n\t// If target is omitted, writes into ajaxSettings.\n\tajaxSetup: function( target, settings ) {\n\t\treturn settings ?\n\n\t\t\t// Building a settings object\n\t\t\tajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) :\n\n\t\t\t// Extending ajaxSettings\n\t\t\tajaxExtend( jQuery.ajaxSettings, target );\n\t},\n\n\tajaxPrefilter: addToPrefiltersOrTransports( prefilters ),\n\tajaxTransport: addToPrefiltersOrTransports( transports ),\n\n\t// Main method\n\tajax: function( url, options ) {\n\n\t\t// If url is an object, simulate pre-1.5 signature\n\t\tif ( typeof url === \"object\" ) {\n\t\t\toptions = url;\n\t\t\turl = undefined;\n\t\t}\n\n\t\t// Force options to be an object\n\t\toptions = options || {};\n\n\t\tvar // Cross-domain detection vars\n\t\t\tparts,\n\t\t\t// Loop variable\n\t\t\ti,\n\t\t\t// URL without anti-cache param\n\t\t\tcacheURL,\n\t\t\t// Response headers as string\n\t\t\tresponseHeadersString,\n\t\t\t// timeout handle\n\t\t\ttimeoutTimer,\n\n\t\t\t// To know if global events are to be dispatched\n\t\t\tfireGlobals,\n\n\t\t\ttransport,\n\t\t\t// Response headers\n\t\t\tresponseHeaders,\n\t\t\t// Create the final options object\n\t\t\ts = jQuery.ajaxSetup( {}, options ),\n\t\t\t// Callbacks context\n\t\t\tcallbackContext = s.context || s,\n\t\t\t// Context for global events is callbackContext if it is a DOM node or jQuery collection\n\t\t\tglobalEventContext = s.context && ( callbackContext.nodeType || callbackContext.jquery ) ?\n\t\t\t\tjQuery( callbackContext ) :\n\t\t\t\tjQuery.event,\n\t\t\t// Deferreds\n\t\t\tdeferred = jQuery.Deferred(),\n\t\t\tcompleteDeferred = jQuery.Callbacks(\"once memory\"),\n\t\t\t// Status-dependent callbacks\n\t\t\tstatusCode = s.statusCode || {},\n\t\t\t// Headers (they are sent all at once)\n\t\t\trequestHeaders = {},\n\t\t\trequestHeadersNames = {},\n\t\t\t// The jqXHR state\n\t\t\tstate = 0,\n\t\t\t// Default abort message\n\t\t\tstrAbort = \"canceled\",\n\t\t\t// Fake xhr\n\t\t\tjqXHR = {\n\t\t\t\treadyState: 0,\n\n\t\t\t\t// Builds headers hashtable if needed\n\t\t\t\tgetResponseHeader: function( key ) {\n\t\t\t\t\tvar match;\n\t\t\t\t\tif ( state === 2 ) {\n\t\t\t\t\t\tif ( !responseHeaders ) {\n\t\t\t\t\t\t\tresponseHeaders = {};\n\t\t\t\t\t\t\twhile ( (match = rheaders.exec( responseHeadersString )) ) {\n\t\t\t\t\t\t\t\tresponseHeaders[ match[1].toLowerCase() ] = match[ 2 ];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tmatch = responseHeaders[ key.toLowerCase() ];\n\t\t\t\t\t}\n\t\t\t\t\treturn match == null ? null : match;\n\t\t\t\t},\n\n\t\t\t\t// Raw string\n\t\t\t\tgetAllResponseHeaders: function() {\n\t\t\t\t\treturn state === 2 ? responseHeadersString : null;\n\t\t\t\t},\n\n\t\t\t\t// Caches the header\n\t\t\t\tsetRequestHeader: function( name, value ) {\n\t\t\t\t\tvar lname = name.toLowerCase();\n\t\t\t\t\tif ( !state ) {\n\t\t\t\t\t\tname = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name;\n\t\t\t\t\t\trequestHeaders[ name ] = value;\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\n\t\t\t\t// Overrides response content-type header\n\t\t\t\toverrideMimeType: function( type ) {\n\t\t\t\t\tif ( !state ) {\n\t\t\t\t\t\ts.mimeType = type;\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\n\t\t\t\t// Status-dependent callbacks\n\t\t\t\tstatusCode: function( map ) {\n\t\t\t\t\tvar code;\n\t\t\t\t\tif ( map ) {\n\t\t\t\t\t\tif ( state < 2 ) {\n\t\t\t\t\t\t\tfor ( code in map ) {\n\t\t\t\t\t\t\t\t// Lazy-add the new callback in a way that preserves old ones\n\t\t\t\t\t\t\t\tstatusCode[ code ] = [ statusCode[ code ], map[ code ] ];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// Execute the appropriate callbacks\n\t\t\t\t\t\t\tjqXHR.always( map[ jqXHR.status ] );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\n\t\t\t\t// Cancel the request\n\t\t\t\tabort: function( statusText ) {\n\t\t\t\t\tvar finalText = statusText || strAbort;\n\t\t\t\t\tif ( transport ) {\n\t\t\t\t\t\ttransport.abort( finalText );\n\t\t\t\t\t}\n\t\t\t\t\tdone( 0, finalText );\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\t\t\t};\n\n\t\t// Attach deferreds\n\t\tdeferred.promise( jqXHR ).complete = completeDeferred.add;\n\t\tjqXHR.success = jqXHR.done;\n\t\tjqXHR.error = jqXHR.fail;\n\n\t\t// Remove hash character (#7531: and string promotion)\n\t\t// Add protocol if not provided (#5866: IE7 issue with protocol-less urls)\n\t\t// Handle falsy url in the settings object (#10093: consistency with old signature)\n\t\t// We also use the url parameter if available\n\t\ts.url = ( ( url || s.url || ajaxLocation ) + \"\" ).replace( rhash, \"\" ).replace( rprotocol, ajaxLocParts[ 1 ] + \"//\" );\n\n\t\t// Alias method option to type as per ticket #12004\n\t\ts.type = options.method || options.type || s.method || s.type;\n\n\t\t// Extract dataTypes list\n\t\ts.dataTypes = jQuery.trim( s.dataType || \"*\" ).toLowerCase().match( core_rnotwhite ) || [\"\"];\n\n\t\t// A cross-domain request is in order when we have a protocol:host:port mismatch\n\t\tif ( s.crossDomain == null ) {\n\t\t\tparts = rurl.exec( s.url.toLowerCase() );\n\t\t\ts.crossDomain = !!( parts &&\n\t\t\t\t( parts[ 1 ] !== ajaxLocParts[ 1 ] || parts[ 2 ] !== ajaxLocParts[ 2 ] ||\n\t\t\t\t\t( parts[ 3 ] || ( parts[ 1 ] === \"http:\" ? \"80\" : \"443\" ) ) !==\n\t\t\t\t\t\t( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === \"http:\" ? \"80\" : \"443\" ) ) )\n\t\t\t);\n\t\t}\n\n\t\t// Convert data if not already a string\n\t\tif ( s.data && s.processData && typeof s.data !== \"string\" ) {\n\t\t\ts.data = jQuery.param( s.data, s.traditional );\n\t\t}\n\n\t\t// Apply prefilters\n\t\tinspectPrefiltersOrTransports( prefilters, s, options, jqXHR );\n\n\t\t// If request was aborted inside a prefilter, stop there\n\t\tif ( state === 2 ) {\n\t\t\treturn jqXHR;\n\t\t}\n\n\t\t// We can fire global events as of now if asked to\n\t\tfireGlobals = s.global;\n\n\t\t// Watch for a new set of requests\n\t\tif ( fireGlobals && jQuery.active++ === 0 ) {\n\t\t\tjQuery.event.trigger(\"ajaxStart\");\n\t\t}\n\n\t\t// Uppercase the type\n\t\ts.type = s.type.toUpperCase();\n\n\t\t// Determine if request has content\n\t\ts.hasContent = !rnoContent.test( s.type );\n\n\t\t// Save the URL in case we're toying with the If-Modified-Since\n\t\t// and/or If-None-Match header later on\n\t\tcacheURL = s.url;\n\n\t\t// More options handling for requests with no content\n\t\tif ( !s.hasContent ) {\n\n\t\t\t// If data is available, append data to url\n\t\t\tif ( s.data ) {\n\t\t\t\tcacheURL = ( s.url += ( ajax_rquery.test( cacheURL ) ? \"&\" : \"?\" ) + s.data );\n\t\t\t\t// #9682: remove data so that it's not used in an eventual retry\n\t\t\t\tdelete s.data;\n\t\t\t}\n\n\t\t\t// Add anti-cache in url if needed\n\t\t\tif ( s.cache === false ) {\n\t\t\t\ts.url = rts.test( cacheURL ) ?\n\n\t\t\t\t\t// If there is already a '_' parameter, set its value\n\t\t\t\t\tcacheURL.replace( rts, \"$1_=\" + ajax_nonce++ ) :\n\n\t\t\t\t\t// Otherwise add one to the end\n\t\t\t\t\tcacheURL + ( ajax_rquery.test( cacheURL ) ? \"&\" : \"?\" ) + \"_=\" + ajax_nonce++;\n\t\t\t}\n\t\t}\n\n\t\t// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.\n\t\tif ( s.ifModified ) {\n\t\t\tif ( jQuery.lastModified[ cacheURL ] ) {\n\t\t\t\tjqXHR.setRequestHeader( \"If-Modified-Since\", jQuery.lastModified[ cacheURL ] );\n\t\t\t}\n\t\t\tif ( jQuery.etag[ cacheURL ] ) {\n\t\t\t\tjqXHR.setRequestHeader( \"If-None-Match\", jQuery.etag[ cacheURL ] );\n\t\t\t}\n\t\t}\n\n\t\t// Set the correct header, if data is being sent\n\t\tif ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {\n\t\t\tjqXHR.setRequestHeader( \"Content-Type\", s.contentType );\n\t\t}\n\n\t\t// Set the Accepts header for the server, depending on the dataType\n\t\tjqXHR.setRequestHeader(\n\t\t\t\"Accept\",\n\t\t\ts.dataTypes[ 0 ] && s.accepts[ s.dataTypes[0] ] ?\n\t\t\t\ts.accepts[ s.dataTypes[0] ] + ( s.dataTypes[ 0 ] !== \"*\" ? \", \" + allTypes + \"; q=0.01\" : \"\" ) :\n\t\t\t\ts.accepts[ \"*\" ]\n\t\t);\n\n\t\t// Check for headers option\n\t\tfor ( i in s.headers ) {\n\t\t\tjqXHR.setRequestHeader( i, s.headers[ i ] );\n\t\t}\n\n\t\t// Allow custom headers/mimetypes and early abort\n\t\tif ( s.beforeSend && ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) {\n\t\t\t// Abort if not done already and return\n\t\t\treturn jqXHR.abort();\n\t\t}\n\n\t\t// aborting is no longer a cancellation\n\t\tstrAbort = \"abort\";\n\n\t\t// Install callbacks on deferreds\n\t\tfor ( i in { success: 1, error: 1, complete: 1 } ) {\n\t\t\tjqXHR[ i ]( s[ i ] );\n\t\t}\n\n\t\t// Get transport\n\t\ttransport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );\n\n\t\t// If no transport, we auto-abort\n\t\tif ( !transport ) {\n\t\t\tdone( -1, \"No Transport\" );\n\t\t} else {\n\t\t\tjqXHR.readyState = 1;\n\n\t\t\t// Send global event\n\t\t\tif ( fireGlobals ) {\n\t\t\t\tglobalEventContext.trigger( \"ajaxSend\", [ jqXHR, s ] );\n\t\t\t}\n\t\t\t// Timeout\n\t\t\tif ( s.async && s.timeout > 0 ) {\n\t\t\t\ttimeoutTimer = setTimeout(function() {\n\t\t\t\t\tjqXHR.abort(\"timeout\");\n\t\t\t\t}, s.timeout );\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\tstate = 1;\n\t\t\t\ttransport.send( requestHeaders, done );\n\t\t\t} catch ( e ) {\n\t\t\t\t// Propagate exception as error if not done\n\t\t\t\tif ( state < 2 ) {\n\t\t\t\t\tdone( -1, e );\n\t\t\t\t// Simply rethrow otherwise\n\t\t\t\t} else {\n\t\t\t\t\tthrow e;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Callback for when everything is done\n\t\tfunction done( status, nativeStatusText, responses, headers ) {\n\t\t\tvar isSuccess, success, error, response, modified,\n\t\t\t\tstatusText = nativeStatusText;\n\n\t\t\t// Called once\n\t\t\tif ( state === 2 ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// State is \"done\" now\n\t\t\tstate = 2;\n\n\t\t\t// Clear timeout if it exists\n\t\t\tif ( timeoutTimer ) {\n\t\t\t\tclearTimeout( timeoutTimer );\n\t\t\t}\n\n\t\t\t// Dereference transport for early garbage collection\n\t\t\t// (no matter how long the jqXHR object will be used)\n\t\t\ttransport = undefined;\n\n\t\t\t// Cache response headers\n\t\t\tresponseHeadersString = headers || \"\";\n\n\t\t\t// Set readyState\n\t\t\tjqXHR.readyState = status > 0 ? 4 : 0;\n\n\t\t\t// Determine if successful\n\t\t\tisSuccess = status >= 200 && status < 300 || status === 304;\n\n\t\t\t// Get response data\n\t\t\tif ( responses ) {\n\t\t\t\tresponse = ajaxHandleResponses( s, jqXHR, responses );\n\t\t\t}\n\n\t\t\t// Convert no matter what (that way responseXXX fields are always set)\n\t\t\tresponse = ajaxConvert( s, response, jqXHR, isSuccess );\n\n\t\t\t// If successful, handle type chaining\n\t\t\tif ( isSuccess ) {\n\n\t\t\t\t// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.\n\t\t\t\tif ( s.ifModified ) {\n\t\t\t\t\tmodified = jqXHR.getResponseHeader(\"Last-Modified\");\n\t\t\t\t\tif ( modified ) {\n\t\t\t\t\t\tjQuery.lastModified[ cacheURL ] = modified;\n\t\t\t\t\t}\n\t\t\t\t\tmodified = jqXHR.getResponseHeader(\"etag\");\n\t\t\t\t\tif ( modified ) {\n\t\t\t\t\t\tjQuery.etag[ cacheURL ] = modified;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// if no content\n\t\t\t\tif ( status === 204 || s.type === \"HEAD\" ) {\n\t\t\t\t\tstatusText = \"nocontent\";\n\n\t\t\t\t// if not modified\n\t\t\t\t} else if ( status === 304 ) {\n\t\t\t\t\tstatusText = \"notmodified\";\n\n\t\t\t\t// If we have data, let's convert it\n\t\t\t\t} else {\n\t\t\t\t\tstatusText = response.state;\n\t\t\t\t\tsuccess = response.data;\n\t\t\t\t\terror = response.error;\n\t\t\t\t\tisSuccess = !error;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// We extract error from statusText\n\t\t\t\t// then normalize statusText and status for non-aborts\n\t\t\t\terror = statusText;\n\t\t\t\tif ( status || !statusText ) {\n\t\t\t\t\tstatusText = \"error\";\n\t\t\t\t\tif ( status < 0 ) {\n\t\t\t\t\t\tstatus = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Set data for the fake xhr object\n\t\t\tjqXHR.status = status;\n\t\t\tjqXHR.statusText = ( nativeStatusText || statusText ) + \"\";\n\n\t\t\t// Success/Error\n\t\t\tif ( isSuccess ) {\n\t\t\t\tdeferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );\n\t\t\t} else {\n\t\t\t\tdeferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );\n\t\t\t}\n\n\t\t\t// Status-dependent callbacks\n\t\t\tjqXHR.statusCode( statusCode );\n\t\t\tstatusCode = undefined;\n\n\t\t\tif ( fireGlobals ) {\n\t\t\t\tglobalEventContext.trigger( isSuccess ? \"ajaxSuccess\" : \"ajaxError\",\n\t\t\t\t\t[ jqXHR, s, isSuccess ? success : error ] );\n\t\t\t}\n\n\t\t\t// Complete\n\t\t\tcompleteDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );\n\n\t\t\tif ( fireGlobals ) {\n\t\t\t\tglobalEventContext.trigger( \"ajaxComplete\", [ jqXHR, s ] );\n\t\t\t\t// Handle the global AJAX counter\n\t\t\t\tif ( !( --jQuery.active ) ) {\n\t\t\t\t\tjQuery.event.trigger(\"ajaxStop\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn jqXHR;\n\t},\n\n\tgetJSON: function( url, data, callback ) {\n\t\treturn jQuery.get( url, data, callback, \"json\" );\n\t},\n\n\tgetScript: function( url, callback ) {\n\t\treturn jQuery.get( url, undefined, callback, \"script\" );\n\t}\n});\n\njQuery.each( [ \"get\", \"post\" ], function( i, method ) {\n\tjQuery[ method ] = function( url, data, callback, type ) {\n\t\t// shift arguments if data argument was omitted\n\t\tif ( jQuery.isFunction( data ) ) {\n\t\t\ttype = type || callback;\n\t\t\tcallback = data;\n\t\t\tdata = undefined;\n\t\t}\n\n\t\treturn jQuery.ajax({\n\t\t\turl: url,\n\t\t\ttype: method,\n\t\t\tdataType: type,\n\t\t\tdata: data,\n\t\t\tsuccess: callback\n\t\t});\n\t};\n});\n\n/* Handles responses to an ajax request:\n * - finds the right dataType (mediates between content-type and expected dataType)\n * - returns the corresponding response\n */\nfunction ajaxHandleResponses( s, jqXHR, responses ) {\n\tvar firstDataType, ct, finalDataType, type,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}\n\n/* Chain conversions given the request and the original response\n * Also sets the responseXXX fields on the jqXHR instance\n */\nfunction ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s[ \"throws\" ] ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn { state: \"success\", data: response };\n}\n// Install script dataType\njQuery.ajaxSetup({\n\taccepts: {\n\t\tscript: \"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript\"\n\t},\n\tcontents: {\n\t\tscript: /(?:java|ecma)script/\n\t},\n\tconverters: {\n\t\t\"text script\": function( text ) {\n\t\t\tjQuery.globalEval( text );\n\t\t\treturn text;\n\t\t}\n\t}\n});\n\n// Handle cache's special case and global\njQuery.ajaxPrefilter( \"script\", function( s ) {\n\tif ( s.cache === undefined ) {\n\t\ts.cache = false;\n\t}\n\tif ( s.crossDomain ) {\n\t\ts.type = \"GET\";\n\t\ts.global = false;\n\t}\n});\n\n// Bind script tag hack transport\njQuery.ajaxTransport( \"script\", function(s) {\n\n\t// This transport only deals with cross domain requests\n\tif ( s.crossDomain ) {\n\n\t\tvar script,\n\t\t\thead = document.head || jQuery(\"head\")[0] || document.documentElement;\n\n\t\treturn {\n\n\t\t\tsend: function( _, callback ) {\n\n\t\t\t\tscript = document.createElement(\"script\");\n\n\t\t\t\tscript.async = true;\n\n\t\t\t\tif ( s.scriptCharset ) {\n\t\t\t\t\tscript.charset = s.scriptCharset;\n\t\t\t\t}\n\n\t\t\t\tscript.src = s.url;\n\n\t\t\t\t// Attach handlers for all browsers\n\t\t\t\tscript.onload = script.onreadystatechange = function( _, isAbort ) {\n\n\t\t\t\t\tif ( isAbort || !script.readyState || /loaded|complete/.test( script.readyState ) ) {\n\n\t\t\t\t\t\t// Handle memory leak in IE\n\t\t\t\t\t\tscript.onload = script.onreadystatechange = null;\n\n\t\t\t\t\t\t// Remove the script\n\t\t\t\t\t\tif ( script.parentNode ) {\n\t\t\t\t\t\t\tscript.parentNode.removeChild( script );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Dereference the script\n\t\t\t\t\t\tscript = null;\n\n\t\t\t\t\t\t// Callback if not abort\n\t\t\t\t\t\tif ( !isAbort ) {\n\t\t\t\t\t\t\tcallback( 200, \"success\" );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t};\n\n\t\t\t\t// Circumvent IE6 bugs with base elements (#2709 and #4378) by prepending\n\t\t\t\t// Use native DOM manipulation to avoid our domManip AJAX trickery\n\t\t\t\thead.insertBefore( script, head.firstChild );\n\t\t\t},\n\n\t\t\tabort: function() {\n\t\t\t\tif ( script ) {\n\t\t\t\t\tscript.onload( undefined, true );\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t}\n});\nvar oldCallbacks = [],\n\trjsonp = /(=)\\?(?=&|$)|\\?\\?/;\n\n// Default jsonp settings\njQuery.ajaxSetup({\n\tjsonp: \"callback\",\n\tjsonpCallback: function() {\n\t\tvar callback = oldCallbacks.pop() || ( jQuery.expando + \"_\" + ( ajax_nonce++ ) );\n\t\tthis[ callback ] = true;\n\t\treturn callback;\n\t}\n});\n\n// Detect, normalize options and install callbacks for jsonp requests\njQuery.ajaxPrefilter( \"json jsonp\", function( s, originalSettings, jqXHR ) {\n\n\tvar callbackName, overwritten, responseContainer,\n\t\tjsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ?\n\t\t\t\"url\" :\n\t\t\ttypeof s.data === \"string\" && !( s.contentType || \"\" ).indexOf(\"application/x-www-form-urlencoded\") && rjsonp.test( s.data ) && \"data\"\n\t\t);\n\n\t// Handle iff the expected data type is \"jsonp\" or we have a parameter to set\n\tif ( jsonProp || s.dataTypes[ 0 ] === \"jsonp\" ) {\n\n\t\t// Get callback name, remembering preexisting value associated with it\n\t\tcallbackName = s.jsonpCallback = jQuery.isFunction( s.jsonpCallback ) ?\n\t\t\ts.jsonpCallback() :\n\t\t\ts.jsonpCallback;\n\n\t\t// Insert callback into url or form data\n\t\tif ( jsonProp ) {\n\t\t\ts[ jsonProp ] = s[ jsonProp ].replace( rjsonp, \"$1\" + callbackName );\n\t\t} else if ( s.jsonp !== false ) {\n\t\t\ts.url += ( ajax_rquery.test( s.url ) ? \"&\" : \"?\" ) + s.jsonp + \"=\" + callbackName;\n\t\t}\n\n\t\t// Use data converter to retrieve json after script execution\n\t\ts.converters[\"script json\"] = function() {\n\t\t\tif ( !responseContainer ) {\n\t\t\t\tjQuery.error( callbackName + \" was not called\" );\n\t\t\t}\n\t\t\treturn responseContainer[ 0 ];\n\t\t};\n\n\t\t// force json dataType\n\t\ts.dataTypes[ 0 ] = \"json\";\n\n\t\t// Install callback\n\t\toverwritten = window[ callbackName ];\n\t\twindow[ callbackName ] = function() {\n\t\t\tresponseContainer = arguments;\n\t\t};\n\n\t\t// Clean-up function (fires after converters)\n\t\tjqXHR.always(function() {\n\t\t\t// Restore preexisting value\n\t\t\twindow[ callbackName ] = overwritten;\n\n\t\t\t// Save back as free\n\t\t\tif ( s[ callbackName ] ) {\n\t\t\t\t// make sure that re-using the options doesn't screw things around\n\t\t\t\ts.jsonpCallback = originalSettings.jsonpCallback;\n\n\t\t\t\t// save the callback name for future use\n\t\t\t\toldCallbacks.push( callbackName );\n\t\t\t}\n\n\t\t\t// Call if it was a function and we have a response\n\t\t\tif ( responseContainer && jQuery.isFunction( overwritten ) ) {\n\t\t\t\toverwritten( responseContainer[ 0 ] );\n\t\t\t}\n\n\t\t\tresponseContainer = overwritten = undefined;\n\t\t});\n\n\t\t// Delegate to script\n\t\treturn \"script\";\n\t}\n});\nvar xhrCallbacks, xhrSupported,\n\txhrId = 0,\n\t// #5280: Internet Explorer will keep connections alive if we don't abort on unload\n\txhrOnUnloadAbort = window.ActiveXObject && function() {\n\t\t// Abort all pending requests\n\t\tvar key;\n\t\tfor ( key in xhrCallbacks ) {\n\t\t\txhrCallbacks[ key ]( undefined, true );\n\t\t}\n\t};\n\n// Functions to create xhrs\nfunction createStandardXHR() {\n\ttry {\n\t\treturn new window.XMLHttpRequest();\n\t} catch( e ) {}\n}\n\nfunction createActiveXHR() {\n\ttry {\n\t\treturn new window.ActiveXObject(\"Microsoft.XMLHTTP\");\n\t} catch( e ) {}\n}\n\n// Create the request object\n// (This is still attached to ajaxSettings for backward compatibility)\njQuery.ajaxSettings.xhr = window.ActiveXObject ?\n\t/* Microsoft failed to properly\n\t * implement the XMLHttpRequest in IE7 (can't request local files),\n\t * so we use the ActiveXObject when it is available\n\t * Additionally XMLHttpRequest can be disabled in IE7/IE8 so\n\t * we need a fallback.\n\t */\n\tfunction() {\n\t\treturn !this.isLocal && createStandardXHR() || createActiveXHR();\n\t} :\n\t// For all other browsers, use the standard XMLHttpRequest object\n\tcreateStandardXHR;\n\n// Determine support properties\nxhrSupported = jQuery.ajaxSettings.xhr();\njQuery.support.cors = !!xhrSupported && ( \"withCredentials\" in xhrSupported );\nxhrSupported = jQuery.support.ajax = !!xhrSupported;\n\n// Create transport if the browser can provide an xhr\nif ( xhrSupported ) {\n\n\tjQuery.ajaxTransport(function( s ) {\n\t\t// Cross domain only allowed if supported through XMLHttpRequest\n\t\tif ( !s.crossDomain || jQuery.support.cors ) {\n\n\t\t\tvar callback;\n\n\t\t\treturn {\n\t\t\t\tsend: function( headers, complete ) {\n\n\t\t\t\t\t// Get a new xhr\n\t\t\t\t\tvar handle, i,\n\t\t\t\t\t\txhr = s.xhr();\n\n\t\t\t\t\t// Open the socket\n\t\t\t\t\t// Passing null username, generates a login popup on Opera (#2865)\n\t\t\t\t\tif ( s.username ) {\n\t\t\t\t\t\txhr.open( s.type, s.url, s.async, s.username, s.password );\n\t\t\t\t\t} else {\n\t\t\t\t\t\txhr.open( s.type, s.url, s.async );\n\t\t\t\t\t}\n\n\t\t\t\t\t// Apply custom fields if provided\n\t\t\t\t\tif ( s.xhrFields ) {\n\t\t\t\t\t\tfor ( i in s.xhrFields ) {\n\t\t\t\t\t\t\txhr[ i ] = s.xhrFields[ i ];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Override mime type if needed\n\t\t\t\t\tif ( s.mimeType && xhr.overrideMimeType ) {\n\t\t\t\t\t\txhr.overrideMimeType( s.mimeType );\n\t\t\t\t\t}\n\n\t\t\t\t\t// X-Requested-With header\n\t\t\t\t\t// For cross-domain requests, seeing as conditions for a preflight are\n\t\t\t\t\t// akin to a jigsaw puzzle, we simply never set it to be sure.\n\t\t\t\t\t// (it can always be set on a per-request basis or even using ajaxSetup)\n\t\t\t\t\t// For same-domain requests, won't change header if already provided.\n\t\t\t\t\tif ( !s.crossDomain && !headers[\"X-Requested-With\"] ) {\n\t\t\t\t\t\theaders[\"X-Requested-With\"] = \"XMLHttpRequest\";\n\t\t\t\t\t}\n\n\t\t\t\t\t// Need an extra try/catch for cross domain requests in Firefox 3\n\t\t\t\t\ttry {\n\t\t\t\t\t\tfor ( i in headers ) {\n\t\t\t\t\t\t\txhr.setRequestHeader( i, headers[ i ] );\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch( err ) {}\n\n\t\t\t\t\t// Do send the request\n\t\t\t\t\t// This may raise an exception which is actually\n\t\t\t\t\t// handled in jQuery.ajax (so no try/catch here)\n\t\t\t\t\txhr.send( ( s.hasContent && s.data ) || null );\n\n\t\t\t\t\t// Listener\n\t\t\t\t\tcallback = function( _, isAbort ) {\n\t\t\t\t\t\tvar status, responseHeaders, statusText, responses;\n\n\t\t\t\t\t\t// Firefox throws exceptions when accessing properties\n\t\t\t\t\t\t// of an xhr when a network error occurred\n\t\t\t\t\t\t// http://helpful.knobs-dials.com/index.php/Component_returned_failure_code:_0x80040111_(NS_ERROR_NOT_AVAILABLE)\n\t\t\t\t\t\ttry {\n\n\t\t\t\t\t\t\t// Was never called and is aborted or complete\n\t\t\t\t\t\t\tif ( callback && ( isAbort || xhr.readyState === 4 ) ) {\n\n\t\t\t\t\t\t\t\t// Only called once\n\t\t\t\t\t\t\t\tcallback = undefined;\n\n\t\t\t\t\t\t\t\t// Do not keep as active anymore\n\t\t\t\t\t\t\t\tif ( handle ) {\n\t\t\t\t\t\t\t\t\txhr.onreadystatechange = jQuery.noop;\n\t\t\t\t\t\t\t\t\tif ( xhrOnUnloadAbort ) {\n\t\t\t\t\t\t\t\t\t\tdelete xhrCallbacks[ handle ];\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// If it's an abort\n\t\t\t\t\t\t\t\tif ( isAbort ) {\n\t\t\t\t\t\t\t\t\t// Abort it manually if needed\n\t\t\t\t\t\t\t\t\tif ( xhr.readyState !== 4 ) {\n\t\t\t\t\t\t\t\t\t\txhr.abort();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tresponses = {};\n\t\t\t\t\t\t\t\t\tstatus = xhr.status;\n\t\t\t\t\t\t\t\t\tresponseHeaders = xhr.getAllResponseHeaders();\n\n\t\t\t\t\t\t\t\t\t// When requesting binary data, IE6-9 will throw an exception\n\t\t\t\t\t\t\t\t\t// on any attempt to access responseText (#11426)\n\t\t\t\t\t\t\t\t\tif ( typeof xhr.responseText === \"string\" ) {\n\t\t\t\t\t\t\t\t\t\tresponses.text = xhr.responseText;\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t// Firefox throws an exception when accessing\n\t\t\t\t\t\t\t\t\t// statusText for faulty cross-domain requests\n\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\tstatusText = xhr.statusText;\n\t\t\t\t\t\t\t\t\t} catch( e ) {\n\t\t\t\t\t\t\t\t\t\t// We normalize with Webkit giving an empty statusText\n\t\t\t\t\t\t\t\t\t\tstatusText = \"\";\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t// Filter status for non standard behaviors\n\n\t\t\t\t\t\t\t\t\t// If the request is local and we have data: assume a success\n\t\t\t\t\t\t\t\t\t// (success with no data won't get notified, that's the best we\n\t\t\t\t\t\t\t\t\t// can do given current implementations)\n\t\t\t\t\t\t\t\t\tif ( !status && s.isLocal && !s.crossDomain ) {\n\t\t\t\t\t\t\t\t\t\tstatus = responses.text ? 200 : 404;\n\t\t\t\t\t\t\t\t\t// IE - #1450: sometimes returns 1223 when it should be 204\n\t\t\t\t\t\t\t\t\t} else if ( status === 1223 ) {\n\t\t\t\t\t\t\t\t\t\tstatus = 204;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} catch( firefoxAccessException ) {\n\t\t\t\t\t\t\tif ( !isAbort ) {\n\t\t\t\t\t\t\t\tcomplete( -1, firefoxAccessException );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Call complete if needed\n\t\t\t\t\t\tif ( responses ) {\n\t\t\t\t\t\t\tcomplete( status, statusText, responses, responseHeaders );\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\n\t\t\t\t\tif ( !s.async ) {\n\t\t\t\t\t\t// if we're in sync mode we fire the callback\n\t\t\t\t\t\tcallback();\n\t\t\t\t\t} else if ( xhr.readyState === 4 ) {\n\t\t\t\t\t\t// (IE6 & IE7) if it's in cache and has been\n\t\t\t\t\t\t// retrieved directly we need to fire the callback\n\t\t\t\t\t\tsetTimeout( callback );\n\t\t\t\t\t} else {\n\t\t\t\t\t\thandle = ++xhrId;\n\t\t\t\t\t\tif ( xhrOnUnloadAbort ) {\n\t\t\t\t\t\t\t// Create the active xhrs callbacks list if needed\n\t\t\t\t\t\t\t// and attach the unload handler\n\t\t\t\t\t\t\tif ( !xhrCallbacks ) {\n\t\t\t\t\t\t\t\txhrCallbacks = {};\n\t\t\t\t\t\t\t\tjQuery( window ).unload( xhrOnUnloadAbort );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// Add to list of active xhrs callbacks\n\t\t\t\t\t\t\txhrCallbacks[ handle ] = callback;\n\t\t\t\t\t\t}\n\t\t\t\t\t\txhr.onreadystatechange = callback;\n\t\t\t\t\t}\n\t\t\t\t},\n\n\t\t\t\tabort: function() {\n\t\t\t\t\tif ( callback ) {\n\t\t\t\t\t\tcallback( undefined, true );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t});\n}\nvar fxNow, timerId,\n\trfxtypes = /^(?:toggle|show|hide)$/,\n\trfxnum = new RegExp( \"^(?:([+-])=|)(\" + core_pnum + \")([a-z%]*)$\", \"i\" ),\n\trrun = /queueHooks$/,\n\tanimationPrefilters = [ defaultPrefilter ],\n\ttweeners = {\n\t\t\"*\": [function( prop, value ) {\n\t\t\tvar tween = this.createTween( prop, value ),\n\t\t\t\ttarget = tween.cur(),\n\t\t\t\tparts = rfxnum.exec( value ),\n\t\t\t\tunit = parts && parts[ 3 ] || ( jQuery.cssNumber[ prop ] ? \"\" : \"px\" ),\n\n\t\t\t\t// Starting value computation is required for potential unit mismatches\n\t\t\t\tstart = ( jQuery.cssNumber[ prop ] || unit !== \"px\" && +target ) &&\n\t\t\t\t\trfxnum.exec( jQuery.css( tween.elem, prop ) ),\n\t\t\t\tscale = 1,\n\t\t\t\tmaxIterations = 20;\n\n\t\t\tif ( start && start[ 3 ] !== unit ) {\n\t\t\t\t// Trust units reported by jQuery.css\n\t\t\t\tunit = unit || start[ 3 ];\n\n\t\t\t\t// Make sure we update the tween properties later on\n\t\t\t\tparts = parts || [];\n\n\t\t\t\t// Iteratively approximate from a nonzero starting point\n\t\t\t\tstart = +target || 1;\n\n\t\t\t\tdo {\n\t\t\t\t\t// If previous iteration zeroed out, double until we get *something*\n\t\t\t\t\t// Use a string for doubling factor so we don't accidentally see scale as unchanged below\n\t\t\t\t\tscale = scale || \".5\";\n\n\t\t\t\t\t// Adjust and apply\n\t\t\t\t\tstart = start / scale;\n\t\t\t\t\tjQuery.style( tween.elem, prop, start + unit );\n\n\t\t\t\t// Update scale, tolerating zero or NaN from tween.cur()\n\t\t\t\t// And breaking the loop if scale is unchanged or perfect, or if we've just had enough\n\t\t\t\t} while ( scale !== (scale = tween.cur() / target) && scale !== 1 && --maxIterations );\n\t\t\t}\n\n\t\t\t// Update tween properties\n\t\t\tif ( parts ) {\n\t\t\t\tstart = tween.start = +start || +target || 0;\n\t\t\t\ttween.unit = unit;\n\t\t\t\t// If a +=/-= token was provided, we're doing a relative animation\n\t\t\t\ttween.end = parts[ 1 ] ?\n\t\t\t\t\tstart + ( parts[ 1 ] + 1 ) * parts[ 2 ] :\n\t\t\t\t\t+parts[ 2 ];\n\t\t\t}\n\n\t\t\treturn tween;\n\t\t}]\n\t};\n\n// Animations created synchronously will run synchronously\nfunction createFxNow() {\n\tsetTimeout(function() {\n\t\tfxNow = undefined;\n\t});\n\treturn ( fxNow = jQuery.now() );\n}\n\nfunction createTween( value, prop, animation ) {\n\tvar tween,\n\t\tcollection = ( tweeners[ prop ] || [] ).concat( tweeners[ \"*\" ] ),\n\t\tindex = 0,\n\t\tlength = collection.length;\n\tfor ( ; index < length; index++ ) {\n\t\tif ( (tween = collection[ index ].call( animation, prop, value )) ) {\n\n\t\t\t// we're done with this property\n\t\t\treturn tween;\n\t\t}\n\t}\n}\n\nfunction Animation( elem, properties, options ) {\n\tvar result,\n\t\tstopped,\n\t\tindex = 0,\n\t\tlength = animationPrefilters.length,\n\t\tdeferred = jQuery.Deferred().always( function() {\n\t\t\t// don't match elem in the :animated selector\n\t\t\tdelete tick.elem;\n\t\t}),\n\t\ttick = function() {\n\t\t\tif ( stopped ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tvar currentTime = fxNow || createFxNow(),\n\t\t\t\tremaining = Math.max( 0, animation.startTime + animation.duration - currentTime ),\n\t\t\t\t// archaic crash bug won't allow us to use 1 - ( 0.5 || 0 ) (#12497)\n\t\t\t\ttemp = remaining / animation.duration || 0,\n\t\t\t\tpercent = 1 - temp,\n\t\t\t\tindex = 0,\n\t\t\t\tlength = animation.tweens.length;\n\n\t\t\tfor ( ; index < length ; index++ ) {\n\t\t\t\tanimation.tweens[ index ].run( percent );\n\t\t\t}\n\n\t\t\tdeferred.notifyWith( elem, [ animation, percent, remaining ]);\n\n\t\t\tif ( percent < 1 && length ) {\n\t\t\t\treturn remaining;\n\t\t\t} else {\n\t\t\t\tdeferred.resolveWith( elem, [ animation ] );\n\t\t\t\treturn false;\n\t\t\t}\n\t\t},\n\t\tanimation = deferred.promise({\n\t\t\telem: elem,\n\t\t\tprops: jQuery.extend( {}, properties ),\n\t\t\topts: jQuery.extend( true, { specialEasing: {} }, options ),\n\t\t\toriginalProperties: properties,\n\t\t\toriginalOptions: options,\n\t\t\tstartTime: fxNow || createFxNow(),\n\t\t\tduration: options.duration,\n\t\t\ttweens: [],\n\t\t\tcreateTween: function( prop, end ) {\n\t\t\t\tvar tween = jQuery.Tween( elem, animation.opts, prop, end,\n\t\t\t\t\t\tanimation.opts.specialEasing[ prop ] || animation.opts.easing );\n\t\t\t\tanimation.tweens.push( tween );\n\t\t\t\treturn tween;\n\t\t\t},\n\t\t\tstop: function( gotoEnd ) {\n\t\t\t\tvar index = 0,\n\t\t\t\t\t// if we are going to the end, we want to run all the tweens\n\t\t\t\t\t// otherwise we skip this part\n\t\t\t\t\tlength = gotoEnd ? animation.tweens.length : 0;\n\t\t\t\tif ( stopped ) {\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\t\t\t\tstopped = true;\n\t\t\t\tfor ( ; index < length ; index++ ) {\n\t\t\t\t\tanimation.tweens[ index ].run( 1 );\n\t\t\t\t}\n\n\t\t\t\t// resolve when we played the last frame\n\t\t\t\t// otherwise, reject\n\t\t\t\tif ( gotoEnd ) {\n\t\t\t\t\tdeferred.resolveWith( elem, [ animation, gotoEnd ] );\n\t\t\t\t} else {\n\t\t\t\t\tdeferred.rejectWith( elem, [ animation, gotoEnd ] );\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t}\n\t\t}),\n\t\tprops = animation.props;\n\n\tpropFilter( props, animation.opts.specialEasing );\n\n\tfor ( ; index < length ; index++ ) {\n\t\tresult = animationPrefilters[ index ].call( animation, elem, props, animation.opts );\n\t\tif ( result ) {\n\t\t\treturn result;\n\t\t}\n\t}\n\n\tjQuery.map( props, createTween, animation );\n\n\tif ( jQuery.isFunction( animation.opts.start ) ) {\n\t\tanimation.opts.start.call( elem, animation );\n\t}\n\n\tjQuery.fx.timer(\n\t\tjQuery.extend( tick, {\n\t\t\telem: elem,\n\t\t\tanim: animation,\n\t\t\tqueue: animation.opts.queue\n\t\t})\n\t);\n\n\t// attach callbacks from options\n\treturn animation.progress( animation.opts.progress )\n\t\t.done( animation.opts.done, animation.opts.complete )\n\t\t.fail( animation.opts.fail )\n\t\t.always( animation.opts.always );\n}\n\nfunction propFilter( props, specialEasing ) {\n\tvar index, name, easing, value, hooks;\n\n\t// camelCase, specialEasing and expand cssHook pass\n\tfor ( index in props ) {\n\t\tname = jQuery.camelCase( index );\n\t\teasing = specialEasing[ name ];\n\t\tvalue = props[ index ];\n\t\tif ( jQuery.isArray( value ) ) {\n\t\t\teasing = value[ 1 ];\n\t\t\tvalue = props[ index ] = value[ 0 ];\n\t\t}\n\n\t\tif ( index !== name ) {\n\t\t\tprops[ name ] = value;\n\t\t\tdelete props[ index ];\n\t\t}\n\n\t\thooks = jQuery.cssHooks[ name ];\n\t\tif ( hooks && \"expand\" in hooks ) {\n\t\t\tvalue = hooks.expand( value );\n\t\t\tdelete props[ name ];\n\n\t\t\t// not quite $.extend, this wont overwrite keys already present.\n\t\t\t// also - reusing 'index' from above because we have the correct \"name\"\n\t\t\tfor ( index in value ) {\n\t\t\t\tif ( !( index in props ) ) {\n\t\t\t\t\tprops[ index ] = value[ index ];\n\t\t\t\t\tspecialEasing[ index ] = easing;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tspecialEasing[ name ] = easing;\n\t\t}\n\t}\n}\n\njQuery.Animation = jQuery.extend( Animation, {\n\n\ttweener: function( props, callback ) {\n\t\tif ( jQuery.isFunction( props ) ) {\n\t\t\tcallback = props;\n\t\t\tprops = [ \"*\" ];\n\t\t} else {\n\t\t\tprops = props.split(\" \");\n\t\t}\n\n\t\tvar prop,\n\t\t\tindex = 0,\n\t\t\tlength = props.length;\n\n\t\tfor ( ; index < length ; index++ ) {\n\t\t\tprop = props[ index ];\n\t\t\ttweeners[ prop ] = tweeners[ prop ] || [];\n\t\t\ttweeners[ prop ].unshift( callback );\n\t\t}\n\t},\n\n\tprefilter: function( callback, prepend ) {\n\t\tif ( prepend ) {\n\t\t\tanimationPrefilters.unshift( callback );\n\t\t} else {\n\t\t\tanimationPrefilters.push( callback );\n\t\t}\n\t}\n});\n\nfunction defaultPrefilter( elem, props, opts ) {\n\t/* jshint validthis: true */\n\tvar prop, value, toggle, tween, hooks, oldfire,\n\t\tanim = this,\n\t\torig = {},\n\t\tstyle = elem.style,\n\t\thidden = elem.nodeType && isHidden( elem ),\n\t\tdataShow = jQuery._data( elem, \"fxshow\" );\n\n\t// handle queue: false promises\n\tif ( !opts.queue ) {\n\t\thooks = jQuery._queueHooks( elem, \"fx\" );\n\t\tif ( hooks.unqueued == null ) {\n\t\t\thooks.unqueued = 0;\n\t\t\toldfire = hooks.empty.fire;\n\t\t\thooks.empty.fire = function() {\n\t\t\t\tif ( !hooks.unqueued ) {\n\t\t\t\t\toldfire();\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t\thooks.unqueued++;\n\n\t\tanim.always(function() {\n\t\t\t// doing this makes sure that the complete handler will be called\n\t\t\t// before this completes\n\t\t\tanim.always(function() {\n\t\t\t\thooks.unqueued--;\n\t\t\t\tif ( !jQuery.queue( elem, \"fx\" ).length ) {\n\t\t\t\t\thooks.empty.fire();\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t}\n\n\t// height/width overflow pass\n\tif ( elem.nodeType === 1 && ( \"height\" in props || \"width\" in props ) ) {\n\t\t// Make sure that nothing sneaks out\n\t\t// Record all 3 overflow attributes because IE does not\n\t\t// change the overflow attribute when overflowX and\n\t\t// overflowY are set to the same value\n\t\topts.overflow = [ style.overflow, style.overflowX, style.overflowY ];\n\n\t\t// Set display property to inline-block for height/width\n\t\t// animations on inline elements that are having width/height animated\n\t\tif ( jQuery.css( elem, \"display\" ) === \"inline\" &&\n\t\t\t\tjQuery.css( elem, \"float\" ) === \"none\" ) {\n\n\t\t\t// inline-level elements accept inline-block;\n\t\t\t// block-level elements need to be inline with layout\n\t\t\tif ( !jQuery.support.inlineBlockNeedsLayout || css_defaultDisplay( elem.nodeName ) === \"inline\" ) {\n\t\t\t\tstyle.display = \"inline-block\";\n\n\t\t\t} else {\n\t\t\t\tstyle.zoom = 1;\n\t\t\t}\n\t\t}\n\t}\n\n\tif ( opts.overflow ) {\n\t\tstyle.overflow = \"hidden\";\n\t\tif ( !jQuery.support.shrinkWrapBlocks ) {\n\t\t\tanim.always(function() {\n\t\t\t\tstyle.overflow = opts.overflow[ 0 ];\n\t\t\t\tstyle.overflowX = opts.overflow[ 1 ];\n\t\t\t\tstyle.overflowY = opts.overflow[ 2 ];\n\t\t\t});\n\t\t}\n\t}\n\n\n\t// show/hide pass\n\tfor ( prop in props ) {\n\t\tvalue = props[ prop ];\n\t\tif ( rfxtypes.exec( value ) ) {\n\t\t\tdelete props[ prop ];\n\t\t\ttoggle = toggle || value === \"toggle\";\n\t\t\tif ( value === ( hidden ? \"hide\" : \"show\" ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\torig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop );\n\t\t}\n\t}\n\n\tif ( !jQuery.isEmptyObject( orig ) ) {\n\t\tif ( dataShow ) {\n\t\t\tif ( \"hidden\" in dataShow ) {\n\t\t\t\thidden = dataShow.hidden;\n\t\t\t}\n\t\t} else {\n\t\t\tdataShow = jQuery._data( elem, \"fxshow\", {} );\n\t\t}\n\n\t\t// store state if its toggle - enables .stop().toggle() to \"reverse\"\n\t\tif ( toggle ) {\n\t\t\tdataShow.hidden = !hidden;\n\t\t}\n\t\tif ( hidden ) {\n\t\t\tjQuery( elem ).show();\n\t\t} else {\n\t\t\tanim.done(function() {\n\t\t\t\tjQuery( elem ).hide();\n\t\t\t});\n\t\t}\n\t\tanim.done(function() {\n\t\t\tvar prop;\n\t\t\tjQuery._removeData( elem, \"fxshow\" );\n\t\t\tfor ( prop in orig ) {\n\t\t\t\tjQuery.style( elem, prop, orig[ prop ] );\n\t\t\t}\n\t\t});\n\t\tfor ( prop in orig ) {\n\t\t\ttween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim );\n\n\t\t\tif ( !( prop in dataShow ) ) {\n\t\t\t\tdataShow[ prop ] = tween.start;\n\t\t\t\tif ( hidden ) {\n\t\t\t\t\ttween.end = tween.start;\n\t\t\t\t\ttween.start = prop === \"width\" || prop === \"height\" ? 1 : 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction Tween( elem, options, prop, end, easing ) {\n\treturn new Tween.prototype.init( elem, options, prop, end, easing );\n}\njQuery.Tween = Tween;\n\nTween.prototype = {\n\tconstructor: Tween,\n\tinit: function( elem, options, prop, end, easing, unit ) {\n\t\tthis.elem = elem;\n\t\tthis.prop = prop;\n\t\tthis.easing = easing || \"swing\";\n\t\tthis.options = options;\n\t\tthis.start = this.now = this.cur();\n\t\tthis.end = end;\n\t\tthis.unit = unit || ( jQuery.cssNumber[ prop ] ? \"\" : \"px\" );\n\t},\n\tcur: function() {\n\t\tvar hooks = Tween.propHooks[ this.prop ];\n\n\t\treturn hooks && hooks.get ?\n\t\t\thooks.get( this ) :\n\t\t\tTween.propHooks._default.get( this );\n\t},\n\trun: function( percent ) {\n\t\tvar eased,\n\t\t\thooks = Tween.propHooks[ this.prop ];\n\n\t\tif ( this.options.duration ) {\n\t\t\tthis.pos = eased = jQuery.easing[ this.easing ](\n\t\t\t\tpercent, this.options.duration * percent, 0, 1, this.options.duration\n\t\t\t);\n\t\t} else {\n\t\t\tthis.pos = eased = percent;\n\t\t}\n\t\tthis.now = ( this.end - this.start ) * eased + this.start;\n\n\t\tif ( this.options.step ) {\n\t\t\tthis.options.step.call( this.elem, this.now, this );\n\t\t}\n\n\t\tif ( hooks && hooks.set ) {\n\t\t\thooks.set( this );\n\t\t} else {\n\t\t\tTween.propHooks._default.set( this );\n\t\t}\n\t\treturn this;\n\t}\n};\n\nTween.prototype.init.prototype = Tween.prototype;\n\nTween.propHooks = {\n\t_default: {\n\t\tget: function( tween ) {\n\t\t\tvar result;\n\n\t\t\tif ( tween.elem[ tween.prop ] != null &&\n\t\t\t\t(!tween.elem.style || tween.elem.style[ tween.prop ] == null) ) {\n\t\t\t\treturn tween.elem[ tween.prop ];\n\t\t\t}\n\n\t\t\t// passing an empty string as a 3rd parameter to .css will automatically\n\t\t\t// attempt a parseFloat and fallback to a string if the parse fails\n\t\t\t// so, simple values such as \"10px\" are parsed to Float.\n\t\t\t// complex values such as \"rotate(1rad)\" are returned as is.\n\t\t\tresult = jQuery.css( tween.elem, tween.prop, \"\" );\n\t\t\t// Empty strings, null, undefined and \"auto\" are converted to 0.\n\t\t\treturn !result || result === \"auto\" ? 0 : result;\n\t\t},\n\t\tset: function( tween ) {\n\t\t\t// use step hook for back compat - use cssHook if its there - use .style if its\n\t\t\t// available and use plain properties where available\n\t\t\tif ( jQuery.fx.step[ tween.prop ] ) {\n\t\t\t\tjQuery.fx.step[ tween.prop ]( tween );\n\t\t\t} else if ( tween.elem.style && ( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null || jQuery.cssHooks[ tween.prop ] ) ) {\n\t\t\t\tjQuery.style( tween.elem, tween.prop, tween.now + tween.unit );\n\t\t\t} else {\n\t\t\t\ttween.elem[ tween.prop ] = tween.now;\n\t\t\t}\n\t\t}\n\t}\n};\n\n// Support: IE <=9\n// Panic based approach to setting things on disconnected nodes\n\nTween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {\n\tset: function( tween ) {\n\t\tif ( tween.elem.nodeType && tween.elem.parentNode ) {\n\t\t\ttween.elem[ tween.prop ] = tween.now;\n\t\t}\n\t}\n};\n\njQuery.each([ \"toggle\", \"show\", \"hide\" ], function( i, name ) {\n\tvar cssFn = jQuery.fn[ name ];\n\tjQuery.fn[ name ] = function( speed, easing, callback ) {\n\t\treturn speed == null || typeof speed === \"boolean\" ?\n\t\t\tcssFn.apply( this, arguments ) :\n\t\t\tthis.animate( genFx( name, true ), speed, easing, callback );\n\t};\n});\n\njQuery.fn.extend({\n\tfadeTo: function( speed, to, easing, callback ) {\n\n\t\t// show any hidden elements after setting opacity to 0\n\t\treturn this.filter( isHidden ).css( \"opacity\", 0 ).show()\n\n\t\t\t// animate to the value specified\n\t\t\t.end().animate({ opacity: to }, speed, easing, callback );\n\t},\n\tanimate: function( prop, speed, easing, callback ) {\n\t\tvar empty = jQuery.isEmptyObject( prop ),\n\t\t\toptall = jQuery.speed( speed, easing, callback ),\n\t\t\tdoAnimation = function() {\n\t\t\t\t// Operate on a copy of prop so per-property easing won't be lost\n\t\t\t\tvar anim = Animation( this, jQuery.extend( {}, prop ), optall );\n\n\t\t\t\t// Empty animations, or finishing resolves immediately\n\t\t\t\tif ( empty || jQuery._data( this, \"finish\" ) ) {\n\t\t\t\t\tanim.stop( true );\n\t\t\t\t}\n\t\t\t};\n\t\t\tdoAnimation.finish = doAnimation;\n\n\t\treturn empty || optall.queue === false ?\n\t\t\tthis.each( doAnimation ) :\n\t\t\tthis.queue( optall.queue, doAnimation );\n\t},\n\tstop: function( type, clearQueue, gotoEnd ) {\n\t\tvar stopQueue = function( hooks ) {\n\t\t\tvar stop = hooks.stop;\n\t\t\tdelete hooks.stop;\n\t\t\tstop( gotoEnd );\n\t\t};\n\n\t\tif ( typeof type !== \"string\" ) {\n\t\t\tgotoEnd = clearQueue;\n\t\t\tclearQueue = type;\n\t\t\ttype = undefined;\n\t\t}\n\t\tif ( clearQueue && type !== false ) {\n\t\t\tthis.queue( type || \"fx\", [] );\n\t\t}\n\n\t\treturn this.each(function() {\n\t\t\tvar dequeue = true,\n\t\t\t\tindex = type != null && type + \"queueHooks\",\n\t\t\t\ttimers = jQuery.timers,\n\t\t\t\tdata = jQuery._data( this );\n\n\t\t\tif ( index ) {\n\t\t\t\tif ( data[ index ] && data[ index ].stop ) {\n\t\t\t\t\tstopQueue( data[ index ] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfor ( index in data ) {\n\t\t\t\t\tif ( data[ index ] && data[ index ].stop && rrun.test( index ) ) {\n\t\t\t\t\t\tstopQueue( data[ index ] );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor ( index = timers.length; index--; ) {\n\t\t\t\tif ( timers[ index ].elem === this && (type == null || timers[ index ].queue === type) ) {\n\t\t\t\t\ttimers[ index ].anim.stop( gotoEnd );\n\t\t\t\t\tdequeue = false;\n\t\t\t\t\ttimers.splice( index, 1 );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// start the next in the queue if the last step wasn't forced\n\t\t\t// timers currently will call their complete callbacks, which will dequeue\n\t\t\t// but only if they were gotoEnd\n\t\t\tif ( dequeue || !gotoEnd ) {\n\t\t\t\tjQuery.dequeue( this, type );\n\t\t\t}\n\t\t});\n\t},\n\tfinish: function( type ) {\n\t\tif ( type !== false ) {\n\t\t\ttype = type || \"fx\";\n\t\t}\n\t\treturn this.each(function() {\n\t\t\tvar index,\n\t\t\t\tdata = jQuery._data( this ),\n\t\t\t\tqueue = data[ type + \"queue\" ],\n\t\t\t\thooks = data[ type + \"queueHooks\" ],\n\t\t\t\ttimers = jQuery.timers,\n\t\t\t\tlength = queue ? queue.length : 0;\n\n\t\t\t// enable finishing flag on private data\n\t\t\tdata.finish = true;\n\n\t\t\t// empty the queue first\n\t\t\tjQuery.queue( this, type, [] );\n\n\t\t\tif ( hooks && hooks.stop ) {\n\t\t\t\thooks.stop.call( this, true );\n\t\t\t}\n\n\t\t\t// look for any active animations, and finish them\n\t\t\tfor ( index = timers.length; index--; ) {\n\t\t\t\tif ( timers[ index ].elem === this && timers[ index ].queue === type ) {\n\t\t\t\t\ttimers[ index ].anim.stop( true );\n\t\t\t\t\ttimers.splice( index, 1 );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// look for any animations in the old queue and finish them\n\t\t\tfor ( index = 0; index < length; index++ ) {\n\t\t\t\tif ( queue[ index ] && queue[ index ].finish ) {\n\t\t\t\t\tqueue[ index ].finish.call( this );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// turn off finishing flag\n\t\t\tdelete data.finish;\n\t\t});\n\t}\n});\n\n// Generate parameters to create a standard animation\nfunction genFx( type, includeWidth ) {\n\tvar which,\n\t\tattrs = { height: type },\n\t\ti = 0;\n\n\t// if we include width, step value is 1 to do all cssExpand values,\n\t// if we don't include width, step value is 2 to skip over Left and Right\n\tincludeWidth = includeWidth? 1 : 0;\n\tfor( ; i < 4 ; i += 2 - includeWidth ) {\n\t\twhich = cssExpand[ i ];\n\t\tattrs[ \"margin\" + which ] = attrs[ \"padding\" + which ] = type;\n\t}\n\n\tif ( includeWidth ) {\n\t\tattrs.opacity = attrs.width = type;\n\t}\n\n\treturn attrs;\n}\n\n// Generate shortcuts for custom animations\njQuery.each({\n\tslideDown: genFx(\"show\"),\n\tslideUp: genFx(\"hide\"),\n\tslideToggle: genFx(\"toggle\"),\n\tfadeIn: { opacity: \"show\" },\n\tfadeOut: { opacity: \"hide\" },\n\tfadeToggle: { opacity: \"toggle\" }\n}, function( name, props ) {\n\tjQuery.fn[ name ] = function( speed, easing, callback ) {\n\t\treturn this.animate( props, speed, easing, callback );\n\t};\n});\n\njQuery.speed = function( speed, easing, fn ) {\n\tvar opt = speed && typeof speed === \"object\" ? jQuery.extend( {}, speed ) : {\n\t\tcomplete: fn || !fn && easing ||\n\t\t\tjQuery.isFunction( speed ) && speed,\n\t\tduration: speed,\n\t\teasing: fn && easing || easing && !jQuery.isFunction( easing ) && easing\n\t};\n\n\topt.duration = jQuery.fx.off ? 0 : typeof opt.duration === \"number\" ? opt.duration :\n\t\topt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default;\n\n\t// normalize opt.queue - true/undefined/null -> \"fx\"\n\tif ( opt.queue == null || opt.queue === true ) {\n\t\topt.queue = \"fx\";\n\t}\n\n\t// Queueing\n\topt.old = opt.complete;\n\n\topt.complete = function() {\n\t\tif ( jQuery.isFunction( opt.old ) ) {\n\t\t\topt.old.call( this );\n\t\t}\n\n\t\tif ( opt.queue ) {\n\t\t\tjQuery.dequeue( this, opt.queue );\n\t\t}\n\t};\n\n\treturn opt;\n};\n\njQuery.easing = {\n\tlinear: function( p ) {\n\t\treturn p;\n\t},\n\tswing: function( p ) {\n\t\treturn 0.5 - Math.cos( p*Math.PI ) / 2;\n\t}\n};\n\njQuery.timers = [];\njQuery.fx = Tween.prototype.init;\njQuery.fx.tick = function() {\n\tvar timer,\n\t\ttimers = jQuery.timers,\n\t\ti = 0;\n\n\tfxNow = jQuery.now();\n\n\tfor ( ; i < timers.length; i++ ) {\n\t\ttimer = timers[ i ];\n\t\t// Checks the timer has not already been removed\n\t\tif ( !timer() && timers[ i ] === timer ) {\n\t\t\ttimers.splice( i--, 1 );\n\t\t}\n\t}\n\n\tif ( !timers.length ) {\n\t\tjQuery.fx.stop();\n\t}\n\tfxNow = undefined;\n};\n\njQuery.fx.timer = function( timer ) {\n\tif ( timer() && jQuery.timers.push( timer ) ) {\n\t\tjQuery.fx.start();\n\t}\n};\n\njQuery.fx.interval = 13;\n\njQuery.fx.start = function() {\n\tif ( !timerId ) {\n\t\ttimerId = setInterval( jQuery.fx.tick, jQuery.fx.interval );\n\t}\n};\n\njQuery.fx.stop = function() {\n\tclearInterval( timerId );\n\ttimerId = null;\n};\n\njQuery.fx.speeds = {\n\tslow: 600,\n\tfast: 200,\n\t// Default speed\n\t_default: 400\n};\n\n// Back Compat <1.8 extension point\njQuery.fx.step = {};\n\nif ( jQuery.expr && jQuery.expr.filters ) {\n\tjQuery.expr.filters.animated = function( elem ) {\n\t\treturn jQuery.grep(jQuery.timers, function( fn ) {\n\t\t\treturn elem === fn.elem;\n\t\t}).length;\n\t};\n}\njQuery.fn.offset = function( options ) {\n\tif ( arguments.length ) {\n\t\treturn options === undefined ?\n\t\t\tthis :\n\t\t\tthis.each(function( i ) {\n\t\t\t\tjQuery.offset.setOffset( this, options, i );\n\t\t\t});\n\t}\n\n\tvar docElem, win,\n\t\tbox = { top: 0, left: 0 },\n\t\telem = this[ 0 ],\n\t\tdoc = elem && elem.ownerDocument;\n\n\tif ( !doc ) {\n\t\treturn;\n\t}\n\n\tdocElem = doc.documentElement;\n\n\t// Make sure it's not a disconnected DOM node\n\tif ( !jQuery.contains( docElem, elem ) ) {\n\t\treturn box;\n\t}\n\n\t// If we don't have gBCR, just use 0,0 rather than error\n\t// BlackBerry 5, iOS 3 (original iPhone)\n\tif ( typeof elem.getBoundingClientRect !== core_strundefined ) {\n\t\tbox = elem.getBoundingClientRect();\n\t}\n\twin = getWindow( doc );\n\treturn {\n\t\ttop: box.top  + ( win.pageYOffset || docElem.scrollTop )  - ( docElem.clientTop  || 0 ),\n\t\tleft: box.left + ( win.pageXOffset || docElem.scrollLeft ) - ( docElem.clientLeft || 0 )\n\t};\n};\n\njQuery.offset = {\n\n\tsetOffset: function( elem, options, i ) {\n\t\tvar position = jQuery.css( elem, \"position\" );\n\n\t\t// set position first, in-case top/left are set even on static elem\n\t\tif ( position === \"static\" ) {\n\t\t\telem.style.position = \"relative\";\n\t\t}\n\n\t\tvar curElem = jQuery( elem ),\n\t\t\tcurOffset = curElem.offset(),\n\t\t\tcurCSSTop = jQuery.css( elem, \"top\" ),\n\t\t\tcurCSSLeft = jQuery.css( elem, \"left\" ),\n\t\t\tcalculatePosition = ( position === \"absolute\" || position === \"fixed\" ) && jQuery.inArray(\"auto\", [curCSSTop, curCSSLeft]) > -1,\n\t\t\tprops = {}, curPosition = {}, curTop, curLeft;\n\n\t\t// need to be able to calculate position if either top or left is auto and position is either absolute or fixed\n\t\tif ( calculatePosition ) {\n\t\t\tcurPosition = curElem.position();\n\t\t\tcurTop = curPosition.top;\n\t\t\tcurLeft = curPosition.left;\n\t\t} else {\n\t\t\tcurTop = parseFloat( curCSSTop ) || 0;\n\t\t\tcurLeft = parseFloat( curCSSLeft ) || 0;\n\t\t}\n\n\t\tif ( jQuery.isFunction( options ) ) {\n\t\t\toptions = options.call( elem, i, curOffset );\n\t\t}\n\n\t\tif ( options.top != null ) {\n\t\t\tprops.top = ( options.top - curOffset.top ) + curTop;\n\t\t}\n\t\tif ( options.left != null ) {\n\t\t\tprops.left = ( options.left - curOffset.left ) + curLeft;\n\t\t}\n\n\t\tif ( \"using\" in options ) {\n\t\t\toptions.using.call( elem, props );\n\t\t} else {\n\t\t\tcurElem.css( props );\n\t\t}\n\t}\n};\n\n\njQuery.fn.extend({\n\n\tposition: function() {\n\t\tif ( !this[ 0 ] ) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar offsetParent, offset,\n\t\t\tparentOffset = { top: 0, left: 0 },\n\t\t\telem = this[ 0 ];\n\n\t\t// fixed elements are offset from window (parentOffset = {top:0, left: 0}, because it is it's only offset parent\n\t\tif ( jQuery.css( elem, \"position\" ) === \"fixed\" ) {\n\t\t\t// we assume that getBoundingClientRect is available when computed position is fixed\n\t\t\toffset = elem.getBoundingClientRect();\n\t\t} else {\n\t\t\t// Get *real* offsetParent\n\t\t\toffsetParent = this.offsetParent();\n\n\t\t\t// Get correct offsets\n\t\t\toffset = this.offset();\n\t\t\tif ( !jQuery.nodeName( offsetParent[ 0 ], \"html\" ) ) {\n\t\t\t\tparentOffset = offsetParent.offset();\n\t\t\t}\n\n\t\t\t// Add offsetParent borders\n\t\t\tparentOffset.top  += jQuery.css( offsetParent[ 0 ], \"borderTopWidth\", true );\n\t\t\tparentOffset.left += jQuery.css( offsetParent[ 0 ], \"borderLeftWidth\", true );\n\t\t}\n\n\t\t// Subtract parent offsets and element margins\n\t\t// note: when an element has margin: auto the offsetLeft and marginLeft\n\t\t// are the same in Safari causing offset.left to incorrectly be 0\n\t\treturn {\n\t\t\ttop:  offset.top  - parentOffset.top - jQuery.css( elem, \"marginTop\", true ),\n\t\t\tleft: offset.left - parentOffset.left - jQuery.css( elem, \"marginLeft\", true)\n\t\t};\n\t},\n\n\toffsetParent: function() {\n\t\treturn this.map(function() {\n\t\t\tvar offsetParent = this.offsetParent || docElem;\n\t\t\twhile ( offsetParent && ( !jQuery.nodeName( offsetParent, \"html\" ) && jQuery.css( offsetParent, \"position\") === \"static\" ) ) {\n\t\t\t\toffsetParent = offsetParent.offsetParent;\n\t\t\t}\n\t\t\treturn offsetParent || docElem;\n\t\t});\n\t}\n});\n\n\n// Create scrollLeft and scrollTop methods\njQuery.each( {scrollLeft: \"pageXOffset\", scrollTop: \"pageYOffset\"}, function( method, prop ) {\n\tvar top = /Y/.test( prop );\n\n\tjQuery.fn[ method ] = function( val ) {\n\t\treturn jQuery.access( this, function( elem, method, val ) {\n\t\t\tvar win = getWindow( elem );\n\n\t\t\tif ( val === undefined ) {\n\t\t\t\treturn win ? (prop in win) ? win[ prop ] :\n\t\t\t\t\twin.document.documentElement[ method ] :\n\t\t\t\t\telem[ method ];\n\t\t\t}\n\n\t\t\tif ( win ) {\n\t\t\t\twin.scrollTo(\n\t\t\t\t\t!top ? val : jQuery( win ).scrollLeft(),\n\t\t\t\t\ttop ? val : jQuery( win ).scrollTop()\n\t\t\t\t);\n\n\t\t\t} else {\n\t\t\t\telem[ method ] = val;\n\t\t\t}\n\t\t}, method, val, arguments.length, null );\n\t};\n});\n\nfunction getWindow( elem ) {\n\treturn jQuery.isWindow( elem ) ?\n\t\telem :\n\t\telem.nodeType === 9 ?\n\t\t\telem.defaultView || elem.parentWindow :\n\t\t\tfalse;\n}\n// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods\njQuery.each( { Height: \"height\", Width: \"width\" }, function( name, type ) {\n\tjQuery.each( { padding: \"inner\" + name, content: type, \"\": \"outer\" + name }, function( defaultExtra, funcName ) {\n\t\t// margin is only for outerHeight, outerWidth\n\t\tjQuery.fn[ funcName ] = function( margin, value ) {\n\t\t\tvar chainable = arguments.length && ( defaultExtra || typeof margin !== \"boolean\" ),\n\t\t\t\textra = defaultExtra || ( margin === true || value === true ? \"margin\" : \"border\" );\n\n\t\t\treturn jQuery.access( this, function( elem, type, value ) {\n\t\t\t\tvar doc;\n\n\t\t\t\tif ( jQuery.isWindow( elem ) ) {\n\t\t\t\t\t// As of 5/8/2012 this will yield incorrect results for Mobile Safari, but there\n\t\t\t\t\t// isn't a whole lot we can do. See pull request at this URL for discussion:\n\t\t\t\t\t// https://github.com/jquery/jquery/pull/764\n\t\t\t\t\treturn elem.document.documentElement[ \"client\" + name ];\n\t\t\t\t}\n\n\t\t\t\t// Get document width or height\n\t\t\t\tif ( elem.nodeType === 9 ) {\n\t\t\t\t\tdoc = elem.documentElement;\n\n\t\t\t\t\t// Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height], whichever is greatest\n\t\t\t\t\t// unfortunately, this causes bug #3838 in IE6/8 only, but there is currently no good, small way to fix it.\n\t\t\t\t\treturn Math.max(\n\t\t\t\t\t\telem.body[ \"scroll\" + name ], doc[ \"scroll\" + name ],\n\t\t\t\t\t\telem.body[ \"offset\" + name ], doc[ \"offset\" + name ],\n\t\t\t\t\t\tdoc[ \"client\" + name ]\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\treturn value === undefined ?\n\t\t\t\t\t// Get width or height on the element, requesting but not forcing parseFloat\n\t\t\t\t\tjQuery.css( elem, type, extra ) :\n\n\t\t\t\t\t// Set width or height on the element\n\t\t\t\t\tjQuery.style( elem, type, value, extra );\n\t\t\t}, type, chainable ? margin : undefined, chainable, null );\n\t\t};\n\t});\n});\n// Limit scope pollution from any deprecated API\n// (function() {\n\n// The number of elements contained in the matched element set\njQuery.fn.size = function() {\n\treturn this.length;\n};\n\njQuery.fn.andSelf = jQuery.fn.addBack;\n\n// })();\nif ( typeof module === \"object\" && module && typeof module.exports === \"object\" ) {\n\t// Expose jQuery as module.exports in loaders that implement the Node\n\t// module pattern (including browserify). Do not create the global, since\n\t// the user will be storing it themselves locally, and globals are frowned\n\t// upon in the Node module world.\n\tmodule.exports = jQuery;\n} else {\n\t// Otherwise expose jQuery to the global object as usual\n\twindow.jQuery = window.$ = jQuery;\n\n\t// Register as a named AMD module, since jQuery can be concatenated with other\n\t// files that may use define, but not via a proper concatenation script that\n\t// understands anonymous AMD modules. A named AMD is safest and most robust\n\t// way to register. Lowercase jquery is used because AMD module names are\n\t// derived from file names, and jQuery is normally delivered in a lowercase\n\t// file name. Do this after creating the global so that if an AMD module wants\n\t// to call noConflict to hide this version of jQuery, it will work.\n\tif ( typeof define === \"function\" && define.amd ) {\n\t\tdefine( \"jquery\", [], function () { return jQuery; } );\n\t}\n}\n\n})( window );\n"
  },
  {
    "path": "23 - Architecting Application User Interfaces/PPPSSS.Dist.UIComp/PPPSSS.Dist.UIComp/Scripts/jquery.validate-vsdoc.js",
    "content": "﻿/* NUGET: BEGIN LICENSE TEXT\r\n *\r\n * Microsoft grants you the right to use these script files for the sole\r\n * purpose of either: (i) interacting through your browser with the Microsoft\r\n * website or online service, subject to the applicable licensing or use\r\n * terms; or (ii) using the files as included with a Microsoft product subject\r\n * to that product's license terms. Microsoft reserves all other rights to the\r\n * files not expressly granted by Microsoft, whether by implication, estoppel\r\n * or otherwise. Insofar as a script file is dual licensed under GPL,\r\n * Microsoft neither took the code under GPL nor distributes it thereunder but\r\n * under the terms set out in this paragraph. All notices and licenses\r\n * below are for informational purposes only.\r\n *\r\n * NUGET: END LICENSE TEXT */\r\n/*\r\n* This file has been commented to support Visual Studio Intellisense.\r\n* You should not use this file at runtime inside the browser--it is only\r\n* intended to be used only for design-time IntelliSense.  Please use the\r\n* standard jQuery library for all production use.\r\n*\r\n* Comment version: 1.11.1\r\n*/\r\n\r\n/*\r\n* Note: While Microsoft is not the author of this file, Microsoft is\r\n* offering you a license subject to the terms of the Microsoft Software\r\n* License Terms for Microsoft ASP.NET Model View Controller 3.\r\n* Microsoft reserves all other rights. The notices below are provided\r\n* for informational purposes only and are not the license terms under\r\n* which Microsoft distributed this file.\r\n*\r\n* jQuery Validation Plugin - v1.11.1 - 2/4/2013\r\n* https://github.com/jzaefferer/jquery-validation\r\n* Copyright (c) 2013 Jörn Zaefferer; Licensed MIT\r\n*\r\n*/\r\n\r\n(function($) {\r\n\r\n$.extend($.fn, {\r\n\t// http://docs.jquery.com/Plugins/Validation/validate\r\n\tvalidate: function( options ) {\r\n\t\t/// <summary>\r\n\t\t/// Validates the selected form. This method sets up event handlers for submit, focus,\r\n\t\t/// keyup, blur and click to trigger validation of the entire form or individual\r\n\t\t/// elements. Each one can be disabled, see the onxxx options (onsubmit, onfocusout,\r\n\t\t/// onkeyup, onclick). focusInvalid focuses elements when submitting a invalid form.\r\n\t\t/// </summary>\r\n\t\t/// <param name=\"options\" type=\"Object\">\r\n\t\t/// A set of key/value pairs that configure the validate. All options are optional.\r\n\t\t/// </param>\r\n\r\n\t\t// if nothing is selected, return nothing; can't chain anyway\r\n\t\tif (!this.length) {\r\n\t\t\toptions && options.debug && window.console && console.warn( \"nothing selected, can't validate, returning nothing\" );\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// check if a validator for this form was already created\r\n\t\tvar validator = $.data(this[0], 'validator');\r\n\t\tif ( validator ) {\r\n\t\t\treturn validator;\r\n\t\t}\r\n\t\t\r\n\t\tvalidator = new $.validator( options, this[0] );\r\n\t\t$.data(this[0], 'validator', validator); \r\n\t\t\r\n\t\tif ( validator.settings.onsubmit ) {\r\n\t\t\r\n\t\t\t// allow suppresing validation by adding a cancel class to the submit button\r\n\t\t\tthis.find(\"input, button\").filter(\".cancel\").click(function() {\r\n\t\t\t\tvalidator.cancelSubmit = true;\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\t// when a submitHandler is used, capture the submitting button\r\n\t\t\tif (validator.settings.submitHandler) {\r\n\t\t\t\tthis.find(\"input, button\").filter(\":submit\").click(function() {\r\n\t\t\t\t\tvalidator.submitButton = this;\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t\r\n\t\t\t// validate the form on submit\r\n\t\t\tthis.submit( function( event ) {\r\n\t\t\t\tif ( validator.settings.debug )\r\n\t\t\t\t\t// prevent form submit to be able to see console output\r\n\t\t\t\t\tevent.preventDefault();\r\n\t\t\t\t\t\r\n\t\t\t\tfunction handle() {\r\n\t\t\t\t\tif ( validator.settings.submitHandler ) {\r\n\t\t\t\t\t\tif (validator.submitButton) {\r\n\t\t\t\t\t\t\t// insert a hidden input as a replacement for the missing submit button\r\n\t\t\t\t\t\t\tvar hidden = $(\"<input type='hidden'/>\").attr(\"name\", validator.submitButton.name).val(validator.submitButton.value).appendTo(validator.currentForm);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tvalidator.settings.submitHandler.call( validator, validator.currentForm );\r\n\t\t\t\t\t\tif (validator.submitButton) {\r\n\t\t\t\t\t\t\t// and clean up afterwards; thanks to no-block-scope, hidden can be referenced\r\n\t\t\t\t\t\t\thidden.remove();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t// prevent submit for invalid forms or custom submit handlers\r\n\t\t\t\tif ( validator.cancelSubmit ) {\r\n\t\t\t\t\tvalidator.cancelSubmit = false;\r\n\t\t\t\t\treturn handle();\r\n\t\t\t\t}\r\n\t\t\t\tif ( validator.form() ) {\r\n\t\t\t\t\tif ( validator.pendingRequest ) {\r\n\t\t\t\t\t\tvalidator.formSubmitted = true;\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn handle();\r\n\t\t\t\t} else {\r\n\t\t\t\t\tvalidator.focusInvalid();\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\t\r\n\t\treturn validator;\r\n\t},\r\n\t// http://docs.jquery.com/Plugins/Validation/valid\r\n\tvalid: function() {\r\n\t\t/// <summary>\r\n\t\t/// Checks if the selected form is valid or if all selected elements are valid.\r\n\t\t/// validate() needs to be called on the form before checking it using this method.\r\n\t\t/// </summary>\r\n\t\t/// <returns type=\"Boolean\" />\r\n\r\n        if ( $(this[0]).is('form')) {\r\n            return this.validate().form();\r\n        } else {\r\n            var valid = true;\r\n            var validator = $(this[0].form).validate();\r\n            this.each(function() {\r\n\t\t\t\tvalid &= validator.element(this);\r\n            });\r\n            return valid;\r\n        }\r\n    },\r\n\t// attributes: space seperated list of attributes to retrieve and remove\r\n\tremoveAttrs: function(attributes) {\r\n\t\t/// <summary>\r\n\t\t/// Remove the specified attributes from the first matched element and return them.\r\n\t\t/// </summary>\r\n\t\t/// <param name=\"attributes\" type=\"String\">\r\n\t\t/// A space-seperated list of attribute names to remove.\r\n\t\t/// </param>\r\n\r\n\t\tvar result = {},\r\n\t\t\t$element = this;\r\n\t\t$.each(attributes.split(/\\s/), function(index, value) {\r\n\t\t\tresult[value] = $element.attr(value);\r\n\t\t\t$element.removeAttr(value);\r\n\t\t});\r\n\t\treturn result;\r\n\t},\r\n\t// http://docs.jquery.com/Plugins/Validation/rules\r\n\trules: function(command, argument) {\r\n\t\t/// <summary>\r\n\t\t/// Return the validations rules for the first selected element.\r\n\t\t/// </summary>\r\n\t\t/// <param name=\"command\" type=\"String\">\r\n\t\t/// Can be either \"add\" or \"remove\".\r\n\t\t/// </param>\r\n\t\t/// <param name=\"argument\" type=\"\">\r\n\t\t/// A list of rules to add or remove.\r\n\t\t/// </param>\r\n\r\n\t\tvar element = this[0];\r\n\t\t\r\n\t\tif (command) {\r\n\t\t\tvar settings = $.data(element.form, 'validator').settings;\r\n\t\t\tvar staticRules = settings.rules;\r\n\t\t\tvar existingRules = $.validator.staticRules(element);\r\n\t\t\tswitch(command) {\r\n\t\t\tcase \"add\":\r\n\t\t\t\t$.extend(existingRules, $.validator.normalizeRule(argument));\r\n\t\t\t\tstaticRules[element.name] = existingRules;\r\n\t\t\t\tif (argument.messages)\r\n\t\t\t\t\tsettings.messages[element.name] = $.extend( settings.messages[element.name], argument.messages );\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"remove\":\r\n\t\t\t\tif (!argument) {\r\n\t\t\t\t\tdelete staticRules[element.name];\r\n\t\t\t\t\treturn existingRules;\r\n\t\t\t\t}\r\n\t\t\t\tvar filtered = {};\r\n\t\t\t\t$.each(argument.split(/\\s/), function(index, method) {\r\n\t\t\t\t\tfiltered[method] = existingRules[method];\r\n\t\t\t\t\tdelete existingRules[method];\r\n\t\t\t\t});\r\n\t\t\t\treturn filtered;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tvar data = $.validator.normalizeRules(\r\n\t\t$.extend(\r\n\t\t\t{},\r\n\t\t\t$.validator.metadataRules(element),\r\n\t\t\t$.validator.classRules(element),\r\n\t\t\t$.validator.attributeRules(element),\r\n\t\t\t$.validator.staticRules(element)\r\n\t\t), element);\r\n\t\t\r\n\t\t// make sure required is at front\r\n\t\tif (data.required) {\r\n\t\t\tvar param = data.required;\r\n\t\t\tdelete data.required;\r\n\t\t\tdata = $.extend({required: param}, data);\r\n\t\t}\r\n\t\t\r\n\t\treturn data;\r\n\t}\r\n});\r\n\r\n// Custom selectors\r\n$.extend($.expr[\":\"], {\r\n\t// http://docs.jquery.com/Plugins/Validation/blank\r\n\tblank: function(a) {return !$.trim(\"\" + a.value);},\r\n\t// http://docs.jquery.com/Plugins/Validation/filled\r\n\tfilled: function(a) {return !!$.trim(\"\" + a.value);},\r\n\t// http://docs.jquery.com/Plugins/Validation/unchecked\r\n\tunchecked: function(a) {return !a.checked;}\r\n});\r\n\r\n// constructor for validator\r\n$.validator = function( options, form ) {\r\n\tthis.settings = $.extend( true, {}, $.validator.defaults, options );\r\n\tthis.currentForm = form;\r\n\tthis.init();\r\n};\r\n\r\n$.validator.format = function(source, params) {\r\n\t/// <summary>\r\n\t/// Replaces {n} placeholders with arguments.\r\n\t/// One or more arguments can be passed, in addition to the string template itself, to insert\r\n\t/// into the string.\r\n\t/// </summary>\r\n\t/// <param name=\"source\" type=\"String\">\r\n\t/// The string to format.\r\n\t/// </param>\r\n\t/// <param name=\"params\" type=\"String\">\r\n\t/// The first argument to insert, or an array of Strings to insert\r\n\t/// </param>\r\n\t/// <returns type=\"String\" />\r\n\r\n\tif ( arguments.length == 1 ) \r\n\t\treturn function() {\r\n\t\t\tvar args = $.makeArray(arguments);\r\n\t\t\targs.unshift(source);\r\n\t\t\treturn $.validator.format.apply( this, args );\r\n\t\t};\r\n\tif ( arguments.length > 2 && params.constructor != Array  ) {\r\n\t\tparams = $.makeArray(arguments).slice(1);\r\n\t}\r\n\tif ( params.constructor != Array ) {\r\n\t\tparams = [ params ];\r\n\t}\r\n\t$.each(params, function(i, n) {\r\n\t\tsource = source.replace(new RegExp(\"\\\\{\" + i + \"\\\\}\", \"g\"), n);\r\n\t});\r\n\treturn source;\r\n};\r\n\r\n$.extend($.validator, {\r\n\t\r\n\tdefaults: {\r\n\t\tmessages: {},\r\n\t\tgroups: {},\r\n\t\trules: {},\r\n\t\terrorClass: \"error\",\r\n\t\tvalidClass: \"valid\",\r\n\t\terrorElement: \"label\",\r\n\t\tfocusInvalid: true,\r\n\t\terrorContainer: $( [] ),\r\n\t\terrorLabelContainer: $( [] ),\r\n\t\tonsubmit: true,\r\n\t\tignore: [],\r\n\t\tignoreTitle: false,\r\n\t\tonfocusin: function(element) {\r\n\t\t\tthis.lastActive = element;\r\n\t\t\t\t\r\n\t\t\t// hide error label and remove error class on focus if enabled\r\n\t\t\tif ( this.settings.focusCleanup && !this.blockFocusCleanup ) {\r\n\t\t\t\tthis.settings.unhighlight && this.settings.unhighlight.call( this, element, this.settings.errorClass, this.settings.validClass );\r\n\t\t\t\tthis.addWrapper(this.errorsFor(element)).hide();\r\n\t\t\t}\r\n\t\t},\r\n\t\tonfocusout: function(element) {\r\n\t\t\tif ( !this.checkable(element) && (element.name in this.submitted || !this.optional(element)) ) {\r\n\t\t\t\tthis.element(element);\r\n\t\t\t}\r\n\t\t},\r\n\t\tonkeyup: function(element) {\r\n\t\t\tif ( element.name in this.submitted || element == this.lastElement ) {\r\n\t\t\t\tthis.element(element);\r\n\t\t\t}\r\n\t\t},\r\n\t\tonclick: function(element) {\r\n\t\t\t// click on selects, radiobuttons and checkboxes\r\n\t\t\tif ( element.name in this.submitted )\r\n\t\t\t\tthis.element(element);\r\n\t\t\t// or option elements, check parent select in that case\r\n\t\t\telse if (element.parentNode.name in this.submitted)\r\n\t\t\t\tthis.element(element.parentNode);\r\n\t\t},\r\n\t\thighlight: function( element, errorClass, validClass ) {\r\n\t\t\t$(element).addClass(errorClass).removeClass(validClass);\r\n\t\t},\r\n\t\tunhighlight: function( element, errorClass, validClass ) {\r\n\t\t\t$(element).removeClass(errorClass).addClass(validClass);\r\n\t\t}\r\n\t},\r\n\r\n\t// http://docs.jquery.com/Plugins/Validation/Validator/setDefaults\r\n\tsetDefaults: function(settings) {\r\n\t\t/// <summary>\r\n\t\t/// Modify default settings for validation.\r\n\t\t/// Accepts everything that Plugins/Validation/validate accepts.\r\n\t\t/// </summary>\r\n\t\t/// <param name=\"settings\" type=\"Options\">\r\n\t\t/// Options to set as default.\r\n\t\t/// </param>\r\n\r\n\t\t$.extend( $.validator.defaults, settings );\r\n\t},\r\n\r\n\tmessages: {\r\n\t\trequired: \"This field is required.\",\r\n\t\tremote: \"Please fix this field.\",\r\n\t\temail: \"Please enter a valid email address.\",\r\n\t\turl: \"Please enter a valid URL.\",\r\n\t\tdate: \"Please enter a valid date.\",\r\n\t\tdateISO: \"Please enter a valid date (ISO).\",\r\n\t\tnumber: \"Please enter a valid number.\",\r\n\t\tdigits: \"Please enter only digits.\",\r\n\t\tcreditcard: \"Please enter a valid credit card number.\",\r\n\t\tequalTo: \"Please enter the same value again.\",\r\n\t\taccept: \"Please enter a value with a valid extension.\",\r\n\t\tmaxlength: $.validator.format(\"Please enter no more than {0} characters.\"),\r\n\t\tminlength: $.validator.format(\"Please enter at least {0} characters.\"),\r\n\t\trangelength: $.validator.format(\"Please enter a value between {0} and {1} characters long.\"),\r\n\t\trange: $.validator.format(\"Please enter a value between {0} and {1}.\"),\r\n\t\tmax: $.validator.format(\"Please enter a value less than or equal to {0}.\"),\r\n\t\tmin: $.validator.format(\"Please enter a value greater than or equal to {0}.\")\r\n\t},\r\n\t\r\n\tautoCreateRanges: false,\r\n\t\r\n\tprototype: {\r\n\t\t\r\n\t\tinit: function() {\r\n\t\t\tthis.labelContainer = $(this.settings.errorLabelContainer);\r\n\t\t\tthis.errorContext = this.labelContainer.length && this.labelContainer || $(this.currentForm);\r\n\t\t\tthis.containers = $(this.settings.errorContainer).add( this.settings.errorLabelContainer );\r\n\t\t\tthis.submitted = {};\r\n\t\t\tthis.valueCache = {};\r\n\t\t\tthis.pendingRequest = 0;\r\n\t\t\tthis.pending = {};\r\n\t\t\tthis.invalid = {};\r\n\t\t\tthis.reset();\r\n\t\t\t\r\n\t\t\tvar groups = (this.groups = {});\r\n\t\t\t$.each(this.settings.groups, function(key, value) {\r\n\t\t\t\t$.each(value.split(/\\s/), function(index, name) {\r\n\t\t\t\t\tgroups[name] = key;\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t\tvar rules = this.settings.rules;\r\n\t\t\t$.each(rules, function(key, value) {\r\n\t\t\t\trules[key] = $.validator.normalizeRule(value);\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tfunction delegate(event) {\r\n\t\t\t\tvar validator = $.data(this[0].form, \"validator\"),\r\n\t\t\t\t\teventType = \"on\" + event.type.replace(/^validate/, \"\");\r\n\t\t\t\tvalidator.settings[eventType] && validator.settings[eventType].call(validator, this[0] );\r\n\t\t\t}\r\n\t\t\t$(this.currentForm)\r\n\t\t\t\t.validateDelegate(\":text, :password, :file, select, textarea\", \"focusin focusout keyup\", delegate)\r\n\t\t\t\t.validateDelegate(\":radio, :checkbox, select, option\", \"click\", delegate);\r\n\r\n\t\t\tif (this.settings.invalidHandler)\r\n\t\t\t\t$(this.currentForm).bind(\"invalid-form.validate\", this.settings.invalidHandler);\r\n\t\t},\r\n\r\n\t\t// http://docs.jquery.com/Plugins/Validation/Validator/form\r\n\t\tform: function() {\r\n\t\t\t/// <summary>\r\n\t\t\t/// Validates the form, returns true if it is valid, false otherwise.\r\n\t\t\t/// This behaves as a normal submit event, but returns the result.\r\n\t\t\t/// </summary>\r\n\t\t\t/// <returns type=\"Boolean\" />\r\n\r\n\t\t\tthis.checkForm();\r\n\t\t\t$.extend(this.submitted, this.errorMap);\r\n\t\t\tthis.invalid = $.extend({}, this.errorMap);\r\n\t\t\tif (!this.valid())\r\n\t\t\t\t$(this.currentForm).triggerHandler(\"invalid-form\", [this]);\r\n\t\t\tthis.showErrors();\r\n\t\t\treturn this.valid();\r\n\t\t},\r\n\t\t\r\n\t\tcheckForm: function() {\r\n\t\t\tthis.prepareForm();\r\n\t\t\tfor ( var i = 0, elements = (this.currentElements = this.elements()); elements[i]; i++ ) {\r\n\t\t\t\tthis.check( elements[i] );\r\n\t\t\t}\r\n\t\t\treturn this.valid(); \r\n\t\t},\r\n\t\t\r\n\t\t// http://docs.jquery.com/Plugins/Validation/Validator/element\r\n\t\telement: function( element ) {\r\n\t\t\t/// <summary>\r\n\t\t\t/// Validates a single element, returns true if it is valid, false otherwise.\r\n\t\t\t/// This behaves as validation on blur or keyup, but returns the result.\r\n\t\t\t/// </summary>\r\n\t\t\t/// <param name=\"element\" type=\"Selector\">\r\n\t\t\t/// An element to validate, must be inside the validated form.\r\n\t\t\t/// </param>\r\n\t\t\t/// <returns type=\"Boolean\" />\r\n\r\n\t\t\telement = this.clean( element );\r\n\t\t\tthis.lastElement = element;\r\n\t\t\tthis.prepareElement( element );\r\n\t\t\tthis.currentElements = $(element);\r\n\t\t\tvar result = this.check( element );\r\n\t\t\tif ( result ) {\r\n\t\t\t\tdelete this.invalid[element.name];\r\n\t\t\t} else {\r\n\t\t\t\tthis.invalid[element.name] = true;\r\n\t\t\t}\r\n\t\t\tif ( !this.numberOfInvalids() ) {\r\n\t\t\t\t// Hide error containers on last error\r\n\t\t\t\tthis.toHide = this.toHide.add( this.containers );\r\n\t\t\t}\r\n\t\t\tthis.showErrors();\r\n\t\t\treturn result;\r\n\t\t},\r\n\r\n\t\t// http://docs.jquery.com/Plugins/Validation/Validator/showErrors\r\n\t\tshowErrors: function(errors) {\r\n\t\t\t/// <summary>\r\n\t\t\t/// Show the specified messages.\r\n\t\t\t/// Keys have to refer to the names of elements, values are displayed for those elements, using the configured error placement.\r\n\t\t\t/// </summary>\r\n\t\t\t/// <param name=\"errors\" type=\"Object\">\r\n\t\t\t/// One or more key/value pairs of input names and messages.\r\n\t\t\t/// </param>\r\n\r\n\t\t\tif(errors) {\r\n\t\t\t\t// add items to error list and map\r\n\t\t\t\t$.extend( this.errorMap, errors );\r\n\t\t\t\tthis.errorList = [];\r\n\t\t\t\tfor ( var name in errors ) {\r\n\t\t\t\t\tthis.errorList.push({\r\n\t\t\t\t\t\tmessage: errors[name],\r\n\t\t\t\t\t\telement: this.findByName(name)[0]\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t\t// remove items from success list\r\n\t\t\t\tthis.successList = $.grep( this.successList, function(element) {\r\n\t\t\t\t\treturn !(element.name in errors);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t\tthis.settings.showErrors\r\n\t\t\t\t? this.settings.showErrors.call( this, this.errorMap, this.errorList )\r\n\t\t\t\t: this.defaultShowErrors();\r\n\t\t},\r\n\t\t\r\n\t\t// http://docs.jquery.com/Plugins/Validation/Validator/resetForm\r\n\t\tresetForm: function() {\r\n\t\t\t/// <summary>\r\n\t\t\t/// Resets the controlled form.\r\n\t\t\t/// Resets input fields to their original value (requires form plugin), removes classes\r\n\t\t\t/// indicating invalid elements and hides error messages.\r\n\t\t\t/// </summary>\r\n\r\n\t\t\tif ( $.fn.resetForm )\r\n\t\t\t\t$( this.currentForm ).resetForm();\r\n\t\t\tthis.submitted = {};\r\n\t\t\tthis.prepareForm();\r\n\t\t\tthis.hideErrors();\r\n\t\t\tthis.elements().removeClass( this.settings.errorClass );\r\n\t\t},\r\n\t\t\r\n\t\tnumberOfInvalids: function() {\r\n\t\t\t/// <summary>\r\n\t\t\t/// Returns the number of invalid fields.\r\n\t\t\t/// This depends on the internal validator state. It covers all fields only after\r\n\t\t\t/// validating the complete form (on submit or via $(\"form\").valid()). After validating\r\n\t\t\t/// a single element, only that element is counted. Most useful in combination with the\r\n\t\t\t/// invalidHandler-option.\r\n\t\t\t/// </summary>\r\n\t\t\t/// <returns type=\"Number\" />\r\n\r\n\t\t\treturn this.objectLength(this.invalid);\r\n\t\t},\r\n\t\t\r\n\t\tobjectLength: function( obj ) {\r\n\t\t\tvar count = 0;\r\n\t\t\tfor ( var i in obj )\r\n\t\t\t\tcount++;\r\n\t\t\treturn count;\r\n\t\t},\r\n\t\t\r\n\t\thideErrors: function() {\r\n\t\t\tthis.addWrapper( this.toHide ).hide();\r\n\t\t},\r\n\t\t\r\n\t\tvalid: function() {\r\n\t\t\treturn this.size() == 0;\r\n\t\t},\r\n\t\t\r\n\t\tsize: function() {\r\n\t\t\treturn this.errorList.length;\r\n\t\t},\r\n\t\t\r\n\t\tfocusInvalid: function() {\r\n\t\t\tif( this.settings.focusInvalid ) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\t$(this.findLastActive() || this.errorList.length && this.errorList[0].element || [])\r\n\t\t\t\t\t.filter(\":visible\")\r\n\t\t\t\t\t.focus()\r\n\t\t\t\t\t// manually trigger focusin event; without it, focusin handler isn't called, findLastActive won't have anything to find\r\n\t\t\t\t\t.trigger(\"focusin\");\r\n\t\t\t\t} catch(e) {\r\n\t\t\t\t\t// ignore IE throwing errors when focusing hidden elements\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\t\t\r\n\t\tfindLastActive: function() {\r\n\t\t\tvar lastActive = this.lastActive;\r\n\t\t\treturn lastActive && $.grep(this.errorList, function(n) {\r\n\t\t\t\treturn n.element.name == lastActive.name;\r\n\t\t\t}).length == 1 && lastActive;\r\n\t\t},\r\n\t\t\r\n\t\telements: function() {\r\n\t\t\tvar validator = this,\r\n\t\t\t\trulesCache = {};\r\n\t\t\t\r\n\t\t\t// select all valid inputs inside the form (no submit or reset buttons)\r\n\t\t\t// workaround $Query([]).add until http://dev.jquery.com/ticket/2114 is solved\r\n\t\t\treturn $([]).add(this.currentForm.elements)\r\n\t\t\t.filter(\":input\")\r\n\t\t\t.not(\":submit, :reset, :image, [disabled]\")\r\n\t\t\t.not( this.settings.ignore )\r\n\t\t\t.filter(function() {\r\n\t\t\t\t!this.name && validator.settings.debug && window.console && console.error( \"%o has no name assigned\", this);\r\n\t\t\t\r\n\t\t\t\t// select only the first element for each name, and only those with rules specified\r\n\t\t\t\tif ( this.name in rulesCache || !validator.objectLength($(this).rules()) )\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t\r\n\t\t\t\trulesCache[this.name] = true;\r\n\t\t\t\treturn true;\r\n\t\t\t});\r\n\t\t},\r\n\t\t\r\n\t\tclean: function( selector ) {\r\n\t\t\treturn $( selector )[0];\r\n\t\t},\r\n\t\t\r\n\t\terrors: function() {\r\n\t\t\treturn $( this.settings.errorElement + \".\" + this.settings.errorClass, this.errorContext );\r\n\t\t},\r\n\t\t\r\n\t\treset: function() {\r\n\t\t\tthis.successList = [];\r\n\t\t\tthis.errorList = [];\r\n\t\t\tthis.errorMap = {};\r\n\t\t\tthis.toShow = $([]);\r\n\t\t\tthis.toHide = $([]);\r\n\t\t\tthis.currentElements = $([]);\r\n\t\t},\r\n\t\t\r\n\t\tprepareForm: function() {\r\n\t\t\tthis.reset();\r\n\t\t\tthis.toHide = this.errors().add( this.containers );\r\n\t\t},\r\n\t\t\r\n\t\tprepareElement: function( element ) {\r\n\t\t\tthis.reset();\r\n\t\t\tthis.toHide = this.errorsFor(element);\r\n\t\t},\r\n\t\r\n\t\tcheck: function( element ) {\r\n\t\t\telement = this.clean( element );\r\n\t\t\t\r\n\t\t\t// if radio/checkbox, validate first element in group instead\r\n\t\t\tif (this.checkable(element)) {\r\n\t\t\t    element = this.findByName(element.name).not(this.settings.ignore)[0];\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tvar rules = $(element).rules();\r\n\t\t\tvar dependencyMismatch = false;\r\n\t\t\tfor (var method in rules) {\r\n\t\t\t\tvar rule = { method: method, parameters: rules[method] };\r\n\t\t\t\ttry {\r\n\t\t\t\t\tvar result = $.validator.methods[method].call( this, element.value.replace(/\\r/g, \"\"), element, rule.parameters );\r\n\t\t\t\t\t\r\n\t\t\t\t\t// if a method indicates that the field is optional and therefore valid,\r\n\t\t\t\t\t// don't mark it as valid when there are no other rules\r\n\t\t\t\t\tif ( result == \"dependency-mismatch\" ) {\r\n\t\t\t\t\t\tdependencyMismatch = true;\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tdependencyMismatch = false;\r\n\t\t\t\t\t\r\n\t\t\t\t\tif ( result == \"pending\" ) {\r\n\t\t\t\t\t\tthis.toHide = this.toHide.not( this.errorsFor(element) );\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tif( !result ) {\r\n\t\t\t\t\t\tthis.formatAndAdd( element, rule );\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t} catch(e) {\r\n\t\t\t\t\tthis.settings.debug && window.console && console.log(\"exception occured when checking element \" + element.id\r\n\t\t\t\t\t\t + \", check the '\" + rule.method + \"' method\", e);\r\n\t\t\t\t\tthrow e;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (dependencyMismatch)\r\n\t\t\t\treturn;\r\n\t\t\tif ( this.objectLength(rules) )\r\n\t\t\t\tthis.successList.push(element);\r\n\t\t\treturn true;\r\n\t\t},\r\n\t\t\r\n\t\t// return the custom message for the given element and validation method\r\n\t\t// specified in the element's \"messages\" metadata\r\n\t\tcustomMetaMessage: function(element, method) {\r\n\t\t\tif (!$.metadata)\r\n\t\t\t\treturn;\r\n\t\t\t\r\n\t\t\tvar meta = this.settings.meta\r\n\t\t\t\t? $(element).metadata()[this.settings.meta]\r\n\t\t\t\t: $(element).metadata();\r\n\t\t\t\r\n\t\t\treturn meta && meta.messages && meta.messages[method];\r\n\t\t},\r\n\t\t\r\n\t\t// return the custom message for the given element name and validation method\r\n\t\tcustomMessage: function( name, method ) {\r\n\t\t\tvar m = this.settings.messages[name];\r\n\t\t\treturn m && (m.constructor == String\r\n\t\t\t\t? m\r\n\t\t\t\t: m[method]);\r\n\t\t},\r\n\t\t\r\n\t\t// return the first defined argument, allowing empty strings\r\n\t\tfindDefined: function() {\r\n\t\t\tfor(var i = 0; i < arguments.length; i++) {\r\n\t\t\t\tif (arguments[i] !== undefined)\r\n\t\t\t\t\treturn arguments[i];\r\n\t\t\t}\r\n\t\t\treturn undefined;\r\n\t\t},\r\n\t\t\r\n\t\tdefaultMessage: function( element, method) {\r\n\t\t\treturn this.findDefined(\r\n\t\t\t\tthis.customMessage( element.name, method ),\r\n\t\t\t\tthis.customMetaMessage( element, method ),\r\n\t\t\t\t// title is never undefined, so handle empty string as undefined\r\n\t\t\t\t!this.settings.ignoreTitle && element.title || undefined,\r\n\t\t\t\t$.validator.messages[method],\r\n\t\t\t\t\"<strong>Warning: No message defined for \" + element.name + \"</strong>\"\r\n\t\t\t);\r\n\t\t},\r\n\t\t\r\n\t\tformatAndAdd: function( element, rule ) {\r\n\t\t\tvar message = this.defaultMessage( element, rule.method ),\r\n\t\t\t\ttheregex = /\\$?\\{(\\d+)\\}/g;\r\n\t\t\tif ( typeof message == \"function\" ) {\r\n\t\t\t\tmessage = message.call(this, rule.parameters, element);\r\n\t\t\t} else if (theregex.test(message)) {\r\n\t\t\t\tmessage = jQuery.format(message.replace(theregex, '{$1}'), rule.parameters);\r\n\t\t\t}\t\t\t\r\n\t\t\tthis.errorList.push({\r\n\t\t\t\tmessage: message,\r\n\t\t\t\telement: element\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.errorMap[element.name] = message;\r\n\t\t\tthis.submitted[element.name] = message;\r\n\t\t},\r\n\t\t\r\n\t\taddWrapper: function(toToggle) {\r\n\t\t\tif ( this.settings.wrapper )\r\n\t\t\t\ttoToggle = toToggle.add( toToggle.parent( this.settings.wrapper ) );\r\n\t\t\treturn toToggle;\r\n\t\t},\r\n\t\t\r\n\t\tdefaultShowErrors: function() {\r\n\t\t\tfor ( var i = 0; this.errorList[i]; i++ ) {\r\n\t\t\t\tvar error = this.errorList[i];\r\n\t\t\t\tthis.settings.highlight && this.settings.highlight.call( this, error.element, this.settings.errorClass, this.settings.validClass );\r\n\t\t\t\tthis.showLabel( error.element, error.message );\r\n\t\t\t}\r\n\t\t\tif( this.errorList.length ) {\r\n\t\t\t\tthis.toShow = this.toShow.add( this.containers );\r\n\t\t\t}\r\n\t\t\tif (this.settings.success) {\r\n\t\t\t\tfor ( var i = 0; this.successList[i]; i++ ) {\r\n\t\t\t\t\tthis.showLabel( this.successList[i] );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (this.settings.unhighlight) {\r\n\t\t\t\tfor ( var i = 0, elements = this.validElements(); elements[i]; i++ ) {\r\n\t\t\t\t\tthis.settings.unhighlight.call( this, elements[i], this.settings.errorClass, this.settings.validClass );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tthis.toHide = this.toHide.not( this.toShow );\r\n\t\t\tthis.hideErrors();\r\n\t\t\tthis.addWrapper( this.toShow ).show();\r\n\t\t},\r\n\t\t\r\n\t\tvalidElements: function() {\r\n\t\t\treturn this.currentElements.not(this.invalidElements());\r\n\t\t},\r\n\t\t\r\n\t\tinvalidElements: function() {\r\n\t\t\treturn $(this.errorList).map(function() {\r\n\t\t\t\treturn this.element;\r\n\t\t\t});\r\n\t\t},\r\n\t\t\r\n\t\tshowLabel: function(element, message) {\r\n\t\t\tvar label = this.errorsFor( element );\r\n\t\t\tif ( label.length ) {\r\n\t\t\t\t// refresh error/success class\r\n\t\t\t\tlabel.removeClass().addClass( this.settings.errorClass );\r\n\t\t\t\r\n\t\t\t\t// check if we have a generated label, replace the message then\r\n\t\t\t\tlabel.attr(\"generated\") && label.html(message);\r\n\t\t\t} else {\r\n\t\t\t\t// create label\r\n\t\t\t\tlabel = $(\"<\" + this.settings.errorElement + \"/>\")\r\n\t\t\t\t\t.attr({\"for\":  this.idOrName(element), generated: true})\r\n\t\t\t\t\t.addClass(this.settings.errorClass)\r\n\t\t\t\t\t.html(message || \"\");\r\n\t\t\t\tif ( this.settings.wrapper ) {\r\n\t\t\t\t\t// make sure the element is visible, even in IE\r\n\t\t\t\t\t// actually showing the wrapped element is handled elsewhere\r\n\t\t\t\t\tlabel = label.hide().show().wrap(\"<\" + this.settings.wrapper + \"/>\").parent();\r\n\t\t\t\t}\r\n\t\t\t\tif ( !this.labelContainer.append(label).length )\r\n\t\t\t\t\tthis.settings.errorPlacement\r\n\t\t\t\t\t\t? this.settings.errorPlacement(label, $(element) )\r\n\t\t\t\t\t\t: label.insertAfter(element);\r\n\t\t\t}\r\n\t\t\tif ( !message && this.settings.success ) {\r\n\t\t\t\tlabel.text(\"\");\r\n\t\t\t\ttypeof this.settings.success == \"string\"\r\n\t\t\t\t\t? label.addClass( this.settings.success )\r\n\t\t\t\t\t: this.settings.success( label );\r\n\t\t\t}\r\n\t\t\tthis.toShow = this.toShow.add(label);\r\n\t\t},\r\n\t\t\r\n\t\terrorsFor: function(element) {\r\n\t\t\tvar name = this.idOrName(element);\r\n    \t\treturn this.errors().filter(function() {\r\n\t\t\t\treturn $(this).attr('for') == name;\r\n\t\t\t});\r\n\t\t},\r\n\t\t\r\n\t\tidOrName: function(element) {\r\n\t\t\treturn this.groups[element.name] || (this.checkable(element) ? element.name : element.id || element.name);\r\n\t\t},\r\n\r\n\t\tcheckable: function( element ) {\r\n\t\t\treturn /radio|checkbox/i.test(element.type);\r\n\t\t},\r\n\t\t\r\n\t\tfindByName: function( name ) {\r\n\t\t\t// select by name and filter by form for performance over form.find(\"[name=...]\")\r\n\t\t\tvar form = this.currentForm;\r\n\t\t\treturn $(document.getElementsByName(name)).map(function(index, element) {\r\n\t\t\t\treturn element.form == form && element.name == name && element  || null;\r\n\t\t\t});\r\n\t\t},\r\n\t\t\r\n\t\tgetLength: function(value, element) {\r\n\t\t\tswitch( element.nodeName.toLowerCase() ) {\r\n\t\t\tcase 'select':\r\n\t\t\t\treturn $(\"option:selected\", element).length;\r\n\t\t\tcase 'input':\r\n\t\t\t\tif( this.checkable( element) )\r\n\t\t\t\t\treturn this.findByName(element.name).filter(':checked').length;\r\n\t\t\t}\r\n\t\t\treturn value.length;\r\n\t\t},\r\n\t\r\n\t\tdepend: function(param, element) {\r\n\t\t\treturn this.dependTypes[typeof param]\r\n\t\t\t\t? this.dependTypes[typeof param](param, element)\r\n\t\t\t\t: true;\r\n\t\t},\r\n\t\r\n\t\tdependTypes: {\r\n\t\t\t\"boolean\": function(param, element) {\r\n\t\t\t\treturn param;\r\n\t\t\t},\r\n\t\t\t\"string\": function(param, element) {\r\n\t\t\t\treturn !!$(param, element.form).length;\r\n\t\t\t},\r\n\t\t\t\"function\": function(param, element) {\r\n\t\t\t\treturn param(element);\r\n\t\t\t}\r\n\t\t},\r\n\t\t\r\n\t\toptional: function(element) {\r\n\t\t\treturn !$.validator.methods.required.call(this, $.trim(element.value), element) && \"dependency-mismatch\";\r\n\t\t},\r\n\t\t\r\n\t\tstartRequest: function(element) {\r\n\t\t\tif (!this.pending[element.name]) {\r\n\t\t\t\tthis.pendingRequest++;\r\n\t\t\t\tthis.pending[element.name] = true;\r\n\t\t\t}\r\n\t\t},\r\n\t\t\r\n\t\tstopRequest: function(element, valid) {\r\n\t\t\tthis.pendingRequest--;\r\n\t\t\t// sometimes synchronization fails, make sure pendingRequest is never < 0\r\n\t\t\tif (this.pendingRequest < 0)\r\n\t\t\t\tthis.pendingRequest = 0;\r\n\t\t\tdelete this.pending[element.name];\r\n\t\t\tif ( valid && this.pendingRequest == 0 && this.formSubmitted && this.form() ) {\r\n\t\t\t\t$(this.currentForm).submit();\r\n\t\t\t\tthis.formSubmitted = false;\r\n\t\t\t} else if (!valid && this.pendingRequest == 0 && this.formSubmitted) {\r\n\t\t\t\t$(this.currentForm).triggerHandler(\"invalid-form\", [this]);\r\n\t\t\t\tthis.formSubmitted = false;\r\n\t\t\t}\r\n\t\t},\r\n\t\t\r\n\t\tpreviousValue: function(element) {\r\n\t\t\treturn $.data(element, \"previousValue\") || $.data(element, \"previousValue\", {\r\n\t\t\t\told: null,\r\n\t\t\t\tvalid: true,\r\n\t\t\t\tmessage: this.defaultMessage( element, \"remote\" )\r\n\t\t\t});\r\n\t\t}\r\n\t\t\r\n\t},\r\n\t\r\n\tclassRuleSettings: {\r\n\t\trequired: {required: true},\r\n\t\temail: {email: true},\r\n\t\turl: {url: true},\r\n\t\tdate: {date: true},\r\n\t\tdateISO: {dateISO: true},\r\n\t\tdateDE: {dateDE: true},\r\n\t\tnumber: {number: true},\r\n\t\tnumberDE: {numberDE: true},\r\n\t\tdigits: {digits: true},\r\n\t\tcreditcard: {creditcard: true}\r\n\t},\r\n\t\r\n\taddClassRules: function(className, rules) {\r\n\t\t/// <summary>\r\n\t\t/// Add a compound class method - useful to refactor common combinations of rules into a single\r\n\t\t/// class.\r\n\t\t/// </summary>\r\n\t\t/// <param name=\"name\" type=\"String\">\r\n\t\t/// The name of the class rule to add\r\n\t\t/// </param>\r\n\t\t/// <param name=\"rules\" type=\"Options\">\r\n\t\t/// The compound rules\r\n\t\t/// </param>\r\n\r\n\t\tclassName.constructor == String ?\r\n\t\t\tthis.classRuleSettings[className] = rules :\r\n\t\t\t$.extend(this.classRuleSettings, className);\r\n\t},\r\n\t\r\n\tclassRules: function(element) {\r\n\t\tvar rules = {};\r\n\t\tvar classes = $(element).attr('class');\r\n\t\tclasses && $.each(classes.split(' '), function() {\r\n\t\t\tif (this in $.validator.classRuleSettings) {\r\n\t\t\t\t$.extend(rules, $.validator.classRuleSettings[this]);\r\n\t\t\t}\r\n\t\t});\r\n\t\treturn rules;\r\n\t},\r\n\t\r\n\tattributeRules: function(element) {\r\n\t\tvar rules = {};\r\n\t\tvar $element = $(element);\r\n\r\n\t\tfor (var method in $.validator.methods) {\r\n\t\t\tvar value = $element.attr(method);\r\n\t\t\tif (value) {\r\n\t\t\t\trules[method] = value;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// maxlength may be returned as -1, 2147483647 (IE) and 524288 (safari) for text inputs\r\n\t\tif (rules.maxlength && /-1|2147483647|524288/.test(rules.maxlength)) {\r\n\t\t\tdelete rules.maxlength;\r\n\t\t}\r\n\t\t\r\n\t\treturn rules;\r\n\t},\r\n\t\r\n\tmetadataRules: function(element) {\r\n\t\tif (!$.metadata) return {};\r\n\t\t\r\n\t\tvar meta = $.data(element.form, 'validator').settings.meta;\r\n\t\treturn meta ?\r\n\t\t\t$(element).metadata()[meta] :\r\n\t\t\t$(element).metadata();\r\n\t},\r\n\t\r\n\tstaticRules: function(element) {\r\n\t\tvar rules = {};\r\n\t\tvar validator = $.data(element.form, 'validator');\r\n\t\tif (validator.settings.rules) {\r\n\t\t\trules = $.validator.normalizeRule(validator.settings.rules[element.name]) || {};\r\n\t\t}\r\n\t\treturn rules;\r\n\t},\r\n\t\r\n\tnormalizeRules: function(rules, element) {\r\n\t\t// handle dependency check\r\n\t\t$.each(rules, function(prop, val) {\r\n\t\t\t// ignore rule when param is explicitly false, eg. required:false\r\n\t\t\tif (val === false) {\r\n\t\t\t\tdelete rules[prop];\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tif (val.param || val.depends) {\r\n\t\t\t\tvar keepRule = true;\r\n\t\t\t\tswitch (typeof val.depends) {\r\n\t\t\t\t\tcase \"string\":\r\n\t\t\t\t\t\tkeepRule = !!$(val.depends, element.form).length;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"function\":\r\n\t\t\t\t\t\tkeepRule = val.depends.call(element, element);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tif (keepRule) {\r\n\t\t\t\t\trules[prop] = val.param !== undefined ? val.param : true;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tdelete rules[prop];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\t// evaluate parameters\r\n\t\t$.each(rules, function(rule, parameter) {\r\n\t\t\trules[rule] = $.isFunction(parameter) ? parameter(element) : parameter;\r\n\t\t});\r\n\t\t\r\n\t\t// clean number parameters\r\n\t\t$.each(['minlength', 'maxlength', 'min', 'max'], function() {\r\n\t\t\tif (rules[this]) {\r\n\t\t\t\trules[this] = Number(rules[this]);\r\n\t\t\t}\r\n\t\t});\r\n\t\t$.each(['rangelength', 'range'], function() {\r\n\t\t\tif (rules[this]) {\r\n\t\t\t\trules[this] = [Number(rules[this][0]), Number(rules[this][1])];\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tif ($.validator.autoCreateRanges) {\r\n\t\t\t// auto-create ranges\r\n\t\t\tif (rules.min && rules.max) {\r\n\t\t\t\trules.range = [rules.min, rules.max];\r\n\t\t\t\tdelete rules.min;\r\n\t\t\t\tdelete rules.max;\r\n\t\t\t}\r\n\t\t\tif (rules.minlength && rules.maxlength) {\r\n\t\t\t\trules.rangelength = [rules.minlength, rules.maxlength];\r\n\t\t\t\tdelete rules.minlength;\r\n\t\t\t\tdelete rules.maxlength;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// To support custom messages in metadata ignore rule methods titled \"messages\"\r\n\t\tif (rules.messages) {\r\n\t\t\tdelete rules.messages;\r\n\t\t}\r\n\t\t\r\n\t\treturn rules;\r\n\t},\r\n\t\r\n\t// Converts a simple string to a {string: true} rule, e.g., \"required\" to {required:true}\r\n\tnormalizeRule: function(data) {\r\n\t\tif( typeof data == \"string\" ) {\r\n\t\t\tvar transformed = {};\r\n\t\t\t$.each(data.split(/\\s/), function() {\r\n\t\t\t\ttransformed[this] = true;\r\n\t\t\t});\r\n\t\t\tdata = transformed;\r\n\t\t}\r\n\t\treturn data;\r\n\t},\r\n\t\r\n\t// http://docs.jquery.com/Plugins/Validation/Validator/addMethod\r\n\taddMethod: function(name, method, message) {\r\n\t\t/// <summary>\r\n\t\t/// Add a custom validation method. It must consist of a name (must be a legal javascript \r\n\t\t/// identifier), a javascript based function and a default string message.\r\n\t\t/// </summary>\r\n\t\t/// <param name=\"name\" type=\"String\">\r\n\t\t/// The name of the method, used to identify and referencing it, must be a valid javascript\r\n\t\t/// identifier\r\n\t\t/// </param>\r\n\t\t/// <param name=\"method\" type=\"Function\">\r\n\t\t/// The actual method implementation, returning true if an element is valid\r\n\t\t/// </param>\r\n\t\t/// <param name=\"message\" type=\"String\" optional=\"true\">\r\n\t\t/// (Optional) The default message to display for this method. Can be a function created by \r\n\t\t/// jQuery.validator.format(value). When undefined, an already existing message is used \r\n\t\t/// (handy for localization), otherwise the field-specific messages have to be defined.\r\n\t\t/// </param>\r\n\r\n\t\t$.validator.methods[name] = method;\r\n\t\t$.validator.messages[name] = message != undefined ? message : $.validator.messages[name];\r\n\t\tif (method.length < 3) {\r\n\t\t\t$.validator.addClassRules(name, $.validator.normalizeRule(name));\r\n\t\t}\r\n\t},\r\n\r\n\tmethods: {\r\n\r\n\t\t// http://docs.jquery.com/Plugins/Validation/Methods/required\r\n\t\trequired: function(value, element, param) {\r\n\t\t\t// check if dependency is met\r\n\t\t\tif ( !this.depend(param, element) )\r\n\t\t\t\treturn \"dependency-mismatch\";\r\n\t\t\tswitch( element.nodeName.toLowerCase() ) {\r\n\t\t\tcase 'select':\r\n\t\t\t\t// could be an array for select-multiple or a string, both are fine this way\r\n\t\t\t\tvar val = $(element).val();\r\n\t\t\t\treturn val && val.length > 0;\r\n\t\t\tcase 'input':\r\n\t\t\t\tif ( this.checkable(element) )\r\n\t\t\t\t\treturn this.getLength(value, element) > 0;\r\n\t\t\tdefault:\r\n\t\t\t\treturn $.trim(value).length > 0;\r\n\t\t\t}\r\n\t\t},\r\n\t\t\r\n\t\t// http://docs.jquery.com/Plugins/Validation/Methods/remote\r\n\t\tremote: function(value, element, param) {\r\n\t\t\tif ( this.optional(element) )\r\n\t\t\t\treturn \"dependency-mismatch\";\r\n\t\t\t\r\n\t\t\tvar previous = this.previousValue(element);\r\n\t\t\tif (!this.settings.messages[element.name] )\r\n\t\t\t\tthis.settings.messages[element.name] = {};\r\n\t\t\tprevious.originalMessage = this.settings.messages[element.name].remote;\r\n\t\t\tthis.settings.messages[element.name].remote = previous.message;\r\n\t\t\t\r\n\t\t\tparam = typeof param == \"string\" && {url:param} || param; \r\n\t\t\t\r\n\t\t\tif ( this.pending[element.name] ) {\r\n\t\t\t\treturn \"pending\";\r\n\t\t\t}\r\n\t\t\tif ( previous.old === value ) {\r\n\t\t\t\treturn previous.valid;\r\n\t\t\t}\r\n\r\n\t\t\tprevious.old = value;\r\n\t\t\tvar validator = this;\r\n\t\t\tthis.startRequest(element);\r\n\t\t\tvar data = {};\r\n\t\t\tdata[element.name] = value;\r\n\t\t\t$.ajax($.extend(true, {\r\n\t\t\t\turl: param,\r\n\t\t\t\tmode: \"abort\",\r\n\t\t\t\tport: \"validate\" + element.name,\r\n\t\t\t\tdataType: \"json\",\r\n\t\t\t\tdata: data,\r\n\t\t\t\tsuccess: function(response) {\r\n\t\t\t\t\tvalidator.settings.messages[element.name].remote = previous.originalMessage;\r\n\t\t\t\t\tvar valid = response === true;\r\n\t\t\t\t\tif ( valid ) {\r\n\t\t\t\t\t\tvar submitted = validator.formSubmitted;\r\n\t\t\t\t\t\tvalidator.prepareElement(element);\r\n\t\t\t\t\t\tvalidator.formSubmitted = submitted;\r\n\t\t\t\t\t\tvalidator.successList.push(element);\r\n\t\t\t\t\t\tvalidator.showErrors();\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tvar errors = {};\r\n\t\t\t\t\t\tvar message = response || validator.defaultMessage(element, \"remote\");\r\n\t\t\t\t\t\terrors[element.name] = previous.message = $.isFunction(message) ? message(value) : message;\r\n\t\t\t\t\t\tvalidator.showErrors(errors);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tprevious.valid = valid;\r\n\t\t\t\t\tvalidator.stopRequest(element, valid);\r\n\t\t\t\t}\r\n\t\t\t}, param));\r\n\t\t\treturn \"pending\";\r\n\t\t},\r\n\r\n\t\t// http://docs.jquery.com/Plugins/Validation/Methods/minlength\r\n\t\tminlength: function(value, element, param) {\r\n\t\t\treturn this.optional(element) || this.getLength($.trim(value), element) >= param;\r\n\t\t},\r\n\t\t\r\n\t\t// http://docs.jquery.com/Plugins/Validation/Methods/maxlength\r\n\t\tmaxlength: function(value, element, param) {\r\n\t\t\treturn this.optional(element) || this.getLength($.trim(value), element) <= param;\r\n\t\t},\r\n\t\t\r\n\t\t// http://docs.jquery.com/Plugins/Validation/Methods/rangelength\r\n\t\trangelength: function(value, element, param) {\r\n\t\t\tvar length = this.getLength($.trim(value), element);\r\n\t\t\treturn this.optional(element) || ( length >= param[0] && length <= param[1] );\r\n\t\t},\r\n\t\t\r\n\t\t// http://docs.jquery.com/Plugins/Validation/Methods/min\r\n\t\tmin: function( value, element, param ) {\r\n\t\t\treturn this.optional(element) || value >= param;\r\n\t\t},\r\n\t\t\r\n\t\t// http://docs.jquery.com/Plugins/Validation/Methods/max\r\n\t\tmax: function( value, element, param ) {\r\n\t\t\treturn this.optional(element) || value <= param;\r\n\t\t},\r\n\t\t\r\n\t\t// http://docs.jquery.com/Plugins/Validation/Methods/range\r\n\t\trange: function( value, element, param ) {\r\n\t\t\treturn this.optional(element) || ( value >= param[0] && value <= param[1] );\r\n\t\t},\r\n\t\t\r\n\t\t// http://docs.jquery.com/Plugins/Validation/Methods/email\r\n\t\temail: function(value, element) {\r\n\t\t\t// contributed by Scott Gonzalez: http://projects.scottsplayground.com/email_address_validation/\r\n\t\t\treturn this.optional(element) || /^((([a-z]|\\d|[!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])+(\\.([a-z]|\\d|[!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])+)*)|((\\x22)((((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(([\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x7f]|\\x21|[\\x23-\\x5b]|[\\x5d-\\x7e]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(\\\\([\\x01-\\x09\\x0b\\x0c\\x0d-\\x7f]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]))))*(((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(\\x22)))@((([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))\\.)+(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))\\.?$/i.test(value);\r\n\t\t},\r\n\t\r\n\t\t// http://docs.jquery.com/Plugins/Validation/Methods/url\r\n\t\turl: function(value, element) {\r\n\t\t\t// contributed by Scott Gonzalez: http://projects.scottsplayground.com/iri/\r\n\t\t\treturn this.optional(element) || /^(https?|ftp):\\/\\/(((([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&'\\(\\)\\*\\+,;=]|:)*@)?(((\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5]))|((([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))\\.)+(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))\\.?)(:\\d*)?)(\\/((([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&'\\(\\)\\*\\+,;=]|:|@)+(\\/(([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&'\\(\\)\\*\\+,;=]|:|@)*)*)?)?(\\?((([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&'\\(\\)\\*\\+,;=]|:|@)|[\\uE000-\\uF8FF]|\\/|\\?)*)?(\\#((([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&'\\(\\)\\*\\+,;=]|:|@)|\\/|\\?)*)?$/i.test(value);\r\n\t\t},\r\n        \r\n\t\t// http://docs.jquery.com/Plugins/Validation/Methods/date\r\n\t\tdate: function(value, element) {\r\n\t\t\treturn this.optional(element) || !/Invalid|NaN/.test(new Date(value));\r\n\t\t},\r\n\t\r\n\t\t// http://docs.jquery.com/Plugins/Validation/Methods/dateISO\r\n\t\tdateISO: function(value, element) {\r\n\t\t\treturn this.optional(element) || /^\\d{4}[\\/-]\\d{1,2}[\\/-]\\d{1,2}$/.test(value);\r\n\t\t},\r\n\t\r\n\t\t// http://docs.jquery.com/Plugins/Validation/Methods/number\r\n\t\tnumber: function(value, element) {\r\n\t\t\treturn this.optional(element) || /^-?(?:\\d+|\\d{1,3}(?:,\\d{3})+)(?:\\.\\d+)?$/.test(value);\r\n\t\t},\r\n\t\r\n\t\t// http://docs.jquery.com/Plugins/Validation/Methods/digits\r\n\t\tdigits: function(value, element) {\r\n\t\t\treturn this.optional(element) || /^\\d+$/.test(value);\r\n\t\t},\r\n\t\t\r\n\t\t// http://docs.jquery.com/Plugins/Validation/Methods/creditcard\r\n\t\t// based on http://en.wikipedia.org/wiki/Luhn\r\n\t\tcreditcard: function(value, element) {\r\n\t\t\tif ( this.optional(element) )\r\n\t\t\t\treturn \"dependency-mismatch\";\r\n\t\t\t// accept only digits and dashes\r\n\t\t\tif (/[^0-9-]+/.test(value))\r\n\t\t\t\treturn false;\r\n\t\t\tvar nCheck = 0,\r\n\t\t\t\tnDigit = 0,\r\n\t\t\t\tbEven = false;\r\n\r\n\t\t\tvalue = value.replace(/\\D/g, \"\");\r\n\r\n\t\t\tfor (var n = value.length - 1; n >= 0; n--) {\r\n\t\t\t\tvar cDigit = value.charAt(n);\r\n\t\t\t\tvar nDigit = parseInt(cDigit, 10);\r\n\t\t\t\tif (bEven) {\r\n\t\t\t\t\tif ((nDigit *= 2) > 9)\r\n\t\t\t\t\t\tnDigit -= 9;\r\n\t\t\t\t}\r\n\t\t\t\tnCheck += nDigit;\r\n\t\t\t\tbEven = !bEven;\r\n\t\t\t}\r\n\r\n\t\t\treturn (nCheck % 10) == 0;\r\n\t\t},\r\n\t\t\r\n\t\t// http://docs.jquery.com/Plugins/Validation/Methods/accept\r\n\t\taccept: function(value, element, param) {\r\n\t\t\tparam = typeof param == \"string\" ? param.replace(/,/g, '|') : \"png|jpe?g|gif\";\r\n\t\t\treturn this.optional(element) || value.match(new RegExp(\".(\" + param + \")$\", \"i\")); \r\n\t\t},\r\n\t\t\r\n\t\t// http://docs.jquery.com/Plugins/Validation/Methods/equalTo\r\n\t\tequalTo: function(value, element, param) {\r\n\t\t\t// bind to the blur event of the target in order to revalidate whenever the target field is updated\r\n\t\t\t// TODO find a way to bind the event just once, avoiding the unbind-rebind overhead\r\n\t\t\tvar target = $(param).unbind(\".validate-equalTo\").bind(\"blur.validate-equalTo\", function() {\r\n\t\t\t\t$(element).valid();\r\n\t\t\t});\r\n\t\t\treturn value == target.val();\r\n\t\t}\r\n\t\t\r\n\t}\r\n\t\r\n});\r\n\r\n// deprecated, use $.validator.format instead\r\n$.format = $.validator.format;\r\n\r\n})(jQuery);\r\n\r\n// ajax mode: abort\r\n// usage: $.ajax({ mode: \"abort\"[, port: \"uniqueport\"]});\r\n// if mode:\"abort\" is used, the previous request on that port (port can be undefined) is aborted via XMLHttpRequest.abort() \r\n;(function($) {\r\n\tvar pendingRequests = {};\r\n\t\t// Use a prefilter if available (1.5+)\r\n\tif ( $.ajaxPrefilter ) {\r\n\t\t$.ajaxPrefilter(function(settings, _, xhr) {\r\n\t\t    var port = settings.port;\r\n\t\t    if (settings.mode == \"abort\") {\r\n\t\t\t    if ( pendingRequests[port] ) {\r\n\t\t\t\t    pendingRequests[port].abort();\r\n\t\t\t    }\t\t\t\tpendingRequests[port] = xhr;\r\n\t\t    }\r\n\t    });\r\n\t} else {\r\n\t\t// Proxy ajax\r\n\t\tvar ajax = $.ajax;\r\n\t\t$.ajax = function(settings) {\r\n\t\t\tvar mode = ( \"mode\" in settings ? settings : $.ajaxSettings ).mode,\r\n\t\t\t\tport = ( \"port\" in settings ? settings : $.ajaxSettings ).port;\r\n\t\t\tif (mode == \"abort\") {\r\n\t\t\t\tif ( pendingRequests[port] ) {\r\n\t\t\t\t\tpendingRequests[port].abort();\r\n\t\t\t\t}\r\n\r\n\t\t\t    return (pendingRequests[port] = ajax.apply(this, arguments));\r\n\t\t    }\r\n\t\t    return ajax.apply(this, arguments);\r\n\t    };\r\n    }\r\n})(jQuery);\r\n\r\n// provides cross-browser focusin and focusout events\r\n// IE has native support, in other browsers, use event caputuring (neither bubbles)\r\n\r\n// provides delegate(type: String, delegate: Selector, handler: Callback) plugin for easier event delegation\r\n// handler is only called when $(event.target).is(delegate), in the scope of the jquery-object for event.target \r\n;(function($) {\r\n\t// only implement if not provided by jQuery core (since 1.4)\r\n\t// TODO verify if jQuery 1.4's implementation is compatible with older jQuery special-event APIs\r\n\tif (!jQuery.event.special.focusin && !jQuery.event.special.focusout && document.addEventListener) {\r\n\t\t$.each({\r\n\t\t\tfocus: 'focusin',\r\n\t\t\tblur: 'focusout'\t\r\n\t\t}, function( original, fix ){\r\n\t\t\t$.event.special[fix] = {\r\n\t\t\t\tsetup:function() {\r\n\t\t\t\t\tthis.addEventListener( original, handler, true );\r\n\t\t\t\t},\r\n\t\t\t\tteardown:function() {\r\n\t\t\t\t\tthis.removeEventListener( original, handler, true );\r\n\t\t\t\t},\r\n\t\t\t\thandler: function(e) {\r\n\t\t\t\t\targuments[0] = $.event.fix(e);\r\n\t\t\t\t\targuments[0].type = fix;\r\n\t\t\t\t\treturn $.event.handle.apply(this, arguments);\r\n\t\t\t\t}\r\n\t\t\t};\r\n\t\t\tfunction handler(e) {\r\n\t\t\t\te = $.event.fix(e);\r\n\t\t\t\te.type = fix;\r\n\t\t\t\treturn $.event.handle.call(this, e);\r\n\t\t\t}\r\n\t\t});\r\n\t};\r\n\t$.extend($.fn, {\r\n\t\tvalidateDelegate: function(delegate, type, handler) {\r\n\t\t\treturn this.bind(type, function(event) {\r\n\t\t\t\tvar target = $(event.target);\r\n\t\t\t\tif (target.is(delegate)) {\r\n\t\t\t\t\treturn handler.apply(target, arguments);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t});\r\n})(jQuery);\r\n"
  },
  {
    "path": "23 - Architecting Application User Interfaces/PPPSSS.Dist.UIComp/PPPSSS.Dist.UIComp/Scripts/jquery.validate.js",
    "content": "﻿/* NUGET: BEGIN LICENSE TEXT\n *\n * Microsoft grants you the right to use these script files for the sole\n * purpose of either: (i) interacting through your browser with the Microsoft\n * website or online service, subject to the applicable licensing or use\n * terms; or (ii) using the files as included with a Microsoft product subject\n * to that product's license terms. Microsoft reserves all other rights to the\n * files not expressly granted by Microsoft, whether by implication, estoppel\n * or otherwise. Insofar as a script file is dual licensed under GPL,\n * Microsoft neither took the code under GPL nor distributes it thereunder but\n * under the terms set out in this paragraph. All notices and licenses\n * below are for informational purposes only.\n *\n * NUGET: END LICENSE TEXT */\n/*!\n * jQuery Validation Plugin 1.11.1\n *\n * http://bassistance.de/jquery-plugins/jquery-plugin-validation/\n * http://docs.jquery.com/Plugins/Validation\n *\n * Copyright 2013 Jörn Zaefferer\n * Released under the MIT license:\n *   http://www.opensource.org/licenses/mit-license.php\n */\n\n(function($) {\n\n$.extend($.fn, {\n\t// http://docs.jquery.com/Plugins/Validation/validate\n\tvalidate: function( options ) {\n\n\t\t// if nothing is selected, return nothing; can't chain anyway\n\t\tif ( !this.length ) {\n\t\t\tif ( options && options.debug && window.console ) {\n\t\t\t\tconsole.warn( \"Nothing selected, can't validate, returning nothing.\" );\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\t// check if a validator for this form was already created\n\t\tvar validator = $.data( this[0], \"validator\" );\n\t\tif ( validator ) {\n\t\t\treturn validator;\n\t\t}\n\n\t\t// Add novalidate tag if HTML5.\n\t\tthis.attr( \"novalidate\", \"novalidate\" );\n\n\t\tvalidator = new $.validator( options, this[0] );\n\t\t$.data( this[0], \"validator\", validator );\n\n\t\tif ( validator.settings.onsubmit ) {\n\n\t\t\tthis.validateDelegate( \":submit\", \"click\", function( event ) {\n\t\t\t\tif ( validator.settings.submitHandler ) {\n\t\t\t\t\tvalidator.submitButton = event.target;\n\t\t\t\t}\n\t\t\t\t// allow suppressing validation by adding a cancel class to the submit button\n\t\t\t\tif ( $(event.target).hasClass(\"cancel\") ) {\n\t\t\t\t\tvalidator.cancelSubmit = true;\n\t\t\t\t}\n\n\t\t\t\t// allow suppressing validation by adding the html5 formnovalidate attribute to the submit button\n\t\t\t\tif ( $(event.target).attr(\"formnovalidate\") !== undefined ) {\n\t\t\t\t\tvalidator.cancelSubmit = true;\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t// validate the form on submit\n\t\t\tthis.submit( function( event ) {\n\t\t\t\tif ( validator.settings.debug ) {\n\t\t\t\t\t// prevent form submit to be able to see console output\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t}\n\t\t\t\tfunction handle() {\n\t\t\t\t\tvar hidden;\n\t\t\t\t\tif ( validator.settings.submitHandler ) {\n\t\t\t\t\t\tif ( validator.submitButton ) {\n\t\t\t\t\t\t\t// insert a hidden input as a replacement for the missing submit button\n\t\t\t\t\t\t\thidden = $(\"<input type='hidden'/>\").attr(\"name\", validator.submitButton.name).val( $(validator.submitButton).val() ).appendTo(validator.currentForm);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tvalidator.settings.submitHandler.call( validator, validator.currentForm, event );\n\t\t\t\t\t\tif ( validator.submitButton ) {\n\t\t\t\t\t\t\t// and clean up afterwards; thanks to no-block-scope, hidden can be referenced\n\t\t\t\t\t\t\thidden.remove();\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\t// prevent submit for invalid forms or custom submit handlers\n\t\t\t\tif ( validator.cancelSubmit ) {\n\t\t\t\t\tvalidator.cancelSubmit = false;\n\t\t\t\t\treturn handle();\n\t\t\t\t}\n\t\t\t\tif ( validator.form() ) {\n\t\t\t\t\tif ( validator.pendingRequest ) {\n\t\t\t\t\t\tvalidator.formSubmitted = true;\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\treturn handle();\n\t\t\t\t} else {\n\t\t\t\t\tvalidator.focusInvalid();\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\treturn validator;\n\t},\n\t// http://docs.jquery.com/Plugins/Validation/valid\n\tvalid: function() {\n\t\tif ( $(this[0]).is(\"form\")) {\n\t\t\treturn this.validate().form();\n\t\t} else {\n\t\t\tvar valid = true;\n\t\t\tvar validator = $(this[0].form).validate();\n\t\t\tthis.each(function() {\n\t\t\t\tvalid = valid && validator.element(this);\n\t\t\t});\n\t\t\treturn valid;\n\t\t}\n\t},\n\t// attributes: space seperated list of attributes to retrieve and remove\n\tremoveAttrs: function( attributes ) {\n\t\tvar result = {},\n\t\t\t$element = this;\n\t\t$.each(attributes.split(/\\s/), function( index, value ) {\n\t\t\tresult[value] = $element.attr(value);\n\t\t\t$element.removeAttr(value);\n\t\t});\n\t\treturn result;\n\t},\n\t// http://docs.jquery.com/Plugins/Validation/rules\n\trules: function( command, argument ) {\n\t\tvar element = this[0];\n\n\t\tif ( command ) {\n\t\t\tvar settings = $.data(element.form, \"validator\").settings;\n\t\t\tvar staticRules = settings.rules;\n\t\t\tvar existingRules = $.validator.staticRules(element);\n\t\t\tswitch(command) {\n\t\t\tcase \"add\":\n\t\t\t\t$.extend(existingRules, $.validator.normalizeRule(argument));\n\t\t\t\t// remove messages from rules, but allow them to be set separetely\n\t\t\t\tdelete existingRules.messages;\n\t\t\t\tstaticRules[element.name] = existingRules;\n\t\t\t\tif ( argument.messages ) {\n\t\t\t\t\tsettings.messages[element.name] = $.extend( settings.messages[element.name], argument.messages );\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase \"remove\":\n\t\t\t\tif ( !argument ) {\n\t\t\t\t\tdelete staticRules[element.name];\n\t\t\t\t\treturn existingRules;\n\t\t\t\t}\n\t\t\t\tvar filtered = {};\n\t\t\t\t$.each(argument.split(/\\s/), function( index, method ) {\n\t\t\t\t\tfiltered[method] = existingRules[method];\n\t\t\t\t\tdelete existingRules[method];\n\t\t\t\t});\n\t\t\t\treturn filtered;\n\t\t\t}\n\t\t}\n\n\t\tvar data = $.validator.normalizeRules(\n\t\t$.extend(\n\t\t\t{},\n\t\t\t$.validator.classRules(element),\n\t\t\t$.validator.attributeRules(element),\n\t\t\t$.validator.dataRules(element),\n\t\t\t$.validator.staticRules(element)\n\t\t), element);\n\n\t\t// make sure required is at front\n\t\tif ( data.required ) {\n\t\t\tvar param = data.required;\n\t\t\tdelete data.required;\n\t\t\tdata = $.extend({required: param}, data);\n\t\t}\n\n\t\treturn data;\n\t}\n});\n\n// Custom selectors\n$.extend($.expr[\":\"], {\n\t// http://docs.jquery.com/Plugins/Validation/blank\n\tblank: function( a ) { return !$.trim(\"\" + $(a).val()); },\n\t// http://docs.jquery.com/Plugins/Validation/filled\n\tfilled: function( a ) { return !!$.trim(\"\" + $(a).val()); },\n\t// http://docs.jquery.com/Plugins/Validation/unchecked\n\tunchecked: function( a ) { return !$(a).prop(\"checked\"); }\n});\n\n// constructor for validator\n$.validator = function( options, form ) {\n\tthis.settings = $.extend( true, {}, $.validator.defaults, options );\n\tthis.currentForm = form;\n\tthis.init();\n};\n\n$.validator.format = function( source, params ) {\n\tif ( arguments.length === 1 ) {\n\t\treturn function() {\n\t\t\tvar args = $.makeArray(arguments);\n\t\t\targs.unshift(source);\n\t\t\treturn $.validator.format.apply( this, args );\n\t\t};\n\t}\n\tif ( arguments.length > 2 && params.constructor !== Array  ) {\n\t\tparams = $.makeArray(arguments).slice(1);\n\t}\n\tif ( params.constructor !== Array ) {\n\t\tparams = [ params ];\n\t}\n\t$.each(params, function( i, n ) {\n\t\tsource = source.replace( new RegExp(\"\\\\{\" + i + \"\\\\}\", \"g\"), function() {\n\t\t\treturn n;\n\t\t});\n\t});\n\treturn source;\n};\n\n$.extend($.validator, {\n\n\tdefaults: {\n\t\tmessages: {},\n\t\tgroups: {},\n\t\trules: {},\n\t\terrorClass: \"error\",\n\t\tvalidClass: \"valid\",\n\t\terrorElement: \"label\",\n\t\tfocusInvalid: true,\n\t\terrorContainer: $([]),\n\t\terrorLabelContainer: $([]),\n\t\tonsubmit: true,\n\t\tignore: \":hidden\",\n\t\tignoreTitle: false,\n\t\tonfocusin: function( element, event ) {\n\t\t\tthis.lastActive = element;\n\n\t\t\t// hide error label and remove error class on focus if enabled\n\t\t\tif ( this.settings.focusCleanup && !this.blockFocusCleanup ) {\n\t\t\t\tif ( this.settings.unhighlight ) {\n\t\t\t\t\tthis.settings.unhighlight.call( this, element, this.settings.errorClass, this.settings.validClass );\n\t\t\t\t}\n\t\t\t\tthis.addWrapper(this.errorsFor(element)).hide();\n\t\t\t}\n\t\t},\n\t\tonfocusout: function( element, event ) {\n\t\t\tif ( !this.checkable(element) && (element.name in this.submitted || !this.optional(element)) ) {\n\t\t\t\tthis.element(element);\n\t\t\t}\n\t\t},\n\t\tonkeyup: function( element, event ) {\n\t\t\tif ( event.which === 9 && this.elementValue(element) === \"\" ) {\n\t\t\t\treturn;\n\t\t\t} else if ( element.name in this.submitted || element === this.lastElement ) {\n\t\t\t\tthis.element(element);\n\t\t\t}\n\t\t},\n\t\tonclick: function( element, event ) {\n\t\t\t// click on selects, radiobuttons and checkboxes\n\t\t\tif ( element.name in this.submitted ) {\n\t\t\t\tthis.element(element);\n\t\t\t}\n\t\t\t// or option elements, check parent select in that case\n\t\t\telse if ( element.parentNode.name in this.submitted ) {\n\t\t\t\tthis.element(element.parentNode);\n\t\t\t}\n\t\t},\n\t\thighlight: function( element, errorClass, validClass ) {\n\t\t\tif ( element.type === \"radio\" ) {\n\t\t\t\tthis.findByName(element.name).addClass(errorClass).removeClass(validClass);\n\t\t\t} else {\n\t\t\t\t$(element).addClass(errorClass).removeClass(validClass);\n\t\t\t}\n\t\t},\n\t\tunhighlight: function( element, errorClass, validClass ) {\n\t\t\tif ( element.type === \"radio\" ) {\n\t\t\t\tthis.findByName(element.name).removeClass(errorClass).addClass(validClass);\n\t\t\t} else {\n\t\t\t\t$(element).removeClass(errorClass).addClass(validClass);\n\t\t\t}\n\t\t}\n\t},\n\n\t// http://docs.jquery.com/Plugins/Validation/Validator/setDefaults\n\tsetDefaults: function( settings ) {\n\t\t$.extend( $.validator.defaults, settings );\n\t},\n\n\tmessages: {\n\t\trequired: \"This field is required.\",\n\t\tremote: \"Please fix this field.\",\n\t\temail: \"Please enter a valid email address.\",\n\t\turl: \"Please enter a valid URL.\",\n\t\tdate: \"Please enter a valid date.\",\n\t\tdateISO: \"Please enter a valid date (ISO).\",\n\t\tnumber: \"Please enter a valid number.\",\n\t\tdigits: \"Please enter only digits.\",\n\t\tcreditcard: \"Please enter a valid credit card number.\",\n\t\tequalTo: \"Please enter the same value again.\",\n\t\tmaxlength: $.validator.format(\"Please enter no more than {0} characters.\"),\n\t\tminlength: $.validator.format(\"Please enter at least {0} characters.\"),\n\t\trangelength: $.validator.format(\"Please enter a value between {0} and {1} characters long.\"),\n\t\trange: $.validator.format(\"Please enter a value between {0} and {1}.\"),\n\t\tmax: $.validator.format(\"Please enter a value less than or equal to {0}.\"),\n\t\tmin: $.validator.format(\"Please enter a value greater than or equal to {0}.\")\n\t},\n\n\tautoCreateRanges: false,\n\n\tprototype: {\n\n\t\tinit: function() {\n\t\t\tthis.labelContainer = $(this.settings.errorLabelContainer);\n\t\t\tthis.errorContext = this.labelContainer.length && this.labelContainer || $(this.currentForm);\n\t\t\tthis.containers = $(this.settings.errorContainer).add( this.settings.errorLabelContainer );\n\t\t\tthis.submitted = {};\n\t\t\tthis.valueCache = {};\n\t\t\tthis.pendingRequest = 0;\n\t\t\tthis.pending = {};\n\t\t\tthis.invalid = {};\n\t\t\tthis.reset();\n\n\t\t\tvar groups = (this.groups = {});\n\t\t\t$.each(this.settings.groups, function( key, value ) {\n\t\t\t\tif ( typeof value === \"string\" ) {\n\t\t\t\t\tvalue = value.split(/\\s/);\n\t\t\t\t}\n\t\t\t\t$.each(value, function( index, name ) {\n\t\t\t\t\tgroups[name] = key;\n\t\t\t\t});\n\t\t\t});\n\t\t\tvar rules = this.settings.rules;\n\t\t\t$.each(rules, function( key, value ) {\n\t\t\t\trules[key] = $.validator.normalizeRule(value);\n\t\t\t});\n\n\t\t\tfunction delegate(event) {\n\t\t\t\tvar validator = $.data(this[0].form, \"validator\"),\n\t\t\t\t\teventType = \"on\" + event.type.replace(/^validate/, \"\");\n\t\t\t\tif ( validator.settings[eventType] ) {\n\t\t\t\t\tvalidator.settings[eventType].call(validator, this[0], event);\n\t\t\t\t}\n\t\t\t}\n\t\t\t$(this.currentForm)\n\t\t\t\t.validateDelegate(\":text, [type='password'], [type='file'], select, textarea, \" +\n\t\t\t\t\t\"[type='number'], [type='search'] ,[type='tel'], [type='url'], \" +\n\t\t\t\t\t\"[type='email'], [type='datetime'], [type='date'], [type='month'], \" +\n\t\t\t\t\t\"[type='week'], [type='time'], [type='datetime-local'], \" +\n\t\t\t\t\t\"[type='range'], [type='color'] \",\n\t\t\t\t\t\"focusin focusout keyup\", delegate)\n\t\t\t\t.validateDelegate(\"[type='radio'], [type='checkbox'], select, option\", \"click\", delegate);\n\n\t\t\tif ( this.settings.invalidHandler ) {\n\t\t\t\t$(this.currentForm).bind(\"invalid-form.validate\", this.settings.invalidHandler);\n\t\t\t}\n\t\t},\n\n\t\t// http://docs.jquery.com/Plugins/Validation/Validator/form\n\t\tform: function() {\n\t\t\tthis.checkForm();\n\t\t\t$.extend(this.submitted, this.errorMap);\n\t\t\tthis.invalid = $.extend({}, this.errorMap);\n\t\t\tif ( !this.valid() ) {\n\t\t\t\t$(this.currentForm).triggerHandler(\"invalid-form\", [this]);\n\t\t\t}\n\t\t\tthis.showErrors();\n\t\t\treturn this.valid();\n\t\t},\n\n\t\tcheckForm: function() {\n\t\t\tthis.prepareForm();\n\t\t\tfor ( var i = 0, elements = (this.currentElements = this.elements()); elements[i]; i++ ) {\n\t\t\t\tthis.check( elements[i] );\n\t\t\t}\n\t\t\treturn this.valid();\n\t\t},\n\n\t\t// http://docs.jquery.com/Plugins/Validation/Validator/element\n\t\telement: function( element ) {\n\t\t\telement = this.validationTargetFor( this.clean( element ) );\n\t\t\tthis.lastElement = element;\n\t\t\tthis.prepareElement( element );\n\t\t\tthis.currentElements = $(element);\n\t\t\tvar result = this.check( element ) !== false;\n\t\t\tif ( result ) {\n\t\t\t\tdelete this.invalid[element.name];\n\t\t\t} else {\n\t\t\t\tthis.invalid[element.name] = true;\n\t\t\t}\n\t\t\tif ( !this.numberOfInvalids() ) {\n\t\t\t\t// Hide error containers on last error\n\t\t\t\tthis.toHide = this.toHide.add( this.containers );\n\t\t\t}\n\t\t\tthis.showErrors();\n\t\t\treturn result;\n\t\t},\n\n\t\t// http://docs.jquery.com/Plugins/Validation/Validator/showErrors\n\t\tshowErrors: function( errors ) {\n\t\t\tif ( errors ) {\n\t\t\t\t// add items to error list and map\n\t\t\t\t$.extend( this.errorMap, errors );\n\t\t\t\tthis.errorList = [];\n\t\t\t\tfor ( var name in errors ) {\n\t\t\t\t\tthis.errorList.push({\n\t\t\t\t\t\tmessage: errors[name],\n\t\t\t\t\t\telement: this.findByName(name)[0]\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\t// remove items from success list\n\t\t\t\tthis.successList = $.grep( this.successList, function( element ) {\n\t\t\t\t\treturn !(element.name in errors);\n\t\t\t\t});\n\t\t\t}\n\t\t\tif ( this.settings.showErrors ) {\n\t\t\t\tthis.settings.showErrors.call( this, this.errorMap, this.errorList );\n\t\t\t} else {\n\t\t\t\tthis.defaultShowErrors();\n\t\t\t}\n\t\t},\n\n\t\t// http://docs.jquery.com/Plugins/Validation/Validator/resetForm\n\t\tresetForm: function() {\n\t\t\tif ( $.fn.resetForm ) {\n\t\t\t\t$(this.currentForm).resetForm();\n\t\t\t}\n\t\t\tthis.submitted = {};\n\t\t\tthis.lastElement = null;\n\t\t\tthis.prepareForm();\n\t\t\tthis.hideErrors();\n\t\t\tthis.elements().removeClass( this.settings.errorClass ).removeData( \"previousValue\" );\n\t\t},\n\n\t\tnumberOfInvalids: function() {\n\t\t\treturn this.objectLength(this.invalid);\n\t\t},\n\n\t\tobjectLength: function( obj ) {\n\t\t\tvar count = 0;\n\t\t\tfor ( var i in obj ) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t\treturn count;\n\t\t},\n\n\t\thideErrors: function() {\n\t\t\tthis.addWrapper( this.toHide ).hide();\n\t\t},\n\n\t\tvalid: function() {\n\t\t\treturn this.size() === 0;\n\t\t},\n\n\t\tsize: function() {\n\t\t\treturn this.errorList.length;\n\t\t},\n\n\t\tfocusInvalid: function() {\n\t\t\tif ( this.settings.focusInvalid ) {\n\t\t\t\ttry {\n\t\t\t\t\t$(this.findLastActive() || this.errorList.length && this.errorList[0].element || [])\n\t\t\t\t\t.filter(\":visible\")\n\t\t\t\t\t.focus()\n\t\t\t\t\t// manually trigger focusin event; without it, focusin handler isn't called, findLastActive won't have anything to find\n\t\t\t\t\t.trigger(\"focusin\");\n\t\t\t\t} catch(e) {\n\t\t\t\t\t// ignore IE throwing errors when focusing hidden elements\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\tfindLastActive: function() {\n\t\t\tvar lastActive = this.lastActive;\n\t\t\treturn lastActive && $.grep(this.errorList, function( n ) {\n\t\t\t\treturn n.element.name === lastActive.name;\n\t\t\t}).length === 1 && lastActive;\n\t\t},\n\n\t\telements: function() {\n\t\t\tvar validator = this,\n\t\t\t\trulesCache = {};\n\n\t\t\t// select all valid inputs inside the form (no submit or reset buttons)\n\t\t\treturn $(this.currentForm)\n\t\t\t.find(\"input, select, textarea\")\n\t\t\t.not(\":submit, :reset, :image, [disabled]\")\n\t\t\t.not( this.settings.ignore )\n\t\t\t.filter(function() {\n\t\t\t\tif ( !this.name && validator.settings.debug && window.console ) {\n\t\t\t\t\tconsole.error( \"%o has no name assigned\", this);\n\t\t\t\t}\n\n\t\t\t\t// select only the first element for each name, and only those with rules specified\n\t\t\t\tif ( this.name in rulesCache || !validator.objectLength($(this).rules()) ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\trulesCache[this.name] = true;\n\t\t\t\treturn true;\n\t\t\t});\n\t\t},\n\n\t\tclean: function( selector ) {\n\t\t\treturn $(selector)[0];\n\t\t},\n\n\t\terrors: function() {\n\t\t\tvar errorClass = this.settings.errorClass.replace(\" \", \".\");\n\t\t\treturn $(this.settings.errorElement + \".\" + errorClass, this.errorContext);\n\t\t},\n\n\t\treset: function() {\n\t\t\tthis.successList = [];\n\t\t\tthis.errorList = [];\n\t\t\tthis.errorMap = {};\n\t\t\tthis.toShow = $([]);\n\t\t\tthis.toHide = $([]);\n\t\t\tthis.currentElements = $([]);\n\t\t},\n\n\t\tprepareForm: function() {\n\t\t\tthis.reset();\n\t\t\tthis.toHide = this.errors().add( this.containers );\n\t\t},\n\n\t\tprepareElement: function( element ) {\n\t\t\tthis.reset();\n\t\t\tthis.toHide = this.errorsFor(element);\n\t\t},\n\n\t\telementValue: function( element ) {\n\t\t\tvar type = $(element).attr(\"type\"),\n\t\t\t\tval = $(element).val();\n\n\t\t\tif ( type === \"radio\" || type === \"checkbox\" ) {\n\t\t\t\treturn $(\"input[name='\" + $(element).attr(\"name\") + \"']:checked\").val();\n\t\t\t}\n\n\t\t\tif ( typeof val === \"string\" ) {\n\t\t\t\treturn val.replace(/\\r/g, \"\");\n\t\t\t}\n\t\t\treturn val;\n\t\t},\n\n\t\tcheck: function( element ) {\n\t\t\telement = this.validationTargetFor( this.clean( element ) );\n\n\t\t\tvar rules = $(element).rules();\n\t\t\tvar dependencyMismatch = false;\n\t\t\tvar val = this.elementValue(element);\n\t\t\tvar result;\n\n\t\t\tfor (var method in rules ) {\n\t\t\t\tvar rule = { method: method, parameters: rules[method] };\n\t\t\t\ttry {\n\n\t\t\t\t\tresult = $.validator.methods[method].call( this, val, element, rule.parameters );\n\n\t\t\t\t\t// if a method indicates that the field is optional and therefore valid,\n\t\t\t\t\t// don't mark it as valid when there are no other rules\n\t\t\t\t\tif ( result === \"dependency-mismatch\" ) {\n\t\t\t\t\t\tdependencyMismatch = true;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tdependencyMismatch = false;\n\n\t\t\t\t\tif ( result === \"pending\" ) {\n\t\t\t\t\t\tthis.toHide = this.toHide.not( this.errorsFor(element) );\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( !result ) {\n\t\t\t\t\t\tthis.formatAndAdd( element, rule );\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t} catch(e) {\n\t\t\t\t\tif ( this.settings.debug && window.console ) {\n\t\t\t\t\t\tconsole.log( \"Exception occurred when checking element \" + element.id + \", check the '\" + rule.method + \"' method.\", e );\n\t\t\t\t\t}\n\t\t\t\t\tthrow e;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( dependencyMismatch ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif ( this.objectLength(rules) ) {\n\t\t\t\tthis.successList.push(element);\n\t\t\t}\n\t\t\treturn true;\n\t\t},\n\n\t\t// return the custom message for the given element and validation method\n\t\t// specified in the element's HTML5 data attribute\n\t\tcustomDataMessage: function( element, method ) {\n\t\t\treturn $(element).data(\"msg-\" + method.toLowerCase()) || (element.attributes && $(element).attr(\"data-msg-\" + method.toLowerCase()));\n\t\t},\n\n\t\t// return the custom message for the given element name and validation method\n\t\tcustomMessage: function( name, method ) {\n\t\t\tvar m = this.settings.messages[name];\n\t\t\treturn m && (m.constructor === String ? m : m[method]);\n\t\t},\n\n\t\t// return the first defined argument, allowing empty strings\n\t\tfindDefined: function() {\n\t\t\tfor(var i = 0; i < arguments.length; i++) {\n\t\t\t\tif ( arguments[i] !== undefined ) {\n\t\t\t\t\treturn arguments[i];\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn undefined;\n\t\t},\n\n\t\tdefaultMessage: function( element, method ) {\n\t\t\treturn this.findDefined(\n\t\t\t\tthis.customMessage( element.name, method ),\n\t\t\t\tthis.customDataMessage( element, method ),\n\t\t\t\t// title is never undefined, so handle empty string as undefined\n\t\t\t\t!this.settings.ignoreTitle && element.title || undefined,\n\t\t\t\t$.validator.messages[method],\n\t\t\t\t\"<strong>Warning: No message defined for \" + element.name + \"</strong>\"\n\t\t\t);\n\t\t},\n\n\t\tformatAndAdd: function( element, rule ) {\n\t\t\tvar message = this.defaultMessage( element, rule.method ),\n\t\t\t\ttheregex = /\\$?\\{(\\d+)\\}/g;\n\t\t\tif ( typeof message === \"function\" ) {\n\t\t\t\tmessage = message.call(this, rule.parameters, element);\n\t\t\t} else if (theregex.test(message)) {\n\t\t\t\tmessage = $.validator.format(message.replace(theregex, \"{$1}\"), rule.parameters);\n\t\t\t}\n\t\t\tthis.errorList.push({\n\t\t\t\tmessage: message,\n\t\t\t\telement: element\n\t\t\t});\n\n\t\t\tthis.errorMap[element.name] = message;\n\t\t\tthis.submitted[element.name] = message;\n\t\t},\n\n\t\taddWrapper: function( toToggle ) {\n\t\t\tif ( this.settings.wrapper ) {\n\t\t\t\ttoToggle = toToggle.add( toToggle.parent( this.settings.wrapper ) );\n\t\t\t}\n\t\t\treturn toToggle;\n\t\t},\n\n\t\tdefaultShowErrors: function() {\n\t\t\tvar i, elements;\n\t\t\tfor ( i = 0; this.errorList[i]; i++ ) {\n\t\t\t\tvar error = this.errorList[i];\n\t\t\t\tif ( this.settings.highlight ) {\n\t\t\t\t\tthis.settings.highlight.call( this, error.element, this.settings.errorClass, this.settings.validClass );\n\t\t\t\t}\n\t\t\t\tthis.showLabel( error.element, error.message );\n\t\t\t}\n\t\t\tif ( this.errorList.length ) {\n\t\t\t\tthis.toShow = this.toShow.add( this.containers );\n\t\t\t}\n\t\t\tif ( this.settings.success ) {\n\t\t\t\tfor ( i = 0; this.successList[i]; i++ ) {\n\t\t\t\t\tthis.showLabel( this.successList[i] );\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( this.settings.unhighlight ) {\n\t\t\t\tfor ( i = 0, elements = this.validElements(); elements[i]; i++ ) {\n\t\t\t\t\tthis.settings.unhighlight.call( this, elements[i], this.settings.errorClass, this.settings.validClass );\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.toHide = this.toHide.not( this.toShow );\n\t\t\tthis.hideErrors();\n\t\t\tthis.addWrapper( this.toShow ).show();\n\t\t},\n\n\t\tvalidElements: function() {\n\t\t\treturn this.currentElements.not(this.invalidElements());\n\t\t},\n\n\t\tinvalidElements: function() {\n\t\t\treturn $(this.errorList).map(function() {\n\t\t\t\treturn this.element;\n\t\t\t});\n\t\t},\n\n\t\tshowLabel: function( element, message ) {\n\t\t\tvar label = this.errorsFor( element );\n\t\t\tif ( label.length ) {\n\t\t\t\t// refresh error/success class\n\t\t\t\tlabel.removeClass( this.settings.validClass ).addClass( this.settings.errorClass );\n\t\t\t\t// replace message on existing label\n\t\t\t\tlabel.html(message);\n\t\t\t} else {\n\t\t\t\t// create label\n\t\t\t\tlabel = $(\"<\" + this.settings.errorElement + \">\")\n\t\t\t\t\t.attr(\"for\", this.idOrName(element))\n\t\t\t\t\t.addClass(this.settings.errorClass)\n\t\t\t\t\t.html(message || \"\");\n\t\t\t\tif ( this.settings.wrapper ) {\n\t\t\t\t\t// make sure the element is visible, even in IE\n\t\t\t\t\t// actually showing the wrapped element is handled elsewhere\n\t\t\t\t\tlabel = label.hide().show().wrap(\"<\" + this.settings.wrapper + \"/>\").parent();\n\t\t\t\t}\n\t\t\t\tif ( !this.labelContainer.append(label).length ) {\n\t\t\t\t\tif ( this.settings.errorPlacement ) {\n\t\t\t\t\t\tthis.settings.errorPlacement(label, $(element) );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tlabel.insertAfter(element);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( !message && this.settings.success ) {\n\t\t\t\tlabel.text(\"\");\n\t\t\t\tif ( typeof this.settings.success === \"string\" ) {\n\t\t\t\t\tlabel.addClass( this.settings.success );\n\t\t\t\t} else {\n\t\t\t\t\tthis.settings.success( label, element );\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.toShow = this.toShow.add(label);\n\t\t},\n\n\t\terrorsFor: function( element ) {\n\t\t\tvar name = this.idOrName(element);\n\t\t\treturn this.errors().filter(function() {\n\t\t\t\treturn $(this).attr(\"for\") === name;\n\t\t\t});\n\t\t},\n\n\t\tidOrName: function( element ) {\n\t\t\treturn this.groups[element.name] || (this.checkable(element) ? element.name : element.id || element.name);\n\t\t},\n\n\t\tvalidationTargetFor: function( element ) {\n\t\t\t// if radio/checkbox, validate first element in group instead\n\t\t\tif ( this.checkable(element) ) {\n\t\t\t\telement = this.findByName( element.name ).not(this.settings.ignore)[0];\n\t\t\t}\n\t\t\treturn element;\n\t\t},\n\n\t\tcheckable: function( element ) {\n\t\t\treturn (/radio|checkbox/i).test(element.type);\n\t\t},\n\n\t\tfindByName: function( name ) {\n\t\t\treturn $(this.currentForm).find(\"[name='\" + name + \"']\");\n\t\t},\n\n\t\tgetLength: function( value, element ) {\n\t\t\tswitch( element.nodeName.toLowerCase() ) {\n\t\t\tcase \"select\":\n\t\t\t\treturn $(\"option:selected\", element).length;\n\t\t\tcase \"input\":\n\t\t\t\tif ( this.checkable( element) ) {\n\t\t\t\t\treturn this.findByName(element.name).filter(\":checked\").length;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn value.length;\n\t\t},\n\n\t\tdepend: function( param, element ) {\n\t\t\treturn this.dependTypes[typeof param] ? this.dependTypes[typeof param](param, element) : true;\n\t\t},\n\n\t\tdependTypes: {\n\t\t\t\"boolean\": function( param, element ) {\n\t\t\t\treturn param;\n\t\t\t},\n\t\t\t\"string\": function( param, element ) {\n\t\t\t\treturn !!$(param, element.form).length;\n\t\t\t},\n\t\t\t\"function\": function( param, element ) {\n\t\t\t\treturn param(element);\n\t\t\t}\n\t\t},\n\n\t\toptional: function( element ) {\n\t\t\tvar val = this.elementValue(element);\n\t\t\treturn !$.validator.methods.required.call(this, val, element) && \"dependency-mismatch\";\n\t\t},\n\n\t\tstartRequest: function( element ) {\n\t\t\tif ( !this.pending[element.name] ) {\n\t\t\t\tthis.pendingRequest++;\n\t\t\t\tthis.pending[element.name] = true;\n\t\t\t}\n\t\t},\n\n\t\tstopRequest: function( element, valid ) {\n\t\t\tthis.pendingRequest--;\n\t\t\t// sometimes synchronization fails, make sure pendingRequest is never < 0\n\t\t\tif ( this.pendingRequest < 0 ) {\n\t\t\t\tthis.pendingRequest = 0;\n\t\t\t}\n\t\t\tdelete this.pending[element.name];\n\t\t\tif ( valid && this.pendingRequest === 0 && this.formSubmitted && this.form() ) {\n\t\t\t\t$(this.currentForm).submit();\n\t\t\t\tthis.formSubmitted = false;\n\t\t\t} else if (!valid && this.pendingRequest === 0 && this.formSubmitted) {\n\t\t\t\t$(this.currentForm).triggerHandler(\"invalid-form\", [this]);\n\t\t\t\tthis.formSubmitted = false;\n\t\t\t}\n\t\t},\n\n\t\tpreviousValue: function( element ) {\n\t\t\treturn $.data(element, \"previousValue\") || $.data(element, \"previousValue\", {\n\t\t\t\told: null,\n\t\t\t\tvalid: true,\n\t\t\t\tmessage: this.defaultMessage( element, \"remote\" )\n\t\t\t});\n\t\t}\n\n\t},\n\n\tclassRuleSettings: {\n\t\trequired: {required: true},\n\t\temail: {email: true},\n\t\turl: {url: true},\n\t\tdate: {date: true},\n\t\tdateISO: {dateISO: true},\n\t\tnumber: {number: true},\n\t\tdigits: {digits: true},\n\t\tcreditcard: {creditcard: true}\n\t},\n\n\taddClassRules: function( className, rules ) {\n\t\tif ( className.constructor === String ) {\n\t\t\tthis.classRuleSettings[className] = rules;\n\t\t} else {\n\t\t\t$.extend(this.classRuleSettings, className);\n\t\t}\n\t},\n\n\tclassRules: function( element ) {\n\t\tvar rules = {};\n\t\tvar classes = $(element).attr(\"class\");\n\t\tif ( classes ) {\n\t\t\t$.each(classes.split(\" \"), function() {\n\t\t\t\tif ( this in $.validator.classRuleSettings ) {\n\t\t\t\t\t$.extend(rules, $.validator.classRuleSettings[this]);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\treturn rules;\n\t},\n\n\tattributeRules: function( element ) {\n\t\tvar rules = {};\n\t\tvar $element = $(element);\n\t\tvar type = $element[0].getAttribute(\"type\");\n\n\t\tfor (var method in $.validator.methods) {\n\t\t\tvar value;\n\n\t\t\t// support for <input required> in both html5 and older browsers\n\t\t\tif ( method === \"required\" ) {\n\t\t\t\tvalue = $element.get(0).getAttribute(method);\n\t\t\t\t// Some browsers return an empty string for the required attribute\n\t\t\t\t// and non-HTML5 browsers might have required=\"\" markup\n\t\t\t\tif ( value === \"\" ) {\n\t\t\t\t\tvalue = true;\n\t\t\t\t}\n\t\t\t\t// force non-HTML5 browsers to return bool\n\t\t\t\tvalue = !!value;\n\t\t\t} else {\n\t\t\t\tvalue = $element.attr(method);\n\t\t\t}\n\n\t\t\t// convert the value to a number for number inputs, and for text for backwards compability\n\t\t\t// allows type=\"date\" and others to be compared as strings\n\t\t\tif ( /min|max/.test( method ) && ( type === null || /number|range|text/.test( type ) ) ) {\n\t\t\t\tvalue = Number(value);\n\t\t\t}\n\n\t\t\tif ( value ) {\n\t\t\t\trules[method] = value;\n\t\t\t} else if ( type === method && type !== 'range' ) {\n\t\t\t\t// exception: the jquery validate 'range' method\n\t\t\t\t// does not test for the html5 'range' type\n\t\t\t\trules[method] = true;\n\t\t\t}\n\t\t}\n\n\t\t// maxlength may be returned as -1, 2147483647 (IE) and 524288 (safari) for text inputs\n\t\tif ( rules.maxlength && /-1|2147483647|524288/.test(rules.maxlength) ) {\n\t\t\tdelete rules.maxlength;\n\t\t}\n\n\t\treturn rules;\n\t},\n\n\tdataRules: function( element ) {\n\t\tvar method, value,\n\t\t\trules = {}, $element = $(element);\n\t\tfor (method in $.validator.methods) {\n\t\t\tvalue = $element.data(\"rule-\" + method.toLowerCase());\n\t\t\tif ( value !== undefined ) {\n\t\t\t\trules[method] = value;\n\t\t\t}\n\t\t}\n\t\treturn rules;\n\t},\n\n\tstaticRules: function( element ) {\n\t\tvar rules = {};\n\t\tvar validator = $.data(element.form, \"validator\");\n\t\tif ( validator.settings.rules ) {\n\t\t\trules = $.validator.normalizeRule(validator.settings.rules[element.name]) || {};\n\t\t}\n\t\treturn rules;\n\t},\n\n\tnormalizeRules: function( rules, element ) {\n\t\t// handle dependency check\n\t\t$.each(rules, function( prop, val ) {\n\t\t\t// ignore rule when param is explicitly false, eg. required:false\n\t\t\tif ( val === false ) {\n\t\t\t\tdelete rules[prop];\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif ( val.param || val.depends ) {\n\t\t\t\tvar keepRule = true;\n\t\t\t\tswitch (typeof val.depends) {\n\t\t\t\tcase \"string\":\n\t\t\t\t\tkeepRule = !!$(val.depends, element.form).length;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"function\":\n\t\t\t\t\tkeepRule = val.depends.call(element, element);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif ( keepRule ) {\n\t\t\t\t\trules[prop] = val.param !== undefined ? val.param : true;\n\t\t\t\t} else {\n\t\t\t\t\tdelete rules[prop];\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\t// evaluate parameters\n\t\t$.each(rules, function( rule, parameter ) {\n\t\t\trules[rule] = $.isFunction(parameter) ? parameter(element) : parameter;\n\t\t});\n\n\t\t// clean number parameters\n\t\t$.each(['minlength', 'maxlength'], function() {\n\t\t\tif ( rules[this] ) {\n\t\t\t\trules[this] = Number(rules[this]);\n\t\t\t}\n\t\t});\n\t\t$.each(['rangelength', 'range'], function() {\n\t\t\tvar parts;\n\t\t\tif ( rules[this] ) {\n\t\t\t\tif ( $.isArray(rules[this]) ) {\n\t\t\t\t\trules[this] = [Number(rules[this][0]), Number(rules[this][1])];\n\t\t\t\t} else if ( typeof rules[this] === \"string\" ) {\n\t\t\t\t\tparts = rules[this].split(/[\\s,]+/);\n\t\t\t\t\trules[this] = [Number(parts[0]), Number(parts[1])];\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tif ( $.validator.autoCreateRanges ) {\n\t\t\t// auto-create ranges\n\t\t\tif ( rules.min && rules.max ) {\n\t\t\t\trules.range = [rules.min, rules.max];\n\t\t\t\tdelete rules.min;\n\t\t\t\tdelete rules.max;\n\t\t\t}\n\t\t\tif ( rules.minlength && rules.maxlength ) {\n\t\t\t\trules.rangelength = [rules.minlength, rules.maxlength];\n\t\t\t\tdelete rules.minlength;\n\t\t\t\tdelete rules.maxlength;\n\t\t\t}\n\t\t}\n\n\t\treturn rules;\n\t},\n\n\t// Converts a simple string to a {string: true} rule, e.g., \"required\" to {required:true}\n\tnormalizeRule: function( data ) {\n\t\tif ( typeof data === \"string\" ) {\n\t\t\tvar transformed = {};\n\t\t\t$.each(data.split(/\\s/), function() {\n\t\t\t\ttransformed[this] = true;\n\t\t\t});\n\t\t\tdata = transformed;\n\t\t}\n\t\treturn data;\n\t},\n\n\t// http://docs.jquery.com/Plugins/Validation/Validator/addMethod\n\taddMethod: function( name, method, message ) {\n\t\t$.validator.methods[name] = method;\n\t\t$.validator.messages[name] = message !== undefined ? message : $.validator.messages[name];\n\t\tif ( method.length < 3 ) {\n\t\t\t$.validator.addClassRules(name, $.validator.normalizeRule(name));\n\t\t}\n\t},\n\n\tmethods: {\n\n\t\t// http://docs.jquery.com/Plugins/Validation/Methods/required\n\t\trequired: function( value, element, param ) {\n\t\t\t// check if dependency is met\n\t\t\tif ( !this.depend(param, element) ) {\n\t\t\t\treturn \"dependency-mismatch\";\n\t\t\t}\n\t\t\tif ( element.nodeName.toLowerCase() === \"select\" ) {\n\t\t\t\t// could be an array for select-multiple or a string, both are fine this way\n\t\t\t\tvar val = $(element).val();\n\t\t\t\treturn val && val.length > 0;\n\t\t\t}\n\t\t\tif ( this.checkable(element) ) {\n\t\t\t\treturn this.getLength(value, element) > 0;\n\t\t\t}\n\t\t\treturn $.trim(value).length > 0;\n\t\t},\n\n\t\t// http://docs.jquery.com/Plugins/Validation/Methods/email\n\t\temail: function( value, element ) {\n\t\t\t// contributed by Scott Gonzalez: http://projects.scottsplayground.com/email_address_validation/\n\t\t\treturn this.optional(element) || /^((([a-z]|\\d|[!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])+(\\.([a-z]|\\d|[!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])+)*)|((\\x22)((((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(([\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x7f]|\\x21|[\\x23-\\x5b]|[\\x5d-\\x7e]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(\\\\([\\x01-\\x09\\x0b\\x0c\\x0d-\\x7f]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]))))*(((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(\\x22)))@((([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))\\.)+(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))$/i.test(value);\n\t\t},\n\n\t\t// http://docs.jquery.com/Plugins/Validation/Methods/url\n\t\turl: function( value, element ) {\n\t\t\t// contributed by Scott Gonzalez: http://projects.scottsplayground.com/iri/\n\t\t\treturn this.optional(element) || /^(https?|s?ftp):\\/\\/(((([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&'\\(\\)\\*\\+,;=]|:)*@)?(((\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5]))|((([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))\\.)+(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))\\.?)(:\\d*)?)(\\/((([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&'\\(\\)\\*\\+,;=]|:|@)+(\\/(([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&'\\(\\)\\*\\+,;=]|:|@)*)*)?)?(\\?((([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&'\\(\\)\\*\\+,;=]|:|@)|[\\uE000-\\uF8FF]|\\/|\\?)*)?(#((([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&'\\(\\)\\*\\+,;=]|:|@)|\\/|\\?)*)?$/i.test(value);\n\t\t},\n\n\t\t// http://docs.jquery.com/Plugins/Validation/Methods/date\n\t\tdate: function( value, element ) {\n\t\t\treturn this.optional(element) || !/Invalid|NaN/.test(new Date(value).toString());\n\t\t},\n\n\t\t// http://docs.jquery.com/Plugins/Validation/Methods/dateISO\n\t\tdateISO: function( value, element ) {\n\t\t\treturn this.optional(element) || /^\\d{4}[\\/\\-]\\d{1,2}[\\/\\-]\\d{1,2}$/.test(value);\n\t\t},\n\n\t\t// http://docs.jquery.com/Plugins/Validation/Methods/number\n\t\tnumber: function( value, element ) {\n\t\t\treturn this.optional(element) || /^-?(?:\\d+|\\d{1,3}(?:,\\d{3})+)?(?:\\.\\d+)?$/.test(value);\n\t\t},\n\n\t\t// http://docs.jquery.com/Plugins/Validation/Methods/digits\n\t\tdigits: function( value, element ) {\n\t\t\treturn this.optional(element) || /^\\d+$/.test(value);\n\t\t},\n\n\t\t// http://docs.jquery.com/Plugins/Validation/Methods/creditcard\n\t\t// based on http://en.wikipedia.org/wiki/Luhn\n\t\tcreditcard: function( value, element ) {\n\t\t\tif ( this.optional(element) ) {\n\t\t\t\treturn \"dependency-mismatch\";\n\t\t\t}\n\t\t\t// accept only spaces, digits and dashes\n\t\t\tif ( /[^0-9 \\-]+/.test(value) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tvar nCheck = 0,\n\t\t\t\tnDigit = 0,\n\t\t\t\tbEven = false;\n\n\t\t\tvalue = value.replace(/\\D/g, \"\");\n\n\t\t\tfor (var n = value.length - 1; n >= 0; n--) {\n\t\t\t\tvar cDigit = value.charAt(n);\n\t\t\t\tnDigit = parseInt(cDigit, 10);\n\t\t\t\tif ( bEven ) {\n\t\t\t\t\tif ( (nDigit *= 2) > 9 ) {\n\t\t\t\t\t\tnDigit -= 9;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tnCheck += nDigit;\n\t\t\t\tbEven = !bEven;\n\t\t\t}\n\n\t\t\treturn (nCheck % 10) === 0;\n\t\t},\n\n\t\t// http://docs.jquery.com/Plugins/Validation/Methods/minlength\n\t\tminlength: function( value, element, param ) {\n\t\t\tvar length = $.isArray( value ) ? value.length : this.getLength($.trim(value), element);\n\t\t\treturn this.optional(element) || length >= param;\n\t\t},\n\n\t\t// http://docs.jquery.com/Plugins/Validation/Methods/maxlength\n\t\tmaxlength: function( value, element, param ) {\n\t\t\tvar length = $.isArray( value ) ? value.length : this.getLength($.trim(value), element);\n\t\t\treturn this.optional(element) || length <= param;\n\t\t},\n\n\t\t// http://docs.jquery.com/Plugins/Validation/Methods/rangelength\n\t\trangelength: function( value, element, param ) {\n\t\t\tvar length = $.isArray( value ) ? value.length : this.getLength($.trim(value), element);\n\t\t\treturn this.optional(element) || ( length >= param[0] && length <= param[1] );\n\t\t},\n\n\t\t// http://docs.jquery.com/Plugins/Validation/Methods/min\n\t\tmin: function( value, element, param ) {\n\t\t\treturn this.optional(element) || value >= param;\n\t\t},\n\n\t\t// http://docs.jquery.com/Plugins/Validation/Methods/max\n\t\tmax: function( value, element, param ) {\n\t\t\treturn this.optional(element) || value <= param;\n\t\t},\n\n\t\t// http://docs.jquery.com/Plugins/Validation/Methods/range\n\t\trange: function( value, element, param ) {\n\t\t\treturn this.optional(element) || ( value >= param[0] && value <= param[1] );\n\t\t},\n\n\t\t// http://docs.jquery.com/Plugins/Validation/Methods/equalTo\n\t\tequalTo: function( value, element, param ) {\n\t\t\t// bind to the blur event of the target in order to revalidate whenever the target field is updated\n\t\t\t// TODO find a way to bind the event just once, avoiding the unbind-rebind overhead\n\t\t\tvar target = $(param);\n\t\t\tif ( this.settings.onfocusout ) {\n\t\t\t\ttarget.unbind(\".validate-equalTo\").bind(\"blur.validate-equalTo\", function() {\n\t\t\t\t\t$(element).valid();\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn value === target.val();\n\t\t},\n\n\t\t// http://docs.jquery.com/Plugins/Validation/Methods/remote\n\t\tremote: function( value, element, param ) {\n\t\t\tif ( this.optional(element) ) {\n\t\t\t\treturn \"dependency-mismatch\";\n\t\t\t}\n\n\t\t\tvar previous = this.previousValue(element);\n\t\t\tif (!this.settings.messages[element.name] ) {\n\t\t\t\tthis.settings.messages[element.name] = {};\n\t\t\t}\n\t\t\tprevious.originalMessage = this.settings.messages[element.name].remote;\n\t\t\tthis.settings.messages[element.name].remote = previous.message;\n\n\t\t\tparam = typeof param === \"string\" && {url:param} || param;\n\n\t\t\tif ( previous.old === value ) {\n\t\t\t\treturn previous.valid;\n\t\t\t}\n\n\t\t\tprevious.old = value;\n\t\t\tvar validator = this;\n\t\t\tthis.startRequest(element);\n\t\t\tvar data = {};\n\t\t\tdata[element.name] = value;\n\t\t\t$.ajax($.extend(true, {\n\t\t\t\turl: param,\n\t\t\t\tmode: \"abort\",\n\t\t\t\tport: \"validate\" + element.name,\n\t\t\t\tdataType: \"json\",\n\t\t\t\tdata: data,\n\t\t\t\tsuccess: function( response ) {\n\t\t\t\t\tvalidator.settings.messages[element.name].remote = previous.originalMessage;\n\t\t\t\t\tvar valid = response === true || response === \"true\";\n\t\t\t\t\tif ( valid ) {\n\t\t\t\t\t\tvar submitted = validator.formSubmitted;\n\t\t\t\t\t\tvalidator.prepareElement(element);\n\t\t\t\t\t\tvalidator.formSubmitted = submitted;\n\t\t\t\t\t\tvalidator.successList.push(element);\n\t\t\t\t\t\tdelete validator.invalid[element.name];\n\t\t\t\t\t\tvalidator.showErrors();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvar errors = {};\n\t\t\t\t\t\tvar message = response || validator.defaultMessage( element, \"remote\" );\n\t\t\t\t\t\terrors[element.name] = previous.message = $.isFunction(message) ? message(value) : message;\n\t\t\t\t\t\tvalidator.invalid[element.name] = true;\n\t\t\t\t\t\tvalidator.showErrors(errors);\n\t\t\t\t\t}\n\t\t\t\t\tprevious.valid = valid;\n\t\t\t\t\tvalidator.stopRequest(element, valid);\n\t\t\t\t}\n\t\t\t}, param));\n\t\t\treturn \"pending\";\n\t\t}\n\n\t}\n\n});\n\n// deprecated, use $.validator.format instead\n$.format = $.validator.format;\n\n}(jQuery));\n\n// ajax mode: abort\n// usage: $.ajax({ mode: \"abort\"[, port: \"uniqueport\"]});\n// if mode:\"abort\" is used, the previous request on that port (port can be undefined) is aborted via XMLHttpRequest.abort()\n(function($) {\n\tvar pendingRequests = {};\n\t// Use a prefilter if available (1.5+)\n\tif ( $.ajaxPrefilter ) {\n\t\t$.ajaxPrefilter(function( settings, _, xhr ) {\n\t\t\tvar port = settings.port;\n\t\t\tif ( settings.mode === \"abort\" ) {\n\t\t\t\tif ( pendingRequests[port] ) {\n\t\t\t\t\tpendingRequests[port].abort();\n\t\t\t\t}\n\t\t\t\tpendingRequests[port] = xhr;\n\t\t\t}\n\t\t});\n\t} else {\n\t\t// Proxy ajax\n\t\tvar ajax = $.ajax;\n\t\t$.ajax = function( settings ) {\n\t\t\tvar mode = ( \"mode\" in settings ? settings : $.ajaxSettings ).mode,\n\t\t\t\tport = ( \"port\" in settings ? settings : $.ajaxSettings ).port;\n\t\t\tif ( mode === \"abort\" ) {\n\t\t\t\tif ( pendingRequests[port] ) {\n\t\t\t\t\tpendingRequests[port].abort();\n\t\t\t\t}\n\t\t\t\tpendingRequests[port] = ajax.apply(this, arguments);\n\t\t\t\treturn pendingRequests[port];\n\t\t\t}\n\t\t\treturn ajax.apply(this, arguments);\n\t\t};\n\t}\n}(jQuery));\n\n// provides delegate(type: String, delegate: Selector, handler: Callback) plugin for easier event delegation\n// handler is only called when $(event.target).is(delegate), in the scope of the jquery-object for event.target\n(function($) {\n\t$.extend($.fn, {\n\t\tvalidateDelegate: function( delegate, type, handler ) {\n\t\t\treturn this.bind(type, function( event ) {\n\t\t\t\tvar target = $(event.target);\n\t\t\t\tif ( target.is(delegate) ) {\n\t\t\t\t\treturn handler.apply(target, arguments);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t});\n}(jQuery));\n"
  },
  {
    "path": "23 - Architecting Application User Interfaces/PPPSSS.Dist.UIComp/PPPSSS.Dist.UIComp/Scripts/jquery.validate.unobtrusive.js",
    "content": "/* NUGET: BEGIN LICENSE TEXT\r\n*\r\n* Microsoft grants you the right to use these script files for the sole\r\n* purpose of either: (i) interacting through your browser with the Microsoft\r\n* website or online service, subject to the applicable licensing or use\r\n* terms; or (ii) using the files as included with a Microsoft product subject\r\n* to that product's license terms. Microsoft reserves all other rights to the\r\n* files not expressly granted by Microsoft, whether by implication, estoppel\r\n* or otherwise. Insofar as a script file is dual licensed under GPL,\r\n* Microsoft neither took the code under GPL nor distributes it thereunder but\r\n* under the terms set out in this paragraph. All notices and licenses\r\n* below are for informational purposes only.\r\n*\r\n* NUGET: END LICENSE TEXT */\r\n/*!\r\n** Unobtrusive validation support library for jQuery and jQuery Validate\r\n** Copyright (C) Microsoft Corporation. All rights reserved.\r\n*/\r\n/*jslint white: true, browser: true, onevar: true, undef: true, nomen: true, eqeqeq: true, plusplus: true, bitwise: true, regexp: true, newcap: true, immed: true, strict: false */\r\n/*global document: false, jQuery: false */\r\n(function ($) {\r\nvar $jQval = $.validator,\r\nadapters,\r\ndata_validation = \"unobtrusiveValidation\";\r\nfunction setValidationValues(options, ruleName, value) {\r\noptions.rules[ruleName] = value;\r\nif (options.message) {\r\noptions.messages[ruleName] = options.message;\r\n}\r\n}\r\nfunction splitAndTrim(value) {\r\nreturn value.replace(/^\\s+|\\s+$/g, \"\").split(/\\s*,\\s*/g);\r\n}\r\nfunction escapeAttributeValue(value) {\r\n// As mentioned on http://api.jquery.com/category/selectors/\r\nreturn value.replace(/([!\"#$%&'()*+,./:;<=>?@\\[\\\\\\]^`{|}~])/g, \"\\\\$1\");\r\n}\r\nfunction getModelPrefix(fieldName) {\r\nreturn fieldName.substr(0, fieldName.lastIndexOf(\".\") + 1);\r\n}\r\nfunction appendModelPrefix(value, prefix) {\r\nif (value.indexOf(\"*.\") === 0) {\r\nvalue = value.replace(\"*.\", prefix);\r\n}\r\nreturn value;\r\n}\r\nfunction onError(error, inputElement) {  // 'this' is the form element\r\nvar container = $(this).find(\"[data-valmsg-for='\" + escapeAttributeValue(inputElement[0].name) + \"']\"),\r\nreplaceAttrValue = container.attr(\"data-valmsg-replace\"),\r\nreplace = replaceAttrValue ? $.parseJSON(replaceAttrValue) !== false : null;\r\ncontainer.removeClass(\"field-validation-valid\").addClass(\"field-validation-error\");\r\nerror.data(\"unobtrusiveContainer\", container);\r\nif (replace) {\r\ncontainer.empty();\r\nerror.removeClass(\"input-validation-error\").appendTo(container);\r\n}\r\nelse {\r\nerror.hide();\r\n}\r\n}\r\nfunction onErrors(event, validator) {  // 'this' is the form element\r\nvar container = $(this).find(\"[data-valmsg-summary=true]\"),\r\nlist = container.find(\"ul\");\r\nif (list && list.length && validator.errorList.length) {\r\nlist.empty();\r\ncontainer.addClass(\"validation-summary-errors\").removeClass(\"validation-summary-valid\");\r\n$.each(validator.errorList, function () {\r\n$(\"<li />\").html(this.message).appendTo(list);\r\n});\r\n}\r\n}\r\nfunction onSuccess(error) {  // 'this' is the form element\r\nvar container = error.data(\"unobtrusiveContainer\"),\r\nreplaceAttrValue = container.attr(\"data-valmsg-replace\"),\r\nreplace = replaceAttrValue ? $.parseJSON(replaceAttrValue) : null;\r\nif (container) {\r\ncontainer.addClass(\"field-validation-valid\").removeClass(\"field-validation-error\");\r\nerror.removeData(\"unobtrusiveContainer\");\r\nif (replace) {\r\ncontainer.empty();\r\n}\r\n}\r\n}\r\nfunction onReset(event) {  // 'this' is the form element\r\nvar $form = $(this);\r\n$form.data(\"validator\").resetForm();\r\n$form.find(\".validation-summary-errors\")\r\n.addClass(\"validation-summary-valid\")\r\n.removeClass(\"validation-summary-errors\");\r\n$form.find(\".field-validation-error\")\r\n.addClass(\"field-validation-valid\")\r\n.removeClass(\"field-validation-error\")\r\n.removeData(\"unobtrusiveContainer\")\r\n.find(\">*\")  // If we were using valmsg-replace, get the underlying error\r\n.removeData(\"unobtrusiveContainer\");\r\n}\r\nfunction validationInfo(form) {\r\nvar $form = $(form),\r\nresult = $form.data(data_validation),\r\nonResetProxy = $.proxy(onReset, form);\r\nif (!result) {\r\nresult = {\r\noptions: {  // options structure passed to jQuery Validate's validate() method\r\nerrorClass: \"input-validation-error\",\r\nerrorElement: \"span\",\r\nerrorPlacement: $.proxy(onError, form),\r\ninvalidHandler: $.proxy(onErrors, form),\r\nmessages: {},\r\nrules: {},\r\nsuccess: $.proxy(onSuccess, form)\r\n},\r\nattachValidation: function () {\r\n$form\r\n.unbind(\"reset.\" + data_validation, onResetProxy)\r\n.bind(\"reset.\" + data_validation, onResetProxy)\r\n.validate(this.options);\r\n},\r\nvalidate: function () {  // a validation function that is called by unobtrusive Ajax\r\n$form.validate();\r\nreturn $form.valid();\r\n}\r\n};\r\n$form.data(data_validation, result);\r\n}\r\nreturn result;\r\n}\r\n$jQval.unobtrusive = {\r\nadapters: [],\r\nparseElement: function (element, skipAttach) {\r\n/// <summary>\r\n/// Parses a single HTML element for unobtrusive validation attributes.\r\n/// </summary>\r\n/// <param name=\"element\" domElement=\"true\">The HTML element to be parsed.</param>\r\n/// <param name=\"skipAttach\" type=\"Boolean\">[Optional] true to skip attaching the\r\n/// validation to the form. If parsing just this single element, you should specify true.\r\n/// If parsing several elements, you should specify false, and manually attach the validation\r\n/// to the form when you are finished. The default is false.</param>\r\nvar $element = $(element),\r\nform = $element.parents(\"form\")[0],\r\nvalInfo, rules, messages;\r\nif (!form) {  // Cannot do client-side validation without a form\r\nreturn;\r\n}\r\nvalInfo = validationInfo(form);\r\nvalInfo.options.rules[element.name] = rules = {};\r\nvalInfo.options.messages[element.name] = messages = {};\r\n$.each(this.adapters, function () {\r\nvar prefix = \"data-val-\" + this.name,\r\nmessage = $element.attr(prefix),\r\nparamValues = {};\r\nif (message !== undefined) {  // Compare against undefined, because an empty message is legal (and falsy)\r\nprefix += \"-\";\r\n$.each(this.params, function () {\r\nparamValues[this] = $element.attr(prefix + this);\r\n});\r\nthis.adapt({\r\nelement: element,\r\nform: form,\r\nmessage: message,\r\nparams: paramValues,\r\nrules: rules,\r\nmessages: messages\r\n});\r\n}\r\n});\r\n$.extend(rules, { \"__dummy__\": true });\r\nif (!skipAttach) {\r\nvalInfo.attachValidation();\r\n}\r\n},\r\nparse: function (selector) {\r\n/// <summary>\r\n/// Parses all the HTML elements in the specified selector. It looks for input elements decorated\r\n/// with the [data-val=true] attribute value and enables validation according to the data-val-*\r\n/// attribute values.\r\n/// </summary>\r\n/// <param name=\"selector\" type=\"String\">Any valid jQuery selector.</param>\r\nvar $forms = $(selector)\r\n.parents(\"form\")\r\n.andSelf()\r\n.add($(selector).find(\"form\"))\r\n.filter(\"form\");\r\n// :input is a psuedoselector provided by jQuery which selects input and input-like elements\r\n// combining :input with other selectors significantly decreases performance.\r\n$(selector).find(\":input\").filter(\"[data-val=true]\").each(function () {\r\n$jQval.unobtrusive.parseElement(this, true);\r\n});\r\n$forms.each(function () {\r\nvar info = validationInfo(this);\r\nif (info) {\r\ninfo.attachValidation();\r\n}\r\n});\r\n}\r\n};\r\nadapters = $jQval.unobtrusive.adapters;\r\nadapters.add = function (adapterName, params, fn) {\r\n/// <summary>Adds a new adapter to convert unobtrusive HTML into a jQuery Validate validation.</summary>\r\n/// <param name=\"adapterName\" type=\"String\">The name of the adapter to be added. This matches the name used\r\n/// in the data-val-nnnn HTML attribute (where nnnn is the adapter name).</param>\r\n/// <param name=\"params\" type=\"Array\" optional=\"true\">[Optional] An array of parameter names (strings) that will\r\n/// be extracted from the data-val-nnnn-mmmm HTML attributes (where nnnn is the adapter name, and\r\n/// mmmm is the parameter name).</param>\r\n/// <param name=\"fn\" type=\"Function\">The function to call, which adapts the values from the HTML\r\n/// attributes into jQuery Validate rules and/or messages.</param>\r\n/// <returns type=\"jQuery.validator.unobtrusive.adapters\" />\r\nif (!fn) {  // Called with no params, just a function\r\nfn = params;\r\nparams = [];\r\n}\r\nthis.push({ name: adapterName, params: params, adapt: fn });\r\nreturn this;\r\n};\r\nadapters.addBool = function (adapterName, ruleName) {\r\n/// <summary>Adds a new adapter to convert unobtrusive HTML into a jQuery Validate validation, where\r\n/// the jQuery Validate validation rule has no parameter values.</summary>\r\n/// <param name=\"adapterName\" type=\"String\">The name of the adapter to be added. This matches the name used\r\n/// in the data-val-nnnn HTML attribute (where nnnn is the adapter name).</param>\r\n/// <param name=\"ruleName\" type=\"String\" optional=\"true\">[Optional] The name of the jQuery Validate rule. If not provided, the value\r\n/// of adapterName will be used instead.</param>\r\n/// <returns type=\"jQuery.validator.unobtrusive.adapters\" />\r\nreturn this.add(adapterName, function (options) {\r\nsetValidationValues(options, ruleName || adapterName, true);\r\n});\r\n};\r\nadapters.addMinMax = function (adapterName, minRuleName, maxRuleName, minMaxRuleName, minAttribute, maxAttribute) {\r\n/// <summary>Adds a new adapter to convert unobtrusive HTML into a jQuery Validate validation, where\r\n/// the jQuery Validate validation has three potential rules (one for min-only, one for max-only, and\r\n/// one for min-and-max). The HTML parameters are expected to be named -min and -max.</summary>\r\n/// <param name=\"adapterName\" type=\"String\">The name of the adapter to be added. This matches the name used\r\n/// in the data-val-nnnn HTML attribute (where nnnn is the adapter name).</param>\r\n/// <param name=\"minRuleName\" type=\"String\">The name of the jQuery Validate rule to be used when you only\r\n/// have a minimum value.</param>\r\n/// <param name=\"maxRuleName\" type=\"String\">The name of the jQuery Validate rule to be used when you only\r\n/// have a maximum value.</param>\r\n/// <param name=\"minMaxRuleName\" type=\"String\">The name of the jQuery Validate rule to be used when you\r\n/// have both a minimum and maximum value.</param>\r\n/// <param name=\"minAttribute\" type=\"String\" optional=\"true\">[Optional] The name of the HTML attribute that\r\n/// contains the minimum value. The default is \"min\".</param>\r\n/// <param name=\"maxAttribute\" type=\"String\" optional=\"true\">[Optional] The name of the HTML attribute that\r\n/// contains the maximum value. The default is \"max\".</param>\r\n/// <returns type=\"jQuery.validator.unobtrusive.adapters\" />\r\nreturn this.add(adapterName, [minAttribute || \"min\", maxAttribute || \"max\"], function (options) {\r\nvar min = options.params.min,\r\nmax = options.params.max;\r\nif (min && max) {\r\nsetValidationValues(options, minMaxRuleName, [min, max]);\r\n}\r\nelse if (min) {\r\nsetValidationValues(options, minRuleName, min);\r\n}\r\nelse if (max) {\r\nsetValidationValues(options, maxRuleName, max);\r\n}\r\n});\r\n};\r\nadapters.addSingleVal = function (adapterName, attribute, ruleName) {\r\n/// <summary>Adds a new adapter to convert unobtrusive HTML into a jQuery Validate validation, where\r\n/// the jQuery Validate validation rule has a single value.</summary>\r\n/// <param name=\"adapterName\" type=\"String\">The name of the adapter to be added. This matches the name used\r\n/// in the data-val-nnnn HTML attribute(where nnnn is the adapter name).</param>\r\n/// <param name=\"attribute\" type=\"String\">[Optional] The name of the HTML attribute that contains the value.\r\n/// The default is \"val\".</param>\r\n/// <param name=\"ruleName\" type=\"String\" optional=\"true\">[Optional] The name of the jQuery Validate rule. If not provided, the value\r\n/// of adapterName will be used instead.</param>\r\n/// <returns type=\"jQuery.validator.unobtrusive.adapters\" />\r\nreturn this.add(adapterName, [attribute || \"val\"], function (options) {\r\nsetValidationValues(options, ruleName || adapterName, options.params[attribute]);\r\n});\r\n};\r\n$jQval.addMethod(\"__dummy__\", function (value, element, params) {\r\nreturn true;\r\n});\r\n$jQval.addMethod(\"regex\", function (value, element, params) {\r\nvar match;\r\nif (this.optional(element)) {\r\nreturn true;\r\n}\r\nmatch = new RegExp(params).exec(value);\r\nreturn (match && (match.index === 0) && (match[0].length === value.length));\r\n});\r\n$jQval.addMethod(\"nonalphamin\", function (value, element, nonalphamin) {\r\nvar match;\r\nif (nonalphamin) {\r\nmatch = value.match(/\\W/g);\r\nmatch = match && match.length >= nonalphamin;\r\n}\r\nreturn match;\r\n});\r\nif ($jQval.methods.extension) {\r\nadapters.addSingleVal(\"accept\", \"mimtype\");\r\nadapters.addSingleVal(\"extension\", \"extension\");\r\n} else {\r\n// for backward compatibility, when the 'extension' validation method does not exist, such as with versions\r\n// of JQuery Validation plugin prior to 1.10, we should use the 'accept' method for\r\n// validating the extension, and ignore mime-type validations as they are not supported.\r\nadapters.addSingleVal(\"extension\", \"extension\", \"accept\");\r\n}\r\nadapters.addSingleVal(\"regex\", \"pattern\");\r\nadapters.addBool(\"creditcard\").addBool(\"date\").addBool(\"digits\").addBool(\"email\").addBool(\"number\").addBool(\"url\");\r\nadapters.addMinMax(\"length\", \"minlength\", \"maxlength\", \"rangelength\").addMinMax(\"range\", \"min\", \"max\", \"range\");\r\nadapters.add(\"equalto\", [\"other\"], function (options) {\r\nvar prefix = getModelPrefix(options.element.name),\r\nother = options.params.other,\r\nfullOtherName = appendModelPrefix(other, prefix),\r\nelement = $(options.form).find(\":input\").filter(\"[name='\" + escapeAttributeValue(fullOtherName) + \"']\")[0];\r\nsetValidationValues(options, \"equalTo\", element);\r\n});\r\nadapters.add(\"required\", function (options) {\r\n// jQuery Validate equates \"required\" with \"mandatory\" for checkbox elements\r\nif (options.element.tagName.toUpperCase() !== \"INPUT\" || options.element.type.toUpperCase() !== \"CHECKBOX\") {\r\nsetValidationValues(options, \"required\", true);\r\n}\r\n});\r\nadapters.add(\"remote\", [\"url\", \"type\", \"additionalfields\"], function (options) {\r\nvar value = {\r\nurl: options.params.url,\r\ntype: options.params.type || \"GET\",\r\ndata: {}\r\n},\r\nprefix = getModelPrefix(options.element.name);\r\n$.each(splitAndTrim(options.params.additionalfields || options.element.name), function (i, fieldName) {\r\nvar paramName = appendModelPrefix(fieldName, prefix);\r\nvalue.data[paramName] = function () {\r\nreturn $(options.form).find(\":input\").filter(\"[name='\" + escapeAttributeValue(paramName) + \"']\").val();\r\n};\r\n});\r\nsetValidationValues(options, \"remote\", value);\r\n});\r\nadapters.add(\"password\", [\"min\", \"nonalphamin\", \"regex\"], function (options) {\r\nif (options.params.min) {\r\nsetValidationValues(options, \"minlength\", options.params.min);\r\n}\r\nif (options.params.nonalphamin) {\r\nsetValidationValues(options, \"nonalphamin\", options.params.nonalphamin);\r\n}\r\nif (options.params.regex) {\r\nsetValidationValues(options, \"regex\", options.params.regex);\r\n}\r\n});\r\n$(function () {\r\n$jQval.unobtrusive.parse(document);\r\n});\r\n}(jQuery));\r\n"
  },
  {
    "path": "23 - Architecting Application User Interfaces/PPPSSS.Dist.UIComp/PPPSSS.Dist.UIComp/Scripts/pppddd-application.js",
    "content": "﻿// when the page loads\r\n$(function() {\r\n\r\n    // query for holidays that simulates a user search\r\n    $.getJSON(\"/holidays\", function (json) {\r\n        $.each(json, function (index, holiday) {\r\n            $('#holidays').append(createHolidayView(holiday));\r\n        });\r\n    });\r\n\r\n    // query for promoted holidays\r\n    $.getJSON(\"/promotions\", function (json) {\r\n        $.each(json, function (index, holiday) {\r\n            $('#promotions').append(createHolidayView(holiday));\r\n        });\r\n    });\r\n\r\n    // query for user-specific recommendations\r\n    $.getJSON(\"/recommendations\", function (json) {\r\n        $.each(json, function (index, holiday) {\r\n            $('#recommendations').append(createHolidayView(holiday));\r\n        });\r\n    });\r\n});\r\n\r\nfunction createHolidayView(holiday) {\r\n    return '<div> ' +\r\n           '<img src=\"' + holiday.ImgUrl + '\" height=\"75\" style=\"float: left;\" /> ' +\r\n           '<h4>' + holiday.Title + '</h4>' +\r\n           '$' + holiday.Price + 'pp' +\r\n           '</div>' +\r\n           '<br />';\r\n}\r\n/*\r\n* Jquery used for demonstration purposes. Other frameworks\r\n* may be a better choice including Angular.js, Knockout.js etc\r\n*/"
  },
  {
    "path": "23 - Architecting Application User Interfaces/PPPSSS.Dist.UIComp/PPPSSS.Dist.UIComp/Views/Home/Index.cshtml",
    "content": "﻿\r\n@{\r\n    Layout = null;\r\n}\r\n\r\n<!DOCTYPE html>\r\n<html>\r\n<head>\r\n    <meta name=\"viewport\" content=\"width=device-width\" />\r\n    <title>PPPDDD Distributed Composite UI</title>\r\n    <script src=\"//code.jquery.com/jquery-1.11.0.min.js\"></script>\r\n    <script src=\"/Scripts/pppddd-application.js\" type=\"text/javascript\"></script>\r\n</head>\r\n<body>\r\n    <div> \r\n        <p>You searched for: Moderately Priced Autumn Sun</p>\r\n        <div id=\"holidays\">\r\n          <h3>Holidays Matching Your Search</h3>\r\n        </div>\r\n        <div id=\"promotions\">\r\n            <h3>Special Offers</h3>\r\n        </div>\r\n        <div id=\"recommendations\">\r\n            <h3>Holiday Recommendations Just For You</h3>\r\n        </div>\r\n    </div>\r\n</body>\r\n</html>\r\n"
  },
  {
    "path": "23 - Architecting Application User Interfaces/PPPSSS.Dist.UIComp/PPPSSS.Dist.UIComp/Views/web.config",
    "content": "﻿<?xml version=\"1.0\"?>\r\n\r\n<configuration>\r\n  <configSections>\r\n    <sectionGroup name=\"system.web.webPages.razor\" type=\"System.Web.WebPages.Razor.Configuration.RazorWebSectionGroup, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35\">\r\n      <section name=\"host\" type=\"System.Web.WebPages.Razor.Configuration.HostSection, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35\" requirePermission=\"false\" />\r\n      <section name=\"pages\" type=\"System.Web.WebPages.Razor.Configuration.RazorPagesSection, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35\" requirePermission=\"false\" />\r\n    </sectionGroup>\r\n  </configSections>\r\n\r\n  <system.web.webPages.razor>\r\n    <host factoryType=\"System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35\" />\r\n    <pages pageBaseType=\"System.Web.Mvc.WebViewPage\">\r\n      <namespaces>\r\n        <add namespace=\"System.Web.Mvc\" />\r\n        <add namespace=\"System.Web.Mvc.Ajax\" />\r\n        <add namespace=\"System.Web.Mvc.Html\" />\r\n        <add namespace=\"System.Web.Routing\" />\r\n        <add namespace=\"PPPSSS.Dist.UIComp\" />\r\n      </namespaces>\r\n    </pages>\r\n  </system.web.webPages.razor>\r\n\r\n  <appSettings>\r\n    <add key=\"webpages:Enabled\" value=\"false\" />\r\n  </appSettings>\r\n\r\n  <system.webServer>\r\n    <handlers>\r\n      <remove name=\"BlockViewHandler\"/>\r\n      <add name=\"BlockViewHandler\" path=\"*\" verb=\"*\" preCondition=\"integratedMode\" type=\"System.Web.HttpNotFoundHandler\" />\r\n    </handlers>\r\n  </system.webServer>\r\n</configuration>\r\n"
  },
  {
    "path": "23 - Architecting Application User Interfaces/PPPSSS.Dist.UIComp/PPPSSS.Dist.UIComp/Web.Debug.config",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n\r\n<!-- For more information on using web.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 -->\r\n\r\n<configuration xmlns:xdt=\"http://schemas.microsoft.com/XML-Document-Transform\">\r\n  <!--\r\n    In the example below, the \"SetAttributes\" transform will change the value of \r\n    \"connectionString\" to use \"ReleaseSQLServer\" only when the \"Match\" locator \r\n    finds an attribute \"name\" that has a value of \"MyDB\".\r\n    \r\n    <connectionStrings>\r\n      <add name=\"MyDB\" \r\n        connectionString=\"Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True\" \r\n        xdt:Transform=\"SetAttributes\" xdt:Locator=\"Match(name)\"/>\r\n    </connectionStrings>\r\n  -->\r\n  <system.web>\r\n    <!--\r\n      In the example below, the \"Replace\" transform will replace the entire \r\n      <customErrors> section of your web.config file.\r\n      Note that because there is only one customErrors section under the \r\n      <system.web> node, there is no need to use the \"xdt:Locator\" attribute.\r\n      \r\n      <customErrors defaultRedirect=\"GenericError.htm\"\r\n        mode=\"RemoteOnly\" xdt:Transform=\"Replace\">\r\n        <error statusCode=\"500\" redirect=\"InternalError.htm\"/>\r\n      </customErrors>\r\n    -->\r\n  </system.web>\r\n</configuration>"
  },
  {
    "path": "23 - Architecting Application User Interfaces/PPPSSS.Dist.UIComp/PPPSSS.Dist.UIComp/Web.Release.config",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n\r\n<!-- For more information on using web.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 -->\r\n\r\n<configuration xmlns:xdt=\"http://schemas.microsoft.com/XML-Document-Transform\">\r\n  <!--\r\n    In the example below, the \"SetAttributes\" transform will change the value of \r\n    \"connectionString\" to use \"ReleaseSQLServer\" only when the \"Match\" locator \r\n    finds an attribute \"name\" that has a value of \"MyDB\".\r\n    \r\n    <connectionStrings>\r\n      <add name=\"MyDB\" \r\n        connectionString=\"Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True\" \r\n        xdt:Transform=\"SetAttributes\" xdt:Locator=\"Match(name)\"/>\r\n    </connectionStrings>\r\n  -->\r\n  <system.web>\r\n    <compilation xdt:Transform=\"RemoveAttributes(debug)\" />\r\n    <!--\r\n      In the example below, the \"Replace\" transform will replace the entire \r\n      <customErrors> section of your web.config file.\r\n      Note that because there is only one customErrors section under the \r\n      <system.web> node, there is no need to use the \"xdt:Locator\" attribute.\r\n      \r\n      <customErrors defaultRedirect=\"GenericError.htm\"\r\n        mode=\"RemoteOnly\" xdt:Transform=\"Replace\">\r\n        <error statusCode=\"500\" redirect=\"InternalError.htm\"/>\r\n      </customErrors>\r\n    -->\r\n  </system.web>\r\n</configuration>"
  },
  {
    "path": "23 - Architecting Application User Interfaces/PPPSSS.Dist.UIComp/PPPSSS.Dist.UIComp/Web.config",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<!--\r\n  For more information on how to configure your ASP.NET application, please visit\r\n  http://go.microsoft.com/fwlink/?LinkId=301880\r\n  -->\r\n<configuration>\r\n  <appSettings>\r\n    <add key=\"webpages:Version\" value=\"3.0.0.0\" />\r\n    <add key=\"webpages:Enabled\" value=\"false\" />\r\n     <add key=\"ClientValidationEnabled\" value=\"true\" />\r\n    <add key=\"UnobtrusiveJavaScriptEnabled\" value=\"true\" />\r\n  </appSettings>\r\n  <system.web>\r\n    <compilation debug=\"true\" targetFramework=\"4.5\" />\r\n    <httpRuntime targetFramework=\"4.5\" />\r\n  </system.web>\r\n</configuration>\r\n"
  },
  {
    "path": "23 - Architecting Application User Interfaces/PPPSSS.Dist.UIComp/PPPSSS.Dist.UIComp/packages.config",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<packages>\r\n  <package id=\"jQuery\" version=\"1.10.2\" targetFramework=\"net45\" />\r\n  <package id=\"jQuery.Validation\" version=\"1.11.1\" targetFramework=\"net45\" />\r\n  <package id=\"Microsoft.AspNet.Mvc\" version=\"5.0.0\" targetFramework=\"net45\" />\r\n  <package id=\"Microsoft.AspNet.Razor\" version=\"3.0.0\" targetFramework=\"net45\" />\r\n  <package id=\"Microsoft.AspNet.WebPages\" version=\"3.0.0\" targetFramework=\"net45\" />\r\n  <package id=\"Microsoft.jQuery.Unobtrusive.Validation\" version=\"3.0.0\" targetFramework=\"net45\" />\r\n</packages>"
  },
  {
    "path": "23 - Architecting Application User Interfaces/PPPSSS.Dist.UIComp/PPPSSS.Dist.UIComp.sln",
    "content": "﻿\r\nMicrosoft Visual Studio Solution File, Format Version 12.00\r\n# Visual Studio Express 2013 for Web\r\nVisualStudioVersion = 12.0.21005.1\r\nMinimumVisualStudioVersion = 10.0.40219.1\r\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"PPPSSS.Dist.UIComp\", \"PPPSSS.Dist.UIComp\\PPPSSS.Dist.UIComp.csproj\", \"{F38B6576-A63A-4C2C-A1B8-63ABF86E37FB}\"\r\nEndProject\r\nGlobal\r\n\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\r\n\t\tDebug|Any CPU = Debug|Any CPU\r\n\t\tRelease|Any CPU = Release|Any CPU\r\n\tEndGlobalSection\r\n\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\r\n\t\t{F38B6576-A63A-4C2C-A1B8-63ABF86E37FB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r\n\t\t{F38B6576-A63A-4C2C-A1B8-63ABF86E37FB}.Debug|Any CPU.Build.0 = Debug|Any CPU\r\n\t\t{F38B6576-A63A-4C2C-A1B8-63ABF86E37FB}.Release|Any CPU.ActiveCfg = Release|Any CPU\r\n\t\t{F38B6576-A63A-4C2C-A1B8-63ABF86E37FB}.Release|Any CPU.Build.0 = Release|Any CPU\r\n\tEndGlobalSection\r\n\tGlobalSection(SolutionProperties) = preSolution\r\n\t\tHideSolutionNode = FALSE\r\n\tEndGlobalSection\r\nEndGlobal\r\n"
  },
  {
    "path": "23 - Architecting Application User Interfaces/README.md",
    "content": "PPPDDD\n======\n\nSample code for the book Principles, Practices and Patterns of Domain-Driven Design. From the book http://www.amazon.com/Professional-Domain-Driven-Design-Patterns/dp/1118714709/\n"
  },
  {
    "path": "24 - CQRS An Architecture of A Bounded Context/README.md",
    "content": "PPPDDD\n======\n\nSample code for the book Principles, Practices and Patterns of Domain-Driven Design. From the book http://www.amazon.com/Professional-Domain-Driven-Design-Patterns/dp/1118714709/\n"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/.nuget/NuGet.Config",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<configuration>\n  <solution>\n    <add key=\"disableSourceControlIntegration\" value=\"true\" />\n  </solution>\n</configuration>"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/.nuget/NuGet.targets",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n    <PropertyGroup>\n        <SolutionDir Condition=\"$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'\">$(MSBuildProjectDirectory)\\..\\</SolutionDir>\n\n        <!-- Enable the restore command to run before builds -->\n        <RestorePackages Condition=\"  '$(RestorePackages)' == '' \">false</RestorePackages>\n\n        <!-- Property that enables building a package from a project -->\n        <BuildPackage Condition=\" '$(BuildPackage)' == '' \">false</BuildPackage>\n\n        <!-- Determines if package restore consent is required to restore packages -->\n        <RequireRestoreConsent Condition=\" '$(RequireRestoreConsent)' != 'false' \">true</RequireRestoreConsent>\n\n        <!-- Download NuGet.exe if it does not already exist -->\n        <DownloadNuGetExe Condition=\" '$(DownloadNuGetExe)' == '' \">false</DownloadNuGetExe>\n    </PropertyGroup>\n\n    <ItemGroup Condition=\" '$(PackageSources)' == '' \">\n        <!-- Package sources used to restore packages. By default, registered sources under %APPDATA%\\NuGet\\NuGet.Config will be used -->\n        <!-- The official NuGet package source (https://www.nuget.org/api/v2/) will be excluded if package sources are specified and it does not appear in the list -->\n        <!--\n            <PackageSource Include=\"https://www.nuget.org/api/v2/\" />\n            <PackageSource Include=\"https://my-nuget-source/nuget/\" />\n        -->\n    </ItemGroup>\n\n    <PropertyGroup Condition=\" '$(OS)' == 'Windows_NT'\">\n        <!-- Windows specific commands -->\n        <NuGetToolsPath>$([System.IO.Path]::Combine($(SolutionDir), \".nuget\"))</NuGetToolsPath>\n    </PropertyGroup>\n\n    <PropertyGroup Condition=\" '$(OS)' != 'Windows_NT'\">\n        <!-- We need to launch nuget.exe with the mono command if we're not on windows -->\n        <NuGetToolsPath>$(SolutionDir).nuget</NuGetToolsPath>\n    </PropertyGroup>\n\n    <PropertyGroup>\n        <PackagesProjectConfig Condition=\" '$(OS)' == 'Windows_NT'\">$(MSBuildProjectDirectory)\\packages.$(MSBuildProjectName.Replace(' ', '_')).config</PackagesProjectConfig>\n        <PackagesProjectConfig Condition=\" '$(OS)' != 'Windows_NT'\">$(MSBuildProjectDirectory)\\packages.$(MSBuildProjectName).config</PackagesProjectConfig>\n    </PropertyGroup>\n\n    <PropertyGroup>\n      <PackagesConfig Condition=\"Exists('$(MSBuildProjectDirectory)\\packages.config')\">$(MSBuildProjectDirectory)\\packages.config</PackagesConfig>\n      <PackagesConfig Condition=\"Exists('$(PackagesProjectConfig)')\">$(PackagesProjectConfig)</PackagesConfig>\n    </PropertyGroup>\n    \n    <PropertyGroup>\n        <!-- NuGet command -->\n        <NuGetExePath Condition=\" '$(NuGetExePath)' == '' \">$(NuGetToolsPath)\\NuGet.exe</NuGetExePath>\n        <PackageSources Condition=\" $(PackageSources) == '' \">@(PackageSource)</PackageSources>\n\n        <NuGetCommand Condition=\" '$(OS)' == 'Windows_NT'\">\"$(NuGetExePath)\"</NuGetCommand>\n        <NuGetCommand Condition=\" '$(OS)' != 'Windows_NT' \">mono --runtime=v4.0.30319 \"$(NuGetExePath)\"</NuGetCommand>\n\n        <PackageOutputDir Condition=\"$(PackageOutputDir) == ''\">$(TargetDir.Trim('\\\\'))</PackageOutputDir>\n\n        <RequireConsentSwitch Condition=\" $(RequireRestoreConsent) == 'true' \">-RequireConsent</RequireConsentSwitch>\n        <NonInteractiveSwitch Condition=\" '$(VisualStudioVersion)' != '' AND '$(OS)' == 'Windows_NT' \">-NonInteractive</NonInteractiveSwitch>\n\n        <PaddedSolutionDir Condition=\" '$(OS)' == 'Windows_NT'\">\"$(SolutionDir) \"</PaddedSolutionDir>\n        <PaddedSolutionDir Condition=\" '$(OS)' != 'Windows_NT' \">\"$(SolutionDir)\"</PaddedSolutionDir>\n\n        <!-- Commands -->\n        <RestoreCommand>$(NuGetCommand) install \"$(PackagesConfig)\" -source \"$(PackageSources)\"  $(NonInteractiveSwitch) $(RequireConsentSwitch) -solutionDir $(PaddedSolutionDir)</RestoreCommand>\n        <BuildCommand>$(NuGetCommand) pack \"$(ProjectPath)\" -Properties \"Configuration=$(Configuration);Platform=$(Platform)\" $(NonInteractiveSwitch) -OutputDirectory \"$(PackageOutputDir)\" -symbols</BuildCommand>\n\n        <!-- We need to ensure packages are restored prior to assembly resolve -->\n        <BuildDependsOn Condition=\"$(RestorePackages) == 'true'\">\n            RestorePackages;\n            $(BuildDependsOn);\n        </BuildDependsOn>\n\n        <!-- Make the build depend on restore packages -->\n        <BuildDependsOn Condition=\"$(BuildPackage) == 'true'\">\n            $(BuildDependsOn);\n            BuildPackage;\n        </BuildDependsOn>\n    </PropertyGroup>\n\n    <Target Name=\"CheckPrerequisites\">\n        <!-- Raise an error if we're unable to locate nuget.exe  -->\n        <Error Condition=\"'$(DownloadNuGetExe)' != 'true' AND !Exists('$(NuGetExePath)')\" Text=\"Unable to locate '$(NuGetExePath)'\" />\n        <!--\n        Take advantage of MsBuild's build dependency tracking to make sure that we only ever download nuget.exe once.\n        This effectively acts as a lock that makes sure that the download operation will only happen once and all\n        parallel builds will have to wait for it to complete.\n        -->\n        <MsBuild Targets=\"_DownloadNuGet\" Projects=\"$(MSBuildThisFileFullPath)\" Properties=\"Configuration=NOT_IMPORTANT;DownloadNuGetExe=$(DownloadNuGetExe)\" />\n    </Target>\n\n    <Target Name=\"_DownloadNuGet\">\n        <DownloadNuGet OutputFilename=\"$(NuGetExePath)\" Condition=\" '$(DownloadNuGetExe)' == 'true' AND !Exists('$(NuGetExePath)')\" />\n    </Target>\n\n    <Target Name=\"RestorePackages\" DependsOnTargets=\"CheckPrerequisites\">        \n        <Exec Command=\"$(RestoreCommand)\"\n              Condition=\"'$(OS)' != 'Windows_NT' And Exists('$(PackagesConfig)')\" />\n\n        <Exec Command=\"$(RestoreCommand)\"\n              LogStandardErrorAsError=\"true\"\n              Condition=\"'$(OS)' == 'Windows_NT' And Exists('$(PackagesConfig)')\" />\n    </Target>\n\n    <Target Name=\"BuildPackage\" DependsOnTargets=\"CheckPrerequisites\">\n        <Exec Command=\"$(BuildCommand)\"\n              Condition=\" '$(OS)' != 'Windows_NT' \" />\n\n        <Exec Command=\"$(BuildCommand)\"\n              LogStandardErrorAsError=\"true\"\n              Condition=\" '$(OS)' == 'Windows_NT' \" />\n    </Target>\n\n    <UsingTask TaskName=\"DownloadNuGet\" TaskFactory=\"CodeTaskFactory\" AssemblyFile=\"$(MSBuildToolsPath)\\Microsoft.Build.Tasks.v4.0.dll\">\n        <ParameterGroup>\n            <OutputFilename ParameterType=\"System.String\" Required=\"true\" />\n        </ParameterGroup>\n        <Task>\n            <Reference Include=\"System.Core\" />\n            <Using Namespace=\"System\" />\n            <Using Namespace=\"System.IO\" />\n            <Using Namespace=\"System.Net\" />\n            <Using Namespace=\"Microsoft.Build.Framework\" />\n            <Using Namespace=\"Microsoft.Build.Utilities\" />\n            <Code Type=\"Fragment\" Language=\"cs\">\n                <![CDATA[\n                try {\n                    OutputFilename = Path.GetFullPath(OutputFilename);\n\n                    Log.LogMessage(\"Downloading latest version of NuGet.exe...\");\n                    WebClient webClient = new WebClient();\n                    webClient.DownloadFile(\"https://www.nuget.org/nuget.exe\", OutputFilename);\n\n                    return true;\n                }\n                catch (Exception ex) {\n                    Log.LogErrorFromException(ex);\n                    return false;\n                }\n            ]]>\n            </Code>\n        </Task>\n    </UsingTask>\n</Project>\n"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/DDDPPP.Chap20.CommandHandler.Application/Application/Api.cs",
    "content": "﻿using Agathas.Storefront.Infrastructure;\n\nnamespace Agathas.Storefront.Application\n{ \n    // API is a Facade into the application see DDD facade pattern\n    public class Api\n    {\n        private ICommandHandlerRegistry _command_handler_registery;        \n\n        public Api(ICommandHandlerRegistry command_handler_registery)\n        {\n            _command_handler_registery = command_handler_registery;\n        }\n\n        public void action_request_to<T>(T business_case) where T : IBusinessRequest\n        {                        \n            _command_handler_registery.find_handler_for(business_case).Invoke(business_case);\n        }        \n    }\n}\n"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/DDDPPP.Chap20.CommandHandler.Application/Application/Commands/AddProductToBasketCommand.cs",
    "content": "﻿using System;\nusing Agathas.Storefront.Infrastructure;\n\nnamespace DDDPPP.Chap20.CommandHandler.Application\n{\n    public class AddProductToBasketCommand : IBusinessRequest\n    {\n        private readonly int _productid;\n        private readonly Guid _basket_id;\n\n        public AddProductToBasketCommand(int productid, Guid basket_id)\n        {\n            _productid = productid;\n            _basket_id = basket_id;\n        }\n\n        public int productid\n        {\n            get { return _productid; }\n        }\n\n        public Guid basket_id\n        {\n            get { return _basket_id; }\n        }\n    }\n}"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/DDDPPP.Chap20.CommandHandler.Application/Application/Commands/ApplyCouponToBasketCommand.cs",
    "content": "﻿using System;\nusing Agathas.Storefront.Infrastructure;\n\nnamespace Agathas.Storefront.Shopping.Commands\n{\n    public class ApplyCouponToBasketCommand : IBusinessRequest\n    {                \n        public ApplyCouponToBasketCommand(Guid basket_id, string voucher_id)\n        {\n            this.basket_id = basket_id;\n            // check to see if voucher id is null\n            \n            this.voucher_id = voucher_id;\n        }\n\n        public string voucher_id { get; set; }\n        public Guid basket_id { get; set; }\n    }      \n}"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/DDDPPP.Chap20.CommandHandler.Application/Application/Commands/CreateABasketCommand.cs",
    "content": "﻿using System;\nusing Agathas.Storefront.Infrastructure;\n\nnamespace Agathas.Storefront.Shopping.Commands\n{\n    public class CreateABasketCommand : IBusinessRequest\n    {\n        public Guid basket_id { get; set; }\n\n        public CreateABasketCommand(Guid basket_id)\n        {\n            this.basket_id = basket_id;\n        }\n    }\n}"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/DDDPPP.Chap20.CommandHandler.Application/Application/Commands/RemoveOfferFromBasketCommand.cs",
    "content": "﻿using System;\nusing Agathas.Storefront.Infrastructure;\n\nnamespace Agathas.Storefront.Shopping.Commands\n{\n    public class RemoveCouponFromBasketCommand : IBusinessRequest\n    {\n        private readonly string _couponCode;\n        private readonly Guid _basket_id;\n\n        public RemoveCouponFromBasketCommand(Guid basket_id, string couponCode)\n        {\n            _couponCode = couponCode;\n            _basket_id = basket_id;\n        }\n\n        public string coupon_code\n        {\n            get { return _couponCode; }\n        }\n\n        public Guid basket_id\n        {\n            get { return _basket_id; }\n        }\n    }\n}"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/DDDPPP.Chap20.CommandHandler.Application/Application/Commands/RemoveProductFromBasketCommand.cs",
    "content": "﻿using System;\nusing Agathas.Storefront.Infrastructure;\n\nnamespace Agathas.Storefront.Shopping.Commands\n{\n    public class RemoveProductFromBasketCommand : IBusinessRequest\n    {\n        public RemoveProductFromBasketCommand(Guid get_basket_id, int product_id)\n        {\n            this.get_basket_id = get_basket_id;\n            this.product_id = product_id;\n        }\n\n        public Guid get_basket_id { get; set; }\n        public int product_id { get; set; }\n    }\n}"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/DDDPPP.Chap20.CommandHandler.Application/Application/Commands/UpdateBasketDeliveryCountry.cs",
    "content": "﻿using Agathas.Storefront.Infrastructure;\n\nnamespace Agathas.Storefront.Shopping.Commands\n{\n    public class UpdateBasketDeliveryCountry : IBusinessRequest\n    {\n        \n    }\n}"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/DDDPPP.Chap20.CommandHandler.Application/Application/Contract/_readme.txt",
    "content": "﻿put here any events other Bounded Contexts are interested in."
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/DDDPPP.Chap20.CommandHandler.Application/Application/Handlers/AddProductToBasketCommandHandler.cs",
    "content": "﻿using Agathas.Storefront.Infrastructure;\nusing Agathas.Storefront.Shopping.Commands;\nusing Agathas.Storefront.Shopping.Model.Baskets;\nusing Agathas.Storefront.Shopping.Model.Baskets.Products;\n\nnamespace Agathas.Storefront.Application.Handlers\n{\n    public class AddProductToBasketCommandHandler : ICommandHandler<AddProductToBasketCommand>\n    {\n        private readonly IBasketRepository _basketRepository;\n        private readonly IBasketPricingService _basketPricingService;\n\n        public AddProductToBasketCommandHandler(IBasketRepository basketRepository,\n                                                ReadModel product_repository,\n                                                IBasketPricingService basket_pricing_service)\n        {\n            _basketRepository = basketRepository;\n            _basketPricingService = basket_pricing_service;\n        }\n\n        public void action(AddProductToBasketCommand business_request)\n        {\n            var basket = _basketRepository.find_by(business_request.basket_id);            \n\n            // var product = _product_repository.find_by(business_request.productid);\n            var product = new ProductSnapshot();\n\n            basket.add(product, _basketPricingService);                                    \n        }\n    }\n}"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/DDDPPP.Chap20.CommandHandler.Application/Application/Handlers/ApplyCouponToBasketCommandHandler.cs",
    "content": "﻿using Agathas.Storefront.Infrastructure;\nusing Agathas.Storefront.Shopping.Commands;\nusing Agathas.Storefront.Shopping.Model.Baskets;\nusing Agathas.Storefront.Shopping.Model.Promotions;\n\nnamespace Agathas.Storefront.Shopping.Handlers\n{\n    public class ApplyCouponToBasketCommandHandler : ICommandHandler<ApplyCouponToBasketCommand>\n    {\n        private readonly IPromotionsRepository _promotions_repository;\n        private readonly IBasketRepository _basket_repository;\n        private readonly IBasketPricingService _basketPricingService;\n\n\n        public ApplyCouponToBasketCommandHandler(IPromotionsRepository promotions_repository,\n                                                IBasketRepository basket_repository,\n                                                IBasketPricingService basketPricingService)\n        {\n            _promotions_repository = promotions_repository;\n            _basket_repository = basket_repository;\n            _basketPricingService = basketPricingService;\n        }\n\n        public void action(ApplyCouponToBasketCommand business_request)\n        {\n            var promotion = _promotions_repository.find_by(business_request.voucher_id);\n            // 1. Ensure coupon is valid, still in date\n            // Throw Exception - Promo code is invalid\n\n            // Throw Exception - Promo code is not applicable                      \n            var basket = _basket_repository.find_by(business_request.basket_id);\n            \n            basket.apply(promotion, _basketPricingService);\n            \n            // THROW EXCEPTION IF Coupon is not valid\n\n            _basket_repository.save(basket);\n        }\n    }\n}"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/DDDPPP.Chap20.CommandHandler.Application/Application/Handlers/CreateABasketCommandHandler.cs",
    "content": "﻿using Agathas.Storefront.Infrastructure;\nusing Agathas.Storefront.Shopping.Commands;\nusing Agathas.Storefront.Shopping.Model.Baskets;\n\nnamespace Agathas.Storefront.Shopping.Handlers\n{\n    public class CreateABasketCommandHandler : ICommandHandler<CreateABasketCommand>\n    {\n        private readonly IBasketRepository _basket_repository;\n\n        public CreateABasketCommandHandler(IBasketRepository basket_repository)\n        {\n            _basket_repository = basket_repository;\n        }\n\n        public void action(CreateABasketCommand business_request)\n        {\n            var basket = new Basket(business_request.basket_id);\n\n            _basket_repository.add(basket);\n        }\n    }\n}"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/DDDPPP.Chap20.CommandHandler.Application/Application/Handlers/RemoveCouponFromBasketCommandHandler.cs",
    "content": "﻿using Agathas.Storefront.Infrastructure;\nusing Agathas.Storefront.Shopping.Commands;\nusing Agathas.Storefront.Shopping.Model.Baskets;\n\nnamespace Agathas.Storefront.Shopping.Handlers\n{\n    public class RemoveCouponFromBasketCommandHandler : ICommandHandler<RemoveCouponFromBasketCommand>\n    {\n        private readonly IBasketRepository _basket_repository;\n        private readonly IBasketPricingService _basketPricingService;\n\n        public RemoveCouponFromBasketCommandHandler(IBasketRepository basket_repository,\n                                                   IBasketPricingService basketPricingService)\n        {\n            _basket_repository = basket_repository;\n            _basketPricingService = basketPricingService;\n        }\n\n        public void action(RemoveCouponFromBasketCommand business_request)\n        {\n            var basket = _basket_repository.find_by(business_request.basket_id);\n\n            basket.remove_coupon(business_request.coupon_code, _basketPricingService);\n\n            _basket_repository.save(basket);\n        }\n    }\n}"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/DDDPPP.Chap20.CommandHandler.Application/Application/Handlers/RemoveProductFromBasketCommandHandler.cs",
    "content": "﻿using Agathas.Storefront.Infrastructure;\nusing Agathas.Storefront.Shopping.Commands;\nusing Agathas.Storefront.Shopping.Model.Baskets;\n\nnamespace Agathas.Storefront.Shopping.Handlers\n{\n    public class RemoveProductFromBasketCommandHandler : ICommandHandler<RemoveProductFromBasketCommand>\n    {\n        private readonly IBasketRepository _basketRepository;\n        private readonly IBasketPricingService _basketPricingService;\n\n        public RemoveProductFromBasketCommandHandler(IBasketRepository basket_repository,\n                                                     IBasketPricingService basket_pricing_service)\n        {\n            _basketRepository = basket_repository;\n            _basketPricingService = basket_pricing_service;\n        }\n\n        public void action(RemoveProductFromBasketCommand business_request)\n        {\n            var basket = _basketRepository.find_by(business_request.get_basket_id);\n\n            basket.remove_product_with_id_of(business_request.product_id, _basketPricingService);\n        }\n    }\n}"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/DDDPPP.Chap20.CommandHandler.Application/Application/ReadModel/Product.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\n\nnamespace Agathas.Storefront.Shopping.ReadModel\n{\n    class Product\n    {\n    }\n}\n"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/DDDPPP.Chap20.CommandHandler.Application/CommandHandlerRegistry.cs",
    "content": "﻿using System;\nusing Agathas.Storefront.Infrastructure;\nusing StructureMap;\n\nnamespace Agathas.Storefront.Application\n{\n    public class CommandHandlerRegistry : ICommandHandlerRegistry\n    {\n        public Action<TCommand> find_handler_for<TCommand>(TCommand command) where TCommand : IBusinessRequest\n        {\n            var handler = ObjectFactory.TryGetInstance<ICommandHandler<TCommand>>();\n\n            var transactional_handler = ObjectFactory.GetInstance<TransactionHandler>();\n\n            Action<TCommand> method_to_handle_command = cmd => transactional_handler.action(cmd, handler);\n\n            return method_to_handle_command;\n        }\n    }\n}"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/DDDPPP.Chap20.CommandHandler.Application/DDDPPP.Chap20.CommandHandler.Application.csproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"4.0\" DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <Import Project=\"$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props\" Condition=\"Exists('$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props')\" />\n  <PropertyGroup>\n    <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>\n    <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>\n    <ProjectGuid>{52858090-3479-4015-984F-5AA049857F3F}</ProjectGuid>\n    <OutputType>Library</OutputType>\n    <AppDesignerFolder>Properties</AppDesignerFolder>\n    <RootNamespace>DDDPPP.Chap20.CommandHandler.Application</RootNamespace>\n    <AssemblyName>DDDPPP.Chap20.CommandHandler.Application</AssemblyName>\n    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\n    <FileAlignment>512</FileAlignment>\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' \">\n    <DebugSymbols>true</DebugSymbols>\n    <DebugType>full</DebugType>\n    <Optimize>false</Optimize>\n    <OutputPath>bin\\Debug\\</OutputPath>\n    <DefineConstants>DEBUG;TRACE</DefineConstants>\n    <ErrorReport>prompt</ErrorReport>\n    <WarningLevel>4</WarningLevel>\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' \">\n    <DebugType>pdbonly</DebugType>\n    <Optimize>true</Optimize>\n    <OutputPath>bin\\Release\\</OutputPath>\n    <DefineConstants>TRACE</DefineConstants>\n    <ErrorReport>prompt</ErrorReport>\n    <WarningLevel>4</WarningLevel>\n  </PropertyGroup>\n  <ItemGroup>\n    <Reference Include=\"System\" />\n    <Reference Include=\"System.Core\" />\n    <Reference Include=\"System.Xml.Linq\" />\n    <Reference Include=\"System.Data.DataSetExtensions\" />\n    <Reference Include=\"Microsoft.CSharp\" />\n    <Reference Include=\"System.Data\" />\n    <Reference Include=\"System.Xml\" />\n  </ItemGroup>\n  <ItemGroup>\n    <Compile Include=\"Application\\Api.cs\" />\n    <Compile Include=\"CommandHandlerRegistry.cs\" />\n    <Compile Include=\"Application\\Commands\\AddProductToBasketCommand.cs\" />\n    <Compile Include=\"Application\\Commands\\ApplyCouponToBasketCommand.cs\" />\n    <Compile Include=\"Application\\Commands\\CreateABasketCommand.cs\" />\n    <Compile Include=\"Application\\Commands\\RemoveOfferFromBasketCommand.cs\" />\n    <Compile Include=\"Application\\Commands\\RemoveProductFromBasketCommand.cs\" />\n    <Compile Include=\"Application\\Commands\\UpdateBasketDeliveryCountry.cs\" />\n    <Compile Include=\"DomainEventHandlerRegistery.cs\" />\n    <Compile Include=\"Application\\Handlers\\AddProductToBasketCommandHandler.cs\" />\n    <Compile Include=\"Application\\Handlers\\ApplyCouponToBasketCommandHandler.cs\" />\n    <Compile Include=\"Application\\Handlers\\CreateABasketCommandHandler.cs\" />\n    <Compile Include=\"Application\\Handlers\\RemoveCouponFromBasketCommandHandler.cs\" />\n    <Compile Include=\"Application\\Handlers\\RemoveProductFromBasketCommandHandler.cs\" />\n    <Compile Include=\"Infrastructure\\BasketRepository.cs\" />\n    <Compile Include=\"Infrastructure\\PromotionsRepository.cs\" />\n    <Compile Include=\"Model\\Baskets\\Basket.cs\" />\n    <Compile Include=\"Model\\Baskets\\BasketItem.cs\" />\n    <Compile Include=\"Model\\Baskets\\BasketItemFactory.cs\" />\n    <Compile Include=\"Model\\Baskets\\BasketPricingBreakdown.cs\" />\n    <Compile Include=\"Model\\Baskets\\BasketPricingService.cs\" />\n    <Compile Include=\"Model\\Baskets\\Events\\BasketCreated.cs\" />\n    <Compile Include=\"Model\\Baskets\\Events\\BasketModified.cs\" />\n    <Compile Include=\"Model\\Baskets\\Events\\BasketPriceChanged.cs\" />\n    <Compile Include=\"Model\\Baskets\\Events\\CouponNotApplicableForBasketItems.cs\" />\n    <Compile Include=\"Model\\Baskets\\IBasketPricingService.cs\" />\n    <Compile Include=\"Model\\Baskets\\IBasketRepository.cs\" />\n    <Compile Include=\"Model\\Baskets\\NonNegativeQuantity.cs\" />\n    <Compile Include=\"Model\\Baskets\\ProductSnapshot.cs\" />\n    <Compile Include=\"Model\\Promotions\\Coupon.cs\" />\n    <Compile Include=\"Model\\Promotions\\CouponIssues.cs\" />\n    <Compile Include=\"Model\\Promotions\\ICouponPolicy.cs\" />\n    <Compile Include=\"Model\\Promotions\\IPromotionsRepository.cs\" />\n    <Compile Include=\"Model\\Promotions\\Promotion.cs\" />\n    <Compile Include=\"Model\\Promotions\\PromotionNotApplicableException.cs\" />\n    <Compile Include=\"Properties\\AssemblyInfo.cs\" />\n    <Compile Include=\"Application\\ReadModel\\Product.cs\" />\n  </ItemGroup>\n  <ItemGroup>\n    <Content Include=\"Application\\Contract\\_readme.txt\" />\n    <Content Include=\"Infrastructure\\Mapping\\Basket.hbm.xml\" />\n    <Content Include=\"Infrastructure\\Mapping\\BasketItem.hbm.xml\" />\n    <Content Include=\"Infrastructure\\Mapping\\BasketVoucher.hbm.xml\" />\n    <Content Include=\"Infrastructure\\Mapping\\Offer.hbm.xml\" />\n    <Content Include=\"Infrastructure\\Mapping\\Product.hbm.xml\" />\n  </ItemGroup>\n  <Import Project=\"$(MSBuildToolsPath)\\Microsoft.CSharp.targets\" />\n  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \n       Other similar extension points exist, see Microsoft.Common.targets.\n  <Target Name=\"BeforeBuild\">\n  </Target>\n  <Target Name=\"AfterBuild\">\n  </Target>\n  -->\n</Project>"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/DDDPPP.Chap20.CommandHandler.Application/DomainEventHandlerRegistery.cs",
    "content": "﻿using Agathas.Storefront.Infrastructure;\nusing StructureMap;\n\nnamespace Agathas.Storefront.Application\n{\n    public class DomainEventHandlerRegistery : IDomainEventHandlerRegistery\n    {        \n        public void handle<TEvent>(TEvent domain_event) where TEvent : IDomainEvent\n        {\n            var handler = ObjectFactory.TryGetInstance<IDomainEventHandler<TEvent>>();\n\n            handler.action(domain_event);\n        }\n    }\n}"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/DDDPPP.Chap20.CommandHandler.Application/Infrastructure/BasketRepository.cs",
    "content": "﻿using System;\nusing Agathas.Storefront.Infrastructure.Repositories;\nusing Agathas.Storefront.Shopping.Baskets;\nusing Agathas.Storefront.Shopping.Model.Baskets;\n\nnamespace Agathas.Storefront.Shopping.Infrastructure\n{\n    public class BasketRepository : NhRepository<Basket, Guid>,  IBasketRepository\n    {\n        public BasketRepository(ISessionCoordinator session)\n            : base(session)\n        {\n        }\n    }\n}"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/DDDPPP.Chap20.CommandHandler.Application/Infrastructure/Mapping/Basket.hbm.xml",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n<hibernate-mapping xmlns=\"urn:nhibernate-mapping-2.2\"\n    namespace=\"Agathas.Storefront.Shopping.Model.Baskets\"\n        assembly=\"Agathas.Storefront.Shopping\">\n\n  <class name=\"Basket\" table=\"Baskets\" lazy=\"false\" >\n\n    <id name=\"_id\" access=\"field\" column=\"BasketId\" type=\"Guid\">\n      \n    </id>\n\t  \n\t  <component class=\"Agathas.Storefront.Shopping.Model.Baskets.BasketVoucher\" access=\"field\" name=\"_basket_voucher\">\t\t  \t\t  \n\t\t  <property access=\"field\" name=\"_voucher_code\" column=\"VoucherCode\"/>\t\t  \n\t\t  <component class=\"Agathas.Storefront.Common.Money, Agathas.Storefront.Common\" access=\"field\" name=\"_discount\">\n\t\t\t  <property access=\"field\" name=\"_value\" column=\"VoucherDiscount\"/>\n\t\t  </component>\t\t  \n\t\t  <component class=\"Agathas.Storefront.Common.Money, Agathas.Storefront.Common\" access=\"field\" name=\"_threshold\">\n\t\t\t  <property access=\"field\" name=\"_value\" column=\"VoucherThreshold\"/>\n\t\t  </component>\n\t  </component>\n\t  \n\t  <bag name=\"_items\" lazy=\"false\" access=\"field\"  inverse=\"true\" cascade=\"all-delete-orphan\">\n      <key column=\"BasketId\"/>\n      <one-to-many class=\"BasketItem\"></one-to-many>\n    </bag>\n  </class>\n\n</hibernate-mapping>"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/DDDPPP.Chap20.CommandHandler.Application/Infrastructure/Mapping/BasketItem.hbm.xml",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n<hibernate-mapping xmlns=\"urn:nhibernate-mapping-2.2\"\n    namespace=\"Agathas.Storefront.Shopping.Model.Baskets\"\n        assembly=\"Agathas.Storefront.Shopping\">\n\n  <class name=\"BasketItem\" table=\"BasketItems\" lazy=\"false\" >\n\n    <id name=\"_id\" access=\"field\" column=\"BasketItemId\" type=\"Guid\">\n    </id>\n\n    <component class=\"Agathas.Storefront.Common.Money, Agathas.Storefront.Common\" name=\"_price\" access=\"field\">\n      <property access=\"field\" name=\"_value\" column=\"Price\"/>      \n    </component>\n\n    <component class=\"NonNegativeQuantity\" name=\"_quantity\" access=\"field\">\n      <property access=\"field\" name=\"_value\" column=\"Quantity\"/>\n    </component>\n    \n    <property access=\"field\" name=\"_product_id\" column=\"ProductId\"/>    \n    \n  </class>\n\n</hibernate-mapping>\n"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/DDDPPP.Chap20.CommandHandler.Application/Infrastructure/Mapping/BasketVoucher.hbm.xml",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n<hibernate-mapping xmlns=\"urn:nhibernate-mapping-2.2\"\n    namespace=\"Agathas.Storefront.Shopping.Model.Baskets\"\n        assembly=\"Agathas.Storefront.Shopping\">\n\n  <class name=\"BasketVoucher\" table=\"tBasketVouchers\" lazy=\"false\" >\n\n    <id name=\"_id\" access=\"field\" column=\"BaskerVoucherId\" type=\"Guid\">\n    </id>\n\n    <property access=\"field\" column=\"BasketId\" name=\"_basket_id\"/>\n\n    <property access=\"field\" column=\"VoucherCode\" name=\"_voucher_code\"/>\n\n    <component class=\"Agathas.Storefront.Common.Money, Agathas.Storefront.Common\" name=\"_discount\" access=\"field\">\n      <property access=\"field\" name=\"_value\" column=\"Discount\"/>\n    </component>\n\n    <component class=\"Agathas.Storefront.Common.Money, Agathas.Storefront.Common\" name=\"_threshold\" access=\"field\">\n      <property access=\"field\" name=\"_value\" column=\"Threshold\"/>\n    </component>\n\n   \n  </class>\n\n</hibernate-mapping>"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/DDDPPP.Chap20.CommandHandler.Application/Infrastructure/Mapping/Offer.hbm.xml",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n<hibernate-mapping xmlns=\"urn:nhibernate-mapping-2.2\"\n    namespace=\"Agathas.Storefront.Shopping.Model.Coupons\"\n        assembly=\"Agathas.Storefront.Shopping\">\n\n  <class name=\"Offer\" table=\"Offers\" lazy=\"false\" >\n\n    <id name=\"_id\" access=\"field\" column=\"OfferId\" type=\"Guid\">\n    </id>\n\n    <property access=\"field\" column=\"BasketId\" name=\"_voucher_code\"/>\n    <component class=\"Agathas.Storefront.Common.Money, Agathas.Storefront.Common\" name=\"_discount\" access=\"field\">\n      <property access=\"field\" name=\"_value\" column=\"Discount\"/>\n    </component>\n\n    <component class=\"Agathas.Storefront.Common.Money, Agathas.Storefront.Common\" name=\"_threshold\" access=\"field\">\n      <property access=\"field\" name=\"_value\" column=\"Threshold\"/>\n    </component>\n\n  </class>\n\n</hibernate-mapping>"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/DDDPPP.Chap20.CommandHandler.Application/Infrastructure/Mapping/Product.hbm.xml",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n<hibernate-mapping xmlns=\"urn:nhibernate-mapping-2.2\"\n    namespace=\"Agathas.Storefront.Shopping.Model.Baskets.Products\"\t\t\t   \n        assembly=\"Agathas.Storefront.Shopping\">\n\n  <class name=\"Product\" table=\"Products\" lazy=\"false\" >\n\n    <id name=\"_id\" access=\"field\" column=\"ProductId\" type=\"int\">\n\n    </id>\n\n    <property access=\"field\" column=\"Name\" name=\"_name\"/>\n\n    <component class=\"Agathas.Storefront.Common.Money, Agathas.Storefront.Common\" name=\"_price\" access=\"field\">\n      <property access=\"field\" name=\"_value\" column=\"Price\"/>\n    </component>\n  </class>\n\n</hibernate-mapping>"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/DDDPPP.Chap20.CommandHandler.Application/Infrastructure/PromotionsRepository.cs",
    "content": "﻿using System;\nusing Agathas.Storefront.Infrastructure.Repositories;\nusing Agathas.Storefront.Shopping.Model.Promotions;\n\nnamespace Agathas.Storefront.Shopping.Infrastructure\n{\n    public class PromotionsRepository : NhRepository<Promotion, Guid>, IPromotionsRepository\n    {\n        public PromotionsRepository(ISessionCoordinator session)\n            : base(session)\n        {\n        }\n        \n        public Promotion find_by(string voucher_code)\n        {\n            return base.query_for_single(x => x.voucher_code == voucher_code);\n        }\n    }\n}"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/DDDPPP.Chap20.CommandHandler.Application/Model/Baskets/Basket.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing Agathas.Storefront.Common;\nusing Agathas.Storefront.Infrastructure;\nusing Agathas.Storefront.Shopping.Baskets.Events;\nusing Agathas.Storefront.Shopping.Model.Promotions;\n\nnamespace Agathas.Storefront.Shopping.Model.Baskets\n{\n    public class Basket \n    {\n        private IList<BasketItem> _items;\n        private IList<Coupon> _coupons;\n        private Guid _id;        \n               \n        private Basket()\n        {\n        }\n\n        public Basket(Guid id)\n        {\n            _id = id;\n            _items = new List<BasketItem>();            \n\n            DomainEvents.raise(new BasketCreated(this._id, new Money()));\n        }\n\n        public Guid id\n        {\n            get { return _id; }\n        }\n        \n        public void add(ProductSnapshot product_snapshot, IBasketPricingService basket_pricing_service)\n        {\n            // TODO: Check for null values and invalid data\n\n            if (basket_contains_an_item_for(product_snapshot))\n                get_item_for(product_snapshot).increase_item_quantity_by(new NonNegativeQuantity(1));\n            else\n                _items.Add(BasketItemFactory.create_item_for(product_snapshot));\n\n            recalculate_basket_totals(basket_pricing_service);\n        }\n\n        private BasketItem get_item_for(ProductSnapshot product_snapshot)\n        {\n            return _items.Where(i => i.contains(product_snapshot)).FirstOrDefault();\n        }\n\n        private bool basket_contains_an_item_for(ProductSnapshot product_snapshot)\n        {\n            return _items.Any(i => i.contains(product_snapshot));\n        }\n\n        public void remove_product_with_id_of(ProductSnapshot product, IBasketPricingService basket_pricing_service)\n        {\n            if (basket_contains_an_item_for(product))\n            {\n                _items.Remove(get_item_for(product));\n\n                recalculate_basket_totals(basket_pricing_service);\n            }\n        }\n\n        private void recalculate_basket_totals(IBasketPricingService basket_pricing_service)\n        {\n            var total = basket_pricing_service.calculate_total_price_for(_items, _coupons);\n\n            DomainEvents.raise(new BasketPriceChanged(this._id, total.basket_total, total.discount));\n        }\n\n        public void change_quantity_of_product(NonNegativeQuantity quantity, ProductSnapshot product_snapshot, IBasketPricingService basket_pricing_service)\n        {\n            // TODO: Check for null values and invalid data\n\n            if (basket_contains_an_item_for(product_snapshot))\n            {\n                if (quantity.is_zero())\n                {\n                    remove_product_with_id_of(product_snapshot, basket_pricing_service);\n                }\n                else\n                    get_item_for(product_snapshot).change_item_quantity_to(quantity);\n\n                recalculate_basket_totals(basket_pricing_service);\n            }\n        }\n                      \n        public bool contains_product(Func<BasketItem, bool> func)\n        {\n            return _items.Any(func);\n        }\n     \n        public void apply(Promotion promotion, IBasketPricingService basket_pricing_service)\n        {\n            // double dispatch\n            var coupon = promotion.create_coupon_for(this._id); \n\n            _coupons.Add(coupon);\n\n            recalculate_basket_totals(basket_pricing_service);\n        }\n\n        public void remove_coupon(string coupon_code, IBasketPricingService basket_pricing_service)\n        {\n            var coupon = _coupons.First(c => c.code == coupon_code);\n\n            _coupons.Remove(coupon);\n\n            recalculate_basket_totals(basket_pricing_service);\n        }  \n    }\n}\n\n"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/DDDPPP.Chap20.CommandHandler.Application/Model/Baskets/BasketItem.cs",
    "content": "﻿using System;\nusing Agathas.Storefront.Common;\n\nnamespace Agathas.Storefront.Shopping.Model.Baskets\n{\n    // The basket has no rules, or invariants, its just a list of product id's\n    // \n    public class BasketItem \n    {\n        private Guid _id;\n        //private Money _price; // should this be cost of item at time of adding to basket rather than actual product cost?\n        private NonNegativeQuantity _quantity;\n        //private int _product_id;// Should be Product Snapshot\n        private ProductSnapshot _product_snapshot;\n\n        private BasketItem()\n        {\n        }\n\n        public BasketItem(ProductSnapshot product_snapshot, NonNegativeQuantity quantity)\n        {\n            _id = Guid.NewGuid();\n            _product_snapshot = product_snapshot;\n            _quantity = quantity;\n        }\n        \n        public Money line_total()\n        {\n            return _product_snapshot.price.multiple_by(_quantity.value);\n        }\n                \n        public bool contains(ProductSnapshot product_snapshot)\n        {\n            return _product_snapshot == product_snapshot;\n        }\n\n        public void increase_item_quantity_by(NonNegativeQuantity quantity)\n        {\n            _quantity = _quantity.Add(quantity);\n        }\n\n        public void change_item_quantity_to(NonNegativeQuantity quantity)\n        {\n            _quantity = quantity;\n        }\n\n        public bool contains_product_that_is_in_same_category_as(string category) // change to strongly typed Category\n        {\n            return true;\n        }\n    }\n}"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/DDDPPP.Chap20.CommandHandler.Application/Model/Baskets/BasketItemFactory.cs",
    "content": "﻿using Agathas.Storefront.Shopping.Baskets;\n\nnamespace Agathas.Storefront.Shopping.Model.Baskets\n{\n    public static class BasketItemFactory\n    {\n        public static BasketItem create_item_for(ProductSnapshot product_snapshot)\n        {\n            return new BasketItem(product_snapshot, new NonNegativeQuantity(1));\n        }\n    }\n}"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/DDDPPP.Chap20.CommandHandler.Application/Model/Baskets/BasketPricingBreakdown.cs",
    "content": "﻿using System;\nusing Agathas.Storefront.Common;\nusing Agathas.Storefront.Shopping.Model.Promotions;\n\nnamespace Agathas.Storefront.Shopping.Model.Baskets\n{\n    public class BasketPricingBreakdown\n    {\n        public Money basket_total\n        {\n            get { throw new NotImplementedException(); }\n            set { throw new NotImplementedException(); }\n        }\n\n        public Money discount\n        {\n            get { throw new NotImplementedException(); }\n            set { throw new NotImplementedException(); }\n        }\n\n        public CouponIssues coupon_message\n        {\n            get { throw new NotImplementedException(); }\n            set { throw new NotImplementedException(); }\n        }\n    }\n}"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/DDDPPP.Chap20.CommandHandler.Application/Model/Baskets/BasketPricingService.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing Agathas.Storefront.Common;\nusing Agathas.Storefront.Shopping.Model.Promotions;\n\nnamespace Agathas.Storefront.Shopping.Model.Baskets\n{\n    public class BasketPricingService : IBasketPricingService\n    {\n        private readonly IBasketRepository _basketRepository;\n        private readonly IPromotionsRepository _promotions_repository;\n\n        public BasketPricingService(IBasketRepository basketRepository, \n                                    IPromotionsRepository promotions_repository)\n        {\n            _basketRepository = basketRepository;\n            _promotions_repository = promotions_repository;\n        }\n\n        // Side effect free function\n        public BasketPricingBreakdown calculate_total_price_for(IEnumerable<BasketItem> items, IEnumerable<Coupon> coupons)\n        {\n            var basketPricingBreakdown = new BasketPricingBreakdown();            \n            var basket_discount = new Money();\n            var coupon_issue = CouponIssues.NotApplied;\n\n            //foreach (var coupon in coupons)\n            //{                \n            //    // 1. Get all coupons associted with the basket\n            //    // 2. Check if it is applicable or which one wins.\n            //    var promotion = _promotions_repository.find_by(coupon.code);\n\n            //    if (promotion.is_still_active() && promotion.can_be_applied_to(basket))\n            //    {\n            //        basket_discount = promotion.calculate_discount_for(items);\n            //        coupon_issue = CouponIssues.NoIssue;\n            //    }\n            //    else\n            //    {\n            //        coupon_issue = coupon.reason_why_cannot_be_applied_to(items);\n            //    }    \n            //}\n\n            var total = new Money();\n            foreach(var item in items)\n            {\n                total = total.add(item.line_total());\n            }\n\n            basketPricingBreakdown.basket_total = total;\n            basketPricingBreakdown.discount = basket_discount;\n            basketPricingBreakdown.coupon_message = coupon_issue;\n\n            return basketPricingBreakdown;\n        }\n    }\n}\n"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/DDDPPP.Chap20.CommandHandler.Application/Model/Baskets/Events/BasketCreated.cs",
    "content": "﻿using System;\nusing Agathas.Storefront.Common;\nusing Agathas.Storefront.Infrastructure;\n\nnamespace Agathas.Storefront.Shopping.Baskets.Events\n{\n    public class BasketCreated : IDomainEvent\n    {        \n        public BasketCreated(Guid id, Money amountToPay)\n        {\n            Id = id;\n            AmountToPay = amountToPay;\n        }\n\n        public Guid Id { get; set; }\n        public Money AmountToPay { get; set; }\n    }\n}\n"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/DDDPPP.Chap20.CommandHandler.Application/Model/Baskets/Events/BasketModified.cs",
    "content": "﻿using System;\nusing Agathas.Storefront.Infrastructure;\n\nnamespace Agathas.Storefront.Sales.Model.Baskets.Events\n{\n    public class BasketModified : IDomainEvent\n    {\n        public BasketModified(Guid basket_id)\n        {\n            this.basket_id = basket_id;\n        }\n\n        public Guid basket_id { get; set; }\n    }\n}"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/DDDPPP.Chap20.CommandHandler.Application/Model/Baskets/Events/BasketPriceChanged.cs",
    "content": "﻿using System;\nusing Agathas.Storefront.Common;\nusing Agathas.Storefront.Infrastructure;\n\nnamespace Agathas.Storefront.Shopping.Baskets.Events\n{\n    public class BasketPriceChanged : IDomainEvent\n    {\n        public BasketPriceChanged(Guid basket_id, Money cost_of_basket, Money discount)\n        {\n            this.basket_id = basket_id;\n            CostOfBasket = cost_of_basket;\n            Discount = discount;\n        }\n\n        public Guid basket_id { get; private set; }\n        public Money CostOfBasket { get; private set; }\n        public Money Discount { get; private set; }\n    }\n}"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/DDDPPP.Chap20.CommandHandler.Application/Model/Baskets/Events/CouponNotApplicableForBasketItems.cs",
    "content": "﻿using Agathas.Storefront.Infrastructure;\n\nnamespace Agathas.Storefront.Shopping.Model.Baskets.Events\n{\n    public class CouponNotApplicableForBasketItems : IDomainEvent\n    {\n    }\n}"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/DDDPPP.Chap20.CommandHandler.Application/Model/Baskets/IBasketPricingService.cs",
    "content": "using System;\nusing System.Collections.Generic;\nusing Agathas.Storefront.Shopping.Model.Promotions;\n\nnamespace Agathas.Storefront.Shopping.Model.Baskets\n{\n    public interface IBasketPricingService\n    {\n        BasketPricingBreakdown calculate_total_price_for(IEnumerable<BasketItem> items, IEnumerable<Coupon> coupons );\n    }\n}"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/DDDPPP.Chap20.CommandHandler.Application/Model/Baskets/IBasketRepository.cs",
    "content": "﻿using System;\nusing Agathas.Storefront.Infrastructure;\n\nnamespace Agathas.Storefront.Shopping.Model.Baskets\n{\n    public interface IBasketRepository : IRepository<Basket, Guid>\n    {\n        //Basket find_by(int basketId);\n        //void add(Basket basket);\n    }\n}"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/DDDPPP.Chap20.CommandHandler.Application/Model/Baskets/NonNegativeQuantity.cs",
    "content": "﻿namespace Agathas.Storefront.Shopping.Model.Baskets\n{\n    public class NonNegativeQuantity\n    {\n        private int _value;\n\n        private NonNegativeQuantity() : this (0)\n        { }\n\n        public NonNegativeQuantity(int value)\n        {\n            // Check.IsGreaterThan(-1, value, () => { throw new ArgumentOutOfRangeException(); });\n            _value = value;\n        }\n        \n        public NonNegativeQuantity Add(NonNegativeQuantity quantity)\n        {\n            return new NonNegativeQuantity(_value + quantity._value);\n        }\n\n        public int value\n        {\n            get { return _value; }\n        }\n\n        public bool is_zero()\n        {\n            return _value == 0;\n        }\n    }\n}"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/DDDPPP.Chap20.CommandHandler.Application/Model/Baskets/ProductSnapshot.cs",
    "content": "﻿using Agathas.Storefront.Common;\n\nnamespace Agathas.Storefront.Shopping.Model.Baskets\n{\n    public class ProductSnapshot\n    {\n        private readonly int _id;\n        private Money _price;\n\n        private ProductSnapshot()\n        {\n        }\n\n        public ProductSnapshot(int id, Money price)\n        {\n            // TODO: Check for null values and invalid data\n            _id = id;\n            _price = price;\n        }\n\n        public Money price\n        {\n            get { return _price; }\n        }\n\n        public int id\n        {\n            get { return _id; }\n        }\n\n    }\n}"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/DDDPPP.Chap20.CommandHandler.Application/Model/Promotions/Coupon.cs",
    "content": "﻿namespace Agathas.Storefront.Shopping.Model.Promotions\n{\n    public class Coupon\n    {\n        public string code { get; set; }\n    }\n}"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/DDDPPP.Chap20.CommandHandler.Application/Model/Promotions/CouponIssues.cs",
    "content": "﻿namespace Agathas.Storefront.Shopping.Model.Promotions\n{\n    public enum CouponIssues\n    {\n        NotApplied = 0,\n        NoIssue = 1\n\n    }\n}\n"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/DDDPPP.Chap20.CommandHandler.Application/Model/Promotions/ICouponPolicy.cs",
    "content": "﻿namespace Agathas.Storefront.Shopping.Model.Promotions\n{\n    public interface ICouponPolicy\n    {\n    }\n}\n"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/DDDPPP.Chap20.CommandHandler.Application/Model/Promotions/IPromotionsRepository.cs",
    "content": "﻿using System;\nusing Agathas.Storefront.Infrastructure;\n\nnamespace Agathas.Storefront.Shopping.Model.Promotions\n{\n    public interface IPromotionsRepository : IRepository<Promotion, Guid>\n    {\n        Promotion find_by(string voucher_code);\n    }\n}"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/DDDPPP.Chap20.CommandHandler.Application/Model/Promotions/Promotion.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing Agathas.Storefront.Common;\nusing Agathas.Storefront.Shopping.Model.Baskets;\n\nnamespace Agathas.Storefront.Shopping.Model.Promotions\n{\n    public class Promotion\n    {\n        private readonly string _voucher_code;\n        private readonly Money _discount;\n        private readonly Money _threshold;       \n\n        private Promotion()\n        {\n        }\n\n        public Promotion(string voucher_code, Money discount, Money threshold)\n        {\n            // TODO: Check for null values and invalid data\n            _voucher_code = voucher_code;\n            _discount = discount;\n            _threshold = threshold;\n        }\n\n        public string id { get { return _voucher_code; } }        \n\n        public bool is_still_active()\n        {\n            return true;\n        }\n\n        public string voucher_code\n        {\n            get { return _voucher_code; }\n        }\n\n        public CouponIssues reason_why_cannot_be_applied_to(IEnumerable<BasketItem> items)\n        {\n            throw new NotImplementedException();\n        }\n\n        public Money calculate_discount_for(IEnumerable<BasketItem> items)\n        {\n            throw new NotImplementedException();\n        }\n\n        public bool is_applicable_for(IEnumerable<BasketItem> items)\n        {\n            return true;\n        }\n\n        public Coupon create_coupon_for(Guid basket_id)\n        {\n            return new Coupon();\n        }\n    }\n}"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/DDDPPP.Chap20.CommandHandler.Application/Model/Promotions/PromotionNotApplicableException.cs",
    "content": "﻿using Agathas.Storefront.Infrastructure;\n\nnamespace Agathas.Storefront.Shopping.Model.Promotions\n{\n    public class PromotionNotApplicableException : DomainException\n    {\n        public PromotionNotApplicableException(string message_for_customer) : base(message_for_customer)\n        {\n        }\n    }\n}\n"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/DDDPPP.Chap20.CommandHandler.Application/Properties/AssemblyInfo.cs",
    "content": "﻿using System.Reflection;\nusing System.Runtime.CompilerServices;\nusing System.Runtime.InteropServices;\n\n// General Information about an assembly is controlled through the following \n// set of attributes. Change these attribute values to modify the information\n// associated with an assembly.\n[assembly: AssemblyTitle(\"DDDPPP.Chap20.CommandHandler.Application\")]\n[assembly: AssemblyDescription(\"\")]\n[assembly: AssemblyConfiguration(\"\")]\n[assembly: AssemblyCompany(\"\")]\n[assembly: AssemblyProduct(\"DDDPPP.Chap20.CommandHandler.Application\")]\n[assembly: AssemblyCopyright(\"Copyright ©  2014\")]\n[assembly: AssemblyTrademark(\"\")]\n[assembly: AssemblyCulture(\"\")]\n\n// Setting ComVisible to false makes the types in this assembly not visible \n// to COM components.  If you need to access a type in this assembly from \n// COM, set the ComVisible attribute to true on that type.\n[assembly: ComVisible(false)]\n\n// The following GUID is for the ID of the typelib if this project is exposed to COM\n[assembly: Guid(\"85f84583-c892-4ebb-8cf1-ca2087e23f9e\")]\n\n// Version information for an assembly consists of the following four values:\n//\n//      Major Version\n//      Minor Version \n//      Build Number\n//      Revision\n//\n// You can specify all the values or you can default the Build and Revision Numbers \n// by using the '*' as shown below:\n// [assembly: AssemblyVersion(\"1.0.*\")]\n[assembly: AssemblyVersion(\"1.0.0.0\")]\n[assembly: AssemblyFileVersion(\"1.0.0.0\")]\n"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/DDDPPP.Chap20.CommandHandler.Presentation/Content/Site.css",
    "content": "﻿/*----------------------------------------------------------\nThe base color for this template is #5c87b2. If you'd like\nto use a different color start by replacing all instances of\n#5c87b2 with your new color.\n----------------------------------------------------------*/\nbody {\n    background-color: #5c87b2;\n    font-size: .85em;\n    font-family: \"Trebuchet MS\", Verdana, Helvetica, Sans-Serif;\n    margin: 0;\n    padding: 0;\n    color: #696969;\n}\n\na:link {\n    color: #034af3;\n    text-decoration: underline;\n}\n\na:visited {\n    color: #505abc;\n}\n\na:hover {\n    color: #1d60ff;\n    text-decoration: none;\n}\n\na:active {\n    color: #12eb87;\n}\n\np, ul {\n    margin-bottom: 20px;\n    line-height: 1.6em;\n}\n\nheader,\nfooter,\nnav,\nsection {\n    display: block;\n}\n\n/* HEADINGS   \n----------------------------------------------------------*/\nh1, h2, h3, h4, h5, h6 {\n    font-size: 1.5em;\n    color: #000;\n}\n\nh1 {\n    font-size: 2em;\n    padding-bottom: 0;\n    margin-bottom: 0;\n}\n\nh2 {\n    padding: 0 0 10px 0;\n}\n\nh3 {\n    font-size: 1.2em;\n}\n\nh4 {\n    font-size: 1.1em;\n}\n\nh5, h6 {\n    font-size: 1em;\n}\n\n/* PRIMARY LAYOUT ELEMENTS   \n----------------------------------------------------------*/\n\n/* you can specify a greater or lesser percentage for the \npage width. Or, you can specify an exact pixel width. */\n.page {\n    width: 90%;\n    margin-left: auto;\n    margin-right: auto;\n}\n\nheader, #header {\n    position: relative;\n    margin-bottom: 0px;\n    color: #000;\n    padding: 0;\n}\n\nheader h1, #header h1 {\n    font-weight: bold;\n    padding: 5px 0;\n    margin: 0;\n    color: #fff;\n    border: none;\n    line-height: 2em;\n    font-size: 32px !important;\n    text-shadow: 1px 1px 2px #111;\n}\n\n#main {\n    padding: 30px 30px 15px 30px;\n    background-color: #fff;\n    -webkit-border-radius: 4px 0 0 0;\n    -moz-border-radius: 4px 0 0 0;\n    border-radius: 4px 0 0 0;\n}\n\nfooter, \n#footer {\n    background-color: #fff;\n    color: #999;\n    padding: 10px 0;\n    text-align: center;\n    line-height: normal;\n    margin: 0 0 30px 0;\n    font-size: .9em;\n    -webkit-border-radius: 0 0 4px 4px;\n    -moz-border-radius: 0 0 4px 4px;\n    border-radius: 0 0 4px 4px;\n}\n\n/* TAB MENU   \n----------------------------------------------------------*/\nul#menu {\n    border-bottom: 1px #5C87B2 solid;\n    padding: 0 0 2px;\n    position: relative;\n    margin: 0;\n    text-align: right;\n}\n\nul#menu li {\n    display: inline;\n    list-style: none;\n}\n\nul#menu li#greeting {\n    padding: 10px 20px;\n    font-weight: bold;\n    text-decoration: none;\n    line-height: 2.8em;\n    color: #fff;\n}\n\nul#menu li a {\n    padding: 10px 20px;\n    font-weight: bold;\n    text-decoration: none;\n    line-height: 2.8em;\n    background-color: #e8eef4;\n    color: #034af3;\n    -webkit-border-radius: 4px 4px 0 0;\n    -moz-border-radius: 4px 4px 0 0;\n    border-radius: 4px 4px 0 0;\n}\n\nul#menu li a:hover {\n    background-color: #fff;\n    text-decoration: none;\n}\n\nul#menu li a:active {\n    background-color: #a6e2a6;\n    text-decoration: none;\n}\n\nul#menu li.selected a {\n    background-color: #fff;\n    color: #000;\n}\n\n/* FORM LAYOUT ELEMENTS   \n----------------------------------------------------------*/\n\nfieldset {\n    border: 1px solid #ddd;\n    padding: 0 1.4em 1.4em 1.4em;\n    margin: 0 0 1.5em 0;\n}\n\nlegend {\n    font-size: 1.2em;\n    font-weight: bold;\n}\n\ntextarea {\n    min-height: 75px;\n}\n\ninput[type=\"text\"], \ninput[type=\"password\"] {\n    border: 1px solid #ccc;\n    padding: 2px;\n    font-size: 1.2em;\n    color: #444;\n    width: 200px;\n}\n\nselect {\n    border: 1px solid #ccc;\n    padding: 2px;\n    font-size: 1.2em;\n    color: #444;\n}\n\ninput[type=\"submit\"] {\n    font-size: 1.2em;\n    padding: 5px;\n}\n\n/* TABLE\n----------------------------------------------------------*/\n\ntable {\n    border: solid 1px #e8eef4;\n    border-collapse: collapse;\n}\n\ntable td {\n    padding: 5px;\n    border: solid 1px #e8eef4;\n}\n\ntable th {\n    padding: 6px 5px;\n    text-align: left;\n    background-color: #e8eef4;\n    border: solid 1px #e8eef4;\n}\n\n/* MISC  \n----------------------------------------------------------*/\n.clear {\n    clear: both;\n}\n\n.error {\n    color: Red;\n}\n\nnav, \n#menucontainer {\n    margin-top: 40px;\n}\n\ndiv#title {\n    display: block;\n    float: left;\n    text-align: left;\n}\n\n#logindisplay {\n    font-size: 1.1em;\n    display: block;\n    text-align: right;\n    margin: 10px;\n    color: White;\n}\n\n#logindisplay a:link {\n    color: white;\n    text-decoration: underline;\n}\n\n#logindisplay a:visited {\n    color: white;\n    text-decoration: underline;\n}\n\n#logindisplay a:hover {\n    color: white;\n    text-decoration: none;\n}\n\n/* Styles for validation helpers\n-----------------------------------------------------------*/\n.field-validation-error {\n    color: #ff0000;\n}\n\n.field-validation-valid {\n    display: none;\n}\n\n.input-validation-error {\n    border: 1px solid #ff0000;\n    background-color: #ffeeee;\n}\n\n.validation-summary-errors {\n    font-weight: bold;\n    color: #ff0000;\n}\n\n.validation-summary-valid {\n    display: none;\n}\n\n/* Styles for editor and display helpers\n----------------------------------------------------------*/\n.display-label, \n.editor-label {\n    margin: 1em 0 0 0;\n}\n\n.display-field, \n.editor-field {\n    margin: 0.5em 0 0 0;\n}\n\n.text-box {\n    width: 30em;\n}\n\n.text-box.multi-line {\n    height: 6.5em;\n}\n\n.tri-state {\n    width: 6em;\n}\n"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/DDDPPP.Chap20.CommandHandler.Presentation/Content/themes/base/jquery-ui.css",
    "content": "/*! jQuery UI - v1.8.20 - 2012-04-30\n* https://github.com/jquery/jquery-ui\n* Includes: jquery.ui.core.css, jquery.ui.accordion.css, jquery.ui.autocomplete.css, jquery.ui.button.css, jquery.ui.datepicker.css, jquery.ui.dialog.css, jquery.ui.progressbar.css, jquery.ui.resizable.css, jquery.ui.selectable.css, jquery.ui.slider.css, jquery.ui.tabs.css, jquery.ui.theme.css\n* Copyright (c) 2012 AUTHORS.txt; Licensed MIT */\n\n/* Layout helpers\n----------------------------------*/\n.ui-helper-hidden { display: none; }\n.ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); }\n.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; }\n.ui-helper-clearfix:before, .ui-helper-clearfix:after { content: \"\"; display: table; }\n.ui-helper-clearfix:after { clear: both; }\n.ui-helper-clearfix { zoom: 1; }\n.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); }\n\n\n/* Interaction Cues\n----------------------------------*/\n.ui-state-disabled { cursor: default !important; }\n\n\n/* Icons\n----------------------------------*/\n\n/* states and images */\n.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; }\n\n\n/* Misc visuals\n----------------------------------*/\n\n/* Overlays */\n.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }\n\n/* IE/Win - Fix animation bug - #4615 */\n.ui-accordion { width: 100%; }\n.ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; }\n.ui-accordion .ui-accordion-li-fix { display: inline; }\n.ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; }\n.ui-accordion .ui-accordion-header a { display: block; font-size: 1em; padding: .5em .5em .5em .7em; }\n.ui-accordion-icons .ui-accordion-header a { padding-left: 2.2em; }\n.ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; }\n.ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; zoom: 1; }\n.ui-accordion .ui-accordion-content-active { display: block; }\n\n.ui-autocomplete { position: absolute; cursor: default; }\t\n\n/* workarounds */\n* html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */\n\n/*\n * jQuery UI Menu 1.8.20\n *\n * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)\n * Dual licensed under the MIT or GPL Version 2 licenses.\n * http://jquery.org/license\n *\n * http://docs.jquery.com/UI/Menu#theming\n */\n.ui-menu {\n\tlist-style:none;\n\tpadding: 2px;\n\tmargin: 0;\n\tdisplay:block;\n\tfloat: left;\n}\n.ui-menu .ui-menu {\n\tmargin-top: -3px;\n}\n.ui-menu .ui-menu-item {\n\tmargin:0;\n\tpadding: 0;\n\tzoom: 1;\n\tfloat: left;\n\tclear: left;\n\twidth: 100%;\n}\n.ui-menu .ui-menu-item a {\n\ttext-decoration:none;\n\tdisplay:block;\n\tpadding:.2em .4em;\n\tline-height:1.5;\n\tzoom:1;\n}\n.ui-menu .ui-menu-item a.ui-state-hover,\n.ui-menu .ui-menu-item a.ui-state-active {\n\tfont-weight: normal;\n\tmargin: -1px;\n}\n\n.ui-button { display: inline-block; position: relative; padding: 0; margin-right: .1em; text-decoration: none !important; cursor: pointer; text-align: center; zoom: 1; overflow: visible; } /* the overflow property removes extra width in IE */\n.ui-button-icon-only { width: 2.2em; } /* to make room for the icon, a width needs to be set here */\nbutton.ui-button-icon-only { width: 2.4em; } /* button elements seem to need a little more width */\n.ui-button-icons-only { width: 3.4em; } \nbutton.ui-button-icons-only { width: 3.7em; } \n\n/*button text element */\n.ui-button .ui-button-text { display: block; line-height: 1.4;  }\n.ui-button-text-only .ui-button-text { padding: .4em 1em; }\n.ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text { padding: .4em; text-indent: -9999999px; }\n.ui-button-text-icon-primary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 1em .4em 2.1em; }\n.ui-button-text-icon-secondary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 2.1em .4em 1em; }\n.ui-button-text-icons .ui-button-text { padding-left: 2.1em; padding-right: 2.1em; }\n/* no icon support for input elements, provide padding by default */\ninput.ui-button { padding: .4em 1em; }\n\n/*button icon element(s) */\n.ui-button-icon-only .ui-icon, .ui-button-text-icon-primary .ui-icon, .ui-button-text-icon-secondary .ui-icon, .ui-button-text-icons .ui-icon, .ui-button-icons-only .ui-icon { position: absolute; top: 50%; margin-top: -8px; }\n.ui-button-icon-only .ui-icon { left: 50%; margin-left: -8px; }\n.ui-button-text-icon-primary .ui-button-icon-primary, .ui-button-text-icons .ui-button-icon-primary, .ui-button-icons-only .ui-button-icon-primary { left: .5em; }\n.ui-button-text-icon-secondary .ui-button-icon-secondary, .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }\n.ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }\n\n/*button sets*/\n.ui-buttonset { margin-right: 7px; }\n.ui-buttonset .ui-button { margin-left: 0; margin-right: -.3em; }\n\n/* workarounds */\nbutton.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra padding in Firefox */\n\n.ui-datepicker { width: 17em; padding: .2em .2em 0; display: none; }\n.ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; }\n.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; }\n.ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; }\n.ui-datepicker .ui-datepicker-prev { left:2px; }\n.ui-datepicker .ui-datepicker-next { right:2px; }\n.ui-datepicker .ui-datepicker-prev-hover { left:1px; }\n.ui-datepicker .ui-datepicker-next-hover { right:1px; }\n.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px;  }\n.ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; }\n.ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; }\n.ui-datepicker select.ui-datepicker-month-year {width: 100%;}\n.ui-datepicker select.ui-datepicker-month, \n.ui-datepicker select.ui-datepicker-year { width: 49%;}\n.ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; }\n.ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0;  }\n.ui-datepicker td { border: 0; padding: 1px; }\n.ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; }\n.ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; }\n.ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; }\n.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; }\n\n/* with multiple calendars */\n.ui-datepicker.ui-datepicker-multi { width:auto; }\n.ui-datepicker-multi .ui-datepicker-group { float:left; }\n.ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; }\n.ui-datepicker-multi-2 .ui-datepicker-group { width:50%; }\n.ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; }\n.ui-datepicker-multi-4 .ui-datepicker-group { width:25%; }\n.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; }\n.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; }\n.ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; }\n.ui-datepicker-row-break { clear:both; width:100%; font-size:0em; }\n\n/* RTL support */\n.ui-datepicker-rtl { direction: rtl; }\n.ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; }\n.ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; }\n.ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; }\n.ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; }\n.ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; }\n.ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; }\n.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; }\n.ui-datepicker-rtl .ui-datepicker-group { float:right; }\n.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; }\n.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; }\n\n/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */\n.ui-datepicker-cover {\n    display: none; /*sorry for IE5*/\n    display/**/: block; /*sorry for IE5*/\n    position: absolute; /*must have*/\n    z-index: -1; /*must have*/\n    filter: mask(); /*must have*/\n    top: -4px; /*must have*/\n    left: -4px; /*must have*/\n    width: 200px; /*must have*/\n    height: 200px; /*must have*/\n}\n.ui-dialog { position: absolute; padding: .2em; width: 300px; overflow: hidden; }\n.ui-dialog .ui-dialog-titlebar { padding: .4em 1em; position: relative;  }\n.ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .1em 0; } \n.ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; }\n.ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; }\n.ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; }\n.ui-dialog .ui-dialog-content { position: relative; border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; }\n.ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; }\n.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { float: right; }\n.ui-dialog .ui-dialog-buttonpane button { margin: .5em .4em .5em 0; cursor: pointer; }\n.ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; }\n.ui-draggable .ui-dialog-titlebar { cursor: move; }\n\n.ui-progressbar { height:2em; text-align: left; overflow: hidden; }\n.ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; }\n.ui-resizable { position: relative;}\n.ui-resizable-handle { position: absolute;font-size: 0.1px; display: block; }\n.ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; }\n.ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0; }\n.ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0; }\n.ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0; height: 100%; }\n.ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0; height: 100%; }\n.ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; }\n.ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; }\n.ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; }\n.ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;}\n.ui-selectable-helper { position: absolute; z-index: 100; border:1px dotted black; }\n\n.ui-slider { position: relative; text-align: left; }\n.ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; }\n.ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; }\n\n.ui-slider-horizontal { height: .8em; }\n.ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; }\n.ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; }\n.ui-slider-horizontal .ui-slider-range-min { left: 0; }\n.ui-slider-horizontal .ui-slider-range-max { right: 0; }\n\n.ui-slider-vertical { width: .8em; height: 100px; }\n.ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; }\n.ui-slider-vertical .ui-slider-range { left: 0; width: 100%; }\n.ui-slider-vertical .ui-slider-range-min { bottom: 0; }\n.ui-slider-vertical .ui-slider-range-max { top: 0; }\n.ui-tabs { position: relative; padding: .2em; zoom: 1; } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as \"fixed\") */\n.ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; }\n.ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 1px; margin: 0 .2em 1px 0; border-bottom: 0 !important; padding: 0; white-space: nowrap; }\n.ui-tabs .ui-tabs-nav li a { float: left; padding: .5em 1em; text-decoration: none; }\n.ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: 0; padding-bottom: 1px; }\n.ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; }\n.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */\n.ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 1em 1.4em; background: none; }\n.ui-tabs .ui-tabs-hide { display: none !important; }\n\n/* Component containers\n----------------------------------*/\n.ui-widget { font-family: Verdana,Arial,sans-serif/*{ffDefault}*/; font-size: 1.1em/*{fsDefault}*/; }\n.ui-widget .ui-widget { font-size: 1em; }\n.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Verdana,Arial,sans-serif/*{ffDefault}*/; font-size: 1em; }\n.ui-widget-content { border: 1px solid #aaaaaa/*{borderColorContent}*/; background: #ffffff/*{bgColorContent}*/ url(images/ui-bg_flat_75_ffffff_40x100.png)/*{bgImgUrlContent}*/ 50%/*{bgContentXPos}*/ 50%/*{bgContentYPos}*/ repeat-x/*{bgContentRepeat}*/; color: #222222/*{fcContent}*/; }\n.ui-widget-content a { color: #222222/*{fcContent}*/; }\n.ui-widget-header { border: 1px solid #aaaaaa/*{borderColorHeader}*/; background: #cccccc/*{bgColorHeader}*/ url(images/ui-bg_highlight-soft_75_cccccc_1x100.png)/*{bgImgUrlHeader}*/ 50%/*{bgHeaderXPos}*/ 50%/*{bgHeaderYPos}*/ repeat-x/*{bgHeaderRepeat}*/; color: #222222/*{fcHeader}*/; font-weight: bold; }\n.ui-widget-header a { color: #222222/*{fcHeader}*/; }\n\n/* Interaction states\n----------------------------------*/\n.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #d3d3d3/*{borderColorDefault}*/; background: #e6e6e6/*{bgColorDefault}*/ url(images/ui-bg_glass_75_e6e6e6_1x400.png)/*{bgImgUrlDefault}*/ 50%/*{bgDefaultXPos}*/ 50%/*{bgDefaultYPos}*/ repeat-x/*{bgDefaultRepeat}*/; font-weight: normal/*{fwDefault}*/; color: #555555/*{fcDefault}*/; }\n.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #555555/*{fcDefault}*/; text-decoration: none; }\n.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #999999/*{borderColorHover}*/; background: #dadada/*{bgColorHover}*/ url(images/ui-bg_glass_75_dadada_1x400.png)/*{bgImgUrlHover}*/ 50%/*{bgHoverXPos}*/ 50%/*{bgHoverYPos}*/ repeat-x/*{bgHoverRepeat}*/; font-weight: normal/*{fwDefault}*/; color: #212121/*{fcHover}*/; }\n.ui-state-hover a, .ui-state-hover a:hover { color: #212121/*{fcHover}*/; text-decoration: none; }\n.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #aaaaaa/*{borderColorActive}*/; background: #ffffff/*{bgColorActive}*/ url(images/ui-bg_glass_65_ffffff_1x400.png)/*{bgImgUrlActive}*/ 50%/*{bgActiveXPos}*/ 50%/*{bgActiveYPos}*/ repeat-x/*{bgActiveRepeat}*/; font-weight: normal/*{fwDefault}*/; color: #212121/*{fcActive}*/; }\n.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #212121/*{fcActive}*/; text-decoration: none; }\n.ui-widget :active { outline: none; }\n\n/* Interaction Cues\n----------------------------------*/\n.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight  {border: 1px solid #fcefa1/*{borderColorHighlight}*/; background: #fbf9ee/*{bgColorHighlight}*/ url(images/ui-bg_glass_55_fbf9ee_1x400.png)/*{bgImgUrlHighlight}*/ 50%/*{bgHighlightXPos}*/ 50%/*{bgHighlightYPos}*/ repeat-x/*{bgHighlightRepeat}*/; color: #363636/*{fcHighlight}*/; }\n.ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636/*{fcHighlight}*/; }\n.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a/*{borderColorError}*/; background: #fef1ec/*{bgColorError}*/ url(images/ui-bg_glass_95_fef1ec_1x400.png)/*{bgImgUrlError}*/ 50%/*{bgErrorXPos}*/ 50%/*{bgErrorYPos}*/ repeat-x/*{bgErrorRepeat}*/; color: #cd0a0a/*{fcError}*/; }\n.ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #cd0a0a/*{fcError}*/; }\n.ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #cd0a0a/*{fcError}*/; }\n.ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; }\n.ui-priority-secondary, .ui-widget-content .ui-priority-secondary,  .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; }\n.ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; }\n\n/* Icons\n----------------------------------*/\n\n/* states and images */\n.ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_222222_256x240.png)/*{iconsContent}*/; }\n.ui-widget-content .ui-icon {background-image: url(images/ui-icons_222222_256x240.png)/*{iconsContent}*/; }\n.ui-widget-header .ui-icon {background-image: url(images/ui-icons_222222_256x240.png)/*{iconsHeader}*/; }\n.ui-state-default .ui-icon { background-image: url(images/ui-icons_888888_256x240.png)/*{iconsDefault}*/; }\n.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_454545_256x240.png)/*{iconsHover}*/; }\n.ui-state-active .ui-icon {background-image: url(images/ui-icons_454545_256x240.png)/*{iconsActive}*/; }\n.ui-state-highlight .ui-icon {background-image: url(images/ui-icons_2e83ff_256x240.png)/*{iconsHighlight}*/; }\n.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_cd0a0a_256x240.png)/*{iconsError}*/; }\n\n/* positioning */\n.ui-icon-carat-1-n { background-position: 0 0; }\n.ui-icon-carat-1-ne { background-position: -16px 0; }\n.ui-icon-carat-1-e { background-position: -32px 0; }\n.ui-icon-carat-1-se { background-position: -48px 0; }\n.ui-icon-carat-1-s { background-position: -64px 0; }\n.ui-icon-carat-1-sw { background-position: -80px 0; }\n.ui-icon-carat-1-w { background-position: -96px 0; }\n.ui-icon-carat-1-nw { background-position: -112px 0; }\n.ui-icon-carat-2-n-s { background-position: -128px 0; }\n.ui-icon-carat-2-e-w { background-position: -144px 0; }\n.ui-icon-triangle-1-n { background-position: 0 -16px; }\n.ui-icon-triangle-1-ne { background-position: -16px -16px; }\n.ui-icon-triangle-1-e { background-position: -32px -16px; }\n.ui-icon-triangle-1-se { background-position: -48px -16px; }\n.ui-icon-triangle-1-s { background-position: -64px -16px; }\n.ui-icon-triangle-1-sw { background-position: -80px -16px; }\n.ui-icon-triangle-1-w { background-position: -96px -16px; }\n.ui-icon-triangle-1-nw { background-position: -112px -16px; }\n.ui-icon-triangle-2-n-s { background-position: -128px -16px; }\n.ui-icon-triangle-2-e-w { background-position: -144px -16px; }\n.ui-icon-arrow-1-n { background-position: 0 -32px; }\n.ui-icon-arrow-1-ne { background-position: -16px -32px; }\n.ui-icon-arrow-1-e { background-position: -32px -32px; }\n.ui-icon-arrow-1-se { background-position: -48px -32px; }\n.ui-icon-arrow-1-s { background-position: -64px -32px; }\n.ui-icon-arrow-1-sw { background-position: -80px -32px; }\n.ui-icon-arrow-1-w { background-position: -96px -32px; }\n.ui-icon-arrow-1-nw { background-position: -112px -32px; }\n.ui-icon-arrow-2-n-s { background-position: -128px -32px; }\n.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }\n.ui-icon-arrow-2-e-w { background-position: -160px -32px; }\n.ui-icon-arrow-2-se-nw { background-position: -176px -32px; }\n.ui-icon-arrowstop-1-n { background-position: -192px -32px; }\n.ui-icon-arrowstop-1-e { background-position: -208px -32px; }\n.ui-icon-arrowstop-1-s { background-position: -224px -32px; }\n.ui-icon-arrowstop-1-w { background-position: -240px -32px; }\n.ui-icon-arrowthick-1-n { background-position: 0 -48px; }\n.ui-icon-arrowthick-1-ne { background-position: -16px -48px; }\n.ui-icon-arrowthick-1-e { background-position: -32px -48px; }\n.ui-icon-arrowthick-1-se { background-position: -48px -48px; }\n.ui-icon-arrowthick-1-s { background-position: -64px -48px; }\n.ui-icon-arrowthick-1-sw { background-position: -80px -48px; }\n.ui-icon-arrowthick-1-w { background-position: -96px -48px; }\n.ui-icon-arrowthick-1-nw { background-position: -112px -48px; }\n.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }\n.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }\n.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }\n.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }\n.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }\n.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }\n.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }\n.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }\n.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }\n.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }\n.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }\n.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }\n.ui-icon-arrowreturn-1-w { background-position: -64px -64px; }\n.ui-icon-arrowreturn-1-n { background-position: -80px -64px; }\n.ui-icon-arrowreturn-1-e { background-position: -96px -64px; }\n.ui-icon-arrowreturn-1-s { background-position: -112px -64px; }\n.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }\n.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }\n.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }\n.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }\n.ui-icon-arrow-4 { background-position: 0 -80px; }\n.ui-icon-arrow-4-diag { background-position: -16px -80px; }\n.ui-icon-extlink { background-position: -32px -80px; }\n.ui-icon-newwin { background-position: -48px -80px; }\n.ui-icon-refresh { background-position: -64px -80px; }\n.ui-icon-shuffle { background-position: -80px -80px; }\n.ui-icon-transfer-e-w { background-position: -96px -80px; }\n.ui-icon-transferthick-e-w { background-position: -112px -80px; }\n.ui-icon-folder-collapsed { background-position: 0 -96px; }\n.ui-icon-folder-open { background-position: -16px -96px; }\n.ui-icon-document { background-position: -32px -96px; }\n.ui-icon-document-b { background-position: -48px -96px; }\n.ui-icon-note { background-position: -64px -96px; }\n.ui-icon-mail-closed { background-position: -80px -96px; }\n.ui-icon-mail-open { background-position: -96px -96px; }\n.ui-icon-suitcase { background-position: -112px -96px; }\n.ui-icon-comment { background-position: -128px -96px; }\n.ui-icon-person { background-position: -144px -96px; }\n.ui-icon-print { background-position: -160px -96px; }\n.ui-icon-trash { background-position: -176px -96px; }\n.ui-icon-locked { background-position: -192px -96px; }\n.ui-icon-unlocked { background-position: -208px -96px; }\n.ui-icon-bookmark { background-position: -224px -96px; }\n.ui-icon-tag { background-position: -240px -96px; }\n.ui-icon-home { background-position: 0 -112px; }\n.ui-icon-flag { background-position: -16px -112px; }\n.ui-icon-calendar { background-position: -32px -112px; }\n.ui-icon-cart { background-position: -48px -112px; }\n.ui-icon-pencil { background-position: -64px -112px; }\n.ui-icon-clock { background-position: -80px -112px; }\n.ui-icon-disk { background-position: -96px -112px; }\n.ui-icon-calculator { background-position: -112px -112px; }\n.ui-icon-zoomin { background-position: -128px -112px; }\n.ui-icon-zoomout { background-position: -144px -112px; }\n.ui-icon-search { background-position: -160px -112px; }\n.ui-icon-wrench { background-position: -176px -112px; }\n.ui-icon-gear { background-position: -192px -112px; }\n.ui-icon-heart { background-position: -208px -112px; }\n.ui-icon-star { background-position: -224px -112px; }\n.ui-icon-link { background-position: -240px -112px; }\n.ui-icon-cancel { background-position: 0 -128px; }\n.ui-icon-plus { background-position: -16px -128px; }\n.ui-icon-plusthick { background-position: -32px -128px; }\n.ui-icon-minus { background-position: -48px -128px; }\n.ui-icon-minusthick { background-position: -64px -128px; }\n.ui-icon-close { background-position: -80px -128px; }\n.ui-icon-closethick { background-position: -96px -128px; }\n.ui-icon-key { background-position: -112px -128px; }\n.ui-icon-lightbulb { background-position: -128px -128px; }\n.ui-icon-scissors { background-position: -144px -128px; }\n.ui-icon-clipboard { background-position: -160px -128px; }\n.ui-icon-copy { background-position: -176px -128px; }\n.ui-icon-contact { background-position: -192px -128px; }\n.ui-icon-image { background-position: -208px -128px; }\n.ui-icon-video { background-position: -224px -128px; }\n.ui-icon-script { background-position: -240px -128px; }\n.ui-icon-alert { background-position: 0 -144px; }\n.ui-icon-info { background-position: -16px -144px; }\n.ui-icon-notice { background-position: -32px -144px; }\n.ui-icon-help { background-position: -48px -144px; }\n.ui-icon-check { background-position: -64px -144px; }\n.ui-icon-bullet { background-position: -80px -144px; }\n.ui-icon-radio-off { background-position: -96px -144px; }\n.ui-icon-radio-on { background-position: -112px -144px; }\n.ui-icon-pin-w { background-position: -128px -144px; }\n.ui-icon-pin-s { background-position: -144px -144px; }\n.ui-icon-play { background-position: 0 -160px; }\n.ui-icon-pause { background-position: -16px -160px; }\n.ui-icon-seek-next { background-position: -32px -160px; }\n.ui-icon-seek-prev { background-position: -48px -160px; }\n.ui-icon-seek-end { background-position: -64px -160px; }\n.ui-icon-seek-start { background-position: -80px -160px; }\n/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */\n.ui-icon-seek-first { background-position: -80px -160px; }\n.ui-icon-stop { background-position: -96px -160px; }\n.ui-icon-eject { background-position: -112px -160px; }\n.ui-icon-volume-off { background-position: -128px -160px; }\n.ui-icon-volume-on { background-position: -144px -160px; }\n.ui-icon-power { background-position: 0 -176px; }\n.ui-icon-signal-diag { background-position: -16px -176px; }\n.ui-icon-signal { background-position: -32px -176px; }\n.ui-icon-battery-0 { background-position: -48px -176px; }\n.ui-icon-battery-1 { background-position: -64px -176px; }\n.ui-icon-battery-2 { background-position: -80px -176px; }\n.ui-icon-battery-3 { background-position: -96px -176px; }\n.ui-icon-circle-plus { background-position: 0 -192px; }\n.ui-icon-circle-minus { background-position: -16px -192px; }\n.ui-icon-circle-close { background-position: -32px -192px; }\n.ui-icon-circle-triangle-e { background-position: -48px -192px; }\n.ui-icon-circle-triangle-s { background-position: -64px -192px; }\n.ui-icon-circle-triangle-w { background-position: -80px -192px; }\n.ui-icon-circle-triangle-n { background-position: -96px -192px; }\n.ui-icon-circle-arrow-e { background-position: -112px -192px; }\n.ui-icon-circle-arrow-s { background-position: -128px -192px; }\n.ui-icon-circle-arrow-w { background-position: -144px -192px; }\n.ui-icon-circle-arrow-n { background-position: -160px -192px; }\n.ui-icon-circle-zoomin { background-position: -176px -192px; }\n.ui-icon-circle-zoomout { background-position: -192px -192px; }\n.ui-icon-circle-check { background-position: -208px -192px; }\n.ui-icon-circlesmall-plus { background-position: 0 -208px; }\n.ui-icon-circlesmall-minus { background-position: -16px -208px; }\n.ui-icon-circlesmall-close { background-position: -32px -208px; }\n.ui-icon-squaresmall-plus { background-position: -48px -208px; }\n.ui-icon-squaresmall-minus { background-position: -64px -208px; }\n.ui-icon-squaresmall-close { background-position: -80px -208px; }\n.ui-icon-grip-dotted-vertical { background-position: 0 -224px; }\n.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }\n.ui-icon-grip-solid-vertical { background-position: -32px -224px; }\n.ui-icon-grip-solid-horizontal { background-position: -48px -224px; }\n.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }\n.ui-icon-grip-diagonal-se { background-position: -80px -224px; }\n\n\n/* Misc visuals\n----------------------------------*/\n\n/* Corner radius */\n.ui-corner-all, .ui-corner-top, .ui-corner-left, .ui-corner-tl { -moz-border-radius-topleft: 4px/*{cornerRadius}*/; -webkit-border-top-left-radius: 4px/*{cornerRadius}*/; -khtml-border-top-left-radius: 4px/*{cornerRadius}*/; border-top-left-radius: 4px/*{cornerRadius}*/; }\n.ui-corner-all, .ui-corner-top, .ui-corner-right, .ui-corner-tr { -moz-border-radius-topright: 4px/*{cornerRadius}*/; -webkit-border-top-right-radius: 4px/*{cornerRadius}*/; -khtml-border-top-right-radius: 4px/*{cornerRadius}*/; border-top-right-radius: 4px/*{cornerRadius}*/; }\n.ui-corner-all, .ui-corner-bottom, .ui-corner-left, .ui-corner-bl { -moz-border-radius-bottomleft: 4px/*{cornerRadius}*/; -webkit-border-bottom-left-radius: 4px/*{cornerRadius}*/; -khtml-border-bottom-left-radius: 4px/*{cornerRadius}*/; border-bottom-left-radius: 4px/*{cornerRadius}*/; }\n.ui-corner-all, .ui-corner-bottom, .ui-corner-right, .ui-corner-br { -moz-border-radius-bottomright: 4px/*{cornerRadius}*/; -webkit-border-bottom-right-radius: 4px/*{cornerRadius}*/; -khtml-border-bottom-right-radius: 4px/*{cornerRadius}*/; border-bottom-right-radius: 4px/*{cornerRadius}*/; }\n\n/* Overlays */\n.ui-widget-overlay { background: #aaaaaa/*{bgColorOverlay}*/ url(images/ui-bg_flat_0_aaaaaa_40x100.png)/*{bgImgUrlOverlay}*/ 50%/*{bgOverlayXPos}*/ 50%/*{bgOverlayYPos}*/ repeat-x/*{bgOverlayRepeat}*/; opacity: .3;filter:Alpha(Opacity=30)/*{opacityOverlay}*/; }\n.ui-widget-shadow { margin: -8px/*{offsetTopShadow}*/ 0 0 -8px/*{offsetLeftShadow}*/; padding: 8px/*{thicknessShadow}*/; background: #aaaaaa/*{bgColorShadow}*/ url(images/ui-bg_flat_0_aaaaaa_40x100.png)/*{bgImgUrlShadow}*/ 50%/*{bgShadowXPos}*/ 50%/*{bgShadowYPos}*/ repeat-x/*{bgShadowRepeat}*/; opacity: .3;filter:Alpha(Opacity=30)/*{opacityShadow}*/; -moz-border-radius: 8px/*{cornerRadiusShadow}*/; -khtml-border-radius: 8px/*{cornerRadiusShadow}*/; -webkit-border-radius: 8px/*{cornerRadiusShadow}*/; border-radius: 8px/*{cornerRadiusShadow}*/; }"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/DDDPPP.Chap20.CommandHandler.Presentation/Content/themes/base/jquery.ui.accordion.css",
    "content": "/*!\n * jQuery UI Accordion 1.8.20\n *\n * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)\n * Licensed under the MIT license.\n * http://jquery.org/license\n *\n * http://docs.jquery.com/UI/Accordion#theming\n */\n/* IE/Win - Fix animation bug - #4615 */\n.ui-accordion { width: 100%; }\n.ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; }\n.ui-accordion .ui-accordion-li-fix { display: inline; }\n.ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; }\n.ui-accordion .ui-accordion-header a { display: block; font-size: 1em; padding: .5em .5em .5em .7em; }\n.ui-accordion-icons .ui-accordion-header a { padding-left: 2.2em; }\n.ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; }\n.ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; zoom: 1; }\n.ui-accordion .ui-accordion-content-active { display: block; }\n"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/DDDPPP.Chap20.CommandHandler.Presentation/Content/themes/base/jquery.ui.all.css",
    "content": "/*!\n * jQuery UI CSS Framework 1.8.20\n *\n * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)\n * Licensed under the MIT license.\n * http://jquery.org/license\n *\n * http://docs.jquery.com/UI/Theming\n */\n@import \"jquery.ui.base.css\";\n@import \"jquery.ui.theme.css\";\n"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/DDDPPP.Chap20.CommandHandler.Presentation/Content/themes/base/jquery.ui.autocomplete.css",
    "content": "/*!\n * jQuery UI Autocomplete 1.8.20\n *\n * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)\n * Licensed under the MIT license.\n * http://jquery.org/license\n *\n * http://docs.jquery.com/UI/Autocomplete#theming\n */\n.ui-autocomplete { position: absolute; cursor: default; }\t\n\n/* workarounds */\n* html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */\n\n/*\n * jQuery UI Menu 1.8.20\n *\n * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)\n * Licensed under the MIT license.\n * http://jquery.org/license\n *\n * http://docs.jquery.com/UI/Menu#theming\n */\n.ui-menu {\n\tlist-style:none;\n\tpadding: 2px;\n\tmargin: 0;\n\tdisplay:block;\n\tfloat: left;\n}\n.ui-menu .ui-menu {\n\tmargin-top: -3px;\n}\n.ui-menu .ui-menu-item {\n\tmargin:0;\n\tpadding: 0;\n\tzoom: 1;\n\tfloat: left;\n\tclear: left;\n\twidth: 100%;\n}\n.ui-menu .ui-menu-item a {\n\ttext-decoration:none;\n\tdisplay:block;\n\tpadding:.2em .4em;\n\tline-height:1.5;\n\tzoom:1;\n}\n.ui-menu .ui-menu-item a.ui-state-hover,\n.ui-menu .ui-menu-item a.ui-state-active {\n\tfont-weight: normal;\n\tmargin: -1px;\n}\n"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/DDDPPP.Chap20.CommandHandler.Presentation/Content/themes/base/jquery.ui.base.css",
    "content": "/*!\n * jQuery UI CSS Framework 1.8.20\n *\n * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)\n * Licensed under the MIT license.\n * http://jquery.org/license\n *\n * http://docs.jquery.com/UI/Theming\n */\n@import url(\"jquery.ui.core.css\");\n\n@import url(\"jquery.ui.accordion.css\");\n@import url(\"jquery.ui.autocomplete.css\");\n@import url(\"jquery.ui.button.css\");\n@import url(\"jquery.ui.datepicker.css\");\n@import url(\"jquery.ui.dialog.css\");\n@import url(\"jquery.ui.progressbar.css\");\n@import url(\"jquery.ui.resizable.css\");\n@import url(\"jquery.ui.selectable.css\");\n@import url(\"jquery.ui.slider.css\");\n@import url(\"jquery.ui.tabs.css\");\n"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/DDDPPP.Chap20.CommandHandler.Presentation/Content/themes/base/jquery.ui.button.css",
    "content": "/*!\n * jQuery UI Button 1.8.20\n *\n * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)\n * Licensed under the MIT license.\n * http://jquery.org/license\n *\n * http://docs.jquery.com/UI/Button#theming\n */\n.ui-button { display: inline-block; position: relative; padding: 0; margin-right: .1em; text-decoration: none !important; cursor: pointer; text-align: center; zoom: 1; overflow: visible; } /* the overflow property removes extra width in IE */\n.ui-button-icon-only { width: 2.2em; } /* to make room for the icon, a width needs to be set here */\nbutton.ui-button-icon-only { width: 2.4em; } /* button elements seem to need a little more width */\n.ui-button-icons-only { width: 3.4em; } \nbutton.ui-button-icons-only { width: 3.7em; } \n\n/*button text element */\n.ui-button .ui-button-text { display: block; line-height: 1.4;  }\n.ui-button-text-only .ui-button-text { padding: .4em 1em; }\n.ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text { padding: .4em; text-indent: -9999999px; }\n.ui-button-text-icon-primary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 1em .4em 2.1em; }\n.ui-button-text-icon-secondary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 2.1em .4em 1em; }\n.ui-button-text-icons .ui-button-text { padding-left: 2.1em; padding-right: 2.1em; }\n/* no icon support for input elements, provide padding by default */\ninput.ui-button { padding: .4em 1em; }\n\n/*button icon element(s) */\n.ui-button-icon-only .ui-icon, .ui-button-text-icon-primary .ui-icon, .ui-button-text-icon-secondary .ui-icon, .ui-button-text-icons .ui-icon, .ui-button-icons-only .ui-icon { position: absolute; top: 50%; margin-top: -8px; }\n.ui-button-icon-only .ui-icon { left: 50%; margin-left: -8px; }\n.ui-button-text-icon-primary .ui-button-icon-primary, .ui-button-text-icons .ui-button-icon-primary, .ui-button-icons-only .ui-button-icon-primary { left: .5em; }\n.ui-button-text-icon-secondary .ui-button-icon-secondary, .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }\n.ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }\n\n/*button sets*/\n.ui-buttonset { margin-right: 7px; }\n.ui-buttonset .ui-button { margin-left: 0; margin-right: -.3em; }\n\n/* workarounds */\nbutton.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra padding in Firefox */\n"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/DDDPPP.Chap20.CommandHandler.Presentation/Content/themes/base/jquery.ui.core.css",
    "content": "/*!\n * jQuery UI CSS Framework 1.8.20\n *\n * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)\n * Licensed under the MIT license.\n * http://jquery.org/license\n *\n * http://docs.jquery.com/UI/Theming/API\n */\n\n/* Layout helpers\n----------------------------------*/\n.ui-helper-hidden { display: none; }\n.ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); }\n.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; }\n.ui-helper-clearfix:before, .ui-helper-clearfix:after { content: \"\"; display: table; }\n.ui-helper-clearfix:after { clear: both; }\n.ui-helper-clearfix { zoom: 1; }\n.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); }\n\n\n/* Interaction Cues\n----------------------------------*/\n.ui-state-disabled { cursor: default !important; }\n\n\n/* Icons\n----------------------------------*/\n\n/* states and images */\n.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; }\n\n\n/* Misc visuals\n----------------------------------*/\n\n/* Overlays */\n.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }\n"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/DDDPPP.Chap20.CommandHandler.Presentation/Content/themes/base/jquery.ui.datepicker.css",
    "content": "/*!\n * jQuery UI Datepicker 1.8.20\n *\n * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)\n * Licensed under the MIT license.\n * http://jquery.org/license\n *\n * http://docs.jquery.com/UI/Datepicker#theming\n */\n.ui-datepicker { width: 17em; padding: .2em .2em 0; display: none; }\n.ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; }\n.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; }\n.ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; }\n.ui-datepicker .ui-datepicker-prev { left:2px; }\n.ui-datepicker .ui-datepicker-next { right:2px; }\n.ui-datepicker .ui-datepicker-prev-hover { left:1px; }\n.ui-datepicker .ui-datepicker-next-hover { right:1px; }\n.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px;  }\n.ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; }\n.ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; }\n.ui-datepicker select.ui-datepicker-month-year {width: 100%;}\n.ui-datepicker select.ui-datepicker-month, \n.ui-datepicker select.ui-datepicker-year { width: 49%;}\n.ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; }\n.ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0;  }\n.ui-datepicker td { border: 0; padding: 1px; }\n.ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; }\n.ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; }\n.ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; }\n.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; }\n\n/* with multiple calendars */\n.ui-datepicker.ui-datepicker-multi { width:auto; }\n.ui-datepicker-multi .ui-datepicker-group { float:left; }\n.ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; }\n.ui-datepicker-multi-2 .ui-datepicker-group { width:50%; }\n.ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; }\n.ui-datepicker-multi-4 .ui-datepicker-group { width:25%; }\n.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; }\n.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; }\n.ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; }\n.ui-datepicker-row-break { clear:both; width:100%; font-size:0em; }\n\n/* RTL support */\n.ui-datepicker-rtl { direction: rtl; }\n.ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; }\n.ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; }\n.ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; }\n.ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; }\n.ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; }\n.ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; }\n.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; }\n.ui-datepicker-rtl .ui-datepicker-group { float:right; }\n.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; }\n.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; }\n\n/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */\n.ui-datepicker-cover {\n    display: none; /*sorry for IE5*/\n    display/**/: block; /*sorry for IE5*/\n    position: absolute; /*must have*/\n    z-index: -1; /*must have*/\n    filter: mask(); /*must have*/\n    top: -4px; /*must have*/\n    left: -4px; /*must have*/\n    width: 200px; /*must have*/\n    height: 200px; /*must have*/\n}"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/DDDPPP.Chap20.CommandHandler.Presentation/Content/themes/base/jquery.ui.dialog.css",
    "content": "/*!\n * jQuery UI Dialog 1.8.20\n *\n * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)\n * Licensed under the MIT license.\n * http://jquery.org/license\n *\n * http://docs.jquery.com/UI/Dialog#theming\n */\n.ui-dialog { position: absolute; padding: .2em; width: 300px; overflow: hidden; }\n.ui-dialog .ui-dialog-titlebar { padding: .4em 1em; position: relative;  }\n.ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .1em 0; } \n.ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; }\n.ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; }\n.ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; }\n.ui-dialog .ui-dialog-content { position: relative; border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; }\n.ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; }\n.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { float: right; }\n.ui-dialog .ui-dialog-buttonpane button { margin: .5em .4em .5em 0; cursor: pointer; }\n.ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; }\n.ui-draggable .ui-dialog-titlebar { cursor: move; }\n"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/DDDPPP.Chap20.CommandHandler.Presentation/Content/themes/base/jquery.ui.progressbar.css",
    "content": "/*!\n * jQuery UI Progressbar 1.8.20\n *\n * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)\n * Licensed under the MIT license.\n * http://jquery.org/license\n *\n * http://docs.jquery.com/UI/Progressbar#theming\n */\n.ui-progressbar { height:2em; text-align: left; overflow: hidden; }\n.ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; }"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/DDDPPP.Chap20.CommandHandler.Presentation/Content/themes/base/jquery.ui.resizable.css",
    "content": "/*!\n * jQuery UI Resizable 1.8.20\n *\n * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)\n * Licensed under the MIT license.\n * http://jquery.org/license\n *\n * http://docs.jquery.com/UI/Resizable#theming\n */\n.ui-resizable { position: relative;}\n.ui-resizable-handle { position: absolute;font-size: 0.1px; display: block; }\n.ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; }\n.ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0; }\n.ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0; }\n.ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0; height: 100%; }\n.ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0; height: 100%; }\n.ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; }\n.ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; }\n.ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; }\n.ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;}"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/DDDPPP.Chap20.CommandHandler.Presentation/Content/themes/base/jquery.ui.selectable.css",
    "content": "/*!\n * jQuery UI Selectable 1.8.20\n *\n * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)\n * Licensed under the MIT license.\n * http://jquery.org/license\n *\n * http://docs.jquery.com/UI/Selectable#theming\n */\n.ui-selectable-helper { position: absolute; z-index: 100; border:1px dotted black; }\n"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/DDDPPP.Chap20.CommandHandler.Presentation/Content/themes/base/jquery.ui.slider.css",
    "content": "/*!\n * jQuery UI Slider 1.8.20\n *\n * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)\n * Licensed under the MIT license.\n * http://jquery.org/license\n *\n * http://docs.jquery.com/UI/Slider#theming\n */\n.ui-slider { position: relative; text-align: left; }\n.ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; }\n.ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; }\n\n.ui-slider-horizontal { height: .8em; }\n.ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; }\n.ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; }\n.ui-slider-horizontal .ui-slider-range-min { left: 0; }\n.ui-slider-horizontal .ui-slider-range-max { right: 0; }\n\n.ui-slider-vertical { width: .8em; height: 100px; }\n.ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; }\n.ui-slider-vertical .ui-slider-range { left: 0; width: 100%; }\n.ui-slider-vertical .ui-slider-range-min { bottom: 0; }\n.ui-slider-vertical .ui-slider-range-max { top: 0; }"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/DDDPPP.Chap20.CommandHandler.Presentation/Content/themes/base/jquery.ui.tabs.css",
    "content": "/*!\n * jQuery UI Tabs 1.8.20\n *\n * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)\n * Licensed under the MIT license.\n * http://jquery.org/license\n *\n * http://docs.jquery.com/UI/Tabs#theming\n */\n.ui-tabs { position: relative; padding: .2em; zoom: 1; } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as \"fixed\") */\n.ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; }\n.ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 1px; margin: 0 .2em 1px 0; border-bottom: 0 !important; padding: 0; white-space: nowrap; }\n.ui-tabs .ui-tabs-nav li a { float: left; padding: .5em 1em; text-decoration: none; }\n.ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: 0; padding-bottom: 1px; }\n.ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; }\n.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */\n.ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 1em 1.4em; background: none; }\n.ui-tabs .ui-tabs-hide { display: none !important; }\n"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/DDDPPP.Chap20.CommandHandler.Presentation/Content/themes/base/jquery.ui.theme.css",
    "content": "/*!\n * jQuery UI CSS Framework 1.8.20\n *\n * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)\n * Licensed under the MIT license.\n * http://jquery.org/license\n *\n * http://docs.jquery.com/UI/Theming/API\n *\n * To view and modify this theme, visit http://jqueryui.com/themeroller/\n */\n\n\n/* Component containers\n----------------------------------*/\n.ui-widget { font-family: Verdana,Arial,sans-serif/*{ffDefault}*/; font-size: 1.1em/*{fsDefault}*/; }\n.ui-widget .ui-widget { font-size: 1em; }\n.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Verdana,Arial,sans-serif/*{ffDefault}*/; font-size: 1em; }\n.ui-widget-content { border: 1px solid #aaaaaa/*{borderColorContent}*/; background: #ffffff/*{bgColorContent}*/ url(images/ui-bg_flat_75_ffffff_40x100.png)/*{bgImgUrlContent}*/ 50%/*{bgContentXPos}*/ 50%/*{bgContentYPos}*/ repeat-x/*{bgContentRepeat}*/; color: #222222/*{fcContent}*/; }\n.ui-widget-content a { color: #222222/*{fcContent}*/; }\n.ui-widget-header { border: 1px solid #aaaaaa/*{borderColorHeader}*/; background: #cccccc/*{bgColorHeader}*/ url(images/ui-bg_highlight-soft_75_cccccc_1x100.png)/*{bgImgUrlHeader}*/ 50%/*{bgHeaderXPos}*/ 50%/*{bgHeaderYPos}*/ repeat-x/*{bgHeaderRepeat}*/; color: #222222/*{fcHeader}*/; font-weight: bold; }\n.ui-widget-header a { color: #222222/*{fcHeader}*/; }\n\n/* Interaction states\n----------------------------------*/\n.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #d3d3d3/*{borderColorDefault}*/; background: #e6e6e6/*{bgColorDefault}*/ url(images/ui-bg_glass_75_e6e6e6_1x400.png)/*{bgImgUrlDefault}*/ 50%/*{bgDefaultXPos}*/ 50%/*{bgDefaultYPos}*/ repeat-x/*{bgDefaultRepeat}*/; font-weight: normal/*{fwDefault}*/; color: #555555/*{fcDefault}*/; }\n.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #555555/*{fcDefault}*/; text-decoration: none; }\n.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #999999/*{borderColorHover}*/; background: #dadada/*{bgColorHover}*/ url(images/ui-bg_glass_75_dadada_1x400.png)/*{bgImgUrlHover}*/ 50%/*{bgHoverXPos}*/ 50%/*{bgHoverYPos}*/ repeat-x/*{bgHoverRepeat}*/; font-weight: normal/*{fwDefault}*/; color: #212121/*{fcHover}*/; }\n.ui-state-hover a, .ui-state-hover a:hover { color: #212121/*{fcHover}*/; text-decoration: none; }\n.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #aaaaaa/*{borderColorActive}*/; background: #ffffff/*{bgColorActive}*/ url(images/ui-bg_glass_65_ffffff_1x400.png)/*{bgImgUrlActive}*/ 50%/*{bgActiveXPos}*/ 50%/*{bgActiveYPos}*/ repeat-x/*{bgActiveRepeat}*/; font-weight: normal/*{fwDefault}*/; color: #212121/*{fcActive}*/; }\n.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #212121/*{fcActive}*/; text-decoration: none; }\n.ui-widget :active { outline: none; }\n\n/* Interaction Cues\n----------------------------------*/\n.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight  {border: 1px solid #fcefa1/*{borderColorHighlight}*/; background: #fbf9ee/*{bgColorHighlight}*/ url(images/ui-bg_glass_55_fbf9ee_1x400.png)/*{bgImgUrlHighlight}*/ 50%/*{bgHighlightXPos}*/ 50%/*{bgHighlightYPos}*/ repeat-x/*{bgHighlightRepeat}*/; color: #363636/*{fcHighlight}*/; }\n.ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636/*{fcHighlight}*/; }\n.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a/*{borderColorError}*/; background: #fef1ec/*{bgColorError}*/ url(images/ui-bg_glass_95_fef1ec_1x400.png)/*{bgImgUrlError}*/ 50%/*{bgErrorXPos}*/ 50%/*{bgErrorYPos}*/ repeat-x/*{bgErrorRepeat}*/; color: #cd0a0a/*{fcError}*/; }\n.ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #cd0a0a/*{fcError}*/; }\n.ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #cd0a0a/*{fcError}*/; }\n.ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; }\n.ui-priority-secondary, .ui-widget-content .ui-priority-secondary,  .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; }\n.ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; }\n\n/* Icons\n----------------------------------*/\n\n/* states and images */\n.ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_222222_256x240.png)/*{iconsContent}*/; }\n.ui-widget-content .ui-icon {background-image: url(images/ui-icons_222222_256x240.png)/*{iconsContent}*/; }\n.ui-widget-header .ui-icon {background-image: url(images/ui-icons_222222_256x240.png)/*{iconsHeader}*/; }\n.ui-state-default .ui-icon { background-image: url(images/ui-icons_888888_256x240.png)/*{iconsDefault}*/; }\n.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_454545_256x240.png)/*{iconsHover}*/; }\n.ui-state-active .ui-icon {background-image: url(images/ui-icons_454545_256x240.png)/*{iconsActive}*/; }\n.ui-state-highlight .ui-icon {background-image: url(images/ui-icons_2e83ff_256x240.png)/*{iconsHighlight}*/; }\n.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_cd0a0a_256x240.png)/*{iconsError}*/; }\n\n/* positioning */\n.ui-icon-carat-1-n { background-position: 0 0; }\n.ui-icon-carat-1-ne { background-position: -16px 0; }\n.ui-icon-carat-1-e { background-position: -32px 0; }\n.ui-icon-carat-1-se { background-position: -48px 0; }\n.ui-icon-carat-1-s { background-position: -64px 0; }\n.ui-icon-carat-1-sw { background-position: -80px 0; }\n.ui-icon-carat-1-w { background-position: -96px 0; }\n.ui-icon-carat-1-nw { background-position: -112px 0; }\n.ui-icon-carat-2-n-s { background-position: -128px 0; }\n.ui-icon-carat-2-e-w { background-position: -144px 0; }\n.ui-icon-triangle-1-n { background-position: 0 -16px; }\n.ui-icon-triangle-1-ne { background-position: -16px -16px; }\n.ui-icon-triangle-1-e { background-position: -32px -16px; }\n.ui-icon-triangle-1-se { background-position: -48px -16px; }\n.ui-icon-triangle-1-s { background-position: -64px -16px; }\n.ui-icon-triangle-1-sw { background-position: -80px -16px; }\n.ui-icon-triangle-1-w { background-position: -96px -16px; }\n.ui-icon-triangle-1-nw { background-position: -112px -16px; }\n.ui-icon-triangle-2-n-s { background-position: -128px -16px; }\n.ui-icon-triangle-2-e-w { background-position: -144px -16px; }\n.ui-icon-arrow-1-n { background-position: 0 -32px; }\n.ui-icon-arrow-1-ne { background-position: -16px -32px; }\n.ui-icon-arrow-1-e { background-position: -32px -32px; }\n.ui-icon-arrow-1-se { background-position: -48px -32px; }\n.ui-icon-arrow-1-s { background-position: -64px -32px; }\n.ui-icon-arrow-1-sw { background-position: -80px -32px; }\n.ui-icon-arrow-1-w { background-position: -96px -32px; }\n.ui-icon-arrow-1-nw { background-position: -112px -32px; }\n.ui-icon-arrow-2-n-s { background-position: -128px -32px; }\n.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }\n.ui-icon-arrow-2-e-w { background-position: -160px -32px; }\n.ui-icon-arrow-2-se-nw { background-position: -176px -32px; }\n.ui-icon-arrowstop-1-n { background-position: -192px -32px; }\n.ui-icon-arrowstop-1-e { background-position: -208px -32px; }\n.ui-icon-arrowstop-1-s { background-position: -224px -32px; }\n.ui-icon-arrowstop-1-w { background-position: -240px -32px; }\n.ui-icon-arrowthick-1-n { background-position: 0 -48px; }\n.ui-icon-arrowthick-1-ne { background-position: -16px -48px; }\n.ui-icon-arrowthick-1-e { background-position: -32px -48px; }\n.ui-icon-arrowthick-1-se { background-position: -48px -48px; }\n.ui-icon-arrowthick-1-s { background-position: -64px -48px; }\n.ui-icon-arrowthick-1-sw { background-position: -80px -48px; }\n.ui-icon-arrowthick-1-w { background-position: -96px -48px; }\n.ui-icon-arrowthick-1-nw { background-position: -112px -48px; }\n.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }\n.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }\n.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }\n.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }\n.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }\n.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }\n.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }\n.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }\n.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }\n.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }\n.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }\n.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }\n.ui-icon-arrowreturn-1-w { background-position: -64px -64px; }\n.ui-icon-arrowreturn-1-n { background-position: -80px -64px; }\n.ui-icon-arrowreturn-1-e { background-position: -96px -64px; }\n.ui-icon-arrowreturn-1-s { background-position: -112px -64px; }\n.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }\n.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }\n.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }\n.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }\n.ui-icon-arrow-4 { background-position: 0 -80px; }\n.ui-icon-arrow-4-diag { background-position: -16px -80px; }\n.ui-icon-extlink { background-position: -32px -80px; }\n.ui-icon-newwin { background-position: -48px -80px; }\n.ui-icon-refresh { background-position: -64px -80px; }\n.ui-icon-shuffle { background-position: -80px -80px; }\n.ui-icon-transfer-e-w { background-position: -96px -80px; }\n.ui-icon-transferthick-e-w { background-position: -112px -80px; }\n.ui-icon-folder-collapsed { background-position: 0 -96px; }\n.ui-icon-folder-open { background-position: -16px -96px; }\n.ui-icon-document { background-position: -32px -96px; }\n.ui-icon-document-b { background-position: -48px -96px; }\n.ui-icon-note { background-position: -64px -96px; }\n.ui-icon-mail-closed { background-position: -80px -96px; }\n.ui-icon-mail-open { background-position: -96px -96px; }\n.ui-icon-suitcase { background-position: -112px -96px; }\n.ui-icon-comment { background-position: -128px -96px; }\n.ui-icon-person { background-position: -144px -96px; }\n.ui-icon-print { background-position: -160px -96px; }\n.ui-icon-trash { background-position: -176px -96px; }\n.ui-icon-locked { background-position: -192px -96px; }\n.ui-icon-unlocked { background-position: -208px -96px; }\n.ui-icon-bookmark { background-position: -224px -96px; }\n.ui-icon-tag { background-position: -240px -96px; }\n.ui-icon-home { background-position: 0 -112px; }\n.ui-icon-flag { background-position: -16px -112px; }\n.ui-icon-calendar { background-position: -32px -112px; }\n.ui-icon-cart { background-position: -48px -112px; }\n.ui-icon-pencil { background-position: -64px -112px; }\n.ui-icon-clock { background-position: -80px -112px; }\n.ui-icon-disk { background-position: -96px -112px; }\n.ui-icon-calculator { background-position: -112px -112px; }\n.ui-icon-zoomin { background-position: -128px -112px; }\n.ui-icon-zoomout { background-position: -144px -112px; }\n.ui-icon-search { background-position: -160px -112px; }\n.ui-icon-wrench { background-position: -176px -112px; }\n.ui-icon-gear { background-position: -192px -112px; }\n.ui-icon-heart { background-position: -208px -112px; }\n.ui-icon-star { background-position: -224px -112px; }\n.ui-icon-link { background-position: -240px -112px; }\n.ui-icon-cancel { background-position: 0 -128px; }\n.ui-icon-plus { background-position: -16px -128px; }\n.ui-icon-plusthick { background-position: -32px -128px; }\n.ui-icon-minus { background-position: -48px -128px; }\n.ui-icon-minusthick { background-position: -64px -128px; }\n.ui-icon-close { background-position: -80px -128px; }\n.ui-icon-closethick { background-position: -96px -128px; }\n.ui-icon-key { background-position: -112px -128px; }\n.ui-icon-lightbulb { background-position: -128px -128px; }\n.ui-icon-scissors { background-position: -144px -128px; }\n.ui-icon-clipboard { background-position: -160px -128px; }\n.ui-icon-copy { background-position: -176px -128px; }\n.ui-icon-contact { background-position: -192px -128px; }\n.ui-icon-image { background-position: -208px -128px; }\n.ui-icon-video { background-position: -224px -128px; }\n.ui-icon-script { background-position: -240px -128px; }\n.ui-icon-alert { background-position: 0 -144px; }\n.ui-icon-info { background-position: -16px -144px; }\n.ui-icon-notice { background-position: -32px -144px; }\n.ui-icon-help { background-position: -48px -144px; }\n.ui-icon-check { background-position: -64px -144px; }\n.ui-icon-bullet { background-position: -80px -144px; }\n.ui-icon-radio-off { background-position: -96px -144px; }\n.ui-icon-radio-on { background-position: -112px -144px; }\n.ui-icon-pin-w { background-position: -128px -144px; }\n.ui-icon-pin-s { background-position: -144px -144px; }\n.ui-icon-play { background-position: 0 -160px; }\n.ui-icon-pause { background-position: -16px -160px; }\n.ui-icon-seek-next { background-position: -32px -160px; }\n.ui-icon-seek-prev { background-position: -48px -160px; }\n.ui-icon-seek-end { background-position: -64px -160px; }\n.ui-icon-seek-start { background-position: -80px -160px; }\n/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */\n.ui-icon-seek-first { background-position: -80px -160px; }\n.ui-icon-stop { background-position: -96px -160px; }\n.ui-icon-eject { background-position: -112px -160px; }\n.ui-icon-volume-off { background-position: -128px -160px; }\n.ui-icon-volume-on { background-position: -144px -160px; }\n.ui-icon-power { background-position: 0 -176px; }\n.ui-icon-signal-diag { background-position: -16px -176px; }\n.ui-icon-signal { background-position: -32px -176px; }\n.ui-icon-battery-0 { background-position: -48px -176px; }\n.ui-icon-battery-1 { background-position: -64px -176px; }\n.ui-icon-battery-2 { background-position: -80px -176px; }\n.ui-icon-battery-3 { background-position: -96px -176px; }\n.ui-icon-circle-plus { background-position: 0 -192px; }\n.ui-icon-circle-minus { background-position: -16px -192px; }\n.ui-icon-circle-close { background-position: -32px -192px; }\n.ui-icon-circle-triangle-e { background-position: -48px -192px; }\n.ui-icon-circle-triangle-s { background-position: -64px -192px; }\n.ui-icon-circle-triangle-w { background-position: -80px -192px; }\n.ui-icon-circle-triangle-n { background-position: -96px -192px; }\n.ui-icon-circle-arrow-e { background-position: -112px -192px; }\n.ui-icon-circle-arrow-s { background-position: -128px -192px; }\n.ui-icon-circle-arrow-w { background-position: -144px -192px; }\n.ui-icon-circle-arrow-n { background-position: -160px -192px; }\n.ui-icon-circle-zoomin { background-position: -176px -192px; }\n.ui-icon-circle-zoomout { background-position: -192px -192px; }\n.ui-icon-circle-check { background-position: -208px -192px; }\n.ui-icon-circlesmall-plus { background-position: 0 -208px; }\n.ui-icon-circlesmall-minus { background-position: -16px -208px; }\n.ui-icon-circlesmall-close { background-position: -32px -208px; }\n.ui-icon-squaresmall-plus { background-position: -48px -208px; }\n.ui-icon-squaresmall-minus { background-position: -64px -208px; }\n.ui-icon-squaresmall-close { background-position: -80px -208px; }\n.ui-icon-grip-dotted-vertical { background-position: 0 -224px; }\n.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }\n.ui-icon-grip-solid-vertical { background-position: -32px -224px; }\n.ui-icon-grip-solid-horizontal { background-position: -48px -224px; }\n.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }\n.ui-icon-grip-diagonal-se { background-position: -80px -224px; }\n\n\n/* Misc visuals\n----------------------------------*/\n\n/* Corner radius */\n.ui-corner-all, .ui-corner-top, .ui-corner-left, .ui-corner-tl { -moz-border-radius-topleft: 4px/*{cornerRadius}*/; -webkit-border-top-left-radius: 4px/*{cornerRadius}*/; -khtml-border-top-left-radius: 4px/*{cornerRadius}*/; border-top-left-radius: 4px/*{cornerRadius}*/; }\n.ui-corner-all, .ui-corner-top, .ui-corner-right, .ui-corner-tr { -moz-border-radius-topright: 4px/*{cornerRadius}*/; -webkit-border-top-right-radius: 4px/*{cornerRadius}*/; -khtml-border-top-right-radius: 4px/*{cornerRadius}*/; border-top-right-radius: 4px/*{cornerRadius}*/; }\n.ui-corner-all, .ui-corner-bottom, .ui-corner-left, .ui-corner-bl { -moz-border-radius-bottomleft: 4px/*{cornerRadius}*/; -webkit-border-bottom-left-radius: 4px/*{cornerRadius}*/; -khtml-border-bottom-left-radius: 4px/*{cornerRadius}*/; border-bottom-left-radius: 4px/*{cornerRadius}*/; }\n.ui-corner-all, .ui-corner-bottom, .ui-corner-right, .ui-corner-br { -moz-border-radius-bottomright: 4px/*{cornerRadius}*/; -webkit-border-bottom-right-radius: 4px/*{cornerRadius}*/; -khtml-border-bottom-right-radius: 4px/*{cornerRadius}*/; border-bottom-right-radius: 4px/*{cornerRadius}*/; }\n\n/* Overlays */\n.ui-widget-overlay { background: #aaaaaa/*{bgColorOverlay}*/ url(images/ui-bg_flat_0_aaaaaa_40x100.png)/*{bgImgUrlOverlay}*/ 50%/*{bgOverlayXPos}*/ 50%/*{bgOverlayYPos}*/ repeat-x/*{bgOverlayRepeat}*/; opacity: .3;filter:Alpha(Opacity=30)/*{opacityOverlay}*/; }\n.ui-widget-shadow { margin: -8px/*{offsetTopShadow}*/ 0 0 -8px/*{offsetLeftShadow}*/; padding: 8px/*{thicknessShadow}*/; background: #aaaaaa/*{bgColorShadow}*/ url(images/ui-bg_flat_0_aaaaaa_40x100.png)/*{bgImgUrlShadow}*/ 50%/*{bgShadowXPos}*/ 50%/*{bgShadowYPos}*/ repeat-x/*{bgShadowRepeat}*/; opacity: .3;filter:Alpha(Opacity=30)/*{opacityShadow}*/; -moz-border-radius: 8px/*{cornerRadiusShadow}*/; -khtml-border-radius: 8px/*{cornerRadiusShadow}*/; -webkit-border-radius: 8px/*{cornerRadiusShadow}*/; border-radius: 8px/*{cornerRadiusShadow}*/; }"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/DDDPPP.Chap20.CommandHandler.Presentation/Controllers/AccountController.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Web;\nusing System.Web.Mvc;\nusing System.Web.Routing;\nusing System.Web.Security;\nusing DDDPPP.Chap20.CommandHandler.Presentation.Models;\n\nnamespace DDDPPP.Chap20.CommandHandler.Presentation.Controllers\n{\n    public class AccountController : Controller\n    {\n\n        //\n        // GET: /Account/LogOn\n\n        public ActionResult LogOn()\n        {\n            return View();\n        }\n\n        //\n        // POST: /Account/LogOn\n\n        [HttpPost]\n        public ActionResult LogOn(LogOnModel model, string returnUrl)\n        {\n            if (ModelState.IsValid)\n            {\n                if (Membership.ValidateUser(model.UserName, model.Password))\n                {\n                    FormsAuthentication.SetAuthCookie(model.UserName, model.RememberMe);\n                    if (Url.IsLocalUrl(returnUrl) && returnUrl.Length > 1 && returnUrl.StartsWith(\"/\")\n                        && !returnUrl.StartsWith(\"//\") && !returnUrl.StartsWith(\"/\\\\\"))\n                    {\n                        return Redirect(returnUrl);\n                    }\n                    else\n                    {\n                        return RedirectToAction(\"Index\", \"Home\");\n                    }\n                }\n                else\n                {\n                    ModelState.AddModelError(\"\", \"The user name or password provided is incorrect.\");\n                }\n            }\n\n            // If we got this far, something failed, redisplay form\n            return View(model);\n        }\n\n        //\n        // GET: /Account/LogOff\n\n        public ActionResult LogOff()\n        {\n            FormsAuthentication.SignOut();\n\n            return RedirectToAction(\"Index\", \"Home\");\n        }\n\n        //\n        // GET: /Account/Register\n\n        public ActionResult Register()\n        {\n            return View();\n        }\n\n        //\n        // POST: /Account/Register\n\n        [HttpPost]\n        public ActionResult Register(RegisterModel model)\n        {\n            if (ModelState.IsValid)\n            {\n                // Attempt to register the user\n                MembershipCreateStatus createStatus;\n                Membership.CreateUser(model.UserName, model.Password, model.Email, null, null, true, null, out createStatus);\n\n                if (createStatus == MembershipCreateStatus.Success)\n                {\n                    FormsAuthentication.SetAuthCookie(model.UserName, false /* createPersistentCookie */);\n                    return RedirectToAction(\"Index\", \"Home\");\n                }\n                else\n                {\n                    ModelState.AddModelError(\"\", ErrorCodeToString(createStatus));\n                }\n            }\n\n            // If we got this far, something failed, redisplay form\n            return View(model);\n        }\n\n        //\n        // GET: /Account/ChangePassword\n\n        [Authorize]\n        public ActionResult ChangePassword()\n        {\n            return View();\n        }\n\n        //\n        // POST: /Account/ChangePassword\n\n        [Authorize]\n        [HttpPost]\n        public ActionResult ChangePassword(ChangePasswordModel model)\n        {\n            if (ModelState.IsValid)\n            {\n\n                // ChangePassword will throw an exception rather\n                // than return false in certain failure scenarios.\n                bool changePasswordSucceeded;\n                try\n                {\n                    MembershipUser currentUser = Membership.GetUser(User.Identity.Name, true /* userIsOnline */);\n                    changePasswordSucceeded = currentUser.ChangePassword(model.OldPassword, model.NewPassword);\n                }\n                catch (Exception)\n                {\n                    changePasswordSucceeded = false;\n                }\n\n                if (changePasswordSucceeded)\n                {\n                    return RedirectToAction(\"ChangePasswordSuccess\");\n                }\n                else\n                {\n                    ModelState.AddModelError(\"\", \"The current password is incorrect or the new password is invalid.\");\n                }\n            }\n\n            // If we got this far, something failed, redisplay form\n            return View(model);\n        }\n\n        //\n        // GET: /Account/ChangePasswordSuccess\n\n        public ActionResult ChangePasswordSuccess()\n        {\n            return View();\n        }\n\n        #region Status Codes\n        private static string ErrorCodeToString(MembershipCreateStatus createStatus)\n        {\n            // See http://go.microsoft.com/fwlink/?LinkID=177550 for\n            // a full list of status codes.\n            switch (createStatus)\n            {\n                case MembershipCreateStatus.DuplicateUserName:\n                    return \"User name already exists. Please enter a different user name.\";\n\n                case MembershipCreateStatus.DuplicateEmail:\n                    return \"A user name for that e-mail address already exists. Please enter a different e-mail address.\";\n\n                case MembershipCreateStatus.InvalidPassword:\n                    return \"The password provided is invalid. Please enter a valid password value.\";\n\n                case MembershipCreateStatus.InvalidEmail:\n                    return \"The e-mail address provided is invalid. Please check the value and try again.\";\n\n                case MembershipCreateStatus.InvalidAnswer:\n                    return \"The password retrieval answer provided is invalid. Please check the value and try again.\";\n\n                case MembershipCreateStatus.InvalidQuestion:\n                    return \"The password retrieval question provided is invalid. Please check the value and try again.\";\n\n                case MembershipCreateStatus.InvalidUserName:\n                    return \"The user name provided is invalid. Please check the value and try again.\";\n\n                case MembershipCreateStatus.ProviderError:\n                    return \"The authentication provider returned an error. Please verify your entry and try again. If the problem persists, please contact your system administrator.\";\n\n                case MembershipCreateStatus.UserRejected:\n                    return \"The user creation request has been canceled. Please verify your entry and try again. If the problem persists, please contact your system administrator.\";\n\n                default:\n                    return \"An unknown error occurred. Please verify your entry and try again. If the problem persists, please contact your system administrator.\";\n            }\n        }\n        #endregion\n    }\n}\n"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/DDDPPP.Chap20.CommandHandler.Presentation/Controllers/HomeController.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Web;\nusing System.Web.Mvc;\n\nnamespace DDDPPP.Chap20.CommandHandler.Presentation.Controllers\n{\n    public class HomeController : Controller\n    {\n        public ActionResult Index()\n        {\n            ViewBag.Message = \"Welcome to ASP.NET MVC!\";\n\n            return View();\n        }\n\n        public ActionResult About()\n        {\n            return View();\n        }\n    }\n}\n"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/DDDPPP.Chap20.CommandHandler.Presentation/DDDPPP.Chap20.CommandHandler.Presentation.csproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"4.0\" DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <Import Project=\"$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props\" Condition=\"Exists('$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props')\" />\n  <PropertyGroup>\n    <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>\n    <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>\n    <ProductVersion>\n    </ProductVersion>\n    <SchemaVersion>2.0</SchemaVersion>\n    <ProjectGuid>{333D95E0-FFAF-4321-BCBD-5756F6D020EB}</ProjectGuid>\n    <ProjectTypeGuids>{E53F8FEA-EAE0-44A6-8774-FFD645390401};{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>\n    <OutputType>Library</OutputType>\n    <AppDesignerFolder>Properties</AppDesignerFolder>\n    <RootNamespace>DDDPPP.Chap20.CommandHandler.Presentation</RootNamespace>\n    <AssemblyName>DDDPPP.Chap20.CommandHandler.Presentation</AssemblyName>\n    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\n    <MvcBuildViews>false</MvcBuildViews>\n    <UseIISExpress>true</UseIISExpress>\n    <IISExpressSSLPort />\n    <IISExpressAnonymousAuthentication />\n    <IISExpressWindowsAuthentication />\n    <IISExpressUseClassicPipelineMode />\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' \">\n    <DebugSymbols>true</DebugSymbols>\n    <DebugType>full</DebugType>\n    <Optimize>false</Optimize>\n    <OutputPath>bin\\</OutputPath>\n    <DefineConstants>DEBUG;TRACE</DefineConstants>\n    <ErrorReport>prompt</ErrorReport>\n    <WarningLevel>4</WarningLevel>\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' \">\n    <DebugType>pdbonly</DebugType>\n    <Optimize>true</Optimize>\n    <OutputPath>bin\\</OutputPath>\n    <DefineConstants>TRACE</DefineConstants>\n    <ErrorReport>prompt</ErrorReport>\n    <WarningLevel>4</WarningLevel>\n  </PropertyGroup>\n  <ItemGroup>\n    <Reference Include=\"Microsoft.CSharp\" />\n    <Reference Include=\"System.Data.Entity\" />\n    <Reference Include=\"System\" />\n    <Reference Include=\"System.Data\" />\n    <Reference Include=\"System.Drawing\" />\n    <Reference Include=\"System.Web.DynamicData\" />\n    <Reference Include=\"System.Web.Entity\" />\n    <Reference Include=\"System.Web.ApplicationServices\" />\n    <Reference Include=\"System.ComponentModel.DataAnnotations\" />\n    <Reference Include=\"System.Core\" />\n    <Reference Include=\"System.Data.DataSetExtensions\" />\n    <Reference Include=\"System.Xml.Linq\" />\n    <Reference Include=\"System.Web\" />\n    <Reference Include=\"System.Web.Extensions\" />\n    <Reference Include=\"System.Web.Abstractions\" />\n    <Reference Include=\"System.Web.Routing\" />\n    <Reference Include=\"System.Xml\" />\n    <Reference Include=\"System.Configuration\" />\n    <Reference Include=\"System.Web.Services\" />\n    <Reference Include=\"System.EnterpriseServices\" />\n    <Reference Include=\"EntityFramework\">\n      <HintPath>..\\packages\\EntityFramework.5.0.0\\lib\\net45\\EntityFramework.dll</HintPath>\n    </Reference>\n    <Reference Include=\"Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL\">\n      <Private>True</Private>\n      <HintPath>..\\packages\\Microsoft.Web.Infrastructure.1.0.0.0\\lib\\net40\\Microsoft.Web.Infrastructure.dll</HintPath>\n    </Reference>\n    <Reference Include=\"System.Web.Helpers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL\">\n      <Private>True</Private>\n      <HintPath>..\\packages\\Microsoft.AspNet.WebPages.1.0.20105.408\\lib\\net40\\System.Web.Helpers.dll</HintPath>\n    </Reference>\n    <Reference Include=\"System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL\">\n      <Private>True</Private>\n      <HintPath>..\\packages\\Microsoft.AspNet.Mvc.3.0.20105.1\\lib\\net40\\System.Web.Mvc.dll</HintPath>\n    </Reference>\n    <Reference Include=\"System.Web.Providers\">\n      <HintPath>..\\packages\\Microsoft.AspNet.Providers.Core.1.1\\lib\\net40\\System.Web.Providers.dll</HintPath>\n    </Reference>\n    <Reference Include=\"System.Web.Razor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL\">\n      <Private>True</Private>\n      <HintPath>..\\packages\\Microsoft.AspNet.Razor.1.0.20105.408\\lib\\net40\\System.Web.Razor.dll</HintPath>\n    </Reference>\n    <Reference Include=\"System.Web.WebPages, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL\">\n      <Private>True</Private>\n      <HintPath>..\\packages\\Microsoft.AspNet.WebPages.1.0.20105.408\\lib\\net40\\System.Web.WebPages.dll</HintPath>\n    </Reference>\n    <Reference Include=\"System.Web.WebPages.Deployment, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL\">\n      <Private>True</Private>\n      <HintPath>..\\packages\\Microsoft.AspNet.WebPages.1.0.20105.408\\lib\\net40\\System.Web.WebPages.Deployment.dll</HintPath>\n    </Reference>\n    <Reference Include=\"System.Web.WebPages.Razor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL\">\n      <Private>True</Private>\n      <HintPath>..\\packages\\Microsoft.AspNet.WebPages.1.0.20105.408\\lib\\net40\\System.Web.WebPages.Razor.dll</HintPath>\n    </Reference>\n  </ItemGroup>\n  <ItemGroup>\n    <Compile Include=\"Controllers\\AccountController.cs\" />\n    <Compile Include=\"Controllers\\HomeController.cs\" />\n    <Compile Include=\"Global.asax.cs\">\n      <DependentUpon>Global.asax</DependentUpon>\n    </Compile>\n    <Compile Include=\"Models\\AccountModels.cs\" />\n    <Compile Include=\"Properties\\AssemblyInfo.cs\" />\n  </ItemGroup>\n  <ItemGroup>\n    <Content Include=\"Content\\themes\\base\\images\\ui-bg_flat_0_aaaaaa_40x100.png\" />\n    <Content Include=\"Content\\themes\\base\\images\\ui-bg_flat_75_ffffff_40x100.png\" />\n    <Content Include=\"Content\\themes\\base\\images\\ui-bg_glass_55_fbf9ee_1x400.png\" />\n    <Content Include=\"Content\\themes\\base\\images\\ui-bg_glass_65_ffffff_1x400.png\" />\n    <Content Include=\"Content\\themes\\base\\images\\ui-bg_glass_75_dadada_1x400.png\" />\n    <Content Include=\"Content\\themes\\base\\images\\ui-bg_glass_75_e6e6e6_1x400.png\" />\n    <Content Include=\"Content\\themes\\base\\images\\ui-bg_glass_95_fef1ec_1x400.png\" />\n    <Content Include=\"Content\\themes\\base\\images\\ui-bg_highlight-soft_75_cccccc_1x100.png\" />\n    <Content Include=\"Content\\themes\\base\\images\\ui-icons_222222_256x240.png\" />\n    <Content Include=\"Content\\themes\\base\\images\\ui-icons_2e83ff_256x240.png\" />\n    <Content Include=\"Content\\themes\\base\\images\\ui-icons_454545_256x240.png\" />\n    <Content Include=\"Content\\themes\\base\\images\\ui-icons_888888_256x240.png\" />\n    <Content Include=\"Content\\themes\\base\\images\\ui-icons_cd0a0a_256x240.png\" />\n    <Content Include=\"Content\\themes\\base\\jquery-ui.css\" />\n    <Content Include=\"Content\\themes\\base\\jquery.ui.accordion.css\" />\n    <Content Include=\"Content\\themes\\base\\jquery.ui.all.css\" />\n    <Content Include=\"Content\\themes\\base\\jquery.ui.autocomplete.css\" />\n    <Content Include=\"Content\\themes\\base\\jquery.ui.base.css\" />\n    <Content Include=\"Content\\themes\\base\\jquery.ui.button.css\" />\n    <Content Include=\"Content\\themes\\base\\jquery.ui.core.css\" />\n    <Content Include=\"Content\\themes\\base\\jquery.ui.datepicker.css\" />\n    <Content Include=\"Content\\themes\\base\\jquery.ui.dialog.css\" />\n    <Content Include=\"Content\\themes\\base\\jquery.ui.progressbar.css\" />\n    <Content Include=\"Content\\themes\\base\\jquery.ui.resizable.css\" />\n    <Content Include=\"Content\\themes\\base\\jquery.ui.selectable.css\" />\n    <Content Include=\"Content\\themes\\base\\jquery.ui.slider.css\" />\n    <Content Include=\"Content\\themes\\base\\jquery.ui.tabs.css\" />\n    <Content Include=\"Content\\themes\\base\\jquery.ui.theme.css\" />\n    <Content Include=\"Content\\themes\\base\\minified\\images\\ui-bg_flat_0_aaaaaa_40x100.png\" />\n    <Content Include=\"Content\\themes\\base\\minified\\images\\ui-bg_flat_75_ffffff_40x100.png\" />\n    <Content Include=\"Content\\themes\\base\\minified\\images\\ui-bg_glass_55_fbf9ee_1x400.png\" />\n    <Content Include=\"Content\\themes\\base\\minified\\images\\ui-bg_glass_65_ffffff_1x400.png\" />\n    <Content Include=\"Content\\themes\\base\\minified\\images\\ui-bg_glass_75_dadada_1x400.png\" />\n    <Content Include=\"Content\\themes\\base\\minified\\images\\ui-bg_glass_75_e6e6e6_1x400.png\" />\n    <Content Include=\"Content\\themes\\base\\minified\\images\\ui-bg_glass_95_fef1ec_1x400.png\" />\n    <Content Include=\"Content\\themes\\base\\minified\\images\\ui-bg_highlight-soft_75_cccccc_1x100.png\" />\n    <Content Include=\"Content\\themes\\base\\minified\\images\\ui-icons_222222_256x240.png\" />\n    <Content Include=\"Content\\themes\\base\\minified\\images\\ui-icons_2e83ff_256x240.png\" />\n    <Content Include=\"Content\\themes\\base\\minified\\images\\ui-icons_454545_256x240.png\" />\n    <Content Include=\"Content\\themes\\base\\minified\\images\\ui-icons_888888_256x240.png\" />\n    <Content Include=\"Content\\themes\\base\\minified\\images\\ui-icons_cd0a0a_256x240.png\" />\n    <Content Include=\"Content\\themes\\base\\minified\\jquery-ui.min.css\" />\n    <Content Include=\"Content\\themes\\base\\minified\\jquery.ui.accordion.min.css\" />\n    <Content Include=\"Content\\themes\\base\\minified\\jquery.ui.autocomplete.min.css\" />\n    <Content Include=\"Content\\themes\\base\\minified\\jquery.ui.button.min.css\" />\n    <Content Include=\"Content\\themes\\base\\minified\\jquery.ui.core.min.css\" />\n    <Content Include=\"Content\\themes\\base\\minified\\jquery.ui.datepicker.min.css\" />\n    <Content Include=\"Content\\themes\\base\\minified\\jquery.ui.dialog.min.css\" />\n    <Content Include=\"Content\\themes\\base\\minified\\jquery.ui.progressbar.min.css\" />\n    <Content Include=\"Content\\themes\\base\\minified\\jquery.ui.resizable.min.css\" />\n    <Content Include=\"Content\\themes\\base\\minified\\jquery.ui.selectable.min.css\" />\n    <Content Include=\"Content\\themes\\base\\minified\\jquery.ui.slider.min.css\" />\n    <Content Include=\"Content\\themes\\base\\minified\\jquery.ui.tabs.min.css\" />\n    <Content Include=\"Content\\themes\\base\\minified\\jquery.ui.theme.min.css\" />\n    <Content Include=\"Global.asax\" />\n    <None Include=\"Scripts\\jquery-1.7.1.intellisense.js\" />\n    <Content Include=\"Scripts\\jquery-1.7.1.js\" />\n    <Content Include=\"Scripts\\jquery-1.7.1.min.js\" />\n    <None Include=\"Scripts\\jquery.validate-vsdoc.js\" />\n    <Content Include=\"Scripts\\jquery-ui-1.8.20.js\" />\n    <Content Include=\"Scripts\\jquery-ui-1.8.20.min.js\" />\n    <Content Include=\"Scripts\\jquery.validate.js\" />\n    <Content Include=\"Scripts\\jquery.validate.min.js\" />\n    <Content Include=\"Scripts\\modernizr-2.5.3.js\" />\n    <Content Include=\"Web.config\" />\n    <Content Include=\"Web.Debug.config\">\n      <DependentUpon>Web.config</DependentUpon>\n    </Content>\n    <Content Include=\"Web.Release.config\">\n      <DependentUpon>Web.config</DependentUpon>\n    </Content>\n    <Content Include=\"Content\\Site.css\" />\n    <Content Include=\"Scripts\\jquery.unobtrusive-ajax.js\" />\n    <Content Include=\"Scripts\\jquery.unobtrusive-ajax.min.js\" />\n    <Content Include=\"Scripts\\jquery.validate.unobtrusive.js\" />\n    <Content Include=\"Scripts\\jquery.validate.unobtrusive.min.js\" />\n    <Content Include=\"Scripts\\MicrosoftAjax.js\" />\n    <Content Include=\"Scripts\\MicrosoftAjax.debug.js\" />\n    <Content Include=\"Scripts\\MicrosoftMvcAjax.js\" />\n    <Content Include=\"Scripts\\MicrosoftMvcAjax.debug.js\" />\n    <Content Include=\"Scripts\\MicrosoftMvcValidation.js\" />\n    <Content Include=\"Scripts\\MicrosoftMvcValidation.debug.js\" />\n    <Content Include=\"Views\\Account\\ChangePassword.aspx\" />\n    <Content Include=\"Views\\Account\\ChangePasswordSuccess.aspx\" />\n    <Content Include=\"Views\\Account\\LogOn.aspx\" />\n    <Content Include=\"Views\\Account\\Register.aspx\" />\n    <Content Include=\"Views\\Home\\About.aspx\" />\n    <Content Include=\"Views\\Home\\Index.aspx\" />\n    <Content Include=\"Views\\Shared\\Error.aspx\" />\n    <Content Include=\"Views\\Shared\\LogOnUserControl.ascx\" />\n    <Content Include=\"Views\\Shared\\Site.Master\" />\n    <Content Include=\"Views\\Web.config\" />\n  </ItemGroup>\n  <ItemGroup>\n    <Folder Include=\"App_Data\\\" />\n  </ItemGroup>\n  <ItemGroup>\n    <Content Include=\"packages.config\" />\n  </ItemGroup>\n  <PropertyGroup>\n    <VisualStudioVersion Condition=\"'$(VisualStudioVersion)' == ''\">10.0</VisualStudioVersion>\n    <VSToolsPath Condition=\"'$(VSToolsPath)' == ''\">$(MSBuildExtensionsPath32)\\Microsoft\\VisualStudio\\v$(VisualStudioVersion)</VSToolsPath>\n  </PropertyGroup>\n  <Import Project=\"$(MSBuildBinPath)\\Microsoft.CSharp.targets\" />\n  <Import Project=\"$(VSToolsPath)\\WebApplications\\Microsoft.WebApplication.targets\" Condition=\"'$(VSToolsPath)' != ''\" />\n  <Import Project=\"$(MSBuildExtensionsPath32)\\Microsoft\\VisualStudio\\v10.0\\WebApplications\\Microsoft.WebApplication.targets\" Condition=\"false\" />\n  <Target Name=\"MvcBuildViews\" AfterTargets=\"AfterBuild\" Condition=\"'$(MvcBuildViews)'=='true'\">\n    <AspNetCompiler VirtualPath=\"temp\" PhysicalPath=\"$(WebProjectOutputDir)\" />\n  </Target>\n  <ProjectExtensions>\n    <VisualStudio>\n      <FlavorProperties GUID=\"{349c5851-65df-11da-9384-00065b846f21}\">\n        <WebProjectProperties>\n          <UseIIS>True</UseIIS>\n          <AutoAssignPort>True</AutoAssignPort>\n          <DevelopmentServerPort>0</DevelopmentServerPort>\n          <DevelopmentServerVPath>/</DevelopmentServerVPath>\n          <IISUrl>http://localhost:63365/</IISUrl>\n          <NTLMAuthentication>False</NTLMAuthentication>\n          <UseCustomServer>False</UseCustomServer>\n          <CustomServerUrl>\n          </CustomServerUrl>\n          <SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>\n        </WebProjectProperties>\n      </FlavorProperties>\n    </VisualStudio>\n  </ProjectExtensions>\n  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \n       Other similar extension points exist, see Microsoft.Common.targets.\n  <Target Name=\"BeforeBuild\">\n  </Target>\n  <Target Name=\"AfterBuild\">\n  </Target> -->\n</Project>"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/DDDPPP.Chap20.CommandHandler.Presentation/Global.asax",
    "content": "﻿<%@ Application Codebehind=\"Global.asax.cs\" Inherits=\"DDDPPP.Chap20.CommandHandler.Presentation.MvcApplication\" Language=\"C#\" %>\n"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/DDDPPP.Chap20.CommandHandler.Presentation/Global.asax.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Data.Entity;\nusing System.Data.Entity.Infrastructure;\nusing System.Linq;\nusing System.Web;\nusing System.Web.Mvc;\nusing System.Web.Routing;\n\nnamespace DDDPPP.Chap20.CommandHandler.Presentation\n{\n    // Note: For instructions on enabling IIS6 or IIS7 classic mode, \n    // visit http://go.microsoft.com/?LinkId=9394801\n\n    public class MvcApplication : System.Web.HttpApplication\n    {\n        public static void RegisterGlobalFilters(GlobalFilterCollection filters)\n        {\n            filters.Add(new HandleErrorAttribute());\n        }\n\n        public static void RegisterRoutes(RouteCollection routes)\n        {\n            routes.IgnoreRoute(\"{resource}.axd/{*pathInfo}\");\n\n            routes.MapRoute(\n                \"Default\", // Route name\n                \"{controller}/{action}/{id}\", // URL with parameters\n                new { controller = \"Home\", action = \"Index\", id = UrlParameter.Optional } // Parameter defaults\n            );\n\n        }\n\n        protected void Application_Start()\n        {\n            AreaRegistration.RegisterAllAreas();\n\n            // Use LocalDB for Entity Framework by default\n            Database.DefaultConnectionFactory = new SqlConnectionFactory(@\"Data Source=(localdb)\\v11.0; Integrated Security=True; MultipleActiveResultSets=True\");\n\n            RegisterGlobalFilters(GlobalFilters.Filters);\n            RegisterRoutes(RouteTable.Routes);\n        }\n    }\n}"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/DDDPPP.Chap20.CommandHandler.Presentation/Models/AccountModels.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.ComponentModel.DataAnnotations;\nusing System.Globalization;\nusing System.Web.Mvc;\nusing System.Web.Security;\n\nnamespace DDDPPP.Chap20.CommandHandler.Presentation.Models\n{\n\n    public class ChangePasswordModel\n    {\n        [Required]\n        [DataType(DataType.Password)]\n        [Display(Name = \"Current password\")]\n        public string OldPassword { get; set; }\n\n        [Required]\n        [StringLength(100, ErrorMessage = \"The {0} must be at least {2} characters long.\", MinimumLength = 6)]\n        [DataType(DataType.Password)]\n        [Display(Name = \"New password\")]\n        public string NewPassword { get; set; }\n\n        [DataType(DataType.Password)]\n        [Display(Name = \"Confirm new password\")]\n        [System.Web.Mvc.Compare(\"NewPassword\", ErrorMessage = \"The new password and confirmation password do not match.\")]\n        public string ConfirmPassword { get; set; }\n    }\n\n    public class LogOnModel\n    {\n        [Required]\n        [Display(Name = \"User name\")]\n        public string UserName { get; set; }\n\n        [Required]\n        [DataType(DataType.Password)]\n        [Display(Name = \"Password\")]\n        public string Password { get; set; }\n\n        [Display(Name = \"Remember me?\")]\n        public bool RememberMe { get; set; }\n    }\n\n    public class RegisterModel\n    {\n        [Required]\n        [Display(Name = \"User name\")]\n        public string UserName { get; set; }\n\n        [Required]\n        [DataType(DataType.EmailAddress)]\n        [Display(Name = \"Email address\")]\n        public string Email { get; set; }\n\n        [Required]\n        [StringLength(100, ErrorMessage = \"The {0} must be at least {2} characters long.\", MinimumLength = 6)]\n        [DataType(DataType.Password)]\n        [Display(Name = \"Password\")]\n        public string Password { get; set; }\n\n        [DataType(DataType.Password)]\n        [Display(Name = \"Confirm password\")]\n        [System.Web.Mvc.Compare(\"Password\", ErrorMessage = \"The password and confirmation password do not match.\")]\n        public string ConfirmPassword { get; set; }\n    }\n}\n"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/DDDPPP.Chap20.CommandHandler.Presentation/Properties/AssemblyInfo.cs",
    "content": "﻿using System.Reflection;\nusing System.Runtime.CompilerServices;\nusing System.Runtime.InteropServices;\n\n// General Information about an assembly is controlled through the following \n// set of attributes. Change these attribute values to modify the information\n// associated with an assembly.\n[assembly: AssemblyTitle(\"DDDPPP.Chap20.CommandHandler.Presentation\")]\n[assembly: AssemblyDescription(\"\")]\n[assembly: AssemblyConfiguration(\"\")]\n[assembly: AssemblyCompany(\"\")]\n[assembly: AssemblyProduct(\"DDDPPP.Chap20.CommandHandler.Presentation\")]\n[assembly: AssemblyCopyright(\"Copyright ©  2014\")]\n[assembly: AssemblyTrademark(\"\")]\n[assembly: AssemblyCulture(\"\")]\n\n// Setting ComVisible to false makes the types in this assembly not visible \n// to COM components.  If you need to access a type in this assembly from \n// COM, set the ComVisible attribute to true on that type.\n[assembly: ComVisible(false)]\n\n// The following GUID is for the ID of the typelib if this project is exposed to COM\n[assembly: Guid(\"811a7093-9cdc-4cfb-a9d1-0c609f9b0d1f\")]\n\n// Version information for an assembly consists of the following four values:\n//\n//      Major Version\n//      Minor Version \n//      Build Number\n//      Revision\n//\n// You can specify all the values or you can default the Revision and Build Numbers \n// by using the '*' as shown below:\n[assembly: AssemblyVersion(\"1.0.0.0\")]\n[assembly: AssemblyFileVersion(\"1.0.0.0\")]\n"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/DDDPPP.Chap20.CommandHandler.Presentation/Scripts/MicrosoftAjax.debug.js",
    "content": "﻿// Name:        MicrosoftAjax.debug.js\n// Assembly:    System.Web.Extensions\n// Version:     4.0.0.0\n// FileVersion: 4.0.20526.0\n//-----------------------------------------------------------------------\n// Copyright (C) Microsoft Corporation. All rights reserved.\n//-----------------------------------------------------------------------\n// MicrosoftAjax.js\n// Microsoft AJAX Framework.\n \nFunction.__typeName = 'Function';\nFunction.__class = true;\nFunction.createCallback = function Function$createCallback(method, context) {\n    /// <summary locid=\"M:J#Function.createCallback\" />\n    /// <param name=\"method\" type=\"Function\"></param>\n    /// <param name=\"context\" mayBeNull=\"true\"></param>\n    /// <returns type=\"Function\"></returns>\n    var e = Function._validateParams(arguments, [\n        {name: \"method\", type: Function},\n        {name: \"context\", mayBeNull: true}\n    ]);\n    if (e) throw e;\n    return function() {\n        var l = arguments.length;\n        if (l > 0) {\n            var args = [];\n            for (var i = 0; i < l; i++) {\n                args[i] = arguments[i];\n            }\n            args[l] = context;\n            return method.apply(this, args);\n        }\n        return method.call(this, context);\n    }\n}\nFunction.createDelegate = function Function$createDelegate(instance, method) {\n    /// <summary locid=\"M:J#Function.createDelegate\" />\n    /// <param name=\"instance\" mayBeNull=\"true\"></param>\n    /// <param name=\"method\" type=\"Function\"></param>\n    /// <returns type=\"Function\"></returns>\n    var e = Function._validateParams(arguments, [\n        {name: \"instance\", mayBeNull: true},\n        {name: \"method\", type: Function}\n    ]);\n    if (e) throw e;\n    return function() {\n        return method.apply(instance, arguments);\n    }\n}\nFunction.emptyFunction = Function.emptyMethod = function Function$emptyMethod() {\n    /// <summary locid=\"M:J#Function.emptyMethod\" />\n}\nFunction.validateParameters = function Function$validateParameters(parameters, expectedParameters, validateParameterCount) {\n    /// <summary locid=\"M:J#Function.validateParameters\" />\n    /// <param name=\"parameters\"></param>\n    /// <param name=\"expectedParameters\"></param>\n    /// <param name=\"validateParameterCount\" type=\"Boolean\" optional=\"true\"></param>\n    /// <returns type=\"Error\" mayBeNull=\"true\"></returns>\n    var e = Function._validateParams(arguments, [\n        {name: \"parameters\"},\n        {name: \"expectedParameters\"},\n        {name: \"validateParameterCount\", type: Boolean, optional: true}\n    ]);\n    if (e) throw e;\n    return Function._validateParams(parameters, expectedParameters, validateParameterCount);\n}\nFunction._validateParams = function Function$_validateParams(params, expectedParams, validateParameterCount) {\n    var e, expectedLength = expectedParams.length;\n    validateParameterCount = validateParameterCount || (typeof(validateParameterCount) === \"undefined\");\n    e = Function._validateParameterCount(params, expectedParams, validateParameterCount);\n    if (e) {\n        e.popStackFrame();\n        return e;\n    }\n    for (var i = 0, l = params.length; i < l; i++) {\n        var expectedParam = expectedParams[Math.min(i, expectedLength - 1)],\n            paramName = expectedParam.name;\n        if (expectedParam.parameterArray) {\n            paramName += \"[\" + (i - expectedLength + 1) + \"]\";\n        }\n        else if (!validateParameterCount && (i >= expectedLength)) {\n            break;\n        }\n        e = Function._validateParameter(params[i], expectedParam, paramName);\n        if (e) {\n            e.popStackFrame();\n            return e;\n        }\n    }\n    return null;\n}\nFunction._validateParameterCount = function Function$_validateParameterCount(params, expectedParams, validateParameterCount) {\n    var i, error,\n        expectedLen = expectedParams.length,\n        actualLen = params.length;\n    if (actualLen < expectedLen) {\n        var minParams = expectedLen;\n        for (i = 0; i < expectedLen; i++) {\n            var param = expectedParams[i];\n            if (param.optional || param.parameterArray) {\n                minParams--;\n            }\n        }        \n        if (actualLen < minParams) {\n            error = true;\n        }\n    }\n    else if (validateParameterCount && (actualLen > expectedLen)) {\n        error = true;      \n        for (i = 0; i < expectedLen; i++) {\n            if (expectedParams[i].parameterArray) {\n                error = false; \n                break;\n            }\n        }  \n    }\n    if (error) {\n        var e = Error.parameterCount();\n        e.popStackFrame();\n        return e;\n    }\n    return null;\n}\nFunction._validateParameter = function Function$_validateParameter(param, expectedParam, paramName) {\n    var e,\n        expectedType = expectedParam.type,\n        expectedInteger = !!expectedParam.integer,\n        expectedDomElement = !!expectedParam.domElement,\n        mayBeNull = !!expectedParam.mayBeNull;\n    e = Function._validateParameterType(param, expectedType, expectedInteger, expectedDomElement, mayBeNull, paramName);\n    if (e) {\n        e.popStackFrame();\n        return e;\n    }\n    var expectedElementType = expectedParam.elementType,\n        elementMayBeNull = !!expectedParam.elementMayBeNull;\n    if (expectedType === Array && typeof(param) !== \"undefined\" && param !== null &&\n        (expectedElementType || !elementMayBeNull)) {\n        var expectedElementInteger = !!expectedParam.elementInteger,\n            expectedElementDomElement = !!expectedParam.elementDomElement;\n        for (var i=0; i < param.length; i++) {\n            var elem = param[i];\n            e = Function._validateParameterType(elem, expectedElementType,\n                expectedElementInteger, expectedElementDomElement, elementMayBeNull,\n                paramName + \"[\" + i + \"]\");\n            if (e) {\n                e.popStackFrame();\n                return e;\n            }\n        }\n    }\n    return null;\n}\nFunction._validateParameterType = function Function$_validateParameterType(param, expectedType, expectedInteger, expectedDomElement, mayBeNull, paramName) {\n    var e, i;\n    if (typeof(param) === \"undefined\") {\n        if (mayBeNull) {\n            return null;\n        }\n        else {\n            e = Error.argumentUndefined(paramName);\n            e.popStackFrame();\n            return e;\n        }\n    }\n    if (param === null) {\n        if (mayBeNull) {\n            return null;\n        }\n        else {\n            e = Error.argumentNull(paramName);\n            e.popStackFrame();\n            return e;\n        }\n    }\n    if (expectedType && expectedType.__enum) {\n        if (typeof(param) !== 'number') {\n            e = Error.argumentType(paramName, Object.getType(param), expectedType);\n            e.popStackFrame();\n            return e;\n        }\n        if ((param % 1) === 0) {\n            var values = expectedType.prototype;\n            if (!expectedType.__flags || (param === 0)) {\n                for (i in values) {\n                    if (values[i] === param) return null;\n                }\n            }\n            else {\n                var v = param;\n                for (i in values) {\n                    var vali = values[i];\n                    if (vali === 0) continue;\n                    if ((vali & param) === vali) {\n                        v -= vali;\n                    }\n                    if (v === 0) return null;\n                }\n            }\n        }\n        e = Error.argumentOutOfRange(paramName, param, String.format(Sys.Res.enumInvalidValue, param, expectedType.getName()));\n        e.popStackFrame();\n        return e;\n    }\n    if (expectedDomElement && (!Sys._isDomElement(param) || (param.nodeType === 3))) {\n        e = Error.argument(paramName, Sys.Res.argumentDomElement);\n        e.popStackFrame();\n        return e;\n    }\n    if (expectedType && !Sys._isInstanceOfType(expectedType, param)) {\n        e = Error.argumentType(paramName, Object.getType(param), expectedType);\n        e.popStackFrame();\n        return e;\n    }\n    if (expectedType === Number && expectedInteger) {\n        if ((param % 1) !== 0) {\n            e = Error.argumentOutOfRange(paramName, param, Sys.Res.argumentInteger);\n            e.popStackFrame();\n            return e;\n        }\n    }\n    return null;\n}\n \nError.__typeName = 'Error';\nError.__class = true;\nError.create = function Error$create(message, errorInfo) {\n    /// <summary locid=\"M:J#Error.create\" />\n    /// <param name=\"message\" type=\"String\" optional=\"true\" mayBeNull=\"true\"></param>\n    /// <param name=\"errorInfo\" optional=\"true\" mayBeNull=\"true\"></param>\n    /// <returns type=\"Error\"></returns>\n    var e = Function._validateParams(arguments, [\n        {name: \"message\", type: String, mayBeNull: true, optional: true},\n        {name: \"errorInfo\", mayBeNull: true, optional: true}\n    ]);\n    if (e) throw e;\n    var err = new Error(message);\n    err.message = message;\n    if (errorInfo) {\n        for (var v in errorInfo) {\n            err[v] = errorInfo[v];\n        }\n    }\n    err.popStackFrame();\n    return err;\n}\nError.argument = function Error$argument(paramName, message) {\n    /// <summary locid=\"M:J#Error.argument\" />\n    /// <param name=\"paramName\" type=\"String\" optional=\"true\" mayBeNull=\"true\"></param>\n    /// <param name=\"message\" type=\"String\" optional=\"true\" mayBeNull=\"true\"></param>\n    /// <returns></returns>\n    var e = Function._validateParams(arguments, [\n        {name: \"paramName\", type: String, mayBeNull: true, optional: true},\n        {name: \"message\", type: String, mayBeNull: true, optional: true}\n    ]);\n    if (e) throw e;\n    var displayMessage = \"Sys.ArgumentException: \" + (message ? message : Sys.Res.argument);\n    if (paramName) {\n        displayMessage += \"\\n\" + String.format(Sys.Res.paramName, paramName);\n    }\n    var err = Error.create(displayMessage, { name: \"Sys.ArgumentException\", paramName: paramName });\n    err.popStackFrame();\n    return err;\n}\nError.argumentNull = function Error$argumentNull(paramName, message) {\n    /// <summary locid=\"M:J#Error.argumentNull\" />\n    /// <param name=\"paramName\" type=\"String\" optional=\"true\" mayBeNull=\"true\"></param>\n    /// <param name=\"message\" type=\"String\" optional=\"true\" mayBeNull=\"true\"></param>\n    /// <returns></returns>\n    var e = Function._validateParams(arguments, [\n        {name: \"paramName\", type: String, mayBeNull: true, optional: true},\n        {name: \"message\", type: String, mayBeNull: true, optional: true}\n    ]);\n    if (e) throw e;\n    var displayMessage = \"Sys.ArgumentNullException: \" + (message ? message : Sys.Res.argumentNull);\n    if (paramName) {\n        displayMessage += \"\\n\" + String.format(Sys.Res.paramName, paramName);\n    }\n    var err = Error.create(displayMessage, { name: \"Sys.ArgumentNullException\", paramName: paramName });\n    err.popStackFrame();\n    return err;\n}\nError.argumentOutOfRange = function Error$argumentOutOfRange(paramName, actualValue, message) {\n    /// <summary locid=\"M:J#Error.argumentOutOfRange\" />\n    /// <param name=\"paramName\" type=\"String\" optional=\"true\" mayBeNull=\"true\"></param>\n    /// <param name=\"actualValue\" optional=\"true\" mayBeNull=\"true\"></param>\n    /// <param name=\"message\" type=\"String\" optional=\"true\" mayBeNull=\"true\"></param>\n    /// <returns></returns>\n    var e = Function._validateParams(arguments, [\n        {name: \"paramName\", type: String, mayBeNull: true, optional: true},\n        {name: \"actualValue\", mayBeNull: true, optional: true},\n        {name: \"message\", type: String, mayBeNull: true, optional: true}\n    ]);\n    if (e) throw e;\n    var displayMessage = \"Sys.ArgumentOutOfRangeException: \" + (message ? message : Sys.Res.argumentOutOfRange);\n    if (paramName) {\n        displayMessage += \"\\n\" + String.format(Sys.Res.paramName, paramName);\n    }\n    if (typeof(actualValue) !== \"undefined\" && actualValue !== null) {\n        displayMessage += \"\\n\" + String.format(Sys.Res.actualValue, actualValue);\n    }\n    var err = Error.create(displayMessage, {\n        name: \"Sys.ArgumentOutOfRangeException\",\n        paramName: paramName,\n        actualValue: actualValue\n    });\n    err.popStackFrame();\n    return err;\n}\nError.argumentType = function Error$argumentType(paramName, actualType, expectedType, message) {\n    /// <summary locid=\"M:J#Error.argumentType\" />\n    /// <param name=\"paramName\" type=\"String\" optional=\"true\" mayBeNull=\"true\"></param>\n    /// <param name=\"actualType\" type=\"Type\" optional=\"true\" mayBeNull=\"true\"></param>\n    /// <param name=\"expectedType\" type=\"Type\" optional=\"true\" mayBeNull=\"true\"></param>\n    /// <param name=\"message\" type=\"String\" optional=\"true\" mayBeNull=\"true\"></param>\n    /// <returns></returns>\n    var e = Function._validateParams(arguments, [\n        {name: \"paramName\", type: String, mayBeNull: true, optional: true},\n        {name: \"actualType\", type: Type, mayBeNull: true, optional: true},\n        {name: \"expectedType\", type: Type, mayBeNull: true, optional: true},\n        {name: \"message\", type: String, mayBeNull: true, optional: true}\n    ]);\n    if (e) throw e;\n    var displayMessage = \"Sys.ArgumentTypeException: \";\n    if (message) {\n        displayMessage += message;\n    }\n    else if (actualType && expectedType) {\n        displayMessage +=\n            String.format(Sys.Res.argumentTypeWithTypes, actualType.getName(), expectedType.getName());\n    }\n    else {\n        displayMessage += Sys.Res.argumentType;\n    }\n    if (paramName) {\n        displayMessage += \"\\n\" + String.format(Sys.Res.paramName, paramName);\n    }\n    var err = Error.create(displayMessage, {\n        name: \"Sys.ArgumentTypeException\",\n        paramName: paramName,\n        actualType: actualType,\n        expectedType: expectedType\n    });\n    err.popStackFrame();\n    return err;\n}\nError.argumentUndefined = function Error$argumentUndefined(paramName, message) {\n    /// <summary locid=\"M:J#Error.argumentUndefined\" />\n    /// <param name=\"paramName\" type=\"String\" optional=\"true\" mayBeNull=\"true\"></param>\n    /// <param name=\"message\" type=\"String\" optional=\"true\" mayBeNull=\"true\"></param>\n    /// <returns></returns>\n    var e = Function._validateParams(arguments, [\n        {name: \"paramName\", type: String, mayBeNull: true, optional: true},\n        {name: \"message\", type: String, mayBeNull: true, optional: true}\n    ]);\n    if (e) throw e;\n    var displayMessage = \"Sys.ArgumentUndefinedException: \" + (message ? message : Sys.Res.argumentUndefined);\n    if (paramName) {\n        displayMessage += \"\\n\" + String.format(Sys.Res.paramName, paramName);\n    }\n    var err = Error.create(displayMessage, { name: \"Sys.ArgumentUndefinedException\", paramName: paramName });\n    err.popStackFrame();\n    return err;\n}\nError.format = function Error$format(message) {\n    /// <summary locid=\"M:J#Error.format\" />\n    /// <param name=\"message\" type=\"String\" optional=\"true\" mayBeNull=\"true\"></param>\n    /// <returns></returns>\n    var e = Function._validateParams(arguments, [\n        {name: \"message\", type: String, mayBeNull: true, optional: true}\n    ]);\n    if (e) throw e;\n    var displayMessage = \"Sys.FormatException: \" + (message ? message : Sys.Res.format);\n    var err = Error.create(displayMessage, {name: 'Sys.FormatException'});\n    err.popStackFrame();\n    return err;\n}\nError.invalidOperation = function Error$invalidOperation(message) {\n    /// <summary locid=\"M:J#Error.invalidOperation\" />\n    /// <param name=\"message\" type=\"String\" optional=\"true\" mayBeNull=\"true\"></param>\n    /// <returns></returns>\n    var e = Function._validateParams(arguments, [\n        {name: \"message\", type: String, mayBeNull: true, optional: true}\n    ]);\n    if (e) throw e;\n    var displayMessage = \"Sys.InvalidOperationException: \" + (message ? message : Sys.Res.invalidOperation);\n    var err = Error.create(displayMessage, {name: 'Sys.InvalidOperationException'});\n    err.popStackFrame();\n    return err;\n}\nError.notImplemented = function Error$notImplemented(message) {\n    /// <summary locid=\"M:J#Error.notImplemented\" />\n    /// <param name=\"message\" type=\"String\" optional=\"true\" mayBeNull=\"true\"></param>\n    /// <returns></returns>\n    var e = Function._validateParams(arguments, [\n        {name: \"message\", type: String, mayBeNull: true, optional: true}\n    ]);\n    if (e) throw e;\n    var displayMessage = \"Sys.NotImplementedException: \" + (message ? message : Sys.Res.notImplemented);\n    var err = Error.create(displayMessage, {name: 'Sys.NotImplementedException'});\n    err.popStackFrame();\n    return err;\n}\nError.parameterCount = function Error$parameterCount(message) {\n    /// <summary locid=\"M:J#Error.parameterCount\" />\n    /// <param name=\"message\" type=\"String\" optional=\"true\" mayBeNull=\"true\"></param>\n    /// <returns></returns>\n    var e = Function._validateParams(arguments, [\n        {name: \"message\", type: String, mayBeNull: true, optional: true}\n    ]);\n    if (e) throw e;\n    var displayMessage = \"Sys.ParameterCountException: \" + (message ? message : Sys.Res.parameterCount);\n    var err = Error.create(displayMessage, {name: 'Sys.ParameterCountException'});\n    err.popStackFrame();\n    return err;\n}\nError.prototype.popStackFrame = function Error$popStackFrame() {\n    /// <summary locid=\"M:J#checkParam\" />\n    if (arguments.length !== 0) throw Error.parameterCount();\n    if (typeof(this.stack) === \"undefined\" || this.stack === null ||\n        typeof(this.fileName) === \"undefined\" || this.fileName === null ||\n        typeof(this.lineNumber) === \"undefined\" || this.lineNumber === null) {\n        return;\n    }\n    var stackFrames = this.stack.split(\"\\n\");\n    var currentFrame = stackFrames[0];\n    var pattern = this.fileName + \":\" + this.lineNumber;\n    while(typeof(currentFrame) !== \"undefined\" &&\n          currentFrame !== null &&\n          currentFrame.indexOf(pattern) === -1) {\n        stackFrames.shift();\n        currentFrame = stackFrames[0];\n    }\n    var nextFrame = stackFrames[1];\n    if (typeof(nextFrame) === \"undefined\" || nextFrame === null) {\n        return;\n    }\n    var nextFrameParts = nextFrame.match(/@(.*):(\\d+)$/);\n    if (typeof(nextFrameParts) === \"undefined\" || nextFrameParts === null) {\n        return;\n    }\n    this.fileName = nextFrameParts[1];\n    this.lineNumber = parseInt(nextFrameParts[2]);\n    stackFrames.shift();\n    this.stack = stackFrames.join(\"\\n\");\n}\n \nObject.__typeName = 'Object';\nObject.__class = true;\nObject.getType = function Object$getType(instance) {\n    /// <summary locid=\"M:J#Object.getType\" />\n    /// <param name=\"instance\"></param>\n    /// <returns type=\"Type\"></returns>\n    var e = Function._validateParams(arguments, [\n        {name: \"instance\"}\n    ]);\n    if (e) throw e;\n    var ctor = instance.constructor;\n    if (!ctor || (typeof(ctor) !== \"function\") || !ctor.__typeName || (ctor.__typeName === 'Object')) {\n        return Object;\n    }\n    return ctor;\n}\nObject.getTypeName = function Object$getTypeName(instance) {\n    /// <summary locid=\"M:J#Object.getTypeName\" />\n    /// <param name=\"instance\"></param>\n    /// <returns type=\"String\"></returns>\n    var e = Function._validateParams(arguments, [\n        {name: \"instance\"}\n    ]);\n    if (e) throw e;\n    return Object.getType(instance).getName();\n}\n \nString.__typeName = 'String';\nString.__class = true;\nString.prototype.endsWith = function String$endsWith(suffix) {\n    /// <summary locid=\"M:J#String.endsWith\" />\n    /// <param name=\"suffix\" type=\"String\"></param>\n    /// <returns type=\"Boolean\"></returns>\n    var e = Function._validateParams(arguments, [\n        {name: \"suffix\", type: String}\n    ]);\n    if (e) throw e;\n    return (this.substr(this.length - suffix.length) === suffix);\n}\nString.prototype.startsWith = function String$startsWith(prefix) {\n    /// <summary locid=\"M:J#String.startsWith\" />\n    /// <param name=\"prefix\" type=\"String\"></param>\n    /// <returns type=\"Boolean\"></returns>\n    var e = Function._validateParams(arguments, [\n        {name: \"prefix\", type: String}\n    ]);\n    if (e) throw e;\n    return (this.substr(0, prefix.length) === prefix);\n}\nString.prototype.trim = function String$trim() {\n    /// <summary locid=\"M:J#String.trim\" />\n    /// <returns type=\"String\"></returns>\n    if (arguments.length !== 0) throw Error.parameterCount();\n    return this.replace(/^\\s+|\\s+$/g, '');\n}\nString.prototype.trimEnd = function String$trimEnd() {\n    /// <summary locid=\"M:J#String.trimEnd\" />\n    /// <returns type=\"String\"></returns>\n    if (arguments.length !== 0) throw Error.parameterCount();\n    return this.replace(/\\s+$/, '');\n}\nString.prototype.trimStart = function String$trimStart() {\n    /// <summary locid=\"M:J#String.trimStart\" />\n    /// <returns type=\"String\"></returns>\n    if (arguments.length !== 0) throw Error.parameterCount();\n    return this.replace(/^\\s+/, '');\n}\nString.format = function String$format(format, args) {\n    /// <summary locid=\"M:J#String.format\" />\n    /// <param name=\"format\" type=\"String\"></param>\n    /// <param name=\"args\" parameterArray=\"true\" mayBeNull=\"true\"></param>\n    /// <returns type=\"String\"></returns>\n    var e = Function._validateParams(arguments, [\n        {name: \"format\", type: String},\n        {name: \"args\", mayBeNull: true, parameterArray: true}\n    ]);\n    if (e) throw e;\n    return String._toFormattedString(false, arguments);\n}\nString._toFormattedString = function String$_toFormattedString(useLocale, args) {\n    var result = '';\n    var format = args[0];\n    for (var i=0;;) {\n        var open = format.indexOf('{', i);\n        var close = format.indexOf('}', i);\n        if ((open < 0) && (close < 0)) {\n            result += format.slice(i);\n            break;\n        }\n        if ((close > 0) && ((close < open) || (open < 0))) {\n            if (format.charAt(close + 1) !== '}') {\n                throw Error.argument('format', Sys.Res.stringFormatBraceMismatch);\n            }\n            result += format.slice(i, close + 1);\n            i = close + 2;\n            continue;\n        }\n        result += format.slice(i, open);\n        i = open + 1;\n        if (format.charAt(i) === '{') {\n            result += '{';\n            i++;\n            continue;\n        }\n        if (close < 0) throw Error.argument('format', Sys.Res.stringFormatBraceMismatch);\n        var brace = format.substring(i, close);\n        var colonIndex = brace.indexOf(':');\n        var argNumber = parseInt((colonIndex < 0)? brace : brace.substring(0, colonIndex), 10) + 1;\n        if (isNaN(argNumber)) throw Error.argument('format', Sys.Res.stringFormatInvalid);\n        var argFormat = (colonIndex < 0)? '' : brace.substring(colonIndex + 1);\n        var arg = args[argNumber];\n        if (typeof(arg) === \"undefined\" || arg === null) {\n            arg = '';\n        }\n        if (arg.toFormattedString) {\n            result += arg.toFormattedString(argFormat);\n        }\n        else if (useLocale && arg.localeFormat) {\n            result += arg.localeFormat(argFormat);\n        }\n        else if (arg.format) {\n            result += arg.format(argFormat);\n        }\n        else\n            result += arg.toString();\n        i = close + 1;\n    }\n    return result;\n}\n \nBoolean.__typeName = 'Boolean';\nBoolean.__class = true;\nBoolean.parse = function Boolean$parse(value) {\n    /// <summary locid=\"M:J#Boolean.parse\" />\n    /// <param name=\"value\" type=\"String\"></param>\n    /// <returns type=\"Boolean\"></returns>\n    var e = Function._validateParams(arguments, [\n        {name: \"value\", type: String}\n    ], false);\n    if (e) throw e;\n    var v = value.trim().toLowerCase();\n    if (v === 'false') return false;\n    if (v === 'true') return true;\n    throw Error.argumentOutOfRange('value', value, Sys.Res.boolTrueOrFalse);\n}\n \nDate.__typeName = 'Date';\nDate.__class = true;\n \nNumber.__typeName = 'Number';\nNumber.__class = true;\n \nRegExp.__typeName = 'RegExp';\nRegExp.__class = true;\n \nif (!window) this.window = this;\nwindow.Type = Function;\nType.__fullyQualifiedIdentifierRegExp = new RegExp(\"^[^.0-9 \\\\s|,;:&*=+\\\\-()\\\\[\\\\]{}^%#@!~\\\\n\\\\r\\\\t\\\\f\\\\\\\\]([^ \\\\s|,;:&*=+\\\\-()\\\\[\\\\]{}^%#@!~\\\\n\\\\r\\\\t\\\\f\\\\\\\\]*[^. \\\\s|,;:&*=+\\\\-()\\\\[\\\\]{}^%#@!~\\\\n\\\\r\\\\t\\\\f\\\\\\\\])?$\", \"i\");\nType.__identifierRegExp = new RegExp(\"^[^.0-9 \\\\s|,;:&*=+\\\\-()\\\\[\\\\]{}^%#@!~\\\\n\\\\r\\\\t\\\\f\\\\\\\\][^. \\\\s|,;:&*=+\\\\-()\\\\[\\\\]{}^%#@!~\\\\n\\\\r\\\\t\\\\f\\\\\\\\]*$\", \"i\");\nType.prototype.callBaseMethod = function Type$callBaseMethod(instance, name, baseArguments) {\n    /// <summary locid=\"M:J#Type.callBaseMethod\" />\n    /// <param name=\"instance\"></param>\n    /// <param name=\"name\" type=\"String\"></param>\n    /// <param name=\"baseArguments\" type=\"Array\" optional=\"true\" mayBeNull=\"true\" elementMayBeNull=\"true\"></param>\n    /// <returns></returns>\n    var e = Function._validateParams(arguments, [\n        {name: \"instance\"},\n        {name: \"name\", type: String},\n        {name: \"baseArguments\", type: Array, mayBeNull: true, optional: true, elementMayBeNull: true}\n    ]);\n    if (e) throw e;\n    var baseMethod = Sys._getBaseMethod(this, instance, name);\n    if (!baseMethod) throw Error.invalidOperation(String.format(Sys.Res.methodNotFound, name));\n    if (!baseArguments) {\n        return baseMethod.apply(instance);\n    }\n    else {\n        return baseMethod.apply(instance, baseArguments);\n    }\n}\nType.prototype.getBaseMethod = function Type$getBaseMethod(instance, name) {\n    /// <summary locid=\"M:J#Type.getBaseMethod\" />\n    /// <param name=\"instance\"></param>\n    /// <param name=\"name\" type=\"String\"></param>\n    /// <returns type=\"Function\" mayBeNull=\"true\"></returns>\n    var e = Function._validateParams(arguments, [\n        {name: \"instance\"},\n        {name: \"name\", type: String}\n    ]);\n    if (e) throw e;\n    return Sys._getBaseMethod(this, instance, name);\n}\nType.prototype.getBaseType = function Type$getBaseType() {\n    /// <summary locid=\"M:J#Type.getBaseType\" />\n    /// <returns type=\"Type\" mayBeNull=\"true\"></returns>\n    if (arguments.length !== 0) throw Error.parameterCount();\n    return (typeof(this.__baseType) === \"undefined\") ? null : this.__baseType;\n}\nType.prototype.getInterfaces = function Type$getInterfaces() {\n    /// <summary locid=\"M:J#Type.getInterfaces\" />\n    /// <returns type=\"Array\" elementType=\"Type\" mayBeNull=\"false\" elementMayBeNull=\"false\"></returns>\n    if (arguments.length !== 0) throw Error.parameterCount();\n    var result = [];\n    var type = this;\n    while(type) {\n        var interfaces = type.__interfaces;\n        if (interfaces) {\n            for (var i = 0, l = interfaces.length; i < l; i++) {\n                var interfaceType = interfaces[i];\n                if (!Array.contains(result, interfaceType)) {\n                    result[result.length] = interfaceType;\n                }\n            }\n        }\n        type = type.__baseType;\n    }\n    return result;\n}\nType.prototype.getName = function Type$getName() {\n    /// <summary locid=\"M:J#Type.getName\" />\n    /// <returns type=\"String\"></returns>\n    if (arguments.length !== 0) throw Error.parameterCount();\n    return (typeof(this.__typeName) === \"undefined\") ? \"\" : this.__typeName;\n}\nType.prototype.implementsInterface = function Type$implementsInterface(interfaceType) {\n    /// <summary locid=\"M:J#Type.implementsInterface\" />\n    /// <param name=\"interfaceType\" type=\"Type\"></param>\n    /// <returns type=\"Boolean\"></returns>\n    var e = Function._validateParams(arguments, [\n        {name: \"interfaceType\", type: Type}\n    ]);\n    if (e) throw e;\n    this.resolveInheritance();\n    var interfaceName = interfaceType.getName();\n    var cache = this.__interfaceCache;\n    if (cache) {\n        var cacheEntry = cache[interfaceName];\n        if (typeof(cacheEntry) !== 'undefined') return cacheEntry;\n    }\n    else {\n        cache = this.__interfaceCache = {};\n    }\n    var baseType = this;\n    while (baseType) {\n        var interfaces = baseType.__interfaces;\n        if (interfaces) {\n            if (Array.indexOf(interfaces, interfaceType) !== -1) {\n                return cache[interfaceName] = true;\n            }\n        }\n        baseType = baseType.__baseType;\n    }\n    return cache[interfaceName] = false;\n}\nType.prototype.inheritsFrom = function Type$inheritsFrom(parentType) {\n    /// <summary locid=\"M:J#Type.inheritsFrom\" />\n    /// <param name=\"parentType\" type=\"Type\"></param>\n    /// <returns type=\"Boolean\"></returns>\n    var e = Function._validateParams(arguments, [\n        {name: \"parentType\", type: Type}\n    ]);\n    if (e) throw e;\n    this.resolveInheritance();\n    var baseType = this.__baseType;\n    while (baseType) {\n        if (baseType === parentType) {\n            return true;\n        }\n        baseType = baseType.__baseType;\n    }\n    return false;\n}\nType.prototype.initializeBase = function Type$initializeBase(instance, baseArguments) {\n    /// <summary locid=\"M:J#Type.initializeBase\" />\n    /// <param name=\"instance\"></param>\n    /// <param name=\"baseArguments\" type=\"Array\" optional=\"true\" mayBeNull=\"true\" elementMayBeNull=\"true\"></param>\n    /// <returns></returns>\n    var e = Function._validateParams(arguments, [\n        {name: \"instance\"},\n        {name: \"baseArguments\", type: Array, mayBeNull: true, optional: true, elementMayBeNull: true}\n    ]);\n    if (e) throw e;\n    if (!Sys._isInstanceOfType(this, instance)) throw Error.argumentType('instance', Object.getType(instance), this);\n    this.resolveInheritance();\n    if (this.__baseType) {\n        if (!baseArguments) {\n            this.__baseType.apply(instance);\n        }\n        else {\n            this.__baseType.apply(instance, baseArguments);\n        }\n    }\n    return instance;\n}\nType.prototype.isImplementedBy = function Type$isImplementedBy(instance) {\n    /// <summary locid=\"M:J#Type.isImplementedBy\" />\n    /// <param name=\"instance\" mayBeNull=\"true\"></param>\n    /// <returns type=\"Boolean\"></returns>\n    var e = Function._validateParams(arguments, [\n        {name: \"instance\", mayBeNull: true}\n    ]);\n    if (e) throw e;\n    if (typeof(instance) === \"undefined\" || instance === null) return false;\n    var instanceType = Object.getType(instance);\n    return !!(instanceType.implementsInterface && instanceType.implementsInterface(this));\n}\nType.prototype.isInstanceOfType = function Type$isInstanceOfType(instance) {\n    /// <summary locid=\"M:J#Type.isInstanceOfType\" />\n    /// <param name=\"instance\" mayBeNull=\"true\"></param>\n    /// <returns type=\"Boolean\"></returns>\n    var e = Function._validateParams(arguments, [\n        {name: \"instance\", mayBeNull: true}\n    ]);\n    if (e) throw e;\n    return Sys._isInstanceOfType(this, instance);\n}\nType.prototype.registerClass = function Type$registerClass(typeName, baseType, interfaceTypes) {\n    /// <summary locid=\"M:J#Type.registerClass\" />\n    /// <param name=\"typeName\" type=\"String\"></param>\n    /// <param name=\"baseType\" type=\"Type\" optional=\"true\" mayBeNull=\"true\"></param>\n    /// <param name=\"interfaceTypes\" parameterArray=\"true\" type=\"Type\"></param>\n    /// <returns type=\"Type\"></returns>\n    var e = Function._validateParams(arguments, [\n        {name: \"typeName\", type: String},\n        {name: \"baseType\", type: Type, mayBeNull: true, optional: true},\n        {name: \"interfaceTypes\", type: Type, parameterArray: true}\n    ]);\n    if (e) throw e;\n    if (!Type.__fullyQualifiedIdentifierRegExp.test(typeName)) throw Error.argument('typeName', Sys.Res.notATypeName);\n    var parsedName;\n    try {\n        parsedName = eval(typeName);\n    }\n    catch(e) {\n        throw Error.argument('typeName', Sys.Res.argumentTypeName);\n    }\n    if (parsedName !== this) throw Error.argument('typeName', Sys.Res.badTypeName);\n    if (Sys.__registeredTypes[typeName]) throw Error.invalidOperation(String.format(Sys.Res.typeRegisteredTwice, typeName));\n    if ((arguments.length > 1) && (typeof(baseType) === 'undefined')) throw Error.argumentUndefined('baseType');\n    if (baseType && !baseType.__class) throw Error.argument('baseType', Sys.Res.baseNotAClass);\n    this.prototype.constructor = this;\n    this.__typeName = typeName;\n    this.__class = true;\n    if (baseType) {\n        this.__baseType = baseType;\n        this.__basePrototypePending = true;\n    }\n    Sys.__upperCaseTypes[typeName.toUpperCase()] = this;\n    if (interfaceTypes) {\n        this.__interfaces = [];\n        this.resolveInheritance();\n        for (var i = 2, l = arguments.length; i < l; i++) {\n            var interfaceType = arguments[i];\n            if (!interfaceType.__interface) throw Error.argument('interfaceTypes[' + (i - 2) + ']', Sys.Res.notAnInterface);\n            for (var methodName in interfaceType.prototype) {\n                var method = interfaceType.prototype[methodName];\n                if (!this.prototype[methodName]) {\n                    this.prototype[methodName] = method;\n                }\n            }\n            this.__interfaces.push(interfaceType);\n        }\n    }\n    Sys.__registeredTypes[typeName] = true;\n    return this;\n}\nType.prototype.registerInterface = function Type$registerInterface(typeName) {\n    /// <summary locid=\"M:J#Type.registerInterface\" />\n    /// <param name=\"typeName\" type=\"String\"></param>\n    /// <returns type=\"Type\"></returns>\n    var e = Function._validateParams(arguments, [\n        {name: \"typeName\", type: String}\n    ]);\n    if (e) throw e;\n    if (!Type.__fullyQualifiedIdentifierRegExp.test(typeName)) throw Error.argument('typeName', Sys.Res.notATypeName);\n    var parsedName;\n    try {\n        parsedName = eval(typeName);\n    }\n    catch(e) {\n        throw Error.argument('typeName', Sys.Res.argumentTypeName);\n    }\n    if (parsedName !== this) throw Error.argument('typeName', Sys.Res.badTypeName);\n    if (Sys.__registeredTypes[typeName]) throw Error.invalidOperation(String.format(Sys.Res.typeRegisteredTwice, typeName));\n    Sys.__upperCaseTypes[typeName.toUpperCase()] = this;\n    this.prototype.constructor = this;\n    this.__typeName = typeName;\n    this.__interface = true;\n    Sys.__registeredTypes[typeName] = true;\n    return this;\n}\nType.prototype.resolveInheritance = function Type$resolveInheritance() {\n    /// <summary locid=\"M:J#Type.resolveInheritance\" />\n    if (arguments.length !== 0) throw Error.parameterCount();\n    if (this.__basePrototypePending) {\n        var baseType = this.__baseType;\n        baseType.resolveInheritance();\n        for (var memberName in baseType.prototype) {\n            var memberValue = baseType.prototype[memberName];\n            if (!this.prototype[memberName]) {\n                this.prototype[memberName] = memberValue;\n            }\n        }\n        delete this.__basePrototypePending;\n    }\n}\nType.getRootNamespaces = function Type$getRootNamespaces() {\n    /// <summary locid=\"M:J#Type.getRootNamespaces\" />\n    /// <returns type=\"Array\"></returns>\n    if (arguments.length !== 0) throw Error.parameterCount();\n    return Array.clone(Sys.__rootNamespaces);\n}\nType.isClass = function Type$isClass(type) {\n    /// <summary locid=\"M:J#Type.isClass\" />\n    /// <param name=\"type\" mayBeNull=\"true\"></param>\n    /// <returns type=\"Boolean\"></returns>\n    var e = Function._validateParams(arguments, [\n        {name: \"type\", mayBeNull: true}\n    ]);\n    if (e) throw e;\n    if ((typeof(type) === 'undefined') || (type === null)) return false;\n    return !!type.__class;\n}\nType.isInterface = function Type$isInterface(type) {\n    /// <summary locid=\"M:J#Type.isInterface\" />\n    /// <param name=\"type\" mayBeNull=\"true\"></param>\n    /// <returns type=\"Boolean\"></returns>\n    var e = Function._validateParams(arguments, [\n        {name: \"type\", mayBeNull: true}\n    ]);\n    if (e) throw e;\n    if ((typeof(type) === 'undefined') || (type === null)) return false;\n    return !!type.__interface;\n}\nType.isNamespace = function Type$isNamespace(object) {\n    /// <summary locid=\"M:J#Type.isNamespace\" />\n    /// <param name=\"object\" mayBeNull=\"true\"></param>\n    /// <returns type=\"Boolean\"></returns>\n    var e = Function._validateParams(arguments, [\n        {name: \"object\", mayBeNull: true}\n    ]);\n    if (e) throw e;\n    if ((typeof(object) === 'undefined') || (object === null)) return false;\n    return !!object.__namespace;\n}\nType.parse = function Type$parse(typeName, ns) {\n    /// <summary locid=\"M:J#Type.parse\" />\n    /// <param name=\"typeName\" type=\"String\" mayBeNull=\"true\"></param>\n    /// <param name=\"ns\" optional=\"true\" mayBeNull=\"true\"></param>\n    /// <returns type=\"Type\" mayBeNull=\"true\"></returns>\n    var e = Function._validateParams(arguments, [\n        {name: \"typeName\", type: String, mayBeNull: true},\n        {name: \"ns\", mayBeNull: true, optional: true}\n    ]);\n    if (e) throw e;\n    var fn;\n    if (ns) {\n        fn = Sys.__upperCaseTypes[ns.getName().toUpperCase() + '.' + typeName.toUpperCase()];\n        return fn || null;\n    }\n    if (!typeName) return null;\n    if (!Type.__htClasses) {\n        Type.__htClasses = {};\n    }\n    fn = Type.__htClasses[typeName];\n    if (!fn) {\n        fn = eval(typeName);\n        if (typeof(fn) !== 'function') throw Error.argument('typeName', Sys.Res.notATypeName);\n        Type.__htClasses[typeName] = fn;\n    }\n    return fn;\n}\nType.registerNamespace = function Type$registerNamespace(namespacePath) {\n    /// <summary locid=\"M:J#Type.registerNamespace\" />\n    /// <param name=\"namespacePath\" type=\"String\"></param>\n    var e = Function._validateParams(arguments, [\n        {name: \"namespacePath\", type: String}\n    ]);\n    if (e) throw e;\n    Type._registerNamespace(namespacePath);\n}\nType._registerNamespace = function Type$_registerNamespace(namespacePath) {\n    if (!Type.__fullyQualifiedIdentifierRegExp.test(namespacePath)) throw Error.argument('namespacePath', Sys.Res.invalidNameSpace);\n    var rootObject = window;\n    var namespaceParts = namespacePath.split('.');\n    for (var i = 0; i < namespaceParts.length; i++) {\n        var currentPart = namespaceParts[i];\n        var ns = rootObject[currentPart];\n        var nsType = typeof(ns);\n        if ((nsType !== \"undefined\") && (ns !== null)) {\n            if (nsType === \"function\") {\n                throw Error.invalidOperation(String.format(Sys.Res.namespaceContainsClass, namespaceParts.splice(0, i + 1).join('.')));\n            }\n            if ((typeof(ns) !== \"object\") || (ns instanceof Array)) {\n                throw Error.invalidOperation(String.format(Sys.Res.namespaceContainsNonObject, namespaceParts.splice(0, i + 1).join('.')));\n            }\n        }\n        if (!ns) {\n            ns = rootObject[currentPart] = {};\n        }\n        if (!ns.__namespace) {\n            if ((i === 0) && (namespacePath !== \"Sys\")) {\n                Sys.__rootNamespaces[Sys.__rootNamespaces.length] = ns;\n            }\n            ns.__namespace = true;\n            ns.__typeName = namespaceParts.slice(0, i + 1).join('.');\n            var parsedName;\n            try {\n                parsedName = eval(ns.__typeName);\n            }\n            catch(e) {\n                parsedName = null;\n            }\n            if (parsedName !== ns) {\n                delete rootObject[currentPart];\n                throw Error.argument('namespacePath', Sys.Res.invalidNameSpace);\n            }\n            ns.getName = function ns$getName() {return this.__typeName;}\n        }\n        rootObject = ns;\n    }\n}\nType._checkDependency = function Type$_checkDependency(dependency, featureName) {\n    var scripts = Type._registerScript._scripts, isDependent = (scripts ? (!!scripts[dependency]) : false);\n    if ((typeof(featureName) !== 'undefined') && !isDependent) {\n        throw Error.invalidOperation(String.format(Sys.Res.requiredScriptReferenceNotIncluded, \n        featureName, dependency));\n    }\n    return isDependent;\n}\nType._registerScript = function Type$_registerScript(scriptName, dependencies) {\n    var scripts = Type._registerScript._scripts;\n    if (!scripts) {\n        Type._registerScript._scripts = scripts = {};\n    }\n    if (scripts[scriptName]) {\n        throw Error.invalidOperation(String.format(Sys.Res.scriptAlreadyLoaded, scriptName));\n    }\n    scripts[scriptName] = true;\n    if (dependencies) {\n        for (var i = 0, l = dependencies.length; i < l; i++) {\n            var dependency = dependencies[i];\n            if (!Type._checkDependency(dependency)) {\n                throw Error.invalidOperation(String.format(Sys.Res.scriptDependencyNotFound, scriptName, dependency));\n            }\n        }\n    }\n}\nType._registerNamespace(\"Sys\");\nSys.__upperCaseTypes = {};\nSys.__rootNamespaces = [Sys];\nSys.__registeredTypes = {};\nSys._isInstanceOfType = function Sys$_isInstanceOfType(type, instance) {\n    if (typeof(instance) === \"undefined\" || instance === null) return false;\n    if (instance instanceof type) return true;\n    var instanceType = Object.getType(instance);\n    return !!(instanceType === type) ||\n           (instanceType.inheritsFrom && instanceType.inheritsFrom(type)) ||\n           (instanceType.implementsInterface && instanceType.implementsInterface(type));\n}\nSys._getBaseMethod = function Sys$_getBaseMethod(type, instance, name) {\n    if (!Sys._isInstanceOfType(type, instance)) throw Error.argumentType('instance', Object.getType(instance), type);\n    var baseType = type.getBaseType();\n    if (baseType) {\n        var baseMethod = baseType.prototype[name];\n        return (baseMethod instanceof Function) ? baseMethod : null;\n    }\n    return null;\n}\nSys._isDomElement = function Sys$_isDomElement(obj) {\n    var val = false;\n    if (typeof (obj.nodeType) !== 'number') {\n        var doc = obj.ownerDocument || obj.document || obj;\n        if (doc != obj) {\n            var w = doc.defaultView || doc.parentWindow;\n            val = (w != obj);\n        }\n        else {\n            val = (typeof (doc.body) === 'undefined');\n        }\n    }\n    return !val;\n}\n \nArray.__typeName = 'Array';\nArray.__class = true;\nArray.add = Array.enqueue = function Array$enqueue(array, item) {\n    /// <summary locid=\"M:J#Array.enqueue\" />\n    /// <param name=\"array\" type=\"Array\" elementMayBeNull=\"true\"></param>\n    /// <param name=\"item\" mayBeNull=\"true\"></param>\n    var e = Function._validateParams(arguments, [\n        {name: \"array\", type: Array, elementMayBeNull: true},\n        {name: \"item\", mayBeNull: true}\n    ]);\n    if (e) throw e;\n    array[array.length] = item;\n}\nArray.addRange = function Array$addRange(array, items) {\n    /// <summary locid=\"M:J#Array.addRange\" />\n    /// <param name=\"array\" type=\"Array\" elementMayBeNull=\"true\"></param>\n    /// <param name=\"items\" type=\"Array\" elementMayBeNull=\"true\"></param>\n    var e = Function._validateParams(arguments, [\n        {name: \"array\", type: Array, elementMayBeNull: true},\n        {name: \"items\", type: Array, elementMayBeNull: true}\n    ]);\n    if (e) throw e;\n    array.push.apply(array, items);\n}\nArray.clear = function Array$clear(array) {\n    /// <summary locid=\"M:J#Array.clear\" />\n    /// <param name=\"array\" type=\"Array\" elementMayBeNull=\"true\"></param>\n    var e = Function._validateParams(arguments, [\n        {name: \"array\", type: Array, elementMayBeNull: true}\n    ]);\n    if (e) throw e;\n    array.length = 0;\n}\nArray.clone = function Array$clone(array) {\n    /// <summary locid=\"M:J#Array.clone\" />\n    /// <param name=\"array\" type=\"Array\" elementMayBeNull=\"true\"></param>\n    /// <returns type=\"Array\" elementMayBeNull=\"true\"></returns>\n    var e = Function._validateParams(arguments, [\n        {name: \"array\", type: Array, elementMayBeNull: true}\n    ]);\n    if (e) throw e;\n    if (array.length === 1) {\n        return [array[0]];\n    }\n    else {\n        return Array.apply(null, array);\n    }\n}\nArray.contains = function Array$contains(array, item) {\n    /// <summary locid=\"M:J#Array.contains\" />\n    /// <param name=\"array\" type=\"Array\" elementMayBeNull=\"true\"></param>\n    /// <param name=\"item\" mayBeNull=\"true\"></param>\n    /// <returns type=\"Boolean\"></returns>\n    var e = Function._validateParams(arguments, [\n        {name: \"array\", type: Array, elementMayBeNull: true},\n        {name: \"item\", mayBeNull: true}\n    ]);\n    if (e) throw e;\n    return (Sys._indexOf(array, item) >= 0);\n}\nArray.dequeue = function Array$dequeue(array) {\n    /// <summary locid=\"M:J#Array.dequeue\" />\n    /// <param name=\"array\" type=\"Array\" elementMayBeNull=\"true\"></param>\n    /// <returns mayBeNull=\"true\"></returns>\n    var e = Function._validateParams(arguments, [\n        {name: \"array\", type: Array, elementMayBeNull: true}\n    ]);\n    if (e) throw e;\n    return array.shift();\n}\nArray.forEach = function Array$forEach(array, method, instance) {\n    /// <summary locid=\"M:J#Array.forEach\" />\n    /// <param name=\"array\" type=\"Array\" elementMayBeNull=\"true\"></param>\n    /// <param name=\"method\" type=\"Function\"></param>\n    /// <param name=\"instance\" optional=\"true\" mayBeNull=\"true\"></param>\n    var e = Function._validateParams(arguments, [\n        {name: \"array\", type: Array, elementMayBeNull: true},\n        {name: \"method\", type: Function},\n        {name: \"instance\", mayBeNull: true, optional: true}\n    ]);\n    if (e) throw e;\n    for (var i = 0, l = array.length; i < l; i++) {\n        var elt = array[i];\n        if (typeof(elt) !== 'undefined') method.call(instance, elt, i, array);\n    }\n}\nArray.indexOf = function Array$indexOf(array, item, start) {\n    /// <summary locid=\"M:J#Array.indexOf\" />\n    /// <param name=\"array\" type=\"Array\" elementMayBeNull=\"true\"></param>\n    /// <param name=\"item\" optional=\"true\" mayBeNull=\"true\"></param>\n    /// <param name=\"start\" optional=\"true\" mayBeNull=\"true\"></param>\n    /// <returns type=\"Number\"></returns>\n    var e = Function._validateParams(arguments, [\n        {name: \"array\", type: Array, elementMayBeNull: true},\n        {name: \"item\", mayBeNull: true, optional: true},\n        {name: \"start\", mayBeNull: true, optional: true}\n    ]);\n    if (e) throw e;\n    return Sys._indexOf(array, item, start);\n}\nArray.insert = function Array$insert(array, index, item) {\n    /// <summary locid=\"M:J#Array.insert\" />\n    /// <param name=\"array\" type=\"Array\" elementMayBeNull=\"true\"></param>\n    /// <param name=\"index\" mayBeNull=\"true\"></param>\n    /// <param name=\"item\" mayBeNull=\"true\"></param>\n    var e = Function._validateParams(arguments, [\n        {name: \"array\", type: Array, elementMayBeNull: true},\n        {name: \"index\", mayBeNull: true},\n        {name: \"item\", mayBeNull: true}\n    ]);\n    if (e) throw e;\n    array.splice(index, 0, item);\n}\nArray.parse = function Array$parse(value) {\n    /// <summary locid=\"M:J#Array.parse\" />\n    /// <param name=\"value\" type=\"String\" mayBeNull=\"true\"></param>\n    /// <returns type=\"Array\" elementMayBeNull=\"true\"></returns>\n    var e = Function._validateParams(arguments, [\n        {name: \"value\", type: String, mayBeNull: true}\n    ]);\n    if (e) throw e;\n    if (!value) return [];\n    var v = eval(value);\n    if (!Array.isInstanceOfType(v)) throw Error.argument('value', Sys.Res.arrayParseBadFormat);\n    return v;\n}\nArray.remove = function Array$remove(array, item) {\n    /// <summary locid=\"M:J#Array.remove\" />\n    /// <param name=\"array\" type=\"Array\" elementMayBeNull=\"true\"></param>\n    /// <param name=\"item\" mayBeNull=\"true\"></param>\n    /// <returns type=\"Boolean\"></returns>\n    var e = Function._validateParams(arguments, [\n        {name: \"array\", type: Array, elementMayBeNull: true},\n        {name: \"item\", mayBeNull: true}\n    ]);\n    if (e) throw e;\n    var index = Sys._indexOf(array, item);\n    if (index >= 0) {\n        array.splice(index, 1);\n    }\n    return (index >= 0);\n}\nArray.removeAt = function Array$removeAt(array, index) {\n    /// <summary locid=\"M:J#Array.removeAt\" />\n    /// <param name=\"array\" type=\"Array\" elementMayBeNull=\"true\"></param>\n    /// <param name=\"index\" mayBeNull=\"true\"></param>\n    var e = Function._validateParams(arguments, [\n        {name: \"array\", type: Array, elementMayBeNull: true},\n        {name: \"index\", mayBeNull: true}\n    ]);\n    if (e) throw e;\n    array.splice(index, 1);\n}\nSys._indexOf = function Sys$_indexOf(array, item, start) {\n    if (typeof(item) === \"undefined\") return -1;\n    var length = array.length;\n    if (length !== 0) {\n        start = start - 0;\n        if (isNaN(start)) {\n            start = 0;\n        }\n        else {\n            if (isFinite(start)) {\n                start = start - (start % 1);\n            }\n            if (start < 0) {\n                start = Math.max(0, length + start);\n            }\n        }\n        for (var i = start; i < length; i++) {\n            if ((typeof(array[i]) !== \"undefined\") && (array[i] === item)) {\n                return i;\n            }\n        }\n    }\n    return -1;\n}\nType._registerScript._scripts = {\n\t\"MicrosoftAjaxCore.js\": true,\n\t\"MicrosoftAjaxGlobalization.js\": true,\n\t\"MicrosoftAjaxSerialization.js\": true,\n\t\"MicrosoftAjaxComponentModel.js\": true,\n\t\"MicrosoftAjaxHistory.js\": true,\n\t\"MicrosoftAjaxNetwork.js\" : true,\n\t\"MicrosoftAjaxWebServices.js\": true };\n \nSys.IDisposable = function Sys$IDisposable() {\n    throw Error.notImplemented();\n}\n    function Sys$IDisposable$dispose() {\n        throw Error.notImplemented();\n    }\nSys.IDisposable.prototype = {\n    dispose: Sys$IDisposable$dispose\n}\nSys.IDisposable.registerInterface('Sys.IDisposable');\n \nSys.StringBuilder = function Sys$StringBuilder(initialText) {\n    /// <summary locid=\"M:J#Sys.StringBuilder.#ctor\" />\n    /// <param name=\"initialText\" optional=\"true\" mayBeNull=\"true\"></param>\n    var e = Function._validateParams(arguments, [\n        {name: \"initialText\", mayBeNull: true, optional: true}\n    ]);\n    if (e) throw e;\n    this._parts = (typeof(initialText) !== 'undefined' && initialText !== null && initialText !== '') ?\n        [initialText.toString()] : [];\n    this._value = {};\n    this._len = 0;\n}\n    function Sys$StringBuilder$append(text) {\n        /// <summary locid=\"M:J#Sys.StringBuilder.append\" />\n        /// <param name=\"text\" mayBeNull=\"true\"></param>\n        var e = Function._validateParams(arguments, [\n            {name: \"text\", mayBeNull: true}\n        ]);\n        if (e) throw e;\n        this._parts[this._parts.length] = text;\n    }\n    function Sys$StringBuilder$appendLine(text) {\n        /// <summary locid=\"M:J#Sys.StringBuilder.appendLine\" />\n        /// <param name=\"text\" optional=\"true\" mayBeNull=\"true\"></param>\n        var e = Function._validateParams(arguments, [\n            {name: \"text\", mayBeNull: true, optional: true}\n        ]);\n        if (e) throw e;\n        this._parts[this._parts.length] =\n            ((typeof(text) === 'undefined') || (text === null) || (text === '')) ?\n            '\\r\\n' : text + '\\r\\n';\n    }\n    function Sys$StringBuilder$clear() {\n        /// <summary locid=\"M:J#Sys.StringBuilder.clear\" />\n        if (arguments.length !== 0) throw Error.parameterCount();\n        this._parts = [];\n        this._value = {};\n        this._len = 0;\n    }\n    function Sys$StringBuilder$isEmpty() {\n        /// <summary locid=\"M:J#Sys.StringBuilder.isEmpty\" />\n        /// <returns type=\"Boolean\"></returns>\n        if (arguments.length !== 0) throw Error.parameterCount();\n        if (this._parts.length === 0) return true;\n        return this.toString() === '';\n    }\n    function Sys$StringBuilder$toString(separator) {\n        /// <summary locid=\"M:J#Sys.StringBuilder.toString\" />\n        /// <param name=\"separator\" type=\"String\" optional=\"true\" mayBeNull=\"true\"></param>\n        /// <returns type=\"String\"></returns>\n        var e = Function._validateParams(arguments, [\n            {name: \"separator\", type: String, mayBeNull: true, optional: true}\n        ]);\n        if (e) throw e;\n        separator = separator || '';\n        var parts = this._parts;\n        if (this._len !== parts.length) {\n            this._value = {};\n            this._len = parts.length;\n        }\n        var val = this._value;\n        if (typeof(val[separator]) === 'undefined') {\n            if (separator !== '') {\n                for (var i = 0; i < parts.length;) {\n                    if ((typeof(parts[i]) === 'undefined') || (parts[i] === '') || (parts[i] === null)) {\n                        parts.splice(i, 1);\n                    }\n                    else {\n                        i++;\n                    }\n                }\n            }\n            val[separator] = this._parts.join(separator);\n        }\n        return val[separator];\n    }\nSys.StringBuilder.prototype = {\n    append: Sys$StringBuilder$append,\n    appendLine: Sys$StringBuilder$appendLine,\n    clear: Sys$StringBuilder$clear,\n    isEmpty: Sys$StringBuilder$isEmpty,\n    toString: Sys$StringBuilder$toString\n}\nSys.StringBuilder.registerClass('Sys.StringBuilder');\n \nSys.Browser = {};\nSys.Browser.InternetExplorer = {};\nSys.Browser.Firefox = {};\nSys.Browser.Safari = {};\nSys.Browser.Opera = {};\nSys.Browser.agent = null;\nSys.Browser.hasDebuggerStatement = false;\nSys.Browser.name = navigator.appName;\nSys.Browser.version = parseFloat(navigator.appVersion);\nSys.Browser.documentMode = 0;\nif (navigator.userAgent.indexOf(' MSIE ') > -1) {\n    Sys.Browser.agent = Sys.Browser.InternetExplorer;\n    Sys.Browser.version = parseFloat(navigator.userAgent.match(/MSIE (\\d+\\.\\d+)/)[1]);\n    if (Sys.Browser.version >= 8) {\n        if (document.documentMode >= 7) {\n            Sys.Browser.documentMode = document.documentMode;    \n        }\n    }\n    Sys.Browser.hasDebuggerStatement = true;\n}\nelse if (navigator.userAgent.indexOf(' Firefox/') > -1) {\n    Sys.Browser.agent = Sys.Browser.Firefox;\n    Sys.Browser.version = parseFloat(navigator.userAgent.match(/ Firefox\\/(\\d+\\.\\d+)/)[1]);\n    Sys.Browser.name = 'Firefox';\n    Sys.Browser.hasDebuggerStatement = true;\n}\nelse if (navigator.userAgent.indexOf(' AppleWebKit/') > -1) {\n    Sys.Browser.agent = Sys.Browser.Safari;\n    Sys.Browser.version = parseFloat(navigator.userAgent.match(/ AppleWebKit\\/(\\d+(\\.\\d+)?)/)[1]);\n    Sys.Browser.name = 'Safari';\n}\nelse if (navigator.userAgent.indexOf('Opera/') > -1) {\n    Sys.Browser.agent = Sys.Browser.Opera;\n}\n \nSys.EventArgs = function Sys$EventArgs() {\n    /// <summary locid=\"M:J#Sys.EventArgs.#ctor\" />\n    if (arguments.length !== 0) throw Error.parameterCount();\n}\nSys.EventArgs.registerClass('Sys.EventArgs');\nSys.EventArgs.Empty = new Sys.EventArgs();\n \nSys.CancelEventArgs = function Sys$CancelEventArgs() {\n    /// <summary locid=\"M:J#Sys.CancelEventArgs.#ctor\" />\n    if (arguments.length !== 0) throw Error.parameterCount();\n    Sys.CancelEventArgs.initializeBase(this);\n    this._cancel = false;\n}\n    function Sys$CancelEventArgs$get_cancel() {\n        /// <value type=\"Boolean\" locid=\"P:J#Sys.CancelEventArgs.cancel\"></value>\n        if (arguments.length !== 0) throw Error.parameterCount();\n        return this._cancel;\n    }\n    function Sys$CancelEventArgs$set_cancel(value) {\n        var e = Function._validateParams(arguments, [{name: \"value\", type: Boolean}]);\n        if (e) throw e;\n        this._cancel = value;\n    }\nSys.CancelEventArgs.prototype = {\n    get_cancel: Sys$CancelEventArgs$get_cancel,\n    set_cancel: Sys$CancelEventArgs$set_cancel\n}\nSys.CancelEventArgs.registerClass('Sys.CancelEventArgs', Sys.EventArgs);\nType.registerNamespace('Sys.UI');\n \nSys._Debug = function Sys$_Debug() {\n    /// <summary locid=\"M:J#Sys.Debug.#ctor\" />\n    /// <field name=\"isDebug\" type=\"Boolean\" locid=\"F:J#Sys.Debug.isDebug\"></field>\n    if (arguments.length !== 0) throw Error.parameterCount();\n}\n    function Sys$_Debug$_appendConsole(text) {\n        if ((typeof(Debug) !== 'undefined') && Debug.writeln) {\n            Debug.writeln(text);\n        }\n        if (window.console && window.console.log) {\n            window.console.log(text);\n        }\n        if (window.opera) {\n            window.opera.postError(text);\n        }\n        if (window.debugService) {\n            window.debugService.trace(text);\n        }\n    }\n    function Sys$_Debug$_appendTrace(text) {\n        var traceElement = document.getElementById('TraceConsole');\n        if (traceElement && (traceElement.tagName.toUpperCase() === 'TEXTAREA')) {\n            traceElement.value += text + '\\n';\n        }\n    }\n    function Sys$_Debug$assert(condition, message, displayCaller) {\n        /// <summary locid=\"M:J#Sys.Debug.assert\" />\n        /// <param name=\"condition\" type=\"Boolean\"></param>\n        /// <param name=\"message\" type=\"String\" optional=\"true\" mayBeNull=\"true\"></param>\n        /// <param name=\"displayCaller\" type=\"Boolean\" optional=\"true\"></param>\n        var e = Function._validateParams(arguments, [\n            {name: \"condition\", type: Boolean},\n            {name: \"message\", type: String, mayBeNull: true, optional: true},\n            {name: \"displayCaller\", type: Boolean, optional: true}\n        ]);\n        if (e) throw e;\n        if (!condition) {\n            message = (displayCaller && this.assert.caller) ?\n                String.format(Sys.Res.assertFailedCaller, message, this.assert.caller) :\n                String.format(Sys.Res.assertFailed, message);\n            if (confirm(String.format(Sys.Res.breakIntoDebugger, message))) {\n                this.fail(message);\n            }\n        }\n    }\n    function Sys$_Debug$clearTrace() {\n        /// <summary locid=\"M:J#Sys.Debug.clearTrace\" />\n        if (arguments.length !== 0) throw Error.parameterCount();\n        var traceElement = document.getElementById('TraceConsole');\n        if (traceElement && (traceElement.tagName.toUpperCase() === 'TEXTAREA')) {\n            traceElement.value = '';\n        }\n    }\n    function Sys$_Debug$fail(message) {\n        /// <summary locid=\"M:J#Sys.Debug.fail\" />\n        /// <param name=\"message\" type=\"String\" mayBeNull=\"true\"></param>\n        var e = Function._validateParams(arguments, [\n            {name: \"message\", type: String, mayBeNull: true}\n        ]);\n        if (e) throw e;\n        this._appendConsole(message);\n        if (Sys.Browser.hasDebuggerStatement) {\n            eval('debugger');\n        }\n    }\n    function Sys$_Debug$trace(text) {\n        /// <summary locid=\"M:J#Sys.Debug.trace\" />\n        /// <param name=\"text\"></param>\n        var e = Function._validateParams(arguments, [\n            {name: \"text\"}\n        ]);\n        if (e) throw e;\n        this._appendConsole(text);\n        this._appendTrace(text);\n    }\n    function Sys$_Debug$traceDump(object, name) {\n        /// <summary locid=\"M:J#Sys.Debug.traceDump\" />\n        /// <param name=\"object\" mayBeNull=\"true\"></param>\n        /// <param name=\"name\" type=\"String\" mayBeNull=\"true\" optional=\"true\"></param>\n        var e = Function._validateParams(arguments, [\n            {name: \"object\", mayBeNull: true},\n            {name: \"name\", type: String, mayBeNull: true, optional: true}\n        ]);\n        if (e) throw e;\n        var text = this._traceDump(object, name, true);\n    }\n    function Sys$_Debug$_traceDump(object, name, recursive, indentationPadding, loopArray) {\n        name = name? name : 'traceDump';\n        indentationPadding = indentationPadding? indentationPadding : '';\n        if (object === null) {\n            this.trace(indentationPadding + name + ': null');\n            return;\n        }\n        switch(typeof(object)) {\n            case 'undefined':\n                this.trace(indentationPadding + name + ': Undefined');\n                break;\n            case 'number': case 'string': case 'boolean':\n                this.trace(indentationPadding + name + ': ' + object);\n                break;\n            default:\n                if (Date.isInstanceOfType(object) || RegExp.isInstanceOfType(object)) {\n                    this.trace(indentationPadding + name + ': ' + object.toString());\n                    break;\n                }\n                if (!loopArray) {\n                    loopArray = [];\n                }\n                else if (Array.contains(loopArray, object)) {\n                    this.trace(indentationPadding + name + ': ...');\n                    return;\n                }\n                Array.add(loopArray, object);\n                if ((object == window) || (object === document) ||\n                    (window.HTMLElement && (object instanceof HTMLElement)) ||\n                    (typeof(object.nodeName) === 'string')) {\n                    var tag = object.tagName? object.tagName : 'DomElement';\n                    if (object.id) {\n                        tag += ' - ' + object.id;\n                    }\n                    this.trace(indentationPadding + name + ' {' +  tag + '}');\n                }\n                else {\n                    var typeName = Object.getTypeName(object);\n                    this.trace(indentationPadding + name + (typeof(typeName) === 'string' ? ' {' + typeName + '}' : ''));\n                    if ((indentationPadding === '') || recursive) {\n                        indentationPadding += \"    \";\n                        var i, length, properties, p, v;\n                        if (Array.isInstanceOfType(object)) {\n                            length = object.length;\n                            for (i = 0; i < length; i++) {\n                                this._traceDump(object[i], '[' + i + ']', recursive, indentationPadding, loopArray);\n                            }\n                        }\n                        else {\n                            for (p in object) {\n                                v = object[p];\n                                if (!Function.isInstanceOfType(v)) {\n                                    this._traceDump(v, p, recursive, indentationPadding, loopArray);\n                                }\n                            }\n                        }\n                    }\n                }\n                Array.remove(loopArray, object);\n        }\n    }\nSys._Debug.prototype = {\n    _appendConsole: Sys$_Debug$_appendConsole,\n    _appendTrace: Sys$_Debug$_appendTrace,\n    assert: Sys$_Debug$assert,\n    clearTrace: Sys$_Debug$clearTrace,\n    fail: Sys$_Debug$fail,\n    trace: Sys$_Debug$trace,\n    traceDump: Sys$_Debug$traceDump,\n    _traceDump: Sys$_Debug$_traceDump\n}\nSys._Debug.registerClass('Sys._Debug');\nSys.Debug = new Sys._Debug();\n    Sys.Debug.isDebug = true;\n \nfunction Sys$Enum$parse(value, ignoreCase) {\n    /// <summary locid=\"M:J#Sys.Enum.parse\" />\n    /// <param name=\"value\" type=\"String\"></param>\n    /// <param name=\"ignoreCase\" type=\"Boolean\" optional=\"true\"></param>\n    /// <returns></returns>\n    var e = Function._validateParams(arguments, [\n        {name: \"value\", type: String},\n        {name: \"ignoreCase\", type: Boolean, optional: true}\n    ]);\n    if (e) throw e;\n    var values, parsed, val;\n    if (ignoreCase) {\n        values = this.__lowerCaseValues;\n        if (!values) {\n            this.__lowerCaseValues = values = {};\n            var prototype = this.prototype;\n            for (var name in prototype) {\n                values[name.toLowerCase()] = prototype[name];\n            }\n        }\n    }\n    else {\n        values = this.prototype;\n    }\n    if (!this.__flags) {\n        val = (ignoreCase ? value.toLowerCase() : value);\n        parsed = values[val.trim()];\n        if (typeof(parsed) !== 'number') throw Error.argument('value', String.format(Sys.Res.enumInvalidValue, value, this.__typeName));\n        return parsed;\n    }\n    else {\n        var parts = (ignoreCase ? value.toLowerCase() : value).split(',');\n        var v = 0;\n        for (var i = parts.length - 1; i >= 0; i--) {\n            var part = parts[i].trim();\n            parsed = values[part];\n            if (typeof(parsed) !== 'number') throw Error.argument('value', String.format(Sys.Res.enumInvalidValue, value.split(',')[i].trim(), this.__typeName));\n            v |= parsed;\n        }\n        return v;\n    }\n}\nfunction Sys$Enum$toString(value) {\n    /// <summary locid=\"M:J#Sys.Enum.toString\" />\n    /// <param name=\"value\" optional=\"true\" mayBeNull=\"true\"></param>\n    /// <returns type=\"String\"></returns>\n    var e = Function._validateParams(arguments, [\n        {name: \"value\", mayBeNull: true, optional: true}\n    ]);\n    if (e) throw e;\n    if ((typeof(value) === 'undefined') || (value === null)) return this.__string;\n    if ((typeof(value) != 'number') || ((value % 1) !== 0)) throw Error.argumentType('value', Object.getType(value), this);\n    var values = this.prototype;\n    var i;\n    if (!this.__flags || (value === 0)) {\n        for (i in values) {\n            if (values[i] === value) {\n                return i;\n            }\n        }\n    }\n    else {\n        var sorted = this.__sortedValues;\n        if (!sorted) {\n            sorted = [];\n            for (i in values) {\n                sorted[sorted.length] = {key: i, value: values[i]};\n            }\n            sorted.sort(function(a, b) {\n                return a.value - b.value;\n            });\n            this.__sortedValues = sorted;\n        }\n        var parts = [];\n        var v = value;\n        for (i = sorted.length - 1; i >= 0; i--) {\n            var kvp = sorted[i];\n            var vali = kvp.value;\n            if (vali === 0) continue;\n            if ((vali & value) === vali) {\n                parts[parts.length] = kvp.key;\n                v -= vali;\n                if (v === 0) break;\n            }\n        }\n        if (parts.length && v === 0) return parts.reverse().join(', ');\n    }\n    throw Error.argumentOutOfRange('value', value, String.format(Sys.Res.enumInvalidValue, value, this.__typeName));\n}\nType.prototype.registerEnum = function Type$registerEnum(name, flags) {\n    /// <summary locid=\"M:J#Sys.UI.LineType.#ctor\" />\n    /// <param name=\"name\" type=\"String\"></param>\n    /// <param name=\"flags\" type=\"Boolean\" optional=\"true\"></param>\n    var e = Function._validateParams(arguments, [\n        {name: \"name\", type: String},\n        {name: \"flags\", type: Boolean, optional: true}\n    ]);\n    if (e) throw e;\n    if (!Type.__fullyQualifiedIdentifierRegExp.test(name)) throw Error.argument('name', Sys.Res.notATypeName);\n    var parsedName;\n    try {\n        parsedName = eval(name);\n    }\n    catch(e) {\n        throw Error.argument('name', Sys.Res.argumentTypeName);\n    }\n    if (parsedName !== this) throw Error.argument('name', Sys.Res.badTypeName);\n    if (Sys.__registeredTypes[name]) throw Error.invalidOperation(String.format(Sys.Res.typeRegisteredTwice, name));\n    for (var j in this.prototype) {\n        var val = this.prototype[j];\n        if (!Type.__identifierRegExp.test(j)) throw Error.invalidOperation(String.format(Sys.Res.enumInvalidValueName, j));\n        if (typeof(val) !== 'number' || (val % 1) !== 0) throw Error.invalidOperation(Sys.Res.enumValueNotInteger);\n        if (typeof(this[j]) !== 'undefined') throw Error.invalidOperation(String.format(Sys.Res.enumReservedName, j));\n    }\n    Sys.__upperCaseTypes[name.toUpperCase()] = this;\n    for (var i in this.prototype) {\n        this[i] = this.prototype[i];\n    }\n    this.__typeName = name;\n    this.parse = Sys$Enum$parse;\n    this.__string = this.toString();\n    this.toString = Sys$Enum$toString;\n    this.__flags = flags;\n    this.__enum = true;\n    Sys.__registeredTypes[name] = true;\n}\nType.isEnum = function Type$isEnum(type) {\n    /// <summary locid=\"M:J#Type.isEnum\" />\n    /// <param name=\"type\" mayBeNull=\"true\"></param>\n    /// <returns type=\"Boolean\"></returns>\n    var e = Function._validateParams(arguments, [\n        {name: \"type\", mayBeNull: true}\n    ]);\n    if (e) throw e;\n    if ((typeof(type) === 'undefined') || (type === null)) return false;\n    return !!type.__enum;\n}\nType.isFlags = function Type$isFlags(type) {\n    /// <summary locid=\"M:J#Type.isFlags\" />\n    /// <param name=\"type\" mayBeNull=\"true\"></param>\n    /// <returns type=\"Boolean\"></returns>\n    var e = Function._validateParams(arguments, [\n        {name: \"type\", mayBeNull: true}\n    ]);\n    if (e) throw e;\n    if ((typeof(type) === 'undefined') || (type === null)) return false;\n    return !!type.__flags;\n}\nSys.CollectionChange = function Sys$CollectionChange(action, newItems, newStartingIndex, oldItems, oldStartingIndex) {\n    /// <summary locid=\"M:J#Sys.CollectionChange.#ctor\" />\n    /// <param name=\"action\" type=\"Sys.NotifyCollectionChangedAction\"></param>\n    /// <param name=\"newItems\" optional=\"true\" mayBeNull=\"true\"></param>\n    /// <param name=\"newStartingIndex\" type=\"Number\" integer=\"true\" optional=\"true\" mayBeNull=\"true\"></param>\n    /// <param name=\"oldItems\" optional=\"true\" mayBeNull=\"true\"></param>\n    /// <param name=\"oldStartingIndex\" type=\"Number\" integer=\"true\" optional=\"true\" mayBeNull=\"true\"></param>\n    /// <field name=\"action\" type=\"Sys.NotifyCollectionChangedAction\" locid=\"F:J#Sys.CollectionChange.action\"></field>\n    /// <field name=\"newItems\" type=\"Array\" mayBeNull=\"true\" elementMayBeNull=\"true\" locid=\"F:J#Sys.CollectionChange.newItems\"></field>\n    /// <field name=\"newStartingIndex\" type=\"Number\" integer=\"true\" locid=\"F:J#Sys.CollectionChange.newStartingIndex\"></field>\n    /// <field name=\"oldItems\" type=\"Array\" mayBeNull=\"true\" elementMayBeNull=\"true\" locid=\"F:J#Sys.CollectionChange.oldItems\"></field>\n    /// <field name=\"oldStartingIndex\" type=\"Number\" integer=\"true\" locid=\"F:J#Sys.CollectionChange.oldStartingIndex\"></field>\n    var e = Function._validateParams(arguments, [\n        {name: \"action\", type: Sys.NotifyCollectionChangedAction},\n        {name: \"newItems\", mayBeNull: true, optional: true},\n        {name: \"newStartingIndex\", type: Number, mayBeNull: true, integer: true, optional: true},\n        {name: \"oldItems\", mayBeNull: true, optional: true},\n        {name: \"oldStartingIndex\", type: Number, mayBeNull: true, integer: true, optional: true}\n    ]);\n    if (e) throw e;\n    this.action = action;\n    if (newItems) {\n        if (!(newItems instanceof Array)) {\n            newItems = [newItems];\n        }\n    }\n    this.newItems = newItems || null;\n    if (typeof newStartingIndex !== \"number\") {\n        newStartingIndex = -1;\n    }\n    this.newStartingIndex = newStartingIndex;\n    if (oldItems) {\n        if (!(oldItems instanceof Array)) {\n            oldItems = [oldItems];\n        }\n    }\n    this.oldItems = oldItems || null;\n    if (typeof oldStartingIndex !== \"number\") {\n        oldStartingIndex = -1;\n    }\n    this.oldStartingIndex = oldStartingIndex;\n}\nSys.CollectionChange.registerClass(\"Sys.CollectionChange\");\nSys.NotifyCollectionChangedAction = function Sys$NotifyCollectionChangedAction() {\n    /// <summary locid=\"M:J#Sys.NotifyCollectionChangedAction.#ctor\" />\n    /// <field name=\"add\" type=\"Number\" integer=\"true\" static=\"true\" locid=\"F:J#Sys.NotifyCollectionChangedAction.add\"></field>\n    /// <field name=\"remove\" type=\"Number\" integer=\"true\" static=\"true\" locid=\"F:J#Sys.NotifyCollectionChangedAction.remove\"></field>\n    /// <field name=\"reset\" type=\"Number\" integer=\"true\" static=\"true\" locid=\"F:J#Sys.NotifyCollectionChangedAction.reset\"></field>\n    if (arguments.length !== 0) throw Error.parameterCount();\n    throw Error.notImplemented();\n}\nSys.NotifyCollectionChangedAction.prototype = {\n    add: 0,\n    remove: 1,\n    reset: 2\n}\nSys.NotifyCollectionChangedAction.registerEnum('Sys.NotifyCollectionChangedAction');\nSys.NotifyCollectionChangedEventArgs = function Sys$NotifyCollectionChangedEventArgs(changes) {\n    /// <summary locid=\"M:J#Sys.NotifyCollectionChangedEventArgs.#ctor\" />\n    /// <param name=\"changes\" type=\"Array\" elementType=\"Sys.CollectionChange\"></param>\n    var e = Function._validateParams(arguments, [\n        {name: \"changes\", type: Array, elementType: Sys.CollectionChange}\n    ]);\n    if (e) throw e;\n    this._changes = changes;\n    Sys.NotifyCollectionChangedEventArgs.initializeBase(this);\n}\n    function Sys$NotifyCollectionChangedEventArgs$get_changes() {\n        /// <value type=\"Array\" elementType=\"Sys.CollectionChange\" locid=\"P:J#Sys.NotifyCollectionChangedEventArgs.changes\"></value>\n        if (arguments.length !== 0) throw Error.parameterCount();\n        return this._changes || [];\n    }\nSys.NotifyCollectionChangedEventArgs.prototype = {\n    get_changes: Sys$NotifyCollectionChangedEventArgs$get_changes\n}\nSys.NotifyCollectionChangedEventArgs.registerClass(\"Sys.NotifyCollectionChangedEventArgs\", Sys.EventArgs);\nSys.Observer = function Sys$Observer() {\n    throw Error.invalidOperation();\n}\nSys.Observer.registerClass(\"Sys.Observer\");\nSys.Observer.makeObservable = function Sys$Observer$makeObservable(target) {\n    /// <summary locid=\"M:J#Sys.Observer.makeObservable\" />\n    /// <param name=\"target\" mayBeNull=\"false\"></param>\n    /// <returns></returns>\n    var e = Function._validateParams(arguments, [\n        {name: \"target\"}\n    ]);\n    if (e) throw e;\n    var isArray = target instanceof Array,\n        o = Sys.Observer;\n    Sys.Observer._ensureObservable(target);\n    if (target.setValue === o._observeMethods.setValue) return target;\n    o._addMethods(target, o._observeMethods);\n    if (isArray) {\n        o._addMethods(target, o._arrayMethods);\n    }\n    return target;\n}\nSys.Observer._ensureObservable = function Sys$Observer$_ensureObservable(target) {\n    var type = typeof target;\n    if ((type === \"string\") || (type === \"number\") || (type === \"boolean\") || (type === \"date\")) {\n        throw Error.invalidOperation(String.format(Sys.Res.notObservable, type));\n    }\n}\nSys.Observer._addMethods = function Sys$Observer$_addMethods(target, methods) {\n    for (var m in methods) {\n        if (target[m] && (target[m] !== methods[m])) {\n            throw Error.invalidOperation(String.format(Sys.Res.observableConflict, m));\n        }\n        target[m] = methods[m];\n    }\n}\nSys.Observer._addEventHandler = function Sys$Observer$_addEventHandler(target, eventName, handler) {\n    Sys.Observer._getContext(target, true).events._addHandler(eventName, handler);\n}\nSys.Observer.addEventHandler = function Sys$Observer$addEventHandler(target, eventName, handler) {\n    /// <summary locid=\"M:J#Sys.Observer.addEventHandler\" />\n    /// <param name=\"target\"></param>\n    /// <param name=\"eventName\" type=\"String\"></param>\n    /// <param name=\"handler\" type=\"Function\"></param>\n    var e = Function._validateParams(arguments, [\n        {name: \"target\"},\n        {name: \"eventName\", type: String},\n        {name: \"handler\", type: Function}\n    ]);\n    if (e) throw e;\n    Sys.Observer._ensureObservable(target);\n    Sys.Observer._addEventHandler(target, eventName, handler);\n}\nSys.Observer._removeEventHandler = function Sys$Observer$_removeEventHandler(target, eventName, handler) {\n    Sys.Observer._getContext(target, true).events._removeHandler(eventName, handler);\n}\nSys.Observer.removeEventHandler = function Sys$Observer$removeEventHandler(target, eventName, handler) {\n    /// <summary locid=\"M:J#Sys.Observer.removeEventHandler\" />\n    /// <param name=\"target\"></param>\n    /// <param name=\"eventName\" type=\"String\"></param>\n    /// <param name=\"handler\" type=\"Function\"></param>\n    var e = Function._validateParams(arguments, [\n        {name: \"target\"},\n        {name: \"eventName\", type: String},\n        {name: \"handler\", type: Function}\n    ]);\n    if (e) throw e;\n    Sys.Observer._ensureObservable(target);\n    Sys.Observer._removeEventHandler(target, eventName, handler);\n}\nSys.Observer.raiseEvent = function Sys$Observer$raiseEvent(target, eventName, eventArgs) {\n    /// <summary locid=\"M:J#Sys.Observer.raiseEvent\" />\n    /// <param name=\"target\"></param>\n    /// <param name=\"eventName\" type=\"String\"></param>\n    /// <param name=\"eventArgs\" type=\"Sys.EventArgs\"></param>\n    var e = Function._validateParams(arguments, [\n        {name: \"target\"},\n        {name: \"eventName\", type: String},\n        {name: \"eventArgs\", type: Sys.EventArgs}\n    ]);\n    if (e) throw e;\n    Sys.Observer._ensureObservable(target);\n    var ctx = Sys.Observer._getContext(target);\n    if (!ctx) return;\n    var handler = ctx.events.getHandler(eventName);\n    if (handler) {\n        handler(target, eventArgs);\n    }\n}\nSys.Observer.addPropertyChanged = function Sys$Observer$addPropertyChanged(target, handler) {\n    /// <summary locid=\"M:J#Sys.Observer.addPropertyChanged\" />\n    /// <param name=\"target\" mayBeNull=\"false\"></param>\n    /// <param name=\"handler\" type=\"Function\"></param>\n    var e = Function._validateParams(arguments, [\n        {name: \"target\"},\n        {name: \"handler\", type: Function}\n    ]);\n    if (e) throw e;\n    Sys.Observer._ensureObservable(target);\n    Sys.Observer._addEventHandler(target, \"propertyChanged\", handler);\n}\nSys.Observer.removePropertyChanged = function Sys$Observer$removePropertyChanged(target, handler) {\n    /// <summary locid=\"M:J#Sys.Observer.removePropertyChanged\" />\n    /// <param name=\"target\" mayBeNull=\"false\"></param>\n    /// <param name=\"handler\" type=\"Function\"></param>\n    var e = Function._validateParams(arguments, [\n        {name: \"target\"},\n        {name: \"handler\", type: Function}\n    ]);\n    if (e) throw e;\n    Sys.Observer._ensureObservable(target);\n    Sys.Observer._removeEventHandler(target, \"propertyChanged\", handler);\n}\nSys.Observer.beginUpdate = function Sys$Observer$beginUpdate(target) {\n    /// <summary locid=\"M:J#Sys.Observer.beginUpdate\" />\n    /// <param name=\"target\" mayBeNull=\"false\"></param>\n    var e = Function._validateParams(arguments, [\n        {name: \"target\"}\n    ]);\n    if (e) throw e;\n    Sys.Observer._ensureObservable(target);\n    Sys.Observer._getContext(target, true).updating = true;\n}\nSys.Observer.endUpdate = function Sys$Observer$endUpdate(target) {\n    /// <summary locid=\"M:J#Sys.Observer.endUpdate\" />\n    /// <param name=\"target\" mayBeNull=\"false\"></param>\n    var e = Function._validateParams(arguments, [\n        {name: \"target\"}\n    ]);\n    if (e) throw e;\n    Sys.Observer._ensureObservable(target);\n    var ctx = Sys.Observer._getContext(target);\n    if (!ctx || !ctx.updating) return;\n    ctx.updating = false;\n    var dirty = ctx.dirty;\n    ctx.dirty = false;\n    if (dirty) {\n        if (target instanceof Array) {\n            var changes = ctx.changes;\n            ctx.changes = null;\n            Sys.Observer.raiseCollectionChanged(target, changes);\n        }\n        Sys.Observer.raisePropertyChanged(target, \"\");\n    }\n}\nSys.Observer.isUpdating = function Sys$Observer$isUpdating(target) {\n    /// <summary locid=\"M:J#Sys.Observer.isUpdating\" />\n    /// <param name=\"target\" mayBeNull=\"false\"></param>\n    /// <returns type=\"Boolean\"></returns>\n    var e = Function._validateParams(arguments, [\n        {name: \"target\"}\n    ]);\n    if (e) throw e;\n    Sys.Observer._ensureObservable(target);\n    var ctx = Sys.Observer._getContext(target);\n    return ctx ? ctx.updating : false;\n}\nSys.Observer._setValue = function Sys$Observer$_setValue(target, propertyName, value) {\n    var getter, setter, mainTarget = target, path = propertyName.split('.');\n    for (var i = 0, l = (path.length - 1); i < l ; i++) {\n        var name = path[i];\n        getter = target[\"get_\" + name]; \n        if (typeof (getter) === \"function\") {\n            target = getter.call(target);\n        }\n        else {\n            target = target[name];\n        }\n        var type = typeof (target);\n        if ((target === null) || (type === \"undefined\")) {\n            throw Error.invalidOperation(String.format(Sys.Res.nullReferenceInPath, propertyName));\n        }\n    }    \n    var currentValue, lastPath = path[l];\n    getter = target[\"get_\" + lastPath];\n    setter = target[\"set_\" + lastPath];\n    if (typeof(getter) === 'function') {\n        currentValue = getter.call(target);\n    }\n    else {\n        currentValue = target[lastPath];\n    }\n    if (typeof(setter) === 'function') {\n        setter.call(target, value);\n    }\n    else {\n        target[lastPath] = value;\n    }\n    if (currentValue !== value) {\n        var ctx = Sys.Observer._getContext(mainTarget);\n        if (ctx && ctx.updating) {\n            ctx.dirty = true;\n            return;\n        };\n        Sys.Observer.raisePropertyChanged(mainTarget, path[0]);\n    }\n}\nSys.Observer.setValue = function Sys$Observer$setValue(target, propertyName, value) {\n    /// <summary locid=\"M:J#Sys.Observer.setValue\" />\n    /// <param name=\"target\" mayBeNull=\"false\"></param>\n    /// <param name=\"propertyName\" type=\"String\"></param>\n    /// <param name=\"value\" mayBeNull=\"true\"></param>\n    var e = Function._validateParams(arguments, [\n        {name: \"target\"},\n        {name: \"propertyName\", type: String},\n        {name: \"value\", mayBeNull: true}\n    ]);\n    if (e) throw e;\n    Sys.Observer._ensureObservable(target);\n    Sys.Observer._setValue(target, propertyName, value);\n}\nSys.Observer.raisePropertyChanged = function Sys$Observer$raisePropertyChanged(target, propertyName) {\n    /// <summary locid=\"M:J#Sys.Observer.raisePropertyChanged\" />\n    /// <param name=\"target\" mayBeNull=\"false\"></param>\n    /// <param name=\"propertyName\" type=\"String\"></param>\n    Sys.Observer.raiseEvent(target, \"propertyChanged\", new Sys.PropertyChangedEventArgs(propertyName));\n}\nSys.Observer.addCollectionChanged = function Sys$Observer$addCollectionChanged(target, handler) {\n    /// <summary locid=\"M:J#Sys.Observer.addCollectionChanged\" />\n    /// <param name=\"target\" type=\"Array\" elementMayBeNull=\"true\"></param>\n    /// <param name=\"handler\" type=\"Function\"></param>\n    var e = Function._validateParams(arguments, [\n        {name: \"target\", type: Array, elementMayBeNull: true},\n        {name: \"handler\", type: Function}\n    ]);\n    if (e) throw e;\n    Sys.Observer._addEventHandler(target, \"collectionChanged\", handler);\n}\nSys.Observer.removeCollectionChanged = function Sys$Observer$removeCollectionChanged(target, handler) {\n    /// <summary locid=\"M:J#Sys.Observer.removeCollectionChanged\" />\n    /// <param name=\"target\" type=\"Array\" elementMayBeNull=\"true\"></param>\n    /// <param name=\"handler\" type=\"Function\"></param>\n    var e = Function._validateParams(arguments, [\n        {name: \"target\", type: Array, elementMayBeNull: true},\n        {name: \"handler\", type: Function}\n    ]);\n    if (e) throw e;\n    Sys.Observer._removeEventHandler(target, \"collectionChanged\", handler);\n}\nSys.Observer._collectionChange = function Sys$Observer$_collectionChange(target, change) {\n    var ctx = Sys.Observer._getContext(target);\n    if (ctx && ctx.updating) {\n        ctx.dirty = true;\n        var changes = ctx.changes;\n        if (!changes) {\n            ctx.changes = changes = [change];\n        }\n        else {\n            changes.push(change);\n        }\n    }\n    else {\n        Sys.Observer.raiseCollectionChanged(target, [change]);\n        Sys.Observer.raisePropertyChanged(target, 'length');\n    }\n}\nSys.Observer.add = function Sys$Observer$add(target, item) {\n    /// <summary locid=\"M:J#Sys.Observer.add\" />\n    /// <param name=\"target\" type=\"Array\" elementMayBeNull=\"true\"></param>\n    /// <param name=\"item\" mayBeNull=\"true\"></param>\n    var e = Function._validateParams(arguments, [\n        {name: \"target\", type: Array, elementMayBeNull: true},\n        {name: \"item\", mayBeNull: true}\n    ]);\n    if (e) throw e;\n    var change = new Sys.CollectionChange(Sys.NotifyCollectionChangedAction.add, [item], target.length);\n    Array.add(target, item);\n    Sys.Observer._collectionChange(target, change);\n}\nSys.Observer.addRange = function Sys$Observer$addRange(target, items) {\n    /// <summary locid=\"M:J#Sys.Observer.addRange\" />\n    /// <param name=\"target\" type=\"Array\" elementMayBeNull=\"true\"></param>\n    /// <param name=\"items\" type=\"Array\" elementMayBeNull=\"true\"></param>\n    var e = Function._validateParams(arguments, [\n        {name: \"target\", type: Array, elementMayBeNull: true},\n        {name: \"items\", type: Array, elementMayBeNull: true}\n    ]);\n    if (e) throw e;\n    var change = new Sys.CollectionChange(Sys.NotifyCollectionChangedAction.add, items, target.length);\n    Array.addRange(target, items);\n    Sys.Observer._collectionChange(target, change);\n}\nSys.Observer.clear = function Sys$Observer$clear(target) {\n    /// <summary locid=\"M:J#Sys.Observer.clear\" />\n    /// <param name=\"target\" type=\"Array\" elementMayBeNull=\"true\"></param>\n    var e = Function._validateParams(arguments, [\n        {name: \"target\", type: Array, elementMayBeNull: true}\n    ]);\n    if (e) throw e;\n    var oldItems = Array.clone(target);\n    Array.clear(target);\n    Sys.Observer._collectionChange(target, new Sys.CollectionChange(Sys.NotifyCollectionChangedAction.reset, null, -1, oldItems, 0));\n}\nSys.Observer.insert = function Sys$Observer$insert(target, index, item) {\n    /// <summary locid=\"M:J#Sys.Observer.insert\" />\n    /// <param name=\"target\" type=\"Array\" elementMayBeNull=\"true\"></param>\n    /// <param name=\"index\" type=\"Number\" integer=\"true\"></param>\n    /// <param name=\"item\" mayBeNull=\"true\"></param>\n    var e = Function._validateParams(arguments, [\n        {name: \"target\", type: Array, elementMayBeNull: true},\n        {name: \"index\", type: Number, integer: true},\n        {name: \"item\", mayBeNull: true}\n    ]);\n    if (e) throw e;\n    Array.insert(target, index, item);\n    Sys.Observer._collectionChange(target, new Sys.CollectionChange(Sys.NotifyCollectionChangedAction.add, [item], index));\n}\nSys.Observer.remove = function Sys$Observer$remove(target, item) {\n    /// <summary locid=\"M:J#Sys.Observer.remove\" />\n    /// <param name=\"target\" type=\"Array\" elementMayBeNull=\"true\"></param>\n    /// <param name=\"item\" mayBeNull=\"true\"></param>\n    /// <returns type=\"Boolean\"></returns>\n    var e = Function._validateParams(arguments, [\n        {name: \"target\", type: Array, elementMayBeNull: true},\n        {name: \"item\", mayBeNull: true}\n    ]);\n    if (e) throw e;\n    var index = Array.indexOf(target, item);\n    if (index !== -1) {\n        Array.remove(target, item);\n        Sys.Observer._collectionChange(target, new Sys.CollectionChange(Sys.NotifyCollectionChangedAction.remove, null, -1, [item], index));\n        return true;\n    }\n    return false;\n}\nSys.Observer.removeAt = function Sys$Observer$removeAt(target, index) {\n    /// <summary locid=\"M:J#Sys.Observer.removeAt\" />\n    /// <param name=\"target\" type=\"Array\" elementMayBeNull=\"true\"></param>\n    /// <param name=\"index\" type=\"Number\" integer=\"true\"></param>\n    var e = Function._validateParams(arguments, [\n        {name: \"target\", type: Array, elementMayBeNull: true},\n        {name: \"index\", type: Number, integer: true}\n    ]);\n    if (e) throw e;\n    if ((index > -1) && (index < target.length)) {\n        var item = target[index];\n        Array.removeAt(target, index);\n        Sys.Observer._collectionChange(target, new Sys.CollectionChange(Sys.NotifyCollectionChangedAction.remove, null, -1, [item], index));\n    }\n}\nSys.Observer.raiseCollectionChanged = function Sys$Observer$raiseCollectionChanged(target, changes) {\n    /// <summary locid=\"M:J#Sys.Observer.raiseCollectionChanged\" />\n    /// <param name=\"target\"></param>\n    /// <param name=\"changes\" type=\"Array\" elementType=\"Sys.CollectionChange\"></param>\n    Sys.Observer.raiseEvent(target, \"collectionChanged\", new Sys.NotifyCollectionChangedEventArgs(changes));\n}\nSys.Observer._observeMethods = {\n    add_propertyChanged: function(handler) {\n        Sys.Observer._addEventHandler(this, \"propertyChanged\", handler);\n    },\n    remove_propertyChanged: function(handler) {\n        Sys.Observer._removeEventHandler(this, \"propertyChanged\", handler);\n    },\n    addEventHandler: function(eventName, handler) {\n        /// <summary locid=\"M:J#Sys.Observer.raiseCollectionChanged\" />\n        /// <param name=\"eventName\" type=\"String\"></param>\n        /// <param name=\"handler\" type=\"Function\"></param>\n        var e = Function._validateParams(arguments, [\n            {name: \"eventName\", type: String},\n            {name: \"handler\", type: Function}\n        ]);\n        if (e) throw e;\n        Sys.Observer._addEventHandler(this, eventName, handler);\n    },\n    removeEventHandler: function(eventName, handler) {\n        /// <summary locid=\"M:J#Sys.Observer.raiseCollectionChanged\" />\n        /// <param name=\"eventName\" type=\"String\"></param>\n        /// <param name=\"handler\" type=\"Function\"></param>\n        var e = Function._validateParams(arguments, [\n            {name: \"eventName\", type: String},\n            {name: \"handler\", type: Function}\n        ]);\n        if (e) throw e;\n        Sys.Observer._removeEventHandler(this, eventName, handler);\n    },\n    get_isUpdating: function() {\n        /// <summary locid=\"M:J#Sys.Observer.raiseCollectionChanged\" />\n        /// <returns type=\"Boolean\"></returns>\n        return Sys.Observer.isUpdating(this);\n    },\n    beginUpdate: function() {\n        /// <summary locid=\"M:J#Sys.Observer.raiseCollectionChanged\" />\n        Sys.Observer.beginUpdate(this);\n    },\n    endUpdate: function() {\n        /// <summary locid=\"M:J#Sys.Observer.raiseCollectionChanged\" />\n        Sys.Observer.endUpdate(this);\n    },\n    setValue: function(name, value) {\n        /// <summary locid=\"M:J#Sys.Observer.raiseCollectionChanged\" />\n        /// <param name=\"name\" type=\"String\"></param>\n        /// <param name=\"value\" mayBeNull=\"true\"></param>\n        var e = Function._validateParams(arguments, [\n            {name: \"name\", type: String},\n            {name: \"value\", mayBeNull: true}\n        ]);\n        if (e) throw e;\n        Sys.Observer._setValue(this, name, value);\n    },\n    raiseEvent: function(eventName, eventArgs) {\n        /// <summary locid=\"M:J#Sys.Observer.raiseCollectionChanged\" />\n        /// <param name=\"eventName\" type=\"String\"></param>\n        /// <param name=\"eventArgs\" type=\"Sys.EventArgs\"></param>\n        Sys.Observer.raiseEvent(this, eventName, eventArgs);\n    },\n    raisePropertyChanged: function(name) {\n        /// <summary locid=\"M:J#Sys.Observer.raiseCollectionChanged\" />\n        /// <param name=\"name\" type=\"String\"></param>\n        Sys.Observer.raiseEvent(this, \"propertyChanged\", new Sys.PropertyChangedEventArgs(name));\n    }\n}\nSys.Observer._arrayMethods = {\n    add_collectionChanged: function(handler) {\n        Sys.Observer._addEventHandler(this, \"collectionChanged\", handler);\n    },\n    remove_collectionChanged: function(handler) {\n        Sys.Observer._removeEventHandler(this, \"collectionChanged\", handler);\n    },\n    add: function(item) {\n        /// <summary locid=\"M:J#Sys.Observer.raiseCollectionChanged\" />\n        /// <param name=\"item\" mayBeNull=\"true\"></param>\n        Sys.Observer.add(this, item);\n    },\n    addRange: function(items) {\n        /// <summary locid=\"M:J#Sys.Observer.raiseCollectionChanged\" />\n        /// <param name=\"items\" type=\"Array\" elementMayBeNull=\"true\"></param>\n        Sys.Observer.addRange(this, items);\n    },\n    clear: function() {\n        /// <summary locid=\"M:J#Sys.Observer.raiseCollectionChanged\" />\n        Sys.Observer.clear(this);\n    },\n    insert: function(index, item) { \n        /// <summary locid=\"M:J#Sys.Observer.raiseCollectionChanged\" />\n        /// <param name=\"index\" type=\"Number\" integer=\"true\"></param>\n        /// <param name=\"item\" mayBeNull=\"true\"></param>\n        Sys.Observer.insert(this, index, item);\n    },\n    remove: function(item) {\n        /// <summary locid=\"M:J#Sys.Observer.raiseCollectionChanged\" />\n        /// <param name=\"item\" mayBeNull=\"true\"></param>\n        /// <returns type=\"Boolean\"></returns>\n        return Sys.Observer.remove(this, item);\n    },\n    removeAt: function(index) {\n        /// <summary locid=\"M:J#Sys.Observer.raiseCollectionChanged\" />\n        /// <param name=\"index\" type=\"Number\" integer=\"true\"></param>\n        Sys.Observer.removeAt(this, index);\n    },\n    raiseCollectionChanged: function(changes) {\n        /// <summary locid=\"M:J#Sys.Observer.raiseCollectionChanged\" />\n        /// <param name=\"changes\" type=\"Array\" elementType=\"Sys.CollectionChange\"></param>\n        Sys.Observer.raiseEvent(this, \"collectionChanged\", new Sys.NotifyCollectionChangedEventArgs(changes));\n    }\n}\nSys.Observer._getContext = function Sys$Observer$_getContext(obj, create) {\n    var ctx = obj._observerContext;\n    if (ctx) return ctx();\n    if (create) {\n        return (obj._observerContext = Sys.Observer._createContext())();\n    }\n    return null;\n}\nSys.Observer._createContext = function Sys$Observer$_createContext() {\n    var ctx = {\n        events: new Sys.EventHandlerList()\n    };\n    return function() {\n        return ctx;\n    }\n}\nDate._appendPreOrPostMatch = function Date$_appendPreOrPostMatch(preMatch, strBuilder) {\n    var quoteCount = 0;\n    var escaped = false;\n    for (var i = 0, il = preMatch.length; i < il; i++) {\n        var c = preMatch.charAt(i);\n        switch (c) {\n        case '\\'':\n            if (escaped) strBuilder.append(\"'\");\n            else quoteCount++;\n            escaped = false;\n            break;\n        case '\\\\':\n            if (escaped) strBuilder.append(\"\\\\\");\n            escaped = !escaped;\n            break;\n        default:\n            strBuilder.append(c);\n            escaped = false;\n            break;\n        }\n    }\n    return quoteCount;\n}\nDate._expandFormat = function Date$_expandFormat(dtf, format) {\n    if (!format) {\n        format = \"F\";\n    }\n    var len = format.length;\n    if (len === 1) {\n        switch (format) {\n        case \"d\":\n            return dtf.ShortDatePattern;\n        case \"D\":\n            return dtf.LongDatePattern;\n        case \"t\":\n            return dtf.ShortTimePattern;\n        case \"T\":\n            return dtf.LongTimePattern;\n        case \"f\":\n            return dtf.LongDatePattern + \" \" + dtf.ShortTimePattern;\n        case \"F\":\n            return dtf.FullDateTimePattern;\n        case \"M\": case \"m\":\n            return dtf.MonthDayPattern;\n        case \"s\":\n            return dtf.SortableDateTimePattern;\n        case \"Y\": case \"y\":\n            return dtf.YearMonthPattern;\n        default:\n            throw Error.format(Sys.Res.formatInvalidString);\n        }\n    }\n    else if ((len === 2) && (format.charAt(0) === \"%\")) {\n        format = format.charAt(1);\n    }\n    return format;\n}\nDate._expandYear = function Date$_expandYear(dtf, year) {\n    var now = new Date(),\n        era = Date._getEra(now);\n    if (year < 100) {\n        var curr = Date._getEraYear(now, dtf, era);\n        year += curr - (curr % 100);\n        if (year > dtf.Calendar.TwoDigitYearMax) {\n            year -= 100;\n        }\n    }\n    return year;\n}\nDate._getEra = function Date$_getEra(date, eras) {\n    if (!eras) return 0;\n    var start, ticks = date.getTime();\n    for (var i = 0, l = eras.length; i < l; i += 4) {\n        start = eras[i+2];\n        if ((start === null) || (ticks >= start)) {\n            return i;\n        }\n    }\n    return 0;\n}\nDate._getEraYear = function Date$_getEraYear(date, dtf, era, sortable) {\n    var year = date.getFullYear();\n    if (!sortable && dtf.eras) {\n        year -= dtf.eras[era + 3];\n    }    \n    return year;\n}\nDate._getParseRegExp = function Date$_getParseRegExp(dtf, format) {\n    if (!dtf._parseRegExp) {\n        dtf._parseRegExp = {};\n    }\n    else if (dtf._parseRegExp[format]) {\n        return dtf._parseRegExp[format];\n    }\n    var expFormat = Date._expandFormat(dtf, format);\n    expFormat = expFormat.replace(/([\\^\\$\\.\\*\\+\\?\\|\\[\\]\\(\\)\\{\\}])/g, \"\\\\\\\\$1\");\n    var regexp = new Sys.StringBuilder(\"^\");\n    var groups = [];\n    var index = 0;\n    var quoteCount = 0;\n    var tokenRegExp = Date._getTokenRegExp();\n    var match;\n    while ((match = tokenRegExp.exec(expFormat)) !== null) {\n        var preMatch = expFormat.slice(index, match.index);\n        index = tokenRegExp.lastIndex;\n        quoteCount += Date._appendPreOrPostMatch(preMatch, regexp);\n        if ((quoteCount%2) === 1) {\n            regexp.append(match[0]);\n            continue;\n        }\n        switch (match[0]) {\n            case 'dddd': case 'ddd':\n            case 'MMMM': case 'MMM':\n            case 'gg': case 'g':\n                regexp.append(\"(\\\\D+)\");\n                break;\n            case 'tt': case 't':\n                regexp.append(\"(\\\\D*)\");\n                break;\n            case 'yyyy':\n                regexp.append(\"(\\\\d{4})\");\n                break;\n            case 'fff':\n                regexp.append(\"(\\\\d{3})\");\n                break;\n            case 'ff':\n                regexp.append(\"(\\\\d{2})\");\n                break;\n            case 'f':\n                regexp.append(\"(\\\\d)\");\n                break;\n            case 'dd': case 'd':\n            case 'MM': case 'M':\n            case 'yy': case 'y':\n            case 'HH': case 'H':\n            case 'hh': case 'h':\n            case 'mm': case 'm':\n            case 'ss': case 's':\n                regexp.append(\"(\\\\d\\\\d?)\");\n                break;\n            case 'zzz':\n                regexp.append(\"([+-]?\\\\d\\\\d?:\\\\d{2})\");\n                break;\n            case 'zz': case 'z':\n                regexp.append(\"([+-]?\\\\d\\\\d?)\");\n                break;\n            case '/':\n                regexp.append(\"(\\\\\" + dtf.DateSeparator + \")\");\n                break;\n            default:\n                Sys.Debug.fail(\"Invalid date format pattern\");\n        }\n        Array.add(groups, match[0]);\n    }\n    Date._appendPreOrPostMatch(expFormat.slice(index), regexp);\n    regexp.append(\"$\");\n    var regexpStr = regexp.toString().replace(/\\s+/g, \"\\\\s+\");\n    var parseRegExp = {'regExp': regexpStr, 'groups': groups};\n    dtf._parseRegExp[format] = parseRegExp;\n    return parseRegExp;\n}\nDate._getTokenRegExp = function Date$_getTokenRegExp() {\n    return /\\/|dddd|ddd|dd|d|MMMM|MMM|MM|M|yyyy|yy|y|hh|h|HH|H|mm|m|ss|s|tt|t|fff|ff|f|zzz|zz|z|gg|g/g;\n}\nDate.parseLocale = function Date$parseLocale(value, formats) {\n    /// <summary locid=\"M:J#Date.parseLocale\" />\n    /// <param name=\"value\" type=\"String\"></param>\n    /// <param name=\"formats\" parameterArray=\"true\" optional=\"true\" mayBeNull=\"true\"></param>\n    /// <returns type=\"Date\"></returns>\n    var e = Function._validateParams(arguments, [\n        {name: \"value\", type: String},\n        {name: \"formats\", mayBeNull: true, optional: true, parameterArray: true}\n    ]);\n    if (e) throw e;\n    return Date._parse(value, Sys.CultureInfo.CurrentCulture, arguments);\n}\nDate.parseInvariant = function Date$parseInvariant(value, formats) {\n    /// <summary locid=\"M:J#Date.parseInvariant\" />\n    /// <param name=\"value\" type=\"String\"></param>\n    /// <param name=\"formats\" parameterArray=\"true\" optional=\"true\" mayBeNull=\"true\"></param>\n    /// <returns type=\"Date\"></returns>\n    var e = Function._validateParams(arguments, [\n        {name: \"value\", type: String},\n        {name: \"formats\", mayBeNull: true, optional: true, parameterArray: true}\n    ]);\n    if (e) throw e;\n    return Date._parse(value, Sys.CultureInfo.InvariantCulture, arguments);\n}\nDate._parse = function Date$_parse(value, cultureInfo, args) {\n    var i, l, date, format, formats, custom = false;\n    for (i = 1, l = args.length; i < l; i++) {\n        format = args[i];\n        if (format) {\n            custom = true;\n            date = Date._parseExact(value, format, cultureInfo);\n            if (date) return date;\n        }\n    }\n    if (! custom) {\n        formats = cultureInfo._getDateTimeFormats();\n        for (i = 0, l = formats.length; i < l; i++) {\n            date = Date._parseExact(value, formats[i], cultureInfo);\n            if (date) return date;\n        }\n    }\n    return null;\n}\nDate._parseExact = function Date$_parseExact(value, format, cultureInfo) {\n    value = value.trim();\n    var dtf = cultureInfo.dateTimeFormat,\n        parseInfo = Date._getParseRegExp(dtf, format),\n        match = new RegExp(parseInfo.regExp).exec(value);\n    if (match === null) return null;\n    \n    var groups = parseInfo.groups,\n        era = null, year = null, month = null, date = null, weekDay = null,\n        hour = 0, hourOffset, min = 0, sec = 0, msec = 0, tzMinOffset = null,\n        pmHour = false;\n    for (var j = 0, jl = groups.length; j < jl; j++) {\n        var matchGroup = match[j+1];\n        if (matchGroup) {\n            switch (groups[j]) {\n                case 'dd': case 'd':\n                    date = parseInt(matchGroup, 10);\n                    if ((date < 1) || (date > 31)) return null;\n                    break;\n                case 'MMMM':\n                    month = cultureInfo._getMonthIndex(matchGroup);\n                    if ((month < 0) || (month > 11)) return null;\n                    break;\n                case 'MMM':\n                    month = cultureInfo._getAbbrMonthIndex(matchGroup);\n                    if ((month < 0) || (month > 11)) return null;\n                    break;\n                case 'M': case 'MM':\n                    month = parseInt(matchGroup, 10) - 1;\n                    if ((month < 0) || (month > 11)) return null;\n                    break;\n                case 'y': case 'yy':\n                    year = Date._expandYear(dtf,parseInt(matchGroup, 10));\n                    if ((year < 0) || (year > 9999)) return null;\n                    break;\n                case 'yyyy':\n                    year = parseInt(matchGroup, 10);\n                    if ((year < 0) || (year > 9999)) return null;\n                    break;\n                case 'h': case 'hh':\n                    hour = parseInt(matchGroup, 10);\n                    if (hour === 12) hour = 0;\n                    if ((hour < 0) || (hour > 11)) return null;\n                    break;\n                case 'H': case 'HH':\n                    hour = parseInt(matchGroup, 10);\n                    if ((hour < 0) || (hour > 23)) return null;\n                    break;\n                case 'm': case 'mm':\n                    min = parseInt(matchGroup, 10);\n                    if ((min < 0) || (min > 59)) return null;\n                    break;\n                case 's': case 'ss':\n                    sec = parseInt(matchGroup, 10);\n                    if ((sec < 0) || (sec > 59)) return null;\n                    break;\n                case 'tt': case 't':\n                    var upperToken = matchGroup.toUpperCase();\n                    pmHour = (upperToken === dtf.PMDesignator.toUpperCase());\n                    if (!pmHour && (upperToken !== dtf.AMDesignator.toUpperCase())) return null;\n                    break;\n                case 'f':\n                    msec = parseInt(matchGroup, 10) * 100;\n                    if ((msec < 0) || (msec > 999)) return null;\n                    break;\n                case 'ff':\n                    msec = parseInt(matchGroup, 10) * 10;\n                    if ((msec < 0) || (msec > 999)) return null;\n                    break;\n                case 'fff':\n                    msec = parseInt(matchGroup, 10);\n                    if ((msec < 0) || (msec > 999)) return null;\n                    break;\n                case 'dddd':\n                    weekDay = cultureInfo._getDayIndex(matchGroup);\n                    if ((weekDay < 0) || (weekDay > 6)) return null;\n                    break;\n                case 'ddd':\n                    weekDay = cultureInfo._getAbbrDayIndex(matchGroup);\n                    if ((weekDay < 0) || (weekDay > 6)) return null;\n                    break;\n                case 'zzz':\n                    var offsets = matchGroup.split(/:/);\n                    if (offsets.length !== 2) return null;\n                    hourOffset = parseInt(offsets[0], 10);\n                    if ((hourOffset < -12) || (hourOffset > 13)) return null;\n                    var minOffset = parseInt(offsets[1], 10);\n                    if ((minOffset < 0) || (minOffset > 59)) return null;\n                    tzMinOffset = (hourOffset * 60) + (matchGroup.startsWith('-')? -minOffset : minOffset);\n                    break;\n                case 'z': case 'zz':\n                    hourOffset = parseInt(matchGroup, 10);\n                    if ((hourOffset < -12) || (hourOffset > 13)) return null;\n                    tzMinOffset = hourOffset * 60;\n                    break;\n                case 'g': case 'gg':\n                    var eraName = matchGroup;\n                    if (!eraName || !dtf.eras) return null;\n                    eraName = eraName.toLowerCase().trim();\n                    for (var i = 0, l = dtf.eras.length; i < l; i += 4) {\n                        if (eraName === dtf.eras[i + 1].toLowerCase()) {\n                            era = i;\n                            break;\n                        }\n                    }\n                    if (era === null) return null;\n                    break;\n            }\n        }\n    }\n    var result = new Date(), defaults, convert = dtf.Calendar.convert;\n    if (convert) {\n        defaults = convert.fromGregorian(result);\n    }\n    if (!convert) {\n        defaults = [result.getFullYear(), result.getMonth(), result.getDate()];\n    }\n    if (year === null) {\n        year = defaults[0];\n    }\n    else if (dtf.eras) {\n        year += dtf.eras[(era || 0) + 3];\n    }\n    if (month === null) {\n        month = defaults[1];\n    }\n    if (date === null) {\n        date = defaults[2];\n    }\n    if (convert) {\n        result = convert.toGregorian(year, month, date);\n        if (result === null) return null;\n    }\n    else {\n        result.setFullYear(year, month, date);\n        if (result.getDate() !== date) return null;\n        if ((weekDay !== null) && (result.getDay() !== weekDay)) {\n            return null;\n        }\n    }\n    if (pmHour && (hour < 12)) {\n        hour += 12;\n    }\n    result.setHours(hour, min, sec, msec);\n    if (tzMinOffset !== null) {\n        var adjustedMin = result.getMinutes() - (tzMinOffset + result.getTimezoneOffset());\n        result.setHours(result.getHours() + parseInt(adjustedMin/60, 10), adjustedMin%60);\n    }\n    return result;\n}\nDate.prototype.format = function Date$format(format) {\n    /// <summary locid=\"M:J#Date.format\" />\n    /// <param name=\"format\" type=\"String\"></param>\n    /// <returns type=\"String\"></returns>\n    var e = Function._validateParams(arguments, [\n        {name: \"format\", type: String}\n    ]);\n    if (e) throw e;\n    return this._toFormattedString(format, Sys.CultureInfo.InvariantCulture);\n}\nDate.prototype.localeFormat = function Date$localeFormat(format) {\n    /// <summary locid=\"M:J#Date.localeFormat\" />\n    /// <param name=\"format\" type=\"String\"></param>\n    /// <returns type=\"String\"></returns>\n    var e = Function._validateParams(arguments, [\n        {name: \"format\", type: String}\n    ]);\n    if (e) throw e;\n    return this._toFormattedString(format, Sys.CultureInfo.CurrentCulture);\n}\nDate.prototype._toFormattedString = function Date$_toFormattedString(format, cultureInfo) {\n    var dtf = cultureInfo.dateTimeFormat,\n        convert = dtf.Calendar.convert;\n    if (!format || !format.length || (format === 'i')) {\n        if (cultureInfo && cultureInfo.name.length) {\n            if (convert) {\n                return this._toFormattedString(dtf.FullDateTimePattern, cultureInfo);\n            }\n            else {\n                var eraDate = new Date(this.getTime());\n                var era = Date._getEra(this, dtf.eras);\n                eraDate.setFullYear(Date._getEraYear(this, dtf, era));\n                return eraDate.toLocaleString();\n            }\n        }\n        else {\n            return this.toString();\n        }\n    }\n    var eras = dtf.eras,\n        sortable = (format === \"s\");\n    format = Date._expandFormat(dtf, format);\n    var ret = new Sys.StringBuilder();\n    var hour;\n    function addLeadingZero(num) {\n        if (num < 10) {\n            return '0' + num;\n        }\n        return num.toString();\n    }\n    function addLeadingZeros(num) {\n        if (num < 10) {\n            return '00' + num;\n        }\n        if (num < 100) {\n            return '0' + num;\n        }\n        return num.toString();\n    }\n    function padYear(year) {\n        if (year < 10) {\n            return '000' + year;\n        }\n        else if (year < 100) {\n            return '00' + year;\n        }\n        else if (year < 1000) {\n            return '0' + year;\n        }\n        return year.toString();\n    }\n    \n    var foundDay, checkedDay, dayPartRegExp = /([^d]|^)(d|dd)([^d]|$)/g;\n    function hasDay() {\n        if (foundDay || checkedDay) {\n            return foundDay;\n        }\n        foundDay = dayPartRegExp.test(format);\n        checkedDay = true;\n        return foundDay;\n    }\n    \n    var quoteCount = 0,\n        tokenRegExp = Date._getTokenRegExp(),\n        converted;\n    if (!sortable && convert) {\n        converted = convert.fromGregorian(this);\n    }\n    for (;;) {\n        var index = tokenRegExp.lastIndex;\n        var ar = tokenRegExp.exec(format);\n        var preMatch = format.slice(index, ar ? ar.index : format.length);\n        quoteCount += Date._appendPreOrPostMatch(preMatch, ret);\n        if (!ar) break;\n        if ((quoteCount%2) === 1) {\n            ret.append(ar[0]);\n            continue;\n        }\n        \n        function getPart(date, part) {\n            if (converted) {\n                return converted[part];\n            }\n            switch (part) {\n                case 0: return date.getFullYear();\n                case 1: return date.getMonth();\n                case 2: return date.getDate();\n            }\n        }\n        switch (ar[0]) {\n        case \"dddd\":\n            ret.append(dtf.DayNames[this.getDay()]);\n            break;\n        case \"ddd\":\n            ret.append(dtf.AbbreviatedDayNames[this.getDay()]);\n            break;\n        case \"dd\":\n            foundDay = true;\n            ret.append(addLeadingZero(getPart(this, 2)));\n            break;\n        case \"d\":\n            foundDay = true;\n            ret.append(getPart(this, 2));\n            break;\n        case \"MMMM\":\n            ret.append((dtf.MonthGenitiveNames && hasDay())\n                ? dtf.MonthGenitiveNames[getPart(this, 1)]\n                : dtf.MonthNames[getPart(this, 1)]);\n            break;\n        case \"MMM\":\n            ret.append((dtf.AbbreviatedMonthGenitiveNames && hasDay())\n                ? dtf.AbbreviatedMonthGenitiveNames[getPart(this, 1)]\n                : dtf.AbbreviatedMonthNames[getPart(this, 1)]);\n            break;\n        case \"MM\":\n            ret.append(addLeadingZero(getPart(this, 1) + 1));\n            break;\n        case \"M\":\n            ret.append(getPart(this, 1) + 1);\n            break;\n        case \"yyyy\":\n            ret.append(padYear(converted ? converted[0] : Date._getEraYear(this, dtf, Date._getEra(this, eras), sortable)));\n            break;\n        case \"yy\":\n            ret.append(addLeadingZero((converted ? converted[0] : Date._getEraYear(this, dtf, Date._getEra(this, eras), sortable)) % 100));\n            break;\n        case \"y\":\n            ret.append((converted ? converted[0] : Date._getEraYear(this, dtf, Date._getEra(this, eras), sortable)) % 100);\n            break;\n        case \"hh\":\n            hour = this.getHours() % 12;\n            if (hour === 0) hour = 12;\n            ret.append(addLeadingZero(hour));\n            break;\n        case \"h\":\n            hour = this.getHours() % 12;\n            if (hour === 0) hour = 12;\n            ret.append(hour);\n            break;\n        case \"HH\":\n            ret.append(addLeadingZero(this.getHours()));\n            break;\n        case \"H\":\n            ret.append(this.getHours());\n            break;\n        case \"mm\":\n            ret.append(addLeadingZero(this.getMinutes()));\n            break;\n        case \"m\":\n            ret.append(this.getMinutes());\n            break;\n        case \"ss\":\n            ret.append(addLeadingZero(this.getSeconds()));\n            break;\n        case \"s\":\n            ret.append(this.getSeconds());\n            break;\n        case \"tt\":\n            ret.append((this.getHours() < 12) ? dtf.AMDesignator : dtf.PMDesignator);\n            break;\n        case \"t\":\n            ret.append(((this.getHours() < 12) ? dtf.AMDesignator : dtf.PMDesignator).charAt(0));\n            break;\n        case \"f\":\n            ret.append(addLeadingZeros(this.getMilliseconds()).charAt(0));\n            break;\n        case \"ff\":\n            ret.append(addLeadingZeros(this.getMilliseconds()).substr(0, 2));\n            break;\n        case \"fff\":\n            ret.append(addLeadingZeros(this.getMilliseconds()));\n            break;\n        case \"z\":\n            hour = this.getTimezoneOffset() / 60;\n            ret.append(((hour <= 0) ? '+' : '-') + Math.floor(Math.abs(hour)));\n            break;\n        case \"zz\":\n            hour = this.getTimezoneOffset() / 60;\n            ret.append(((hour <= 0) ? '+' : '-') + addLeadingZero(Math.floor(Math.abs(hour))));\n            break;\n        case \"zzz\":\n            hour = this.getTimezoneOffset() / 60;\n            ret.append(((hour <= 0) ? '+' : '-') + addLeadingZero(Math.floor(Math.abs(hour))) +\n                \":\" + addLeadingZero(Math.abs(this.getTimezoneOffset() % 60)));\n            break;\n        case \"g\":\n        case \"gg\":\n            if (dtf.eras) {\n                ret.append(dtf.eras[Date._getEra(this, eras) + 1]);\n            }\n            break;\n        case \"/\":\n            ret.append(dtf.DateSeparator);\n            break;\n        default:\n            Sys.Debug.fail(\"Invalid date format pattern\");\n        }\n    }\n    return ret.toString();\n}\nString.localeFormat = function String$localeFormat(format, args) {\n    /// <summary locid=\"M:J#String.localeFormat\" />\n    /// <param name=\"format\" type=\"String\"></param>\n    /// <param name=\"args\" parameterArray=\"true\" mayBeNull=\"true\"></param>\n    /// <returns type=\"String\"></returns>\n    var e = Function._validateParams(arguments, [\n        {name: \"format\", type: String},\n        {name: \"args\", mayBeNull: true, parameterArray: true}\n    ]);\n    if (e) throw e;\n    return String._toFormattedString(true, arguments);\n}\nNumber.parseLocale = function Number$parseLocale(value) {\n    /// <summary locid=\"M:J#Number.parseLocale\" />\n    /// <param name=\"value\" type=\"String\"></param>\n    /// <returns type=\"Number\"></returns>\n    var e = Function._validateParams(arguments, [\n        {name: \"value\", type: String}\n    ], false);\n    if (e) throw e;\n    return Number._parse(value, Sys.CultureInfo.CurrentCulture);\n}\nNumber.parseInvariant = function Number$parseInvariant(value) {\n    /// <summary locid=\"M:J#Number.parseInvariant\" />\n    /// <param name=\"value\" type=\"String\"></param>\n    /// <returns type=\"Number\"></returns>\n    var e = Function._validateParams(arguments, [\n        {name: \"value\", type: String}\n    ], false);\n    if (e) throw e;\n    return Number._parse(value, Sys.CultureInfo.InvariantCulture);\n}\nNumber._parse = function Number$_parse(value, cultureInfo) {\n    value = value.trim();\n    \n    if (value.match(/^[+-]?infinity$/i)) {\n        return parseFloat(value);\n    }\n    if (value.match(/^0x[a-f0-9]+$/i)) {\n        return parseInt(value);\n    }\n    var numFormat = cultureInfo.numberFormat;\n    var signInfo = Number._parseNumberNegativePattern(value, numFormat, numFormat.NumberNegativePattern);\n    var sign = signInfo[0];\n    var num = signInfo[1];\n    \n    if ((sign === '') && (numFormat.NumberNegativePattern !== 1)) {\n        signInfo = Number._parseNumberNegativePattern(value, numFormat, 1);\n        sign = signInfo[0];\n        num = signInfo[1];\n    }\n    if (sign === '') sign = '+';\n    \n    var exponent;\n    var intAndFraction;\n    var exponentPos = num.indexOf('e');\n    if (exponentPos < 0) exponentPos = num.indexOf('E');\n    if (exponentPos < 0) {\n        intAndFraction = num;\n        exponent = null;\n    }\n    else {\n        intAndFraction = num.substr(0, exponentPos);\n        exponent = num.substr(exponentPos + 1);\n    }\n    \n    var integer;\n    var fraction;\n    var decimalPos = intAndFraction.indexOf(numFormat.NumberDecimalSeparator);\n    if (decimalPos < 0) {\n        integer = intAndFraction;\n        fraction = null;\n    }\n    else {\n        integer = intAndFraction.substr(0, decimalPos);\n        fraction = intAndFraction.substr(decimalPos + numFormat.NumberDecimalSeparator.length);\n    }\n    \n    integer = integer.split(numFormat.NumberGroupSeparator).join('');\n    var altNumGroupSeparator = numFormat.NumberGroupSeparator.replace(/\\u00A0/g, \" \");\n    if (numFormat.NumberGroupSeparator !== altNumGroupSeparator) {\n        integer = integer.split(altNumGroupSeparator).join('');\n    }\n    \n    var p = sign + integer;\n    if (fraction !== null) {\n        p += '.' + fraction;\n    }\n    if (exponent !== null) {\n        var expSignInfo = Number._parseNumberNegativePattern(exponent, numFormat, 1);\n        if (expSignInfo[0] === '') {\n            expSignInfo[0] = '+';\n        }\n        p += 'e' + expSignInfo[0] + expSignInfo[1];\n    }\n    if (p.match(/^[+-]?\\d*\\.?\\d*(e[+-]?\\d+)?$/)) {\n        return parseFloat(p);\n    }\n    return Number.NaN;\n}\nNumber._parseNumberNegativePattern = function Number$_parseNumberNegativePattern(value, numFormat, numberNegativePattern) {\n    var neg = numFormat.NegativeSign;\n    var pos = numFormat.PositiveSign;    \n    switch (numberNegativePattern) {\n        case 4: \n            neg = ' ' + neg;\n            pos = ' ' + pos;\n        case 3: \n            if (value.endsWith(neg)) {\n                return ['-', value.substr(0, value.length - neg.length)];\n            }\n            else if (value.endsWith(pos)) {\n                return ['+', value.substr(0, value.length - pos.length)];\n            }\n            break;\n        case 2: \n            neg += ' ';\n            pos += ' ';\n        case 1: \n            if (value.startsWith(neg)) {\n                return ['-', value.substr(neg.length)];\n            }\n            else if (value.startsWith(pos)) {\n                return ['+', value.substr(pos.length)];\n            }\n            break;\n        case 0: \n            if (value.startsWith('(') && value.endsWith(')')) {\n                return ['-', value.substr(1, value.length - 2)];\n            }\n            break;\n        default:\n            Sys.Debug.fail(\"\");\n    }\n    return ['', value];\n}\nNumber.prototype.format = function Number$format(format) {\n    /// <summary locid=\"M:J#Number.format\" />\n    /// <param name=\"format\" type=\"String\"></param>\n    /// <returns type=\"String\"></returns>\n    var e = Function._validateParams(arguments, [\n        {name: \"format\", type: String}\n    ]);\n    if (e) throw e;\n    return this._toFormattedString(format, Sys.CultureInfo.InvariantCulture);\n}\nNumber.prototype.localeFormat = function Number$localeFormat(format) {\n    /// <summary locid=\"M:J#Number.localeFormat\" />\n    /// <param name=\"format\" type=\"String\"></param>\n    /// <returns type=\"String\"></returns>\n    var e = Function._validateParams(arguments, [\n        {name: \"format\", type: String}\n    ]);\n    if (e) throw e;\n    return this._toFormattedString(format, Sys.CultureInfo.CurrentCulture);\n}\nNumber.prototype._toFormattedString = function Number$_toFormattedString(format, cultureInfo) {\n    if (!format || (format.length === 0) || (format === 'i')) {\n        if (cultureInfo && (cultureInfo.name.length > 0)) {\n            return this.toLocaleString();\n        }\n        else {\n            return this.toString();\n        }\n    }\n    \n    var _percentPositivePattern = [\"n %\", \"n%\", \"%n\" ];\n    var _percentNegativePattern = [\"-n %\", \"-n%\", \"-%n\"];\n    var _numberNegativePattern = [\"(n)\",\"-n\",\"- n\",\"n-\",\"n -\"];\n    var _currencyPositivePattern = [\"$n\",\"n$\",\"$ n\",\"n $\"];\n    var _currencyNegativePattern = [\"($n)\",\"-$n\",\"$-n\",\"$n-\",\"(n$)\",\"-n$\",\"n-$\",\"n$-\",\"-n $\",\"-$ n\",\"n $-\",\"$ n-\",\"$ -n\",\"n- $\",\"($ n)\",\"(n $)\"];\n    function zeroPad(str, count, left) {\n        for (var l=str.length; l < count; l++) {\n            str = (left ? ('0' + str) : (str + '0'));\n        }\n        return str;\n    }\n    \n    function expandNumber(number, precision, groupSizes, sep, decimalChar) {\n        Sys.Debug.assert(groupSizes.length > 0, \"groupSizes must be an array of at least 1\");\n        var curSize = groupSizes[0];\n        var curGroupIndex = 1;\n        var factor = Math.pow(10, precision);\n        var rounded = (Math.round(number * factor) / factor);\n        if (!isFinite(rounded)) {\n            rounded = number;\n        }\n        number = rounded;\n        \n        var numberString = number.toString();\n        var right = \"\";\n        var exponent;\n        \n        \n        var split = numberString.split(/e/i);\n        numberString = split[0];\n        exponent = (split.length > 1 ? parseInt(split[1]) : 0);\n        split = numberString.split('.');\n        numberString = split[0];\n        right = split.length > 1 ? split[1] : \"\";\n        \n        var l;\n        if (exponent > 0) {\n            right = zeroPad(right, exponent, false);\n            numberString += right.slice(0, exponent);\n            right = right.substr(exponent);\n        }\n        else if (exponent < 0) {\n            exponent = -exponent;\n            numberString = zeroPad(numberString, exponent+1, true);\n            right = numberString.slice(-exponent, numberString.length) + right;\n            numberString = numberString.slice(0, -exponent);\n        }\n        if (precision > 0) {\n            if (right.length > precision) {\n                right = right.slice(0, precision);\n            }\n            else {\n                right = zeroPad(right, precision, false);\n            }\n            right = decimalChar + right;\n        }\n        else { \n            right = \"\";\n        }\n        var stringIndex = numberString.length-1;\n        var ret = \"\";\n        while (stringIndex >= 0) {\n            if (curSize === 0 || curSize > stringIndex) {\n                if (ret.length > 0)\n                    return numberString.slice(0, stringIndex + 1) + sep + ret + right;\n                else\n                    return numberString.slice(0, stringIndex + 1) + right;\n            }\n            if (ret.length > 0)\n                ret = numberString.slice(stringIndex - curSize + 1, stringIndex+1) + sep + ret;\n            else\n                ret = numberString.slice(stringIndex - curSize + 1, stringIndex+1);\n            stringIndex -= curSize;\n            if (curGroupIndex < groupSizes.length) {\n                curSize = groupSizes[curGroupIndex];\n                curGroupIndex++;\n            }\n        }\n        return numberString.slice(0, stringIndex + 1) + sep + ret + right;\n    }\n    var nf = cultureInfo.numberFormat;\n    var number = Math.abs(this);\n    if (!format)\n        format = \"D\";\n    var precision = -1;\n    if (format.length > 1) precision = parseInt(format.slice(1), 10);\n    var pattern;\n    switch (format.charAt(0)) {\n    case \"d\":\n    case \"D\":\n        pattern = 'n';\n        if (precision !== -1) {\n            number = zeroPad(\"\"+number, precision, true);\n        }\n        if (this < 0) number = -number;\n        break;\n    case \"c\":\n    case \"C\":\n        if (this < 0) pattern = _currencyNegativePattern[nf.CurrencyNegativePattern];\n        else pattern = _currencyPositivePattern[nf.CurrencyPositivePattern];\n        if (precision === -1) precision = nf.CurrencyDecimalDigits;\n        number = expandNumber(Math.abs(this), precision, nf.CurrencyGroupSizes, nf.CurrencyGroupSeparator, nf.CurrencyDecimalSeparator);\n        break;\n    case \"n\":\n    case \"N\":\n        if (this < 0) pattern = _numberNegativePattern[nf.NumberNegativePattern];\n        else pattern = 'n';\n        if (precision === -1) precision = nf.NumberDecimalDigits;\n        number = expandNumber(Math.abs(this), precision, nf.NumberGroupSizes, nf.NumberGroupSeparator, nf.NumberDecimalSeparator);\n        break;\n    case \"p\":\n    case \"P\":\n        if (this < 0) pattern = _percentNegativePattern[nf.PercentNegativePattern];\n        else pattern = _percentPositivePattern[nf.PercentPositivePattern];\n        if (precision === -1) precision = nf.PercentDecimalDigits;\n        number = expandNumber(Math.abs(this) * 100, precision, nf.PercentGroupSizes, nf.PercentGroupSeparator, nf.PercentDecimalSeparator);\n        break;\n    default:\n        throw Error.format(Sys.Res.formatBadFormatSpecifier);\n    }\n    var regex = /n|\\$|-|%/g;\n    var ret = \"\";\n    for (;;) {\n        var index = regex.lastIndex;\n        var ar = regex.exec(pattern);\n        ret += pattern.slice(index, ar ? ar.index : pattern.length);\n        if (!ar)\n            break;\n        switch (ar[0]) {\n        case \"n\":\n            ret += number;\n            break;\n        case \"$\":\n            ret += nf.CurrencySymbol;\n            break;\n        case \"-\":\n            if (/[1-9]/.test(number)) {\n                ret += nf.NegativeSign;\n            }\n            break;\n        case \"%\":\n            ret += nf.PercentSymbol;\n            break;\n        default:\n            Sys.Debug.fail(\"Invalid number format pattern\");\n        }\n    }\n    return ret;\n}\n \nSys.CultureInfo = function Sys$CultureInfo(name, numberFormat, dateTimeFormat) {\n    /// <summary locid=\"M:J#Sys.CultureInfo.#ctor\" />\n    /// <param name=\"name\" type=\"String\"></param>\n    /// <param name=\"numberFormat\" type=\"Object\"></param>\n    /// <param name=\"dateTimeFormat\" type=\"Object\"></param>\n    var e = Function._validateParams(arguments, [\n        {name: \"name\", type: String},\n        {name: \"numberFormat\", type: Object},\n        {name: \"dateTimeFormat\", type: Object}\n    ]);\n    if (e) throw e;\n    this.name = name;\n    this.numberFormat = numberFormat;\n    this.dateTimeFormat = dateTimeFormat;\n}\n    function Sys$CultureInfo$_getDateTimeFormats() {\n        if (! this._dateTimeFormats) {\n            var dtf = this.dateTimeFormat;\n            this._dateTimeFormats =\n              [ dtf.MonthDayPattern,\n                dtf.YearMonthPattern,\n                dtf.ShortDatePattern,\n                dtf.ShortTimePattern,\n                dtf.LongDatePattern,\n                dtf.LongTimePattern,\n                dtf.FullDateTimePattern,\n                dtf.RFC1123Pattern,\n                dtf.SortableDateTimePattern,\n                dtf.UniversalSortableDateTimePattern ];\n        }\n        return this._dateTimeFormats;\n    }\n    function Sys$CultureInfo$_getIndex(value, a1, a2) {\n        var upper = this._toUpper(value),\n            i = Array.indexOf(a1, upper);\n        if (i === -1) {\n            i = Array.indexOf(a2, upper);\n        }\n        return i;\n    }\n    function Sys$CultureInfo$_getMonthIndex(value) {\n        if (!this._upperMonths) {\n            this._upperMonths = this._toUpperArray(this.dateTimeFormat.MonthNames);\n            this._upperMonthsGenitive = this._toUpperArray(this.dateTimeFormat.MonthGenitiveNames);\n        }\n        return this._getIndex(value, this._upperMonths, this._upperMonthsGenitive);\n    }\n    function Sys$CultureInfo$_getAbbrMonthIndex(value) {\n        if (!this._upperAbbrMonths) {\n            this._upperAbbrMonths = this._toUpperArray(this.dateTimeFormat.AbbreviatedMonthNames);\n            this._upperAbbrMonthsGenitive = this._toUpperArray(this.dateTimeFormat.AbbreviatedMonthGenitiveNames);\n        }\n        return this._getIndex(value, this._upperAbbrMonths, this._upperAbbrMonthsGenitive);\n    }\n    function Sys$CultureInfo$_getDayIndex(value) {\n        if (!this._upperDays) {\n            this._upperDays = this._toUpperArray(this.dateTimeFormat.DayNames);\n        }\n        return Array.indexOf(this._upperDays, this._toUpper(value));\n    }\n    function Sys$CultureInfo$_getAbbrDayIndex(value) {\n        if (!this._upperAbbrDays) {\n            this._upperAbbrDays = this._toUpperArray(this.dateTimeFormat.AbbreviatedDayNames);\n        }\n        return Array.indexOf(this._upperAbbrDays, this._toUpper(value));\n    }\n    function Sys$CultureInfo$_toUpperArray(arr) {\n        var result = [];\n        for (var i = 0, il = arr.length; i < il; i++) {\n            result[i] = this._toUpper(arr[i]);\n        }\n        return result;\n    }\n    function Sys$CultureInfo$_toUpper(value) {\n        return value.split(\"\\u00A0\").join(' ').toUpperCase();\n    }\nSys.CultureInfo.prototype = {\n    _getDateTimeFormats: Sys$CultureInfo$_getDateTimeFormats,\n    _getIndex: Sys$CultureInfo$_getIndex,\n    _getMonthIndex: Sys$CultureInfo$_getMonthIndex,\n    _getAbbrMonthIndex: Sys$CultureInfo$_getAbbrMonthIndex,\n    _getDayIndex: Sys$CultureInfo$_getDayIndex,\n    _getAbbrDayIndex: Sys$CultureInfo$_getAbbrDayIndex,\n    _toUpperArray: Sys$CultureInfo$_toUpperArray,\n    _toUpper: Sys$CultureInfo$_toUpper\n}\nSys.CultureInfo.registerClass('Sys.CultureInfo');\nSys.CultureInfo._parse = function Sys$CultureInfo$_parse(value) {\n    var dtf = value.dateTimeFormat;\n    if (dtf && !dtf.eras) {\n        dtf.eras = value.eras;\n    }\n    return new Sys.CultureInfo(value.name, value.numberFormat, dtf);\n}\nSys.CultureInfo.InvariantCulture = Sys.CultureInfo._parse({\"name\":\"\",\"numberFormat\":{\"CurrencyDecimalDigits\":2,\"CurrencyDecimalSeparator\":\".\",\"IsReadOnly\":true,\"CurrencyGroupSizes\":[3],\"NumberGroupSizes\":[3],\"PercentGroupSizes\":[3],\"CurrencyGroupSeparator\":\",\",\"CurrencySymbol\":\"\\u00A4\",\"NaNSymbol\":\"NaN\",\"CurrencyNegativePattern\":0,\"NumberNegativePattern\":1,\"PercentPositivePattern\":0,\"PercentNegativePattern\":0,\"NegativeInfinitySymbol\":\"-Infinity\",\"NegativeSign\":\"-\",\"NumberDecimalDigits\":2,\"NumberDecimalSeparator\":\".\",\"NumberGroupSeparator\":\",\",\"CurrencyPositivePattern\":0,\"PositiveInfinitySymbol\":\"Infinity\",\"PositiveSign\":\"+\",\"PercentDecimalDigits\":2,\"PercentDecimalSeparator\":\".\",\"PercentGroupSeparator\":\",\",\"PercentSymbol\":\"%\",\"PerMilleSymbol\":\"\\u2030\",\"NativeDigits\":[\"0\",\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\"],\"DigitSubstitution\":1},\"dateTimeFormat\":{\"AMDesignator\":\"AM\",\"Calendar\":{\"MinSupportedDateTime\":\"@-62135568000000@\",\"MaxSupportedDateTime\":\"@253402300799999@\",\"AlgorithmType\":1,\"CalendarType\":1,\"Eras\":[1],\"TwoDigitYearMax\":2029,\"IsReadOnly\":true},\"DateSeparator\":\"/\",\"FirstDayOfWeek\":0,\"CalendarWeekRule\":0,\"FullDateTimePattern\":\"dddd, dd MMMM yyyy HH:mm:ss\",\"LongDatePattern\":\"dddd, dd MMMM yyyy\",\"LongTimePattern\":\"HH:mm:ss\",\"MonthDayPattern\":\"MMMM dd\",\"PMDesignator\":\"PM\",\"RFC1123Pattern\":\"ddd, dd MMM yyyy HH\\':\\'mm\\':\\'ss \\'GMT\\'\",\"ShortDatePattern\":\"MM/dd/yyyy\",\"ShortTimePattern\":\"HH:mm\",\"SortableDateTimePattern\":\"yyyy\\'-\\'MM\\'-\\'dd\\'T\\'HH\\':\\'mm\\':\\'ss\",\"TimeSeparator\":\":\",\"UniversalSortableDateTimePattern\":\"yyyy\\'-\\'MM\\'-\\'dd HH\\':\\'mm\\':\\'ss\\'Z\\'\",\"YearMonthPattern\":\"yyyy MMMM\",\"AbbreviatedDayNames\":[\"Sun\",\"Mon\",\"Tue\",\"Wed\",\"Thu\",\"Fri\",\"Sat\"],\"ShortestDayNames\":[\"Su\",\"Mo\",\"Tu\",\"We\",\"Th\",\"Fr\",\"Sa\"],\"DayNames\":[\"Sunday\",\"Monday\",\"Tuesday\",\"Wednesday\",\"Thursday\",\"Friday\",\"Saturday\"],\"AbbreviatedMonthNames\":[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\",\"\"],\"MonthNames\":[\"January\",\"February\",\"March\",\"April\",\"May\",\"June\",\"July\",\"August\",\"September\",\"October\",\"November\",\"December\",\"\"],\"IsReadOnly\":true,\"NativeCalendarName\":\"Gregorian Calendar\",\"AbbreviatedMonthGenitiveNames\":[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\",\"\"],\"MonthGenitiveNames\":[\"January\",\"February\",\"March\",\"April\",\"May\",\"June\",\"July\",\"August\",\"September\",\"October\",\"November\",\"December\",\"\"]},\"eras\":[1,\"A.D.\",null,0]});\nif (typeof(__cultureInfo) === \"object\") {\n    Sys.CultureInfo.CurrentCulture = Sys.CultureInfo._parse(__cultureInfo);\n    delete __cultureInfo;    \n}\nelse {\n    Sys.CultureInfo.CurrentCulture = Sys.CultureInfo._parse({\"name\":\"en-US\",\"numberFormat\":{\"CurrencyDecimalDigits\":2,\"CurrencyDecimalSeparator\":\".\",\"IsReadOnly\":false,\"CurrencyGroupSizes\":[3],\"NumberGroupSizes\":[3],\"PercentGroupSizes\":[3],\"CurrencyGroupSeparator\":\",\",\"CurrencySymbol\":\"$\",\"NaNSymbol\":\"NaN\",\"CurrencyNegativePattern\":0,\"NumberNegativePattern\":1,\"PercentPositivePattern\":0,\"PercentNegativePattern\":0,\"NegativeInfinitySymbol\":\"-Infinity\",\"NegativeSign\":\"-\",\"NumberDecimalDigits\":2,\"NumberDecimalSeparator\":\".\",\"NumberGroupSeparator\":\",\",\"CurrencyPositivePattern\":0,\"PositiveInfinitySymbol\":\"Infinity\",\"PositiveSign\":\"+\",\"PercentDecimalDigits\":2,\"PercentDecimalSeparator\":\".\",\"PercentGroupSeparator\":\",\",\"PercentSymbol\":\"%\",\"PerMilleSymbol\":\"\\u2030\",\"NativeDigits\":[\"0\",\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\"],\"DigitSubstitution\":1},\"dateTimeFormat\":{\"AMDesignator\":\"AM\",\"Calendar\":{\"MinSupportedDateTime\":\"@-62135568000000@\",\"MaxSupportedDateTime\":\"@253402300799999@\",\"AlgorithmType\":1,\"CalendarType\":1,\"Eras\":[1],\"TwoDigitYearMax\":2029,\"IsReadOnly\":false},\"DateSeparator\":\"/\",\"FirstDayOfWeek\":0,\"CalendarWeekRule\":0,\"FullDateTimePattern\":\"dddd, MMMM dd, yyyy h:mm:ss tt\",\"LongDatePattern\":\"dddd, MMMM dd, yyyy\",\"LongTimePattern\":\"h:mm:ss tt\",\"MonthDayPattern\":\"MMMM dd\",\"PMDesignator\":\"PM\",\"RFC1123Pattern\":\"ddd, dd MMM yyyy HH\\':\\'mm\\':\\'ss \\'GMT\\'\",\"ShortDatePattern\":\"M/d/yyyy\",\"ShortTimePattern\":\"h:mm tt\",\"SortableDateTimePattern\":\"yyyy\\'-\\'MM\\'-\\'dd\\'T\\'HH\\':\\'mm\\':\\'ss\",\"TimeSeparator\":\":\",\"UniversalSortableDateTimePattern\":\"yyyy\\'-\\'MM\\'-\\'dd HH\\':\\'mm\\':\\'ss\\'Z\\'\",\"YearMonthPattern\":\"MMMM, yyyy\",\"AbbreviatedDayNames\":[\"Sun\",\"Mon\",\"Tue\",\"Wed\",\"Thu\",\"Fri\",\"Sat\"],\"ShortestDayNames\":[\"Su\",\"Mo\",\"Tu\",\"We\",\"Th\",\"Fr\",\"Sa\"],\"DayNames\":[\"Sunday\",\"Monday\",\"Tuesday\",\"Wednesday\",\"Thursday\",\"Friday\",\"Saturday\"],\"AbbreviatedMonthNames\":[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\",\"\"],\"MonthNames\":[\"January\",\"February\",\"March\",\"April\",\"May\",\"June\",\"July\",\"August\",\"September\",\"October\",\"November\",\"December\",\"\"],\"IsReadOnly\":false,\"NativeCalendarName\":\"Gregorian Calendar\",\"AbbreviatedMonthGenitiveNames\":[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\",\"\"],\"MonthGenitiveNames\":[\"January\",\"February\",\"March\",\"April\",\"May\",\"June\",\"July\",\"August\",\"September\",\"October\",\"November\",\"December\",\"\"]},\"eras\":[1,\"A.D.\",null,0]});\n}\nType.registerNamespace('Sys.Serialization');\nSys.Serialization.JavaScriptSerializer = function Sys$Serialization$JavaScriptSerializer() {\n    /// <summary locid=\"M:J#Sys.Serialization.JavaScriptSerializer.#ctor\" />\n    if (arguments.length !== 0) throw Error.parameterCount();\n}\nSys.Serialization.JavaScriptSerializer.registerClass('Sys.Serialization.JavaScriptSerializer');\nSys.Serialization.JavaScriptSerializer._charsToEscapeRegExs = [];\nSys.Serialization.JavaScriptSerializer._charsToEscape = [];\nSys.Serialization.JavaScriptSerializer._dateRegEx = new RegExp('(^|[^\\\\\\\\])\\\\\"\\\\\\\\/Date\\\\((-?[0-9]+)(?:[a-zA-Z]|(?:\\\\+|-)[0-9]{4})?\\\\)\\\\\\\\/\\\\\"', 'g');\nSys.Serialization.JavaScriptSerializer._escapeChars = {};\nSys.Serialization.JavaScriptSerializer._escapeRegEx = new RegExp('[\"\\\\\\\\\\\\x00-\\\\x1F]', 'i');\nSys.Serialization.JavaScriptSerializer._escapeRegExGlobal = new RegExp('[\"\\\\\\\\\\\\x00-\\\\x1F]', 'g');\nSys.Serialization.JavaScriptSerializer._jsonRegEx = new RegExp('[^,:{}\\\\[\\\\]0-9.\\\\-+Eaeflnr-u \\\\n\\\\r\\\\t]', 'g');\nSys.Serialization.JavaScriptSerializer._jsonStringRegEx = new RegExp('\"(\\\\\\\\.|[^\"\\\\\\\\])*\"', 'g');\nSys.Serialization.JavaScriptSerializer._serverTypeFieldName = '__type';\nSys.Serialization.JavaScriptSerializer._init = function Sys$Serialization$JavaScriptSerializer$_init() {\n    var replaceChars = ['\\\\u0000','\\\\u0001','\\\\u0002','\\\\u0003','\\\\u0004','\\\\u0005','\\\\u0006','\\\\u0007',\n                        '\\\\b','\\\\t','\\\\n','\\\\u000b','\\\\f','\\\\r','\\\\u000e','\\\\u000f','\\\\u0010','\\\\u0011',\n                        '\\\\u0012','\\\\u0013','\\\\u0014','\\\\u0015','\\\\u0016','\\\\u0017','\\\\u0018','\\\\u0019',\n                        '\\\\u001a','\\\\u001b','\\\\u001c','\\\\u001d','\\\\u001e','\\\\u001f'];\n    Sys.Serialization.JavaScriptSerializer._charsToEscape[0] = '\\\\';\n    Sys.Serialization.JavaScriptSerializer._charsToEscapeRegExs['\\\\'] = new RegExp('\\\\\\\\', 'g');\n    Sys.Serialization.JavaScriptSerializer._escapeChars['\\\\'] = '\\\\\\\\';\n    Sys.Serialization.JavaScriptSerializer._charsToEscape[1] = '\"';\n    Sys.Serialization.JavaScriptSerializer._charsToEscapeRegExs['\"'] = new RegExp('\"', 'g');\n    Sys.Serialization.JavaScriptSerializer._escapeChars['\"'] = '\\\\\"';\n    for (var i = 0; i < 32; i++) {\n        var c = String.fromCharCode(i);\n        Sys.Serialization.JavaScriptSerializer._charsToEscape[i+2] = c;\n        Sys.Serialization.JavaScriptSerializer._charsToEscapeRegExs[c] = new RegExp(c, 'g');\n        Sys.Serialization.JavaScriptSerializer._escapeChars[c] = replaceChars[i];\n    }\n}\nSys.Serialization.JavaScriptSerializer._serializeBooleanWithBuilder = function Sys$Serialization$JavaScriptSerializer$_serializeBooleanWithBuilder(object, stringBuilder) {\n    stringBuilder.append(object.toString());\n}\nSys.Serialization.JavaScriptSerializer._serializeNumberWithBuilder = function Sys$Serialization$JavaScriptSerializer$_serializeNumberWithBuilder(object, stringBuilder) {\n    if (isFinite(object)) {\n        stringBuilder.append(String(object));\n    }\n    else {\n        throw Error.invalidOperation(Sys.Res.cannotSerializeNonFiniteNumbers);\n    }\n}\nSys.Serialization.JavaScriptSerializer._serializeStringWithBuilder = function Sys$Serialization$JavaScriptSerializer$_serializeStringWithBuilder(string, stringBuilder) {\n    stringBuilder.append('\"');\n    if (Sys.Serialization.JavaScriptSerializer._escapeRegEx.test(string)) {\n        if (Sys.Serialization.JavaScriptSerializer._charsToEscape.length === 0) {\n            Sys.Serialization.JavaScriptSerializer._init();\n        }\n        if (string.length < 128) {\n            string = string.replace(Sys.Serialization.JavaScriptSerializer._escapeRegExGlobal,\n                function(x) { return Sys.Serialization.JavaScriptSerializer._escapeChars[x]; });\n        }\n        else {\n            for (var i = 0; i < 34; i++) {\n                var c = Sys.Serialization.JavaScriptSerializer._charsToEscape[i];\n                if (string.indexOf(c) !== -1) {\n                    if (Sys.Browser.agent === Sys.Browser.Opera || Sys.Browser.agent === Sys.Browser.FireFox) {\n                        string = string.split(c).join(Sys.Serialization.JavaScriptSerializer._escapeChars[c]);\n                    }\n                    else {\n                        string = string.replace(Sys.Serialization.JavaScriptSerializer._charsToEscapeRegExs[c],\n                            Sys.Serialization.JavaScriptSerializer._escapeChars[c]);\n                    }\n                }\n            }\n       }\n    }\n    stringBuilder.append(string);\n    stringBuilder.append('\"');\n}\nSys.Serialization.JavaScriptSerializer._serializeWithBuilder = function Sys$Serialization$JavaScriptSerializer$_serializeWithBuilder(object, stringBuilder, sort, prevObjects) {\n    var i;\n    switch (typeof object) {\n    case 'object':\n        if (object) {\n            if (prevObjects){\n                for( var j = 0; j < prevObjects.length; j++) {\n                    if (prevObjects[j] === object) {\n                        throw Error.invalidOperation(Sys.Res.cannotSerializeObjectWithCycle);\n                    }\n                }\n            }\n            else {\n                prevObjects = new Array();\n            }\n            try {\n                Array.add(prevObjects, object);\n                \n                if (Number.isInstanceOfType(object)){\n                    Sys.Serialization.JavaScriptSerializer._serializeNumberWithBuilder(object, stringBuilder);\n                }\n                else if (Boolean.isInstanceOfType(object)){\n                    Sys.Serialization.JavaScriptSerializer._serializeBooleanWithBuilder(object, stringBuilder);\n                }\n                else if (String.isInstanceOfType(object)){\n                    Sys.Serialization.JavaScriptSerializer._serializeStringWithBuilder(object, stringBuilder);\n                }\n            \n                else if (Array.isInstanceOfType(object)) {\n                    stringBuilder.append('[');\n                   \n                    for (i = 0; i < object.length; ++i) {\n                        if (i > 0) {\n                            stringBuilder.append(',');\n                        }\n                        Sys.Serialization.JavaScriptSerializer._serializeWithBuilder(object[i], stringBuilder,false,prevObjects);\n                    }\n                    stringBuilder.append(']');\n                }\n                else {\n                    if (Date.isInstanceOfType(object)) {\n                        stringBuilder.append('\"\\\\/Date(');\n                        stringBuilder.append(object.getTime());\n                        stringBuilder.append(')\\\\/\"');\n                        break;\n                    }\n                    var properties = [];\n                    var propertyCount = 0;\n                    for (var name in object) {\n                        if (name.startsWith('$')) {\n                            continue;\n                        }\n                        if (name === Sys.Serialization.JavaScriptSerializer._serverTypeFieldName && propertyCount !== 0){\n                            properties[propertyCount++] = properties[0];\n                            properties[0] = name;\n                        }\n                        else{\n                            properties[propertyCount++] = name;\n                        }\n                    }\n                    if (sort) properties.sort();\n                    stringBuilder.append('{');\n                    var needComma = false;\n                     \n                    for (i=0; i<propertyCount; i++) {\n                        var value = object[properties[i]];\n                        if (typeof value !== 'undefined' && typeof value !== 'function') {\n                            if (needComma) {\n                                stringBuilder.append(',');\n                            }\n                            else {\n                                needComma = true;\n                            }\n                           \n                            Sys.Serialization.JavaScriptSerializer._serializeWithBuilder(properties[i], stringBuilder, sort, prevObjects);\n                            stringBuilder.append(':');\n                            Sys.Serialization.JavaScriptSerializer._serializeWithBuilder(value, stringBuilder, sort, prevObjects);\n                          \n                        }\n                    }\n                stringBuilder.append('}');\n                }\n            }\n            finally {\n                Array.removeAt(prevObjects, prevObjects.length - 1);\n            }\n        }\n        else {\n            stringBuilder.append('null');\n        }\n        break;\n    case 'number':\n        Sys.Serialization.JavaScriptSerializer._serializeNumberWithBuilder(object, stringBuilder);\n        break;\n    case 'string':\n        Sys.Serialization.JavaScriptSerializer._serializeStringWithBuilder(object, stringBuilder);\n        break;\n    case 'boolean':\n        Sys.Serialization.JavaScriptSerializer._serializeBooleanWithBuilder(object, stringBuilder);\n        break;\n    default:\n        stringBuilder.append('null');\n        break;\n    }\n}\nSys.Serialization.JavaScriptSerializer.serialize = function Sys$Serialization$JavaScriptSerializer$serialize(object) {\n    /// <summary locid=\"M:J#Sys.Serialization.JavaScriptSerializer.serialize\" />\n    /// <param name=\"object\" mayBeNull=\"true\"></param>\n    /// <returns type=\"String\"></returns>\n    var e = Function._validateParams(arguments, [\n        {name: \"object\", mayBeNull: true}\n    ]);\n    if (e) throw e;\n    var stringBuilder = new Sys.StringBuilder();\n    Sys.Serialization.JavaScriptSerializer._serializeWithBuilder(object, stringBuilder, false);\n    return stringBuilder.toString();\n}\nSys.Serialization.JavaScriptSerializer.deserialize = function Sys$Serialization$JavaScriptSerializer$deserialize(data, secure) {\n    /// <summary locid=\"M:J#Sys.Serialization.JavaScriptSerializer.deserialize\" />\n    /// <param name=\"data\" type=\"String\"></param>\n    /// <param name=\"secure\" type=\"Boolean\" optional=\"true\"></param>\n    /// <returns></returns>\n    var e = Function._validateParams(arguments, [\n        {name: \"data\", type: String},\n        {name: \"secure\", type: Boolean, optional: true}\n    ]);\n    if (e) throw e;\n    \n    if (data.length === 0) throw Error.argument('data', Sys.Res.cannotDeserializeEmptyString);\n    try {    \n        var exp = data.replace(Sys.Serialization.JavaScriptSerializer._dateRegEx, \"$1new Date($2)\");\n        \n        if (secure && Sys.Serialization.JavaScriptSerializer._jsonRegEx.test(\n             exp.replace(Sys.Serialization.JavaScriptSerializer._jsonStringRegEx, ''))) throw null;\n        return eval('(' + exp + ')');\n    }\n    catch (e) {\n         throw Error.argument('data', Sys.Res.cannotDeserializeInvalidJson);\n    }\n}\nType.registerNamespace('Sys.UI');\n \nSys.EventHandlerList = function Sys$EventHandlerList() {\n    /// <summary locid=\"M:J#Sys.EventHandlerList.#ctor\" />\n    if (arguments.length !== 0) throw Error.parameterCount();\n    this._list = {};\n}\n    function Sys$EventHandlerList$_addHandler(id, handler) {\n        Array.add(this._getEvent(id, true), handler);\n    }\n    function Sys$EventHandlerList$addHandler(id, handler) {\n        /// <summary locid=\"M:J#Sys.EventHandlerList.addHandler\" />\n        /// <param name=\"id\" type=\"String\"></param>\n        /// <param name=\"handler\" type=\"Function\"></param>\n        var e = Function._validateParams(arguments, [\n            {name: \"id\", type: String},\n            {name: \"handler\", type: Function}\n        ]);\n        if (e) throw e;\n        this._addHandler(id, handler);\n    }\n    function Sys$EventHandlerList$_removeHandler(id, handler) {\n        var evt = this._getEvent(id);\n        if (!evt) return;\n        Array.remove(evt, handler);\n    }\n    function Sys$EventHandlerList$removeHandler(id, handler) {\n        /// <summary locid=\"M:J#Sys.EventHandlerList.removeHandler\" />\n        /// <param name=\"id\" type=\"String\"></param>\n        /// <param name=\"handler\" type=\"Function\"></param>\n        var e = Function._validateParams(arguments, [\n            {name: \"id\", type: String},\n            {name: \"handler\", type: Function}\n        ]);\n        if (e) throw e;\n        this._removeHandler(id, handler);\n    }\n    function Sys$EventHandlerList$getHandler(id) {\n        /// <summary locid=\"M:J#Sys.EventHandlerList.getHandler\" />\n        /// <param name=\"id\" type=\"String\"></param>\n        /// <returns type=\"Function\"></returns>\n        var e = Function._validateParams(arguments, [\n            {name: \"id\", type: String}\n        ]);\n        if (e) throw e;\n        var evt = this._getEvent(id);\n        if (!evt || (evt.length === 0)) return null;\n        evt = Array.clone(evt);\n        return function(source, args) {\n            for (var i = 0, l = evt.length; i < l; i++) {\n                evt[i](source, args);\n            }\n        };\n    }\n    function Sys$EventHandlerList$_getEvent(id, create) {\n        if (!this._list[id]) {\n            if (!create) return null;\n            this._list[id] = [];\n        }\n        return this._list[id];\n    }\nSys.EventHandlerList.prototype = {\n    _addHandler: Sys$EventHandlerList$_addHandler,\n    addHandler: Sys$EventHandlerList$addHandler,\n    _removeHandler: Sys$EventHandlerList$_removeHandler,\n    removeHandler: Sys$EventHandlerList$removeHandler,\n    getHandler: Sys$EventHandlerList$getHandler,\n    _getEvent: Sys$EventHandlerList$_getEvent\n}\nSys.EventHandlerList.registerClass('Sys.EventHandlerList');\nSys.CommandEventArgs = function Sys$CommandEventArgs(commandName, commandArgument, commandSource) {\n    /// <summary locid=\"M:J#Sys.CommandEventArgs.#ctor\" />\n    /// <param name=\"commandName\" type=\"String\"></param>\n    /// <param name=\"commandArgument\" mayBeNull=\"true\"></param>\n    /// <param name=\"commandSource\" mayBeNull=\"true\"></param>\n    var e = Function._validateParams(arguments, [\n        {name: \"commandName\", type: String},\n        {name: \"commandArgument\", mayBeNull: true},\n        {name: \"commandSource\", mayBeNull: true}\n    ]);\n    if (e) throw e;\n    Sys.CommandEventArgs.initializeBase(this);\n    this._commandName = commandName;\n    this._commandArgument = commandArgument;\n    this._commandSource = commandSource;\n}\n    function Sys$CommandEventArgs$get_commandName() {\n        /// <value type=\"String\" locid=\"P:J#Sys.CommandEventArgs.commandName\"></value>\n        if (arguments.length !== 0) throw Error.parameterCount();\n        return this._commandName;\n    }\n    function Sys$CommandEventArgs$get_commandArgument() {\n        /// <value mayBeNull=\"true\" locid=\"P:J#Sys.CommandEventArgs.commandArgument\"></value>\n        if (arguments.length !== 0) throw Error.parameterCount();\n        return this._commandArgument;\n    }\n    function Sys$CommandEventArgs$get_commandSource() {\n        /// <value mayBeNull=\"true\" locid=\"P:J#Sys.CommandEventArgs.commandSource\"></value>\n        if (arguments.length !== 0) throw Error.parameterCount();\n        return this._commandSource;\n    }\nSys.CommandEventArgs.prototype = {\n    _commandName: null,\n    _commandArgument: null,\n    _commandSource: null,\n    get_commandName: Sys$CommandEventArgs$get_commandName,\n    get_commandArgument: Sys$CommandEventArgs$get_commandArgument,\n    get_commandSource: Sys$CommandEventArgs$get_commandSource\n}\nSys.CommandEventArgs.registerClass(\"Sys.CommandEventArgs\", Sys.CancelEventArgs);\n \nSys.INotifyPropertyChange = function Sys$INotifyPropertyChange() {\n    /// <summary locid=\"M:J#Sys.INotifyPropertyChange.#ctor\" />\n    if (arguments.length !== 0) throw Error.parameterCount();\n    throw Error.notImplemented();\n}\n    function Sys$INotifyPropertyChange$add_propertyChanged(handler) {\n    /// <summary locid=\"E:J#Sys.INotifyPropertyChange.propertyChanged\" />\n    var e = Function._validateParams(arguments, [{name: \"handler\", type: Function}]);\n    if (e) throw e;\n        throw Error.notImplemented();\n    }\n    function Sys$INotifyPropertyChange$remove_propertyChanged(handler) {\n    var e = Function._validateParams(arguments, [{name: \"handler\", type: Function}]);\n    if (e) throw e;\n        throw Error.notImplemented();\n    }\nSys.INotifyPropertyChange.prototype = {\n    add_propertyChanged: Sys$INotifyPropertyChange$add_propertyChanged,\n    remove_propertyChanged: Sys$INotifyPropertyChange$remove_propertyChanged\n}\nSys.INotifyPropertyChange.registerInterface('Sys.INotifyPropertyChange');\n \nSys.PropertyChangedEventArgs = function Sys$PropertyChangedEventArgs(propertyName) {\n    /// <summary locid=\"M:J#Sys.PropertyChangedEventArgs.#ctor\" />\n    /// <param name=\"propertyName\" type=\"String\"></param>\n    var e = Function._validateParams(arguments, [\n        {name: \"propertyName\", type: String}\n    ]);\n    if (e) throw e;\n    Sys.PropertyChangedEventArgs.initializeBase(this);\n    this._propertyName = propertyName;\n}\n \n    function Sys$PropertyChangedEventArgs$get_propertyName() {\n        /// <value type=\"String\" locid=\"P:J#Sys.PropertyChangedEventArgs.propertyName\"></value>\n        if (arguments.length !== 0) throw Error.parameterCount();\n        return this._propertyName;\n    }\nSys.PropertyChangedEventArgs.prototype = {\n    get_propertyName: Sys$PropertyChangedEventArgs$get_propertyName\n}\nSys.PropertyChangedEventArgs.registerClass('Sys.PropertyChangedEventArgs', Sys.EventArgs);\n \nSys.INotifyDisposing = function Sys$INotifyDisposing() {\n    /// <summary locid=\"M:J#Sys.INotifyDisposing.#ctor\" />\n    if (arguments.length !== 0) throw Error.parameterCount();\n    throw Error.notImplemented();\n}\n    function Sys$INotifyDisposing$add_disposing(handler) {\n    /// <summary locid=\"E:J#Sys.INotifyDisposing.disposing\" />\n    var e = Function._validateParams(arguments, [{name: \"handler\", type: Function}]);\n    if (e) throw e;\n        throw Error.notImplemented();\n    }\n    function Sys$INotifyDisposing$remove_disposing(handler) {\n    var e = Function._validateParams(arguments, [{name: \"handler\", type: Function}]);\n    if (e) throw e;\n        throw Error.notImplemented();\n    }\nSys.INotifyDisposing.prototype = {\n    add_disposing: Sys$INotifyDisposing$add_disposing,\n    remove_disposing: Sys$INotifyDisposing$remove_disposing\n}\nSys.INotifyDisposing.registerInterface(\"Sys.INotifyDisposing\");\n \nSys.Component = function Sys$Component() {\n    /// <summary locid=\"M:J#Sys.Component.#ctor\" />\n    if (arguments.length !== 0) throw Error.parameterCount();\n    if (Sys.Application) Sys.Application.registerDisposableObject(this);\n}\n    function Sys$Component$get_events() {\n        /// <value type=\"Sys.EventHandlerList\" locid=\"P:J#Sys.Component.events\"></value>\n        if (arguments.length !== 0) throw Error.parameterCount();\n        if (!this._events) {\n            this._events = new Sys.EventHandlerList();\n        }\n        return this._events;\n    }\n    function Sys$Component$get_id() {\n        /// <value type=\"String\" locid=\"P:J#Sys.Component.id\"></value>\n        if (arguments.length !== 0) throw Error.parameterCount();\n        return this._id;\n    }\n    function Sys$Component$set_id(value) {\n        var e = Function._validateParams(arguments, [{name: \"value\", type: String}]);\n        if (e) throw e;\n        if (this._idSet) throw Error.invalidOperation(Sys.Res.componentCantSetIdTwice);\n        this._idSet = true;\n        var oldId = this.get_id();\n        if (oldId && Sys.Application.findComponent(oldId)) throw Error.invalidOperation(Sys.Res.componentCantSetIdAfterAddedToApp);\n        this._id = value;\n    }\n    function Sys$Component$get_isInitialized() {\n        /// <value type=\"Boolean\" locid=\"P:J#Sys.Component.isInitialized\"></value>\n        if (arguments.length !== 0) throw Error.parameterCount();\n        return this._initialized;\n    }\n    function Sys$Component$get_isUpdating() {\n        /// <value type=\"Boolean\" locid=\"P:J#Sys.Component.isUpdating\"></value>\n        if (arguments.length !== 0) throw Error.parameterCount();\n        return this._updating;\n    }\n    function Sys$Component$add_disposing(handler) {\n        /// <summary locid=\"E:J#Sys.Component.disposing\" />\n        var e = Function._validateParams(arguments, [{name: \"handler\", type: Function}]);\n        if (e) throw e;\n        this.get_events().addHandler(\"disposing\", handler);\n    }\n    function Sys$Component$remove_disposing(handler) {\n        var e = Function._validateParams(arguments, [{name: \"handler\", type: Function}]);\n        if (e) throw e;\n        this.get_events().removeHandler(\"disposing\", handler);\n    }\n    function Sys$Component$add_propertyChanged(handler) {\n        /// <summary locid=\"E:J#Sys.Component.propertyChanged\" />\n        var e = Function._validateParams(arguments, [{name: \"handler\", type: Function}]);\n        if (e) throw e;\n        this.get_events().addHandler(\"propertyChanged\", handler);\n    }\n    function Sys$Component$remove_propertyChanged(handler) {\n        var e = Function._validateParams(arguments, [{name: \"handler\", type: Function}]);\n        if (e) throw e;\n        this.get_events().removeHandler(\"propertyChanged\", handler);\n    }\n    function Sys$Component$beginUpdate() {\n        this._updating = true;\n    }\n    function Sys$Component$dispose() {\n        if (this._events) {\n            var handler = this._events.getHandler(\"disposing\");\n            if (handler) {\n                handler(this, Sys.EventArgs.Empty);\n            }\n        }\n        delete this._events;\n        Sys.Application.unregisterDisposableObject(this);\n        Sys.Application.removeComponent(this);\n    }\n    function Sys$Component$endUpdate() {\n        this._updating = false;\n        if (!this._initialized) this.initialize();\n        this.updated();\n    }\n    function Sys$Component$initialize() {\n        this._initialized = true;\n    }\n    function Sys$Component$raisePropertyChanged(propertyName) {\n        /// <summary locid=\"M:J#Sys.Component.raisePropertyChanged\" />\n        /// <param name=\"propertyName\" type=\"String\"></param>\n        var e = Function._validateParams(arguments, [\n            {name: \"propertyName\", type: String}\n        ]);\n        if (e) throw e;\n        if (!this._events) return;\n        var handler = this._events.getHandler(\"propertyChanged\");\n        if (handler) {\n            handler(this, new Sys.PropertyChangedEventArgs(propertyName));\n        }\n    }\n    function Sys$Component$updated() {\n    }\nSys.Component.prototype = {\n    _id: null,\n    _idSet: false,\n    _initialized: false,\n    _updating: false,\n    get_events: Sys$Component$get_events,\n    get_id: Sys$Component$get_id,\n    set_id: Sys$Component$set_id,\n    get_isInitialized: Sys$Component$get_isInitialized,\n    get_isUpdating: Sys$Component$get_isUpdating,\n    add_disposing: Sys$Component$add_disposing,\n    remove_disposing: Sys$Component$remove_disposing,\n    add_propertyChanged: Sys$Component$add_propertyChanged,\n    remove_propertyChanged: Sys$Component$remove_propertyChanged,\n    beginUpdate: Sys$Component$beginUpdate,\n    dispose: Sys$Component$dispose,\n    endUpdate: Sys$Component$endUpdate,\n    initialize: Sys$Component$initialize,\n    raisePropertyChanged: Sys$Component$raisePropertyChanged,\n    updated: Sys$Component$updated\n}\nSys.Component.registerClass('Sys.Component', null, Sys.IDisposable, Sys.INotifyPropertyChange, Sys.INotifyDisposing);\nfunction Sys$Component$_setProperties(target, properties) {\n    /// <summary locid=\"M:J#Sys.Component._setProperties\" />\n    /// <param name=\"target\"></param>\n    /// <param name=\"properties\"></param>\n    var e = Function._validateParams(arguments, [\n        {name: \"target\"},\n        {name: \"properties\"}\n    ]);\n    if (e) throw e;\n    var current;\n    var targetType = Object.getType(target);\n    var isObject = (targetType === Object) || (targetType === Sys.UI.DomElement);\n    var isComponent = Sys.Component.isInstanceOfType(target) && !target.get_isUpdating();\n    if (isComponent) target.beginUpdate();\n    for (var name in properties) {\n        var val = properties[name];\n        var getter = isObject ? null : target[\"get_\" + name];\n        if (isObject || typeof(getter) !== 'function') {\n            var targetVal = target[name];\n            if (!isObject && typeof(targetVal) === 'undefined') throw Error.invalidOperation(String.format(Sys.Res.propertyUndefined, name));\n            if (!val || (typeof(val) !== 'object') || (isObject && !targetVal)) {\n                target[name] = val;\n            }\n            else {\n                Sys$Component$_setProperties(targetVal, val);\n            }\n        }\n        else {\n            var setter = target[\"set_\" + name];\n            if (typeof(setter) === 'function') {\n                setter.apply(target, [val]);\n            }\n            else if (val instanceof Array) {\n                current = getter.apply(target);\n                if (!(current instanceof Array)) throw new Error.invalidOperation(String.format(Sys.Res.propertyNotAnArray, name));\n                for (var i = 0, j = current.length, l= val.length; i < l; i++, j++) {\n                    current[j] = val[i];\n                }\n            }\n            else if ((typeof(val) === 'object') && (Object.getType(val) === Object)) {\n                current = getter.apply(target);\n                if ((typeof(current) === 'undefined') || (current === null)) throw new Error.invalidOperation(String.format(Sys.Res.propertyNullOrUndefined, name));\n                Sys$Component$_setProperties(current, val);\n            }\n            else {\n                throw new Error.invalidOperation(String.format(Sys.Res.propertyNotWritable, name));\n            }\n        }\n    }\n    if (isComponent) target.endUpdate();\n}\nfunction Sys$Component$_setReferences(component, references) {\n    for (var name in references) {\n        var setter = component[\"set_\" + name];\n        var reference = $find(references[name]);\n        if (typeof(setter) !== 'function') throw new Error.invalidOperation(String.format(Sys.Res.propertyNotWritable, name));\n        if (!reference) throw Error.invalidOperation(String.format(Sys.Res.referenceNotFound, references[name]));\n        setter.apply(component, [reference]);\n    }\n}\nvar $create = Sys.Component.create = function Sys$Component$create(type, properties, events, references, element) {\n    /// <summary locid=\"M:J#Sys.Component.create\" />\n    /// <param name=\"type\" type=\"Type\"></param>\n    /// <param name=\"properties\" optional=\"true\" mayBeNull=\"true\"></param>\n    /// <param name=\"events\" optional=\"true\" mayBeNull=\"true\"></param>\n    /// <param name=\"references\" optional=\"true\" mayBeNull=\"true\"></param>\n    /// <param name=\"element\" domElement=\"true\" optional=\"true\" mayBeNull=\"true\"></param>\n    /// <returns type=\"Sys.UI.Component\"></returns>\n    var e = Function._validateParams(arguments, [\n        {name: \"type\", type: Type},\n        {name: \"properties\", mayBeNull: true, optional: true},\n        {name: \"events\", mayBeNull: true, optional: true},\n        {name: \"references\", mayBeNull: true, optional: true},\n        {name: \"element\", mayBeNull: true, domElement: true, optional: true}\n    ]);\n    if (e) throw e;\n    if (!type.inheritsFrom(Sys.Component)) {\n        throw Error.argument('type', String.format(Sys.Res.createNotComponent, type.getName()));\n    }\n    if (type.inheritsFrom(Sys.UI.Behavior) || type.inheritsFrom(Sys.UI.Control)) {\n        if (!element) throw Error.argument('element', Sys.Res.createNoDom);\n    }\n    else if (element) throw Error.argument('element', Sys.Res.createComponentOnDom);\n    var component = (element ? new type(element): new type());\n    var app = Sys.Application;\n    var creatingComponents = app.get_isCreatingComponents();\n    component.beginUpdate();\n    if (properties) {\n        Sys$Component$_setProperties(component, properties);\n    }\n    if (events) {\n        for (var name in events) {\n            if (!(component[\"add_\" + name] instanceof Function)) throw new Error.invalidOperation(String.format(Sys.Res.undefinedEvent, name));\n            if (!(events[name] instanceof Function)) throw new Error.invalidOperation(Sys.Res.eventHandlerNotFunction);\n            component[\"add_\" + name](events[name]);\n        }\n    }\n    if (component.get_id()) {\n        app.addComponent(component);\n    }\n    if (creatingComponents) {\n        app._createdComponents[app._createdComponents.length] = component;\n        if (references) {\n            app._addComponentToSecondPass(component, references);\n        }\n        else {\n            component.endUpdate();\n        }\n    }\n    else {\n        if (references) {\n            Sys$Component$_setReferences(component, references);\n        }\n        component.endUpdate();\n    }\n    return component;\n}\n \nSys.UI.MouseButton = function Sys$UI$MouseButton() {\n    /// <summary locid=\"M:J#Sys.UI.MouseButton.#ctor\" />\n    /// <field name=\"leftButton\" type=\"Number\" integer=\"true\" static=\"true\" locid=\"F:J#Sys.UI.MouseButton.leftButton\"></field>\n    /// <field name=\"middleButton\" type=\"Number\" integer=\"true\" static=\"true\" locid=\"F:J#Sys.UI.MouseButton.middleButton\"></field>\n    /// <field name=\"rightButton\" type=\"Number\" integer=\"true\" static=\"true\" locid=\"F:J#Sys.UI.MouseButton.rightButton\"></field>\n    if (arguments.length !== 0) throw Error.parameterCount();\n    throw Error.notImplemented();\n}\nSys.UI.MouseButton.prototype = {\n    leftButton: 0,\n    middleButton: 1,\n    rightButton: 2\n}\nSys.UI.MouseButton.registerEnum(\"Sys.UI.MouseButton\");\n \nSys.UI.Key = function Sys$UI$Key() {\n    /// <summary locid=\"M:J#Sys.UI.Key.#ctor\" />\n    /// <field name=\"backspace\" type=\"Number\" integer=\"true\" static=\"true\" locid=\"F:J#Sys.UI.Key.backspace\"></field>\n    /// <field name=\"tab\" type=\"Number\" integer=\"true\" static=\"true\" locid=\"F:J#Sys.UI.Key.tab\"></field>\n    /// <field name=\"enter\" type=\"Number\" integer=\"true\" static=\"true\" locid=\"F:J#Sys.UI.Key.enter\"></field>\n    /// <field name=\"esc\" type=\"Number\" integer=\"true\" static=\"true\" locid=\"F:J#Sys.UI.Key.esc\"></field>\n    /// <field name=\"space\" type=\"Number\" integer=\"true\" static=\"true\" locid=\"F:J#Sys.UI.Key.space\"></field>\n    /// <field name=\"pageUp\" type=\"Number\" integer=\"true\" static=\"true\" locid=\"F:J#Sys.UI.Key.pageUp\"></field>\n    /// <field name=\"pageDown\" type=\"Number\" integer=\"true\" static=\"true\" locid=\"F:J#Sys.UI.Key.pageDown\"></field>\n    /// <field name=\"end\" type=\"Number\" integer=\"true\" static=\"true\" locid=\"F:J#Sys.UI.Key.end\"></field>\n    /// <field name=\"home\" type=\"Number\" integer=\"true\" static=\"true\" locid=\"F:J#Sys.UI.Key.home\"></field>\n    /// <field name=\"left\" type=\"Number\" integer=\"true\" static=\"true\" locid=\"F:J#Sys.UI.Key.left\"></field>\n    /// <field name=\"up\" type=\"Number\" integer=\"true\" static=\"true\" locid=\"F:J#Sys.UI.Key.up\"></field>\n    /// <field name=\"right\" type=\"Number\" integer=\"true\" static=\"true\" locid=\"F:J#Sys.UI.Key.right\"></field>\n    /// <field name=\"down\" type=\"Number\" integer=\"true\" static=\"true\" locid=\"F:J#Sys.UI.Key.down\"></field>\n    /// <field name=\"del\" type=\"Number\" integer=\"true\" static=\"true\" locid=\"F:J#Sys.UI.Key.del\"></field>\n    if (arguments.length !== 0) throw Error.parameterCount();\n    throw Error.notImplemented();\n}\nSys.UI.Key.prototype = {\n    backspace: 8,\n    tab: 9,\n    enter: 13,\n    esc: 27,\n    space: 32,\n    pageUp: 33,\n    pageDown: 34,\n    end: 35,\n    home: 36,\n    left: 37,\n    up: 38,\n    right: 39,\n    down: 40,\n    del: 127\n}\nSys.UI.Key.registerEnum(\"Sys.UI.Key\");\n \nSys.UI.Point = function Sys$UI$Point(x, y) {\n    /// <summary locid=\"M:J#Sys.UI.Point.#ctor\" />\n    /// <param name=\"x\" type=\"Number\" integer=\"true\"></param>\n    /// <param name=\"y\" type=\"Number\" integer=\"true\"></param>\n    /// <field name=\"x\" type=\"Number\" integer=\"true\" locid=\"F:J#Sys.UI.Point.x\"></field>\n    /// <field name=\"y\" type=\"Number\" integer=\"true\" locid=\"F:J#Sys.UI.Point.y\"></field>\n    var e = Function._validateParams(arguments, [\n        {name: \"x\", type: Number, integer: true},\n        {name: \"y\", type: Number, integer: true}\n    ]);\n    if (e) throw e;\n    this.x = x;\n    this.y = y;\n}\nSys.UI.Point.registerClass('Sys.UI.Point');\n \nSys.UI.Bounds = function Sys$UI$Bounds(x, y, width, height) {\n    /// <summary locid=\"M:J#Sys.UI.Bounds.#ctor\" />\n    /// <param name=\"x\" type=\"Number\" integer=\"true\"></param>\n    /// <param name=\"y\" type=\"Number\" integer=\"true\"></param>\n    /// <param name=\"width\" type=\"Number\" integer=\"true\"></param>\n    /// <param name=\"height\" type=\"Number\" integer=\"true\"></param>\n    /// <field name=\"x\" type=\"Number\" integer=\"true\" locid=\"F:J#Sys.UI.Bounds.x\"></field>\n    /// <field name=\"y\" type=\"Number\" integer=\"true\" locid=\"F:J#Sys.UI.Bounds.y\"></field>\n    /// <field name=\"width\" type=\"Number\" integer=\"true\" locid=\"F:J#Sys.UI.Bounds.width\"></field>\n    /// <field name=\"height\" type=\"Number\" integer=\"true\" locid=\"F:J#Sys.UI.Bounds.height\"></field>\n    var e = Function._validateParams(arguments, [\n        {name: \"x\", type: Number, integer: true},\n        {name: \"y\", type: Number, integer: true},\n        {name: \"width\", type: Number, integer: true},\n        {name: \"height\", type: Number, integer: true}\n    ]);\n    if (e) throw e;\n    this.x = x;\n    this.y = y;\n    this.height = height;\n    this.width = width;\n}\nSys.UI.Bounds.registerClass('Sys.UI.Bounds');\n \nSys.UI.DomEvent = function Sys$UI$DomEvent(eventObject) {\n    /// <summary locid=\"M:J#Sys.UI.DomEvent.#ctor\" />\n    /// <param name=\"eventObject\"></param>\n    /// <field name=\"altKey\" type=\"Boolean\" locid=\"F:J#Sys.UI.DomEvent.altKey\"></field>\n    /// <field name=\"button\" type=\"Sys.UI.MouseButton\" locid=\"F:J#Sys.UI.DomEvent.button\"></field>\n    /// <field name=\"charCode\" type=\"Number\" integer=\"true\" locid=\"F:J#Sys.UI.DomEvent.charCode\"></field>\n    /// <field name=\"clientX\" type=\"Number\" integer=\"true\" locid=\"F:J#Sys.UI.DomEvent.clientX\"></field>\n    /// <field name=\"clientY\" type=\"Number\" integer=\"true\" locid=\"F:J#Sys.UI.DomEvent.clientY\"></field>\n    /// <field name=\"ctrlKey\" type=\"Boolean\" locid=\"F:J#Sys.UI.DomEvent.ctrlKey\"></field>\n    /// <field name=\"keyCode\" type=\"Number\" integer=\"true\" locid=\"F:J#Sys.UI.DomEvent.keyCode\"></field>\n    /// <field name=\"offsetX\" type=\"Number\" integer=\"true\" locid=\"F:J#Sys.UI.DomEvent.offsetX\"></field>\n    /// <field name=\"offsetY\" type=\"Number\" integer=\"true\" locid=\"F:J#Sys.UI.DomEvent.offsetY\"></field>\n    /// <field name=\"screenX\" type=\"Number\" integer=\"true\" locid=\"F:J#Sys.UI.DomEvent.screenX\"></field>\n    /// <field name=\"screenY\" type=\"Number\" integer=\"true\" locid=\"F:J#Sys.UI.DomEvent.screenY\"></field>\n    /// <field name=\"shiftKey\" type=\"Boolean\" locid=\"F:J#Sys.UI.DomEvent.shiftKey\"></field>\n    /// <field name=\"target\" locid=\"F:J#Sys.UI.DomEvent.target\"></field>\n    /// <field name=\"type\" type=\"String\" locid=\"F:J#Sys.UI.DomEvent.type\"></field>\n    var e = Function._validateParams(arguments, [\n        {name: \"eventObject\"}\n    ]);\n    if (e) throw e;\n    var ev = eventObject;\n    var etype = this.type = ev.type.toLowerCase();\n    this.rawEvent = ev;\n    this.altKey = ev.altKey;\n    if (typeof(ev.button) !== 'undefined') {\n        this.button = (typeof(ev.which) !== 'undefined') ? ev.button :\n            (ev.button === 4) ? Sys.UI.MouseButton.middleButton :\n            (ev.button === 2) ? Sys.UI.MouseButton.rightButton :\n            Sys.UI.MouseButton.leftButton;\n    }\n    if (etype === 'keypress') {\n        this.charCode = ev.charCode || ev.keyCode;\n    }\n    else if (ev.keyCode && (ev.keyCode === 46)) {\n        this.keyCode = 127;\n    }\n    else {\n        this.keyCode = ev.keyCode;\n    }\n    this.clientX = ev.clientX;\n    this.clientY = ev.clientY;\n    this.ctrlKey = ev.ctrlKey;\n    this.target = ev.target ? ev.target : ev.srcElement;\n    if (!etype.startsWith('key')) {\n        if ((typeof(ev.offsetX) !== 'undefined') && (typeof(ev.offsetY) !== 'undefined')) {\n            this.offsetX = ev.offsetX;\n            this.offsetY = ev.offsetY;\n        }\n        else if (this.target && (this.target.nodeType !== 3) && (typeof(ev.clientX) === 'number')) {\n            var loc = Sys.UI.DomElement.getLocation(this.target);\n            var w = Sys.UI.DomElement._getWindow(this.target);\n            this.offsetX = (w.pageXOffset || 0) + ev.clientX - loc.x;\n            this.offsetY = (w.pageYOffset || 0) + ev.clientY - loc.y;\n        }\n    }\n    this.screenX = ev.screenX;\n    this.screenY = ev.screenY;\n    this.shiftKey = ev.shiftKey;\n}\n    function Sys$UI$DomEvent$preventDefault() {\n        /// <summary locid=\"M:J#Sys.UI.DomEvent.preventDefault\" />\n        if (arguments.length !== 0) throw Error.parameterCount();\n        if (this.rawEvent.preventDefault) {\n            this.rawEvent.preventDefault();\n        }\n        else if (window.event) {\n            this.rawEvent.returnValue = false;\n        }\n    }\n    function Sys$UI$DomEvent$stopPropagation() {\n        /// <summary locid=\"M:J#Sys.UI.DomEvent.stopPropagation\" />\n        if (arguments.length !== 0) throw Error.parameterCount();\n        if (this.rawEvent.stopPropagation) {\n            this.rawEvent.stopPropagation();\n        }\n        else if (window.event) {\n            this.rawEvent.cancelBubble = true;\n        }\n    }\nSys.UI.DomEvent.prototype = {\n    preventDefault: Sys$UI$DomEvent$preventDefault,\n    stopPropagation: Sys$UI$DomEvent$stopPropagation\n}\nSys.UI.DomEvent.registerClass('Sys.UI.DomEvent');\nvar $addHandler = Sys.UI.DomEvent.addHandler = function Sys$UI$DomEvent$addHandler(element, eventName, handler, autoRemove) {\n    /// <summary locid=\"M:J#Sys.UI.DomEvent.addHandler\" />\n    /// <param name=\"element\"></param>\n    /// <param name=\"eventName\" type=\"String\"></param>\n    /// <param name=\"handler\" type=\"Function\"></param>\n    /// <param name=\"autoRemove\" type=\"Boolean\" optional=\"true\"></param>\n    var e = Function._validateParams(arguments, [\n        {name: \"element\"},\n        {name: \"eventName\", type: String},\n        {name: \"handler\", type: Function},\n        {name: \"autoRemove\", type: Boolean, optional: true}\n    ]);\n    if (e) throw e;\n    Sys.UI.DomEvent._ensureDomNode(element);\n    if (eventName === \"error\") throw Error.invalidOperation(Sys.Res.addHandlerCantBeUsedForError);\n    if (!element._events) {\n        element._events = {};\n    }\n    var eventCache = element._events[eventName];\n    if (!eventCache) {\n        element._events[eventName] = eventCache = [];\n    }\n    var browserHandler;\n    if (element.addEventListener) {\n        browserHandler = function(e) {\n            return handler.call(element, new Sys.UI.DomEvent(e));\n        }\n        element.addEventListener(eventName, browserHandler, false);\n    }\n    else if (element.attachEvent) {\n        browserHandler = function() {\n            var e = {};\n            try {e = Sys.UI.DomElement._getWindow(element).event} catch(ex) {}\n            return handler.call(element, new Sys.UI.DomEvent(e));\n        }\n        element.attachEvent('on' + eventName, browserHandler);\n    }\n    eventCache[eventCache.length] = {handler: handler, browserHandler: browserHandler, autoRemove: autoRemove };\n    if (autoRemove) {\n        var d = element.dispose;\n        if (d !== Sys.UI.DomEvent._disposeHandlers) {\n            element.dispose = Sys.UI.DomEvent._disposeHandlers;\n            if (typeof(d) !== \"undefined\") {\n                element._chainDispose = d;\n            }\n        }\n    }\n}\nvar $addHandlers = Sys.UI.DomEvent.addHandlers = function Sys$UI$DomEvent$addHandlers(element, events, handlerOwner, autoRemove) {\n    /// <summary locid=\"M:J#Sys.UI.DomEvent.addHandlers\" />\n    /// <param name=\"element\"></param>\n    /// <param name=\"events\" type=\"Object\"></param>\n    /// <param name=\"handlerOwner\" optional=\"true\"></param>\n    /// <param name=\"autoRemove\" type=\"Boolean\" optional=\"true\"></param>\n    var e = Function._validateParams(arguments, [\n        {name: \"element\"},\n        {name: \"events\", type: Object},\n        {name: \"handlerOwner\", optional: true},\n        {name: \"autoRemove\", type: Boolean, optional: true}\n    ]);\n    if (e) throw e;\n    Sys.UI.DomEvent._ensureDomNode(element);\n    for (var name in events) {\n        var handler = events[name];\n        if (typeof(handler) !== 'function') throw Error.invalidOperation(Sys.Res.cantAddNonFunctionhandler);\n        if (handlerOwner) {\n            handler = Function.createDelegate(handlerOwner, handler);\n        }\n        $addHandler(element, name, handler, autoRemove || false);\n    }\n}\nvar $clearHandlers = Sys.UI.DomEvent.clearHandlers = function Sys$UI$DomEvent$clearHandlers(element) {\n    /// <summary locid=\"M:J#Sys.UI.DomEvent.clearHandlers\" />\n    /// <param name=\"element\"></param>\n    var e = Function._validateParams(arguments, [\n        {name: \"element\"}\n    ]);\n    if (e) throw e;\n    Sys.UI.DomEvent._ensureDomNode(element);\n    Sys.UI.DomEvent._clearHandlers(element, false);\n}\nSys.UI.DomEvent._clearHandlers = function Sys$UI$DomEvent$_clearHandlers(element, autoRemoving) {\n    if (element._events) {\n        var cache = element._events;\n        for (var name in cache) {\n            var handlers = cache[name];\n            for (var i = handlers.length - 1; i >= 0; i--) {\n                var entry = handlers[i];\n                if (!autoRemoving || entry.autoRemove) {\n                    $removeHandler(element, name, entry.handler);\n                }\n            }\n        }\n        element._events = null;\n    }\n}\nSys.UI.DomEvent._disposeHandlers = function Sys$UI$DomEvent$_disposeHandlers() {\n    Sys.UI.DomEvent._clearHandlers(this, true);\n    var d = this._chainDispose, type = typeof(d);\n    if (type !== \"undefined\") {\n        this.dispose = d;\n        this._chainDispose = null;\n        if (type === \"function\") {\n            this.dispose();\n        }\n    }\n}\nvar $removeHandler = Sys.UI.DomEvent.removeHandler = function Sys$UI$DomEvent$removeHandler(element, eventName, handler) {\n    /// <summary locid=\"M:J#Sys.UI.DomEvent.removeHandler\" />\n    /// <param name=\"element\"></param>\n    /// <param name=\"eventName\" type=\"String\"></param>\n    /// <param name=\"handler\" type=\"Function\"></param>\n    var e = Function._validateParams(arguments, [\n        {name: \"element\"},\n        {name: \"eventName\", type: String},\n        {name: \"handler\", type: Function}\n    ]);\n    if (e) throw e;\n    Sys.UI.DomEvent._removeHandler(element, eventName, handler);\n}\nSys.UI.DomEvent._removeHandler = function Sys$UI$DomEvent$_removeHandler(element, eventName, handler) {\n    Sys.UI.DomEvent._ensureDomNode(element);\n    var browserHandler = null;\n    if ((typeof(element._events) !== 'object') || !element._events) throw Error.invalidOperation(Sys.Res.eventHandlerInvalid);\n    var cache = element._events[eventName];\n    if (!(cache instanceof Array)) throw Error.invalidOperation(Sys.Res.eventHandlerInvalid);\n    for (var i = 0, l = cache.length; i < l; i++) {\n        if (cache[i].handler === handler) {\n            browserHandler = cache[i].browserHandler;\n            break;\n        }\n    }\n    if (typeof(browserHandler) !== 'function') throw Error.invalidOperation(Sys.Res.eventHandlerInvalid);\n    if (element.removeEventListener) {\n        element.removeEventListener(eventName, browserHandler, false);\n    }\n    else if (element.detachEvent) {\n        element.detachEvent('on' + eventName, browserHandler);\n    }\n    cache.splice(i, 1);\n}\nSys.UI.DomEvent._ensureDomNode = function Sys$UI$DomEvent$_ensureDomNode(element) {\n    if (element.tagName && (element.tagName.toUpperCase() === \"SCRIPT\")) return;\n    \n    var doc = element.ownerDocument || element.document || element;\n    if ((typeof(element.document) !== 'object') && (element != doc) && (typeof(element.nodeType) !== 'number')) {\n        throw Error.argument(\"element\", Sys.Res.argumentDomNode);\n    }\n}\n \nSys.UI.DomElement = function Sys$UI$DomElement() {\n    /// <summary locid=\"M:J#Sys.UI.DomElement.#ctor\" />\n    if (arguments.length !== 0) throw Error.parameterCount();\n    throw Error.notImplemented();\n}\nSys.UI.DomElement.registerClass('Sys.UI.DomElement');\nSys.UI.DomElement.addCssClass = function Sys$UI$DomElement$addCssClass(element, className) {\n    /// <summary locid=\"M:J#Sys.UI.DomElement.addCssClass\" />\n    /// <param name=\"element\" domElement=\"true\"></param>\n    /// <param name=\"className\" type=\"String\"></param>\n    var e = Function._validateParams(arguments, [\n        {name: \"element\", domElement: true},\n        {name: \"className\", type: String}\n    ]);\n    if (e) throw e;\n    if (!Sys.UI.DomElement.containsCssClass(element, className)) {\n        if (element.className === '') {\n            element.className = className;\n        }\n        else {\n            element.className += ' ' + className;\n        }\n    }\n}\nSys.UI.DomElement.containsCssClass = function Sys$UI$DomElement$containsCssClass(element, className) {\n    /// <summary locid=\"M:J#Sys.UI.DomElement.containsCssClass\" />\n    /// <param name=\"element\" domElement=\"true\"></param>\n    /// <param name=\"className\" type=\"String\"></param>\n    /// <returns type=\"Boolean\"></returns>\n    var e = Function._validateParams(arguments, [\n        {name: \"element\", domElement: true},\n        {name: \"className\", type: String}\n    ]);\n    if (e) throw e;\n    return Array.contains(element.className.split(' '), className);\n}\nSys.UI.DomElement.getBounds = function Sys$UI$DomElement$getBounds(element) {\n    /// <summary locid=\"M:J#Sys.UI.DomElement.getBounds\" />\n    /// <param name=\"element\" domElement=\"true\"></param>\n    /// <returns type=\"Sys.UI.Bounds\"></returns>\n    var e = Function._validateParams(arguments, [\n        {name: \"element\", domElement: true}\n    ]);\n    if (e) throw e;\n    var offset = Sys.UI.DomElement.getLocation(element);\n    return new Sys.UI.Bounds(offset.x, offset.y, element.offsetWidth || 0, element.offsetHeight || 0);\n}\nvar $get = Sys.UI.DomElement.getElementById = function Sys$UI$DomElement$getElementById(id, element) {\n    /// <summary locid=\"M:J#Sys.UI.DomElement.getElementById\" />\n    /// <param name=\"id\" type=\"String\"></param>\n    /// <param name=\"element\" domElement=\"true\" optional=\"true\" mayBeNull=\"true\"></param>\n    /// <returns domElement=\"true\" mayBeNull=\"true\"></returns>\n    var e = Function._validateParams(arguments, [\n        {name: \"id\", type: String},\n        {name: \"element\", mayBeNull: true, domElement: true, optional: true}\n    ]);\n    if (e) throw e;\n    if (!element) return document.getElementById(id);\n    if (element.getElementById) return element.getElementById(id);\n    var nodeQueue = [];\n    var childNodes = element.childNodes;\n    for (var i = 0; i < childNodes.length; i++) {\n        var node = childNodes[i];\n        if (node.nodeType == 1) {\n            nodeQueue[nodeQueue.length] = node;\n        }\n    }\n    while (nodeQueue.length) {\n        node = nodeQueue.shift();\n        if (node.id == id) {\n            return node;\n        }\n        childNodes = node.childNodes;\n        for (i = 0; i < childNodes.length; i++) {\n            node = childNodes[i];\n            if (node.nodeType == 1) {\n                nodeQueue[nodeQueue.length] = node;\n            }\n        }\n    }\n    return null;\n}\nif (document.documentElement.getBoundingClientRect) {\n    Sys.UI.DomElement.getLocation = function Sys$UI$DomElement$getLocation(element) {\n        /// <summary locid=\"M:J#Sys.UI.DomElement.getLocation\" />\n        /// <param name=\"element\" domElement=\"true\"></param>\n        /// <returns type=\"Sys.UI.Point\"></returns>\n        var e = Function._validateParams(arguments, [\n            {name: \"element\", domElement: true}\n        ]);\n        if (e) throw e;\n        if (element.self || element.nodeType === 9) return new Sys.UI.Point(0,0);\n        var clientRect = element.getBoundingClientRect();\n        if (!clientRect) {\n            return new Sys.UI.Point(0,0);\n        }\n        var documentElement = element.ownerDocument.documentElement,\n            offsetX = Math.floor(clientRect.left + 0.5) + documentElement.scrollLeft,\n            offsetY = Math.floor(clientRect.top + 0.5) + documentElement.scrollTop;\n        if (Sys.Browser.agent === Sys.Browser.InternetExplorer) {\n            try {\n                var f = element.ownerDocument.parentWindow.frameElement || null;\n                if (f) {\n                    var offset = (f.frameBorder === \"0\" || f.frameBorder === \"no\") ? 2 : 0;\n                    offsetX += offset;\n                    offsetY += offset;\n                }\n            }\n            catch(ex) {\n            }\n            if (Sys.Browser.version <= 7) {\n                \n                var multiplier, before, rect, d = document.createElement(\"div\");\n                d.style.cssText = \"position:absolute !important;left:0px !important;right:0px !important;height:0px !important;width:1px !important;display:hidden !important\";\n                try {\n                    before = document.body.childNodes[0];\n                    document.body.insertBefore(d, before);\n                    rect = d.getBoundingClientRect();\n                    document.body.removeChild(d);\n                    multiplier = (rect.right - rect.left);\n                }\n                catch (e) {\n                }\n                if (multiplier && (multiplier !== 1)) {\n                    offsetX = Math.floor(offsetX / multiplier);\n                    offsetY = Math.floor(offsetY / multiplier);\n                }\n            }        \n            if ((document.documentMode || 0) < 8) {\n                offsetX -= 2;\n                offsetY -= 2;\n            }\n        }\n        return new Sys.UI.Point(offsetX, offsetY);\n    }\n}\nelse if (Sys.Browser.agent === Sys.Browser.Safari) {\n    Sys.UI.DomElement.getLocation = function Sys$UI$DomElement$getLocation(element) {\n        /// <summary locid=\"M:J#Sys.UI.DomElement.getLocation\" />\n        /// <param name=\"element\" domElement=\"true\"></param>\n        /// <returns type=\"Sys.UI.Point\"></returns>\n        var e = Function._validateParams(arguments, [\n            {name: \"element\", domElement: true}\n        ]);\n        if (e) throw e;\n        if ((element.window && (element.window === element)) || element.nodeType === 9) return new Sys.UI.Point(0,0);\n        var offsetX = 0, offsetY = 0,\n            parent,\n            previous = null,\n            previousStyle = null,\n            currentStyle;\n        for (parent = element; parent; previous = parent, previousStyle = currentStyle, parent = parent.offsetParent) {\n            currentStyle = Sys.UI.DomElement._getCurrentStyle(parent);\n            var tagName = parent.tagName ? parent.tagName.toUpperCase() : null;\n            if ((parent.offsetLeft || parent.offsetTop) &&\n                ((tagName !== \"BODY\") || (!previousStyle || previousStyle.position !== \"absolute\"))) {\n                offsetX += parent.offsetLeft;\n                offsetY += parent.offsetTop;\n            }\n            if (previous && Sys.Browser.version >= 3) {\n                offsetX += parseInt(currentStyle.borderLeftWidth);\n                offsetY += parseInt(currentStyle.borderTopWidth);\n            }\n        }\n        currentStyle = Sys.UI.DomElement._getCurrentStyle(element);\n        var elementPosition = currentStyle ? currentStyle.position : null;\n        if (!elementPosition || (elementPosition !== \"absolute\")) {\n            for (parent = element.parentNode; parent; parent = parent.parentNode) {\n                tagName = parent.tagName ? parent.tagName.toUpperCase() : null;\n                if ((tagName !== \"BODY\") && (tagName !== \"HTML\") && (parent.scrollLeft || parent.scrollTop)) {\n                    offsetX -= (parent.scrollLeft || 0);\n                    offsetY -= (parent.scrollTop || 0);\n                }\n                currentStyle = Sys.UI.DomElement._getCurrentStyle(parent);\n                var parentPosition = currentStyle ? currentStyle.position : null;\n                if (parentPosition && (parentPosition === \"absolute\")) break;\n            }\n        }\n        return new Sys.UI.Point(offsetX, offsetY);\n    }\n}\nelse {\n    Sys.UI.DomElement.getLocation = function Sys$UI$DomElement$getLocation(element) {\n        /// <summary locid=\"M:J#Sys.UI.DomElement.getLocation\" />\n        /// <param name=\"element\" domElement=\"true\"></param>\n        /// <returns type=\"Sys.UI.Point\"></returns>\n        var e = Function._validateParams(arguments, [\n            {name: \"element\", domElement: true}\n        ]);\n        if (e) throw e;\n        if ((element.window && (element.window === element)) || element.nodeType === 9) return new Sys.UI.Point(0,0);\n        var offsetX = 0, offsetY = 0,\n            parent,\n            previous = null,\n            previousStyle = null,\n            currentStyle = null;\n        for (parent = element; parent; previous = parent, previousStyle = currentStyle, parent = parent.offsetParent) {\n            var tagName = parent.tagName ? parent.tagName.toUpperCase() : null;\n            currentStyle = Sys.UI.DomElement._getCurrentStyle(parent);\n            if ((parent.offsetLeft || parent.offsetTop) &&\n                !((tagName === \"BODY\") &&\n                (!previousStyle || previousStyle.position !== \"absolute\"))) {\n                offsetX += parent.offsetLeft;\n                offsetY += parent.offsetTop;\n            }\n            if (previous !== null && currentStyle) {\n                if ((tagName !== \"TABLE\") && (tagName !== \"TD\") && (tagName !== \"HTML\")) {\n                    offsetX += parseInt(currentStyle.borderLeftWidth) || 0;\n                    offsetY += parseInt(currentStyle.borderTopWidth) || 0;\n                }\n                if (tagName === \"TABLE\" &&\n                    (currentStyle.position === \"relative\" || currentStyle.position === \"absolute\")) {\n                    offsetX += parseInt(currentStyle.marginLeft) || 0;\n                    offsetY += parseInt(currentStyle.marginTop) || 0;\n                }\n            }\n        }\n        currentStyle = Sys.UI.DomElement._getCurrentStyle(element);\n        var elementPosition = currentStyle ? currentStyle.position : null;\n        if (!elementPosition || (elementPosition !== \"absolute\")) {\n            for (parent = element.parentNode; parent; parent = parent.parentNode) {\n                tagName = parent.tagName ? parent.tagName.toUpperCase() : null;\n                if ((tagName !== \"BODY\") && (tagName !== \"HTML\") && (parent.scrollLeft || parent.scrollTop)) {\n                    offsetX -= (parent.scrollLeft || 0);\n                    offsetY -= (parent.scrollTop || 0);\n                    currentStyle = Sys.UI.DomElement._getCurrentStyle(parent);\n                    if (currentStyle) {\n                        offsetX += parseInt(currentStyle.borderLeftWidth) || 0;\n                        offsetY += parseInt(currentStyle.borderTopWidth) || 0;\n                    }\n                }\n            }\n        }\n        return new Sys.UI.Point(offsetX, offsetY);\n    }\n}\nSys.UI.DomElement.isDomElement = function Sys$UI$DomElement$isDomElement(obj) {\n    /// <summary locid=\"M:J#Sys.UI.DomElement.isDomElement\" />\n    /// <param name=\"obj\"></param>\n    /// <returns type=\"Boolean\"></returns>\n    var e = Function._validateParams(arguments, [\n        {name: \"obj\"}\n    ]);\n    if (e) throw e;\n    return Sys._isDomElement(obj);\n}\nSys.UI.DomElement.removeCssClass = function Sys$UI$DomElement$removeCssClass(element, className) {\n    /// <summary locid=\"M:J#Sys.UI.DomElement.removeCssClass\" />\n    /// <param name=\"element\" domElement=\"true\"></param>\n    /// <param name=\"className\" type=\"String\"></param>\n    var e = Function._validateParams(arguments, [\n        {name: \"element\", domElement: true},\n        {name: \"className\", type: String}\n    ]);\n    if (e) throw e;\n    var currentClassName = ' ' + element.className + ' ';\n    var index = currentClassName.indexOf(' ' + className + ' ');\n    if (index >= 0) {\n        element.className = (currentClassName.substr(0, index) + ' ' +\n            currentClassName.substring(index + className.length + 1, currentClassName.length)).trim();\n    }\n}\nSys.UI.DomElement.resolveElement = function Sys$UI$DomElement$resolveElement(elementOrElementId, containerElement) {\n    /// <summary locid=\"M:J#Sys.UI.DomElement.resolveElement\" />\n    /// <param name=\"elementOrElementId\" mayBeNull=\"true\"></param>\n    /// <param name=\"containerElement\" domElement=\"true\" optional=\"true\" mayBeNull=\"true\"></param>\n    /// <returns domElement=\"true\"></returns>\n    var e = Function._validateParams(arguments, [\n        {name: \"elementOrElementId\", mayBeNull: true},\n        {name: \"containerElement\", mayBeNull: true, domElement: true, optional: true}\n    ]);\n    if (e) throw e;\n    var el = elementOrElementId;\n    if (!el) return null;\n    if (typeof(el) === \"string\") {\n        el = Sys.UI.DomElement.getElementById(el, containerElement);\n        if (!el) {\n            throw Error.argument(\"elementOrElementId\", String.format(Sys.Res.elementNotFound, elementOrElementId));\n        }\n    }\n    else if(!Sys.UI.DomElement.isDomElement(el)) {\n        throw Error.argument(\"elementOrElementId\", Sys.Res.expectedElementOrId);\n    }\n    return el;\n}\nSys.UI.DomElement.raiseBubbleEvent = function Sys$UI$DomElement$raiseBubbleEvent(source, args) {\n    /// <summary locid=\"M:J#Sys.UI.DomElement.raiseBubbleEvent\" />\n    /// <param name=\"source\" domElement=\"true\"></param>\n    /// <param name=\"args\" type=\"Sys.EventArgs\"></param>\n    var e = Function._validateParams(arguments, [\n        {name: \"source\", domElement: true},\n        {name: \"args\", type: Sys.EventArgs}\n    ]);\n    if (e) throw e;\n    var target = source;\n    while (target) {\n        var control = target.control;\n        if (control && control.onBubbleEvent && control.raiseBubbleEvent) {\n            Sys.UI.DomElement._raiseBubbleEventFromControl(control, source, args);\n            return;\n        }\n        target = target.parentNode;\n    }\n}\nSys.UI.DomElement._raiseBubbleEventFromControl = function Sys$UI$DomElement$_raiseBubbleEventFromControl(control, source, args) {\n    if (!control.onBubbleEvent(source, args)) {\n        control._raiseBubbleEvent(source, args);\n    }\n}\nSys.UI.DomElement.setLocation = function Sys$UI$DomElement$setLocation(element, x, y) {\n    /// <summary locid=\"M:J#Sys.UI.DomElement.setLocation\" />\n    /// <param name=\"element\" domElement=\"true\"></param>\n    /// <param name=\"x\" type=\"Number\" integer=\"true\"></param>\n    /// <param name=\"y\" type=\"Number\" integer=\"true\"></param>\n    var e = Function._validateParams(arguments, [\n        {name: \"element\", domElement: true},\n        {name: \"x\", type: Number, integer: true},\n        {name: \"y\", type: Number, integer: true}\n    ]);\n    if (e) throw e;\n    var style = element.style;\n    style.position = 'absolute';\n    style.left = x + \"px\";\n    style.top = y + \"px\";\n}\nSys.UI.DomElement.toggleCssClass = function Sys$UI$DomElement$toggleCssClass(element, className) {\n    /// <summary locid=\"M:J#Sys.UI.DomElement.toggleCssClass\" />\n    /// <param name=\"element\" domElement=\"true\"></param>\n    /// <param name=\"className\" type=\"String\"></param>\n    var e = Function._validateParams(arguments, [\n        {name: \"element\", domElement: true},\n        {name: \"className\", type: String}\n    ]);\n    if (e) throw e;\n    if (Sys.UI.DomElement.containsCssClass(element, className)) {\n        Sys.UI.DomElement.removeCssClass(element, className);\n    }\n    else {\n        Sys.UI.DomElement.addCssClass(element, className);\n    }\n}\nSys.UI.DomElement.getVisibilityMode = function Sys$UI$DomElement$getVisibilityMode(element) {\n    /// <summary locid=\"M:J#Sys.UI.DomElement.getVisibilityMode\" />\n    /// <param name=\"element\" domElement=\"true\"></param>\n    /// <returns type=\"Sys.UI.VisibilityMode\"></returns>\n    var e = Function._validateParams(arguments, [\n        {name: \"element\", domElement: true}\n    ]);\n    if (e) throw e;\n    return (element._visibilityMode === Sys.UI.VisibilityMode.hide) ?\n        Sys.UI.VisibilityMode.hide :\n        Sys.UI.VisibilityMode.collapse;\n}\nSys.UI.DomElement.setVisibilityMode = function Sys$UI$DomElement$setVisibilityMode(element, value) {\n    /// <summary locid=\"M:J#Sys.UI.DomElement.setVisibilityMode\" />\n    /// <param name=\"element\" domElement=\"true\"></param>\n    /// <param name=\"value\" type=\"Sys.UI.VisibilityMode\"></param>\n    var e = Function._validateParams(arguments, [\n        {name: \"element\", domElement: true},\n        {name: \"value\", type: Sys.UI.VisibilityMode}\n    ]);\n    if (e) throw e;\n    Sys.UI.DomElement._ensureOldDisplayMode(element);\n    if (element._visibilityMode !== value) {\n        element._visibilityMode = value;\n        if (Sys.UI.DomElement.getVisible(element) === false) {\n            if (element._visibilityMode === Sys.UI.VisibilityMode.hide) {\n                element.style.display = element._oldDisplayMode;\n            }\n            else {\n                element.style.display = 'none';\n            }\n        }\n        element._visibilityMode = value;\n    }\n}\nSys.UI.DomElement.getVisible = function Sys$UI$DomElement$getVisible(element) {\n    /// <summary locid=\"M:J#Sys.UI.DomElement.getVisible\" />\n    /// <param name=\"element\" domElement=\"true\"></param>\n    /// <returns type=\"Boolean\"></returns>\n    var e = Function._validateParams(arguments, [\n        {name: \"element\", domElement: true}\n    ]);\n    if (e) throw e;\n    var style = element.currentStyle || Sys.UI.DomElement._getCurrentStyle(element);\n    if (!style) return true;\n    return (style.visibility !== 'hidden') && (style.display !== 'none');\n}\nSys.UI.DomElement.setVisible = function Sys$UI$DomElement$setVisible(element, value) {\n    /// <summary locid=\"M:J#Sys.UI.DomElement.setVisible\" />\n    /// <param name=\"element\" domElement=\"true\"></param>\n    /// <param name=\"value\" type=\"Boolean\"></param>\n    var e = Function._validateParams(arguments, [\n        {name: \"element\", domElement: true},\n        {name: \"value\", type: Boolean}\n    ]);\n    if (e) throw e;\n    if (value !== Sys.UI.DomElement.getVisible(element)) {\n        Sys.UI.DomElement._ensureOldDisplayMode(element);\n        element.style.visibility = value ? 'visible' : 'hidden';\n        if (value || (element._visibilityMode === Sys.UI.VisibilityMode.hide)) {\n            element.style.display = element._oldDisplayMode;\n        }\n        else {\n            element.style.display = 'none';\n        }\n    }\n}\nSys.UI.DomElement._ensureOldDisplayMode = function Sys$UI$DomElement$_ensureOldDisplayMode(element) {\n    if (!element._oldDisplayMode) {\n        var style = element.currentStyle || Sys.UI.DomElement._getCurrentStyle(element);\n        element._oldDisplayMode = style ? style.display : null;\n        if (!element._oldDisplayMode || element._oldDisplayMode === 'none') {\n            switch(element.tagName.toUpperCase()) {\n                case 'DIV': case 'P': case 'ADDRESS': case 'BLOCKQUOTE': case 'BODY': case 'COL':\n                case 'COLGROUP': case 'DD': case 'DL': case 'DT': case 'FIELDSET': case 'FORM':\n                case 'H1': case 'H2': case 'H3': case 'H4': case 'H5': case 'H6': case 'HR':\n                case 'IFRAME': case 'LEGEND': case 'OL': case 'PRE': case 'TABLE': case 'TD':\n                case 'TH': case 'TR': case 'UL':\n                    element._oldDisplayMode = 'block';\n                    break;\n                case 'LI':\n                    element._oldDisplayMode = 'list-item';\n                    break;\n                default:\n                    element._oldDisplayMode = 'inline';\n            }\n        }\n    }\n}\nSys.UI.DomElement._getWindow = function Sys$UI$DomElement$_getWindow(element) {\n    var doc = element.ownerDocument || element.document || element;\n    return doc.defaultView || doc.parentWindow;\n}\nSys.UI.DomElement._getCurrentStyle = function Sys$UI$DomElement$_getCurrentStyle(element) {\n    if (element.nodeType === 3) return null;\n    var w = Sys.UI.DomElement._getWindow(element);\n    if (element.documentElement) element = element.documentElement;\n    var computedStyle = (w && (element !== w) && w.getComputedStyle) ?\n        w.getComputedStyle(element, null) :\n        element.currentStyle || element.style;\n    if (!computedStyle && (Sys.Browser.agent === Sys.Browser.Safari) && element.style) {\n        var oldDisplay = element.style.display;\n        var oldPosition = element.style.position;\n        element.style.position = 'absolute';\n        element.style.display = 'block';\n        var style = w.getComputedStyle(element, null);\n        element.style.display = oldDisplay;\n        element.style.position = oldPosition;\n        computedStyle = {};\n        for (var n in style) {\n            computedStyle[n] = style[n];\n        }\n        computedStyle.display = 'none';\n    }\n    return computedStyle;\n}\n \nSys.IContainer = function Sys$IContainer() {\n    throw Error.notImplemented();\n}\n    function Sys$IContainer$addComponent(component) {\n        /// <summary locid=\"M:J#Sys.IContainer.addComponent\" />\n        /// <param name=\"component\" type=\"Sys.Component\"></param>\n        var e = Function._validateParams(arguments, [\n            {name: \"component\", type: Sys.Component}\n        ]);\n        if (e) throw e;\n        throw Error.notImplemented();\n    }\n    function Sys$IContainer$removeComponent(component) {\n        /// <summary locid=\"M:J#Sys.IContainer.removeComponent\" />\n        /// <param name=\"component\" type=\"Sys.Component\"></param>\n        var e = Function._validateParams(arguments, [\n            {name: \"component\", type: Sys.Component}\n        ]);\n        if (e) throw e;\n        throw Error.notImplemented();\n    }\n    function Sys$IContainer$findComponent(id) {\n        /// <summary locid=\"M:J#Sys.IContainer.findComponent\" />\n        /// <param name=\"id\" type=\"String\"></param>\n        /// <returns type=\"Sys.Component\"></returns>\n        var e = Function._validateParams(arguments, [\n            {name: \"id\", type: String}\n        ]);\n        if (e) throw e;\n        throw Error.notImplemented();\n    }\n    function Sys$IContainer$getComponents() {\n        /// <summary locid=\"M:J#Sys.IContainer.getComponents\" />\n        /// <returns type=\"Array\" elementType=\"Sys.Component\"></returns>\n        if (arguments.length !== 0) throw Error.parameterCount();\n        throw Error.notImplemented();\n    }\nSys.IContainer.prototype = {\n    addComponent: Sys$IContainer$addComponent,\n    removeComponent: Sys$IContainer$removeComponent,\n    findComponent: Sys$IContainer$findComponent,\n    getComponents: Sys$IContainer$getComponents\n}\nSys.IContainer.registerInterface(\"Sys.IContainer\");\n \nSys.ApplicationLoadEventArgs = function Sys$ApplicationLoadEventArgs(components, isPartialLoad) {\n    /// <summary locid=\"M:J#Sys.ApplicationLoadEventArgs.#ctor\" />\n    /// <param name=\"components\" type=\"Array\" elementType=\"Sys.Component\"></param>\n    /// <param name=\"isPartialLoad\" type=\"Boolean\"></param>\n    var e = Function._validateParams(arguments, [\n        {name: \"components\", type: Array, elementType: Sys.Component},\n        {name: \"isPartialLoad\", type: Boolean}\n    ]);\n    if (e) throw e;\n    Sys.ApplicationLoadEventArgs.initializeBase(this);\n    this._components = components;\n    this._isPartialLoad = isPartialLoad;\n}\n \n    function Sys$ApplicationLoadEventArgs$get_components() {\n        /// <value type=\"Array\" elementType=\"Sys.Component\" locid=\"P:J#Sys.ApplicationLoadEventArgs.components\"></value>\n        if (arguments.length !== 0) throw Error.parameterCount();\n        return this._components;\n    }\n    function Sys$ApplicationLoadEventArgs$get_isPartialLoad() {\n        /// <value type=\"Boolean\" locid=\"P:J#Sys.ApplicationLoadEventArgs.isPartialLoad\"></value>\n        if (arguments.length !== 0) throw Error.parameterCount();\n        return this._isPartialLoad;\n    }\nSys.ApplicationLoadEventArgs.prototype = {\n    get_components: Sys$ApplicationLoadEventArgs$get_components,\n    get_isPartialLoad: Sys$ApplicationLoadEventArgs$get_isPartialLoad\n}\nSys.ApplicationLoadEventArgs.registerClass('Sys.ApplicationLoadEventArgs', Sys.EventArgs);\n \nSys._Application = function Sys$_Application() {\n    /// <summary locid=\"M:J#Sys.Application.#ctor\" />\n    if (arguments.length !== 0) throw Error.parameterCount();\n    Sys._Application.initializeBase(this);\n    this._disposableObjects = [];\n    this._components = {};\n    this._createdComponents = [];\n    this._secondPassComponents = [];\n    this._unloadHandlerDelegate = Function.createDelegate(this, this._unloadHandler);\n    Sys.UI.DomEvent.addHandler(window, \"unload\", this._unloadHandlerDelegate);\n    this._domReady();\n}\n    function Sys$_Application$get_isCreatingComponents() {\n        /// <value type=\"Boolean\" locid=\"P:J#Sys.Application.isCreatingComponents\"></value>\n        if (arguments.length !== 0) throw Error.parameterCount();\n        return this._creatingComponents;\n    }\n    function Sys$_Application$get_isDisposing() {\n        /// <value type=\"Boolean\" locid=\"P:J#Sys.Application.isDisposing\"></value>\n        if (arguments.length !== 0) throw Error.parameterCount();\n        return this._disposing;\n    }\n    function Sys$_Application$add_init(handler) {\n        /// <summary locid=\"E:J#Sys.Application.init\" />\n        var e = Function._validateParams(arguments, [{name: \"handler\", type: Function}]);\n        if (e) throw e;\n        if (this._initialized) {\n            handler(this, Sys.EventArgs.Empty);\n        }\n        else {\n            this.get_events().addHandler(\"init\", handler);\n        }\n    }\n    function Sys$_Application$remove_init(handler) {\n        var e = Function._validateParams(arguments, [{name: \"handler\", type: Function}]);\n        if (e) throw e;\n        this.get_events().removeHandler(\"init\", handler);\n    }\n    function Sys$_Application$add_load(handler) {\n        /// <summary locid=\"E:J#Sys.Application.load\" />\n        var e = Function._validateParams(arguments, [{name: \"handler\", type: Function}]);\n        if (e) throw e;\n        this.get_events().addHandler(\"load\", handler);\n    }\n    function Sys$_Application$remove_load(handler) {\n        var e = Function._validateParams(arguments, [{name: \"handler\", type: Function}]);\n        if (e) throw e;\n        this.get_events().removeHandler(\"load\", handler);\n    }\n    function Sys$_Application$add_unload(handler) {\n        /// <summary locid=\"E:J#Sys.Application.unload\" />\n        var e = Function._validateParams(arguments, [{name: \"handler\", type: Function}]);\n        if (e) throw e;\n        this.get_events().addHandler(\"unload\", handler);\n    }\n    function Sys$_Application$remove_unload(handler) {\n        var e = Function._validateParams(arguments, [{name: \"handler\", type: Function}]);\n        if (e) throw e;\n        this.get_events().removeHandler(\"unload\", handler);\n    }\n    function Sys$_Application$addComponent(component) {\n        /// <summary locid=\"M:J#Sys.Application.addComponent\" />\n        /// <param name=\"component\" type=\"Sys.Component\"></param>\n        var e = Function._validateParams(arguments, [\n            {name: \"component\", type: Sys.Component}\n        ]);\n        if (e) throw e;\n        var id = component.get_id();\n        if (!id) throw Error.invalidOperation(Sys.Res.cantAddWithoutId);\n        if (typeof(this._components[id]) !== 'undefined') throw Error.invalidOperation(String.format(Sys.Res.appDuplicateComponent, id));\n        this._components[id] = component;\n    }\n    function Sys$_Application$beginCreateComponents() {\n        /// <summary locid=\"M:J#Sys.Application.beginCreateComponents\" />\n        if (arguments.length !== 0) throw Error.parameterCount();\n        this._creatingComponents = true;\n    }\n    function Sys$_Application$dispose() {\n        /// <summary locid=\"M:J#Sys.Application.dispose\" />\n        if (arguments.length !== 0) throw Error.parameterCount();\n        if (!this._disposing) {\n            this._disposing = true;\n            if (this._timerCookie) {\n                window.clearTimeout(this._timerCookie);\n                delete this._timerCookie;\n            }\n            if (this._endRequestHandler) {\n                Sys.WebForms.PageRequestManager.getInstance().remove_endRequest(this._endRequestHandler);\n                delete this._endRequestHandler;\n            }\n            if (this._beginRequestHandler) {\n                Sys.WebForms.PageRequestManager.getInstance().remove_beginRequest(this._beginRequestHandler);\n                delete this._beginRequestHandler;\n            }\n            if (window.pageUnload) {\n                window.pageUnload(this, Sys.EventArgs.Empty);\n            }\n            var unloadHandler = this.get_events().getHandler(\"unload\");\n            if (unloadHandler) {\n                unloadHandler(this, Sys.EventArgs.Empty);\n            }\n            var disposableObjects = Array.clone(this._disposableObjects);\n            for (var i = 0, l = disposableObjects.length; i < l; i++) {\n                var object = disposableObjects[i];\n                if (typeof(object) !== \"undefined\") {\n                    object.dispose();\n                }\n            }\n            Array.clear(this._disposableObjects);\n            Sys.UI.DomEvent.removeHandler(window, \"unload\", this._unloadHandlerDelegate);\n            if (Sys._ScriptLoader) {\n                var sl = Sys._ScriptLoader.getInstance();\n                if(sl) {\n                    sl.dispose();\n                }\n            }\n            Sys._Application.callBaseMethod(this, 'dispose');\n        }\n    }\n    function Sys$_Application$disposeElement(element, childNodesOnly) {\n        /// <summary locid=\"M:J#Sys._Application.disposeElement\" />\n        /// <param name=\"element\"></param>\n        /// <param name=\"childNodesOnly\" type=\"Boolean\"></param>\n        var e = Function._validateParams(arguments, [\n            {name: \"element\"},\n            {name: \"childNodesOnly\", type: Boolean}\n        ]);\n        if (e) throw e;\n        if (element.nodeType === 1) {\n            var children = element.getElementsByTagName(\"*\");\n            for (var i = children.length - 1; i >= 0; i--) {\n                this._disposeElementInternal(children[i]);\n            }\n            if (!childNodesOnly) {\n                this._disposeElementInternal(element);\n            }\n        }\n    }\n    function Sys$_Application$endCreateComponents() {\n        /// <summary locid=\"M:J#Sys.Application.endCreateComponents\" />\n        if (arguments.length !== 0) throw Error.parameterCount();\n        var components = this._secondPassComponents;\n        for (var i = 0, l = components.length; i < l; i++) {\n            var component = components[i].component;\n            Sys$Component$_setReferences(component, components[i].references);\n            component.endUpdate();\n        }\n        this._secondPassComponents = [];\n        this._creatingComponents = false;\n    }\n    function Sys$_Application$findComponent(id, parent) {\n        /// <summary locid=\"M:J#Sys.Application.findComponent\" />\n        /// <param name=\"id\" type=\"String\"></param>\n        /// <param name=\"parent\" optional=\"true\" mayBeNull=\"true\"></param>\n        /// <returns type=\"Sys.Component\" mayBeNull=\"true\"></returns>\n        var e = Function._validateParams(arguments, [\n            {name: \"id\", type: String},\n            {name: \"parent\", mayBeNull: true, optional: true}\n        ]);\n        if (e) throw e;\n        return (parent ?\n            ((Sys.IContainer.isInstanceOfType(parent)) ?\n                parent.findComponent(id) :\n                parent[id] || null) :\n            Sys.Application._components[id] || null);\n    }\n    function Sys$_Application$getComponents() {\n        /// <summary locid=\"M:J#Sys.Application.getComponents\" />\n        /// <returns type=\"Array\" elementType=\"Sys.Component\"></returns>\n        if (arguments.length !== 0) throw Error.parameterCount();\n        var res = [];\n        var components = this._components;\n        for (var name in components) {\n            res[res.length] = components[name];\n        }\n        return res;\n    }\n    function Sys$_Application$initialize() {\n        /// <summary locid=\"M:J#Sys.Application.initialize\" />\n        if (arguments.length !== 0) throw Error.parameterCount();\n        if(!this.get_isInitialized() && !this._disposing) {\n            Sys._Application.callBaseMethod(this, 'initialize');\n            this._raiseInit();\n            if (this.get_stateString) {\n                if (Sys.WebForms && Sys.WebForms.PageRequestManager) {\n                    this._beginRequestHandler = Function.createDelegate(this, this._onPageRequestManagerBeginRequest);\n                    Sys.WebForms.PageRequestManager.getInstance().add_beginRequest(this._beginRequestHandler);\n                    this._endRequestHandler = Function.createDelegate(this, this._onPageRequestManagerEndRequest);\n                    Sys.WebForms.PageRequestManager.getInstance().add_endRequest(this._endRequestHandler);\n                }\n                var loadedEntry = this.get_stateString();\n                if (loadedEntry !== this._currentEntry) {\n                    this._navigate(loadedEntry);\n                }\n                else {\n                    this._ensureHistory();\n                }\n            }\n            this.raiseLoad();\n        }\n    }\n    function Sys$_Application$notifyScriptLoaded() {\n        /// <summary locid=\"M:J#Sys.Application.notifyScriptLoaded\" />\n        if (arguments.length !== 0) throw Error.parameterCount();\n    }\n    function Sys$_Application$registerDisposableObject(object) {\n        /// <summary locid=\"M:J#Sys.Application.registerDisposableObject\" />\n        /// <param name=\"object\" type=\"Sys.IDisposable\"></param>\n        var e = Function._validateParams(arguments, [\n            {name: \"object\", type: Sys.IDisposable}\n        ]);\n        if (e) throw e;\n        if (!this._disposing) {\n            var objects = this._disposableObjects,\n                i = objects.length;\n            objects[i] = object;\n            object.__msdisposeindex = i;\n        }\n    }\n    function Sys$_Application$raiseLoad() {\n        /// <summary locid=\"M:J#Sys.Application.raiseLoad\" />\n        if (arguments.length !== 0) throw Error.parameterCount();\n        var h = this.get_events().getHandler(\"load\");\n        var args = new Sys.ApplicationLoadEventArgs(Array.clone(this._createdComponents), !!this._loaded);\n        this._loaded = true;\n        if (h) {\n            h(this, args);\n        }\n        if (window.pageLoad) {\n            window.pageLoad(this, args);\n        }\n        this._createdComponents = [];\n    }\n    function Sys$_Application$removeComponent(component) {\n        /// <summary locid=\"M:J#Sys.Application.removeComponent\" />\n        /// <param name=\"component\" type=\"Sys.Component\"></param>\n        var e = Function._validateParams(arguments, [\n            {name: \"component\", type: Sys.Component}\n        ]);\n        if (e) throw e;\n        var id = component.get_id();\n        if (id) delete this._components[id];\n    }\n    function Sys$_Application$unregisterDisposableObject(object) {\n        /// <summary locid=\"M:J#Sys.Application.unregisterDisposableObject\" />\n        /// <param name=\"object\" type=\"Sys.IDisposable\"></param>\n        var e = Function._validateParams(arguments, [\n            {name: \"object\", type: Sys.IDisposable}\n        ]);\n        if (e) throw e;\n        if (!this._disposing) {\n            var i = object.__msdisposeindex;\n            if (typeof(i) === \"number\") {\n                var disposableObjects = this._disposableObjects;\n                delete disposableObjects[i];\n                delete object.__msdisposeindex;\n                if (++this._deleteCount > 1000) {\n                    var newArray = [];\n                    for (var j = 0, l = disposableObjects.length; j < l; j++) {\n                        object = disposableObjects[j];\n                        if (typeof(object) !== \"undefined\") {\n                            object.__msdisposeindex = newArray.length;\n                            newArray.push(object);\n                        }\n                    }\n                    this._disposableObjects = newArray;\n                    this._deleteCount = 0;\n                }\n            }\n        }\n    }\n    function Sys$_Application$_addComponentToSecondPass(component, references) {\n        this._secondPassComponents[this._secondPassComponents.length] = {component: component, references: references};\n    }\n    function Sys$_Application$_disposeComponents(list) {\n        if (list) {\n            for (var i = list.length - 1; i >= 0; i--) {\n                var item = list[i];\n                if (typeof(item.dispose) === \"function\") {\n                    item.dispose();\n                }\n            }\n        }\n    }\n    function Sys$_Application$_disposeElementInternal(element) {\n        var d = element.dispose;\n        if (d && typeof(d) === \"function\") {\n            element.dispose();\n        }\n        else {\n            var c = element.control;\n            if (c && typeof(c.dispose) === \"function\") {\n                c.dispose();\n            }\n        }\n        var list = element._behaviors;\n        if (list) {\n            this._disposeComponents(list);\n        }\n        list = element._components;\n        if (list) {\n            this._disposeComponents(list);\n            element._components = null;\n        }\n    }\n    function Sys$_Application$_domReady() {\n        var check, er, app = this;\n        function init() { app.initialize(); }\n        var onload = function() {\n            Sys.UI.DomEvent.removeHandler(window, \"load\", onload);\n            init();\n        }\n        Sys.UI.DomEvent.addHandler(window, \"load\", onload);\n        \n        if (document.addEventListener) {\n            try {\n                document.addEventListener(\"DOMContentLoaded\", check = function() {\n                    document.removeEventListener(\"DOMContentLoaded\", check, false);\n                    init();\n                }, false);\n            }\n            catch (er) { }\n        }\n        else if (document.attachEvent) {\n            if ((window == window.top) && document.documentElement.doScroll) {\n                var timeout, el = document.createElement(\"div\");\n                check = function() {\n                    try {\n                        el.doScroll(\"left\");\n                    }\n                    catch (er) {\n                        timeout = window.setTimeout(check, 0);\n                        return;\n                    }\n                    el = null;\n                    init();\n                }\n                check();\n            }\n            else {\n\t\tdocument.attachEvent(\"onreadystatechange\", check = function() {\n                    if (document.readyState === \"complete\") {\n                        document.detachEvent(\"onreadystatechange\", check);\n                        init();\n                    }\n                });\n            }\n        }\n    }\n    function Sys$_Application$_raiseInit() {\n        var handler = this.get_events().getHandler(\"init\");\n        if (handler) {\n            this.beginCreateComponents();\n            handler(this, Sys.EventArgs.Empty);\n            this.endCreateComponents();\n        }\n    }\n    function Sys$_Application$_unloadHandler(event) {\n        this.dispose();\n    }\nSys._Application.prototype = {\n    _creatingComponents: false,\n    _disposing: false,\n    _deleteCount: 0,\n    get_isCreatingComponents: Sys$_Application$get_isCreatingComponents,\n    get_isDisposing: Sys$_Application$get_isDisposing,\n    add_init: Sys$_Application$add_init,\n    remove_init: Sys$_Application$remove_init,\n    add_load: Sys$_Application$add_load,\n    remove_load: Sys$_Application$remove_load,\n    add_unload: Sys$_Application$add_unload,\n    remove_unload: Sys$_Application$remove_unload,\n    addComponent: Sys$_Application$addComponent,\n    beginCreateComponents: Sys$_Application$beginCreateComponents,\n    dispose: Sys$_Application$dispose,\n    disposeElement: Sys$_Application$disposeElement,\n    endCreateComponents: Sys$_Application$endCreateComponents,\n    findComponent: Sys$_Application$findComponent,\n    getComponents: Sys$_Application$getComponents,\n    initialize: Sys$_Application$initialize,\n    notifyScriptLoaded: Sys$_Application$notifyScriptLoaded,\n    registerDisposableObject: Sys$_Application$registerDisposableObject,\n    raiseLoad: Sys$_Application$raiseLoad,\n    removeComponent: Sys$_Application$removeComponent,\n    unregisterDisposableObject: Sys$_Application$unregisterDisposableObject,\n    _addComponentToSecondPass: Sys$_Application$_addComponentToSecondPass,\n    _disposeComponents: Sys$_Application$_disposeComponents,\n    _disposeElementInternal: Sys$_Application$_disposeElementInternal,\n    _domReady: Sys$_Application$_domReady,\n    _raiseInit: Sys$_Application$_raiseInit,\n    _unloadHandler: Sys$_Application$_unloadHandler\n}\nSys._Application.registerClass('Sys._Application', Sys.Component, Sys.IContainer);\nSys.Application = new Sys._Application();\nvar $find = Sys.Application.findComponent;\n \nSys.UI.Behavior = function Sys$UI$Behavior(element) {\n    /// <summary locid=\"M:J#Sys.UI.Behavior.#ctor\" />\n    /// <param name=\"element\" domElement=\"true\"></param>\n    var e = Function._validateParams(arguments, [\n        {name: \"element\", domElement: true}\n    ]);\n    if (e) throw e;\n    Sys.UI.Behavior.initializeBase(this);\n    this._element = element;\n    var behaviors = element._behaviors;\n    if (!behaviors) {\n        element._behaviors = [this];\n    }\n    else {\n        behaviors[behaviors.length] = this;\n    }\n}\n    function Sys$UI$Behavior$get_element() {\n        /// <value domElement=\"true\" locid=\"P:J#Sys.UI.Behavior.element\"></value>\n        if (arguments.length !== 0) throw Error.parameterCount();\n        return this._element;\n    }\n    function Sys$UI$Behavior$get_id() {\n        /// <value type=\"String\" locid=\"P:J#Sys.UI.Behavior.id\"></value>\n        if (arguments.length !== 0) throw Error.parameterCount();\n        var baseId = Sys.UI.Behavior.callBaseMethod(this, 'get_id');\n        if (baseId) return baseId;\n        if (!this._element || !this._element.id) return '';\n        return this._element.id + '$' + this.get_name();\n    }\n    function Sys$UI$Behavior$get_name() {\n        /// <value type=\"String\" locid=\"P:J#Sys.UI.Behavior.name\"></value>\n        if (arguments.length !== 0) throw Error.parameterCount();\n        if (this._name) return this._name;\n        var name = Object.getTypeName(this);\n        var i = name.lastIndexOf('.');\n        if (i !== -1) name = name.substr(i + 1);\n        if (!this.get_isInitialized()) this._name = name;\n        return name;\n    }\n    function Sys$UI$Behavior$set_name(value) {\n        var e = Function._validateParams(arguments, [{name: \"value\", type: String}]);\n        if (e) throw e;\n        if ((value === '') || (value.charAt(0) === ' ') || (value.charAt(value.length - 1) === ' '))\n            throw Error.argument('value', Sys.Res.invalidId);\n        if (typeof(this._element[value]) !== 'undefined')\n            throw Error.invalidOperation(String.format(Sys.Res.behaviorDuplicateName, value));\n        if (this.get_isInitialized()) throw Error.invalidOperation(Sys.Res.cantSetNameAfterInit);\n        this._name = value;\n    }\n    function Sys$UI$Behavior$initialize() {\n        Sys.UI.Behavior.callBaseMethod(this, 'initialize');\n        var name = this.get_name();\n        if (name) this._element[name] = this;\n    }\n    function Sys$UI$Behavior$dispose() {\n        Sys.UI.Behavior.callBaseMethod(this, 'dispose');\n        var e = this._element;\n        if (e) {\n            var name = this.get_name();\n            if (name) {\n                e[name] = null;\n            }\n            var behaviors = e._behaviors;\n            Array.remove(behaviors, this);\n            if (behaviors.length === 0) {\n                e._behaviors = null;\n            }\n            delete this._element;\n        }\n    }\nSys.UI.Behavior.prototype = {\n    _name: null,\n    get_element: Sys$UI$Behavior$get_element,\n    get_id: Sys$UI$Behavior$get_id,\n    get_name: Sys$UI$Behavior$get_name,\n    set_name: Sys$UI$Behavior$set_name,\n    initialize: Sys$UI$Behavior$initialize,\n    dispose: Sys$UI$Behavior$dispose\n}\nSys.UI.Behavior.registerClass('Sys.UI.Behavior', Sys.Component);\nSys.UI.Behavior.getBehaviorByName = function Sys$UI$Behavior$getBehaviorByName(element, name) {\n    /// <summary locid=\"M:J#Sys.UI.Behavior.getBehaviorByName\" />\n    /// <param name=\"element\" domElement=\"true\"></param>\n    /// <param name=\"name\" type=\"String\"></param>\n    /// <returns type=\"Sys.UI.Behavior\" mayBeNull=\"true\"></returns>\n    var e = Function._validateParams(arguments, [\n        {name: \"element\", domElement: true},\n        {name: \"name\", type: String}\n    ]);\n    if (e) throw e;\n    var b = element[name];\n    return (b && Sys.UI.Behavior.isInstanceOfType(b)) ? b : null;\n}\nSys.UI.Behavior.getBehaviors = function Sys$UI$Behavior$getBehaviors(element) {\n    /// <summary locid=\"M:J#Sys.UI.Behavior.getBehaviors\" />\n    /// <param name=\"element\" domElement=\"true\"></param>\n    /// <returns type=\"Array\" elementType=\"Sys.UI.Behavior\"></returns>\n    var e = Function._validateParams(arguments, [\n        {name: \"element\", domElement: true}\n    ]);\n    if (e) throw e;\n    if (!element._behaviors) return [];\n    return Array.clone(element._behaviors);\n}\nSys.UI.Behavior.getBehaviorsByType = function Sys$UI$Behavior$getBehaviorsByType(element, type) {\n    /// <summary locid=\"M:J#Sys.UI.Behavior.getBehaviorsByType\" />\n    /// <param name=\"element\" domElement=\"true\"></param>\n    /// <param name=\"type\" type=\"Type\"></param>\n    /// <returns type=\"Array\" elementType=\"Sys.UI.Behavior\"></returns>\n    var e = Function._validateParams(arguments, [\n        {name: \"element\", domElement: true},\n        {name: \"type\", type: Type}\n    ]);\n    if (e) throw e;\n    var behaviors = element._behaviors;\n    var results = [];\n    if (behaviors) {\n        for (var i = 0, l = behaviors.length; i < l; i++) {\n            if (type.isInstanceOfType(behaviors[i])) {\n                results[results.length] = behaviors[i];\n            }\n        }\n    }\n    return results;\n}\n \nSys.UI.VisibilityMode = function Sys$UI$VisibilityMode() {\n    /// <summary locid=\"M:J#Sys.UI.VisibilityMode.#ctor\" />\n    /// <field name=\"hide\" type=\"Number\" integer=\"true\" static=\"true\" locid=\"F:J#Sys.UI.VisibilityMode.hide\"></field>\n    /// <field name=\"collapse\" type=\"Number\" integer=\"true\" static=\"true\" locid=\"F:J#Sys.UI.VisibilityMode.collapse\"></field>\n    if (arguments.length !== 0) throw Error.parameterCount();\n    throw Error.notImplemented();\n}\nSys.UI.VisibilityMode.prototype = {\n    hide: 0,\n    collapse: 1\n}\nSys.UI.VisibilityMode.registerEnum(\"Sys.UI.VisibilityMode\");\n \nSys.UI.Control = function Sys$UI$Control(element) {\n    /// <summary locid=\"M:J#Sys.UI.Control.#ctor\" />\n    /// <param name=\"element\" domElement=\"true\"></param>\n    var e = Function._validateParams(arguments, [\n        {name: \"element\", domElement: true}\n    ]);\n    if (e) throw e;\n    if (typeof(element.control) !== 'undefined') throw Error.invalidOperation(Sys.Res.controlAlreadyDefined);\n    Sys.UI.Control.initializeBase(this);\n    this._element = element;\n    element.control = this;\n    var role = this.get_role();\n    if (role) {\n        element.setAttribute(\"role\", role);\n    }\n}\n    function Sys$UI$Control$get_element() {\n        /// <value domElement=\"true\" locid=\"P:J#Sys.UI.Control.element\"></value>\n        if (arguments.length !== 0) throw Error.parameterCount();\n        return this._element;\n    }\n    function Sys$UI$Control$get_id() {\n        /// <value type=\"String\" locid=\"P:J#Sys.UI.Control.id\"></value>\n        if (arguments.length !== 0) throw Error.parameterCount();\n        if (!this._element) return '';\n        return this._element.id;\n    }\n    function Sys$UI$Control$set_id(value) {\n        var e = Function._validateParams(arguments, [{name: \"value\", type: String}]);\n        if (e) throw e;\n        throw Error.invalidOperation(Sys.Res.cantSetId);\n    }\n    function Sys$UI$Control$get_parent() {\n        /// <value type=\"Sys.UI.Control\" locid=\"P:J#Sys.UI.Control.parent\"></value>\n        if (arguments.length !== 0) throw Error.parameterCount();\n        if (this._parent) return this._parent;\n        if (!this._element) return null;\n        \n        var parentElement = this._element.parentNode;\n        while (parentElement) {\n            if (parentElement.control) {\n                return parentElement.control;\n            }\n            parentElement = parentElement.parentNode;\n        }\n        return null;\n    }\n    function Sys$UI$Control$set_parent(value) {\n        var e = Function._validateParams(arguments, [{name: \"value\", type: Sys.UI.Control}]);\n        if (e) throw e;\n        if (!this._element) throw Error.invalidOperation(Sys.Res.cantBeCalledAfterDispose);\n        var parents = [this];\n        var current = value;\n        while (current) {\n            if (Array.contains(parents, current)) throw Error.invalidOperation(Sys.Res.circularParentChain);\n            parents[parents.length] = current;\n            current = current.get_parent();\n        }\n        this._parent = value;\n    }\n    function Sys$UI$Control$get_role() {\n        /// <value type=\"String\" locid=\"P:J#Sys.UI.Control.role\"></value>\n        if (arguments.length !== 0) throw Error.parameterCount();\n        return null;\n    }\n    function Sys$UI$Control$get_visibilityMode() {\n        /// <value type=\"Sys.UI.VisibilityMode\" locid=\"P:J#Sys.UI.Control.visibilityMode\"></value>\n        if (arguments.length !== 0) throw Error.parameterCount();\n        if (!this._element) throw Error.invalidOperation(Sys.Res.cantBeCalledAfterDispose);\n        return Sys.UI.DomElement.getVisibilityMode(this._element);\n    }\n    function Sys$UI$Control$set_visibilityMode(value) {\n        var e = Function._validateParams(arguments, [{name: \"value\", type: Sys.UI.VisibilityMode}]);\n        if (e) throw e;\n        if (!this._element) throw Error.invalidOperation(Sys.Res.cantBeCalledAfterDispose);\n        Sys.UI.DomElement.setVisibilityMode(this._element, value);\n    }\n    function Sys$UI$Control$get_visible() {\n        /// <value type=\"Boolean\" locid=\"P:J#Sys.UI.Control.visible\"></value>\n        if (arguments.length !== 0) throw Error.parameterCount();\n        if (!this._element) throw Error.invalidOperation(Sys.Res.cantBeCalledAfterDispose);\n        return Sys.UI.DomElement.getVisible(this._element);\n    }\n    function Sys$UI$Control$set_visible(value) {\n        var e = Function._validateParams(arguments, [{name: \"value\", type: Boolean}]);\n        if (e) throw e;\n        if (!this._element) throw Error.invalidOperation(Sys.Res.cantBeCalledAfterDispose);\n        Sys.UI.DomElement.setVisible(this._element, value)\n    }\n    function Sys$UI$Control$addCssClass(className) {\n        /// <summary locid=\"M:J#Sys.UI.Control.addCssClass\" />\n        /// <param name=\"className\" type=\"String\"></param>\n        var e = Function._validateParams(arguments, [\n            {name: \"className\", type: String}\n        ]);\n        if (e) throw e;\n        if (!this._element) throw Error.invalidOperation(Sys.Res.cantBeCalledAfterDispose);\n        Sys.UI.DomElement.addCssClass(this._element, className);\n    }\n    function Sys$UI$Control$dispose() {\n        Sys.UI.Control.callBaseMethod(this, 'dispose');\n        if (this._element) {\n            this._element.control = null;\n            delete this._element;\n        }\n        if (this._parent) delete this._parent;\n    }\n    function Sys$UI$Control$onBubbleEvent(source, args) {\n        /// <summary locid=\"M:J#Sys.UI.Control.onBubbleEvent\" />\n        /// <param name=\"source\"></param>\n        /// <param name=\"args\" type=\"Sys.EventArgs\"></param>\n        /// <returns type=\"Boolean\"></returns>\n        var e = Function._validateParams(arguments, [\n            {name: \"source\"},\n            {name: \"args\", type: Sys.EventArgs}\n        ]);\n        if (e) throw e;\n        return false;\n    }\n    function Sys$UI$Control$raiseBubbleEvent(source, args) {\n        /// <summary locid=\"M:J#Sys.UI.Control.raiseBubbleEvent\" />\n        /// <param name=\"source\"></param>\n        /// <param name=\"args\" type=\"Sys.EventArgs\"></param>\n        var e = Function._validateParams(arguments, [\n            {name: \"source\"},\n            {name: \"args\", type: Sys.EventArgs}\n        ]);\n        if (e) throw e;\n        this._raiseBubbleEvent(source, args);\n    }\n    function Sys$UI$Control$_raiseBubbleEvent(source, args) {\n        var currentTarget = this.get_parent();\n        while (currentTarget) {\n            if (currentTarget.onBubbleEvent(source, args)) {\n                return;\n            }\n            currentTarget = currentTarget.get_parent();\n        }\n    }\n    function Sys$UI$Control$removeCssClass(className) {\n        /// <summary locid=\"M:J#Sys.UI.Control.removeCssClass\" />\n        /// <param name=\"className\" type=\"String\"></param>\n        var e = Function._validateParams(arguments, [\n            {name: \"className\", type: String}\n        ]);\n        if (e) throw e;\n        if (!this._element) throw Error.invalidOperation(Sys.Res.cantBeCalledAfterDispose);\n        Sys.UI.DomElement.removeCssClass(this._element, className);\n    }\n    function Sys$UI$Control$toggleCssClass(className) {\n        /// <summary locid=\"M:J#Sys.UI.Control.toggleCssClass\" />\n        /// <param name=\"className\" type=\"String\"></param>\n        var e = Function._validateParams(arguments, [\n            {name: \"className\", type: String}\n        ]);\n        if (e) throw e;\n        if (!this._element) throw Error.invalidOperation(Sys.Res.cantBeCalledAfterDispose);\n        Sys.UI.DomElement.toggleCssClass(this._element, className);\n    }\nSys.UI.Control.prototype = {\n    _parent: null,\n    _visibilityMode: Sys.UI.VisibilityMode.hide,\n    get_element: Sys$UI$Control$get_element,\n    get_id: Sys$UI$Control$get_id,\n    set_id: Sys$UI$Control$set_id,\n    get_parent: Sys$UI$Control$get_parent,\n    set_parent: Sys$UI$Control$set_parent,\n    get_role: Sys$UI$Control$get_role,\n    get_visibilityMode: Sys$UI$Control$get_visibilityMode,\n    set_visibilityMode: Sys$UI$Control$set_visibilityMode,\n    get_visible: Sys$UI$Control$get_visible,\n    set_visible: Sys$UI$Control$set_visible,\n    addCssClass: Sys$UI$Control$addCssClass,\n    dispose: Sys$UI$Control$dispose,\n    onBubbleEvent: Sys$UI$Control$onBubbleEvent,\n    raiseBubbleEvent: Sys$UI$Control$raiseBubbleEvent,\n    _raiseBubbleEvent: Sys$UI$Control$_raiseBubbleEvent,\n    removeCssClass: Sys$UI$Control$removeCssClass,\n    toggleCssClass: Sys$UI$Control$toggleCssClass\n}\nSys.UI.Control.registerClass('Sys.UI.Control', Sys.Component);\nSys.HistoryEventArgs = function Sys$HistoryEventArgs(state) {\n    /// <summary locid=\"M:J#Sys.HistoryEventArgs.#ctor\" />\n    /// <param name=\"state\" type=\"Object\"></param>\n    var e = Function._validateParams(arguments, [\n        {name: \"state\", type: Object}\n    ]);\n    if (e) throw e;\n    Sys.HistoryEventArgs.initializeBase(this);\n    this._state = state;\n}\n    function Sys$HistoryEventArgs$get_state() {\n        /// <value type=\"Object\" locid=\"P:J#Sys.HistoryEventArgs.state\"></value>\n        if (arguments.length !== 0) throw Error.parameterCount();\n        return this._state;\n    }\nSys.HistoryEventArgs.prototype = {\n    get_state: Sys$HistoryEventArgs$get_state\n}\nSys.HistoryEventArgs.registerClass('Sys.HistoryEventArgs', Sys.EventArgs);\nSys.Application._appLoadHandler = null;\nSys.Application._beginRequestHandler = null;\nSys.Application._clientId = null;\nSys.Application._currentEntry = '';\nSys.Application._endRequestHandler = null;\nSys.Application._history = null;\nSys.Application._enableHistory = false;\nSys.Application._historyEnabledInScriptManager = false;\nSys.Application._historyFrame = null;\nSys.Application._historyInitialized = false;\nSys.Application._historyPointIsNew = false;\nSys.Application._ignoreTimer = false;\nSys.Application._initialState = null;\nSys.Application._state = {};\nSys.Application._timerCookie = 0;\nSys.Application._timerHandler = null;\nSys.Application._uniqueId = null;\nSys._Application.prototype.get_stateString = function Sys$_Application$get_stateString() {\n    /// <summary locid=\"M:J#Sys._Application.get_stateString\" />\n    if (arguments.length !== 0) throw Error.parameterCount();\n    var hash = null;\n    \n    if (Sys.Browser.agent === Sys.Browser.Firefox) {\n        var href = window.location.href;\n        var hashIndex = href.indexOf('#');\n        if (hashIndex !== -1) {\n            hash = href.substring(hashIndex + 1);\n        }\n        else {\n            hash = \"\";\n        }\n        return hash;\n    }\n    else {\n        hash = window.location.hash;\n    }\n    \n    if ((hash.length > 0) && (hash.charAt(0) === '#')) {\n        hash = hash.substring(1);\n    }\n    return hash;\n};\nSys._Application.prototype.get_enableHistory = function Sys$_Application$get_enableHistory() {\n    /// <summary locid=\"M:J#Sys._Application.get_enableHistory\" />\n    if (arguments.length !== 0) throw Error.parameterCount();\n    return this._enableHistory;\n};\nSys._Application.prototype.set_enableHistory = function Sys$_Application$set_enableHistory(value) {\n    if (this._initialized && !this._initializing) {\n        throw Error.invalidOperation(Sys.Res.historyCannotEnableHistory);\n    }\n    else if (this._historyEnabledInScriptManager && !value) {\n        throw Error.invalidOperation(Sys.Res.invalidHistorySettingCombination);\n    }\n    this._enableHistory = value;\n};\nSys._Application.prototype.add_navigate = function Sys$_Application$add_navigate(handler) {\n    /// <summary locid=\"E:J#Sys.Application.navigate\" />\n    /// <param name=\"handler\" type=\"Function\"></param>\n    var e = Function._validateParams(arguments, [\n        {name: \"handler\", type: Function}\n    ]);\n    if (e) throw e;\n    this.get_events().addHandler(\"navigate\", handler);\n};\nSys._Application.prototype.remove_navigate = function Sys$_Application$remove_navigate(handler) {\n    /// <summary locid=\"M:J#Sys._Application.remove_navigate\" />\n    /// <param name=\"handler\" type=\"Function\"></param>\n    var e = Function._validateParams(arguments, [\n        {name: \"handler\", type: Function}\n    ]);\n    if (e) throw e;\n    this.get_events().removeHandler(\"navigate\", handler);\n};\nSys._Application.prototype.addHistoryPoint = function Sys$_Application$addHistoryPoint(state, title) {\n    /// <summary locid=\"M:J#Sys.Application.addHistoryPoint\" />\n    /// <param name=\"state\" type=\"Object\"></param>\n    /// <param name=\"title\" type=\"String\" optional=\"true\" mayBeNull=\"true\"></param>\n    var e = Function._validateParams(arguments, [\n        {name: \"state\", type: Object},\n        {name: \"title\", type: String, mayBeNull: true, optional: true}\n    ]);\n    if (e) throw e;\n    if (!this._enableHistory) throw Error.invalidOperation(Sys.Res.historyCannotAddHistoryPointWithHistoryDisabled);\n    for (var n in state) {\n        var v = state[n];\n        var t = typeof(v);\n        if ((v !== null) && ((t === 'object') || (t === 'function') || (t === 'undefined'))) {\n            throw Error.argument('state', Sys.Res.stateMustBeStringDictionary);\n        }\n    }\n    this._ensureHistory();\n    var initialState = this._state;\n    for (var key in state) {\n        var value = state[key];\n        if (value === null) {\n            if (typeof(initialState[key]) !== 'undefined') {\n                delete initialState[key];\n            }\n        }\n        else {\n            initialState[key] = value;\n        }\n    }\n    var entry = this._serializeState(initialState);\n    this._historyPointIsNew = true;\n    this._setState(entry, title);\n    this._raiseNavigate();\n};\nSys._Application.prototype.setServerId = function Sys$_Application$setServerId(clientId, uniqueId) {\n    /// <summary locid=\"M:J#Sys.Application.setServerId\" />\n    /// <param name=\"clientId\" type=\"String\"></param>\n    /// <param name=\"uniqueId\" type=\"String\"></param>\n    var e = Function._validateParams(arguments, [\n        {name: \"clientId\", type: String},\n        {name: \"uniqueId\", type: String}\n    ]);\n    if (e) throw e;\n    this._clientId = clientId;\n    this._uniqueId = uniqueId;\n};\nSys._Application.prototype.setServerState = function Sys$_Application$setServerState(value) {\n    /// <summary locid=\"M:J#Sys.Application.setServerState\" />\n    /// <param name=\"value\" type=\"String\"></param>\n    var e = Function._validateParams(arguments, [\n        {name: \"value\", type: String}\n    ]);\n    if (e) throw e;\n    this._ensureHistory();\n    this._state.__s = value;\n    this._updateHiddenField(value);\n};\nSys._Application.prototype._deserializeState = function Sys$_Application$_deserializeState(entry) {\n    var result = {};\n    entry = entry || '';\n    var serverSeparator = entry.indexOf('&&');\n    if ((serverSeparator !== -1) && (serverSeparator + 2 < entry.length)) {\n        result.__s = entry.substr(serverSeparator + 2);\n        entry = entry.substr(0, serverSeparator);\n    }\n    var tokens = entry.split('&');\n    for (var i = 0, l = tokens.length; i < l; i++) {\n        var token = tokens[i];\n        var equal = token.indexOf('=');\n        if ((equal !== -1) && (equal + 1 < token.length)) {\n            var name = token.substr(0, equal);\n            var value = token.substr(equal + 1);\n            result[name] = decodeURIComponent(value);\n        }\n    }\n    return result;\n};\nSys._Application.prototype._enableHistoryInScriptManager = function Sys$_Application$_enableHistoryInScriptManager() {\n    this._enableHistory = true;\n    this._historyEnabledInScriptManager = true;\n};\nSys._Application.prototype._ensureHistory = function Sys$_Application$_ensureHistory() {\n    if (!this._historyInitialized && this._enableHistory) {\n        if ((Sys.Browser.agent === Sys.Browser.InternetExplorer) && (Sys.Browser.documentMode < 8)) {\n            this._historyFrame = document.getElementById('__historyFrame');\n            if (!this._historyFrame) throw Error.invalidOperation(Sys.Res.historyMissingFrame);\n            this._ignoreIFrame = true;\n        }\n        this._timerHandler = Function.createDelegate(this, this._onIdle);\n        this._timerCookie = window.setTimeout(this._timerHandler, 100);\n        \n        try {\n            this._initialState = this._deserializeState(this.get_stateString());\n        } catch(e) {}\n        \n        this._historyInitialized = true;\n    }\n};\nSys._Application.prototype._navigate = function Sys$_Application$_navigate(entry) {\n    this._ensureHistory();\n    var state = this._deserializeState(entry);\n    \n    if (this._uniqueId) {\n        var oldServerEntry = this._state.__s || '';\n        var newServerEntry = state.__s || '';\n        if (newServerEntry !== oldServerEntry) {\n            this._updateHiddenField(newServerEntry);\n            __doPostBack(this._uniqueId, newServerEntry);\n            this._state = state;\n            return;\n        }\n    }\n    this._setState(entry);\n    this._state = state;\n    this._raiseNavigate();\n};\nSys._Application.prototype._onIdle = function Sys$_Application$_onIdle() {\n    delete this._timerCookie;\n    \n    var entry = this.get_stateString();\n    if (entry !== this._currentEntry) {\n        if (!this._ignoreTimer) {\n            this._historyPointIsNew = false;\n            this._navigate(entry);\n        }\n    }\n    else {\n        this._ignoreTimer = false;\n    }\n    this._timerCookie = window.setTimeout(this._timerHandler, 100);\n};\nSys._Application.prototype._onIFrameLoad = function Sys$_Application$_onIFrameLoad(entry) {\n    this._ensureHistory();\n    if (!this._ignoreIFrame) {\n        this._historyPointIsNew = false;\n        this._navigate(entry);\n    }\n    this._ignoreIFrame = false;\n};\nSys._Application.prototype._onPageRequestManagerBeginRequest = function Sys$_Application$_onPageRequestManagerBeginRequest(sender, args) {\n    this._ignoreTimer = true;\n};\nSys._Application.prototype._onPageRequestManagerEndRequest = function Sys$_Application$_onPageRequestManagerEndRequest(sender, args) {\n    var dataItem = args.get_dataItems()[this._clientId];\n    var eventTarget = document.getElementById(\"__EVENTTARGET\");\n    if (eventTarget && eventTarget.value === this._uniqueId) {\n        eventTarget.value = '';\n    }\n    if (typeof(dataItem) !== 'undefined') {\n        this.setServerState(dataItem);\n        this._historyPointIsNew = true;\n    }\n    else {\n        this._ignoreTimer = false;\n    }\n    var entry = this._serializeState(this._state);\n    if (entry !== this._currentEntry) {\n        this._ignoreTimer = true;\n        this._setState(entry);\n        this._raiseNavigate();\n    }\n};\nSys._Application.prototype._raiseNavigate = function Sys$_Application$_raiseNavigate() {\n    var h = this.get_events().getHandler(\"navigate\");\n    var stateClone = {};\n    for (var key in this._state) {\n        if (key !== '__s') {\n            stateClone[key] = this._state[key];\n        }\n    }\n    var args = new Sys.HistoryEventArgs(stateClone);\n    if (h) {\n        h(this, args);\n    }\n    var err;\n    try {\n        if ((Sys.Browser.agent === Sys.Browser.Firefox) && window.location.hash &&\n            (!window.frameElement || window.top.location.hash)) {\n            window.history.go(0);\n        }\n    }\n    catch(err) {\n    }\n};\nSys._Application.prototype._serializeState = function Sys$_Application$_serializeState(state) {\n    var serialized = [];\n    for (var key in state) {\n        var value = state[key];\n        if (key === '__s') {\n            var serverState = value;\n        }\n        else {\n            if (key.indexOf('=') !== -1) throw Error.argument('state', Sys.Res.stateFieldNameInvalid);\n            serialized[serialized.length] = key + '=' + encodeURIComponent(value);\n        }\n    }\n    return serialized.join('&') + (serverState ? '&&' + serverState : '');\n};\nSys._Application.prototype._setState = function Sys$_Application$_setState(entry, title) {\n    if (this._enableHistory) {\n        entry = entry || '';\n        if (entry !== this._currentEntry) {\n            if (window.theForm) {\n                var action = window.theForm.action;\n                var hashIndex = action.indexOf('#');\n                window.theForm.action = ((hashIndex !== -1) ? action.substring(0, hashIndex) : action) + '#' + entry;\n            }\n        \n            if (this._historyFrame && this._historyPointIsNew) {\n                this._ignoreIFrame = true;\n                var frameDoc = this._historyFrame.contentWindow.document;\n                frameDoc.open(\"javascript:'<html></html>'\");\n                frameDoc.write(\"<html><head><title>\" + (title || document.title) +\n                    \"</title><scri\" + \"pt type=\\\"text/javascript\\\">parent.Sys.Application._onIFrameLoad(\" + \n                    Sys.Serialization.JavaScriptSerializer.serialize(entry) +\n                    \");</scri\" + \"pt></head><body></body></html>\");\n                frameDoc.close();\n            }\n            this._ignoreTimer = false;\n            this._currentEntry = entry;\n            if (this._historyFrame || this._historyPointIsNew) {\n                var currentHash = this.get_stateString();\n                if (entry !== currentHash) {\n                    var loc = document.location;\n                    if (loc.href.length - loc.hash.length + entry.length > 1024) {\n                        throw Error.invalidOperation(Sys.Res.urlMustBeLessThan1024chars);\n                    }\n                    window.location.hash = entry;\n                    this._currentEntry = this.get_stateString();\n                    if ((typeof(title) !== 'undefined') && (title !== null)) {\n                        document.title = title;\n                    }\n                }\n            }\n            this._historyPointIsNew = false;\n        }\n    }\n};\nSys._Application.prototype._updateHiddenField = function Sys$_Application$_updateHiddenField(value) {\n    if (this._clientId) {\n        var serverStateField = document.getElementById(this._clientId);\n        if (serverStateField) {\n            serverStateField.value = value;\n        }\n    }\n};\n \nif (!window.XMLHttpRequest) {\n    window.XMLHttpRequest = function window$XMLHttpRequest() {\n        var progIDs = [ 'Msxml2.XMLHTTP.3.0', 'Msxml2.XMLHTTP' ];\n        for (var i = 0, l = progIDs.length; i < l; i++) {\n            try {\n                return new ActiveXObject(progIDs[i]);\n            }\n            catch (ex) {\n            }\n        }\n        return null;\n    }\n}\nType.registerNamespace('Sys.Net');\n \nSys.Net.WebRequestExecutor = function Sys$Net$WebRequestExecutor() {\n    /// <summary locid=\"M:J#Sys.Net.WebRequestExecutor.#ctor\" />\n    if (arguments.length !== 0) throw Error.parameterCount();\n    this._webRequest = null;\n    this._resultObject = null;\n}\n    function Sys$Net$WebRequestExecutor$get_webRequest() {\n        /// <value type=\"Sys.Net.WebRequest\" locid=\"P:J#Sys.Net.WebRequestExecutor.webRequest\"></value>\n        if (arguments.length !== 0) throw Error.parameterCount();\n        return this._webRequest;\n    }\n    function Sys$Net$WebRequestExecutor$_set_webRequest(value) {\n        if (this.get_started()) {\n            throw Error.invalidOperation(String.format(Sys.Res.cannotCallOnceStarted, 'set_webRequest'));\n        }\n        this._webRequest = value;\n    }\n    function Sys$Net$WebRequestExecutor$get_started() {\n        /// <value type=\"Boolean\" locid=\"P:J#Sys.Net.WebRequestExecutor.started\"></value>\n        if (arguments.length !== 0) throw Error.parameterCount();\n        throw Error.notImplemented();\n    }\n    function Sys$Net$WebRequestExecutor$get_responseAvailable() {\n        /// <value type=\"Boolean\" locid=\"P:J#Sys.Net.WebRequestExecutor.responseAvailable\"></value>\n        if (arguments.length !== 0) throw Error.parameterCount();\n        throw Error.notImplemented();\n    }\n    function Sys$Net$WebRequestExecutor$get_timedOut() {\n        /// <value type=\"Boolean\" locid=\"P:J#Sys.Net.WebRequestExecutor.timedOut\"></value>\n        if (arguments.length !== 0) throw Error.parameterCount();\n        throw Error.notImplemented();\n    }\n    function Sys$Net$WebRequestExecutor$get_aborted() {\n        /// <value type=\"Boolean\" locid=\"P:J#Sys.Net.WebRequestExecutor.aborted\"></value>\n        if (arguments.length !== 0) throw Error.parameterCount();\n        throw Error.notImplemented();\n    }\n    function Sys$Net$WebRequestExecutor$get_responseData() {\n        /// <value type=\"String\" locid=\"P:J#Sys.Net.WebRequestExecutor.responseData\"></value>\n        if (arguments.length !== 0) throw Error.parameterCount();\n        throw Error.notImplemented();\n    }\n    function Sys$Net$WebRequestExecutor$get_statusCode() {\n        /// <value type=\"Number\" locid=\"P:J#Sys.Net.WebRequestExecutor.statusCode\"></value>\n        if (arguments.length !== 0) throw Error.parameterCount();\n        throw Error.notImplemented();\n    }\n    function Sys$Net$WebRequestExecutor$get_statusText() {\n        /// <value type=\"String\" locid=\"P:J#Sys.Net.WebRequestExecutor.statusText\"></value>\n        if (arguments.length !== 0) throw Error.parameterCount();\n        throw Error.notImplemented();\n    }\n    function Sys$Net$WebRequestExecutor$get_xml() {\n        /// <value locid=\"P:J#Sys.Net.WebRequestExecutor.xml\"></value>\n        if (arguments.length !== 0) throw Error.parameterCount();\n        throw Error.notImplemented();\n    }\n    function Sys$Net$WebRequestExecutor$get_object() {\n        /// <value locid=\"P:J#Sys.Net.WebRequestExecutor.object\"></value>\n        if (arguments.length !== 0) throw Error.parameterCount();\n        if (!this._resultObject) {\n            this._resultObject = Sys.Serialization.JavaScriptSerializer.deserialize(this.get_responseData());\n        }\n        return this._resultObject;\n    }\n    function Sys$Net$WebRequestExecutor$executeRequest() {\n        /// <summary locid=\"M:J#Sys.Net.WebRequestExecutor.executeRequest\" />\n        if (arguments.length !== 0) throw Error.parameterCount();\n        throw Error.notImplemented();\n    }\n    function Sys$Net$WebRequestExecutor$abort() {\n        /// <summary locid=\"M:J#Sys.Net.WebRequestExecutor.abort\" />\n        if (arguments.length !== 0) throw Error.parameterCount();\n        throw Error.notImplemented();\n    }\n    function Sys$Net$WebRequestExecutor$getResponseHeader(header) {\n        /// <summary locid=\"M:J#Sys.Net.WebRequestExecutor.getResponseHeader\" />\n        /// <param name=\"header\" type=\"String\"></param>\n        var e = Function._validateParams(arguments, [\n            {name: \"header\", type: String}\n        ]);\n        if (e) throw e;\n        throw Error.notImplemented();\n    }\n    function Sys$Net$WebRequestExecutor$getAllResponseHeaders() {\n        /// <summary locid=\"M:J#Sys.Net.WebRequestExecutor.getAllResponseHeaders\" />\n        if (arguments.length !== 0) throw Error.parameterCount();\n        throw Error.notImplemented();\n    }\nSys.Net.WebRequestExecutor.prototype = {\n    get_webRequest: Sys$Net$WebRequestExecutor$get_webRequest,\n    _set_webRequest: Sys$Net$WebRequestExecutor$_set_webRequest,\n    get_started: Sys$Net$WebRequestExecutor$get_started,\n    get_responseAvailable: Sys$Net$WebRequestExecutor$get_responseAvailable,\n    get_timedOut: Sys$Net$WebRequestExecutor$get_timedOut,\n    get_aborted: Sys$Net$WebRequestExecutor$get_aborted,\n    get_responseData: Sys$Net$WebRequestExecutor$get_responseData,\n    get_statusCode: Sys$Net$WebRequestExecutor$get_statusCode,\n    get_statusText: Sys$Net$WebRequestExecutor$get_statusText,\n    get_xml: Sys$Net$WebRequestExecutor$get_xml,\n    get_object: Sys$Net$WebRequestExecutor$get_object,\n    executeRequest: Sys$Net$WebRequestExecutor$executeRequest,\n    abort: Sys$Net$WebRequestExecutor$abort,\n    getResponseHeader: Sys$Net$WebRequestExecutor$getResponseHeader,\n    getAllResponseHeaders: Sys$Net$WebRequestExecutor$getAllResponseHeaders\n}\nSys.Net.WebRequestExecutor.registerClass('Sys.Net.WebRequestExecutor');\n \nSys.Net.XMLDOM = function Sys$Net$XMLDOM(markup) {\n    /// <summary locid=\"M:J#Sys.Net.XMLDOM.#ctor\" />\n    /// <param name=\"markup\" type=\"String\"></param>\n    var e = Function._validateParams(arguments, [\n        {name: \"markup\", type: String}\n    ]);\n    if (e) throw e;\n    if (!window.DOMParser) {\n        var progIDs = [ 'Msxml2.DOMDocument.3.0', 'Msxml2.DOMDocument' ];\n        for (var i = 0, l = progIDs.length; i < l; i++) {\n            try {\n                var xmlDOM = new ActiveXObject(progIDs[i]);\n                xmlDOM.async = false;\n                xmlDOM.loadXML(markup);\n                xmlDOM.setProperty('SelectionLanguage', 'XPath');\n                return xmlDOM;\n            }\n            catch (ex) {\n            }\n        }\n    }\n    else {\n        try {\n            var domParser = new window.DOMParser();\n            return domParser.parseFromString(markup, 'text/xml');\n        }\n        catch (ex) {\n        }\n    }\n    return null;\n}\nSys.Net.XMLHttpExecutor = function Sys$Net$XMLHttpExecutor() {\n    /// <summary locid=\"M:J#Sys.Net.XMLHttpExecutor.#ctor\" />\n    if (arguments.length !== 0) throw Error.parameterCount();\n    Sys.Net.XMLHttpExecutor.initializeBase(this);\n    var _this = this;\n    this._xmlHttpRequest = null;\n    this._webRequest = null;\n    this._responseAvailable = false;\n    this._timedOut = false;\n    this._timer = null;\n    this._aborted = false;\n    this._started = false;\n    this._onReadyStateChange = (function () {\n        \n        if (_this._xmlHttpRequest.readyState === 4 ) {\n            try {\n                if (typeof(_this._xmlHttpRequest.status) === \"undefined\") {\n                    return;\n                }\n            }\n            catch(ex) {\n                return;\n            }\n            \n            _this._clearTimer();\n            _this._responseAvailable = true;\n                _this._webRequest.completed(Sys.EventArgs.Empty);\n                if (_this._xmlHttpRequest != null) {\n                    _this._xmlHttpRequest.onreadystatechange = Function.emptyMethod;\n                    _this._xmlHttpRequest = null;\n                }\n        }\n    });\n    this._clearTimer = (function() {\n        if (_this._timer != null) {\n            window.clearTimeout(_this._timer);\n            _this._timer = null;\n        }\n    });\n    this._onTimeout = (function() {\n        if (!_this._responseAvailable) {\n            _this._clearTimer();\n            _this._timedOut = true;\n            _this._xmlHttpRequest.onreadystatechange = Function.emptyMethod;\n            _this._xmlHttpRequest.abort();\n            _this._webRequest.completed(Sys.EventArgs.Empty);\n            _this._xmlHttpRequest = null;\n        }\n    });\n}\n    function Sys$Net$XMLHttpExecutor$get_timedOut() {\n        /// <value type=\"Boolean\" locid=\"P:J#Sys.Net.XMLHttpExecutor.timedOut\"></value>\n        if (arguments.length !== 0) throw Error.parameterCount();\n        return this._timedOut;\n    }\n    function Sys$Net$XMLHttpExecutor$get_started() {\n        /// <value type=\"Boolean\" locid=\"P:J#Sys.Net.XMLHttpExecutor.started\"></value>\n        if (arguments.length !== 0) throw Error.parameterCount();\n        return this._started;\n    }\n    function Sys$Net$XMLHttpExecutor$get_responseAvailable() {\n        /// <value type=\"Boolean\" locid=\"P:J#Sys.Net.XMLHttpExecutor.responseAvailable\"></value>\n        if (arguments.length !== 0) throw Error.parameterCount();\n        return this._responseAvailable;\n    }\n    function Sys$Net$XMLHttpExecutor$get_aborted() {\n        /// <value type=\"Boolean\" locid=\"P:J#Sys.Net.XMLHttpExecutor.aborted\"></value>\n        if (arguments.length !== 0) throw Error.parameterCount();\n        return this._aborted;\n    }\n    function Sys$Net$XMLHttpExecutor$executeRequest() {\n        /// <summary locid=\"M:J#Sys.Net.XMLHttpExecutor.executeRequest\" />\n        if (arguments.length !== 0) throw Error.parameterCount();\n        this._webRequest = this.get_webRequest();\n        if (this._started) {\n            throw Error.invalidOperation(String.format(Sys.Res.cannotCallOnceStarted, 'executeRequest'));\n        }\n        if (this._webRequest === null) {\n            throw Error.invalidOperation(Sys.Res.nullWebRequest);\n        }\n        var body = this._webRequest.get_body();\n        var headers = this._webRequest.get_headers();\n        this._xmlHttpRequest = new XMLHttpRequest();\n        this._xmlHttpRequest.onreadystatechange = this._onReadyStateChange;\n        var verb = this._webRequest.get_httpVerb();\n        this._xmlHttpRequest.open(verb, this._webRequest.getResolvedUrl(), true );\n        this._xmlHttpRequest.setRequestHeader(\"X-Requested-With\", \"XMLHttpRequest\");\n        if (headers) {\n            for (var header in headers) {\n                var val = headers[header];\n                if (typeof(val) !== \"function\")\n                    this._xmlHttpRequest.setRequestHeader(header, val);\n            }\n        }\n        if (verb.toLowerCase() === \"post\") {\n            if ((headers === null) || !headers['Content-Type']) {\n                this._xmlHttpRequest.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=utf-8');\n            }\n            if (!body) {\n                body = \"\";\n            }\n        }\n        var timeout = this._webRequest.get_timeout();\n        if (timeout > 0) {\n            this._timer = window.setTimeout(Function.createDelegate(this, this._onTimeout), timeout);\n        }\n        this._xmlHttpRequest.send(body);\n        this._started = true;\n    }\n    function Sys$Net$XMLHttpExecutor$getResponseHeader(header) {\n        /// <summary locid=\"M:J#Sys.Net.XMLHttpExecutor.getResponseHeader\" />\n        /// <param name=\"header\" type=\"String\"></param>\n        /// <returns type=\"String\"></returns>\n        var e = Function._validateParams(arguments, [\n            {name: \"header\", type: String}\n        ]);\n        if (e) throw e;\n        if (!this._responseAvailable) {\n            throw Error.invalidOperation(String.format(Sys.Res.cannotCallBeforeResponse, 'getResponseHeader'));\n        }\n        if (!this._xmlHttpRequest) {\n            throw Error.invalidOperation(String.format(Sys.Res.cannotCallOutsideHandler, 'getResponseHeader'));\n        }\n        var result;\n        try {\n            result = this._xmlHttpRequest.getResponseHeader(header);\n        } catch (e) {\n        }\n        if (!result) result = \"\";\n        return result;\n    }\n    function Sys$Net$XMLHttpExecutor$getAllResponseHeaders() {\n        /// <summary locid=\"M:J#Sys.Net.XMLHttpExecutor.getAllResponseHeaders\" />\n        /// <returns type=\"String\"></returns>\n        if (arguments.length !== 0) throw Error.parameterCount();\n        if (!this._responseAvailable) {\n            throw Error.invalidOperation(String.format(Sys.Res.cannotCallBeforeResponse, 'getAllResponseHeaders'));\n        }\n        if (!this._xmlHttpRequest) {\n            throw Error.invalidOperation(String.format(Sys.Res.cannotCallOutsideHandler, 'getAllResponseHeaders'));\n        }\n        return this._xmlHttpRequest.getAllResponseHeaders();\n    }\n    function Sys$Net$XMLHttpExecutor$get_responseData() {\n        /// <value type=\"String\" locid=\"P:J#Sys.Net.XMLHttpExecutor.responseData\"></value>\n        if (arguments.length !== 0) throw Error.parameterCount();\n        if (!this._responseAvailable) {\n            throw Error.invalidOperation(String.format(Sys.Res.cannotCallBeforeResponse, 'get_responseData'));\n        }\n        if (!this._xmlHttpRequest) {\n            throw Error.invalidOperation(String.format(Sys.Res.cannotCallOutsideHandler, 'get_responseData'));\n        }\n        return this._xmlHttpRequest.responseText;\n    }\n    function Sys$Net$XMLHttpExecutor$get_statusCode() {\n        /// <value type=\"Number\" locid=\"P:J#Sys.Net.XMLHttpExecutor.statusCode\"></value>\n        if (arguments.length !== 0) throw Error.parameterCount();\n        if (!this._responseAvailable) {\n            throw Error.invalidOperation(String.format(Sys.Res.cannotCallBeforeResponse, 'get_statusCode'));\n        }\n        if (!this._xmlHttpRequest) {\n            throw Error.invalidOperation(String.format(Sys.Res.cannotCallOutsideHandler, 'get_statusCode'));\n        }\n        var result = 0;\n        try {\n            result = this._xmlHttpRequest.status;\n        }\n        catch(ex) {\n        }\n        return result;\n    }\n    function Sys$Net$XMLHttpExecutor$get_statusText() {\n        /// <value type=\"String\" locid=\"P:J#Sys.Net.XMLHttpExecutor.statusText\"></value>\n        if (arguments.length !== 0) throw Error.parameterCount();\n        if (!this._responseAvailable) {\n            throw Error.invalidOperation(String.format(Sys.Res.cannotCallBeforeResponse, 'get_statusText'));\n        }\n        if (!this._xmlHttpRequest) {\n            throw Error.invalidOperation(String.format(Sys.Res.cannotCallOutsideHandler, 'get_statusText'));\n        }\n        return this._xmlHttpRequest.statusText;\n    }\n    function Sys$Net$XMLHttpExecutor$get_xml() {\n        /// <value locid=\"P:J#Sys.Net.XMLHttpExecutor.xml\"></value>\n        if (arguments.length !== 0) throw Error.parameterCount();\n        if (!this._responseAvailable) {\n            throw Error.invalidOperation(String.format(Sys.Res.cannotCallBeforeResponse, 'get_xml'));\n        }\n        if (!this._xmlHttpRequest) {\n            throw Error.invalidOperation(String.format(Sys.Res.cannotCallOutsideHandler, 'get_xml'));\n        }\n        var xml = this._xmlHttpRequest.responseXML;\n        if (!xml || !xml.documentElement) {\n            xml = Sys.Net.XMLDOM(this._xmlHttpRequest.responseText);\n            if (!xml || !xml.documentElement)\n                return null;\n        }\n        else if (navigator.userAgent.indexOf('MSIE') !== -1) {\n            xml.setProperty('SelectionLanguage', 'XPath');\n        }\n        if (xml.documentElement.namespaceURI === \"http://www.mozilla.org/newlayout/xml/parsererror.xml\" &&\n            xml.documentElement.tagName === \"parsererror\") {\n            return null;\n        }\n        \n        if (xml.documentElement.firstChild && xml.documentElement.firstChild.tagName === \"parsererror\") {\n            return null;\n        }\n        \n        return xml;\n    }\n    function Sys$Net$XMLHttpExecutor$abort() {\n        /// <summary locid=\"M:J#Sys.Net.XMLHttpExecutor.abort\" />\n        if (arguments.length !== 0) throw Error.parameterCount();\n        if (!this._started) {\n            throw Error.invalidOperation(Sys.Res.cannotAbortBeforeStart);\n        }\n        if (this._aborted || this._responseAvailable || this._timedOut)\n            return;\n        this._aborted = true;\n        this._clearTimer();\n        if (this._xmlHttpRequest && !this._responseAvailable) {\n            this._xmlHttpRequest.onreadystatechange = Function.emptyMethod;\n            this._xmlHttpRequest.abort();\n            \n            this._xmlHttpRequest = null;            \n            this._webRequest.completed(Sys.EventArgs.Empty);\n        }\n    }\nSys.Net.XMLHttpExecutor.prototype = {\n    get_timedOut: Sys$Net$XMLHttpExecutor$get_timedOut,\n    get_started: Sys$Net$XMLHttpExecutor$get_started,\n    get_responseAvailable: Sys$Net$XMLHttpExecutor$get_responseAvailable,\n    get_aborted: Sys$Net$XMLHttpExecutor$get_aborted,\n    executeRequest: Sys$Net$XMLHttpExecutor$executeRequest,\n    getResponseHeader: Sys$Net$XMLHttpExecutor$getResponseHeader,\n    getAllResponseHeaders: Sys$Net$XMLHttpExecutor$getAllResponseHeaders,\n    get_responseData: Sys$Net$XMLHttpExecutor$get_responseData,\n    get_statusCode: Sys$Net$XMLHttpExecutor$get_statusCode,\n    get_statusText: Sys$Net$XMLHttpExecutor$get_statusText,\n    get_xml: Sys$Net$XMLHttpExecutor$get_xml,\n    abort: Sys$Net$XMLHttpExecutor$abort\n}\nSys.Net.XMLHttpExecutor.registerClass('Sys.Net.XMLHttpExecutor', Sys.Net.WebRequestExecutor);\n \nSys.Net._WebRequestManager = function Sys$Net$_WebRequestManager() {\n    /// <summary locid=\"P:J#Sys.Net.WebRequestManager.#ctor\" />\n    if (arguments.length !== 0) throw Error.parameterCount();\n    this._defaultTimeout = 0;\n    this._defaultExecutorType = \"Sys.Net.XMLHttpExecutor\";\n}\n    function Sys$Net$_WebRequestManager$add_invokingRequest(handler) {\n        /// <summary locid=\"E:J#Sys.Net.WebRequestManager.invokingRequest\" />\n        var e = Function._validateParams(arguments, [{name: \"handler\", type: Function}]);\n        if (e) throw e;\n        this._get_eventHandlerList().addHandler(\"invokingRequest\", handler);\n    }\n    function Sys$Net$_WebRequestManager$remove_invokingRequest(handler) {\n        var e = Function._validateParams(arguments, [{name: \"handler\", type: Function}]);\n        if (e) throw e;\n        this._get_eventHandlerList().removeHandler(\"invokingRequest\", handler);\n    }\n    function Sys$Net$_WebRequestManager$add_completedRequest(handler) {\n        /// <summary locid=\"E:J#Sys.Net.WebRequestManager.completedRequest\" />\n        var e = Function._validateParams(arguments, [{name: \"handler\", type: Function}]);\n        if (e) throw e;\n        this._get_eventHandlerList().addHandler(\"completedRequest\", handler);\n    }\n    function Sys$Net$_WebRequestManager$remove_completedRequest(handler) {\n        var e = Function._validateParams(arguments, [{name: \"handler\", type: Function}]);\n        if (e) throw e;\n        this._get_eventHandlerList().removeHandler(\"completedRequest\", handler);\n    }\n    function Sys$Net$_WebRequestManager$_get_eventHandlerList() {\n        if (!this._events) {\n            this._events = new Sys.EventHandlerList();\n        }\n        return this._events;\n    }\n    function Sys$Net$_WebRequestManager$get_defaultTimeout() {\n        /// <value type=\"Number\" locid=\"P:J#Sys.Net.WebRequestManager.defaultTimeout\"></value>\n        if (arguments.length !== 0) throw Error.parameterCount();\n        return this._defaultTimeout;\n    }\n    function Sys$Net$_WebRequestManager$set_defaultTimeout(value) {\n        var e = Function._validateParams(arguments, [{name: \"value\", type: Number}]);\n        if (e) throw e;\n        if (value < 0) {\n            throw Error.argumentOutOfRange(\"value\", value, Sys.Res.invalidTimeout);\n        }\n        this._defaultTimeout = value;\n    }\n    function Sys$Net$_WebRequestManager$get_defaultExecutorType() {\n        /// <value type=\"String\" locid=\"P:J#Sys.Net.WebRequestManager.defaultExecutorType\"></value>\n        if (arguments.length !== 0) throw Error.parameterCount();\n        return this._defaultExecutorType;\n    }\n    function Sys$Net$_WebRequestManager$set_defaultExecutorType(value) {\n        var e = Function._validateParams(arguments, [{name: \"value\", type: String}]);\n        if (e) throw e;\n        this._defaultExecutorType = value;\n    }\n    function Sys$Net$_WebRequestManager$executeRequest(webRequest) {\n        /// <summary locid=\"M:J#Sys.Net.WebRequestManager.executeRequest\" />\n        /// <param name=\"webRequest\" type=\"Sys.Net.WebRequest\"></param>\n        var e = Function._validateParams(arguments, [\n            {name: \"webRequest\", type: Sys.Net.WebRequest}\n        ]);\n        if (e) throw e;\n        var executor = webRequest.get_executor();\n        if (!executor) {\n            var failed = false;\n            try {\n                var executorType = eval(this._defaultExecutorType);\n                executor = new executorType();\n            } catch (e) {\n                failed = true;\n            }\n            if (failed  || !Sys.Net.WebRequestExecutor.isInstanceOfType(executor) || !executor) {\n                throw Error.argument(\"defaultExecutorType\", String.format(Sys.Res.invalidExecutorType, this._defaultExecutorType));\n            }\n            webRequest.set_executor(executor);\n        }\n        if (executor.get_aborted()) {\n            return;\n        }\n        var evArgs = new Sys.Net.NetworkRequestEventArgs(webRequest);\n        var handler = this._get_eventHandlerList().getHandler(\"invokingRequest\");\n        if (handler) {\n            handler(this, evArgs);\n        }\n        if (!evArgs.get_cancel()) {\n            executor.executeRequest();\n        }\n    }\nSys.Net._WebRequestManager.prototype = {\n    add_invokingRequest: Sys$Net$_WebRequestManager$add_invokingRequest,\n    remove_invokingRequest: Sys$Net$_WebRequestManager$remove_invokingRequest,\n    add_completedRequest: Sys$Net$_WebRequestManager$add_completedRequest,\n    remove_completedRequest: Sys$Net$_WebRequestManager$remove_completedRequest,\n    _get_eventHandlerList: Sys$Net$_WebRequestManager$_get_eventHandlerList,\n    get_defaultTimeout: Sys$Net$_WebRequestManager$get_defaultTimeout,\n    set_defaultTimeout: Sys$Net$_WebRequestManager$set_defaultTimeout,\n    get_defaultExecutorType: Sys$Net$_WebRequestManager$get_defaultExecutorType,\n    set_defaultExecutorType: Sys$Net$_WebRequestManager$set_defaultExecutorType,\n    executeRequest: Sys$Net$_WebRequestManager$executeRequest\n}\nSys.Net._WebRequestManager.registerClass('Sys.Net._WebRequestManager');\nSys.Net.WebRequestManager = new Sys.Net._WebRequestManager();\n \nSys.Net.NetworkRequestEventArgs = function Sys$Net$NetworkRequestEventArgs(webRequest) {\n    /// <summary locid=\"M:J#Sys.Net.NetworkRequestEventArgs.#ctor\" />\n    /// <param name=\"webRequest\" type=\"Sys.Net.WebRequest\"></param>\n    var e = Function._validateParams(arguments, [\n        {name: \"webRequest\", type: Sys.Net.WebRequest}\n    ]);\n    if (e) throw e;\n    Sys.Net.NetworkRequestEventArgs.initializeBase(this);\n    this._webRequest = webRequest;\n}\n    function Sys$Net$NetworkRequestEventArgs$get_webRequest() {\n        /// <value type=\"Sys.Net.WebRequest\" locid=\"P:J#Sys.Net.NetworkRequestEventArgs.webRequest\"></value>\n        if (arguments.length !== 0) throw Error.parameterCount();\n        return this._webRequest;\n    }\nSys.Net.NetworkRequestEventArgs.prototype = {\n    get_webRequest: Sys$Net$NetworkRequestEventArgs$get_webRequest\n}\nSys.Net.NetworkRequestEventArgs.registerClass('Sys.Net.NetworkRequestEventArgs', Sys.CancelEventArgs);\n \nSys.Net.WebRequest = function Sys$Net$WebRequest() {\n    /// <summary locid=\"M:J#Sys.Net.WebRequest.#ctor\" />\n    if (arguments.length !== 0) throw Error.parameterCount();\n    this._url = \"\";\n    this._headers = { };\n    this._body = null;\n    this._userContext = null;\n    this._httpVerb = null;\n    this._executor = null;\n    this._invokeCalled = false;\n    this._timeout = 0;\n}\n    function Sys$Net$WebRequest$add_completed(handler) {\n    /// <summary locid=\"E:J#Sys.Net.WebRequest.completed\" />\n    var e = Function._validateParams(arguments, [{name: \"handler\", type: Function}]);\n    if (e) throw e;\n        this._get_eventHandlerList().addHandler(\"completed\", handler);\n    }\n    function Sys$Net$WebRequest$remove_completed(handler) {\n    var e = Function._validateParams(arguments, [{name: \"handler\", type: Function}]);\n    if (e) throw e;\n        this._get_eventHandlerList().removeHandler(\"completed\", handler);\n    }\n    function Sys$Net$WebRequest$completed(eventArgs) {\n        /// <summary locid=\"M:J#Sys.Net.WebRequest.completed\" />\n        /// <param name=\"eventArgs\" type=\"Sys.EventArgs\"></param>\n        var e = Function._validateParams(arguments, [\n            {name: \"eventArgs\", type: Sys.EventArgs}\n        ]);\n        if (e) throw e;\n        var handler = Sys.Net.WebRequestManager._get_eventHandlerList().getHandler(\"completedRequest\");\n        if (handler) {\n            handler(this._executor, eventArgs);\n        }\n        handler = this._get_eventHandlerList().getHandler(\"completed\");\n        if (handler) {\n            handler(this._executor, eventArgs);\n        }\n    }\n    function Sys$Net$WebRequest$_get_eventHandlerList() {\n        if (!this._events) {\n            this._events = new Sys.EventHandlerList();\n        }\n        return this._events;\n    }\n    function Sys$Net$WebRequest$get_url() {\n        /// <value type=\"String\" locid=\"P:J#Sys.Net.WebRequest.url\"></value>\n        if (arguments.length !== 0) throw Error.parameterCount();\n        return this._url;\n    }\n    function Sys$Net$WebRequest$set_url(value) {\n        var e = Function._validateParams(arguments, [{name: \"value\", type: String}]);\n        if (e) throw e;\n        this._url = value;\n    }\n    function Sys$Net$WebRequest$get_headers() {\n        /// <value locid=\"P:J#Sys.Net.WebRequest.headers\"></value>\n        if (arguments.length !== 0) throw Error.parameterCount();\n        return this._headers;\n    }\n    function Sys$Net$WebRequest$get_httpVerb() {\n        /// <value type=\"String\" locid=\"P:J#Sys.Net.WebRequest.httpVerb\"></value>\n        if (arguments.length !== 0) throw Error.parameterCount();\n        if (this._httpVerb === null) {\n            if (this._body === null) {\n                return \"GET\";\n            }\n            return \"POST\";\n        }\n        return this._httpVerb;\n    }\n    function Sys$Net$WebRequest$set_httpVerb(value) {\n        var e = Function._validateParams(arguments, [{name: \"value\", type: String}]);\n        if (e) throw e;\n        if (value.length === 0) {\n            throw Error.argument('value', Sys.Res.invalidHttpVerb);\n        }\n        this._httpVerb = value;\n    }\n    function Sys$Net$WebRequest$get_body() {\n        /// <value mayBeNull=\"true\" locid=\"P:J#Sys.Net.WebRequest.body\"></value>\n        if (arguments.length !== 0) throw Error.parameterCount();\n        return this._body;\n    }\n    function Sys$Net$WebRequest$set_body(value) {\n        var e = Function._validateParams(arguments, [{name: \"value\", mayBeNull: true}]);\n        if (e) throw e;\n        this._body = value;\n    }\n    function Sys$Net$WebRequest$get_userContext() {\n        /// <value mayBeNull=\"true\" locid=\"P:J#Sys.Net.WebRequest.userContext\"></value>\n        if (arguments.length !== 0) throw Error.parameterCount();\n        return this._userContext;\n    }\n    function Sys$Net$WebRequest$set_userContext(value) {\n        var e = Function._validateParams(arguments, [{name: \"value\", mayBeNull: true}]);\n        if (e) throw e;\n        this._userContext = value;\n    }\n    function Sys$Net$WebRequest$get_executor() {\n        /// <value type=\"Sys.Net.WebRequestExecutor\" locid=\"P:J#Sys.Net.WebRequest.executor\"></value>\n        if (arguments.length !== 0) throw Error.parameterCount();\n        return this._executor;\n    }\n    function Sys$Net$WebRequest$set_executor(value) {\n        var e = Function._validateParams(arguments, [{name: \"value\", type: Sys.Net.WebRequestExecutor}]);\n        if (e) throw e;\n        if (this._executor !== null && this._executor.get_started()) {\n            throw Error.invalidOperation(Sys.Res.setExecutorAfterActive);\n        }\n        this._executor = value;\n        this._executor._set_webRequest(this);\n    }\n    function Sys$Net$WebRequest$get_timeout() {\n        /// <value type=\"Number\" locid=\"P:J#Sys.Net.WebRequest.timeout\"></value>\n        if (arguments.length !== 0) throw Error.parameterCount();\n        if (this._timeout === 0) {\n            return Sys.Net.WebRequestManager.get_defaultTimeout();\n        }\n        return this._timeout;\n    }\n    function Sys$Net$WebRequest$set_timeout(value) {\n        var e = Function._validateParams(arguments, [{name: \"value\", type: Number}]);\n        if (e) throw e;\n        if (value < 0) {\n            throw Error.argumentOutOfRange(\"value\", value, Sys.Res.invalidTimeout);\n        }\n        this._timeout = value;\n    }\n    function Sys$Net$WebRequest$getResolvedUrl() {\n        /// <summary locid=\"M:J#Sys.Net.WebRequest.getResolvedUrl\" />\n        /// <returns type=\"String\"></returns>\n        if (arguments.length !== 0) throw Error.parameterCount();\n        return Sys.Net.WebRequest._resolveUrl(this._url);\n    }\n    function Sys$Net$WebRequest$invoke() {\n        /// <summary locid=\"M:J#Sys.Net.WebRequest.invoke\" />\n        if (arguments.length !== 0) throw Error.parameterCount();\n        if (this._invokeCalled) {\n            throw Error.invalidOperation(Sys.Res.invokeCalledTwice);\n        }\n        Sys.Net.WebRequestManager.executeRequest(this);\n        this._invokeCalled = true;\n    }\nSys.Net.WebRequest.prototype = {\n    add_completed: Sys$Net$WebRequest$add_completed,\n    remove_completed: Sys$Net$WebRequest$remove_completed,\n    completed: Sys$Net$WebRequest$completed,\n    _get_eventHandlerList: Sys$Net$WebRequest$_get_eventHandlerList,\n    get_url: Sys$Net$WebRequest$get_url,\n    set_url: Sys$Net$WebRequest$set_url,\n    get_headers: Sys$Net$WebRequest$get_headers,\n    get_httpVerb: Sys$Net$WebRequest$get_httpVerb,\n    set_httpVerb: Sys$Net$WebRequest$set_httpVerb,\n    get_body: Sys$Net$WebRequest$get_body,\n    set_body: Sys$Net$WebRequest$set_body,\n    get_userContext: Sys$Net$WebRequest$get_userContext,\n    set_userContext: Sys$Net$WebRequest$set_userContext,\n    get_executor: Sys$Net$WebRequest$get_executor,\n    set_executor: Sys$Net$WebRequest$set_executor,\n    get_timeout: Sys$Net$WebRequest$get_timeout,\n    set_timeout: Sys$Net$WebRequest$set_timeout,\n    getResolvedUrl: Sys$Net$WebRequest$getResolvedUrl,\n    invoke: Sys$Net$WebRequest$invoke\n}\nSys.Net.WebRequest._resolveUrl = function Sys$Net$WebRequest$_resolveUrl(url, baseUrl) {\n    if (url && url.indexOf('://') !== -1) {\n        return url;\n    }\n    if (!baseUrl || baseUrl.length === 0) {\n        var baseElement = document.getElementsByTagName('base')[0];\n        if (baseElement && baseElement.href && baseElement.href.length > 0) {\n            baseUrl = baseElement.href;\n        }\n        else {\n            baseUrl = document.URL;\n        }\n    }\n    var qsStart = baseUrl.indexOf('?');\n    if (qsStart !== -1) {\n        baseUrl = baseUrl.substr(0, qsStart);\n    }\n    qsStart = baseUrl.indexOf('#');\n    if (qsStart !== -1) {\n        baseUrl = baseUrl.substr(0, qsStart);\n    }\n    baseUrl = baseUrl.substr(0, baseUrl.lastIndexOf('/') + 1);\n    if (!url || url.length === 0) {\n        return baseUrl;\n    }\n    if (url.charAt(0) === '/') {\n        var slashslash = baseUrl.indexOf('://');\n        if (slashslash === -1) {\n            throw Error.argument(\"baseUrl\", Sys.Res.badBaseUrl1);\n        }\n        var nextSlash = baseUrl.indexOf('/', slashslash + 3);\n        if (nextSlash === -1) {\n            throw Error.argument(\"baseUrl\", Sys.Res.badBaseUrl2);\n        }\n        return baseUrl.substr(0, nextSlash) + url;\n    }\n    else {\n        var lastSlash = baseUrl.lastIndexOf('/');\n        if (lastSlash === -1) {\n            throw Error.argument(\"baseUrl\", Sys.Res.badBaseUrl3);\n        }\n        return baseUrl.substr(0, lastSlash+1) + url;\n    }\n}\nSys.Net.WebRequest._createQueryString = function Sys$Net$WebRequest$_createQueryString(queryString, encodeMethod, addParams) {\n    encodeMethod = encodeMethod || encodeURIComponent;\n    var i = 0, obj, val, arg, sb = new Sys.StringBuilder();\n    if (queryString) {\n        for (arg in queryString) {\n            obj = queryString[arg];\n            if (typeof(obj) === \"function\") continue;\n            val = Sys.Serialization.JavaScriptSerializer.serialize(obj);\n            if (i++) {\n                sb.append('&');\n            }\n            sb.append(arg);\n            sb.append('=');\n            sb.append(encodeMethod(val));\n        }\n    }\n    if (addParams) {\n        if (i) {\n            sb.append('&');\n        }\n        sb.append(addParams);\n    }\n    return sb.toString();\n}\nSys.Net.WebRequest._createUrl = function Sys$Net$WebRequest$_createUrl(url, queryString, addParams) {\n    if (!queryString && !addParams) {\n        return url;\n    }\n    var qs = Sys.Net.WebRequest._createQueryString(queryString, null, addParams);\n    return qs.length\n        ? url + ((url && url.indexOf('?') >= 0) ? \"&\" : \"?\") + qs\n        : url;\n}\nSys.Net.WebRequest.registerClass('Sys.Net.WebRequest');\n \nSys._ScriptLoaderTask = function Sys$_ScriptLoaderTask(scriptElement, completedCallback) {\n    /// <summary locid=\"M:J#Sys._ScriptLoaderTask.#ctor\" />\n    /// <param name=\"scriptElement\" domElement=\"true\"></param>\n    /// <param name=\"completedCallback\" type=\"Function\"></param>\n    var e = Function._validateParams(arguments, [\n        {name: \"scriptElement\", domElement: true},\n        {name: \"completedCallback\", type: Function}\n    ]);\n    if (e) throw e;\n    this._scriptElement = scriptElement;\n    this._completedCallback = completedCallback;\n}\n    function Sys$_ScriptLoaderTask$get_scriptElement() {\n        /// <value domElement=\"true\" locid=\"P:J#Sys._ScriptLoaderTask.scriptElement\"></value>\n        if (arguments.length !== 0) throw Error.parameterCount();\n        return this._scriptElement;\n    }\n    function Sys$_ScriptLoaderTask$dispose() {\n        if(this._disposed) {\n            return;\n        }\n        this._disposed = true;\n        this._removeScriptElementHandlers();\n        Sys._ScriptLoaderTask._clearScript(this._scriptElement);\n        this._scriptElement = null;\n    }\n    function Sys$_ScriptLoaderTask$execute() {\n        /// <summary locid=\"M:J#Sys._ScriptLoaderTask.execute\" />\n        if (arguments.length !== 0) throw Error.parameterCount();\n        this._addScriptElementHandlers();\n        var headElements = document.getElementsByTagName('head');\n        if (headElements.length === 0) {\n             throw new Error.invalidOperation(Sys.Res.scriptLoadFailedNoHead);\n        }\n        else {\n             headElements[0].appendChild(this._scriptElement);\n        }\n    }\n    function Sys$_ScriptLoaderTask$_addScriptElementHandlers() {\n        this._scriptLoadDelegate = Function.createDelegate(this, this._scriptLoadHandler);\n        \n        if (Sys.Browser.agent !== Sys.Browser.InternetExplorer) {\n            this._scriptElement.readyState = 'loaded';\n            $addHandler(this._scriptElement, 'load', this._scriptLoadDelegate);\n        }\n        else {\n            $addHandler(this._scriptElement, 'readystatechange', this._scriptLoadDelegate);\n        }    \n        if (this._scriptElement.addEventListener) {\n            this._scriptErrorDelegate = Function.createDelegate(this, this._scriptErrorHandler);\n            this._scriptElement.addEventListener('error', this._scriptErrorDelegate, false);\n        }\n    }\n    function Sys$_ScriptLoaderTask$_removeScriptElementHandlers() {\n        if(this._scriptLoadDelegate) {\n            var scriptElement = this.get_scriptElement();\n            if (Sys.Browser.agent !== Sys.Browser.InternetExplorer) {\n                $removeHandler(scriptElement, 'load', this._scriptLoadDelegate);\n            }\n            else {\n                $removeHandler(scriptElement, 'readystatechange', this._scriptLoadDelegate);\n            }\n            if (this._scriptErrorDelegate) {\n                this._scriptElement.removeEventListener('error', this._scriptErrorDelegate, false);\n                this._scriptErrorDelegate = null;\n            }\n            this._scriptLoadDelegate = null;\n        }\n    }\n    function Sys$_ScriptLoaderTask$_scriptErrorHandler() {\n        if(this._disposed) {\n            return;\n        }\n        \n        this._completedCallback(this.get_scriptElement(), false);\n    }\n    function Sys$_ScriptLoaderTask$_scriptLoadHandler() {\n        if(this._disposed) {\n            return;\n        }\n        var scriptElement = this.get_scriptElement();\n        if ((scriptElement.readyState !== 'loaded') &&\n            (scriptElement.readyState !== 'complete')) {\n            return;\n        }\n        \n        this._completedCallback(scriptElement, true);\n    }\nSys._ScriptLoaderTask.prototype = {\n    get_scriptElement: Sys$_ScriptLoaderTask$get_scriptElement,\n    dispose: Sys$_ScriptLoaderTask$dispose,\n    execute: Sys$_ScriptLoaderTask$execute,\n    _addScriptElementHandlers: Sys$_ScriptLoaderTask$_addScriptElementHandlers,    \n    _removeScriptElementHandlers: Sys$_ScriptLoaderTask$_removeScriptElementHandlers,    \n    _scriptErrorHandler: Sys$_ScriptLoaderTask$_scriptErrorHandler,\n    _scriptLoadHandler: Sys$_ScriptLoaderTask$_scriptLoadHandler  \n}\nSys._ScriptLoaderTask.registerClass(\"Sys._ScriptLoaderTask\", null, Sys.IDisposable);\nSys._ScriptLoaderTask._clearScript = function Sys$_ScriptLoaderTask$_clearScript(scriptElement) {\n    if (!Sys.Debug.isDebug) {\n        scriptElement.parentNode.removeChild(scriptElement);\n    }\n}\nType.registerNamespace('Sys.Net');\n \nSys.Net.WebServiceProxy = function Sys$Net$WebServiceProxy() {\n}\n    function Sys$Net$WebServiceProxy$get_timeout() {\n        /// <value type=\"Number\" locid=\"P:J#Sys.Net.WebServiceProxy.timeout\"></value>\n        if (arguments.length !== 0) throw Error.parameterCount();\n        return this._timeout || 0;\n    }\n    function Sys$Net$WebServiceProxy$set_timeout(value) {\n        var e = Function._validateParams(arguments, [{name: \"value\", type: Number}]);\n        if (e) throw e;\n        if (value < 0) { throw Error.argumentOutOfRange('value', value, Sys.Res.invalidTimeout); }\n        this._timeout = value;\n    }\n    function Sys$Net$WebServiceProxy$get_defaultUserContext() {\n        /// <value mayBeNull=\"true\" locid=\"P:J#Sys.Net.WebServiceProxy.defaultUserContext\"></value>\n        if (arguments.length !== 0) throw Error.parameterCount();\n        return (typeof(this._userContext) === \"undefined\") ? null : this._userContext;\n    }\n    function Sys$Net$WebServiceProxy$set_defaultUserContext(value) {\n        var e = Function._validateParams(arguments, [{name: \"value\", mayBeNull: true}]);\n        if (e) throw e;\n        this._userContext = value;\n    }\n    function Sys$Net$WebServiceProxy$get_defaultSucceededCallback() {\n        /// <value type=\"Function\" mayBeNull=\"true\" locid=\"P:J#Sys.Net.WebServiceProxy.defaultSucceededCallback\"></value>\n        if (arguments.length !== 0) throw Error.parameterCount();\n        return this._succeeded || null;\n    }\n    function Sys$Net$WebServiceProxy$set_defaultSucceededCallback(value) {\n        var e = Function._validateParams(arguments, [{name: \"value\", type: Function, mayBeNull: true}]);\n        if (e) throw e;\n        this._succeeded = value;\n    }\n    function Sys$Net$WebServiceProxy$get_defaultFailedCallback() {\n        /// <value type=\"Function\" mayBeNull=\"true\" locid=\"P:J#Sys.Net.WebServiceProxy.defaultFailedCallback\"></value>\n        if (arguments.length !== 0) throw Error.parameterCount();\n        return this._failed || null;\n    }\n    function Sys$Net$WebServiceProxy$set_defaultFailedCallback(value) {\n        var e = Function._validateParams(arguments, [{name: \"value\", type: Function, mayBeNull: true}]);\n        if (e) throw e;\n        this._failed = value;\n    }\n    function Sys$Net$WebServiceProxy$get_enableJsonp() {\n        /// <value type=\"Boolean\" locid=\"P:J#Sys.Net.WebServiceProxy.enableJsonp\"></value>\n        if (arguments.length !== 0) throw Error.parameterCount();\n        return !!this._jsonp;\n    }\n    function Sys$Net$WebServiceProxy$set_enableJsonp(value) {\n        var e = Function._validateParams(arguments, [{name: \"value\", type: Boolean}]);\n        if (e) throw e;\n        this._jsonp = value;\n    }\n    function Sys$Net$WebServiceProxy$get_path() {\n        /// <value type=\"String\" locid=\"P:J#Sys.Net.WebServiceProxy.path\"></value>\n        if (arguments.length !== 0) throw Error.parameterCount();\n        return this._path || null;\n    }\n    function Sys$Net$WebServiceProxy$set_path(value) {\n        var e = Function._validateParams(arguments, [{name: \"value\", type: String}]);\n        if (e) throw e;\n        this._path = value;\n    }\n    function Sys$Net$WebServiceProxy$get_jsonpCallbackParameter() {\n        /// <value type=\"String\" locid=\"P:J#Sys.Net.WebServiceProxy.jsonpCallbackParameter\"></value>\n        if (arguments.length !== 0) throw Error.parameterCount();\n        return this._callbackParameter || \"callback\";\n    }\n    function Sys$Net$WebServiceProxy$set_jsonpCallbackParameter(value) {\n        var e = Function._validateParams(arguments, [{name: \"value\", type: String}]);\n        if (e) throw e;\n        this._callbackParameter = value;\n    }\n    function Sys$Net$WebServiceProxy$_invoke(servicePath, methodName, useGet, params, onSuccess, onFailure, userContext) {\n        /// <summary locid=\"M:J#Sys.Net.WebServiceProxy._invoke\" />\n        /// <param name=\"servicePath\" type=\"String\"></param>\n        /// <param name=\"methodName\" type=\"String\"></param>\n        /// <param name=\"useGet\" type=\"Boolean\"></param>\n        /// <param name=\"params\"></param>\n        /// <param name=\"onSuccess\" type=\"Function\" mayBeNull=\"true\" optional=\"true\"></param>\n        /// <param name=\"onFailure\" type=\"Function\" mayBeNull=\"true\" optional=\"true\"></param>\n        /// <param name=\"userContext\" mayBeNull=\"true\" optional=\"true\"></param>\n        /// <returns type=\"Sys.Net.WebRequest\" mayBeNull=\"true\"></returns>\n        var e = Function._validateParams(arguments, [\n            {name: \"servicePath\", type: String},\n            {name: \"methodName\", type: String},\n            {name: \"useGet\", type: Boolean},\n            {name: \"params\"},\n            {name: \"onSuccess\", type: Function, mayBeNull: true, optional: true},\n            {name: \"onFailure\", type: Function, mayBeNull: true, optional: true},\n            {name: \"userContext\", mayBeNull: true, optional: true}\n        ]);\n        if (e) throw e;\n        onSuccess = onSuccess || this.get_defaultSucceededCallback();\n        onFailure = onFailure || this.get_defaultFailedCallback();\n        if (userContext === null || typeof userContext === 'undefined') userContext = this.get_defaultUserContext();\n        return Sys.Net.WebServiceProxy.invoke(servicePath, methodName, useGet, params, onSuccess, onFailure, userContext, this.get_timeout(), this.get_enableJsonp(), this.get_jsonpCallbackParameter());\n    }\nSys.Net.WebServiceProxy.prototype = {\n    get_timeout: Sys$Net$WebServiceProxy$get_timeout,\n    set_timeout: Sys$Net$WebServiceProxy$set_timeout,\n    get_defaultUserContext: Sys$Net$WebServiceProxy$get_defaultUserContext,\n    set_defaultUserContext: Sys$Net$WebServiceProxy$set_defaultUserContext,\n    get_defaultSucceededCallback: Sys$Net$WebServiceProxy$get_defaultSucceededCallback,\n    set_defaultSucceededCallback: Sys$Net$WebServiceProxy$set_defaultSucceededCallback,\n    get_defaultFailedCallback: Sys$Net$WebServiceProxy$get_defaultFailedCallback,\n    set_defaultFailedCallback: Sys$Net$WebServiceProxy$set_defaultFailedCallback,\n    get_enableJsonp: Sys$Net$WebServiceProxy$get_enableJsonp,\n    set_enableJsonp: Sys$Net$WebServiceProxy$set_enableJsonp,\n    get_path: Sys$Net$WebServiceProxy$get_path,\n    set_path: Sys$Net$WebServiceProxy$set_path,\n    get_jsonpCallbackParameter: Sys$Net$WebServiceProxy$get_jsonpCallbackParameter,\n    set_jsonpCallbackParameter: Sys$Net$WebServiceProxy$set_jsonpCallbackParameter,\n    _invoke: Sys$Net$WebServiceProxy$_invoke\n}\nSys.Net.WebServiceProxy.registerClass('Sys.Net.WebServiceProxy');\nSys.Net.WebServiceProxy.invoke = function Sys$Net$WebServiceProxy$invoke(servicePath, methodName, useGet, params, onSuccess, onFailure, userContext, timeout, enableJsonp, jsonpCallbackParameter) {\n    /// <summary locid=\"M:J#Sys.Net.WebServiceProxy.invoke\" />\n    /// <param name=\"servicePath\" type=\"String\"></param>\n    /// <param name=\"methodName\" type=\"String\" mayBeNull=\"true\" optional=\"true\"></param>\n    /// <param name=\"useGet\" type=\"Boolean\" optional=\"true\"></param>\n    /// <param name=\"params\" mayBeNull=\"true\" optional=\"true\"></param>\n    /// <param name=\"onSuccess\" type=\"Function\" mayBeNull=\"true\" optional=\"true\"></param>\n    /// <param name=\"onFailure\" type=\"Function\" mayBeNull=\"true\" optional=\"true\"></param>\n    /// <param name=\"userContext\" mayBeNull=\"true\" optional=\"true\"></param>\n    /// <param name=\"timeout\" type=\"Number\" optional=\"true\"></param>\n    /// <param name=\"enableJsonp\" type=\"Boolean\" optional=\"true\" mayBeNull=\"true\"></param>\n    /// <param name=\"jsonpCallbackParameter\" type=\"String\" optional=\"true\" mayBeNull=\"true\"></param>\n    /// <returns type=\"Sys.Net.WebRequest\" mayBeNull=\"true\"></returns>\n    var e = Function._validateParams(arguments, [\n        {name: \"servicePath\", type: String},\n        {name: \"methodName\", type: String, mayBeNull: true, optional: true},\n        {name: \"useGet\", type: Boolean, optional: true},\n        {name: \"params\", mayBeNull: true, optional: true},\n        {name: \"onSuccess\", type: Function, mayBeNull: true, optional: true},\n        {name: \"onFailure\", type: Function, mayBeNull: true, optional: true},\n        {name: \"userContext\", mayBeNull: true, optional: true},\n        {name: \"timeout\", type: Number, optional: true},\n        {name: \"enableJsonp\", type: Boolean, mayBeNull: true, optional: true},\n        {name: \"jsonpCallbackParameter\", type: String, mayBeNull: true, optional: true}\n    ]);\n    if (e) throw e;\n    var schemeHost = (enableJsonp !== false) ? Sys.Net.WebServiceProxy._xdomain.exec(servicePath) : null,\n        tempCallback, jsonp = schemeHost && (schemeHost.length === 3) && \n            ((schemeHost[1] !== location.protocol) || (schemeHost[2] !== location.host));\n    useGet = jsonp || useGet;\n    if (jsonp) {\n        jsonpCallbackParameter = jsonpCallbackParameter || \"callback\";\n        tempCallback = \"_jsonp\" + Sys._jsonp++;\n    }\n    if (!params) params = {};\n    var urlParams = params;\n    if (!useGet || !urlParams) urlParams = {};\n    var script, error, timeoutcookie = null, loader, body = null,\n        url = Sys.Net.WebRequest._createUrl(methodName\n            ? (servicePath+\"/\"+encodeURIComponent(methodName))\n            : servicePath, urlParams, jsonp ? (jsonpCallbackParameter + \"=Sys.\" + tempCallback) : null);\n    if (jsonp) {\n        script = document.createElement(\"script\");\n        script.src = url;\n        loader = new Sys._ScriptLoaderTask(script, function(script, loaded) {\n            if (!loaded || tempCallback) {\n                jsonpComplete({ Message: String.format(Sys.Res.webServiceFailedNoMsg, methodName) }, -1);\n            }\n        });\n        function jsonpComplete(data, statusCode) {\n            if (timeoutcookie !== null) {\n                window.clearTimeout(timeoutcookie);\n                timeoutcookie = null;\n            }\n            loader.dispose();\n            delete Sys[tempCallback];\n            tempCallback = null; \n            if ((typeof(statusCode) !== \"undefined\") && (statusCode !== 200)) {\n                if (onFailure) {\n                    error = new Sys.Net.WebServiceError(false,\n                            data.Message || String.format(Sys.Res.webServiceFailedNoMsg, methodName),\n                            data.StackTrace || null,\n                            data.ExceptionType || null,\n                            data);\n                    error._statusCode = statusCode;\n                    onFailure(error, userContext, methodName);\n                }\n                else {\n                    if (data.StackTrace && data.Message) {\n                        error = data.StackTrace + \"-- \" + data.Message;\n                    }\n                    else {\n                        error = data.StackTrace || data.Message;\n                    }\n                    error = String.format(error ? Sys.Res.webServiceFailed : Sys.Res.webServiceFailedNoMsg, methodName, error);\n                    throw Sys.Net.WebServiceProxy._createFailedError(methodName, String.format(Sys.Res.webServiceFailed, methodName, error));\n                }\n            }\n            else if (onSuccess) {\n                onSuccess(data, userContext, methodName);\n            }\n        }\n        Sys[tempCallback] = jsonpComplete;\n        loader.execute();\n        return null;\n    }\n    var request = new Sys.Net.WebRequest();\n    request.set_url(url);\n    request.get_headers()['Content-Type'] = 'application/json; charset=utf-8';\n    if (!useGet) {\n        body = Sys.Serialization.JavaScriptSerializer.serialize(params);\n        if (body === \"{}\") body = \"\";\n    }\n    request.set_body(body);\n    request.add_completed(onComplete);\n    if (timeout && timeout > 0) request.set_timeout(timeout);\n    request.invoke();\n    \n    function onComplete(response, eventArgs) {\n        if (response.get_responseAvailable()) {\n            var statusCode = response.get_statusCode();\n            var result = null;\n           \n            try {\n                var contentType = response.getResponseHeader(\"Content-Type\");\n                if (contentType.startsWith(\"application/json\")) {\n                    result = response.get_object();\n                }\n                else if (contentType.startsWith(\"text/xml\")) {\n                    result = response.get_xml();\n                }\n                else {\n                    result = response.get_responseData();\n                }\n            } catch (ex) {\n            }\n            var error = response.getResponseHeader(\"jsonerror\");\n            var errorObj = (error === \"true\");\n            if (errorObj) {\n                if (result) {\n                    result = new Sys.Net.WebServiceError(false, result.Message, result.StackTrace, result.ExceptionType, result);\n                }\n            }\n            else if (contentType.startsWith(\"application/json\")) {\n                result = (!result || (typeof(result.d) === \"undefined\")) ? result : result.d;\n            }\n            if (((statusCode < 200) || (statusCode >= 300)) || errorObj) {\n                if (onFailure) {\n                    if (!result || !errorObj) {\n                        result = new Sys.Net.WebServiceError(false , String.format(Sys.Res.webServiceFailedNoMsg, methodName));\n                    }\n                    result._statusCode = statusCode;\n                    onFailure(result, userContext, methodName);\n                }\n                else {\n                    if (result && errorObj) {\n                        error = result.get_exceptionType() + \"-- \" + result.get_message();\n                    }\n                    else {\n                        error = response.get_responseData();\n                    }\n                    throw Sys.Net.WebServiceProxy._createFailedError(methodName, String.format(Sys.Res.webServiceFailed, methodName, error));\n                }\n            }\n            else if (onSuccess) {\n                onSuccess(result, userContext, methodName);\n            }\n        }\n        else {\n            var msg;\n            if (response.get_timedOut()) {\n                msg = String.format(Sys.Res.webServiceTimedOut, methodName);\n            }\n            else {\n                msg = String.format(Sys.Res.webServiceFailedNoMsg, methodName)\n            }\n            if (onFailure) {\n                onFailure(new Sys.Net.WebServiceError(response.get_timedOut(), msg, \"\", \"\"), userContext, methodName);\n            }\n            else {\n                throw Sys.Net.WebServiceProxy._createFailedError(methodName, msg);\n            }\n        }\n    }\n    return request;\n}\nSys.Net.WebServiceProxy._createFailedError = function Sys$Net$WebServiceProxy$_createFailedError(methodName, errorMessage) {\n    var displayMessage = \"Sys.Net.WebServiceFailedException: \" + errorMessage;\n    var e = Error.create(displayMessage, { 'name': 'Sys.Net.WebServiceFailedException', 'methodName': methodName });\n    e.popStackFrame();\n    return e;\n}\nSys.Net.WebServiceProxy._defaultFailedCallback = function Sys$Net$WebServiceProxy$_defaultFailedCallback(err, methodName) {\n    var error = err.get_exceptionType() + \"-- \" + err.get_message();\n    throw Sys.Net.WebServiceProxy._createFailedError(methodName, String.format(Sys.Res.webServiceFailed, methodName, error));\n}\nSys.Net.WebServiceProxy._generateTypedConstructor = function Sys$Net$WebServiceProxy$_generateTypedConstructor(type) {\n    return function(properties) {\n        if (properties) {\n            for (var name in properties) {\n                this[name] = properties[name];\n            }\n        }\n        this.__type = type;\n    }\n}\nSys._jsonp = 0;\nSys.Net.WebServiceProxy._xdomain = /^\\s*([a-zA-Z0-9\\+\\-\\.]+\\:)\\/\\/([^?#\\/]+)/;\n \nSys.Net.WebServiceError = function Sys$Net$WebServiceError(timedOut, message, stackTrace, exceptionType, errorObject) {\n    /// <summary locid=\"M:J#Sys.Net.WebServiceError.#ctor\" />\n    /// <param name=\"timedOut\" type=\"Boolean\"></param>\n    /// <param name=\"message\" type=\"String\" mayBeNull=\"true\"></param>\n    /// <param name=\"stackTrace\" type=\"String\" mayBeNull=\"true\" optional=\"true\"></param>\n    /// <param name=\"exceptionType\" type=\"String\" mayBeNull=\"true\" optional=\"true\"></param>\n    /// <param name=\"errorObject\" type=\"Object\" mayBeNull=\"true\" optional=\"true\"></param>\n    var e = Function._validateParams(arguments, [\n        {name: \"timedOut\", type: Boolean},\n        {name: \"message\", type: String, mayBeNull: true},\n        {name: \"stackTrace\", type: String, mayBeNull: true, optional: true},\n        {name: \"exceptionType\", type: String, mayBeNull: true, optional: true},\n        {name: \"errorObject\", type: Object, mayBeNull: true, optional: true}\n    ]);\n    if (e) throw e;\n    this._timedOut = timedOut;\n    this._message = message;\n    this._stackTrace = stackTrace;\n    this._exceptionType = exceptionType;\n    this._errorObject = errorObject;\n    this._statusCode = -1;\n}\n    function Sys$Net$WebServiceError$get_timedOut() {\n        /// <value type=\"Boolean\" locid=\"P:J#Sys.Net.WebServiceError.timedOut\"></value>\n        if (arguments.length !== 0) throw Error.parameterCount();\n        return this._timedOut;\n    }\n    function Sys$Net$WebServiceError$get_statusCode() {\n        /// <value type=\"Number\" locid=\"P:J#Sys.Net.WebServiceError.statusCode\"></value>\n        if (arguments.length !== 0) throw Error.parameterCount();\n        return this._statusCode;\n    }\n    function Sys$Net$WebServiceError$get_message() {\n        /// <value type=\"String\" locid=\"P:J#Sys.Net.WebServiceError.message\"></value>\n        if (arguments.length !== 0) throw Error.parameterCount();\n        return this._message;\n    }\n    function Sys$Net$WebServiceError$get_stackTrace() {\n        /// <value type=\"String\" locid=\"P:J#Sys.Net.WebServiceError.stackTrace\"></value>\n        if (arguments.length !== 0) throw Error.parameterCount();\n        return this._stackTrace || \"\";\n    }\n    function Sys$Net$WebServiceError$get_exceptionType() {\n        /// <value type=\"String\" locid=\"P:J#Sys.Net.WebServiceError.exceptionType\"></value>\n        if (arguments.length !== 0) throw Error.parameterCount();\n        return this._exceptionType || \"\";\n    }\n    function Sys$Net$WebServiceError$get_errorObject() {\n        /// <value type=\"Object\" locid=\"P:J#Sys.Net.WebServiceError.errorObject\"></value>\n        if (arguments.length !== 0) throw Error.parameterCount();\n        return this._errorObject || null;\n    }\nSys.Net.WebServiceError.prototype = {\n    get_timedOut: Sys$Net$WebServiceError$get_timedOut,\n    get_statusCode: Sys$Net$WebServiceError$get_statusCode,\n    get_message: Sys$Net$WebServiceError$get_message,\n    get_stackTrace: Sys$Net$WebServiceError$get_stackTrace,\n    get_exceptionType: Sys$Net$WebServiceError$get_exceptionType,\n    get_errorObject: Sys$Net$WebServiceError$get_errorObject\n}\nSys.Net.WebServiceError.registerClass('Sys.Net.WebServiceError');\n\n\nType.registerNamespace('Sys');\n\nSys.Res={\n'urlMustBeLessThan1024chars':'The history state must be small enough to not make the url larger than 1024 characters.',\n'argumentTypeName':'Value is not the name of an existing type.',\n'cantBeCalledAfterDispose':'Can\\'t be called after dispose.',\n'componentCantSetIdAfterAddedToApp':'The id property of a component can\\'t be set after it\\'s been added to the Application object.',\n'behaviorDuplicateName':'A behavior with name \\'{0}\\' already exists or it is the name of an existing property on the target element.',\n'notATypeName':'Value is not a valid type name.',\n'elementNotFound':'An element with id \\'{0}\\' could not be found.',\n'stateMustBeStringDictionary':'The state object can only have null and string fields.',\n'boolTrueOrFalse':'Value must be \\'true\\' or \\'false\\'.',\n'scriptLoadFailedNoHead':'ScriptLoader requires pages to contain a <head> element.',\n'stringFormatInvalid':'The format string is invalid.',\n'referenceNotFound':'Component \\'{0}\\' was not found.',\n'enumReservedName':'\\'{0}\\' is a reserved name that can\\'t be used as an enum value name.',\n'circularParentChain':'The chain of control parents can\\'t have circular references.',\n'namespaceContainsNonObject':'Object {0} already exists and is not an object.',\n'undefinedEvent':'\\'{0}\\' is not an event.',\n'propertyUndefined':'\\'{0}\\' is not a property or an existing field.',\n'observableConflict':'Object already contains a member with the name \\'{0}\\'.',\n'historyCannotEnableHistory':'Cannot set enableHistory after initialization.',\n'eventHandlerInvalid':'Handler was not added through the Sys.UI.DomEvent.addHandler method.',\n'scriptLoadFailedDebug':'The script \\'{0}\\' failed to load. Check for:\\r\\n Inaccessible path.\\r\\n Script errors. (IE) Enable \\'Display a notification about every script error\\' under advanced settings.',\n'propertyNotWritable':'\\'{0}\\' is not a writable property.',\n'enumInvalidValueName':'\\'{0}\\' is not a valid name for an enum value.',\n'controlAlreadyDefined':'A control is already associated with the element.',\n'addHandlerCantBeUsedForError':'Can\\'t add a handler for the error event using this method. Please set the window.onerror property instead.',\n'cantAddNonFunctionhandler':'Can\\'t add a handler that is not a function.',\n'invalidNameSpace':'Value is not a valid namespace identifier.',\n'notAnInterface':'Value is not a valid interface.',\n'eventHandlerNotFunction':'Handler must be a function.',\n'propertyNotAnArray':'\\'{0}\\' is not an Array property.',\n'namespaceContainsClass':'Object {0} already exists as a class, enum, or interface.',\n'typeRegisteredTwice':'Type {0} has already been registered. The type may be defined multiple times or the script file that defines it may have already been loaded. A possible cause is a change of settings during a partial update.',\n'cantSetNameAfterInit':'The name property can\\'t be set on this object after initialization.',\n'historyMissingFrame':'For the history feature to work in IE, the page must have an iFrame element with id \\'__historyFrame\\' pointed to a page that gets its title from the \\'title\\' query string parameter and calls Sys.Application._onIFrameLoad() on the parent window. This can be done by setting EnableHistory to true on ScriptManager.',\n'appDuplicateComponent':'Two components with the same id \\'{0}\\' can\\'t be added to the application.',\n'historyCannotAddHistoryPointWithHistoryDisabled':'A history point can only be added if enableHistory is set to true.',\n'baseNotAClass':'Value is not a class.',\n'expectedElementOrId':'Value must be a DOM element or DOM element Id.',\n'methodNotFound':'No method found with name \\'{0}\\'.',\n'arrayParseBadFormat':'Value must be a valid string representation for an array. It must start with a \\'[\\' and end with a \\']\\'.',\n'stateFieldNameInvalid':'State field names must not contain any \\'=\\' characters.',\n'cantSetId':'The id property can\\'t be set on this object.',\n'stringFormatBraceMismatch':'The format string contains an unmatched opening or closing brace.',\n'enumValueNotInteger':'An enumeration definition can only contain integer values.',\n'propertyNullOrUndefined':'Cannot set the properties of \\'{0}\\' because it returned a null value.',\n'argumentDomNode':'Value must be a DOM element or a text node.',\n'componentCantSetIdTwice':'The id property of a component can\\'t be set more than once.',\n'createComponentOnDom':'Value must be null for Components that are not Controls or Behaviors.',\n'createNotComponent':'{0} does not derive from Sys.Component.',\n'createNoDom':'Value must not be null for Controls and Behaviors.',\n'cantAddWithoutId':'Can\\'t add a component that doesn\\'t have an id.',\n'notObservable':'Instances of type \\'{0}\\' cannot be observed.',\n'badTypeName':'Value is not the name of the type being registered or the name is a reserved word.',\n'argumentInteger':'Value must be an integer.',\n'invokeCalledTwice':'Cannot call invoke more than once.',\n'webServiceFailed':'The server method \\'{0}\\' failed with the following error: {1}',\n'argumentType':'Object cannot be converted to the required type.',\n'argumentNull':'Value cannot be null.',\n'scriptAlreadyLoaded':'The script \\'{0}\\' has been referenced multiple times. If referencing Microsoft AJAX scripts explicitly, set the MicrosoftAjaxMode property of the ScriptManager to Explicit.',\n'scriptDependencyNotFound':'The script \\'{0}\\' failed to load because it is dependent on script \\'{1}\\'.',\n'formatBadFormatSpecifier':'Format specifier was invalid.',\n'requiredScriptReferenceNotIncluded':'\\'{0}\\' requires that you have included a script reference to \\'{1}\\'.',\n'webServiceFailedNoMsg':'The server method \\'{0}\\' failed.',\n'argumentDomElement':'Value must be a DOM element.',\n'invalidExecutorType':'Could not create a valid Sys.Net.WebRequestExecutor from: {0}.',\n'cannotCallBeforeResponse':'Cannot call {0} when responseAvailable is false.',\n'actualValue':'Actual value was {0}.',\n'enumInvalidValue':'\\'{0}\\' is not a valid value for enum {1}.',\n'scriptLoadFailed':'The script \\'{0}\\' could not be loaded.',\n'parameterCount':'Parameter count mismatch.',\n'cannotDeserializeEmptyString':'Cannot deserialize empty string.',\n'formatInvalidString':'Input string was not in a correct format.',\n'invalidTimeout':'Value must be greater than or equal to zero.',\n'cannotAbortBeforeStart':'Cannot abort when executor has not started.',\n'argument':'Value does not fall within the expected range.',\n'cannotDeserializeInvalidJson':'Cannot deserialize. The data does not correspond to valid JSON.',\n'invalidHttpVerb':'httpVerb cannot be set to an empty or null string.',\n'nullWebRequest':'Cannot call executeRequest with a null webRequest.',\n'eventHandlerInvalid':'Handler was not added through the Sys.UI.DomEvent.addHandler method.',\n'cannotSerializeNonFiniteNumbers':'Cannot serialize non finite numbers.',\n'argumentUndefined':'Value cannot be undefined.',\n'webServiceInvalidReturnType':'The server method \\'{0}\\' returned an invalid type. Expected type: {1}',\n'servicePathNotSet':'The path to the web service has not been set.',\n'argumentTypeWithTypes':'Object of type \\'{0}\\' cannot be converted to type \\'{1}\\'.',\n'cannotCallOnceStarted':'Cannot call {0} once started.',\n'badBaseUrl1':'Base URL does not contain ://.',\n'badBaseUrl2':'Base URL does not contain another /.',\n'badBaseUrl3':'Cannot find last / in base URL.',\n'setExecutorAfterActive':'Cannot set executor after it has become active.',\n'paramName':'Parameter name: {0}',\n'nullReferenceInPath':'Null reference while evaluating data path: \\'{0}\\'.',\n'cannotCallOutsideHandler':'Cannot call {0} outside of a completed event handler.',\n'cannotSerializeObjectWithCycle':'Cannot serialize object with cyclic reference within child properties.',\n'format':'One of the identified items was in an invalid format.',\n'assertFailedCaller':'Assertion Failed: {0}\\r\\nat {1}',\n'argumentOutOfRange':'Specified argument was out of the range of valid values.',\n'webServiceTimedOut':'The server method \\'{0}\\' timed out.',\n'notImplemented':'The method or operation is not implemented.',\n'assertFailed':'Assertion Failed: {0}',\n'invalidOperation':'Operation is not valid due to the current state of the object.',\n'breakIntoDebugger':'{0}\\r\\n\\r\\nBreak into debugger?'\n};\n"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/DDDPPP.Chap20.CommandHandler.Presentation/Scripts/MicrosoftAjax.js",
    "content": "﻿//----------------------------------------------------------\n// Copyright (C) Microsoft Corporation. All rights reserved.\n//----------------------------------------------------------\n// MicrosoftAjax.js\nFunction.__typeName=\"Function\";Function.__class=true;Function.createCallback=function(b,a){return function(){var e=arguments.length;if(e>0){var d=[];for(var c=0;c<e;c++)d[c]=arguments[c];d[e]=a;return b.apply(this,d)}return b.call(this,a)}};Function.createDelegate=function(a,b){return function(){return b.apply(a,arguments)}};Function.emptyFunction=Function.emptyMethod=function(){};Function.validateParameters=function(c,b,a){return Function._validateParams(c,b,a)};Function._validateParams=function(g,e,c){var a,d=e.length;c=c||typeof c===\"undefined\";a=Function._validateParameterCount(g,e,c);if(a){a.popStackFrame();return a}for(var b=0,i=g.length;b<i;b++){var f=e[Math.min(b,d-1)],h=f.name;if(f.parameterArray)h+=\"[\"+(b-d+1)+\"]\";else if(!c&&b>=d)break;a=Function._validateParameter(g[b],f,h);if(a){a.popStackFrame();return a}}return null};Function._validateParameterCount=function(j,d,i){var a,c,b=d.length,e=j.length;if(e<b){var f=b;for(a=0;a<b;a++){var g=d[a];if(g.optional||g.parameterArray)f--}if(e<f)c=true}else if(i&&e>b){c=true;for(a=0;a<b;a++)if(d[a].parameterArray){c=false;break}}if(c){var h=Error.parameterCount();h.popStackFrame();return h}return null};Function._validateParameter=function(c,a,h){var b,g=a.type,l=!!a.integer,k=!!a.domElement,m=!!a.mayBeNull;b=Function._validateParameterType(c,g,l,k,m,h);if(b){b.popStackFrame();return b}var e=a.elementType,f=!!a.elementMayBeNull;if(g===Array&&typeof c!==\"undefined\"&&c!==null&&(e||!f)){var j=!!a.elementInteger,i=!!a.elementDomElement;for(var d=0;d<c.length;d++){var n=c[d];b=Function._validateParameterType(n,e,j,i,f,h+\"[\"+d+\"]\");if(b){b.popStackFrame();return b}}}return null};Function._validateParameterType=function(b,c,k,j,h,d){var a,g;if(typeof b===\"undefined\")if(h)return null;else{a=Error.argumentUndefined(d);a.popStackFrame();return a}if(b===null)if(h)return null;else{a=Error.argumentNull(d);a.popStackFrame();return a}if(c&&c.__enum){if(typeof b!==\"number\"){a=Error.argumentType(d,Object.getType(b),c);a.popStackFrame();return a}if(b%1===0){var e=c.prototype;if(!c.__flags||b===0){for(g in e)if(e[g]===b)return null}else{var i=b;for(g in e){var f=e[g];if(f===0)continue;if((f&b)===f)i-=f;if(i===0)return null}}}a=Error.argumentOutOfRange(d,b,String.format(Sys.Res.enumInvalidValue,b,c.getName()));a.popStackFrame();return a}if(j&&(!Sys._isDomElement(b)||b.nodeType===3)){a=Error.argument(d,Sys.Res.argumentDomElement);a.popStackFrame();return a}if(c&&!Sys._isInstanceOfType(c,b)){a=Error.argumentType(d,Object.getType(b),c);a.popStackFrame();return a}if(c===Number&&k)if(b%1!==0){a=Error.argumentOutOfRange(d,b,Sys.Res.argumentInteger);a.popStackFrame();return a}return null};Error.__typeName=\"Error\";Error.__class=true;Error.create=function(d,b){var a=new Error(d);a.message=d;if(b)for(var c in b)a[c]=b[c];a.popStackFrame();return a};Error.argument=function(a,c){var b=\"Sys.ArgumentException: \"+(c?c:Sys.Res.argument);if(a)b+=\"\\n\"+String.format(Sys.Res.paramName,a);var d=Error.create(b,{name:\"Sys.ArgumentException\",paramName:a});d.popStackFrame();return d};Error.argumentNull=function(a,c){var b=\"Sys.ArgumentNullException: \"+(c?c:Sys.Res.argumentNull);if(a)b+=\"\\n\"+String.format(Sys.Res.paramName,a);var d=Error.create(b,{name:\"Sys.ArgumentNullException\",paramName:a});d.popStackFrame();return d};Error.argumentOutOfRange=function(c,a,d){var b=\"Sys.ArgumentOutOfRangeException: \"+(d?d:Sys.Res.argumentOutOfRange);if(c)b+=\"\\n\"+String.format(Sys.Res.paramName,c);if(typeof a!==\"undefined\"&&a!==null)b+=\"\\n\"+String.format(Sys.Res.actualValue,a);var e=Error.create(b,{name:\"Sys.ArgumentOutOfRangeException\",paramName:c,actualValue:a});e.popStackFrame();return e};Error.argumentType=function(d,c,b,e){var a=\"Sys.ArgumentTypeException: \";if(e)a+=e;else if(c&&b)a+=String.format(Sys.Res.argumentTypeWithTypes,c.getName(),b.getName());else a+=Sys.Res.argumentType;if(d)a+=\"\\n\"+String.format(Sys.Res.paramName,d);var f=Error.create(a,{name:\"Sys.ArgumentTypeException\",paramName:d,actualType:c,expectedType:b});f.popStackFrame();return f};Error.argumentUndefined=function(a,c){var b=\"Sys.ArgumentUndefinedException: \"+(c?c:Sys.Res.argumentUndefined);if(a)b+=\"\\n\"+String.format(Sys.Res.paramName,a);var d=Error.create(b,{name:\"Sys.ArgumentUndefinedException\",paramName:a});d.popStackFrame();return d};Error.format=function(a){var c=\"Sys.FormatException: \"+(a?a:Sys.Res.format),b=Error.create(c,{name:\"Sys.FormatException\"});b.popStackFrame();return b};Error.invalidOperation=function(a){var c=\"Sys.InvalidOperationException: \"+(a?a:Sys.Res.invalidOperation),b=Error.create(c,{name:\"Sys.InvalidOperationException\"});b.popStackFrame();return b};Error.notImplemented=function(a){var c=\"Sys.NotImplementedException: \"+(a?a:Sys.Res.notImplemented),b=Error.create(c,{name:\"Sys.NotImplementedException\"});b.popStackFrame();return b};Error.parameterCount=function(a){var c=\"Sys.ParameterCountException: \"+(a?a:Sys.Res.parameterCount),b=Error.create(c,{name:\"Sys.ParameterCountException\"});b.popStackFrame();return b};Error.prototype.popStackFrame=function(){if(typeof this.stack===\"undefined\"||this.stack===null||typeof this.fileName===\"undefined\"||this.fileName===null||typeof this.lineNumber===\"undefined\"||this.lineNumber===null)return;var a=this.stack.split(\"\\n\"),c=a[0],e=this.fileName+\":\"+this.lineNumber;while(typeof c!==\"undefined\"&&c!==null&&c.indexOf(e)===-1){a.shift();c=a[0]}var d=a[1];if(typeof d===\"undefined\"||d===null)return;var b=d.match(/@(.*):(\\d+)$/);if(typeof b===\"undefined\"||b===null)return;this.fileName=b[1];this.lineNumber=parseInt(b[2]);a.shift();this.stack=a.join(\"\\n\")};Object.__typeName=\"Object\";Object.__class=true;Object.getType=function(b){var a=b.constructor;if(!a||typeof a!==\"function\"||!a.__typeName||a.__typeName===\"Object\")return Object;return a};Object.getTypeName=function(a){return Object.getType(a).getName()};String.__typeName=\"String\";String.__class=true;String.prototype.endsWith=function(a){return this.substr(this.length-a.length)===a};String.prototype.startsWith=function(a){return this.substr(0,a.length)===a};String.prototype.trim=function(){return this.replace(/^\\s+|\\s+$/g,\"\")};String.prototype.trimEnd=function(){return this.replace(/\\s+$/,\"\")};String.prototype.trimStart=function(){return this.replace(/^\\s+/,\"\")};String.format=function(){return String._toFormattedString(false,arguments)};String._toFormattedString=function(l,j){var c=\"\",e=j[0];for(var a=0;true;){var f=e.indexOf(\"{\",a),d=e.indexOf(\"}\",a);if(f<0&&d<0){c+=e.slice(a);break}if(d>0&&(d<f||f<0)){c+=e.slice(a,d+1);a=d+2;continue}c+=e.slice(a,f);a=f+1;if(e.charAt(a)===\"{\"){c+=\"{\";a++;continue}if(d<0)break;var h=e.substring(a,d),g=h.indexOf(\":\"),k=parseInt(g<0?h:h.substring(0,g),10)+1,i=g<0?\"\":h.substring(g+1),b=j[k];if(typeof b===\"undefined\"||b===null)b=\"\";if(b.toFormattedString)c+=b.toFormattedString(i);else if(l&&b.localeFormat)c+=b.localeFormat(i);else if(b.format)c+=b.format(i);else c+=b.toString();a=d+1}return c};Boolean.__typeName=\"Boolean\";Boolean.__class=true;Boolean.parse=function(b){var a=b.trim().toLowerCase();if(a===\"false\")return false;if(a===\"true\")return true};Date.__typeName=\"Date\";Date.__class=true;Number.__typeName=\"Number\";Number.__class=true;RegExp.__typeName=\"RegExp\";RegExp.__class=true;if(!window)this.window=this;window.Type=Function;Type.prototype.callBaseMethod=function(a,d,b){var c=Sys._getBaseMethod(this,a,d);if(!b)return c.apply(a);else return c.apply(a,b)};Type.prototype.getBaseMethod=function(a,b){return Sys._getBaseMethod(this,a,b)};Type.prototype.getBaseType=function(){return typeof this.__baseType===\"undefined\"?null:this.__baseType};Type.prototype.getInterfaces=function(){var a=[],b=this;while(b){var c=b.__interfaces;if(c)for(var d=0,f=c.length;d<f;d++){var e=c[d];if(!Array.contains(a,e))a[a.length]=e}b=b.__baseType}return a};Type.prototype.getName=function(){return typeof this.__typeName===\"undefined\"?\"\":this.__typeName};Type.prototype.implementsInterface=function(d){this.resolveInheritance();var c=d.getName(),a=this.__interfaceCache;if(a){var e=a[c];if(typeof e!==\"undefined\")return e}else a=this.__interfaceCache={};var b=this;while(b){var f=b.__interfaces;if(f)if(Array.indexOf(f,d)!==-1)return a[c]=true;b=b.__baseType}return a[c]=false};Type.prototype.inheritsFrom=function(b){this.resolveInheritance();var a=this.__baseType;while(a){if(a===b)return true;a=a.__baseType}return false};Type.prototype.initializeBase=function(a,b){this.resolveInheritance();if(this.__baseType)if(!b)this.__baseType.apply(a);else this.__baseType.apply(a,b);return a};Type.prototype.isImplementedBy=function(a){if(typeof a===\"undefined\"||a===null)return false;var b=Object.getType(a);return !!(b.implementsInterface&&b.implementsInterface(this))};Type.prototype.isInstanceOfType=function(a){return Sys._isInstanceOfType(this,a)};Type.prototype.registerClass=function(c,b,d){this.prototype.constructor=this;this.__typeName=c;this.__class=true;if(b){this.__baseType=b;this.__basePrototypePending=true}Sys.__upperCaseTypes[c.toUpperCase()]=this;if(d){this.__interfaces=[];for(var a=2,f=arguments.length;a<f;a++){var e=arguments[a];this.__interfaces.push(e)}}return this};Type.prototype.registerInterface=function(a){Sys.__upperCaseTypes[a.toUpperCase()]=this;this.prototype.constructor=this;this.__typeName=a;this.__interface=true;return this};Type.prototype.resolveInheritance=function(){if(this.__basePrototypePending){var b=this.__baseType;b.resolveInheritance();for(var a in b.prototype){var c=b.prototype[a];if(!this.prototype[a])this.prototype[a]=c}delete this.__basePrototypePending}};Type.getRootNamespaces=function(){return Array.clone(Sys.__rootNamespaces)};Type.isClass=function(a){if(typeof a===\"undefined\"||a===null)return false;return !!a.__class};Type.isInterface=function(a){if(typeof a===\"undefined\"||a===null)return false;return !!a.__interface};Type.isNamespace=function(a){if(typeof a===\"undefined\"||a===null)return false;return !!a.__namespace};Type.parse=function(typeName,ns){var fn;if(ns){fn=Sys.__upperCaseTypes[ns.getName().toUpperCase()+\".\"+typeName.toUpperCase()];return fn||null}if(!typeName)return null;if(!Type.__htClasses)Type.__htClasses={};fn=Type.__htClasses[typeName];if(!fn){fn=eval(typeName);Type.__htClasses[typeName]=fn}return fn};Type.registerNamespace=function(e){var d=window,c=e.split(\".\");for(var b=0;b<c.length;b++){var f=c[b],a=d[f];if(!a)a=d[f]={};if(!a.__namespace){if(b===0&&e!==\"Sys\")Sys.__rootNamespaces[Sys.__rootNamespaces.length]=a;a.__namespace=true;a.__typeName=c.slice(0,b+1).join(\".\");a.getName=function(){return this.__typeName}}d=a}};Type._checkDependency=function(c,a){var d=Type._registerScript._scripts,b=d?!!d[c]:false;if(typeof a!==\"undefined\"&&!b)throw Error.invalidOperation(String.format(Sys.Res.requiredScriptReferenceNotIncluded,a,c));return b};Type._registerScript=function(a,c){var b=Type._registerScript._scripts;if(!b)Type._registerScript._scripts=b={};if(b[a])throw Error.invalidOperation(String.format(Sys.Res.scriptAlreadyLoaded,a));b[a]=true;if(c)for(var d=0,f=c.length;d<f;d++){var e=c[d];if(!Type._checkDependency(e))throw Error.invalidOperation(String.format(Sys.Res.scriptDependencyNotFound,a,e))}};Type.registerNamespace(\"Sys\");Sys.__upperCaseTypes={};Sys.__rootNamespaces=[Sys];Sys._isInstanceOfType=function(c,b){if(typeof b===\"undefined\"||b===null)return false;if(b instanceof c)return true;var a=Object.getType(b);return !!(a===c)||a.inheritsFrom&&a.inheritsFrom(c)||a.implementsInterface&&a.implementsInterface(c)};Sys._getBaseMethod=function(d,e,c){var b=d.getBaseType();if(b){var a=b.prototype[c];return a instanceof Function?a:null}return null};Sys._isDomElement=function(a){var c=false;if(typeof a.nodeType!==\"number\"){var b=a.ownerDocument||a.document||a;if(b!=a){var d=b.defaultView||b.parentWindow;c=d!=a}else c=typeof b.body===\"undefined\"}return !c};Array.__typeName=\"Array\";Array.__class=true;Array.add=Array.enqueue=function(a,b){a[a.length]=b};Array.addRange=function(a,b){a.push.apply(a,b)};Array.clear=function(a){a.length=0};Array.clone=function(a){if(a.length===1)return [a[0]];else return Array.apply(null,a)};Array.contains=function(a,b){return Sys._indexOf(a,b)>=0};Array.dequeue=function(a){return a.shift()};Array.forEach=function(b,e,d){for(var a=0,f=b.length;a<f;a++){var c=b[a];if(typeof c!==\"undefined\")e.call(d,c,a,b)}};Array.indexOf=function(a,c,b){return Sys._indexOf(a,c,b)};Array.insert=function(a,b,c){a.splice(b,0,c)};Array.parse=function(value){if(!value)return [];return eval(value)};Array.remove=function(b,c){var a=Sys._indexOf(b,c);if(a>=0)b.splice(a,1);return a>=0};Array.removeAt=function(a,b){a.splice(b,1)};Sys._indexOf=function(d,e,a){if(typeof e===\"undefined\")return -1;var c=d.length;if(c!==0){a=a-0;if(isNaN(a))a=0;else{if(isFinite(a))a=a-a%1;if(a<0)a=Math.max(0,c+a)}for(var b=a;b<c;b++)if(typeof d[b]!==\"undefined\"&&d[b]===e)return b}return -1};Type._registerScript._scripts={\"MicrosoftAjaxCore.js\":true,\"MicrosoftAjaxGlobalization.js\":true,\"MicrosoftAjaxSerialization.js\":true,\"MicrosoftAjaxComponentModel.js\":true,\"MicrosoftAjaxHistory.js\":true,\"MicrosoftAjaxNetwork.js\":true,\"MicrosoftAjaxWebServices.js\":true};Sys.IDisposable=function(){};Sys.IDisposable.prototype={};Sys.IDisposable.registerInterface(\"Sys.IDisposable\");Sys.StringBuilder=function(a){this._parts=typeof a!==\"undefined\"&&a!==null&&a!==\"\"?[a.toString()]:[];this._value={};this._len=0};Sys.StringBuilder.prototype={append:function(a){this._parts[this._parts.length]=a},appendLine:function(a){this._parts[this._parts.length]=typeof a===\"undefined\"||a===null||a===\"\"?\"\\r\\n\":a+\"\\r\\n\"},clear:function(){this._parts=[];this._value={};this._len=0},isEmpty:function(){if(this._parts.length===0)return true;return this.toString()===\"\"},toString:function(a){a=a||\"\";var b=this._parts;if(this._len!==b.length){this._value={};this._len=b.length}var d=this._value;if(typeof d[a]===\"undefined\"){if(a!==\"\")for(var c=0;c<b.length;)if(typeof b[c]===\"undefined\"||b[c]===\"\"||b[c]===null)b.splice(c,1);else c++;d[a]=this._parts.join(a)}return d[a]}};Sys.StringBuilder.registerClass(\"Sys.StringBuilder\");Sys.Browser={};Sys.Browser.InternetExplorer={};Sys.Browser.Firefox={};Sys.Browser.Safari={};Sys.Browser.Opera={};Sys.Browser.agent=null;Sys.Browser.hasDebuggerStatement=false;Sys.Browser.name=navigator.appName;Sys.Browser.version=parseFloat(navigator.appVersion);Sys.Browser.documentMode=0;if(navigator.userAgent.indexOf(\" MSIE \")>-1){Sys.Browser.agent=Sys.Browser.InternetExplorer;Sys.Browser.version=parseFloat(navigator.userAgent.match(/MSIE (\\d+\\.\\d+)/)[1]);if(Sys.Browser.version>=8)if(document.documentMode>=7)Sys.Browser.documentMode=document.documentMode;Sys.Browser.hasDebuggerStatement=true}else if(navigator.userAgent.indexOf(\" Firefox/\")>-1){Sys.Browser.agent=Sys.Browser.Firefox;Sys.Browser.version=parseFloat(navigator.userAgent.match(/Firefox\\/(\\d+\\.\\d+)/)[1]);Sys.Browser.name=\"Firefox\";Sys.Browser.hasDebuggerStatement=true}else if(navigator.userAgent.indexOf(\" AppleWebKit/\")>-1){Sys.Browser.agent=Sys.Browser.Safari;Sys.Browser.version=parseFloat(navigator.userAgent.match(/AppleWebKit\\/(\\d+(\\.\\d+)?)/)[1]);Sys.Browser.name=\"Safari\"}else if(navigator.userAgent.indexOf(\"Opera/\")>-1)Sys.Browser.agent=Sys.Browser.Opera;Sys.EventArgs=function(){};Sys.EventArgs.registerClass(\"Sys.EventArgs\");Sys.EventArgs.Empty=new Sys.EventArgs;Sys.CancelEventArgs=function(){Sys.CancelEventArgs.initializeBase(this);this._cancel=false};Sys.CancelEventArgs.prototype={get_cancel:function(){return this._cancel},set_cancel:function(a){this._cancel=a}};Sys.CancelEventArgs.registerClass(\"Sys.CancelEventArgs\",Sys.EventArgs);Type.registerNamespace(\"Sys.UI\");Sys._Debug=function(){};Sys._Debug.prototype={_appendConsole:function(a){if(typeof Debug!==\"undefined\"&&Debug.writeln)Debug.writeln(a);if(window.console&&window.console.log)window.console.log(a);if(window.opera)window.opera.postError(a);if(window.debugService)window.debugService.trace(a)},_appendTrace:function(b){var a=document.getElementById(\"TraceConsole\");if(a&&a.tagName.toUpperCase()===\"TEXTAREA\")a.value+=b+\"\\n\"},assert:function(c,a,b){if(!c){a=b&&this.assert.caller?String.format(Sys.Res.assertFailedCaller,a,this.assert.caller):String.format(Sys.Res.assertFailed,a);if(confirm(String.format(Sys.Res.breakIntoDebugger,a)))this.fail(a)}},clearTrace:function(){var a=document.getElementById(\"TraceConsole\");if(a&&a.tagName.toUpperCase()===\"TEXTAREA\")a.value=\"\"},fail:function(message){this._appendConsole(message);if(Sys.Browser.hasDebuggerStatement)eval(\"debugger\")},trace:function(a){this._appendConsole(a);this._appendTrace(a)},traceDump:function(a,b){var c=this._traceDump(a,b,true)},_traceDump:function(a,c,f,b,d){c=c?c:\"traceDump\";b=b?b:\"\";if(a===null){this.trace(b+c+\": null\");return}switch(typeof a){case \"undefined\":this.trace(b+c+\": Undefined\");break;case \"number\":case \"string\":case \"boolean\":this.trace(b+c+\": \"+a);break;default:if(Date.isInstanceOfType(a)||RegExp.isInstanceOfType(a)){this.trace(b+c+\": \"+a.toString());break}if(!d)d=[];else if(Array.contains(d,a)){this.trace(b+c+\": ...\");return}Array.add(d,a);if(a==window||a===document||window.HTMLElement&&a instanceof HTMLElement||typeof a.nodeName===\"string\"){var k=a.tagName?a.tagName:\"DomElement\";if(a.id)k+=\" - \"+a.id;this.trace(b+c+\" {\"+k+\"}\")}else{var i=Object.getTypeName(a);this.trace(b+c+(typeof i===\"string\"?\" {\"+i+\"}\":\"\"));if(b===\"\"||f){b+=\"    \";var e,j,l,g,h;if(Array.isInstanceOfType(a)){j=a.length;for(e=0;e<j;e++)this._traceDump(a[e],\"[\"+e+\"]\",f,b,d)}else for(g in a){h=a[g];if(!Function.isInstanceOfType(h))this._traceDump(h,g,f,b,d)}}}Array.remove(d,a)}}};Sys._Debug.registerClass(\"Sys._Debug\");Sys.Debug=new Sys._Debug;Sys.Debug.isDebug=false;function Sys$Enum$parse(c,e){var a,b,i;if(e){a=this.__lowerCaseValues;if(!a){this.__lowerCaseValues=a={};var g=this.prototype;for(var f in g)a[f.toLowerCase()]=g[f]}}else a=this.prototype;if(!this.__flags){i=e?c.toLowerCase():c;b=a[i.trim()];if(typeof b!==\"number\")throw Error.argument(\"value\",String.format(Sys.Res.enumInvalidValue,c,this.__typeName));return b}else{var h=(e?c.toLowerCase():c).split(\",\"),j=0;for(var d=h.length-1;d>=0;d--){var k=h[d].trim();b=a[k];if(typeof b!==\"number\")throw Error.argument(\"value\",String.format(Sys.Res.enumInvalidValue,c.split(\",\")[d].trim(),this.__typeName));j|=b}return j}}function Sys$Enum$toString(c){if(typeof c===\"undefined\"||c===null)return this.__string;var d=this.prototype,a;if(!this.__flags||c===0){for(a in d)if(d[a]===c)return a}else{var b=this.__sortedValues;if(!b){b=[];for(a in d)b[b.length]={key:a,value:d[a]};b.sort(function(a,b){return a.value-b.value});this.__sortedValues=b}var e=[],g=c;for(a=b.length-1;a>=0;a--){var h=b[a],f=h.value;if(f===0)continue;if((f&c)===f){e[e.length]=h.key;g-=f;if(g===0)break}}if(e.length&&g===0)return e.reverse().join(\", \")}return \"\"}Type.prototype.registerEnum=function(b,c){Sys.__upperCaseTypes[b.toUpperCase()]=this;for(var a in this.prototype)this[a]=this.prototype[a];this.__typeName=b;this.parse=Sys$Enum$parse;this.__string=this.toString();this.toString=Sys$Enum$toString;this.__flags=c;this.__enum=true};Type.isEnum=function(a){if(typeof a===\"undefined\"||a===null)return false;return !!a.__enum};Type.isFlags=function(a){if(typeof a===\"undefined\"||a===null)return false;return !!a.__flags};Sys.CollectionChange=function(e,a,c,b,d){this.action=e;if(a)if(!(a instanceof Array))a=[a];this.newItems=a||null;if(typeof c!==\"number\")c=-1;this.newStartingIndex=c;if(b)if(!(b instanceof Array))b=[b];this.oldItems=b||null;if(typeof d!==\"number\")d=-1;this.oldStartingIndex=d};Sys.CollectionChange.registerClass(\"Sys.CollectionChange\");Sys.NotifyCollectionChangedAction=function(){throw Error.notImplemented()};Sys.NotifyCollectionChangedAction.prototype={add:0,remove:1,reset:2};Sys.NotifyCollectionChangedAction.registerEnum(\"Sys.NotifyCollectionChangedAction\");Sys.NotifyCollectionChangedEventArgs=function(a){this._changes=a;Sys.NotifyCollectionChangedEventArgs.initializeBase(this)};Sys.NotifyCollectionChangedEventArgs.prototype={get_changes:function(){return this._changes||[]}};Sys.NotifyCollectionChangedEventArgs.registerClass(\"Sys.NotifyCollectionChangedEventArgs\",Sys.EventArgs);Sys.Observer=function(){};Sys.Observer.registerClass(\"Sys.Observer\");Sys.Observer.makeObservable=function(a){var c=a instanceof Array,b=Sys.Observer;if(a.setValue===b._observeMethods.setValue)return a;b._addMethods(a,b._observeMethods);if(c)b._addMethods(a,b._arrayMethods);return a};Sys.Observer._addMethods=function(c,b){for(var a in b)c[a]=b[a]};Sys.Observer._addEventHandler=function(c,a,b){Sys.Observer._getContext(c,true).events._addHandler(a,b)};Sys.Observer.addEventHandler=function(c,a,b){Sys.Observer._addEventHandler(c,a,b)};Sys.Observer._removeEventHandler=function(c,a,b){Sys.Observer._getContext(c,true).events._removeHandler(a,b)};Sys.Observer.removeEventHandler=function(c,a,b){Sys.Observer._removeEventHandler(c,a,b)};Sys.Observer.raiseEvent=function(b,e,d){var c=Sys.Observer._getContext(b);if(!c)return;var a=c.events.getHandler(e);if(a)a(b,d)};Sys.Observer.addPropertyChanged=function(b,a){Sys.Observer._addEventHandler(b,\"propertyChanged\",a)};Sys.Observer.removePropertyChanged=function(b,a){Sys.Observer._removeEventHandler(b,\"propertyChanged\",a)};Sys.Observer.beginUpdate=function(a){Sys.Observer._getContext(a,true).updating=true};Sys.Observer.endUpdate=function(b){var a=Sys.Observer._getContext(b);if(!a||!a.updating)return;a.updating=false;var d=a.dirty;a.dirty=false;if(d){if(b instanceof Array){var c=a.changes;a.changes=null;Sys.Observer.raiseCollectionChanged(b,c)}Sys.Observer.raisePropertyChanged(b,\"\")}};Sys.Observer.isUpdating=function(b){var a=Sys.Observer._getContext(b);return a?a.updating:false};Sys.Observer._setValue=function(a,j,g){var b,f,k=a,d=j.split(\".\");for(var i=0,m=d.length-1;i<m;i++){var l=d[i];b=a[\"get_\"+l];if(typeof b===\"function\")a=b.call(a);else a=a[l];var n=typeof a;if(a===null||n===\"undefined\")throw Error.invalidOperation(String.format(Sys.Res.nullReferenceInPath,j))}var e,c=d[m];b=a[\"get_\"+c];f=a[\"set_\"+c];if(typeof b===\"function\")e=b.call(a);else e=a[c];if(typeof f===\"function\")f.call(a,g);else a[c]=g;if(e!==g){var h=Sys.Observer._getContext(k);if(h&&h.updating){h.dirty=true;return}Sys.Observer.raisePropertyChanged(k,d[0])}};Sys.Observer.setValue=function(b,a,c){Sys.Observer._setValue(b,a,c)};Sys.Observer.raisePropertyChanged=function(b,a){Sys.Observer.raiseEvent(b,\"propertyChanged\",new Sys.PropertyChangedEventArgs(a))};Sys.Observer.addCollectionChanged=function(b,a){Sys.Observer._addEventHandler(b,\"collectionChanged\",a)};Sys.Observer.removeCollectionChanged=function(b,a){Sys.Observer._removeEventHandler(b,\"collectionChanged\",a)};Sys.Observer._collectionChange=function(d,c){var a=Sys.Observer._getContext(d);if(a&&a.updating){a.dirty=true;var b=a.changes;if(!b)a.changes=b=[c];else b.push(c)}else{Sys.Observer.raiseCollectionChanged(d,[c]);Sys.Observer.raisePropertyChanged(d,\"length\")}};Sys.Observer.add=function(a,b){var c=new Sys.CollectionChange(Sys.NotifyCollectionChangedAction.add,[b],a.length);Array.add(a,b);Sys.Observer._collectionChange(a,c)};Sys.Observer.addRange=function(a,b){var c=new Sys.CollectionChange(Sys.NotifyCollectionChangedAction.add,b,a.length);Array.addRange(a,b);Sys.Observer._collectionChange(a,c)};Sys.Observer.clear=function(a){var b=Array.clone(a);Array.clear(a);Sys.Observer._collectionChange(a,new Sys.CollectionChange(Sys.NotifyCollectionChangedAction.reset,null,-1,b,0))};Sys.Observer.insert=function(a,b,c){Array.insert(a,b,c);Sys.Observer._collectionChange(a,new Sys.CollectionChange(Sys.NotifyCollectionChangedAction.add,[c],b))};Sys.Observer.remove=function(a,b){var c=Array.indexOf(a,b);if(c!==-1){Array.remove(a,b);Sys.Observer._collectionChange(a,new Sys.CollectionChange(Sys.NotifyCollectionChangedAction.remove,null,-1,[b],c));return true}return false};Sys.Observer.removeAt=function(b,a){if(a>-1&&a<b.length){var c=b[a];Array.removeAt(b,a);Sys.Observer._collectionChange(b,new Sys.CollectionChange(Sys.NotifyCollectionChangedAction.remove,null,-1,[c],a))}};Sys.Observer.raiseCollectionChanged=function(b,a){Sys.Observer.raiseEvent(b,\"collectionChanged\",new Sys.NotifyCollectionChangedEventArgs(a))};Sys.Observer._observeMethods={add_propertyChanged:function(a){Sys.Observer._addEventHandler(this,\"propertyChanged\",a)},remove_propertyChanged:function(a){Sys.Observer._removeEventHandler(this,\"propertyChanged\",a)},addEventHandler:function(a,b){Sys.Observer._addEventHandler(this,a,b)},removeEventHandler:function(a,b){Sys.Observer._removeEventHandler(this,a,b)},get_isUpdating:function(){return Sys.Observer.isUpdating(this)},beginUpdate:function(){Sys.Observer.beginUpdate(this)},endUpdate:function(){Sys.Observer.endUpdate(this)},setValue:function(b,a){Sys.Observer._setValue(this,b,a)},raiseEvent:function(b,a){Sys.Observer.raiseEvent(this,b,a)},raisePropertyChanged:function(a){Sys.Observer.raiseEvent(this,\"propertyChanged\",new Sys.PropertyChangedEventArgs(a))}};Sys.Observer._arrayMethods={add_collectionChanged:function(a){Sys.Observer._addEventHandler(this,\"collectionChanged\",a)},remove_collectionChanged:function(a){Sys.Observer._removeEventHandler(this,\"collectionChanged\",a)},add:function(a){Sys.Observer.add(this,a)},addRange:function(a){Sys.Observer.addRange(this,a)},clear:function(){Sys.Observer.clear(this)},insert:function(a,b){Sys.Observer.insert(this,a,b)},remove:function(a){return Sys.Observer.remove(this,a)},removeAt:function(a){Sys.Observer.removeAt(this,a)},raiseCollectionChanged:function(a){Sys.Observer.raiseEvent(this,\"collectionChanged\",new Sys.NotifyCollectionChangedEventArgs(a))}};Sys.Observer._getContext=function(b,c){var a=b._observerContext;if(a)return a();if(c)return (b._observerContext=Sys.Observer._createContext())();return null};Sys.Observer._createContext=function(){var a={events:new Sys.EventHandlerList};return function(){return a}};Date._appendPreOrPostMatch=function(e,b){var d=0,a=false;for(var c=0,g=e.length;c<g;c++){var f=e.charAt(c);switch(f){case \"'\":if(a)b.append(\"'\");else d++;a=false;break;case \"\\\\\":if(a)b.append(\"\\\\\");a=!a;break;default:b.append(f);a=false}}return d};Date._expandFormat=function(a,b){if(!b)b=\"F\";var c=b.length;if(c===1)switch(b){case \"d\":return a.ShortDatePattern;case \"D\":return a.LongDatePattern;case \"t\":return a.ShortTimePattern;case \"T\":return a.LongTimePattern;case \"f\":return a.LongDatePattern+\" \"+a.ShortTimePattern;case \"F\":return a.FullDateTimePattern;case \"M\":case \"m\":return a.MonthDayPattern;case \"s\":return a.SortableDateTimePattern;case \"Y\":case \"y\":return a.YearMonthPattern;default:throw Error.format(Sys.Res.formatInvalidString)}else if(c===2&&b.charAt(0)===\"%\")b=b.charAt(1);return b};Date._expandYear=function(c,a){var d=new Date,e=Date._getEra(d);if(a<100){var b=Date._getEraYear(d,c,e);a+=b-b%100;if(a>c.Calendar.TwoDigitYearMax)a-=100}return a};Date._getEra=function(e,c){if(!c)return 0;var b,d=e.getTime();for(var a=0,f=c.length;a<f;a+=4){b=c[a+2];if(b===null||d>=b)return a}return 0};Date._getEraYear=function(d,b,e,c){var a=d.getFullYear();if(!c&&b.eras)a-=b.eras[e+3];return a};Date._getParseRegExp=function(b,e){if(!b._parseRegExp)b._parseRegExp={};else if(b._parseRegExp[e])return b._parseRegExp[e];var c=Date._expandFormat(b,e);c=c.replace(/([\\^\\$\\.\\*\\+\\?\\|\\[\\]\\(\\)\\{\\}])/g,\"\\\\\\\\$1\");var a=new Sys.StringBuilder(\"^\"),j=[],f=0,i=0,h=Date._getTokenRegExp(),d;while((d=h.exec(c))!==null){var l=c.slice(f,d.index);f=h.lastIndex;i+=Date._appendPreOrPostMatch(l,a);if(i%2===1){a.append(d[0]);continue}switch(d[0]){case \"dddd\":case \"ddd\":case \"MMMM\":case \"MMM\":case \"gg\":case \"g\":a.append(\"(\\\\D+)\");break;case \"tt\":case \"t\":a.append(\"(\\\\D*)\");break;case \"yyyy\":a.append(\"(\\\\d{4})\");break;case \"fff\":a.append(\"(\\\\d{3})\");break;case \"ff\":a.append(\"(\\\\d{2})\");break;case \"f\":a.append(\"(\\\\d)\");break;case \"dd\":case \"d\":case \"MM\":case \"M\":case \"yy\":case \"y\":case \"HH\":case \"H\":case \"hh\":case \"h\":case \"mm\":case \"m\":case \"ss\":case \"s\":a.append(\"(\\\\d\\\\d?)\");break;case \"zzz\":a.append(\"([+-]?\\\\d\\\\d?:\\\\d{2})\");break;case \"zz\":case \"z\":a.append(\"([+-]?\\\\d\\\\d?)\");break;case \"/\":a.append(\"(\\\\\"+b.DateSeparator+\")\")}Array.add(j,d[0])}Date._appendPreOrPostMatch(c.slice(f),a);a.append(\"$\");var k=a.toString().replace(/\\s+/g,\"\\\\s+\"),g={\"regExp\":k,\"groups\":j};b._parseRegExp[e]=g;return g};Date._getTokenRegExp=function(){return /\\/|dddd|ddd|dd|d|MMMM|MMM|MM|M|yyyy|yy|y|hh|h|HH|H|mm|m|ss|s|tt|t|fff|ff|f|zzz|zz|z|gg|g/g};Date.parseLocale=function(a){return Date._parse(a,Sys.CultureInfo.CurrentCulture,arguments)};Date.parseInvariant=function(a){return Date._parse(a,Sys.CultureInfo.InvariantCulture,arguments)};Date._parse=function(h,d,i){var a,c,b,f,e,g=false;for(a=1,c=i.length;a<c;a++){f=i[a];if(f){g=true;b=Date._parseExact(h,f,d);if(b)return b}}if(!g){e=d._getDateTimeFormats();for(a=0,c=e.length;a<c;a++){b=Date._parseExact(h,e[a],d);if(b)return b}}return null};Date._parseExact=function(w,D,k){w=w.trim();var g=k.dateTimeFormat,A=Date._getParseRegExp(g,D),C=(new RegExp(A.regExp)).exec(w);if(C===null)return null;var B=A.groups,x=null,e=null,c=null,j=null,i=null,d=0,h,q=0,r=0,f=0,n=null,v=false;for(var t=0,E=B.length;t<E;t++){var a=C[t+1];if(a)switch(B[t]){case \"dd\":case \"d\":j=parseInt(a,10);if(j<1||j>31)return null;break;case \"MMMM\":c=k._getMonthIndex(a);if(c<0||c>11)return null;break;case \"MMM\":c=k._getAbbrMonthIndex(a);if(c<0||c>11)return null;break;case \"M\":case \"MM\":c=parseInt(a,10)-1;if(c<0||c>11)return null;break;case \"y\":case \"yy\":e=Date._expandYear(g,parseInt(a,10));if(e<0||e>9999)return null;break;case \"yyyy\":e=parseInt(a,10);if(e<0||e>9999)return null;break;case \"h\":case \"hh\":d=parseInt(a,10);if(d===12)d=0;if(d<0||d>11)return null;break;case \"H\":case \"HH\":d=parseInt(a,10);if(d<0||d>23)return null;break;case \"m\":case \"mm\":q=parseInt(a,10);if(q<0||q>59)return null;break;case \"s\":case \"ss\":r=parseInt(a,10);if(r<0||r>59)return null;break;case \"tt\":case \"t\":var z=a.toUpperCase();v=z===g.PMDesignator.toUpperCase();if(!v&&z!==g.AMDesignator.toUpperCase())return null;break;case \"f\":f=parseInt(a,10)*100;if(f<0||f>999)return null;break;case \"ff\":f=parseInt(a,10)*10;if(f<0||f>999)return null;break;case \"fff\":f=parseInt(a,10);if(f<0||f>999)return null;break;case \"dddd\":i=k._getDayIndex(a);if(i<0||i>6)return null;break;case \"ddd\":i=k._getAbbrDayIndex(a);if(i<0||i>6)return null;break;case \"zzz\":var u=a.split(/:/);if(u.length!==2)return null;h=parseInt(u[0],10);if(h<-12||h>13)return null;var o=parseInt(u[1],10);if(o<0||o>59)return null;n=h*60+(a.startsWith(\"-\")?-o:o);break;case \"z\":case \"zz\":h=parseInt(a,10);if(h<-12||h>13)return null;n=h*60;break;case \"g\":case \"gg\":var p=a;if(!p||!g.eras)return null;p=p.toLowerCase().trim();for(var s=0,F=g.eras.length;s<F;s+=4)if(p===g.eras[s+1].toLowerCase()){x=s;break}if(x===null)return null}}var b=new Date,l,m=g.Calendar.convert;if(m)l=m.fromGregorian(b);if(!m)l=[b.getFullYear(),b.getMonth(),b.getDate()];if(e===null)e=l[0];else if(g.eras)e+=g.eras[(x||0)+3];if(c===null)c=l[1];if(j===null)j=l[2];if(m){b=m.toGregorian(e,c,j);if(b===null)return null}else{b.setFullYear(e,c,j);if(b.getDate()!==j)return null;if(i!==null&&b.getDay()!==i)return null}if(v&&d<12)d+=12;b.setHours(d,q,r,f);if(n!==null){var y=b.getMinutes()-(n+b.getTimezoneOffset());b.setHours(b.getHours()+parseInt(y/60,10),y%60)}return b};Date.prototype.format=function(a){return this._toFormattedString(a,Sys.CultureInfo.InvariantCulture)};Date.prototype.localeFormat=function(a){return this._toFormattedString(a,Sys.CultureInfo.CurrentCulture)};Date.prototype._toFormattedString=function(e,j){var b=j.dateTimeFormat,n=b.Calendar.convert;if(!e||!e.length||e===\"i\")if(j&&j.name.length)if(n)return this._toFormattedString(b.FullDateTimePattern,j);else{var r=new Date(this.getTime()),x=Date._getEra(this,b.eras);r.setFullYear(Date._getEraYear(this,b,x));return r.toLocaleString()}else return this.toString();var l=b.eras,k=e===\"s\";e=Date._expandFormat(b,e);var a=new Sys.StringBuilder,c;function d(a){if(a<10)return \"0\"+a;return a.toString()}function m(a){if(a<10)return \"00\"+a;if(a<100)return \"0\"+a;return a.toString()}function v(a){if(a<10)return \"000\"+a;else if(a<100)return \"00\"+a;else if(a<1000)return \"0\"+a;return a.toString()}var h,p,t=/([^d]|^)(d|dd)([^d]|$)/g;function s(){if(h||p)return h;h=t.test(e);p=true;return h}var q=0,o=Date._getTokenRegExp(),f;if(!k&&n)f=n.fromGregorian(this);for(;true;){var w=o.lastIndex,i=o.exec(e),u=e.slice(w,i?i.index:e.length);q+=Date._appendPreOrPostMatch(u,a);if(!i)break;if(q%2===1){a.append(i[0]);continue}function g(a,b){if(f)return f[b];switch(b){case 0:return a.getFullYear();case 1:return a.getMonth();case 2:return a.getDate()}}switch(i[0]){case \"dddd\":a.append(b.DayNames[this.getDay()]);break;case \"ddd\":a.append(b.AbbreviatedDayNames[this.getDay()]);break;case \"dd\":h=true;a.append(d(g(this,2)));break;case \"d\":h=true;a.append(g(this,2));break;case \"MMMM\":a.append(b.MonthGenitiveNames&&s()?b.MonthGenitiveNames[g(this,1)]:b.MonthNames[g(this,1)]);break;case \"MMM\":a.append(b.AbbreviatedMonthGenitiveNames&&s()?b.AbbreviatedMonthGenitiveNames[g(this,1)]:b.AbbreviatedMonthNames[g(this,1)]);break;case \"MM\":a.append(d(g(this,1)+1));break;case \"M\":a.append(g(this,1)+1);break;case \"yyyy\":a.append(v(f?f[0]:Date._getEraYear(this,b,Date._getEra(this,l),k)));break;case \"yy\":a.append(d((f?f[0]:Date._getEraYear(this,b,Date._getEra(this,l),k))%100));break;case \"y\":a.append((f?f[0]:Date._getEraYear(this,b,Date._getEra(this,l),k))%100);break;case \"hh\":c=this.getHours()%12;if(c===0)c=12;a.append(d(c));break;case \"h\":c=this.getHours()%12;if(c===0)c=12;a.append(c);break;case \"HH\":a.append(d(this.getHours()));break;case \"H\":a.append(this.getHours());break;case \"mm\":a.append(d(this.getMinutes()));break;case \"m\":a.append(this.getMinutes());break;case \"ss\":a.append(d(this.getSeconds()));break;case \"s\":a.append(this.getSeconds());break;case \"tt\":a.append(this.getHours()<12?b.AMDesignator:b.PMDesignator);break;case \"t\":a.append((this.getHours()<12?b.AMDesignator:b.PMDesignator).charAt(0));break;case \"f\":a.append(m(this.getMilliseconds()).charAt(0));break;case \"ff\":a.append(m(this.getMilliseconds()).substr(0,2));break;case \"fff\":a.append(m(this.getMilliseconds()));break;case \"z\":c=this.getTimezoneOffset()/60;a.append((c<=0?\"+\":\"-\")+Math.floor(Math.abs(c)));break;case \"zz\":c=this.getTimezoneOffset()/60;a.append((c<=0?\"+\":\"-\")+d(Math.floor(Math.abs(c))));break;case \"zzz\":c=this.getTimezoneOffset()/60;a.append((c<=0?\"+\":\"-\")+d(Math.floor(Math.abs(c)))+\":\"+d(Math.abs(this.getTimezoneOffset()%60)));break;case \"g\":case \"gg\":if(b.eras)a.append(b.eras[Date._getEra(this,l)+1]);break;case \"/\":a.append(b.DateSeparator)}}return a.toString()};String.localeFormat=function(){return String._toFormattedString(true,arguments)};Number.parseLocale=function(a){return Number._parse(a,Sys.CultureInfo.CurrentCulture)};Number.parseInvariant=function(a){return Number._parse(a,Sys.CultureInfo.InvariantCulture)};Number._parse=function(b,o){b=b.trim();if(b.match(/^[+-]?infinity$/i))return parseFloat(b);if(b.match(/^0x[a-f0-9]+$/i))return parseInt(b);var a=o.numberFormat,g=Number._parseNumberNegativePattern(b,a,a.NumberNegativePattern),h=g[0],e=g[1];if(h===\"\"&&a.NumberNegativePattern!==1){g=Number._parseNumberNegativePattern(b,a,1);h=g[0];e=g[1]}if(h===\"\")h=\"+\";var j,d,f=e.indexOf(\"e\");if(f<0)f=e.indexOf(\"E\");if(f<0){d=e;j=null}else{d=e.substr(0,f);j=e.substr(f+1)}var c,k,m=d.indexOf(a.NumberDecimalSeparator);if(m<0){c=d;k=null}else{c=d.substr(0,m);k=d.substr(m+a.NumberDecimalSeparator.length)}c=c.split(a.NumberGroupSeparator).join(\"\");var n=a.NumberGroupSeparator.replace(/\\u00A0/g,\" \");if(a.NumberGroupSeparator!==n)c=c.split(n).join(\"\");var l=h+c;if(k!==null)l+=\".\"+k;if(j!==null){var i=Number._parseNumberNegativePattern(j,a,1);if(i[0]===\"\")i[0]=\"+\";l+=\"e\"+i[0]+i[1]}if(l.match(/^[+-]?\\d*\\.?\\d*(e[+-]?\\d+)?$/))return parseFloat(l);return Number.NaN};Number._parseNumberNegativePattern=function(a,d,e){var b=d.NegativeSign,c=d.PositiveSign;switch(e){case 4:b=\" \"+b;c=\" \"+c;case 3:if(a.endsWith(b))return [\"-\",a.substr(0,a.length-b.length)];else if(a.endsWith(c))return [\"+\",a.substr(0,a.length-c.length)];break;case 2:b+=\" \";c+=\" \";case 1:if(a.startsWith(b))return [\"-\",a.substr(b.length)];else if(a.startsWith(c))return [\"+\",a.substr(c.length)];break;case 0:if(a.startsWith(\"(\")&&a.endsWith(\")\"))return [\"-\",a.substr(1,a.length-2)]}return [\"\",a]};Number.prototype.format=function(a){return this._toFormattedString(a,Sys.CultureInfo.InvariantCulture)};Number.prototype.localeFormat=function(a){return this._toFormattedString(a,Sys.CultureInfo.CurrentCulture)};Number.prototype._toFormattedString=function(e,j){if(!e||e.length===0||e===\"i\")if(j&&j.name.length>0)return this.toLocaleString();else return this.toString();var o=[\"n %\",\"n%\",\"%n\"],n=[\"-n %\",\"-n%\",\"-%n\"],p=[\"(n)\",\"-n\",\"- n\",\"n-\",\"n -\"],m=[\"$n\",\"n$\",\"$ n\",\"n $\"],l=[\"($n)\",\"-$n\",\"$-n\",\"$n-\",\"(n$)\",\"-n$\",\"n-$\",\"n$-\",\"-n $\",\"-$ n\",\"n $-\",\"$ n-\",\"$ -n\",\"n- $\",\"($ n)\",\"(n $)\"];function g(a,c,d){for(var b=a.length;b<c;b++)a=d?\"0\"+a:a+\"0\";return a}function i(j,i,l,n,p){var h=l[0],k=1,o=Math.pow(10,i),m=Math.round(j*o)/o;if(!isFinite(m))m=j;j=m;var b=j.toString(),a=\"\",c,e=b.split(/e/i);b=e[0];c=e.length>1?parseInt(e[1]):0;e=b.split(\".\");b=e[0];a=e.length>1?e[1]:\"\";var q;if(c>0){a=g(a,c,false);b+=a.slice(0,c);a=a.substr(c)}else if(c<0){c=-c;b=g(b,c+1,true);a=b.slice(-c,b.length)+a;b=b.slice(0,-c)}if(i>0){if(a.length>i)a=a.slice(0,i);else a=g(a,i,false);a=p+a}else a=\"\";var d=b.length-1,f=\"\";while(d>=0){if(h===0||h>d)if(f.length>0)return b.slice(0,d+1)+n+f+a;else return b.slice(0,d+1)+a;if(f.length>0)f=b.slice(d-h+1,d+1)+n+f;else f=b.slice(d-h+1,d+1);d-=h;if(k<l.length){h=l[k];k++}}return b.slice(0,d+1)+n+f+a}var a=j.numberFormat,d=Math.abs(this);if(!e)e=\"D\";var b=-1;if(e.length>1)b=parseInt(e.slice(1),10);var c;switch(e.charAt(0)){case \"d\":case \"D\":c=\"n\";if(b!==-1)d=g(\"\"+d,b,true);if(this<0)d=-d;break;case \"c\":case \"C\":if(this<0)c=l[a.CurrencyNegativePattern];else c=m[a.CurrencyPositivePattern];if(b===-1)b=a.CurrencyDecimalDigits;d=i(Math.abs(this),b,a.CurrencyGroupSizes,a.CurrencyGroupSeparator,a.CurrencyDecimalSeparator);break;case \"n\":case \"N\":if(this<0)c=p[a.NumberNegativePattern];else c=\"n\";if(b===-1)b=a.NumberDecimalDigits;d=i(Math.abs(this),b,a.NumberGroupSizes,a.NumberGroupSeparator,a.NumberDecimalSeparator);break;case \"p\":case \"P\":if(this<0)c=n[a.PercentNegativePattern];else c=o[a.PercentPositivePattern];if(b===-1)b=a.PercentDecimalDigits;d=i(Math.abs(this)*100,b,a.PercentGroupSizes,a.PercentGroupSeparator,a.PercentDecimalSeparator);break;default:throw Error.format(Sys.Res.formatBadFormatSpecifier)}var k=/n|\\$|-|%/g,f=\"\";for(;true;){var q=k.lastIndex,h=k.exec(c);f+=c.slice(q,h?h.index:c.length);if(!h)break;switch(h[0]){case \"n\":f+=d;break;case \"$\":f+=a.CurrencySymbol;break;case \"-\":if(/[1-9]/.test(d))f+=a.NegativeSign;break;case \"%\":f+=a.PercentSymbol}}return f};Sys.CultureInfo=function(c,b,a){this.name=c;this.numberFormat=b;this.dateTimeFormat=a};Sys.CultureInfo.prototype={_getDateTimeFormats:function(){if(!this._dateTimeFormats){var a=this.dateTimeFormat;this._dateTimeFormats=[a.MonthDayPattern,a.YearMonthPattern,a.ShortDatePattern,a.ShortTimePattern,a.LongDatePattern,a.LongTimePattern,a.FullDateTimePattern,a.RFC1123Pattern,a.SortableDateTimePattern,a.UniversalSortableDateTimePattern]}return this._dateTimeFormats},_getIndex:function(c,d,e){var b=this._toUpper(c),a=Array.indexOf(d,b);if(a===-1)a=Array.indexOf(e,b);return a},_getMonthIndex:function(a){if(!this._upperMonths){this._upperMonths=this._toUpperArray(this.dateTimeFormat.MonthNames);this._upperMonthsGenitive=this._toUpperArray(this.dateTimeFormat.MonthGenitiveNames)}return this._getIndex(a,this._upperMonths,this._upperMonthsGenitive)},_getAbbrMonthIndex:function(a){if(!this._upperAbbrMonths){this._upperAbbrMonths=this._toUpperArray(this.dateTimeFormat.AbbreviatedMonthNames);this._upperAbbrMonthsGenitive=this._toUpperArray(this.dateTimeFormat.AbbreviatedMonthGenitiveNames)}return this._getIndex(a,this._upperAbbrMonths,this._upperAbbrMonthsGenitive)},_getDayIndex:function(a){if(!this._upperDays)this._upperDays=this._toUpperArray(this.dateTimeFormat.DayNames);return Array.indexOf(this._upperDays,this._toUpper(a))},_getAbbrDayIndex:function(a){if(!this._upperAbbrDays)this._upperAbbrDays=this._toUpperArray(this.dateTimeFormat.AbbreviatedDayNames);return Array.indexOf(this._upperAbbrDays,this._toUpper(a))},_toUpperArray:function(c){var b=[];for(var a=0,d=c.length;a<d;a++)b[a]=this._toUpper(c[a]);return b},_toUpper:function(a){return a.split(\"\\u00a0\").join(\" \").toUpperCase()}};Sys.CultureInfo.registerClass(\"Sys.CultureInfo\");Sys.CultureInfo._parse=function(a){var b=a.dateTimeFormat;if(b&&!b.eras)b.eras=a.eras;return new Sys.CultureInfo(a.name,a.numberFormat,b)};Sys.CultureInfo.InvariantCulture=Sys.CultureInfo._parse({\"name\":\"\",\"numberFormat\":{\"CurrencyDecimalDigits\":2,\"CurrencyDecimalSeparator\":\".\",\"IsReadOnly\":true,\"CurrencyGroupSizes\":[3],\"NumberGroupSizes\":[3],\"PercentGroupSizes\":[3],\"CurrencyGroupSeparator\":\",\",\"CurrencySymbol\":\"\\u00a4\",\"NaNSymbol\":\"NaN\",\"CurrencyNegativePattern\":0,\"NumberNegativePattern\":1,\"PercentPositivePattern\":0,\"PercentNegativePattern\":0,\"NegativeInfinitySymbol\":\"-Infinity\",\"NegativeSign\":\"-\",\"NumberDecimalDigits\":2,\"NumberDecimalSeparator\":\".\",\"NumberGroupSeparator\":\",\",\"CurrencyPositivePattern\":0,\"PositiveInfinitySymbol\":\"Infinity\",\"PositiveSign\":\"+\",\"PercentDecimalDigits\":2,\"PercentDecimalSeparator\":\".\",\"PercentGroupSeparator\":\",\",\"PercentSymbol\":\"%\",\"PerMilleSymbol\":\"\\u2030\",\"NativeDigits\":[\"0\",\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\"],\"DigitSubstitution\":1},\"dateTimeFormat\":{\"AMDesignator\":\"AM\",\"Calendar\":{\"MinSupportedDateTime\":\"@-62135568000000@\",\"MaxSupportedDateTime\":\"@253402300799999@\",\"AlgorithmType\":1,\"CalendarType\":1,\"Eras\":[1],\"TwoDigitYearMax\":2029,\"IsReadOnly\":true},\"DateSeparator\":\"/\",\"FirstDayOfWeek\":0,\"CalendarWeekRule\":0,\"FullDateTimePattern\":\"dddd, dd MMMM yyyy HH:mm:ss\",\"LongDatePattern\":\"dddd, dd MMMM yyyy\",\"LongTimePattern\":\"HH:mm:ss\",\"MonthDayPattern\":\"MMMM dd\",\"PMDesignator\":\"PM\",\"RFC1123Pattern\":\"ddd, dd MMM yyyy HH':'mm':'ss 'GMT'\",\"ShortDatePattern\":\"MM/dd/yyyy\",\"ShortTimePattern\":\"HH:mm\",\"SortableDateTimePattern\":\"yyyy'-'MM'-'dd'T'HH':'mm':'ss\",\"TimeSeparator\":\":\",\"UniversalSortableDateTimePattern\":\"yyyy'-'MM'-'dd HH':'mm':'ss'Z'\",\"YearMonthPattern\":\"yyyy MMMM\",\"AbbreviatedDayNames\":[\"Sun\",\"Mon\",\"Tue\",\"Wed\",\"Thu\",\"Fri\",\"Sat\"],\"ShortestDayNames\":[\"Su\",\"Mo\",\"Tu\",\"We\",\"Th\",\"Fr\",\"Sa\"],\"DayNames\":[\"Sunday\",\"Monday\",\"Tuesday\",\"Wednesday\",\"Thursday\",\"Friday\",\"Saturday\"],\"AbbreviatedMonthNames\":[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\",\"\"],\"MonthNames\":[\"January\",\"February\",\"March\",\"April\",\"May\",\"June\",\"July\",\"August\",\"September\",\"October\",\"November\",\"December\",\"\"],\"IsReadOnly\":true,\"NativeCalendarName\":\"Gregorian Calendar\",\"AbbreviatedMonthGenitiveNames\":[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\",\"\"],\"MonthGenitiveNames\":[\"January\",\"February\",\"March\",\"April\",\"May\",\"June\",\"July\",\"August\",\"September\",\"October\",\"November\",\"December\",\"\"]},\"eras\":[1,\"A.D.\",null,0]});if(typeof __cultureInfo===\"object\"){Sys.CultureInfo.CurrentCulture=Sys.CultureInfo._parse(__cultureInfo);delete __cultureInfo}else Sys.CultureInfo.CurrentCulture=Sys.CultureInfo._parse({\"name\":\"en-US\",\"numberFormat\":{\"CurrencyDecimalDigits\":2,\"CurrencyDecimalSeparator\":\".\",\"IsReadOnly\":false,\"CurrencyGroupSizes\":[3],\"NumberGroupSizes\":[3],\"PercentGroupSizes\":[3],\"CurrencyGroupSeparator\":\",\",\"CurrencySymbol\":\"$\",\"NaNSymbol\":\"NaN\",\"CurrencyNegativePattern\":0,\"NumberNegativePattern\":1,\"PercentPositivePattern\":0,\"PercentNegativePattern\":0,\"NegativeInfinitySymbol\":\"-Infinity\",\"NegativeSign\":\"-\",\"NumberDecimalDigits\":2,\"NumberDecimalSeparator\":\".\",\"NumberGroupSeparator\":\",\",\"CurrencyPositivePattern\":0,\"PositiveInfinitySymbol\":\"Infinity\",\"PositiveSign\":\"+\",\"PercentDecimalDigits\":2,\"PercentDecimalSeparator\":\".\",\"PercentGroupSeparator\":\",\",\"PercentSymbol\":\"%\",\"PerMilleSymbol\":\"\\u2030\",\"NativeDigits\":[\"0\",\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\"],\"DigitSubstitution\":1},\"dateTimeFormat\":{\"AMDesignator\":\"AM\",\"Calendar\":{\"MinSupportedDateTime\":\"@-62135568000000@\",\"MaxSupportedDateTime\":\"@253402300799999@\",\"AlgorithmType\":1,\"CalendarType\":1,\"Eras\":[1],\"TwoDigitYearMax\":2029,\"IsReadOnly\":false},\"DateSeparator\":\"/\",\"FirstDayOfWeek\":0,\"CalendarWeekRule\":0,\"FullDateTimePattern\":\"dddd, MMMM dd, yyyy h:mm:ss tt\",\"LongDatePattern\":\"dddd, MMMM dd, yyyy\",\"LongTimePattern\":\"h:mm:ss tt\",\"MonthDayPattern\":\"MMMM dd\",\"PMDesignator\":\"PM\",\"RFC1123Pattern\":\"ddd, dd MMM yyyy HH':'mm':'ss 'GMT'\",\"ShortDatePattern\":\"M/d/yyyy\",\"ShortTimePattern\":\"h:mm tt\",\"SortableDateTimePattern\":\"yyyy'-'MM'-'dd'T'HH':'mm':'ss\",\"TimeSeparator\":\":\",\"UniversalSortableDateTimePattern\":\"yyyy'-'MM'-'dd HH':'mm':'ss'Z'\",\"YearMonthPattern\":\"MMMM, yyyy\",\"AbbreviatedDayNames\":[\"Sun\",\"Mon\",\"Tue\",\"Wed\",\"Thu\",\"Fri\",\"Sat\"],\"ShortestDayNames\":[\"Su\",\"Mo\",\"Tu\",\"We\",\"Th\",\"Fr\",\"Sa\"],\"DayNames\":[\"Sunday\",\"Monday\",\"Tuesday\",\"Wednesday\",\"Thursday\",\"Friday\",\"Saturday\"],\"AbbreviatedMonthNames\":[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\",\"\"],\"MonthNames\":[\"January\",\"February\",\"March\",\"April\",\"May\",\"June\",\"July\",\"August\",\"September\",\"October\",\"November\",\"December\",\"\"],\"IsReadOnly\":false,\"NativeCalendarName\":\"Gregorian Calendar\",\"AbbreviatedMonthGenitiveNames\":[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\",\"\"],\"MonthGenitiveNames\":[\"January\",\"February\",\"March\",\"April\",\"May\",\"June\",\"July\",\"August\",\"September\",\"October\",\"November\",\"December\",\"\"]},\"eras\":[1,\"A.D.\",null,0]});Type.registerNamespace(\"Sys.Serialization\");Sys.Serialization.JavaScriptSerializer=function(){};Sys.Serialization.JavaScriptSerializer.registerClass(\"Sys.Serialization.JavaScriptSerializer\");Sys.Serialization.JavaScriptSerializer._charsToEscapeRegExs=[];Sys.Serialization.JavaScriptSerializer._charsToEscape=[];Sys.Serialization.JavaScriptSerializer._dateRegEx=new RegExp('(^|[^\\\\\\\\])\\\\\"\\\\\\\\/Date\\\\((-?[0-9]+)(?:[a-zA-Z]|(?:\\\\+|-)[0-9]{4})?\\\\)\\\\\\\\/\\\\\"',\"g\");Sys.Serialization.JavaScriptSerializer._escapeChars={};Sys.Serialization.JavaScriptSerializer._escapeRegEx=new RegExp('[\"\\\\\\\\\\\\x00-\\\\x1F]',\"i\");Sys.Serialization.JavaScriptSerializer._escapeRegExGlobal=new RegExp('[\"\\\\\\\\\\\\x00-\\\\x1F]',\"g\");Sys.Serialization.JavaScriptSerializer._jsonRegEx=new RegExp(\"[^,:{}\\\\[\\\\]0-9.\\\\-+Eaeflnr-u \\\\n\\\\r\\\\t]\",\"g\");Sys.Serialization.JavaScriptSerializer._jsonStringRegEx=new RegExp('\"(\\\\\\\\.|[^\"\\\\\\\\])*\"',\"g\");Sys.Serialization.JavaScriptSerializer._serverTypeFieldName=\"__type\";Sys.Serialization.JavaScriptSerializer._init=function(){var c=[\"\\\\u0000\",\"\\\\u0001\",\"\\\\u0002\",\"\\\\u0003\",\"\\\\u0004\",\"\\\\u0005\",\"\\\\u0006\",\"\\\\u0007\",\"\\\\b\",\"\\\\t\",\"\\\\n\",\"\\\\u000b\",\"\\\\f\",\"\\\\r\",\"\\\\u000e\",\"\\\\u000f\",\"\\\\u0010\",\"\\\\u0011\",\"\\\\u0012\",\"\\\\u0013\",\"\\\\u0014\",\"\\\\u0015\",\"\\\\u0016\",\"\\\\u0017\",\"\\\\u0018\",\"\\\\u0019\",\"\\\\u001a\",\"\\\\u001b\",\"\\\\u001c\",\"\\\\u001d\",\"\\\\u001e\",\"\\\\u001f\"];Sys.Serialization.JavaScriptSerializer._charsToEscape[0]=\"\\\\\";Sys.Serialization.JavaScriptSerializer._charsToEscapeRegExs[\"\\\\\"]=new RegExp(\"\\\\\\\\\",\"g\");Sys.Serialization.JavaScriptSerializer._escapeChars[\"\\\\\"]=\"\\\\\\\\\";Sys.Serialization.JavaScriptSerializer._charsToEscape[1]='\"';Sys.Serialization.JavaScriptSerializer._charsToEscapeRegExs['\"']=new RegExp('\"',\"g\");Sys.Serialization.JavaScriptSerializer._escapeChars['\"']='\\\\\"';for(var a=0;a<32;a++){var b=String.fromCharCode(a);Sys.Serialization.JavaScriptSerializer._charsToEscape[a+2]=b;Sys.Serialization.JavaScriptSerializer._charsToEscapeRegExs[b]=new RegExp(b,\"g\");Sys.Serialization.JavaScriptSerializer._escapeChars[b]=c[a]}};Sys.Serialization.JavaScriptSerializer._serializeBooleanWithBuilder=function(b,a){a.append(b.toString())};Sys.Serialization.JavaScriptSerializer._serializeNumberWithBuilder=function(a,b){if(isFinite(a))b.append(String(a));else throw Error.invalidOperation(Sys.Res.cannotSerializeNonFiniteNumbers)};Sys.Serialization.JavaScriptSerializer._serializeStringWithBuilder=function(a,c){c.append('\"');if(Sys.Serialization.JavaScriptSerializer._escapeRegEx.test(a)){if(Sys.Serialization.JavaScriptSerializer._charsToEscape.length===0)Sys.Serialization.JavaScriptSerializer._init();if(a.length<128)a=a.replace(Sys.Serialization.JavaScriptSerializer._escapeRegExGlobal,function(a){return Sys.Serialization.JavaScriptSerializer._escapeChars[a]});else for(var d=0;d<34;d++){var b=Sys.Serialization.JavaScriptSerializer._charsToEscape[d];if(a.indexOf(b)!==-1)if(Sys.Browser.agent===Sys.Browser.Opera||Sys.Browser.agent===Sys.Browser.FireFox)a=a.split(b).join(Sys.Serialization.JavaScriptSerializer._escapeChars[b]);else a=a.replace(Sys.Serialization.JavaScriptSerializer._charsToEscapeRegExs[b],Sys.Serialization.JavaScriptSerializer._escapeChars[b])}}c.append(a);c.append('\"')};Sys.Serialization.JavaScriptSerializer._serializeWithBuilder=function(b,a,i,g){var c;switch(typeof b){case \"object\":if(b)if(Number.isInstanceOfType(b))Sys.Serialization.JavaScriptSerializer._serializeNumberWithBuilder(b,a);else if(Boolean.isInstanceOfType(b))Sys.Serialization.JavaScriptSerializer._serializeBooleanWithBuilder(b,a);else if(String.isInstanceOfType(b))Sys.Serialization.JavaScriptSerializer._serializeStringWithBuilder(b,a);else if(Array.isInstanceOfType(b)){a.append(\"[\");for(c=0;c<b.length;++c){if(c>0)a.append(\",\");Sys.Serialization.JavaScriptSerializer._serializeWithBuilder(b[c],a,false,g)}a.append(\"]\")}else{if(Date.isInstanceOfType(b)){a.append('\"\\\\/Date(');a.append(b.getTime());a.append(')\\\\/\"');break}var d=[],f=0;for(var e in b){if(e.startsWith(\"$\"))continue;if(e===Sys.Serialization.JavaScriptSerializer._serverTypeFieldName&&f!==0){d[f++]=d[0];d[0]=e}else d[f++]=e}if(i)d.sort();a.append(\"{\");var j=false;for(c=0;c<f;c++){var h=b[d[c]];if(typeof h!==\"undefined\"&&typeof h!==\"function\"){if(j)a.append(\",\");else j=true;Sys.Serialization.JavaScriptSerializer._serializeWithBuilder(d[c],a,i,g);a.append(\":\");Sys.Serialization.JavaScriptSerializer._serializeWithBuilder(h,a,i,g)}}a.append(\"}\")}else a.append(\"null\");break;case \"number\":Sys.Serialization.JavaScriptSerializer._serializeNumberWithBuilder(b,a);break;case \"string\":Sys.Serialization.JavaScriptSerializer._serializeStringWithBuilder(b,a);break;case \"boolean\":Sys.Serialization.JavaScriptSerializer._serializeBooleanWithBuilder(b,a);break;default:a.append(\"null\")}};Sys.Serialization.JavaScriptSerializer.serialize=function(b){var a=new Sys.StringBuilder;Sys.Serialization.JavaScriptSerializer._serializeWithBuilder(b,a,false);return a.toString()};Sys.Serialization.JavaScriptSerializer.deserialize=function(data,secure){if(data.length===0)throw Error.argument(\"data\",Sys.Res.cannotDeserializeEmptyString);try{var exp=data.replace(Sys.Serialization.JavaScriptSerializer._dateRegEx,\"$1new Date($2)\");if(secure&&Sys.Serialization.JavaScriptSerializer._jsonRegEx.test(exp.replace(Sys.Serialization.JavaScriptSerializer._jsonStringRegEx,\"\")))throw null;return eval(\"(\"+exp+\")\")}catch(a){throw Error.argument(\"data\",Sys.Res.cannotDeserializeInvalidJson)}};Type.registerNamespace(\"Sys.UI\");Sys.EventHandlerList=function(){this._list={}};Sys.EventHandlerList.prototype={_addHandler:function(b,a){Array.add(this._getEvent(b,true),a)},addHandler:function(b,a){this._addHandler(b,a)},_removeHandler:function(c,b){var a=this._getEvent(c);if(!a)return;Array.remove(a,b)},removeHandler:function(b,a){this._removeHandler(b,a)},getHandler:function(b){var a=this._getEvent(b);if(!a||a.length===0)return null;a=Array.clone(a);return function(c,d){for(var b=0,e=a.length;b<e;b++)a[b](c,d)}},_getEvent:function(a,b){if(!this._list[a]){if(!b)return null;this._list[a]=[]}return this._list[a]}};Sys.EventHandlerList.registerClass(\"Sys.EventHandlerList\");Sys.CommandEventArgs=function(c,a,b){Sys.CommandEventArgs.initializeBase(this);this._commandName=c;this._commandArgument=a;this._commandSource=b};Sys.CommandEventArgs.prototype={_commandName:null,_commandArgument:null,_commandSource:null,get_commandName:function(){return this._commandName},get_commandArgument:function(){return this._commandArgument},get_commandSource:function(){return this._commandSource}};Sys.CommandEventArgs.registerClass(\"Sys.CommandEventArgs\",Sys.CancelEventArgs);Sys.INotifyPropertyChange=function(){};Sys.INotifyPropertyChange.prototype={};Sys.INotifyPropertyChange.registerInterface(\"Sys.INotifyPropertyChange\");Sys.PropertyChangedEventArgs=function(a){Sys.PropertyChangedEventArgs.initializeBase(this);this._propertyName=a};Sys.PropertyChangedEventArgs.prototype={get_propertyName:function(){return this._propertyName}};Sys.PropertyChangedEventArgs.registerClass(\"Sys.PropertyChangedEventArgs\",Sys.EventArgs);Sys.INotifyDisposing=function(){};Sys.INotifyDisposing.prototype={};Sys.INotifyDisposing.registerInterface(\"Sys.INotifyDisposing\");Sys.Component=function(){if(Sys.Application)Sys.Application.registerDisposableObject(this)};Sys.Component.prototype={_id:null,_initialized:false,_updating:false,get_events:function(){if(!this._events)this._events=new Sys.EventHandlerList;return this._events},get_id:function(){return this._id},set_id:function(a){this._id=a},get_isInitialized:function(){return this._initialized},get_isUpdating:function(){return this._updating},add_disposing:function(a){this.get_events().addHandler(\"disposing\",a)},remove_disposing:function(a){this.get_events().removeHandler(\"disposing\",a)},add_propertyChanged:function(a){this.get_events().addHandler(\"propertyChanged\",a)},remove_propertyChanged:function(a){this.get_events().removeHandler(\"propertyChanged\",a)},beginUpdate:function(){this._updating=true},dispose:function(){if(this._events){var a=this._events.getHandler(\"disposing\");if(a)a(this,Sys.EventArgs.Empty)}delete this._events;Sys.Application.unregisterDisposableObject(this);Sys.Application.removeComponent(this)},endUpdate:function(){this._updating=false;if(!this._initialized)this.initialize();this.updated()},initialize:function(){this._initialized=true},raisePropertyChanged:function(b){if(!this._events)return;var a=this._events.getHandler(\"propertyChanged\");if(a)a(this,new Sys.PropertyChangedEventArgs(b))},updated:function(){}};Sys.Component.registerClass(\"Sys.Component\",null,Sys.IDisposable,Sys.INotifyPropertyChange,Sys.INotifyDisposing);function Sys$Component$_setProperties(a,i){var d,j=Object.getType(a),e=j===Object||j===Sys.UI.DomElement,h=Sys.Component.isInstanceOfType(a)&&!a.get_isUpdating();if(h)a.beginUpdate();for(var c in i){var b=i[c],f=e?null:a[\"get_\"+c];if(e||typeof f!==\"function\"){var k=a[c];if(!b||typeof b!==\"object\"||e&&!k)a[c]=b;else Sys$Component$_setProperties(k,b)}else{var l=a[\"set_\"+c];if(typeof l===\"function\")l.apply(a,[b]);else if(b instanceof Array){d=f.apply(a);for(var g=0,m=d.length,n=b.length;g<n;g++,m++)d[m]=b[g]}else if(typeof b===\"object\"&&Object.getType(b)===Object){d=f.apply(a);Sys$Component$_setProperties(d,b)}}}if(h)a.endUpdate()}function Sys$Component$_setReferences(c,b){for(var a in b){var e=c[\"set_\"+a],d=$find(b[a]);e.apply(c,[d])}}var $create=Sys.Component.create=function(h,f,d,c,g){var a=g?new h(g):new h,b=Sys.Application,i=b.get_isCreatingComponents();a.beginUpdate();if(f)Sys$Component$_setProperties(a,f);if(d)for(var e in d)a[\"add_\"+e](d[e]);if(a.get_id())b.addComponent(a);if(i){b._createdComponents[b._createdComponents.length]=a;if(c)b._addComponentToSecondPass(a,c);else a.endUpdate()}else{if(c)Sys$Component$_setReferences(a,c);a.endUpdate()}return a};Sys.UI.MouseButton=function(){throw Error.notImplemented()};Sys.UI.MouseButton.prototype={leftButton:0,middleButton:1,rightButton:2};Sys.UI.MouseButton.registerEnum(\"Sys.UI.MouseButton\");Sys.UI.Key=function(){throw Error.notImplemented()};Sys.UI.Key.prototype={backspace:8,tab:9,enter:13,esc:27,space:32,pageUp:33,pageDown:34,end:35,home:36,left:37,up:38,right:39,down:40,del:127};Sys.UI.Key.registerEnum(\"Sys.UI.Key\");Sys.UI.Point=function(a,b){this.x=a;this.y=b};Sys.UI.Point.registerClass(\"Sys.UI.Point\");Sys.UI.Bounds=function(c,d,b,a){this.x=c;this.y=d;this.height=a;this.width=b};Sys.UI.Bounds.registerClass(\"Sys.UI.Bounds\");Sys.UI.DomEvent=function(e){var a=e,b=this.type=a.type.toLowerCase();this.rawEvent=a;this.altKey=a.altKey;if(typeof a.button!==\"undefined\")this.button=typeof a.which!==\"undefined\"?a.button:a.button===4?Sys.UI.MouseButton.middleButton:a.button===2?Sys.UI.MouseButton.rightButton:Sys.UI.MouseButton.leftButton;if(b===\"keypress\")this.charCode=a.charCode||a.keyCode;else if(a.keyCode&&a.keyCode===46)this.keyCode=127;else this.keyCode=a.keyCode;this.clientX=a.clientX;this.clientY=a.clientY;this.ctrlKey=a.ctrlKey;this.target=a.target?a.target:a.srcElement;if(!b.startsWith(\"key\"))if(typeof a.offsetX!==\"undefined\"&&typeof a.offsetY!==\"undefined\"){this.offsetX=a.offsetX;this.offsetY=a.offsetY}else if(this.target&&this.target.nodeType!==3&&typeof a.clientX===\"number\"){var c=Sys.UI.DomElement.getLocation(this.target),d=Sys.UI.DomElement._getWindow(this.target);this.offsetX=(d.pageXOffset||0)+a.clientX-c.x;this.offsetY=(d.pageYOffset||0)+a.clientY-c.y}this.screenX=a.screenX;this.screenY=a.screenY;this.shiftKey=a.shiftKey};Sys.UI.DomEvent.prototype={preventDefault:function(){if(this.rawEvent.preventDefault)this.rawEvent.preventDefault();else if(window.event)this.rawEvent.returnValue=false},stopPropagation:function(){if(this.rawEvent.stopPropagation)this.rawEvent.stopPropagation();else if(window.event)this.rawEvent.cancelBubble=true}};Sys.UI.DomEvent.registerClass(\"Sys.UI.DomEvent\");var $addHandler=Sys.UI.DomEvent.addHandler=function(a,d,e,g){if(!a._events)a._events={};var c=a._events[d];if(!c)a._events[d]=c=[];var b;if(a.addEventListener){b=function(b){return e.call(a,new Sys.UI.DomEvent(b))};a.addEventListener(d,b,false)}else if(a.attachEvent){b=function(){var b={};try{b=Sys.UI.DomElement._getWindow(a).event}catch(c){}return e.call(a,new Sys.UI.DomEvent(b))};a.attachEvent(\"on\"+d,b)}c[c.length]={handler:e,browserHandler:b,autoRemove:g};if(g){var f=a.dispose;if(f!==Sys.UI.DomEvent._disposeHandlers){a.dispose=Sys.UI.DomEvent._disposeHandlers;if(typeof f!==\"undefined\")a._chainDispose=f}}},$addHandlers=Sys.UI.DomEvent.addHandlers=function(f,d,c,e){for(var b in d){var a=d[b];if(c)a=Function.createDelegate(c,a);$addHandler(f,b,a,e||false)}},$clearHandlers=Sys.UI.DomEvent.clearHandlers=function(a){Sys.UI.DomEvent._clearHandlers(a,false)};Sys.UI.DomEvent._clearHandlers=function(a,g){if(a._events){var e=a._events;for(var b in e){var d=e[b];for(var c=d.length-1;c>=0;c--){var f=d[c];if(!g||f.autoRemove)$removeHandler(a,b,f.handler)}}a._events=null}};Sys.UI.DomEvent._disposeHandlers=function(){Sys.UI.DomEvent._clearHandlers(this,true);var b=this._chainDispose,a=typeof b;if(a!==\"undefined\"){this.dispose=b;this._chainDispose=null;if(a===\"function\")this.dispose()}};var $removeHandler=Sys.UI.DomEvent.removeHandler=function(b,a,c){Sys.UI.DomEvent._removeHandler(b,a,c)};Sys.UI.DomEvent._removeHandler=function(a,e,f){var d=null,c=a._events[e];for(var b=0,g=c.length;b<g;b++)if(c[b].handler===f){d=c[b].browserHandler;break}if(a.removeEventListener)a.removeEventListener(e,d,false);else if(a.detachEvent)a.detachEvent(\"on\"+e,d);c.splice(b,1)};Sys.UI.DomElement=function(){};Sys.UI.DomElement.registerClass(\"Sys.UI.DomElement\");Sys.UI.DomElement.addCssClass=function(a,b){if(!Sys.UI.DomElement.containsCssClass(a,b))if(a.className===\"\")a.className=b;else a.className+=\" \"+b};Sys.UI.DomElement.containsCssClass=function(b,a){return Array.contains(b.className.split(\" \"),a)};Sys.UI.DomElement.getBounds=function(a){var b=Sys.UI.DomElement.getLocation(a);return new Sys.UI.Bounds(b.x,b.y,a.offsetWidth||0,a.offsetHeight||0)};var $get=Sys.UI.DomElement.getElementById=function(f,e){if(!e)return document.getElementById(f);if(e.getElementById)return e.getElementById(f);var c=[],d=e.childNodes;for(var b=0;b<d.length;b++){var a=d[b];if(a.nodeType==1)c[c.length]=a}while(c.length){a=c.shift();if(a.id==f)return a;d=a.childNodes;for(b=0;b<d.length;b++){a=d[b];if(a.nodeType==1)c[c.length]=a}}return null};if(document.documentElement.getBoundingClientRect)Sys.UI.DomElement.getLocation=function(b){if(b.self||b.nodeType===9)return new Sys.UI.Point(0,0);var f=b.getBoundingClientRect();if(!f)return new Sys.UI.Point(0,0);var i=b.ownerDocument.documentElement,c=Math.floor(f.left+.5)+i.scrollLeft,d=Math.floor(f.top+.5)+i.scrollTop;if(Sys.Browser.agent===Sys.Browser.InternetExplorer){try{var h=b.ownerDocument.parentWindow.frameElement||null;if(h){var k=h.frameBorder===\"0\"||h.frameBorder===\"no\"?2:0;c+=k;d+=k}}catch(l){}if(Sys.Browser.version<=7){var a,j,g,e=document.createElement(\"div\");e.style.cssText=\"position:absolute !important;left:0px !important;right:0px !important;height:0px !important;width:1px !important;display:hidden !important\";try{j=document.body.childNodes[0];document.body.insertBefore(e,j);g=e.getBoundingClientRect();document.body.removeChild(e);a=g.right-g.left}catch(l){}if(a&&a!==1){c=Math.floor(c/a);d=Math.floor(d/a)}}if((document.documentMode||0)<8){c-=2;d-=2}}return new Sys.UI.Point(c,d)};else if(Sys.Browser.agent===Sys.Browser.Safari)Sys.UI.DomElement.getLocation=function(c){if(c.window&&c.window===c||c.nodeType===9)return new Sys.UI.Point(0,0);var d=0,e=0,a,j=null,g=null,b;for(a=c;a;j=a,(g=b,a=a.offsetParent)){b=Sys.UI.DomElement._getCurrentStyle(a);var f=a.tagName?a.tagName.toUpperCase():null;if((a.offsetLeft||a.offsetTop)&&(f!==\"BODY\"||(!g||g.position!==\"absolute\"))){d+=a.offsetLeft;e+=a.offsetTop}if(j&&Sys.Browser.version>=3){d+=parseInt(b.borderLeftWidth);e+=parseInt(b.borderTopWidth)}}b=Sys.UI.DomElement._getCurrentStyle(c);var h=b?b.position:null;if(!h||h!==\"absolute\")for(a=c.parentNode;a;a=a.parentNode){f=a.tagName?a.tagName.toUpperCase():null;if(f!==\"BODY\"&&f!==\"HTML\"&&(a.scrollLeft||a.scrollTop)){d-=a.scrollLeft||0;e-=a.scrollTop||0}b=Sys.UI.DomElement._getCurrentStyle(a);var i=b?b.position:null;if(i&&i===\"absolute\")break}return new Sys.UI.Point(d,e)};else Sys.UI.DomElement.getLocation=function(d){if(d.window&&d.window===d||d.nodeType===9)return new Sys.UI.Point(0,0);var e=0,f=0,a,i=null,g=null,b=null;for(a=d;a;i=a,(g=b,a=a.offsetParent)){var c=a.tagName?a.tagName.toUpperCase():null;b=Sys.UI.DomElement._getCurrentStyle(a);if((a.offsetLeft||a.offsetTop)&&!(c===\"BODY\"&&(!g||g.position!==\"absolute\"))){e+=a.offsetLeft;f+=a.offsetTop}if(i!==null&&b){if(c!==\"TABLE\"&&c!==\"TD\"&&c!==\"HTML\"){e+=parseInt(b.borderLeftWidth)||0;f+=parseInt(b.borderTopWidth)||0}if(c===\"TABLE\"&&(b.position===\"relative\"||b.position===\"absolute\")){e+=parseInt(b.marginLeft)||0;f+=parseInt(b.marginTop)||0}}}b=Sys.UI.DomElement._getCurrentStyle(d);var h=b?b.position:null;if(!h||h!==\"absolute\")for(a=d.parentNode;a;a=a.parentNode){c=a.tagName?a.tagName.toUpperCase():null;if(c!==\"BODY\"&&c!==\"HTML\"&&(a.scrollLeft||a.scrollTop)){e-=a.scrollLeft||0;f-=a.scrollTop||0;b=Sys.UI.DomElement._getCurrentStyle(a);if(b){e+=parseInt(b.borderLeftWidth)||0;f+=parseInt(b.borderTopWidth)||0}}}return new Sys.UI.Point(e,f)};Sys.UI.DomElement.isDomElement=function(a){return Sys._isDomElement(a)};Sys.UI.DomElement.removeCssClass=function(d,c){var a=\" \"+d.className+\" \",b=a.indexOf(\" \"+c+\" \");if(b>=0)d.className=(a.substr(0,b)+\" \"+a.substring(b+c.length+1,a.length)).trim()};Sys.UI.DomElement.resolveElement=function(b,c){var a=b;if(!a)return null;if(typeof a===\"string\")a=Sys.UI.DomElement.getElementById(a,c);return a};Sys.UI.DomElement.raiseBubbleEvent=function(c,d){var b=c;while(b){var a=b.control;if(a&&a.onBubbleEvent&&a.raiseBubbleEvent){Sys.UI.DomElement._raiseBubbleEventFromControl(a,c,d);return}b=b.parentNode}};Sys.UI.DomElement._raiseBubbleEventFromControl=function(a,b,c){if(!a.onBubbleEvent(b,c))a._raiseBubbleEvent(b,c)};Sys.UI.DomElement.setLocation=function(b,c,d){var a=b.style;a.position=\"absolute\";a.left=c+\"px\";a.top=d+\"px\"};Sys.UI.DomElement.toggleCssClass=function(b,a){if(Sys.UI.DomElement.containsCssClass(b,a))Sys.UI.DomElement.removeCssClass(b,a);else Sys.UI.DomElement.addCssClass(b,a)};Sys.UI.DomElement.getVisibilityMode=function(a){return a._visibilityMode===Sys.UI.VisibilityMode.hide?Sys.UI.VisibilityMode.hide:Sys.UI.VisibilityMode.collapse};Sys.UI.DomElement.setVisibilityMode=function(a,b){Sys.UI.DomElement._ensureOldDisplayMode(a);if(a._visibilityMode!==b){a._visibilityMode=b;if(Sys.UI.DomElement.getVisible(a)===false)if(a._visibilityMode===Sys.UI.VisibilityMode.hide)a.style.display=a._oldDisplayMode;else a.style.display=\"none\";a._visibilityMode=b}};Sys.UI.DomElement.getVisible=function(b){var a=b.currentStyle||Sys.UI.DomElement._getCurrentStyle(b);if(!a)return true;return a.visibility!==\"hidden\"&&a.display!==\"none\"};Sys.UI.DomElement.setVisible=function(a,b){if(b!==Sys.UI.DomElement.getVisible(a)){Sys.UI.DomElement._ensureOldDisplayMode(a);a.style.visibility=b?\"visible\":\"hidden\";if(b||a._visibilityMode===Sys.UI.VisibilityMode.hide)a.style.display=a._oldDisplayMode;else a.style.display=\"none\"}};Sys.UI.DomElement._ensureOldDisplayMode=function(a){if(!a._oldDisplayMode){var b=a.currentStyle||Sys.UI.DomElement._getCurrentStyle(a);a._oldDisplayMode=b?b.display:null;if(!a._oldDisplayMode||a._oldDisplayMode===\"none\")switch(a.tagName.toUpperCase()){case \"DIV\":case \"P\":case \"ADDRESS\":case \"BLOCKQUOTE\":case \"BODY\":case \"COL\":case \"COLGROUP\":case \"DD\":case \"DL\":case \"DT\":case \"FIELDSET\":case \"FORM\":case \"H1\":case \"H2\":case \"H3\":case \"H4\":case \"H5\":case \"H6\":case \"HR\":case \"IFRAME\":case \"LEGEND\":case \"OL\":case \"PRE\":case \"TABLE\":case \"TD\":case \"TH\":case \"TR\":case \"UL\":a._oldDisplayMode=\"block\";break;case \"LI\":a._oldDisplayMode=\"list-item\";break;default:a._oldDisplayMode=\"inline\"}}};Sys.UI.DomElement._getWindow=function(a){var b=a.ownerDocument||a.document||a;return b.defaultView||b.parentWindow};Sys.UI.DomElement._getCurrentStyle=function(a){if(a.nodeType===3)return null;var c=Sys.UI.DomElement._getWindow(a);if(a.documentElement)a=a.documentElement;var b=c&&a!==c&&c.getComputedStyle?c.getComputedStyle(a,null):a.currentStyle||a.style;if(!b&&Sys.Browser.agent===Sys.Browser.Safari&&a.style){var g=a.style.display,f=a.style.position;a.style.position=\"absolute\";a.style.display=\"block\";var e=c.getComputedStyle(a,null);a.style.display=g;a.style.position=f;b={};for(var d in e)b[d]=e[d];b.display=\"none\"}return b};Sys.IContainer=function(){};Sys.IContainer.prototype={};Sys.IContainer.registerInterface(\"Sys.IContainer\");Sys.ApplicationLoadEventArgs=function(b,a){Sys.ApplicationLoadEventArgs.initializeBase(this);this._components=b;this._isPartialLoad=a};Sys.ApplicationLoadEventArgs.prototype={get_components:function(){return this._components},get_isPartialLoad:function(){return this._isPartialLoad}};Sys.ApplicationLoadEventArgs.registerClass(\"Sys.ApplicationLoadEventArgs\",Sys.EventArgs);Sys._Application=function(){Sys._Application.initializeBase(this);this._disposableObjects=[];this._components={};this._createdComponents=[];this._secondPassComponents=[];this._unloadHandlerDelegate=Function.createDelegate(this,this._unloadHandler);Sys.UI.DomEvent.addHandler(window,\"unload\",this._unloadHandlerDelegate);this._domReady()};Sys._Application.prototype={_creatingComponents:false,_disposing:false,_deleteCount:0,get_isCreatingComponents:function(){return this._creatingComponents},get_isDisposing:function(){return this._disposing},add_init:function(a){if(this._initialized)a(this,Sys.EventArgs.Empty);else this.get_events().addHandler(\"init\",a)},remove_init:function(a){this.get_events().removeHandler(\"init\",a)},add_load:function(a){this.get_events().addHandler(\"load\",a)},remove_load:function(a){this.get_events().removeHandler(\"load\",a)},add_unload:function(a){this.get_events().addHandler(\"unload\",a)},remove_unload:function(a){this.get_events().removeHandler(\"unload\",a)},addComponent:function(a){this._components[a.get_id()]=a},beginCreateComponents:function(){this._creatingComponents=true},dispose:function(){if(!this._disposing){this._disposing=true;if(this._timerCookie){window.clearTimeout(this._timerCookie);delete this._timerCookie}if(this._endRequestHandler){Sys.WebForms.PageRequestManager.getInstance().remove_endRequest(this._endRequestHandler);delete this._endRequestHandler}if(this._beginRequestHandler){Sys.WebForms.PageRequestManager.getInstance().remove_beginRequest(this._beginRequestHandler);delete this._beginRequestHandler}if(window.pageUnload)window.pageUnload(this,Sys.EventArgs.Empty);var c=this.get_events().getHandler(\"unload\");if(c)c(this,Sys.EventArgs.Empty);var b=Array.clone(this._disposableObjects);for(var a=0,f=b.length;a<f;a++){var d=b[a];if(typeof d!==\"undefined\")d.dispose()}Array.clear(this._disposableObjects);Sys.UI.DomEvent.removeHandler(window,\"unload\",this._unloadHandlerDelegate);if(Sys._ScriptLoader){var e=Sys._ScriptLoader.getInstance();if(e)e.dispose()}Sys._Application.callBaseMethod(this,\"dispose\")}},disposeElement:function(a,d){if(a.nodeType===1){var c=a.getElementsByTagName(\"*\");for(var b=c.length-1;b>=0;b--)this._disposeElementInternal(c[b]);if(!d)this._disposeElementInternal(a)}},endCreateComponents:function(){var b=this._secondPassComponents;for(var a=0,d=b.length;a<d;a++){var c=b[a].component;Sys$Component$_setReferences(c,b[a].references);c.endUpdate()}this._secondPassComponents=[];this._creatingComponents=false},findComponent:function(b,a){return a?Sys.IContainer.isInstanceOfType(a)?a.findComponent(b):a[b]||null:Sys.Application._components[b]||null},getComponents:function(){var a=[],b=this._components;for(var c in b)a[a.length]=b[c];return a},initialize:function(){if(!this.get_isInitialized()&&!this._disposing){Sys._Application.callBaseMethod(this,\"initialize\");this._raiseInit();if(this.get_stateString){if(Sys.WebForms&&Sys.WebForms.PageRequestManager){this._beginRequestHandler=Function.createDelegate(this,this._onPageRequestManagerBeginRequest);Sys.WebForms.PageRequestManager.getInstance().add_beginRequest(this._beginRequestHandler);this._endRequestHandler=Function.createDelegate(this,this._onPageRequestManagerEndRequest);Sys.WebForms.PageRequestManager.getInstance().add_endRequest(this._endRequestHandler)}var a=this.get_stateString();if(a!==this._currentEntry)this._navigate(a);else this._ensureHistory()}this.raiseLoad()}},notifyScriptLoaded:function(){},registerDisposableObject:function(b){if(!this._disposing){var a=this._disposableObjects,c=a.length;a[c]=b;b.__msdisposeindex=c}},raiseLoad:function(){var b=this.get_events().getHandler(\"load\"),a=new Sys.ApplicationLoadEventArgs(Array.clone(this._createdComponents),!!this._loaded);this._loaded=true;if(b)b(this,a);if(window.pageLoad)window.pageLoad(this,a);this._createdComponents=[]},removeComponent:function(b){var a=b.get_id();if(a)delete this._components[a]},unregisterDisposableObject:function(a){if(!this._disposing){var e=a.__msdisposeindex;if(typeof e===\"number\"){var b=this._disposableObjects;delete b[e];delete a.__msdisposeindex;if(++this._deleteCount>1000){var c=[];for(var d=0,f=b.length;d<f;d++){a=b[d];if(typeof a!==\"undefined\"){a.__msdisposeindex=c.length;c.push(a)}}this._disposableObjects=c;this._deleteCount=0}}}},_addComponentToSecondPass:function(b,a){this._secondPassComponents[this._secondPassComponents.length]={component:b,references:a}},_disposeComponents:function(a){if(a)for(var b=a.length-1;b>=0;b--){var c=a[b];if(typeof c.dispose===\"function\")c.dispose()}},_disposeElementInternal:function(a){var d=a.dispose;if(d&&typeof d===\"function\")a.dispose();else{var c=a.control;if(c&&typeof c.dispose===\"function\")c.dispose()}var b=a._behaviors;if(b)this._disposeComponents(b);b=a._components;if(b){this._disposeComponents(b);a._components=null}},_domReady:function(){var a,g,f=this;function b(){f.initialize()}var c=function(){Sys.UI.DomEvent.removeHandler(window,\"load\",c);b()};Sys.UI.DomEvent.addHandler(window,\"load\",c);if(document.addEventListener)try{document.addEventListener(\"DOMContentLoaded\",a=function(){document.removeEventListener(\"DOMContentLoaded\",a,false);b()},false)}catch(h){}else if(document.attachEvent)if(window==window.top&&document.documentElement.doScroll){var e,d=document.createElement(\"div\");a=function(){try{d.doScroll(\"left\")}catch(c){e=window.setTimeout(a,0);return}d=null;b()};a()}else document.attachEvent(\"onreadystatechange\",a=function(){if(document.readyState===\"complete\"){document.detachEvent(\"onreadystatechange\",a);b()}})},_raiseInit:function(){var a=this.get_events().getHandler(\"init\");if(a){this.beginCreateComponents();a(this,Sys.EventArgs.Empty);this.endCreateComponents()}},_unloadHandler:function(){this.dispose()}};Sys._Application.registerClass(\"Sys._Application\",Sys.Component,Sys.IContainer);Sys.Application=new Sys._Application;var $find=Sys.Application.findComponent;Sys.UI.Behavior=function(b){Sys.UI.Behavior.initializeBase(this);this._element=b;var a=b._behaviors;if(!a)b._behaviors=[this];else a[a.length]=this};Sys.UI.Behavior.prototype={_name:null,get_element:function(){return this._element},get_id:function(){var a=Sys.UI.Behavior.callBaseMethod(this,\"get_id\");if(a)return a;if(!this._element||!this._element.id)return \"\";return this._element.id+\"$\"+this.get_name()},get_name:function(){if(this._name)return this._name;var a=Object.getTypeName(this),b=a.lastIndexOf(\".\");if(b!==-1)a=a.substr(b+1);if(!this.get_isInitialized())this._name=a;return a},set_name:function(a){this._name=a},initialize:function(){Sys.UI.Behavior.callBaseMethod(this,\"initialize\");var a=this.get_name();if(a)this._element[a]=this},dispose:function(){Sys.UI.Behavior.callBaseMethod(this,\"dispose\");var a=this._element;if(a){var c=this.get_name();if(c)a[c]=null;var b=a._behaviors;Array.remove(b,this);if(b.length===0)a._behaviors=null;delete this._element}}};Sys.UI.Behavior.registerClass(\"Sys.UI.Behavior\",Sys.Component);Sys.UI.Behavior.getBehaviorByName=function(b,c){var a=b[c];return a&&Sys.UI.Behavior.isInstanceOfType(a)?a:null};Sys.UI.Behavior.getBehaviors=function(a){if(!a._behaviors)return [];return Array.clone(a._behaviors)};Sys.UI.Behavior.getBehaviorsByType=function(d,e){var a=d._behaviors,c=[];if(a)for(var b=0,f=a.length;b<f;b++)if(e.isInstanceOfType(a[b]))c[c.length]=a[b];return c};Sys.UI.VisibilityMode=function(){throw Error.notImplemented()};Sys.UI.VisibilityMode.prototype={hide:0,collapse:1};Sys.UI.VisibilityMode.registerEnum(\"Sys.UI.VisibilityMode\");Sys.UI.Control=function(a){Sys.UI.Control.initializeBase(this);this._element=a;a.control=this;var b=this.get_role();if(b)a.setAttribute(\"role\",b)};Sys.UI.Control.prototype={_parent:null,_visibilityMode:Sys.UI.VisibilityMode.hide,get_element:function(){return this._element},get_id:function(){if(!this._element)return \"\";return this._element.id},set_id:function(){throw Error.invalidOperation(Sys.Res.cantSetId)},get_parent:function(){if(this._parent)return this._parent;if(!this._element)return null;var a=this._element.parentNode;while(a){if(a.control)return a.control;a=a.parentNode}return null},set_parent:function(a){this._parent=a},get_role:function(){return null},get_visibilityMode:function(){return Sys.UI.DomElement.getVisibilityMode(this._element)},set_visibilityMode:function(a){Sys.UI.DomElement.setVisibilityMode(this._element,a)},get_visible:function(){return Sys.UI.DomElement.getVisible(this._element)},set_visible:function(a){Sys.UI.DomElement.setVisible(this._element,a)},addCssClass:function(a){Sys.UI.DomElement.addCssClass(this._element,a)},dispose:function(){Sys.UI.Control.callBaseMethod(this,\"dispose\");if(this._element){this._element.control=null;delete this._element}if(this._parent)delete this._parent},onBubbleEvent:function(){return false},raiseBubbleEvent:function(a,b){this._raiseBubbleEvent(a,b)},_raiseBubbleEvent:function(b,c){var a=this.get_parent();while(a){if(a.onBubbleEvent(b,c))return;a=a.get_parent()}},removeCssClass:function(a){Sys.UI.DomElement.removeCssClass(this._element,a)},toggleCssClass:function(a){Sys.UI.DomElement.toggleCssClass(this._element,a)}};Sys.UI.Control.registerClass(\"Sys.UI.Control\",Sys.Component);Sys.HistoryEventArgs=function(a){Sys.HistoryEventArgs.initializeBase(this);this._state=a};Sys.HistoryEventArgs.prototype={get_state:function(){return this._state}};Sys.HistoryEventArgs.registerClass(\"Sys.HistoryEventArgs\",Sys.EventArgs);Sys.Application._appLoadHandler=null;Sys.Application._beginRequestHandler=null;Sys.Application._clientId=null;Sys.Application._currentEntry=\"\";Sys.Application._endRequestHandler=null;Sys.Application._history=null;Sys.Application._enableHistory=false;Sys.Application._historyFrame=null;Sys.Application._historyInitialized=false;Sys.Application._historyPointIsNew=false;Sys.Application._ignoreTimer=false;Sys.Application._initialState=null;Sys.Application._state={};Sys.Application._timerCookie=0;Sys.Application._timerHandler=null;Sys.Application._uniqueId=null;Sys._Application.prototype.get_stateString=function(){var a=null;if(Sys.Browser.agent===Sys.Browser.Firefox){var c=window.location.href,b=c.indexOf(\"#\");if(b!==-1)a=c.substring(b+1);else a=\"\";return a}else a=window.location.hash;if(a.length>0&&a.charAt(0)===\"#\")a=a.substring(1);return a};Sys._Application.prototype.get_enableHistory=function(){return this._enableHistory};Sys._Application.prototype.set_enableHistory=function(a){this._enableHistory=a};Sys._Application.prototype.add_navigate=function(a){this.get_events().addHandler(\"navigate\",a)};Sys._Application.prototype.remove_navigate=function(a){this.get_events().removeHandler(\"navigate\",a)};Sys._Application.prototype.addHistoryPoint=function(c,f){this._ensureHistory();var b=this._state;for(var a in c){var d=c[a];if(d===null){if(typeof b[a]!==\"undefined\")delete b[a]}else b[a]=d}var e=this._serializeState(b);this._historyPointIsNew=true;this._setState(e,f);this._raiseNavigate()};Sys._Application.prototype.setServerId=function(a,b){this._clientId=a;this._uniqueId=b};Sys._Application.prototype.setServerState=function(a){this._ensureHistory();this._state.__s=a;this._updateHiddenField(a)};Sys._Application.prototype._deserializeState=function(a){var e={};a=a||\"\";var b=a.indexOf(\"&&\");if(b!==-1&&b+2<a.length){e.__s=a.substr(b+2);a=a.substr(0,b)}var g=a.split(\"&\");for(var f=0,j=g.length;f<j;f++){var d=g[f],c=d.indexOf(\"=\");if(c!==-1&&c+1<d.length){var i=d.substr(0,c),h=d.substr(c+1);e[i]=decodeURIComponent(h)}}return e};Sys._Application.prototype._enableHistoryInScriptManager=function(){this._enableHistory=true};Sys._Application.prototype._ensureHistory=function(){if(!this._historyInitialized&&this._enableHistory){if(Sys.Browser.agent===Sys.Browser.InternetExplorer&&Sys.Browser.documentMode<8){this._historyFrame=document.getElementById(\"__historyFrame\");this._ignoreIFrame=true}this._timerHandler=Function.createDelegate(this,this._onIdle);this._timerCookie=window.setTimeout(this._timerHandler,100);try{this._initialState=this._deserializeState(this.get_stateString())}catch(a){}this._historyInitialized=true}};Sys._Application.prototype._navigate=function(c){this._ensureHistory();var b=this._deserializeState(c);if(this._uniqueId){var d=this._state.__s||\"\",a=b.__s||\"\";if(a!==d){this._updateHiddenField(a);__doPostBack(this._uniqueId,a);this._state=b;return}}this._setState(c);this._state=b;this._raiseNavigate()};Sys._Application.prototype._onIdle=function(){delete this._timerCookie;var a=this.get_stateString();if(a!==this._currentEntry){if(!this._ignoreTimer){this._historyPointIsNew=false;this._navigate(a)}}else this._ignoreTimer=false;this._timerCookie=window.setTimeout(this._timerHandler,100)};Sys._Application.prototype._onIFrameLoad=function(a){this._ensureHistory();if(!this._ignoreIFrame){this._historyPointIsNew=false;this._navigate(a)}this._ignoreIFrame=false};Sys._Application.prototype._onPageRequestManagerBeginRequest=function(){this._ignoreTimer=true};Sys._Application.prototype._onPageRequestManagerEndRequest=function(e,d){var b=d.get_dataItems()[this._clientId],a=document.getElementById(\"__EVENTTARGET\");if(a&&a.value===this._uniqueId)a.value=\"\";if(typeof b!==\"undefined\"){this.setServerState(b);this._historyPointIsNew=true}else this._ignoreTimer=false;var c=this._serializeState(this._state);if(c!==this._currentEntry){this._ignoreTimer=true;this._setState(c);this._raiseNavigate()}};Sys._Application.prototype._raiseNavigate=function(){var c=this.get_events().getHandler(\"navigate\"),b={};for(var a in this._state)if(a!==\"__s\")b[a]=this._state[a];var d=new Sys.HistoryEventArgs(b);if(c)c(this,d);var e;try{if(Sys.Browser.agent===Sys.Browser.Firefox&&window.location.hash&&(!window.frameElement||window.top.location.hash))window.history.go(0)}catch(f){}};Sys._Application.prototype._serializeState=function(d){var b=[];for(var a in d){var e=d[a];if(a===\"__s\")var c=e;else b[b.length]=a+\"=\"+encodeURIComponent(e)}return b.join(\"&\")+(c?\"&&\"+c:\"\")};Sys._Application.prototype._setState=function(a,b){if(this._enableHistory){a=a||\"\";if(a!==this._currentEntry){if(window.theForm){var d=window.theForm.action,e=d.indexOf(\"#\");window.theForm.action=(e!==-1?d.substring(0,e):d)+\"#\"+a}if(this._historyFrame&&this._historyPointIsNew){this._ignoreIFrame=true;var c=this._historyFrame.contentWindow.document;c.open(\"javascript:'<html></html>'\");c.write(\"<html><head><title>\"+(b||document.title)+\"</title><scri\"+'pt type=\"text/javascript\">parent.Sys.Application._onIFrameLoad('+Sys.Serialization.JavaScriptSerializer.serialize(a)+\");</scri\"+\"pt></head><body></body></html>\");c.close()}this._ignoreTimer=false;this._currentEntry=a;if(this._historyFrame||this._historyPointIsNew){var f=this.get_stateString();if(a!==f){window.location.hash=a;this._currentEntry=this.get_stateString();if(typeof b!==\"undefined\"&&b!==null)document.title=b}}this._historyPointIsNew=false}}};Sys._Application.prototype._updateHiddenField=function(b){if(this._clientId){var a=document.getElementById(this._clientId);if(a)a.value=b}};if(!window.XMLHttpRequest)window.XMLHttpRequest=function(){var b=[\"Msxml2.XMLHTTP.3.0\",\"Msxml2.XMLHTTP\"];for(var a=0,c=b.length;a<c;a++)try{return new ActiveXObject(b[a])}catch(d){}return null};Type.registerNamespace(\"Sys.Net\");Sys.Net.WebRequestExecutor=function(){this._webRequest=null;this._resultObject=null};Sys.Net.WebRequestExecutor.prototype={get_webRequest:function(){return this._webRequest},_set_webRequest:function(a){this._webRequest=a},get_started:function(){throw Error.notImplemented()},get_responseAvailable:function(){throw Error.notImplemented()},get_timedOut:function(){throw Error.notImplemented()},get_aborted:function(){throw Error.notImplemented()},get_responseData:function(){throw Error.notImplemented()},get_statusCode:function(){throw Error.notImplemented()},get_statusText:function(){throw Error.notImplemented()},get_xml:function(){throw Error.notImplemented()},get_object:function(){if(!this._resultObject)this._resultObject=Sys.Serialization.JavaScriptSerializer.deserialize(this.get_responseData());return this._resultObject},executeRequest:function(){throw Error.notImplemented()},abort:function(){throw Error.notImplemented()},getResponseHeader:function(){throw Error.notImplemented()},getAllResponseHeaders:function(){throw Error.notImplemented()}};Sys.Net.WebRequestExecutor.registerClass(\"Sys.Net.WebRequestExecutor\");Sys.Net.XMLDOM=function(d){if(!window.DOMParser){var c=[\"Msxml2.DOMDocument.3.0\",\"Msxml2.DOMDocument\"];for(var b=0,f=c.length;b<f;b++)try{var a=new ActiveXObject(c[b]);a.async=false;a.loadXML(d);a.setProperty(\"SelectionLanguage\",\"XPath\");return a}catch(g){}}else try{var e=new window.DOMParser;return e.parseFromString(d,\"text/xml\")}catch(g){}return null};Sys.Net.XMLHttpExecutor=function(){Sys.Net.XMLHttpExecutor.initializeBase(this);var a=this;this._xmlHttpRequest=null;this._webRequest=null;this._responseAvailable=false;this._timedOut=false;this._timer=null;this._aborted=false;this._started=false;this._onReadyStateChange=function(){if(a._xmlHttpRequest.readyState===4){try{if(typeof a._xmlHttpRequest.status===\"undefined\")return}catch(b){return}a._clearTimer();a._responseAvailable=true;try{a._webRequest.completed(Sys.EventArgs.Empty)}finally{if(a._xmlHttpRequest!=null){a._xmlHttpRequest.onreadystatechange=Function.emptyMethod;a._xmlHttpRequest=null}}}};this._clearTimer=function(){if(a._timer!=null){window.clearTimeout(a._timer);a._timer=null}};this._onTimeout=function(){if(!a._responseAvailable){a._clearTimer();a._timedOut=true;a._xmlHttpRequest.onreadystatechange=Function.emptyMethod;a._xmlHttpRequest.abort();a._webRequest.completed(Sys.EventArgs.Empty);a._xmlHttpRequest=null}}};Sys.Net.XMLHttpExecutor.prototype={get_timedOut:function(){return this._timedOut},get_started:function(){return this._started},get_responseAvailable:function(){return this._responseAvailable},get_aborted:function(){return this._aborted},executeRequest:function(){this._webRequest=this.get_webRequest();var c=this._webRequest.get_body(),a=this._webRequest.get_headers();this._xmlHttpRequest=new XMLHttpRequest;this._xmlHttpRequest.onreadystatechange=this._onReadyStateChange;var e=this._webRequest.get_httpVerb();this._xmlHttpRequest.open(e,this._webRequest.getResolvedUrl(),true);this._xmlHttpRequest.setRequestHeader(\"X-Requested-With\",\"XMLHttpRequest\");if(a)for(var b in a){var f=a[b];if(typeof f!==\"function\")this._xmlHttpRequest.setRequestHeader(b,f)}if(e.toLowerCase()===\"post\"){if(a===null||!a[\"Content-Type\"])this._xmlHttpRequest.setRequestHeader(\"Content-Type\",\"application/x-www-form-urlencoded; charset=utf-8\");if(!c)c=\"\"}var d=this._webRequest.get_timeout();if(d>0)this._timer=window.setTimeout(Function.createDelegate(this,this._onTimeout),d);this._xmlHttpRequest.send(c);this._started=true},getResponseHeader:function(b){var a;try{a=this._xmlHttpRequest.getResponseHeader(b)}catch(c){}if(!a)a=\"\";return a},getAllResponseHeaders:function(){return this._xmlHttpRequest.getAllResponseHeaders()},get_responseData:function(){return this._xmlHttpRequest.responseText},get_statusCode:function(){var a=0;try{a=this._xmlHttpRequest.status}catch(b){}return a},get_statusText:function(){return this._xmlHttpRequest.statusText},get_xml:function(){var a=this._xmlHttpRequest.responseXML;if(!a||!a.documentElement){a=Sys.Net.XMLDOM(this._xmlHttpRequest.responseText);if(!a||!a.documentElement)return null}else if(navigator.userAgent.indexOf(\"MSIE\")!==-1)a.setProperty(\"SelectionLanguage\",\"XPath\");if(a.documentElement.namespaceURI===\"http://www.mozilla.org/newlayout/xml/parsererror.xml\"&&a.documentElement.tagName===\"parsererror\")return null;if(a.documentElement.firstChild&&a.documentElement.firstChild.tagName===\"parsererror\")return null;return a},abort:function(){if(this._aborted||this._responseAvailable||this._timedOut)return;this._aborted=true;this._clearTimer();if(this._xmlHttpRequest&&!this._responseAvailable){this._xmlHttpRequest.onreadystatechange=Function.emptyMethod;this._xmlHttpRequest.abort();this._xmlHttpRequest=null;this._webRequest.completed(Sys.EventArgs.Empty)}}};Sys.Net.XMLHttpExecutor.registerClass(\"Sys.Net.XMLHttpExecutor\",Sys.Net.WebRequestExecutor);Sys.Net._WebRequestManager=function(){this._defaultTimeout=0;this._defaultExecutorType=\"Sys.Net.XMLHttpExecutor\"};Sys.Net._WebRequestManager.prototype={add_invokingRequest:function(a){this._get_eventHandlerList().addHandler(\"invokingRequest\",a)},remove_invokingRequest:function(a){this._get_eventHandlerList().removeHandler(\"invokingRequest\",a)},add_completedRequest:function(a){this._get_eventHandlerList().addHandler(\"completedRequest\",a)},remove_completedRequest:function(a){this._get_eventHandlerList().removeHandler(\"completedRequest\",a)},_get_eventHandlerList:function(){if(!this._events)this._events=new Sys.EventHandlerList;return this._events},get_defaultTimeout:function(){return this._defaultTimeout},set_defaultTimeout:function(a){this._defaultTimeout=a},get_defaultExecutorType:function(){return this._defaultExecutorType},set_defaultExecutorType:function(a){this._defaultExecutorType=a},executeRequest:function(webRequest){var executor=webRequest.get_executor();if(!executor){var failed=false;try{var executorType=eval(this._defaultExecutorType);executor=new executorType}catch(a){failed=true}webRequest.set_executor(executor)}if(executor.get_aborted())return;var evArgs=new Sys.Net.NetworkRequestEventArgs(webRequest),handler=this._get_eventHandlerList().getHandler(\"invokingRequest\");if(handler)handler(this,evArgs);if(!evArgs.get_cancel())executor.executeRequest()}};Sys.Net._WebRequestManager.registerClass(\"Sys.Net._WebRequestManager\");Sys.Net.WebRequestManager=new Sys.Net._WebRequestManager;Sys.Net.NetworkRequestEventArgs=function(a){Sys.Net.NetworkRequestEventArgs.initializeBase(this);this._webRequest=a};Sys.Net.NetworkRequestEventArgs.prototype={get_webRequest:function(){return this._webRequest}};Sys.Net.NetworkRequestEventArgs.registerClass(\"Sys.Net.NetworkRequestEventArgs\",Sys.CancelEventArgs);Sys.Net.WebRequest=function(){this._url=\"\";this._headers={};this._body=null;this._userContext=null;this._httpVerb=null;this._executor=null;this._invokeCalled=false;this._timeout=0};Sys.Net.WebRequest.prototype={add_completed:function(a){this._get_eventHandlerList().addHandler(\"completed\",a)},remove_completed:function(a){this._get_eventHandlerList().removeHandler(\"completed\",a)},completed:function(b){var a=Sys.Net.WebRequestManager._get_eventHandlerList().getHandler(\"completedRequest\");if(a)a(this._executor,b);a=this._get_eventHandlerList().getHandler(\"completed\");if(a)a(this._executor,b)},_get_eventHandlerList:function(){if(!this._events)this._events=new Sys.EventHandlerList;return this._events},get_url:function(){return this._url},set_url:function(a){this._url=a},get_headers:function(){return this._headers},get_httpVerb:function(){if(this._httpVerb===null){if(this._body===null)return \"GET\";return \"POST\"}return this._httpVerb},set_httpVerb:function(a){this._httpVerb=a},get_body:function(){return this._body},set_body:function(a){this._body=a},get_userContext:function(){return this._userContext},set_userContext:function(a){this._userContext=a},get_executor:function(){return this._executor},set_executor:function(a){this._executor=a;this._executor._set_webRequest(this)},get_timeout:function(){if(this._timeout===0)return Sys.Net.WebRequestManager.get_defaultTimeout();return this._timeout},set_timeout:function(a){this._timeout=a},getResolvedUrl:function(){return Sys.Net.WebRequest._resolveUrl(this._url)},invoke:function(){Sys.Net.WebRequestManager.executeRequest(this);this._invokeCalled=true}};Sys.Net.WebRequest._resolveUrl=function(b,a){if(b&&b.indexOf(\"://\")!==-1)return b;if(!a||a.length===0){var d=document.getElementsByTagName(\"base\")[0];if(d&&d.href&&d.href.length>0)a=d.href;else a=document.URL}var c=a.indexOf(\"?\");if(c!==-1)a=a.substr(0,c);c=a.indexOf(\"#\");if(c!==-1)a=a.substr(0,c);a=a.substr(0,a.lastIndexOf(\"/\")+1);if(!b||b.length===0)return a;if(b.charAt(0)===\"/\"){var e=a.indexOf(\"://\"),g=a.indexOf(\"/\",e+3);return a.substr(0,g)+b}else{var f=a.lastIndexOf(\"/\");return a.substr(0,f+1)+b}};Sys.Net.WebRequest._createQueryString=function(c,b,f){b=b||encodeURIComponent;var h=0,e,g,d,a=new Sys.StringBuilder;if(c)for(d in c){e=c[d];if(typeof e===\"function\")continue;g=Sys.Serialization.JavaScriptSerializer.serialize(e);if(h++)a.append(\"&\");a.append(d);a.append(\"=\");a.append(b(g))}if(f){if(h)a.append(\"&\");a.append(f)}return a.toString()};Sys.Net.WebRequest._createUrl=function(a,b,c){if(!b&&!c)return a;var d=Sys.Net.WebRequest._createQueryString(b,null,c);return d.length?a+(a&&a.indexOf(\"?\")>=0?\"&\":\"?\")+d:a};Sys.Net.WebRequest.registerClass(\"Sys.Net.WebRequest\");Sys._ScriptLoaderTask=function(b,a){this._scriptElement=b;this._completedCallback=a};Sys._ScriptLoaderTask.prototype={get_scriptElement:function(){return this._scriptElement},dispose:function(){if(this._disposed)return;this._disposed=true;this._removeScriptElementHandlers();Sys._ScriptLoaderTask._clearScript(this._scriptElement);this._scriptElement=null},execute:function(){this._addScriptElementHandlers();document.getElementsByTagName(\"head\")[0].appendChild(this._scriptElement)},_addScriptElementHandlers:function(){this._scriptLoadDelegate=Function.createDelegate(this,this._scriptLoadHandler);if(Sys.Browser.agent!==Sys.Browser.InternetExplorer){this._scriptElement.readyState=\"loaded\";$addHandler(this._scriptElement,\"load\",this._scriptLoadDelegate)}else $addHandler(this._scriptElement,\"readystatechange\",this._scriptLoadDelegate);if(this._scriptElement.addEventListener){this._scriptErrorDelegate=Function.createDelegate(this,this._scriptErrorHandler);this._scriptElement.addEventListener(\"error\",this._scriptErrorDelegate,false)}},_removeScriptElementHandlers:function(){if(this._scriptLoadDelegate){var a=this.get_scriptElement();if(Sys.Browser.agent!==Sys.Browser.InternetExplorer)$removeHandler(a,\"load\",this._scriptLoadDelegate);else $removeHandler(a,\"readystatechange\",this._scriptLoadDelegate);if(this._scriptErrorDelegate){this._scriptElement.removeEventListener(\"error\",this._scriptErrorDelegate,false);this._scriptErrorDelegate=null}this._scriptLoadDelegate=null}},_scriptErrorHandler:function(){if(this._disposed)return;this._completedCallback(this.get_scriptElement(),false)},_scriptLoadHandler:function(){if(this._disposed)return;var a=this.get_scriptElement();if(a.readyState!==\"loaded\"&&a.readyState!==\"complete\")return;this._completedCallback(a,true)}};Sys._ScriptLoaderTask.registerClass(\"Sys._ScriptLoaderTask\",null,Sys.IDisposable);Sys._ScriptLoaderTask._clearScript=function(a){if(!Sys.Debug.isDebug)a.parentNode.removeChild(a)};Type.registerNamespace(\"Sys.Net\");Sys.Net.WebServiceProxy=function(){};Sys.Net.WebServiceProxy.prototype={get_timeout:function(){return this._timeout||0},set_timeout:function(a){if(a<0)throw Error.argumentOutOfRange(\"value\",a,Sys.Res.invalidTimeout);this._timeout=a},get_defaultUserContext:function(){return typeof this._userContext===\"undefined\"?null:this._userContext},set_defaultUserContext:function(a){this._userContext=a},get_defaultSucceededCallback:function(){return this._succeeded||null},set_defaultSucceededCallback:function(a){this._succeeded=a},get_defaultFailedCallback:function(){return this._failed||null},set_defaultFailedCallback:function(a){this._failed=a},get_enableJsonp:function(){return !!this._jsonp},set_enableJsonp:function(a){this._jsonp=a},get_path:function(){return this._path||null},set_path:function(a){this._path=a},get_jsonpCallbackParameter:function(){return this._callbackParameter||\"callback\"},set_jsonpCallbackParameter:function(a){this._callbackParameter=a},_invoke:function(d,e,g,f,c,b,a){c=c||this.get_defaultSucceededCallback();b=b||this.get_defaultFailedCallback();if(a===null||typeof a===\"undefined\")a=this.get_defaultUserContext();return Sys.Net.WebServiceProxy.invoke(d,e,g,f,c,b,a,this.get_timeout(),this.get_enableJsonp(),this.get_jsonpCallbackParameter())}};Sys.Net.WebServiceProxy.registerClass(\"Sys.Net.WebServiceProxy\");Sys.Net.WebServiceProxy.invoke=function(q,a,m,l,j,b,g,e,w,p){var i=w!==false?Sys.Net.WebServiceProxy._xdomain.exec(q):null,c,n=i&&i.length===3&&(i[1]!==location.protocol||i[2]!==location.host);m=n||m;if(n){p=p||\"callback\";c=\"_jsonp\"+Sys._jsonp++}if(!l)l={};var r=l;if(!m||!r)r={};var s,h,f=null,k,o=null,u=Sys.Net.WebRequest._createUrl(a?q+\"/\"+encodeURIComponent(a):q,r,n?p+\"=Sys.\"+c:null);if(n){s=document.createElement(\"script\");s.src=u;k=new Sys._ScriptLoaderTask(s,function(d,b){if(!b||c)t({Message:String.format(Sys.Res.webServiceFailedNoMsg,a)},-1)});function v(){if(f===null)return;f=null;h=new Sys.Net.WebServiceError(true,String.format(Sys.Res.webServiceTimedOut,a));k.dispose();delete Sys[c];if(b)b(h,g,a)}function t(d,e){if(f!==null){window.clearTimeout(f);f=null}k.dispose();delete Sys[c];c=null;if(typeof e!==\"undefined\"&&e!==200){if(b){h=new Sys.Net.WebServiceError(false,d.Message||String.format(Sys.Res.webServiceFailedNoMsg,a),d.StackTrace||null,d.ExceptionType||null,d);h._statusCode=e;b(h,g,a)}}else if(j)j(d,g,a)}Sys[c]=t;e=e||Sys.Net.WebRequestManager.get_defaultTimeout();if(e>0)f=window.setTimeout(v,e);k.execute();return null}var d=new Sys.Net.WebRequest;d.set_url(u);d.get_headers()[\"Content-Type\"]=\"application/json; charset=utf-8\";if(!m){o=Sys.Serialization.JavaScriptSerializer.serialize(l);if(o===\"{}\")o=\"\"}d.set_body(o);d.add_completed(x);if(e&&e>0)d.set_timeout(e);d.invoke();function x(d){if(d.get_responseAvailable()){var f=d.get_statusCode(),c=null;try{var e=d.getResponseHeader(\"Content-Type\");if(e.startsWith(\"application/json\"))c=d.get_object();else if(e.startsWith(\"text/xml\"))c=d.get_xml();else c=d.get_responseData()}catch(m){}var k=d.getResponseHeader(\"jsonerror\"),h=k===\"true\";if(h){if(c)c=new Sys.Net.WebServiceError(false,c.Message,c.StackTrace,c.ExceptionType,c)}else if(e.startsWith(\"application/json\"))c=!c||typeof c.d===\"undefined\"?c:c.d;if(f<200||f>=300||h){if(b){if(!c||!h)c=new Sys.Net.WebServiceError(false,String.format(Sys.Res.webServiceFailedNoMsg,a));c._statusCode=f;b(c,g,a)}}else if(j)j(c,g,a)}else{var i;if(d.get_timedOut())i=String.format(Sys.Res.webServiceTimedOut,a);else i=String.format(Sys.Res.webServiceFailedNoMsg,a);if(b)b(new Sys.Net.WebServiceError(d.get_timedOut(),i,\"\",\"\"),g,a)}}return d};Sys.Net.WebServiceProxy._generateTypedConstructor=function(a){return function(b){if(b)for(var c in b)this[c]=b[c];this.__type=a}};Sys._jsonp=0;Sys.Net.WebServiceProxy._xdomain=/^\\s*([a-zA-Z0-9\\+\\-\\.]+\\:)\\/\\/([^?#\\/]+)/;Sys.Net.WebServiceError=function(d,e,c,a,b){this._timedOut=d;this._message=e;this._stackTrace=c;this._exceptionType=a;this._errorObject=b;this._statusCode=-1};Sys.Net.WebServiceError.prototype={get_timedOut:function(){return this._timedOut},get_statusCode:function(){return this._statusCode},get_message:function(){return this._message},get_stackTrace:function(){return this._stackTrace||\"\"},get_exceptionType:function(){return this._exceptionType||\"\"},get_errorObject:function(){return this._errorObject||null}};Sys.Net.WebServiceError.registerClass(\"Sys.Net.WebServiceError\");\nType.registerNamespace('Sys');Sys.Res={'argumentInteger':'Value must be an integer.','invokeCalledTwice':'Cannot call invoke more than once.','webServiceFailed':'The server method \\'{0}\\' failed with the following error: {1}','argumentType':'Object cannot be converted to the required type.','argumentNull':'Value cannot be null.','scriptAlreadyLoaded':'The script \\'{0}\\' has been referenced multiple times. If referencing Microsoft AJAX scripts explicitly, set the MicrosoftAjaxMode property of the ScriptManager to Explicit.','scriptDependencyNotFound':'The script \\'{0}\\' failed to load because it is dependent on script \\'{1}\\'.','formatBadFormatSpecifier':'Format specifier was invalid.','requiredScriptReferenceNotIncluded':'\\'{0}\\' requires that you have included a script reference to \\'{1}\\'.','webServiceFailedNoMsg':'The server method \\'{0}\\' failed.','argumentDomElement':'Value must be a DOM element.','invalidExecutorType':'Could not create a valid Sys.Net.WebRequestExecutor from: {0}.','cannotCallBeforeResponse':'Cannot call {0} when responseAvailable is false.','actualValue':'Actual value was {0}.','enumInvalidValue':'\\'{0}\\' is not a valid value for enum {1}.','scriptLoadFailed':'The script \\'{0}\\' could not be loaded.','parameterCount':'Parameter count mismatch.','cannotDeserializeEmptyString':'Cannot deserialize empty string.','formatInvalidString':'Input string was not in a correct format.','invalidTimeout':'Value must be greater than or equal to zero.','cannotAbortBeforeStart':'Cannot abort when executor has not started.','argument':'Value does not fall within the expected range.','cannotDeserializeInvalidJson':'Cannot deserialize. The data does not correspond to valid JSON.','invalidHttpVerb':'httpVerb cannot be set to an empty or null string.','nullWebRequest':'Cannot call executeRequest with a null webRequest.','eventHandlerInvalid':'Handler was not added through the Sys.UI.DomEvent.addHandler method.','cannotSerializeNonFiniteNumbers':'Cannot serialize non finite numbers.','argumentUndefined':'Value cannot be undefined.','webServiceInvalidReturnType':'The server method \\'{0}\\' returned an invalid type. Expected type: {1}','servicePathNotSet':'The path to the web service has not been set.','argumentTypeWithTypes':'Object of type \\'{0}\\' cannot be converted to type \\'{1}\\'.','cannotCallOnceStarted':'Cannot call {0} once started.','badBaseUrl1':'Base URL does not contain ://.','badBaseUrl2':'Base URL does not contain another /.','badBaseUrl3':'Cannot find last / in base URL.','setExecutorAfterActive':'Cannot set executor after it has become active.','paramName':'Parameter name: {0}','nullReferenceInPath':'Null reference while evaluating data path: \\'{0}\\'.','cannotCallOutsideHandler':'Cannot call {0} outside of a completed event handler.','cannotSerializeObjectWithCycle':'Cannot serialize object with cyclic reference within child properties.','format':'One of the identified items was in an invalid format.','assertFailedCaller':'Assertion Failed: {0}\\r\\nat {1}','argumentOutOfRange':'Specified argument was out of the range of valid values.','webServiceTimedOut':'The server method \\'{0}\\' timed out.','notImplemented':'The method or operation is not implemented.','assertFailed':'Assertion Failed: {0}','invalidOperation':'Operation is not valid due to the current state of the object.','breakIntoDebugger':'{0}\\r\\n\\r\\nBreak into debugger?'};\n"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/DDDPPP.Chap20.CommandHandler.Presentation/Scripts/MicrosoftMvcAjax.debug.js",
    "content": "//!----------------------------------------------------------\n//! Copyright (C) Microsoft Corporation. All rights reserved.\n//!----------------------------------------------------------\n//! MicrosoftMvcAjax.js\n\nType.registerNamespace('Sys.Mvc');\n\n////////////////////////////////////////////////////////////////////////////////\n// Sys.Mvc.AjaxOptions\n\nSys.Mvc.$create_AjaxOptions = function Sys_Mvc_AjaxOptions() { return {}; }\n\n\n////////////////////////////////////////////////////////////////////////////////\n// Sys.Mvc.InsertionMode\n\nSys.Mvc.InsertionMode = function() { \n    /// <field name=\"replace\" type=\"Number\" integer=\"true\" static=\"true\">\n    /// </field>\n    /// <field name=\"insertBefore\" type=\"Number\" integer=\"true\" static=\"true\">\n    /// </field>\n    /// <field name=\"insertAfter\" type=\"Number\" integer=\"true\" static=\"true\">\n    /// </field>\n};\nSys.Mvc.InsertionMode.prototype = {\n    replace: 0, \n    insertBefore: 1, \n    insertAfter: 2\n}\nSys.Mvc.InsertionMode.registerEnum('Sys.Mvc.InsertionMode', false);\n\n\n////////////////////////////////////////////////////////////////////////////////\n// Sys.Mvc.AjaxContext\n\nSys.Mvc.AjaxContext = function Sys_Mvc_AjaxContext(request, updateTarget, loadingElement, insertionMode) {\n    /// <param name=\"request\" type=\"Sys.Net.WebRequest\">\n    /// </param>\n    /// <param name=\"updateTarget\" type=\"Object\" domElement=\"true\">\n    /// </param>\n    /// <param name=\"loadingElement\" type=\"Object\" domElement=\"true\">\n    /// </param>\n    /// <param name=\"insertionMode\" type=\"Sys.Mvc.InsertionMode\">\n    /// </param>\n    /// <field name=\"_insertionMode\" type=\"Sys.Mvc.InsertionMode\">\n    /// </field>\n    /// <field name=\"_loadingElement\" type=\"Object\" domElement=\"true\">\n    /// </field>\n    /// <field name=\"_response\" type=\"Sys.Net.WebRequestExecutor\">\n    /// </field>\n    /// <field name=\"_request\" type=\"Sys.Net.WebRequest\">\n    /// </field>\n    /// <field name=\"_updateTarget\" type=\"Object\" domElement=\"true\">\n    /// </field>\n    this._request = request;\n    this._updateTarget = updateTarget;\n    this._loadingElement = loadingElement;\n    this._insertionMode = insertionMode;\n}\nSys.Mvc.AjaxContext.prototype = {\n    _insertionMode: 0,\n    _loadingElement: null,\n    _response: null,\n    _request: null,\n    _updateTarget: null,\n    \n    get_data: function Sys_Mvc_AjaxContext$get_data() {\n        /// <value type=\"String\"></value>\n        if (this._response) {\n            return this._response.get_responseData();\n        }\n        else {\n            return null;\n        }\n    },\n    \n    get_insertionMode: function Sys_Mvc_AjaxContext$get_insertionMode() {\n        /// <value type=\"Sys.Mvc.InsertionMode\"></value>\n        return this._insertionMode;\n    },\n    \n    get_loadingElement: function Sys_Mvc_AjaxContext$get_loadingElement() {\n        /// <value type=\"Object\" domElement=\"true\"></value>\n        return this._loadingElement;\n    },\n    \n    get_object: function Sys_Mvc_AjaxContext$get_object() {\n        /// <value type=\"Object\"></value>\n        var executor = this.get_response();\n        return (executor) ? executor.get_object() : null;\n    },\n    \n    get_response: function Sys_Mvc_AjaxContext$get_response() {\n        /// <value type=\"Sys.Net.WebRequestExecutor\"></value>\n        return this._response;\n    },\n    set_response: function Sys_Mvc_AjaxContext$set_response(value) {\n        /// <value type=\"Sys.Net.WebRequestExecutor\"></value>\n        this._response = value;\n        return value;\n    },\n    \n    get_request: function Sys_Mvc_AjaxContext$get_request() {\n        /// <value type=\"Sys.Net.WebRequest\"></value>\n        return this._request;\n    },\n    \n    get_updateTarget: function Sys_Mvc_AjaxContext$get_updateTarget() {\n        /// <value type=\"Object\" domElement=\"true\"></value>\n        return this._updateTarget;\n    }\n}\n\n\n////////////////////////////////////////////////////////////////////////////////\n// Sys.Mvc.AsyncHyperlink\n\nSys.Mvc.AsyncHyperlink = function Sys_Mvc_AsyncHyperlink() {\n}\nSys.Mvc.AsyncHyperlink.handleClick = function Sys_Mvc_AsyncHyperlink$handleClick(anchor, evt, ajaxOptions) {\n    /// <param name=\"anchor\" type=\"Object\" domElement=\"true\">\n    /// </param>\n    /// <param name=\"evt\" type=\"Sys.UI.DomEvent\">\n    /// </param>\n    /// <param name=\"ajaxOptions\" type=\"Sys.Mvc.AjaxOptions\">\n    /// </param>\n    evt.preventDefault();\n    Sys.Mvc.MvcHelpers._asyncRequest(anchor.href, 'post', '', anchor, ajaxOptions);\n}\n\n\n////////////////////////////////////////////////////////////////////////////////\n// Sys.Mvc.MvcHelpers\n\nSys.Mvc.MvcHelpers = function Sys_Mvc_MvcHelpers() {\n}\nSys.Mvc.MvcHelpers._serializeSubmitButton = function Sys_Mvc_MvcHelpers$_serializeSubmitButton(element, offsetX, offsetY) {\n    /// <param name=\"element\" type=\"Object\" domElement=\"true\">\n    /// </param>\n    /// <param name=\"offsetX\" type=\"Number\" integer=\"true\">\n    /// </param>\n    /// <param name=\"offsetY\" type=\"Number\" integer=\"true\">\n    /// </param>\n    /// <returns type=\"String\"></returns>\n    if (element.disabled) {\n        return null;\n    }\n    var name = element.name;\n    if (name) {\n        var tagName = element.tagName.toUpperCase();\n        var encodedName = encodeURIComponent(name);\n        var inputElement = element;\n        if (tagName === 'INPUT') {\n            var type = inputElement.type;\n            if (type === 'submit') {\n                return encodedName + '=' + encodeURIComponent(inputElement.value);\n            }\n            else if (type === 'image') {\n                return encodedName + '.x=' + offsetX + '&' + encodedName + '.y=' + offsetY;\n            }\n        }\n        else if ((tagName === 'BUTTON') && (name.length) && (inputElement.type === 'submit')) {\n            return encodedName + '=' + encodeURIComponent(inputElement.value);\n        }\n    }\n    return null;\n}\nSys.Mvc.MvcHelpers._serializeForm = function Sys_Mvc_MvcHelpers$_serializeForm(form) {\n    /// <param name=\"form\" type=\"Object\" domElement=\"true\">\n    /// </param>\n    /// <returns type=\"String\"></returns>\n    var formElements = form.elements;\n    var formBody = new Sys.StringBuilder();\n    var count = formElements.length;\n    for (var i = 0; i < count; i++) {\n        var element = formElements[i];\n        var name = element.name;\n        if (!name || !name.length) {\n            continue;\n        }\n        var tagName = element.tagName.toUpperCase();\n        if (tagName === 'INPUT') {\n            var inputElement = element;\n            var type = inputElement.type;\n            if ((type === 'text') || (type === 'password') || (type === 'hidden') || (((type === 'checkbox') || (type === 'radio')) && element.checked)) {\n                formBody.append(encodeURIComponent(name));\n                formBody.append('=');\n                formBody.append(encodeURIComponent(inputElement.value));\n                formBody.append('&');\n            }\n        }\n        else if (tagName === 'SELECT') {\n            var selectElement = element;\n            var optionCount = selectElement.options.length;\n            for (var j = 0; j < optionCount; j++) {\n                var optionElement = selectElement.options[j];\n                if (optionElement.selected) {\n                    formBody.append(encodeURIComponent(name));\n                    formBody.append('=');\n                    formBody.append(encodeURIComponent(optionElement.value));\n                    formBody.append('&');\n                }\n            }\n        }\n        else if (tagName === 'TEXTAREA') {\n            formBody.append(encodeURIComponent(name));\n            formBody.append('=');\n            formBody.append(encodeURIComponent((element.value)));\n            formBody.append('&');\n        }\n    }\n    var additionalInput = form._additionalInput;\n    if (additionalInput) {\n        formBody.append(additionalInput);\n        formBody.append('&');\n    }\n    return formBody.toString();\n}\nSys.Mvc.MvcHelpers._asyncRequest = function Sys_Mvc_MvcHelpers$_asyncRequest(url, verb, body, triggerElement, ajaxOptions) {\n    /// <param name=\"url\" type=\"String\">\n    /// </param>\n    /// <param name=\"verb\" type=\"String\">\n    /// </param>\n    /// <param name=\"body\" type=\"String\">\n    /// </param>\n    /// <param name=\"triggerElement\" type=\"Object\" domElement=\"true\">\n    /// </param>\n    /// <param name=\"ajaxOptions\" type=\"Sys.Mvc.AjaxOptions\">\n    /// </param>\n    if (ajaxOptions.confirm) {\n        if (!confirm(ajaxOptions.confirm)) {\n            return;\n        }\n    }\n    if (ajaxOptions.url) {\n        url = ajaxOptions.url;\n    }\n    if (ajaxOptions.httpMethod) {\n        verb = ajaxOptions.httpMethod;\n    }\n    if (body.length > 0 && !body.endsWith('&')) {\n        body += '&';\n    }\n    body += 'X-Requested-With=XMLHttpRequest';\n    var upperCaseVerb = verb.toUpperCase();\n    var isGetOrPost = (upperCaseVerb === 'GET' || upperCaseVerb === 'POST');\n    if (!isGetOrPost) {\n        body += '&';\n        body += 'X-HTTP-Method-Override=' + upperCaseVerb;\n    }\n    var requestBody = '';\n    if (upperCaseVerb === 'GET' || upperCaseVerb === 'DELETE') {\n        if (url.indexOf('?') > -1) {\n            if (!url.endsWith('&')) {\n                url += '&';\n            }\n            url += body;\n        }\n        else {\n            url += '?';\n            url += body;\n        }\n    }\n    else {\n        requestBody = body;\n    }\n    var request = new Sys.Net.WebRequest();\n    request.set_url(url);\n    if (isGetOrPost) {\n        request.set_httpVerb(verb);\n    }\n    else {\n        request.set_httpVerb('POST');\n        request.get_headers()['X-HTTP-Method-Override'] = upperCaseVerb;\n    }\n    request.set_body(requestBody);\n    if (verb.toUpperCase() === 'PUT') {\n        request.get_headers()['Content-Type'] = 'application/x-www-form-urlencoded;';\n    }\n    request.get_headers()['X-Requested-With'] = 'XMLHttpRequest';\n    var updateElement = null;\n    if (ajaxOptions.updateTargetId) {\n        updateElement = $get(ajaxOptions.updateTargetId);\n    }\n    var loadingElement = null;\n    if (ajaxOptions.loadingElementId) {\n        loadingElement = $get(ajaxOptions.loadingElementId);\n    }\n    var ajaxContext = new Sys.Mvc.AjaxContext(request, updateElement, loadingElement, ajaxOptions.insertionMode);\n    var continueRequest = true;\n    if (ajaxOptions.onBegin) {\n        continueRequest = ajaxOptions.onBegin(ajaxContext) !== false;\n    }\n    if (loadingElement) {\n        Sys.UI.DomElement.setVisible(ajaxContext.get_loadingElement(), true);\n    }\n    if (continueRequest) {\n        request.add_completed(Function.createDelegate(null, function(executor) {\n            Sys.Mvc.MvcHelpers._onComplete(request, ajaxOptions, ajaxContext);\n        }));\n        request.invoke();\n    }\n}\nSys.Mvc.MvcHelpers._onComplete = function Sys_Mvc_MvcHelpers$_onComplete(request, ajaxOptions, ajaxContext) {\n    /// <param name=\"request\" type=\"Sys.Net.WebRequest\">\n    /// </param>\n    /// <param name=\"ajaxOptions\" type=\"Sys.Mvc.AjaxOptions\">\n    /// </param>\n    /// <param name=\"ajaxContext\" type=\"Sys.Mvc.AjaxContext\">\n    /// </param>\n    ajaxContext.set_response(request.get_executor());\n    if (ajaxOptions.onComplete && ajaxOptions.onComplete(ajaxContext) === false) {\n        return;\n    }\n    var statusCode = ajaxContext.get_response().get_statusCode();\n    if ((statusCode >= 200 && statusCode < 300) || statusCode === 304 || statusCode === 1223) {\n        if (statusCode !== 204 && statusCode !== 304 && statusCode !== 1223) {\n            var contentType = ajaxContext.get_response().getResponseHeader('Content-Type');\n            if ((contentType) && (contentType.indexOf('application/x-javascript') !== -1)) {\n                eval(ajaxContext.get_data());\n            }\n            else {\n                Sys.Mvc.MvcHelpers.updateDomElement(ajaxContext.get_updateTarget(), ajaxContext.get_insertionMode(), ajaxContext.get_data());\n            }\n        }\n        if (ajaxOptions.onSuccess) {\n            ajaxOptions.onSuccess(ajaxContext);\n        }\n    }\n    else {\n        if (ajaxOptions.onFailure) {\n            ajaxOptions.onFailure(ajaxContext);\n        }\n    }\n    if (ajaxContext.get_loadingElement()) {\n        Sys.UI.DomElement.setVisible(ajaxContext.get_loadingElement(), false);\n    }\n}\nSys.Mvc.MvcHelpers.updateDomElement = function Sys_Mvc_MvcHelpers$updateDomElement(target, insertionMode, content) {\n    /// <param name=\"target\" type=\"Object\" domElement=\"true\">\n    /// </param>\n    /// <param name=\"insertionMode\" type=\"Sys.Mvc.InsertionMode\">\n    /// </param>\n    /// <param name=\"content\" type=\"String\">\n    /// </param>\n    if (target) {\n        switch (insertionMode) {\n            case Sys.Mvc.InsertionMode.replace:\n                target.innerHTML = content;\n                break;\n            case Sys.Mvc.InsertionMode.insertBefore:\n                if (content && content.length > 0) {\n                    target.innerHTML = content + target.innerHTML.trimStart();\n                }\n                break;\n            case Sys.Mvc.InsertionMode.insertAfter:\n                if (content && content.length > 0) {\n                    target.innerHTML = target.innerHTML.trimEnd() + content;\n                }\n                break;\n        }\n    }\n}\n\n\n////////////////////////////////////////////////////////////////////////////////\n// Sys.Mvc.AsyncForm\n\nSys.Mvc.AsyncForm = function Sys_Mvc_AsyncForm() {\n}\nSys.Mvc.AsyncForm.handleClick = function Sys_Mvc_AsyncForm$handleClick(form, evt) {\n    /// <param name=\"form\" type=\"Object\" domElement=\"true\">\n    /// </param>\n    /// <param name=\"evt\" type=\"Sys.UI.DomEvent\">\n    /// </param>\n    var additionalInput = Sys.Mvc.MvcHelpers._serializeSubmitButton(evt.target, evt.offsetX, evt.offsetY);\n    form._additionalInput = additionalInput;\n}\nSys.Mvc.AsyncForm.handleSubmit = function Sys_Mvc_AsyncForm$handleSubmit(form, evt, ajaxOptions) {\n    /// <param name=\"form\" type=\"Object\" domElement=\"true\">\n    /// </param>\n    /// <param name=\"evt\" type=\"Sys.UI.DomEvent\">\n    /// </param>\n    /// <param name=\"ajaxOptions\" type=\"Sys.Mvc.AjaxOptions\">\n    /// </param>\n    evt.preventDefault();\n    var validationCallbacks = form.validationCallbacks;\n    if (validationCallbacks) {\n        for (var i = 0; i < validationCallbacks.length; i++) {\n            var callback = validationCallbacks[i];\n            if (!callback()) {\n                return;\n            }\n        }\n    }\n    var body = Sys.Mvc.MvcHelpers._serializeForm(form);\n    Sys.Mvc.MvcHelpers._asyncRequest(form.action, form.method || 'post', body, form, ajaxOptions);\n}\n\n\nSys.Mvc.AjaxContext.registerClass('Sys.Mvc.AjaxContext');\nSys.Mvc.AsyncHyperlink.registerClass('Sys.Mvc.AsyncHyperlink');\nSys.Mvc.MvcHelpers.registerClass('Sys.Mvc.MvcHelpers');\nSys.Mvc.AsyncForm.registerClass('Sys.Mvc.AsyncForm');\n\n// ---- Do not remove this footer ----\n// Generated using Script# v0.5.0.0 (http://projects.nikhilk.net)\n// -----------------------------------\n"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/DDDPPP.Chap20.CommandHandler.Presentation/Scripts/MicrosoftMvcAjax.js",
    "content": "//----------------------------------------------------------\n// Copyright (C) Microsoft Corporation. All rights reserved.\n//----------------------------------------------------------\n// MicrosoftMvcAjax.js\n\nType.registerNamespace('Sys.Mvc');Sys.Mvc.$create_AjaxOptions=function(){return {};}\nSys.Mvc.InsertionMode=function(){};Sys.Mvc.InsertionMode.prototype = {replace:0,insertBefore:1,insertAfter:2}\nSys.Mvc.InsertionMode.registerEnum('Sys.Mvc.InsertionMode',false);Sys.Mvc.AjaxContext=function(request,updateTarget,loadingElement,insertionMode){this.$3=request;this.$4=updateTarget;this.$1=loadingElement;this.$0=insertionMode;}\nSys.Mvc.AjaxContext.prototype={$0:0,$1:null,$2:null,$3:null,$4:null,get_data:function(){if(this.$2){return this.$2.get_responseData();}else{return null;}},get_insertionMode:function(){return this.$0;},get_loadingElement:function(){return this.$1;},get_object:function(){var $0=this.get_response();return ($0)?$0.get_object():null;},get_response:function(){return this.$2;},set_response:function(value){this.$2=value;return value;},get_request:function(){return this.$3;},get_updateTarget:function(){return this.$4;}}\nSys.Mvc.AsyncHyperlink=function(){}\nSys.Mvc.AsyncHyperlink.handleClick=function(anchor,evt,ajaxOptions){evt.preventDefault();Sys.Mvc.MvcHelpers.$2(anchor.href,'post','',anchor,ajaxOptions);}\nSys.Mvc.MvcHelpers=function(){}\nSys.Mvc.MvcHelpers.$0=function($p0,$p1,$p2){if($p0.disabled){return null;}var $0=$p0.name;if($0){var $1=$p0.tagName.toUpperCase();var $2=encodeURIComponent($0);var $3=$p0;if($1==='INPUT'){var $4=$3.type;if($4==='submit'){return $2+'='+encodeURIComponent($3.value);}else if($4==='image'){return $2+'.x='+$p1+'&'+$2+'.y='+$p2;}}else if(($1==='BUTTON')&&($0.length)&&($3.type==='submit')){return $2+'='+encodeURIComponent($3.value);}}return null;}\nSys.Mvc.MvcHelpers.$1=function($p0){var $0=$p0.elements;var $1=new Sys.StringBuilder();var $2=$0.length;for(var $4=0;$4<$2;$4++){var $5=$0[$4];var $6=$5.name;if(!$6||!$6.length){continue;}var $7=$5.tagName.toUpperCase();if($7==='INPUT'){var $8=$5;var $9=$8.type;if(($9==='text')||($9==='password')||($9==='hidden')||((($9==='checkbox')||($9==='radio'))&&$5.checked)){$1.append(encodeURIComponent($6));$1.append('=');$1.append(encodeURIComponent($8.value));$1.append('&');}}else if($7==='SELECT'){var $A=$5;var $B=$A.options.length;for(var $C=0;$C<$B;$C++){var $D=$A.options[$C];if($D.selected){$1.append(encodeURIComponent($6));$1.append('=');$1.append(encodeURIComponent($D.value));$1.append('&');}}}else if($7==='TEXTAREA'){$1.append(encodeURIComponent($6));$1.append('=');$1.append(encodeURIComponent(($5.value)));$1.append('&');}}var $3=$p0._additionalInput;if($3){$1.append($3);$1.append('&');}return $1.toString();}\nSys.Mvc.MvcHelpers.$2=function($p0,$p1,$p2,$p3,$p4){if($p4.confirm){if(!confirm($p4.confirm)){return;}}if($p4.url){$p0=$p4.url;}if($p4.httpMethod){$p1=$p4.httpMethod;}if($p2.length>0&&!$p2.endsWith('&')){$p2+='&';}$p2+='X-Requested-With=XMLHttpRequest';var $0=$p1.toUpperCase();var $1=($0==='GET'||$0==='POST');if(!$1){$p2+='&';$p2+='X-HTTP-Method-Override='+$0;}var $2='';if($0==='GET'||$0==='DELETE'){if($p0.indexOf('?')>-1){if(!$p0.endsWith('&')){$p0+='&';}$p0+=$p2;}else{$p0+='?';$p0+=$p2;}}else{$2=$p2;}var $3=new Sys.Net.WebRequest();$3.set_url($p0);if($1){$3.set_httpVerb($p1);}else{$3.set_httpVerb('POST');$3.get_headers()['X-HTTP-Method-Override']=$0;}$3.set_body($2);if($p1.toUpperCase()==='PUT'){$3.get_headers()['Content-Type']='application/x-www-form-urlencoded;';}$3.get_headers()['X-Requested-With']='XMLHttpRequest';var $4=null;if($p4.updateTargetId){$4=$get($p4.updateTargetId);}var $5=null;if($p4.loadingElementId){$5=$get($p4.loadingElementId);}var $6=new Sys.Mvc.AjaxContext($3,$4,$5,$p4.insertionMode);var $7=true;if($p4.onBegin){$7=$p4.onBegin($6)!==false;}if($5){Sys.UI.DomElement.setVisible($6.get_loadingElement(),true);}if($7){$3.add_completed(Function.createDelegate(null,function($p1_0){\nSys.Mvc.MvcHelpers.$3($3,$p4,$6);}));$3.invoke();}}\nSys.Mvc.MvcHelpers.$3=function($p0,$p1,$p2){$p2.set_response($p0.get_executor());if($p1.onComplete&&$p1.onComplete($p2)===false){return;}var $0=$p2.get_response().get_statusCode();if(($0>=200&&$0<300)||$0===304||$0===1223){if($0!==204&&$0!==304&&$0!==1223){var $1=$p2.get_response().getResponseHeader('Content-Type');if(($1)&&($1.indexOf('application/x-javascript')!==-1)){eval($p2.get_data());}else{Sys.Mvc.MvcHelpers.updateDomElement($p2.get_updateTarget(),$p2.get_insertionMode(),$p2.get_data());}}if($p1.onSuccess){$p1.onSuccess($p2);}}else{if($p1.onFailure){$p1.onFailure($p2);}}if($p2.get_loadingElement()){Sys.UI.DomElement.setVisible($p2.get_loadingElement(),false);}}\nSys.Mvc.MvcHelpers.updateDomElement=function(target,insertionMode,content){if(target){switch(insertionMode){case 0:target.innerHTML=content;break;case 1:if(content&&content.length>0){target.innerHTML=content+target.innerHTML.trimStart();}break;case 2:if(content&&content.length>0){target.innerHTML=target.innerHTML.trimEnd()+content;}break;}}}\nSys.Mvc.AsyncForm=function(){}\nSys.Mvc.AsyncForm.handleClick=function(form,evt){var $0=Sys.Mvc.MvcHelpers.$0(evt.target,evt.offsetX,evt.offsetY);form._additionalInput = $0;}\nSys.Mvc.AsyncForm.handleSubmit=function(form,evt,ajaxOptions){evt.preventDefault();var $0=form.validationCallbacks;if($0){for(var $2=0;$2<$0.length;$2++){var $3=$0[$2];if(!$3()){return;}}}var $1=Sys.Mvc.MvcHelpers.$1(form);Sys.Mvc.MvcHelpers.$2(form.action,form.method||'post',$1,form,ajaxOptions);}\nSys.Mvc.AjaxContext.registerClass('Sys.Mvc.AjaxContext');Sys.Mvc.AsyncHyperlink.registerClass('Sys.Mvc.AsyncHyperlink');Sys.Mvc.MvcHelpers.registerClass('Sys.Mvc.MvcHelpers');Sys.Mvc.AsyncForm.registerClass('Sys.Mvc.AsyncForm');\n// ---- Do not remove this footer ----\n// Generated using Script# v0.5.0.0 (http://projects.nikhilk.net)\n// -----------------------------------\n"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/DDDPPP.Chap20.CommandHandler.Presentation/Scripts/MicrosoftMvcValidation.debug.js",
    "content": "//!----------------------------------------------------------\n//! Copyright (C) Microsoft Corporation. All rights reserved.\n//!----------------------------------------------------------\n//! MicrosoftMvcValidation.js\n\n\nType.registerNamespace('Sys.Mvc');\n\n////////////////////////////////////////////////////////////////////////////////\n// Sys.Mvc.Validation\n\nSys.Mvc.$create_Validation = function Sys_Mvc_Validation() { return {}; }\n\n\n////////////////////////////////////////////////////////////////////////////////\n// Sys.Mvc.JsonValidationField\n\nSys.Mvc.$create_JsonValidationField = function Sys_Mvc_JsonValidationField() { return {}; }\n\n\n////////////////////////////////////////////////////////////////////////////////\n// Sys.Mvc.JsonValidationOptions\n\nSys.Mvc.$create_JsonValidationOptions = function Sys_Mvc_JsonValidationOptions() { return {}; }\n\n\n////////////////////////////////////////////////////////////////////////////////\n// Sys.Mvc.JsonValidationRule\n\nSys.Mvc.$create_JsonValidationRule = function Sys_Mvc_JsonValidationRule() { return {}; }\n\n\n////////////////////////////////////////////////////////////////////////////////\n// Sys.Mvc.ValidationContext\n\nSys.Mvc.$create_ValidationContext = function Sys_Mvc_ValidationContext() { return {}; }\n\n\n////////////////////////////////////////////////////////////////////////////////\n// Sys.Mvc.NumberValidator\n\nSys.Mvc.NumberValidator = function Sys_Mvc_NumberValidator() {\n}\nSys.Mvc.NumberValidator.create = function Sys_Mvc_NumberValidator$create(rule) {\n    /// <param name=\"rule\" type=\"Sys.Mvc.JsonValidationRule\">\n    /// </param>\n    /// <returns type=\"Sys.Mvc.Validator\"></returns>\n    return Function.createDelegate(new Sys.Mvc.NumberValidator(), new Sys.Mvc.NumberValidator().validate);\n}\nSys.Mvc.NumberValidator.prototype = {\n    \n    validate: function Sys_Mvc_NumberValidator$validate(value, context) {\n        /// <param name=\"value\" type=\"String\">\n        /// </param>\n        /// <param name=\"context\" type=\"Sys.Mvc.ValidationContext\">\n        /// </param>\n        /// <returns type=\"Object\"></returns>\n        if (Sys.Mvc._validationUtil.stringIsNullOrEmpty(value)) {\n            return true;\n        }\n        var n = Number.parseLocale(value);\n        return (!isNaN(n));\n    }\n}\n\n\n////////////////////////////////////////////////////////////////////////////////\n// Sys.Mvc.FormContext\n\nSys.Mvc.FormContext = function Sys_Mvc_FormContext(formElement, validationSummaryElement) {\n    /// <param name=\"formElement\" type=\"Object\" domElement=\"true\">\n    /// </param>\n    /// <param name=\"validationSummaryElement\" type=\"Object\" domElement=\"true\">\n    /// </param>\n    /// <field name=\"_validationSummaryErrorCss\" type=\"String\" static=\"true\">\n    /// </field>\n    /// <field name=\"_validationSummaryValidCss\" type=\"String\" static=\"true\">\n    /// </field>\n    /// <field name=\"_formValidationTag\" type=\"String\" static=\"true\">\n    /// </field>\n    /// <field name=\"_onClickHandler\" type=\"Sys.UI.DomEventHandler\">\n    /// </field>\n    /// <field name=\"_onSubmitHandler\" type=\"Sys.UI.DomEventHandler\">\n    /// </field>\n    /// <field name=\"_errors\" type=\"Array\">\n    /// </field>\n    /// <field name=\"_submitButtonClicked\" type=\"Object\" domElement=\"true\">\n    /// </field>\n    /// <field name=\"_validationSummaryElement\" type=\"Object\" domElement=\"true\">\n    /// </field>\n    /// <field name=\"_validationSummaryULElement\" type=\"Object\" domElement=\"true\">\n    /// </field>\n    /// <field name=\"fields\" type=\"Array\" elementType=\"FieldContext\">\n    /// </field>\n    /// <field name=\"_formElement\" type=\"Object\" domElement=\"true\">\n    /// </field>\n    /// <field name=\"replaceValidationSummary\" type=\"Boolean\">\n    /// </field>\n    this._errors = [];\n    this.fields = new Array(0);\n    this._formElement = formElement;\n    this._validationSummaryElement = validationSummaryElement;\n    formElement[Sys.Mvc.FormContext._formValidationTag] = this;\n    if (validationSummaryElement) {\n        var ulElements = validationSummaryElement.getElementsByTagName('ul');\n        if (ulElements.length > 0) {\n            this._validationSummaryULElement = ulElements[0];\n        }\n    }\n    this._onClickHandler = Function.createDelegate(this, this._form_OnClick);\n    this._onSubmitHandler = Function.createDelegate(this, this._form_OnSubmit);\n}\nSys.Mvc.FormContext._Application_Load = function Sys_Mvc_FormContext$_Application_Load() {\n    var allFormOptions = window.mvcClientValidationMetadata;\n    if (allFormOptions) {\n        while (allFormOptions.length > 0) {\n            var thisFormOptions = allFormOptions.pop();\n            Sys.Mvc.FormContext._parseJsonOptions(thisFormOptions);\n        }\n    }\n}\nSys.Mvc.FormContext._getFormElementsWithName = function Sys_Mvc_FormContext$_getFormElementsWithName(formElement, name) {\n    /// <param name=\"formElement\" type=\"Object\" domElement=\"true\">\n    /// </param>\n    /// <param name=\"name\" type=\"String\">\n    /// </param>\n    /// <returns type=\"Array\" elementType=\"Object\" elementDomElement=\"true\"></returns>\n    var allElementsWithNameInForm = [];\n    var allElementsWithName = document.getElementsByName(name);\n    for (var i = 0; i < allElementsWithName.length; i++) {\n        var thisElement = allElementsWithName[i];\n        if (Sys.Mvc.FormContext._isElementInHierarchy(formElement, thisElement)) {\n            Array.add(allElementsWithNameInForm, thisElement);\n        }\n    }\n    return allElementsWithNameInForm;\n}\nSys.Mvc.FormContext.getValidationForForm = function Sys_Mvc_FormContext$getValidationForForm(formElement) {\n    /// <param name=\"formElement\" type=\"Object\" domElement=\"true\">\n    /// </param>\n    /// <returns type=\"Sys.Mvc.FormContext\"></returns>\n    return formElement[Sys.Mvc.FormContext._formValidationTag];\n}\nSys.Mvc.FormContext._isElementInHierarchy = function Sys_Mvc_FormContext$_isElementInHierarchy(parent, child) {\n    /// <param name=\"parent\" type=\"Object\" domElement=\"true\">\n    /// </param>\n    /// <param name=\"child\" type=\"Object\" domElement=\"true\">\n    /// </param>\n    /// <returns type=\"Boolean\"></returns>\n    while (child) {\n        if (parent === child) {\n            return true;\n        }\n        child = child.parentNode;\n    }\n    return false;\n}\nSys.Mvc.FormContext._parseJsonOptions = function Sys_Mvc_FormContext$_parseJsonOptions(options) {\n    /// <param name=\"options\" type=\"Sys.Mvc.JsonValidationOptions\">\n    /// </param>\n    /// <returns type=\"Sys.Mvc.FormContext\"></returns>\n    var formElement = $get(options.FormId);\n    var validationSummaryElement = (!Sys.Mvc._validationUtil.stringIsNullOrEmpty(options.ValidationSummaryId)) ? $get(options.ValidationSummaryId) : null;\n    var formContext = new Sys.Mvc.FormContext(formElement, validationSummaryElement);\n    formContext.enableDynamicValidation();\n    formContext.replaceValidationSummary = options.ReplaceValidationSummary;\n    for (var i = 0; i < options.Fields.length; i++) {\n        var field = options.Fields[i];\n        var fieldElements = Sys.Mvc.FormContext._getFormElementsWithName(formElement, field.FieldName);\n        var validationMessageElement = (!Sys.Mvc._validationUtil.stringIsNullOrEmpty(field.ValidationMessageId)) ? $get(field.ValidationMessageId) : null;\n        var fieldContext = new Sys.Mvc.FieldContext(formContext);\n        Array.addRange(fieldContext.elements, fieldElements);\n        fieldContext.validationMessageElement = validationMessageElement;\n        fieldContext.replaceValidationMessageContents = field.ReplaceValidationMessageContents;\n        for (var j = 0; j < field.ValidationRules.length; j++) {\n            var rule = field.ValidationRules[j];\n            var validator = Sys.Mvc.ValidatorRegistry.getValidator(rule);\n            if (validator) {\n                var validation = Sys.Mvc.$create_Validation();\n                validation.fieldErrorMessage = rule.ErrorMessage;\n                validation.validator = validator;\n                Array.add(fieldContext.validations, validation);\n            }\n        }\n        fieldContext.enableDynamicValidation();\n        Array.add(formContext.fields, fieldContext);\n    }\n    var registeredValidatorCallbacks = formElement.validationCallbacks;\n    if (!registeredValidatorCallbacks) {\n        registeredValidatorCallbacks = [];\n        formElement.validationCallbacks = registeredValidatorCallbacks;\n    }\n    registeredValidatorCallbacks.push(Function.createDelegate(null, function() {\n        return Sys.Mvc._validationUtil.arrayIsNullOrEmpty(formContext.validate('submit'));\n    }));\n    return formContext;\n}\nSys.Mvc.FormContext.prototype = {\n    _onClickHandler: null,\n    _onSubmitHandler: null,\n    _submitButtonClicked: null,\n    _validationSummaryElement: null,\n    _validationSummaryULElement: null,\n    _formElement: null,\n    replaceValidationSummary: false,\n    \n    addError: function Sys_Mvc_FormContext$addError(message) {\n        /// <param name=\"message\" type=\"String\">\n        /// </param>\n        this.addErrors([ message ]);\n    },\n    \n    addErrors: function Sys_Mvc_FormContext$addErrors(messages) {\n        /// <param name=\"messages\" type=\"Array\" elementType=\"String\">\n        /// </param>\n        if (!Sys.Mvc._validationUtil.arrayIsNullOrEmpty(messages)) {\n            Array.addRange(this._errors, messages);\n            this._onErrorCountChanged();\n        }\n    },\n    \n    clearErrors: function Sys_Mvc_FormContext$clearErrors() {\n        Array.clear(this._errors);\n        this._onErrorCountChanged();\n    },\n    \n    _displayError: function Sys_Mvc_FormContext$_displayError() {\n        if (this._validationSummaryElement) {\n            if (this._validationSummaryULElement) {\n                Sys.Mvc._validationUtil.removeAllChildren(this._validationSummaryULElement);\n                for (var i = 0; i < this._errors.length; i++) {\n                    var liElement = document.createElement('li');\n                    Sys.Mvc._validationUtil.setInnerText(liElement, this._errors[i]);\n                    this._validationSummaryULElement.appendChild(liElement);\n                }\n            }\n            Sys.UI.DomElement.removeCssClass(this._validationSummaryElement, Sys.Mvc.FormContext._validationSummaryValidCss);\n            Sys.UI.DomElement.addCssClass(this._validationSummaryElement, Sys.Mvc.FormContext._validationSummaryErrorCss);\n        }\n    },\n    \n    _displaySuccess: function Sys_Mvc_FormContext$_displaySuccess() {\n        var validationSummaryElement = this._validationSummaryElement;\n        if (validationSummaryElement) {\n            var validationSummaryULElement = this._validationSummaryULElement;\n            if (validationSummaryULElement) {\n                validationSummaryULElement.innerHTML = '';\n            }\n            Sys.UI.DomElement.removeCssClass(validationSummaryElement, Sys.Mvc.FormContext._validationSummaryErrorCss);\n            Sys.UI.DomElement.addCssClass(validationSummaryElement, Sys.Mvc.FormContext._validationSummaryValidCss);\n        }\n    },\n    \n    enableDynamicValidation: function Sys_Mvc_FormContext$enableDynamicValidation() {\n        Sys.UI.DomEvent.addHandler(this._formElement, 'click', this._onClickHandler);\n        Sys.UI.DomEvent.addHandler(this._formElement, 'submit', this._onSubmitHandler);\n    },\n    \n    _findSubmitButton: function Sys_Mvc_FormContext$_findSubmitButton(element) {\n        /// <param name=\"element\" type=\"Object\" domElement=\"true\">\n        /// </param>\n        /// <returns type=\"Object\" domElement=\"true\"></returns>\n        if (element.disabled) {\n            return null;\n        }\n        var tagName = element.tagName.toUpperCase();\n        var inputElement = element;\n        if (tagName === 'INPUT') {\n            var type = inputElement.type;\n            if (type === 'submit' || type === 'image') {\n                return inputElement;\n            }\n        }\n        else if ((tagName === 'BUTTON') && (inputElement.type === 'submit')) {\n            return inputElement;\n        }\n        return null;\n    },\n    \n    _form_OnClick: function Sys_Mvc_FormContext$_form_OnClick(e) {\n        /// <param name=\"e\" type=\"Sys.UI.DomEvent\">\n        /// </param>\n        this._submitButtonClicked = this._findSubmitButton(e.target);\n    },\n    \n    _form_OnSubmit: function Sys_Mvc_FormContext$_form_OnSubmit(e) {\n        /// <param name=\"e\" type=\"Sys.UI.DomEvent\">\n        /// </param>\n        var form = e.target;\n        var submitButton = this._submitButtonClicked;\n        if (submitButton && submitButton.disableValidation) {\n            return;\n        }\n        var errorMessages = this.validate('submit');\n        if (!Sys.Mvc._validationUtil.arrayIsNullOrEmpty(errorMessages)) {\n            e.preventDefault();\n        }\n    },\n    \n    _onErrorCountChanged: function Sys_Mvc_FormContext$_onErrorCountChanged() {\n        if (!this._errors.length) {\n            this._displaySuccess();\n        }\n        else {\n            this._displayError();\n        }\n    },\n    \n    validate: function Sys_Mvc_FormContext$validate(eventName) {\n        /// <param name=\"eventName\" type=\"String\">\n        /// </param>\n        /// <returns type=\"Array\" elementType=\"String\"></returns>\n        var fields = this.fields;\n        var errors = [];\n        for (var i = 0; i < fields.length; i++) {\n            var field = fields[i];\n            if (!field.elements[0].disabled) {\n                var thisErrors = field.validate(eventName);\n                if (thisErrors) {\n                    Array.addRange(errors, thisErrors);\n                }\n            }\n        }\n        if (this.replaceValidationSummary) {\n            this.clearErrors();\n            this.addErrors(errors);\n        }\n        return errors;\n    }\n}\n\n\n////////////////////////////////////////////////////////////////////////////////\n// Sys.Mvc.FieldContext\n\nSys.Mvc.FieldContext = function Sys_Mvc_FieldContext(formContext) {\n    /// <param name=\"formContext\" type=\"Sys.Mvc.FormContext\">\n    /// </param>\n    /// <field name=\"_hasTextChangedTag\" type=\"String\" static=\"true\">\n    /// </field>\n    /// <field name=\"_hasValidationFiredTag\" type=\"String\" static=\"true\">\n    /// </field>\n    /// <field name=\"_inputElementErrorCss\" type=\"String\" static=\"true\">\n    /// </field>\n    /// <field name=\"_inputElementValidCss\" type=\"String\" static=\"true\">\n    /// </field>\n    /// <field name=\"_validationMessageErrorCss\" type=\"String\" static=\"true\">\n    /// </field>\n    /// <field name=\"_validationMessageValidCss\" type=\"String\" static=\"true\">\n    /// </field>\n    /// <field name=\"_onBlurHandler\" type=\"Sys.UI.DomEventHandler\">\n    /// </field>\n    /// <field name=\"_onChangeHandler\" type=\"Sys.UI.DomEventHandler\">\n    /// </field>\n    /// <field name=\"_onInputHandler\" type=\"Sys.UI.DomEventHandler\">\n    /// </field>\n    /// <field name=\"_onPropertyChangeHandler\" type=\"Sys.UI.DomEventHandler\">\n    /// </field>\n    /// <field name=\"_errors\" type=\"Array\">\n    /// </field>\n    /// <field name=\"defaultErrorMessage\" type=\"String\">\n    /// </field>\n    /// <field name=\"elements\" type=\"Array\" elementType=\"Object\" elementDomElement=\"true\">\n    /// </field>\n    /// <field name=\"formContext\" type=\"Sys.Mvc.FormContext\">\n    /// </field>\n    /// <field name=\"replaceValidationMessageContents\" type=\"Boolean\">\n    /// </field>\n    /// <field name=\"validationMessageElement\" type=\"Object\" domElement=\"true\">\n    /// </field>\n    /// <field name=\"validations\" type=\"Array\" elementType=\"Validation\">\n    /// </field>\n    this._errors = [];\n    this.elements = new Array(0);\n    this.validations = new Array(0);\n    this.formContext = formContext;\n    this._onBlurHandler = Function.createDelegate(this, this._element_OnBlur);\n    this._onChangeHandler = Function.createDelegate(this, this._element_OnChange);\n    this._onInputHandler = Function.createDelegate(this, this._element_OnInput);\n    this._onPropertyChangeHandler = Function.createDelegate(this, this._element_OnPropertyChange);\n}\nSys.Mvc.FieldContext.prototype = {\n    _onBlurHandler: null,\n    _onChangeHandler: null,\n    _onInputHandler: null,\n    _onPropertyChangeHandler: null,\n    defaultErrorMessage: null,\n    formContext: null,\n    replaceValidationMessageContents: false,\n    validationMessageElement: null,\n    \n    addError: function Sys_Mvc_FieldContext$addError(message) {\n        /// <param name=\"message\" type=\"String\">\n        /// </param>\n        this.addErrors([ message ]);\n    },\n    \n    addErrors: function Sys_Mvc_FieldContext$addErrors(messages) {\n        /// <param name=\"messages\" type=\"Array\" elementType=\"String\">\n        /// </param>\n        if (!Sys.Mvc._validationUtil.arrayIsNullOrEmpty(messages)) {\n            Array.addRange(this._errors, messages);\n            this._onErrorCountChanged();\n        }\n    },\n    \n    clearErrors: function Sys_Mvc_FieldContext$clearErrors() {\n        Array.clear(this._errors);\n        this._onErrorCountChanged();\n    },\n    \n    _displayError: function Sys_Mvc_FieldContext$_displayError() {\n        var validationMessageElement = this.validationMessageElement;\n        if (validationMessageElement) {\n            if (this.replaceValidationMessageContents) {\n                Sys.Mvc._validationUtil.setInnerText(validationMessageElement, this._errors[0]);\n            }\n            Sys.UI.DomElement.removeCssClass(validationMessageElement, Sys.Mvc.FieldContext._validationMessageValidCss);\n            Sys.UI.DomElement.addCssClass(validationMessageElement, Sys.Mvc.FieldContext._validationMessageErrorCss);\n        }\n        var elements = this.elements;\n        for (var i = 0; i < elements.length; i++) {\n            var element = elements[i];\n            Sys.UI.DomElement.removeCssClass(element, Sys.Mvc.FieldContext._inputElementValidCss);\n            Sys.UI.DomElement.addCssClass(element, Sys.Mvc.FieldContext._inputElementErrorCss);\n        }\n    },\n    \n    _displaySuccess: function Sys_Mvc_FieldContext$_displaySuccess() {\n        var validationMessageElement = this.validationMessageElement;\n        if (validationMessageElement) {\n            if (this.replaceValidationMessageContents) {\n                Sys.Mvc._validationUtil.setInnerText(validationMessageElement, '');\n            }\n            Sys.UI.DomElement.removeCssClass(validationMessageElement, Sys.Mvc.FieldContext._validationMessageErrorCss);\n            Sys.UI.DomElement.addCssClass(validationMessageElement, Sys.Mvc.FieldContext._validationMessageValidCss);\n        }\n        var elements = this.elements;\n        for (var i = 0; i < elements.length; i++) {\n            var element = elements[i];\n            Sys.UI.DomElement.removeCssClass(element, Sys.Mvc.FieldContext._inputElementErrorCss);\n            Sys.UI.DomElement.addCssClass(element, Sys.Mvc.FieldContext._inputElementValidCss);\n        }\n    },\n    \n    _element_OnBlur: function Sys_Mvc_FieldContext$_element_OnBlur(e) {\n        /// <param name=\"e\" type=\"Sys.UI.DomEvent\">\n        /// </param>\n        if (e.target[Sys.Mvc.FieldContext._hasTextChangedTag] || e.target[Sys.Mvc.FieldContext._hasValidationFiredTag]) {\n            this.validate('blur');\n        }\n    },\n    \n    _element_OnChange: function Sys_Mvc_FieldContext$_element_OnChange(e) {\n        /// <param name=\"e\" type=\"Sys.UI.DomEvent\">\n        /// </param>\n        e.target[Sys.Mvc.FieldContext._hasTextChangedTag] = true;\n    },\n    \n    _element_OnInput: function Sys_Mvc_FieldContext$_element_OnInput(e) {\n        /// <param name=\"e\" type=\"Sys.UI.DomEvent\">\n        /// </param>\n        e.target[Sys.Mvc.FieldContext._hasTextChangedTag] = true;\n        if (e.target[Sys.Mvc.FieldContext._hasValidationFiredTag]) {\n            this.validate('input');\n        }\n    },\n    \n    _element_OnPropertyChange: function Sys_Mvc_FieldContext$_element_OnPropertyChange(e) {\n        /// <param name=\"e\" type=\"Sys.UI.DomEvent\">\n        /// </param>\n        if (e.rawEvent.propertyName === 'value') {\n            e.target[Sys.Mvc.FieldContext._hasTextChangedTag] = true;\n            if (e.target[Sys.Mvc.FieldContext._hasValidationFiredTag]) {\n                this.validate('input');\n            }\n        }\n    },\n    \n    enableDynamicValidation: function Sys_Mvc_FieldContext$enableDynamicValidation() {\n        var elements = this.elements;\n        for (var i = 0; i < elements.length; i++) {\n            var element = elements[i];\n            if (Sys.Mvc._validationUtil.elementSupportsEvent(element, 'onpropertychange')) {\n                var compatMode = document.documentMode;\n                if (compatMode && compatMode >= 8) {\n                    Sys.UI.DomEvent.addHandler(element, 'propertychange', this._onPropertyChangeHandler);\n                }\n            }\n            else {\n                Sys.UI.DomEvent.addHandler(element, 'input', this._onInputHandler);\n            }\n            Sys.UI.DomEvent.addHandler(element, 'change', this._onChangeHandler);\n            Sys.UI.DomEvent.addHandler(element, 'blur', this._onBlurHandler);\n        }\n    },\n    \n    _getErrorString: function Sys_Mvc_FieldContext$_getErrorString(validatorReturnValue, fieldErrorMessage) {\n        /// <param name=\"validatorReturnValue\" type=\"Object\">\n        /// </param>\n        /// <param name=\"fieldErrorMessage\" type=\"String\">\n        /// </param>\n        /// <returns type=\"String\"></returns>\n        var fallbackErrorMessage = fieldErrorMessage || this.defaultErrorMessage;\n        if (Boolean.isInstanceOfType(validatorReturnValue)) {\n            return (validatorReturnValue) ? null : fallbackErrorMessage;\n        }\n        if (String.isInstanceOfType(validatorReturnValue)) {\n            return ((validatorReturnValue).length) ? validatorReturnValue : fallbackErrorMessage;\n        }\n        return null;\n    },\n    \n    _getStringValue: function Sys_Mvc_FieldContext$_getStringValue() {\n        /// <returns type=\"String\"></returns>\n        var elements = this.elements;\n        return (elements.length > 0) ? elements[0].value : null;\n    },\n    \n    _markValidationFired: function Sys_Mvc_FieldContext$_markValidationFired() {\n        var elements = this.elements;\n        for (var i = 0; i < elements.length; i++) {\n            var element = elements[i];\n            element[Sys.Mvc.FieldContext._hasValidationFiredTag] = true;\n        }\n    },\n    \n    _onErrorCountChanged: function Sys_Mvc_FieldContext$_onErrorCountChanged() {\n        if (!this._errors.length) {\n            this._displaySuccess();\n        }\n        else {\n            this._displayError();\n        }\n    },\n    \n    validate: function Sys_Mvc_FieldContext$validate(eventName) {\n        /// <param name=\"eventName\" type=\"String\">\n        /// </param>\n        /// <returns type=\"Array\" elementType=\"String\"></returns>\n        var validations = this.validations;\n        var errors = [];\n        var value = this._getStringValue();\n        for (var i = 0; i < validations.length; i++) {\n            var validation = validations[i];\n            var context = Sys.Mvc.$create_ValidationContext();\n            context.eventName = eventName;\n            context.fieldContext = this;\n            context.validation = validation;\n            var retVal = validation.validator(value, context);\n            var errorMessage = this._getErrorString(retVal, validation.fieldErrorMessage);\n            if (!Sys.Mvc._validationUtil.stringIsNullOrEmpty(errorMessage)) {\n                Array.add(errors, errorMessage);\n            }\n        }\n        this._markValidationFired();\n        this.clearErrors();\n        this.addErrors(errors);\n        return errors;\n    }\n}\n\n\n////////////////////////////////////////////////////////////////////////////////\n// Sys.Mvc.RangeValidator\n\nSys.Mvc.RangeValidator = function Sys_Mvc_RangeValidator(minimum, maximum) {\n    /// <param name=\"minimum\" type=\"Number\">\n    /// </param>\n    /// <param name=\"maximum\" type=\"Number\">\n    /// </param>\n    /// <field name=\"_minimum\" type=\"Number\">\n    /// </field>\n    /// <field name=\"_maximum\" type=\"Number\">\n    /// </field>\n    this._minimum = minimum;\n    this._maximum = maximum;\n}\nSys.Mvc.RangeValidator.create = function Sys_Mvc_RangeValidator$create(rule) {\n    /// <param name=\"rule\" type=\"Sys.Mvc.JsonValidationRule\">\n    /// </param>\n    /// <returns type=\"Sys.Mvc.Validator\"></returns>\n    var min = rule.ValidationParameters['min'];\n    var max = rule.ValidationParameters['max'];\n    return Function.createDelegate(new Sys.Mvc.RangeValidator(min, max), new Sys.Mvc.RangeValidator(min, max).validate);\n}\nSys.Mvc.RangeValidator.prototype = {\n    _minimum: null,\n    _maximum: null,\n    \n    validate: function Sys_Mvc_RangeValidator$validate(value, context) {\n        /// <param name=\"value\" type=\"String\">\n        /// </param>\n        /// <param name=\"context\" type=\"Sys.Mvc.ValidationContext\">\n        /// </param>\n        /// <returns type=\"Object\"></returns>\n        if (Sys.Mvc._validationUtil.stringIsNullOrEmpty(value)) {\n            return true;\n        }\n        var n = Number.parseLocale(value);\n        return (!isNaN(n) && this._minimum <= n && n <= this._maximum);\n    }\n}\n\n\n////////////////////////////////////////////////////////////////////////////////\n// Sys.Mvc.RegularExpressionValidator\n\nSys.Mvc.RegularExpressionValidator = function Sys_Mvc_RegularExpressionValidator(pattern) {\n    /// <param name=\"pattern\" type=\"String\">\n    /// </param>\n    /// <field name=\"_pattern\" type=\"String\">\n    /// </field>\n    this._pattern = pattern;\n}\nSys.Mvc.RegularExpressionValidator.create = function Sys_Mvc_RegularExpressionValidator$create(rule) {\n    /// <param name=\"rule\" type=\"Sys.Mvc.JsonValidationRule\">\n    /// </param>\n    /// <returns type=\"Sys.Mvc.Validator\"></returns>\n    var pattern = rule.ValidationParameters['pattern'];\n    return Function.createDelegate(new Sys.Mvc.RegularExpressionValidator(pattern), new Sys.Mvc.RegularExpressionValidator(pattern).validate);\n}\nSys.Mvc.RegularExpressionValidator.prototype = {\n    _pattern: null,\n    \n    validate: function Sys_Mvc_RegularExpressionValidator$validate(value, context) {\n        /// <param name=\"value\" type=\"String\">\n        /// </param>\n        /// <param name=\"context\" type=\"Sys.Mvc.ValidationContext\">\n        /// </param>\n        /// <returns type=\"Object\"></returns>\n        if (Sys.Mvc._validationUtil.stringIsNullOrEmpty(value)) {\n            return true;\n        }\n        var regExp = new RegExp(this._pattern);\n        var matches = regExp.exec(value);\n        return (!Sys.Mvc._validationUtil.arrayIsNullOrEmpty(matches) && matches[0].length === value.length);\n    }\n}\n\n\n////////////////////////////////////////////////////////////////////////////////\n// Sys.Mvc.RequiredValidator\n\nSys.Mvc.RequiredValidator = function Sys_Mvc_RequiredValidator() {\n}\nSys.Mvc.RequiredValidator.create = function Sys_Mvc_RequiredValidator$create(rule) {\n    /// <param name=\"rule\" type=\"Sys.Mvc.JsonValidationRule\">\n    /// </param>\n    /// <returns type=\"Sys.Mvc.Validator\"></returns>\n    return Function.createDelegate(new Sys.Mvc.RequiredValidator(), new Sys.Mvc.RequiredValidator().validate);\n}\nSys.Mvc.RequiredValidator._isRadioInputElement = function Sys_Mvc_RequiredValidator$_isRadioInputElement(element) {\n    /// <param name=\"element\" type=\"Object\" domElement=\"true\">\n    /// </param>\n    /// <returns type=\"Boolean\"></returns>\n    if (element.tagName.toUpperCase() === 'INPUT') {\n        var inputType = (element.type).toUpperCase();\n        if (inputType === 'RADIO') {\n            return true;\n        }\n    }\n    return false;\n}\nSys.Mvc.RequiredValidator._isSelectInputElement = function Sys_Mvc_RequiredValidator$_isSelectInputElement(element) {\n    /// <param name=\"element\" type=\"Object\" domElement=\"true\">\n    /// </param>\n    /// <returns type=\"Boolean\"></returns>\n    if (element.tagName.toUpperCase() === 'SELECT') {\n        return true;\n    }\n    return false;\n}\nSys.Mvc.RequiredValidator._isTextualInputElement = function Sys_Mvc_RequiredValidator$_isTextualInputElement(element) {\n    /// <param name=\"element\" type=\"Object\" domElement=\"true\">\n    /// </param>\n    /// <returns type=\"Boolean\"></returns>\n    if (element.tagName.toUpperCase() === 'INPUT') {\n        var inputType = (element.type).toUpperCase();\n        switch (inputType) {\n            case 'TEXT':\n            case 'PASSWORD':\n            case 'FILE':\n                return true;\n        }\n    }\n    if (element.tagName.toUpperCase() === 'TEXTAREA') {\n        return true;\n    }\n    return false;\n}\nSys.Mvc.RequiredValidator._validateRadioInput = function Sys_Mvc_RequiredValidator$_validateRadioInput(elements) {\n    /// <param name=\"elements\" type=\"Array\" elementType=\"Object\" elementDomElement=\"true\">\n    /// </param>\n    /// <returns type=\"Object\"></returns>\n    for (var i = 0; i < elements.length; i++) {\n        var element = elements[i];\n        if (element.checked) {\n            return true;\n        }\n    }\n    return false;\n}\nSys.Mvc.RequiredValidator._validateSelectInput = function Sys_Mvc_RequiredValidator$_validateSelectInput(optionElements) {\n    /// <param name=\"optionElements\" type=\"DOMElementCollection\">\n    /// </param>\n    /// <returns type=\"Object\"></returns>\n    for (var i = 0; i < optionElements.length; i++) {\n        var element = optionElements[i];\n        if (element.selected) {\n            if (!Sys.Mvc._validationUtil.stringIsNullOrEmpty(element.value)) {\n                return true;\n            }\n        }\n    }\n    return false;\n}\nSys.Mvc.RequiredValidator._validateTextualInput = function Sys_Mvc_RequiredValidator$_validateTextualInput(element) {\n    /// <param name=\"element\" type=\"Object\" domElement=\"true\">\n    /// </param>\n    /// <returns type=\"Object\"></returns>\n    return (!Sys.Mvc._validationUtil.stringIsNullOrEmpty(element.value));\n}\nSys.Mvc.RequiredValidator.prototype = {\n    \n    validate: function Sys_Mvc_RequiredValidator$validate(value, context) {\n        /// <param name=\"value\" type=\"String\">\n        /// </param>\n        /// <param name=\"context\" type=\"Sys.Mvc.ValidationContext\">\n        /// </param>\n        /// <returns type=\"Object\"></returns>\n        var elements = context.fieldContext.elements;\n        if (!elements.length) {\n            return true;\n        }\n        var sampleElement = elements[0];\n        if (Sys.Mvc.RequiredValidator._isTextualInputElement(sampleElement)) {\n            return Sys.Mvc.RequiredValidator._validateTextualInput(sampleElement);\n        }\n        if (Sys.Mvc.RequiredValidator._isRadioInputElement(sampleElement)) {\n            return Sys.Mvc.RequiredValidator._validateRadioInput(elements);\n        }\n        if (Sys.Mvc.RequiredValidator._isSelectInputElement(sampleElement)) {\n            return Sys.Mvc.RequiredValidator._validateSelectInput((sampleElement).options);\n        }\n        return true;\n    }\n}\n\n\n////////////////////////////////////////////////////////////////////////////////\n// Sys.Mvc.StringLengthValidator\n\nSys.Mvc.StringLengthValidator = function Sys_Mvc_StringLengthValidator(minLength, maxLength) {\n    /// <param name=\"minLength\" type=\"Number\" integer=\"true\">\n    /// </param>\n    /// <param name=\"maxLength\" type=\"Number\" integer=\"true\">\n    /// </param>\n    /// <field name=\"_maxLength\" type=\"Number\" integer=\"true\">\n    /// </field>\n    /// <field name=\"_minLength\" type=\"Number\" integer=\"true\">\n    /// </field>\n    this._minLength = minLength;\n    this._maxLength = maxLength;\n}\nSys.Mvc.StringLengthValidator.create = function Sys_Mvc_StringLengthValidator$create(rule) {\n    /// <param name=\"rule\" type=\"Sys.Mvc.JsonValidationRule\">\n    /// </param>\n    /// <returns type=\"Sys.Mvc.Validator\"></returns>\n    var minLength = (rule.ValidationParameters['min'] || 0);\n    var maxLength = (rule.ValidationParameters['max'] || Number.MAX_VALUE);\n    return Function.createDelegate(new Sys.Mvc.StringLengthValidator(minLength, maxLength), new Sys.Mvc.StringLengthValidator(minLength, maxLength).validate);\n}\nSys.Mvc.StringLengthValidator.prototype = {\n    _maxLength: 0,\n    _minLength: 0,\n    \n    validate: function Sys_Mvc_StringLengthValidator$validate(value, context) {\n        /// <param name=\"value\" type=\"String\">\n        /// </param>\n        /// <param name=\"context\" type=\"Sys.Mvc.ValidationContext\">\n        /// </param>\n        /// <returns type=\"Object\"></returns>\n        if (Sys.Mvc._validationUtil.stringIsNullOrEmpty(value)) {\n            return true;\n        }\n        return (this._minLength <= value.length && value.length <= this._maxLength);\n    }\n}\n\n\n////////////////////////////////////////////////////////////////////////////////\n// Sys.Mvc._validationUtil\n\nSys.Mvc._validationUtil = function Sys_Mvc__validationUtil() {\n}\nSys.Mvc._validationUtil.arrayIsNullOrEmpty = function Sys_Mvc__validationUtil$arrayIsNullOrEmpty(array) {\n    /// <param name=\"array\" type=\"Array\" elementType=\"Object\">\n    /// </param>\n    /// <returns type=\"Boolean\"></returns>\n    return (!array || !array.length);\n}\nSys.Mvc._validationUtil.stringIsNullOrEmpty = function Sys_Mvc__validationUtil$stringIsNullOrEmpty(value) {\n    /// <param name=\"value\" type=\"String\">\n    /// </param>\n    /// <returns type=\"Boolean\"></returns>\n    return (!value || !value.length);\n}\nSys.Mvc._validationUtil.elementSupportsEvent = function Sys_Mvc__validationUtil$elementSupportsEvent(element, eventAttributeName) {\n    /// <param name=\"element\" type=\"Object\" domElement=\"true\">\n    /// </param>\n    /// <param name=\"eventAttributeName\" type=\"String\">\n    /// </param>\n    /// <returns type=\"Boolean\"></returns>\n    return (eventAttributeName in element);\n}\nSys.Mvc._validationUtil.removeAllChildren = function Sys_Mvc__validationUtil$removeAllChildren(element) {\n    /// <param name=\"element\" type=\"Object\" domElement=\"true\">\n    /// </param>\n    while (element.firstChild) {\n        element.removeChild(element.firstChild);\n    }\n}\nSys.Mvc._validationUtil.setInnerText = function Sys_Mvc__validationUtil$setInnerText(element, innerText) {\n    /// <param name=\"element\" type=\"Object\" domElement=\"true\">\n    /// </param>\n    /// <param name=\"innerText\" type=\"String\">\n    /// </param>\n    var textNode = document.createTextNode(innerText);\n    Sys.Mvc._validationUtil.removeAllChildren(element);\n    element.appendChild(textNode);\n}\n\n\n////////////////////////////////////////////////////////////////////////////////\n// Sys.Mvc.ValidatorRegistry\n\nSys.Mvc.ValidatorRegistry = function Sys_Mvc_ValidatorRegistry() {\n    /// <field name=\"validators\" type=\"Object\" static=\"true\">\n    /// </field>\n}\nSys.Mvc.ValidatorRegistry.getValidator = function Sys_Mvc_ValidatorRegistry$getValidator(rule) {\n    /// <param name=\"rule\" type=\"Sys.Mvc.JsonValidationRule\">\n    /// </param>\n    /// <returns type=\"Sys.Mvc.Validator\"></returns>\n    var creator = Sys.Mvc.ValidatorRegistry.validators[rule.ValidationType];\n    return (creator) ? creator(rule) : null;\n}\nSys.Mvc.ValidatorRegistry._getDefaultValidators = function Sys_Mvc_ValidatorRegistry$_getDefaultValidators() {\n    /// <returns type=\"Object\"></returns>\n    return { required: Function.createDelegate(null, Sys.Mvc.RequiredValidator.create), length: Function.createDelegate(null, Sys.Mvc.StringLengthValidator.create), regex: Function.createDelegate(null, Sys.Mvc.RegularExpressionValidator.create), range: Function.createDelegate(null, Sys.Mvc.RangeValidator.create), number: Function.createDelegate(null, Sys.Mvc.NumberValidator.create) };\n}\n\n\nSys.Mvc.NumberValidator.registerClass('Sys.Mvc.NumberValidator');\nSys.Mvc.FormContext.registerClass('Sys.Mvc.FormContext');\nSys.Mvc.FieldContext.registerClass('Sys.Mvc.FieldContext');\nSys.Mvc.RangeValidator.registerClass('Sys.Mvc.RangeValidator');\nSys.Mvc.RegularExpressionValidator.registerClass('Sys.Mvc.RegularExpressionValidator');\nSys.Mvc.RequiredValidator.registerClass('Sys.Mvc.RequiredValidator');\nSys.Mvc.StringLengthValidator.registerClass('Sys.Mvc.StringLengthValidator');\nSys.Mvc._validationUtil.registerClass('Sys.Mvc._validationUtil');\nSys.Mvc.ValidatorRegistry.registerClass('Sys.Mvc.ValidatorRegistry');\nSys.Mvc.FormContext._validationSummaryErrorCss = 'validation-summary-errors';\nSys.Mvc.FormContext._validationSummaryValidCss = 'validation-summary-valid';\nSys.Mvc.FormContext._formValidationTag = '__MVC_FormValidation';\nSys.Mvc.FieldContext._hasTextChangedTag = '__MVC_HasTextChanged';\nSys.Mvc.FieldContext._hasValidationFiredTag = '__MVC_HasValidationFired';\nSys.Mvc.FieldContext._inputElementErrorCss = 'input-validation-error';\nSys.Mvc.FieldContext._inputElementValidCss = 'input-validation-valid';\nSys.Mvc.FieldContext._validationMessageErrorCss = 'field-validation-error';\nSys.Mvc.FieldContext._validationMessageValidCss = 'field-validation-valid';\nSys.Mvc.ValidatorRegistry.validators = Sys.Mvc.ValidatorRegistry._getDefaultValidators();\n\n// ---- Do not remove this footer ----\n// Generated using Script# v0.5.0.0 (http://projects.nikhilk.net)\n// -----------------------------------\n\n// register validation\nSys.Application.add_load(function() {\n  Sys.Application.remove_load(arguments.callee);\n  Sys.Mvc.FormContext._Application_Load();\n});\n"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/DDDPPP.Chap20.CommandHandler.Presentation/Scripts/MicrosoftMvcValidation.js",
    "content": "//----------------------------------------------------------\n// Copyright (C) Microsoft Corporation. All rights reserved.\n//----------------------------------------------------------\n// MicrosoftMvcValidation.js\n\nType.registerNamespace('Sys.Mvc');Sys.Mvc.$create_Validation=function(){return {};}\nSys.Mvc.$create_JsonValidationField=function(){return {};}\nSys.Mvc.$create_JsonValidationOptions=function(){return {};}\nSys.Mvc.$create_JsonValidationRule=function(){return {};}\nSys.Mvc.$create_ValidationContext=function(){return {};}\nSys.Mvc.NumberValidator=function(){}\nSys.Mvc.NumberValidator.create=function(rule){return Function.createDelegate(new Sys.Mvc.NumberValidator(),new Sys.Mvc.NumberValidator().validate);}\nSys.Mvc.NumberValidator.prototype={validate:function(value,context){if(Sys.Mvc._ValidationUtil.$1(value)){return true;}var $0=Number.parseLocale(value);return (!isNaN($0));}}\nSys.Mvc.FormContext=function(formElement,validationSummaryElement){this.$5=[];this.fields=new Array(0);this.$9=formElement;this.$7=validationSummaryElement;formElement['__MVC_FormValidation'] = this;if(validationSummaryElement){var $0=validationSummaryElement.getElementsByTagName('ul');if($0.length>0){this.$8=$0[0];}}this.$3=Function.createDelegate(this,this.$D);this.$4=Function.createDelegate(this,this.$E);}\nSys.Mvc.FormContext._Application_Load=function(){var $0=window.mvcClientValidationMetadata;if($0){while($0.length>0){var $1=$0.pop();Sys.Mvc.FormContext.$12($1);}}}\nSys.Mvc.FormContext.$F=function($p0,$p1){var $0=[];var $1=document.getElementsByName($p1);for(var $2=0;$2<$1.length;$2++){var $3=$1[$2];if(Sys.Mvc.FormContext.$10($p0,$3)){Array.add($0,$3);}}return $0;}\nSys.Mvc.FormContext.getValidationForForm=function(formElement){return formElement['__MVC_FormValidation'];}\nSys.Mvc.FormContext.$10=function($p0,$p1){while($p1){if($p0===$p1){return true;}$p1=$p1.parentNode;}return false;}\nSys.Mvc.FormContext.$12=function($p0){var $0=$get($p0.FormId);var $1=(!Sys.Mvc._ValidationUtil.$1($p0.ValidationSummaryId))?$get($p0.ValidationSummaryId):null;var $2=new Sys.Mvc.FormContext($0,$1);$2.enableDynamicValidation();$2.replaceValidationSummary=$p0.ReplaceValidationSummary;for(var $4=0;$4<$p0.Fields.length;$4++){var $5=$p0.Fields[$4];var $6=Sys.Mvc.FormContext.$F($0,$5.FieldName);var $7=(!Sys.Mvc._ValidationUtil.$1($5.ValidationMessageId))?$get($5.ValidationMessageId):null;var $8=new Sys.Mvc.FieldContext($2);Array.addRange($8.elements,$6);$8.validationMessageElement=$7;$8.replaceValidationMessageContents=$5.ReplaceValidationMessageContents;for(var $9=0;$9<$5.ValidationRules.length;$9++){var $A=$5.ValidationRules[$9];var $B=Sys.Mvc.ValidatorRegistry.getValidator($A);if($B){var $C=Sys.Mvc.$create_Validation();$C.fieldErrorMessage=$A.ErrorMessage;$C.validator=$B;Array.add($8.validations,$C);}}$8.enableDynamicValidation();Array.add($2.fields,$8);}var $3=$0.validationCallbacks;if(!$3){$3=[];$0.validationCallbacks = $3;}$3.push(Function.createDelegate(null,function(){\nreturn Sys.Mvc._ValidationUtil.$0($2.validate('submit'));}));return $2;}\nSys.Mvc.FormContext.prototype={$3:null,$4:null,$6:null,$7:null,$8:null,$9:null,replaceValidationSummary:false,addError:function(message){this.addErrors([message]);},addErrors:function(messages){if(!Sys.Mvc._ValidationUtil.$0(messages)){Array.addRange(this.$5,messages);this.$11();}},clearErrors:function(){Array.clear(this.$5);this.$11();},$A:function(){if(this.$7){if(this.$8){Sys.Mvc._ValidationUtil.$3(this.$8);for(var $0=0;$0<this.$5.length;$0++){var $1=document.createElement('li');Sys.Mvc._ValidationUtil.$4($1,this.$5[$0]);this.$8.appendChild($1);}}Sys.UI.DomElement.removeCssClass(this.$7,'validation-summary-valid');Sys.UI.DomElement.addCssClass(this.$7,'validation-summary-errors');}},$B:function(){var $0=this.$7;if($0){var $1=this.$8;if($1){$1.innerHTML='';}Sys.UI.DomElement.removeCssClass($0,'validation-summary-errors');Sys.UI.DomElement.addCssClass($0,'validation-summary-valid');}},enableDynamicValidation:function(){Sys.UI.DomEvent.addHandler(this.$9,'click',this.$3);Sys.UI.DomEvent.addHandler(this.$9,'submit',this.$4);},$C:function($p0){if($p0.disabled){return null;}var $0=$p0.tagName.toUpperCase();var $1=$p0;if($0==='INPUT'){var $2=$1.type;if($2==='submit'||$2==='image'){return $1;}}else if(($0==='BUTTON')&&($1.type==='submit')){return $1;}return null;},$D:function($p0){this.$6=this.$C($p0.target);},$E:function($p0){var $0=$p0.target;var $1=this.$6;if($1&&$1.disableValidation){return;}var $2=this.validate('submit');if(!Sys.Mvc._ValidationUtil.$0($2)){$p0.preventDefault();}},$11:function(){if(!this.$5.length){this.$B();}else{this.$A();}},validate:function(eventName){var $0=this.fields;var $1=[];for(var $2=0;$2<$0.length;$2++){var $3=$0[$2];if(!$3.elements[0].disabled){var $4=$3.validate(eventName);if($4){Array.addRange($1,$4);}}}if(this.replaceValidationSummary){this.clearErrors();this.addErrors($1);}return $1;}}\nSys.Mvc.FieldContext=function(formContext){this.$A=[];this.elements=new Array(0);this.validations=new Array(0);this.formContext=formContext;this.$6=Function.createDelegate(this,this.$D);this.$7=Function.createDelegate(this,this.$E);this.$8=Function.createDelegate(this,this.$F);this.$9=Function.createDelegate(this,this.$10);}\nSys.Mvc.FieldContext.prototype={$6:null,$7:null,$8:null,$9:null,defaultErrorMessage:null,formContext:null,replaceValidationMessageContents:false,validationMessageElement:null,addError:function(message){this.addErrors([message]);},addErrors:function(messages){if(!Sys.Mvc._ValidationUtil.$0(messages)){Array.addRange(this.$A,messages);this.$14();}},clearErrors:function(){Array.clear(this.$A);this.$14();},$B:function(){var $0=this.validationMessageElement;if($0){if(this.replaceValidationMessageContents){Sys.Mvc._ValidationUtil.$4($0,this.$A[0]);}Sys.UI.DomElement.removeCssClass($0,'field-validation-valid');Sys.UI.DomElement.addCssClass($0,'field-validation-error');}var $1=this.elements;for(var $2=0;$2<$1.length;$2++){var $3=$1[$2];Sys.UI.DomElement.removeCssClass($3,'input-validation-valid');Sys.UI.DomElement.addCssClass($3,'input-validation-error');}},$C:function(){var $0=this.validationMessageElement;if($0){if(this.replaceValidationMessageContents){Sys.Mvc._ValidationUtil.$4($0,'');}Sys.UI.DomElement.removeCssClass($0,'field-validation-error');Sys.UI.DomElement.addCssClass($0,'field-validation-valid');}var $1=this.elements;for(var $2=0;$2<$1.length;$2++){var $3=$1[$2];Sys.UI.DomElement.removeCssClass($3,'input-validation-error');Sys.UI.DomElement.addCssClass($3,'input-validation-valid');}},$D:function($p0){if($p0.target['__MVC_HasTextChanged']||$p0.target['__MVC_HasValidationFired']){this.validate('blur');}},$E:function($p0){$p0.target['__MVC_HasTextChanged'] = true;},$F:function($p0){$p0.target['__MVC_HasTextChanged'] = true;if($p0.target['__MVC_HasValidationFired']){this.validate('input');}},$10:function($p0){if($p0.rawEvent.propertyName==='value'){$p0.target['__MVC_HasTextChanged'] = true;if($p0.target['__MVC_HasValidationFired']){this.validate('input');}}},enableDynamicValidation:function(){var $0=this.elements;for(var $1=0;$1<$0.length;$1++){var $2=$0[$1];if(Sys.Mvc._ValidationUtil.$2($2,'onpropertychange')){var $3=document.documentMode;if($3&&$3>=8){Sys.UI.DomEvent.addHandler($2,'propertychange',this.$9);}}else{Sys.UI.DomEvent.addHandler($2,'input',this.$8);}Sys.UI.DomEvent.addHandler($2,'change',this.$7);Sys.UI.DomEvent.addHandler($2,'blur',this.$6);}},$11:function($p0,$p1){var $0=$p1||this.defaultErrorMessage;if(Boolean.isInstanceOfType($p0)){return ($p0)?null:$0;}if(String.isInstanceOfType($p0)){return (($p0).length)?$p0:$0;}return null;},$12:function(){var $0=this.elements;return ($0.length>0)?$0[0].value:null;},$13:function(){var $0=this.elements;for(var $1=0;$1<$0.length;$1++){var $2=$0[$1];$2['__MVC_HasValidationFired'] = true;}},$14:function(){if(!this.$A.length){this.$C();}else{this.$B();}},validate:function(eventName){var $0=this.validations;var $1=[];var $2=this.$12();for(var $3=0;$3<$0.length;$3++){var $4=$0[$3];var $5=Sys.Mvc.$create_ValidationContext();$5.eventName=eventName;$5.fieldContext=this;$5.validation=$4;var $6=$4.validator($2,$5);var $7=this.$11($6,$4.fieldErrorMessage);if(!Sys.Mvc._ValidationUtil.$1($7)){Array.add($1,$7);}}this.$13();this.clearErrors();this.addErrors($1);return $1;}}\nSys.Mvc.RangeValidator=function(minimum,maximum){this.$0=minimum;this.$1=maximum;}\nSys.Mvc.RangeValidator.create=function(rule){var $0=rule.ValidationParameters['min'];var $1=rule.ValidationParameters['max'];return Function.createDelegate(new Sys.Mvc.RangeValidator($0,$1),new Sys.Mvc.RangeValidator($0,$1).validate);}\nSys.Mvc.RangeValidator.prototype={$0:null,$1:null,validate:function(value,context){if(Sys.Mvc._ValidationUtil.$1(value)){return true;}var $0=Number.parseLocale(value);return (!isNaN($0)&&this.$0<=$0&&$0<=this.$1);}}\nSys.Mvc.RegularExpressionValidator=function(pattern){this.$0=pattern;}\nSys.Mvc.RegularExpressionValidator.create=function(rule){var $0=rule.ValidationParameters['pattern'];return Function.createDelegate(new Sys.Mvc.RegularExpressionValidator($0),new Sys.Mvc.RegularExpressionValidator($0).validate);}\nSys.Mvc.RegularExpressionValidator.prototype={$0:null,validate:function(value,context){if(Sys.Mvc._ValidationUtil.$1(value)){return true;}var $0=new RegExp(this.$0);var $1=$0.exec(value);return (!Sys.Mvc._ValidationUtil.$0($1)&&$1[0].length===value.length);}}\nSys.Mvc.RequiredValidator=function(){}\nSys.Mvc.RequiredValidator.create=function(rule){return Function.createDelegate(new Sys.Mvc.RequiredValidator(),new Sys.Mvc.RequiredValidator().validate);}\nSys.Mvc.RequiredValidator.$0=function($p0){if($p0.tagName.toUpperCase()==='INPUT'){var $0=($p0.type).toUpperCase();if($0==='RADIO'){return true;}}return false;}\nSys.Mvc.RequiredValidator.$1=function($p0){if($p0.tagName.toUpperCase()==='SELECT'){return true;}return false;}\nSys.Mvc.RequiredValidator.$2=function($p0){if($p0.tagName.toUpperCase()==='INPUT'){var $0=($p0.type).toUpperCase();switch($0){case 'TEXT':case 'PASSWORD':case 'FILE':return true;}}if($p0.tagName.toUpperCase()==='TEXTAREA'){return true;}return false;}\nSys.Mvc.RequiredValidator.$3=function($p0){for(var $0=0;$0<$p0.length;$0++){var $1=$p0[$0];if($1.checked){return true;}}return false;}\nSys.Mvc.RequiredValidator.$4=function($p0){for(var $0=0;$0<$p0.length;$0++){var $1=$p0[$0];if($1.selected){if(!Sys.Mvc._ValidationUtil.$1($1.value)){return true;}}}return false;}\nSys.Mvc.RequiredValidator.$5=function($p0){return (!Sys.Mvc._ValidationUtil.$1($p0.value));}\nSys.Mvc.RequiredValidator.prototype={validate:function(value,context){var $0=context.fieldContext.elements;if(!$0.length){return true;}var $1=$0[0];if(Sys.Mvc.RequiredValidator.$2($1)){return Sys.Mvc.RequiredValidator.$5($1);}if(Sys.Mvc.RequiredValidator.$0($1)){return Sys.Mvc.RequiredValidator.$3($0);}if(Sys.Mvc.RequiredValidator.$1($1)){return Sys.Mvc.RequiredValidator.$4(($1).options);}return true;}}\nSys.Mvc.StringLengthValidator=function(minLength,maxLength){this.$1=minLength;this.$0=maxLength;}\nSys.Mvc.StringLengthValidator.create=function(rule){var $0=(rule.ValidationParameters['min']||0);var $1=(rule.ValidationParameters['max']||Number.MAX_VALUE);return Function.createDelegate(new Sys.Mvc.StringLengthValidator($0,$1),new Sys.Mvc.StringLengthValidator($0,$1).validate);}\nSys.Mvc.StringLengthValidator.prototype={$0:0,$1:0,validate:function(value,context){if(Sys.Mvc._ValidationUtil.$1(value)){return true;}return (this.$1<=value.length&&value.length<=this.$0);}}\nSys.Mvc._ValidationUtil=function(){}\nSys.Mvc._ValidationUtil.$0=function($p0){return (!$p0||!$p0.length);}\nSys.Mvc._ValidationUtil.$1=function($p0){return (!$p0||!$p0.length);}\nSys.Mvc._ValidationUtil.$2=function($p0,$p1){return ($p1 in $p0);}\nSys.Mvc._ValidationUtil.$3=function($p0){while($p0.firstChild){$p0.removeChild($p0.firstChild);}}\nSys.Mvc._ValidationUtil.$4=function($p0,$p1){var $0=document.createTextNode($p1);Sys.Mvc._ValidationUtil.$3($p0);$p0.appendChild($0);}\nSys.Mvc.ValidatorRegistry=function(){}\nSys.Mvc.ValidatorRegistry.getValidator=function(rule){var $0=Sys.Mvc.ValidatorRegistry.validators[rule.ValidationType];return ($0)?$0(rule):null;}\nSys.Mvc.ValidatorRegistry.$0=function(){return {required:Function.createDelegate(null,Sys.Mvc.RequiredValidator.create),length:Function.createDelegate(null,Sys.Mvc.StringLengthValidator.create),regex:Function.createDelegate(null,Sys.Mvc.RegularExpressionValidator.create),range:Function.createDelegate(null,Sys.Mvc.RangeValidator.create),number:Function.createDelegate(null,Sys.Mvc.NumberValidator.create)};}\nSys.Mvc.NumberValidator.registerClass('Sys.Mvc.NumberValidator');Sys.Mvc.FormContext.registerClass('Sys.Mvc.FormContext');Sys.Mvc.FieldContext.registerClass('Sys.Mvc.FieldContext');Sys.Mvc.RangeValidator.registerClass('Sys.Mvc.RangeValidator');Sys.Mvc.RegularExpressionValidator.registerClass('Sys.Mvc.RegularExpressionValidator');Sys.Mvc.RequiredValidator.registerClass('Sys.Mvc.RequiredValidator');Sys.Mvc.StringLengthValidator.registerClass('Sys.Mvc.StringLengthValidator');Sys.Mvc._ValidationUtil.registerClass('Sys.Mvc._ValidationUtil');Sys.Mvc.ValidatorRegistry.registerClass('Sys.Mvc.ValidatorRegistry');Sys.Mvc.ValidatorRegistry.validators=Sys.Mvc.ValidatorRegistry.$0();\n// ---- Do not remove this footer ----\n// Generated using Script# v0.5.0.0 (http://projects.nikhilk.net)\n// -----------------------------------\nSys.Application.add_load(function(){Sys.Application.remove_load(arguments.callee);Sys.Mvc.FormContext._Application_Load();});"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/DDDPPP.Chap20.CommandHandler.Presentation/Scripts/jquery-1.7.1.intellisense.js",
    "content": "/*!\n * Documentation Content\n * Copyright (c) 2009 Packt Publishing, http://packtpub.com/\n * Copyright (c) 2012 jQuery Foundation, http://jquery.org/\n * \n * This software consists of voluntary contributions made by many\n * individuals. For exact contribution history, see the revision history\n * and logs, available at http://github.com/jquery/api.jquery.com\n * \n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files (the\n * \"Software\"), to deal in the Software without restriction, including\n * without limitation the rights to use, copy, modify, merge, publish,\n * distribute, sublicense, and/or sell copies of the Software, and to\n * permit persons to whom the Software is furnished to do so, subject to\n * the following conditions:\n * \n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n * \n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n*/\nintellisense.annotate(jQuery, {\n  'ajax': function() {\n    /// <signature>\n    ///   <summary>Perform an asynchronous HTTP (Ajax) request.</summary>\n    ///   <param name=\"url\" type=\"String\">A string containing the URL to which the request is sent.</param>\n    ///   <param name=\"settings\" type=\"Object\">A set of key/value pairs that configure the Ajax request. All settings are optional. A default can be set for any option with $.ajaxSetup(). See jQuery.ajax( settings ) below for a complete list of all settings.</param>\n    ///   <returns type=\"jqXHR\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Perform an asynchronous HTTP (Ajax) request.</summary>\n    ///   <param name=\"settings\" type=\"Object\">A set of key/value pairs that configure the Ajax request. All settings are optional. A default can be set for any option with $.ajaxSetup().</param>\n    ///   <returns type=\"jqXHR\" />\n    /// </signature>\n  },\n  'ajaxPrefilter': function() {\n    /// <signature>\n    ///   <summary>Handle custom Ajax options or modify existing options before each request is sent and before they are processed by $.ajax().</summary>\n    ///   <param name=\"dataTypes\" type=\"String\">An optional string containing one or more space-separated dataTypes</param>\n    ///   <param name=\"handler(options, originalOptions, jqXHR)\" type=\"Function\">A handler to set default values for future Ajax requests.</param>\n    /// </signature>\n  },\n  'ajaxSetup': function() {\n    /// <signature>\n    ///   <summary>Set default values for future Ajax requests.</summary>\n    ///   <param name=\"options\" type=\"Object\">A set of key/value pairs that configure the default Ajax request. All options are optional.</param>\n    /// </signature>\n  },\n  'boxModel': function() {\n    /// <summary>Deprecated in jQuery 1.3 (see jQuery.support). States if the current page, in the user's browser, is being rendered using the W3C CSS Box Model.</summary>\n    /// <returns type=\"Boolean\" />\n  },\n  'browser': function() {\n    /// <summary>Contains flags for the useragent, read from navigator.userAgent. We recommend against using this property; please try to use feature detection instead (see jQuery.support). jQuery.browser may be moved to a plugin in a future release of jQuery.</summary>\n    /// <returns type=\"Map\" />\n  },\n  'browser.version': function() {\n    /// <summary>The version number of the rendering engine for the user's browser.</summary>\n    /// <returns type=\"String\" />\n  },\n  'Callbacks': function() {\n    /// <signature>\n    ///   <summary>A multi-purpose callbacks list object that provides a powerful way to manage callback lists.</summary>\n    ///   <param name=\"flags\" type=\"String\">An optional list of space-separated flags that change how the callback list behaves.</param>\n    /// </signature>\n  },\n  'contains': function() {\n    /// <signature>\n    ///   <summary>Check to see if a DOM element is within another DOM element.</summary>\n    ///   <param name=\"container\" type=\"Element\">The DOM element that may contain the other element.</param>\n    ///   <param name=\"contained\" type=\"Element\">The DOM element that may be contained by the other element.</param>\n    ///   <returns type=\"Boolean\" />\n    /// </signature>\n  },\n  'cssHooks': function() {\n    /// <summary>Hook directly into jQuery to override how particular CSS properties are retrieved or set, normalize CSS property naming, or create custom properties.</summary>\n    /// <returns type=\"Object\" />\n  },\n  'data': function() {\n    /// <signature>\n    ///   <summary>Returns value at named data store for the element, as set by jQuery.data(element, name, value), or the full data store for the element.</summary>\n    ///   <param name=\"element\" type=\"Element\">The DOM element to query for the data.</param>\n    ///   <param name=\"key\" type=\"String\">Name of the data stored.</param>\n    ///   <returns type=\"Object\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Returns value at named data store for the element, as set by jQuery.data(element, name, value), or the full data store for the element.</summary>\n    ///   <param name=\"element\" type=\"Element\">The DOM element to query for the data.</param>\n    ///   <returns type=\"Object\" />\n    /// </signature>\n  },\n  'dequeue': function() {\n    /// <signature>\n    ///   <summary>Execute the next function on the queue for the matched element.</summary>\n    ///   <param name=\"element\" type=\"Element\">A DOM element from which to remove and execute a queued function.</param>\n    ///   <param name=\"queueName\" type=\"String\">A string containing the name of the queue. Defaults to fx, the standard effects queue.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'each': function() {\n    /// <signature>\n    ///   <summary>A generic iterator function, which can be used to seamlessly iterate over both objects and arrays. Arrays and array-like objects with a length property (such as a function's arguments object) are iterated by numeric index, from 0 to length-1. Other objects are iterated via their named properties.</summary>\n    ///   <param name=\"collection\" type=\"Object\">The object or array to iterate over.</param>\n    ///   <param name=\"callback(indexInArray, valueOfElement)\" type=\"Function\">The function that will be executed on every object.</param>\n    ///   <returns type=\"Object\" />\n    /// </signature>\n  },\n  'error': function() {\n    /// <signature>\n    ///   <summary>Takes a string and throws an exception containing it.</summary>\n    ///   <param name=\"message\" type=\"String\">The message to send out.</param>\n    /// </signature>\n  },\n  'extend': function() {\n    /// <signature>\n    ///   <summary>Merge the contents of two or more objects together into the first object.</summary>\n    ///   <param name=\"target\" type=\"Object\">An object that will receive the new properties if additional objects are passed in or that will extend the jQuery namespace if it is the sole argument.</param>\n    ///   <param name=\"object1\" type=\"Object\">An object containing additional properties to merge in.</param>\n    ///   <param name=\"objectN\" type=\"Object\">Additional objects containing properties to merge in.</param>\n    ///   <returns type=\"Object\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Merge the contents of two or more objects together into the first object.</summary>\n    ///   <param name=\"deep\" type=\"Boolean\">If true, the merge becomes recursive (aka. deep copy).</param>\n    ///   <param name=\"target\" type=\"Object\">The object to extend. It will receive the new properties.</param>\n    ///   <param name=\"object1\" type=\"Object\">An object containing additional properties to merge in.</param>\n    ///   <param name=\"objectN\" type=\"Object\">Additional objects containing properties to merge in.</param>\n    ///   <returns type=\"Object\" />\n    /// </signature>\n  },\n  'get': function() {\n    /// <signature>\n    ///   <summary>Load data from the server using a HTTP GET request.</summary>\n    ///   <param name=\"url\" type=\"String\">A string containing the URL to which the request is sent.</param>\n    ///   <param name=\"data\" type=\"String\">A map or string that is sent to the server with the request.</param>\n    ///   <param name=\"success(data, textStatus, jqXHR)\" type=\"Function\">A callback function that is executed if the request succeeds.</param>\n    ///   <param name=\"dataType\" type=\"String\">The type of data expected from the server. Default: Intelligent Guess (xml, json, script, or html).</param>\n    ///   <returns type=\"jqXHR\" />\n    /// </signature>\n  },\n  'getJSON': function() {\n    /// <signature>\n    ///   <summary>Load JSON-encoded data from the server using a GET HTTP request.</summary>\n    ///   <param name=\"url\" type=\"String\">A string containing the URL to which the request is sent.</param>\n    ///   <param name=\"data\" type=\"Object\">A map or string that is sent to the server with the request.</param>\n    ///   <param name=\"success(data, textStatus, jqXHR)\" type=\"Function\">A callback function that is executed if the request succeeds.</param>\n    ///   <returns type=\"jqXHR\" />\n    /// </signature>\n  },\n  'getScript': function() {\n    /// <signature>\n    ///   <summary>Load a JavaScript file from the server using a GET HTTP request, then execute it.</summary>\n    ///   <param name=\"url\" type=\"String\">A string containing the URL to which the request is sent.</param>\n    ///   <param name=\"success(script, textStatus, jqXHR)\" type=\"Function\">A callback function that is executed if the request succeeds.</param>\n    ///   <returns type=\"jqXHR\" />\n    /// </signature>\n  },\n  'globalEval': function() {\n    /// <signature>\n    ///   <summary>Execute some JavaScript code globally.</summary>\n    ///   <param name=\"code\" type=\"String\">The JavaScript code to execute.</param>\n    /// </signature>\n  },\n  'grep': function() {\n    /// <signature>\n    ///   <summary>Finds the elements of an array which satisfy a filter function. The original array is not affected.</summary>\n    ///   <param name=\"array\" type=\"Array\">The array to search through.</param>\n    ///   <param name=\"function(elementOfArray, indexInArray)\" type=\"Function\">The function to process each item against.  The first argument to the function is the item, and the second argument is the index.  The function should return a Boolean value.  this will be the global window object.</param>\n    ///   <param name=\"invert\" type=\"Boolean\">If \"invert\" is false, or not provided, then the function returns an array consisting of all elements for which \"callback\" returns true.  If \"invert\" is true, then the function returns an array consisting of all elements for which \"callback\" returns false.</param>\n    ///   <returns type=\"Array\" />\n    /// </signature>\n  },\n  'hasData': function() {\n    /// <signature>\n    ///   <summary>Determine whether an element has any jQuery data associated with it.</summary>\n    ///   <param name=\"element\" type=\"Element\">A DOM element to be checked for data.</param>\n    ///   <returns type=\"Boolean\" />\n    /// </signature>\n  },\n  'holdReady': function() {\n    /// <signature>\n    ///   <summary>Holds or releases the execution of jQuery's ready event.</summary>\n    ///   <param name=\"hold\" type=\"Boolean\">Indicates whether the ready hold is being requested or released</param>\n    /// </signature>\n  },\n  'inArray': function() {\n    /// <signature>\n    ///   <summary>Search for a specified value within an array and return its index (or -1 if not found).</summary>\n    ///   <param name=\"value\" type=\"Object\">The value to search for.</param>\n    ///   <param name=\"array\" type=\"Array\">An array through which to search.</param>\n    ///   <param name=\"fromIndex\" type=\"Number\">The index of the array at which to begin the search. The default is 0, which will search the whole array.</param>\n    ///   <returns type=\"Number\" />\n    /// </signature>\n  },\n  'isArray': function() {\n    /// <signature>\n    ///   <summary>Determine whether the argument is an array.</summary>\n    ///   <param name=\"obj\" type=\"Object\">Object to test whether or not it is an array.</param>\n    ///   <returns type=\"boolean\" />\n    /// </signature>\n  },\n  'isEmptyObject': function() {\n    /// <signature>\n    ///   <summary>Check to see if an object is empty (contains no properties).</summary>\n    ///   <param name=\"object\" type=\"Object\">The object that will be checked to see if it's empty.</param>\n    ///   <returns type=\"Boolean\" />\n    /// </signature>\n  },\n  'isFunction': function() {\n    /// <signature>\n    ///   <summary>Determine if the argument passed is a Javascript function object.</summary>\n    ///   <param name=\"obj\" type=\"Object\">Object to test whether or not it is a function.</param>\n    ///   <returns type=\"boolean\" />\n    /// </signature>\n  },\n  'isNumeric': function() {\n    /// <signature>\n    ///   <summary>Determines whether its argument is a number.</summary>\n    ///   <param name=\"value\" type=\"Object\">The value to be tested.</param>\n    ///   <returns type=\"Boolean\" />\n    /// </signature>\n  },\n  'isPlainObject': function() {\n    /// <signature>\n    ///   <summary>Check to see if an object is a plain object (created using \"{}\" or \"new Object\").</summary>\n    ///   <param name=\"object\" type=\"Object\">The object that will be checked to see if it's a plain object.</param>\n    ///   <returns type=\"Boolean\" />\n    /// </signature>\n  },\n  'isWindow': function() {\n    /// <signature>\n    ///   <summary>Determine whether the argument is a window.</summary>\n    ///   <param name=\"obj\" type=\"Object\">Object to test whether or not it is a window.</param>\n    ///   <returns type=\"boolean\" />\n    /// </signature>\n  },\n  'isXMLDoc': function() {\n    /// <signature>\n    ///   <summary>Check to see if a DOM node is within an XML document (or is an XML document).</summary>\n    ///   <param name=\"node\" type=\"Element\">The DOM node that will be checked to see if it's in an XML document.</param>\n    ///   <returns type=\"Boolean\" />\n    /// </signature>\n  },\n  'makeArray': function() {\n    /// <signature>\n    ///   <summary>Convert an array-like object into a true JavaScript array.</summary>\n    ///   <param name=\"obj\" type=\"Object\">Any object to turn into a native Array.</param>\n    ///   <returns type=\"Array\" />\n    /// </signature>\n  },\n  'map': function() {\n    /// <signature>\n    ///   <summary>Translate all items in an array or object to new array of items.</summary>\n    ///   <param name=\"array\" type=\"Array\">The Array to translate.</param>\n    ///   <param name=\"callback(elementOfArray, indexInArray)\" type=\"Function\">The function to process each item against.  The first argument to the function is the array item, the second argument is the index in array The function can return any value. Within the function, this refers to the global (window) object.</param>\n    ///   <returns type=\"Array\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Translate all items in an array or object to new array of items.</summary>\n    ///   <param name=\"arrayOrObject\" type=\"Object\">The Array or Object to translate.</param>\n    ///   <param name=\"callback( value, indexOrKey )\" type=\"Function\">The function to process each item against.  The first argument to the function is the value; the second argument is the index or key of the array or object property. The function can return any value to add to the array. A returned array will be flattened into the resulting array. Within the function, this refers to the global (window) object.</param>\n    ///   <returns type=\"Array\" />\n    /// </signature>\n  },\n  'merge': function() {\n    /// <signature>\n    ///   <summary>Merge the contents of two arrays together into the first array.</summary>\n    ///   <param name=\"first\" type=\"Array\">The first array to merge, the elements of second added.</param>\n    ///   <param name=\"second\" type=\"Array\">The second array to merge into the first, unaltered.</param>\n    ///   <returns type=\"Array\" />\n    /// </signature>\n  },\n  'noConflict': function() {\n    /// <signature>\n    ///   <summary>Relinquish jQuery's control of the $ variable.</summary>\n    ///   <param name=\"removeAll\" type=\"Boolean\">A Boolean indicating whether to remove all jQuery variables from the global scope (including jQuery itself).</param>\n    ///   <returns type=\"Object\" />\n    /// </signature>\n  },\n  'noop': function() {\n    /// <summary>An empty function.</summary>\n    /// <returns type=\"Function\" />\n  },\n  'now': function() {\n    /// <summary>Return a number representing the current time.</summary>\n    /// <returns type=\"Number\" />\n  },\n  'param': function() {\n    /// <signature>\n    ///   <summary>Create a serialized representation of an array or object, suitable for use in a URL query string or Ajax request.</summary>\n    ///   <param name=\"obj\" type=\"Object\">An array or object to serialize.</param>\n    ///   <returns type=\"String\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Create a serialized representation of an array or object, suitable for use in a URL query string or Ajax request.</summary>\n    ///   <param name=\"obj\" type=\"Object\">An array or object to serialize.</param>\n    ///   <param name=\"traditional\" type=\"Boolean\">A Boolean indicating whether to perform a traditional \"shallow\" serialization.</param>\n    ///   <returns type=\"String\" />\n    /// </signature>\n  },\n  'parseJSON': function() {\n    /// <signature>\n    ///   <summary>Takes a well-formed JSON string and returns the resulting JavaScript object.</summary>\n    ///   <param name=\"json\" type=\"String\">The JSON string to parse.</param>\n    ///   <returns type=\"Object\" />\n    /// </signature>\n  },\n  'parseXML': function() {\n    /// <signature>\n    ///   <summary>Parses a string into an XML document.</summary>\n    ///   <param name=\"data\" type=\"String\">a well-formed XML string to be parsed</param>\n    ///   <returns type=\"XMLDocument\" />\n    /// </signature>\n  },\n  'post': function() {\n    /// <signature>\n    ///   <summary>Load data from the server using a HTTP POST request.</summary>\n    ///   <param name=\"url\" type=\"String\">A string containing the URL to which the request is sent.</param>\n    ///   <param name=\"data\" type=\"String\">A map or string that is sent to the server with the request.</param>\n    ///   <param name=\"success(data, textStatus, jqXHR)\" type=\"Function\">A callback function that is executed if the request succeeds.</param>\n    ///   <param name=\"dataType\" type=\"String\">The type of data expected from the server. Default: Intelligent Guess (xml, json, script, text, html).</param>\n    ///   <returns type=\"jqXHR\" />\n    /// </signature>\n  },\n  'proxy': function() {\n    /// <signature>\n    ///   <summary>Takes a function and returns a new one that will always have a particular context.</summary>\n    ///   <param name=\"function\" type=\"Function\">The function whose context will be changed.</param>\n    ///   <param name=\"context\" type=\"Object\">The object to which the context (this) of the function should be set.</param>\n    ///   <returns type=\"Function\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Takes a function and returns a new one that will always have a particular context.</summary>\n    ///   <param name=\"context\" type=\"Object\">The object to which the context of the function should be set.</param>\n    ///   <param name=\"name\" type=\"String\">The name of the function whose context will be changed (should be a property of the context object).</param>\n    ///   <returns type=\"Function\" />\n    /// </signature>\n  },\n  'queue': function() {\n    /// <signature>\n    ///   <summary>Manipulate the queue of functions to be executed on the matched element.</summary>\n    ///   <param name=\"element\" type=\"Element\">A DOM element where the array of queued functions is attached.</param>\n    ///   <param name=\"queueName\" type=\"String\">A string containing the name of the queue. Defaults to fx, the standard effects queue.</param>\n    ///   <param name=\"newQueue\" type=\"Array\">An array of functions to replace the current queue contents.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Manipulate the queue of functions to be executed on the matched element.</summary>\n    ///   <param name=\"element\" type=\"Element\">A DOM element on which to add a queued function.</param>\n    ///   <param name=\"queueName\" type=\"String\">A string containing the name of the queue. Defaults to fx, the standard effects queue.</param>\n    ///   <param name=\"callback()\" type=\"Function\">The new function to add to the queue.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'removeData': function() {\n    /// <signature>\n    ///   <summary>Remove a previously-stored piece of data.</summary>\n    ///   <param name=\"element\" type=\"Element\">A DOM element from which to remove data.</param>\n    ///   <param name=\"name\" type=\"String\">A string naming the piece of data to remove.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'sub': function() {\n    /// <summary>Creates a new copy of jQuery whose properties and methods can be modified without affecting the original jQuery object.</summary>\n    /// <returns type=\"jQuery\" />\n  },\n  'support': function() {\n    /// <summary>A collection of properties that represent the presence of different browser features or bugs. Primarily intended for jQuery's internal use; specific properties may be removed when they are no longer needed internally to improve page startup performance.</summary>\n    /// <returns type=\"Object\" />\n  },\n  'trim': function() {\n    /// <signature>\n    ///   <summary>Remove the whitespace from the beginning and end of a string.</summary>\n    ///   <param name=\"str\" type=\"String\">The string to trim.</param>\n    ///   <returns type=\"String\" />\n    /// </signature>\n  },\n  'type': function() {\n    /// <signature>\n    ///   <summary>Determine the internal JavaScript [[Class]] of an object.</summary>\n    ///   <param name=\"obj\" type=\"Object\">Object to get the internal JavaScript [[Class]] of.</param>\n    ///   <returns type=\"String\" />\n    /// </signature>\n  },\n  'unique': function() {\n    /// <signature>\n    ///   <summary>Sorts an array of DOM elements, in place, with the duplicates removed. Note that this only works on arrays of DOM elements, not strings or numbers.</summary>\n    ///   <param name=\"array\" type=\"Array\">The Array of DOM elements.</param>\n    ///   <returns type=\"Array\" />\n    /// </signature>\n  },\n  'when': function() {\n    /// <signature>\n    ///   <summary>Provides a way to execute callback functions based on one or more objects, usually Deferred objects that represent asynchronous events.</summary>\n    ///   <param name=\"deferreds\" type=\"Deferred\">One or more Deferred objects, or plain JavaScript objects.</param>\n    ///   <returns type=\"Promise\" />\n    /// </signature>\n  },\n});\n\nvar _1228819969 = jQuery.Callbacks;\njQuery.Callbacks = function(flags) {\nvar _object = _1228819969(flags);\nintellisense.annotate(_object, {\n  'add': function() {\n    /// <signature>\n    ///   <summary>Add a callback or a collection of callbacks to a callback list.</summary>\n    ///   <param name=\"callbacks\" type=\"Function\">A function, or array of functions, that are to be added to the callback list.</param>\n    /// </signature>\n  },\n  'disable': function() {\n    /// <summary>Disable a callback list from doing anything more.</summary>\n  },\n  'empty': function() {\n    /// <summary>Remove all of the callbacks from a list.</summary>\n  },\n  'fire': function() {\n    /// <signature>\n    ///   <summary>Call all of the callbacks with the given arguments</summary>\n    ///   <param name=\"arguments\" type=\"\">The argument or list of arguments to pass back to the callback list.</param>\n    /// </signature>\n  },\n  'fired': function() {\n    /// <summary>Determine if the callbacks have already been called at least once.</summary>\n    /// <returns type=\"Boolean\" />\n  },\n  'fireWith': function() {\n    /// <signature>\n    ///   <summary>Call all callbacks in a list with the given context and arguments.</summary>\n    ///   <param name=\"context\" type=\"\">A reference to the context in which the callbacks in the list should be fired.</param>\n    ///   <param name=\"args\" type=\"\">An argument, or array of arguments, to pass to the callbacks in the list.</param>\n    /// </signature>\n  },\n  'has': function() {\n    /// <signature>\n    ///   <summary>Determine whether a supplied callback is in a list</summary>\n    ///   <param name=\"callback\" type=\"Function\">The callback to search for.</param>\n    ///   <returns type=\"Boolean\" />\n    /// </signature>\n  },\n  'lock': function() {\n    /// <summary>Lock a callback list in its current state.</summary>\n  },\n  'locked': function() {\n    /// <summary>Determine if the callbacks list has been locked.</summary>\n    /// <returns type=\"Boolean\" />\n  },\n  'remove': function() {\n    /// <signature>\n    ///   <summary>Remove a callback or a collection of callbacks from a callback list.</summary>\n    ///   <param name=\"callbacks\" type=\"Function\">A function, or array of functions, that are to be removed from the callback list.</param>\n    /// </signature>\n  },\n});\n\nreturn _object;\n};\n\nvar _731531622 = jQuery.Deferred;\njQuery.Deferred = function(func) {\nvar _object = _731531622(func);\nintellisense.annotate(_object, {\n  'always': function() {\n    /// <signature>\n    ///   <summary>Add handlers to be called when the Deferred object is either resolved or rejected.</summary>\n    ///   <param name=\"alwaysCallbacks\" type=\"Function\">A function, or array of functions, that is called when the Deferred is resolved or rejected.</param>\n    ///   <param name=\"alwaysCallbacks\" type=\"Function\">Optional additional functions, or arrays of functions, that are called when the Deferred is resolved or rejected.</param>\n    ///   <returns type=\"Deferred\" />\n    /// </signature>\n  },\n  'done': function() {\n    /// <signature>\n    ///   <summary>Add handlers to be called when the Deferred object is resolved.</summary>\n    ///   <param name=\"doneCallbacks\" type=\"Function\">A function, or array of functions, that are called when the Deferred is resolved.</param>\n    ///   <param name=\"doneCallbacks\" type=\"Function\">Optional additional functions, or arrays of functions, that are called when the Deferred is resolved.</param>\n    ///   <returns type=\"Deferred\" />\n    /// </signature>\n  },\n  'fail': function() {\n    /// <signature>\n    ///   <summary>Add handlers to be called when the Deferred object is rejected.</summary>\n    ///   <param name=\"failCallbacks\" type=\"Function\">A function, or array of functions, that are called when the Deferred is rejected.</param>\n    ///   <param name=\"failCallbacks\" type=\"Function\">Optional additional functions, or arrays of functions, that are called when the Deferred is rejected.</param>\n    ///   <returns type=\"Deferred\" />\n    /// </signature>\n  },\n  'isRejected': function() {\n    /// <summary>Determine whether a Deferred object has been rejected.</summary>\n    /// <returns type=\"Boolean\" />\n  },\n  'isResolved': function() {\n    /// <summary>Determine whether a Deferred object has been resolved.</summary>\n    /// <returns type=\"Boolean\" />\n  },\n  'notify': function() {\n    /// <signature>\n    ///   <summary>Call the progressCallbacks on a Deferred object with the given args.</summary>\n    ///   <param name=\"args\" type=\"Object\">Optional arguments that are passed to the progressCallbacks.</param>\n    ///   <returns type=\"Deferred\" />\n    /// </signature>\n  },\n  'notifyWith': function() {\n    /// <signature>\n    ///   <summary>Call the progressCallbacks on a Deferred object with the given context and args.</summary>\n    ///   <param name=\"context\" type=\"Object\">Context passed to the progressCallbacks as the this object.</param>\n    ///   <param name=\"args\" type=\"Object\">Optional arguments that are passed to the progressCallbacks.</param>\n    ///   <returns type=\"Deferred\" />\n    /// </signature>\n  },\n  'pipe': function() {\n    /// <signature>\n    ///   <summary>Utility method to filter and/or chain Deferreds.</summary>\n    ///   <param name=\"doneFilter\" type=\"Function\">An optional function that is called when the Deferred is resolved.</param>\n    ///   <param name=\"failFilter\" type=\"Function\">An optional function that is called when the Deferred is rejected.</param>\n    ///   <returns type=\"Promise\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Utility method to filter and/or chain Deferreds.</summary>\n    ///   <param name=\"doneFilter\" type=\"Function\">An optional function that is called when the Deferred is resolved.</param>\n    ///   <param name=\"failFilter\" type=\"Function\">An optional function that is called when the Deferred is rejected.</param>\n    ///   <param name=\"progressFilter\" type=\"Function\">An optional function that is called when progress notifications are sent to the Deferred.</param>\n    ///   <returns type=\"Promise\" />\n    /// </signature>\n  },\n  'progress': function() {\n    /// <signature>\n    ///   <summary>Add handlers to be called when the Deferred object generates progress notifications.</summary>\n    ///   <param name=\"progressCallbacks\" type=\"Function\">A function, or array of functions, that is called when the Deferred generates progress notifications.</param>\n    ///   <returns type=\"Deferred\" />\n    /// </signature>\n  },\n  'promise': function() {\n    /// <signature>\n    ///   <summary>Return a Deferred's Promise object.</summary>\n    ///   <param name=\"target\" type=\"Object\">Object onto which the promise methods have to be attached</param>\n    ///   <returns type=\"Promise\" />\n    /// </signature>\n  },\n  'reject': function() {\n    /// <signature>\n    ///   <summary>Reject a Deferred object and call any failCallbacks with the given args.</summary>\n    ///   <param name=\"args\" type=\"Object\">Optional arguments that are passed to the failCallbacks.</param>\n    ///   <returns type=\"Deferred\" />\n    /// </signature>\n  },\n  'rejectWith': function() {\n    /// <signature>\n    ///   <summary>Reject a Deferred object and call any failCallbacks with the given context and args.</summary>\n    ///   <param name=\"context\" type=\"Object\">Context passed to the failCallbacks as the this object.</param>\n    ///   <param name=\"args\" type=\"Array\">An optional array of arguments that are passed to the failCallbacks.</param>\n    ///   <returns type=\"Deferred\" />\n    /// </signature>\n  },\n  'resolve': function() {\n    /// <signature>\n    ///   <summary>Resolve a Deferred object and call any doneCallbacks with the given args.</summary>\n    ///   <param name=\"args\" type=\"Object\">Optional arguments that are passed to the doneCallbacks.</param>\n    ///   <returns type=\"Deferred\" />\n    /// </signature>\n  },\n  'resolveWith': function() {\n    /// <signature>\n    ///   <summary>Resolve a Deferred object and call any doneCallbacks with the given context and args.</summary>\n    ///   <param name=\"context\" type=\"Object\">Context passed to the doneCallbacks as the this object.</param>\n    ///   <param name=\"args\" type=\"Array\">An optional array of arguments that are passed to the doneCallbacks.</param>\n    ///   <returns type=\"Deferred\" />\n    /// </signature>\n  },\n  'state': function() {\n    /// <summary>Determine the current state of a Deferred object.</summary>\n    /// <returns type=\"String\" />\n  },\n  'then': function() {\n    /// <signature>\n    ///   <summary>Add handlers to be called when the Deferred object is resolved or rejected.</summary>\n    ///   <param name=\"doneCallbacks\" type=\"Function\">A function, or array of functions, called when the Deferred is resolved.</param>\n    ///   <param name=\"failCallbacks\" type=\"Function\">A function, or array of functions, called when the Deferred is rejected.</param>\n    ///   <returns type=\"Deferred\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Add handlers to be called when the Deferred object is resolved or rejected.</summary>\n    ///   <param name=\"doneCallbacks\" type=\"Function\">A function, or array of functions, called when the Deferred is resolved.</param>\n    ///   <param name=\"failCallbacks\" type=\"Function\">A function, or array of functions, called when the Deferred is rejected.</param>\n    ///   <param name=\"progressCallbacks\" type=\"Function\">A function, or array of functions, called when the Deferred notifies progress.</param>\n    ///   <returns type=\"Deferred\" />\n    /// </signature>\n  },\n});\n\nreturn _object;\n};\n\nintellisense.annotate(jQuery.Event.prototype, {\n  'currentTarget': function() {\n    /// <summary>The current DOM element within the event bubbling phase.</summary>\n    /// <returns type=\"Element\" />\n  },\n  'data': function() {\n    /// <summary>An optional data map passed to an event method when the current executing handler is bound.</summary>\n  },\n  'delegateTarget': function() {\n    /// <summary>The element where the currently-called jQuery event handler was attached.</summary>\n    /// <returns type=\"Element\" />\n  },\n  'isDefaultPrevented': function() {\n    /// <summary>Returns whether event.preventDefault() was ever called on this event object.</summary>\n    /// <returns type=\"Boolean\" />\n  },\n  'isImmediatePropagationStopped': function() {\n    /// <summary>Returns whether event.stopImmediatePropagation() was ever called on this event object.</summary>\n    /// <returns type=\"Boolean\" />\n  },\n  'isPropagationStopped': function() {\n    /// <summary>Returns whether event.stopPropagation() was ever called on this event object.</summary>\n    /// <returns type=\"Boolean\" />\n  },\n  'namespace': function() {\n    /// <summary>The namespace specified when the event was triggered.</summary>\n    /// <returns type=\"String\" />\n  },\n  'pageX': function() {\n    /// <summary>The mouse position relative to the left edge of the document.</summary>\n    /// <returns type=\"Number\" />\n  },\n  'pageY': function() {\n    /// <summary>The mouse position relative to the top edge of the document.</summary>\n    /// <returns type=\"Number\" />\n  },\n  'preventDefault': function() {\n    /// <summary>If this method is called, the default action of the event will not be triggered.</summary>\n  },\n  'relatedTarget': function() {\n    /// <summary>The other DOM element involved in the event, if any.</summary>\n    /// <returns type=\"Element\" />\n  },\n  'result': function() {\n    /// <summary>The last value returned by an event handler that was triggered by this event, unless the value was undefined.</summary>\n    /// <returns type=\"Object\" />\n  },\n  'stopImmediatePropagation': function() {\n    /// <summary>Keeps the rest of the handlers from being executed and prevents the event from bubbling up the DOM tree.</summary>\n  },\n  'stopPropagation': function() {\n    /// <summary>Prevents the event from bubbling up the DOM tree, preventing any parent handlers from being notified of the event.</summary>\n  },\n  'target': function() {\n    /// <summary>The DOM element that initiated the event.</summary>\n    /// <returns type=\"Element\" />\n  },\n  'timeStamp': function() {\n    /// <summary>The difference in milliseconds between the time the browser created the event and January 1, 1970.</summary>\n    /// <returns type=\"Number\" />\n  },\n  'type': function() {\n    /// <summary>Describes the nature of the event.</summary>\n    /// <returns type=\"String\" />\n  },\n  'which': function() {\n    /// <summary>For key or mouse events, this property indicates the specific key or button that was pressed.</summary>\n    /// <returns type=\"Number\" />\n  },\n});\n\nintellisense.annotate(jQuery.fn, {\n  'add': function() {\n    /// <signature>\n    ///   <summary>Add elements to the set of matched elements.</summary>\n    ///   <param name=\"selector\" type=\"String\">A string representing a selector expression to find additional elements to add to the set of matched elements.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Add elements to the set of matched elements.</summary>\n    ///   <param name=\"elements\" type=\"Array\">One or more elements to add to the set of matched elements.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Add elements to the set of matched elements.</summary>\n    ///   <param name=\"html\" type=\"String\">An HTML fragment to add to the set of matched elements.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Add elements to the set of matched elements.</summary>\n    ///   <param name=\"jQuery object\" type=\"jQuery object \">An existing jQuery object to add to the set of matched elements.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Add elements to the set of matched elements.</summary>\n    ///   <param name=\"selector\" type=\"String\">A string representing a selector expression to find additional elements to add to the set of matched elements.</param>\n    ///   <param name=\"context\" type=\"Element\">The point in the document at which the selector should begin matching; similar to the context argument of the $(selector, context) method.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'addClass': function() {\n    /// <signature>\n    ///   <summary>Adds the specified class(es) to each of the set of matched elements.</summary>\n    ///   <param name=\"className\" type=\"String\">One or more class names to be added to the class attribute of each matched element.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Adds the specified class(es) to each of the set of matched elements.</summary>\n    ///   <param name=\"function(index, currentClass)\" type=\"Function\">A function returning one or more space-separated class names to be added to the existing class name(s). Receives the index position of the element in the set and the existing class name(s) as arguments. Within the function, this refers to the current element in the set.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'after': function() {\n    /// <signature>\n    ///   <summary>Insert content, specified by the parameter, after each element in the set of matched elements.</summary>\n    ///   <param name=\"content\" type=\"jQuery\">HTML string, DOM element, or jQuery object to insert after each element in the set of matched elements.</param>\n    ///   <param name=\"content\" type=\"jQuery\">One or more additional DOM elements, arrays of elements, HTML strings, or jQuery objects to insert after each element in the set of matched elements.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Insert content, specified by the parameter, after each element in the set of matched elements.</summary>\n    ///   <param name=\"function(index)\" type=\"Function\">A function that returns an HTML string, DOM element(s), or jQuery object to insert after each element in the set of matched elements. Receives the index position of the element in the set as an argument. Within the function, this refers to the current element in the set.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'ajaxComplete': function() {\n    /// <signature>\n    ///   <summary>Register a handler to be called when Ajax requests complete. This is an Ajax Event.</summary>\n    ///   <param name=\"handler(event, XMLHttpRequest, ajaxOptions)\" type=\"Function\">The function to be invoked.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'ajaxError': function() {\n    /// <signature>\n    ///   <summary>Register a handler to be called when Ajax requests complete with an error. This is an Ajax Event.</summary>\n    ///   <param name=\"handler(event, jqXHR, ajaxSettings, thrownError)\" type=\"Function\">The function to be invoked.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'ajaxSend': function() {\n    /// <signature>\n    ///   <summary>Attach a function to be executed before an Ajax request is sent. This is an Ajax Event.</summary>\n    ///   <param name=\"handler(event, jqXHR, ajaxOptions)\" type=\"Function\">The function to be invoked.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'ajaxStart': function() {\n    /// <signature>\n    ///   <summary>Register a handler to be called when the first Ajax request begins. This is an Ajax Event.</summary>\n    ///   <param name=\"handler()\" type=\"Function\">The function to be invoked.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'ajaxStop': function() {\n    /// <signature>\n    ///   <summary>Register a handler to be called when all Ajax requests have completed. This is an Ajax Event.</summary>\n    ///   <param name=\"handler()\" type=\"Function\">The function to be invoked.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'ajaxSuccess': function() {\n    /// <signature>\n    ///   <summary>Attach a function to be executed whenever an Ajax request completes successfully. This is an Ajax Event.</summary>\n    ///   <param name=\"handler(event, XMLHttpRequest, ajaxOptions)\" type=\"Function\">The function to be invoked.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'all': function() {\n    /// <summary>Selects all elements.</summary>\n  },\n  'andSelf': function() {\n    /// <summary>Add the previous set of elements on the stack to the current set.</summary>\n    /// <returns type=\"jQuery\" />\n  },\n  'animate': function() {\n    /// <signature>\n    ///   <summary>Perform a custom animation of a set of CSS properties.</summary>\n    ///   <param name=\"properties\" type=\"Object\">A map of CSS properties that the animation will move toward.</param>\n    ///   <param name=\"duration\" type=\"Number\">A string or number determining how long the animation will run.</param>\n    ///   <param name=\"easing\" type=\"String\">A string indicating which easing function to use for the transition.</param>\n    ///   <param name=\"complete\" type=\"Function\">A function to call once the animation is complete.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Perform a custom animation of a set of CSS properties.</summary>\n    ///   <param name=\"properties\" type=\"Object\">A map of CSS properties that the animation will move toward.</param>\n    ///   <param name=\"options\" type=\"Object\">A map of additional options to pass to the method. Supported keys:          duration: A string or number determining how long the animation will run.easing: A string indicating which easing function to use for the transition.complete: A function to call once the animation is complete.step: A function to be called after each step of the animation.queue: A Boolean indicating whether to place the animation in the effects queue. If false, the animation will begin immediately. As of jQuery 1.7, the queue option can also accept a string, in which case the animation is added to the queue represented by that string.specialEasing: A map of one or more of the CSS properties defined by the properties argument and their corresponding easing functions (added 1.4).</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'animated': function() {\n    /// <summary>Select all elements that are in the progress of an animation at the time the selector is run.</summary>\n  },\n  'append': function() {\n    /// <signature>\n    ///   <summary>Insert content, specified by the parameter, to the end of each element in the set of matched elements.</summary>\n    ///   <param name=\"content\" type=\"jQuery\">DOM element, HTML string, or jQuery object to insert at the end of each element in the set of matched elements.</param>\n    ///   <param name=\"content\" type=\"jQuery\">One or more additional DOM elements, arrays of elements, HTML strings, or jQuery objects to insert at the end of each element in the set of matched elements.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Insert content, specified by the parameter, to the end of each element in the set of matched elements.</summary>\n    ///   <param name=\"function(index, html)\" type=\"Function\">A function that returns an HTML string, DOM element(s), or jQuery object to insert at the end of each element in the set of matched elements. Receives the index position of the element in the set and the old HTML value of the element as arguments. Within the function, this refers to the current element in the set.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'appendTo': function() {\n    /// <signature>\n    ///   <summary>Insert every element in the set of matched elements to the end of the target.</summary>\n    ///   <param name=\"target\" type=\"jQuery\">A selector, element, HTML string, or jQuery object; the matched set of elements will be inserted at the end of the element(s) specified by this parameter.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'attr': function() {\n    /// <signature>\n    ///   <summary>Set one or more attributes for the set of matched elements.</summary>\n    ///   <param name=\"attributeName\" type=\"String\">The name of the attribute to set.</param>\n    ///   <param name=\"value\" type=\"Number\">A value to set for the attribute.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Set one or more attributes for the set of matched elements.</summary>\n    ///   <param name=\"map\" type=\"Object\">A map of attribute-value pairs to set.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Set one or more attributes for the set of matched elements.</summary>\n    ///   <param name=\"attributeName\" type=\"String\">The name of the attribute to set.</param>\n    ///   <param name=\"function(index, attr)\" type=\"Function\">A function returning the value to set. this is the current element. Receives the index position of the element in the set and the old attribute value as arguments.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'attributeContains': function() {\n    /// <signature>\n    ///   <summary>Selects elements that have the specified attribute with a value containing the a given substring.</summary>\n    ///   <param name=\"attribute\" type=\"String\">An attribute name.</param>\n    ///   <param name=\"value\" type=\"String\">An attribute value. Can be either an unquoted single word or a quoted string.</param>\n    /// </signature>\n  },\n  'attributeContainsPrefix': function() {\n    /// <signature>\n    ///   <summary>Selects elements that have the specified attribute with a value either equal to a given string or starting with that string followed by a hyphen (-).</summary>\n    ///   <param name=\"attribute\" type=\"String\">An attribute name.</param>\n    ///   <param name=\"value\" type=\"String\">An attribute value. Can be either an unquoted single word or a quoted string.</param>\n    /// </signature>\n  },\n  'attributeContainsWord': function() {\n    /// <signature>\n    ///   <summary>Selects elements that have the specified attribute with a value containing a given word, delimited by spaces.</summary>\n    ///   <param name=\"attribute\" type=\"String\">An attribute name.</param>\n    ///   <param name=\"value\" type=\"String\">An attribute value. Can be either an unquoted single word or a quoted string.</param>\n    /// </signature>\n  },\n  'attributeEndsWith': function() {\n    /// <signature>\n    ///   <summary>Selects elements that have the specified attribute with a value ending exactly with a given string. The comparison is case sensitive.</summary>\n    ///   <param name=\"attribute\" type=\"String\">An attribute name.</param>\n    ///   <param name=\"value\" type=\"String\">An attribute value. Can be either an unquoted single word or a quoted string.</param>\n    /// </signature>\n  },\n  'attributeEquals': function() {\n    /// <signature>\n    ///   <summary>Selects elements that have the specified attribute with a value exactly equal to a certain value.</summary>\n    ///   <param name=\"attribute\" type=\"String\">An attribute name.</param>\n    ///   <param name=\"value\" type=\"String\">An attribute value. Can be either an unquoted single word or a quoted string.</param>\n    /// </signature>\n  },\n  'attributeHas': function() {\n    /// <signature>\n    ///   <summary>Selects elements that have the specified attribute, with any value.</summary>\n    ///   <param name=\"attribute\" type=\"String\">An attribute name.</param>\n    /// </signature>\n  },\n  'attributeMultiple': function() {\n    /// <signature>\n    ///   <summary>Matches elements that match all of the specified attribute filters.</summary>\n    ///   <param name=\"attributeFilter1\" type=\"String\">An attribute filter.</param>\n    ///   <param name=\"attributeFilter2\" type=\"String\">Another attribute filter, reducing the selection even more</param>\n    ///   <param name=\"attributeFilterN\" type=\"String\">As many more attribute filters as necessary</param>\n    /// </signature>\n  },\n  'attributeNotEqual': function() {\n    /// <signature>\n    ///   <summary>Select elements that either don't have the specified attribute, or do have the specified attribute but not with a certain value.</summary>\n    ///   <param name=\"attribute\" type=\"String\">An attribute name.</param>\n    ///   <param name=\"value\" type=\"String\">An attribute value. Can be either an unquoted single word or a quoted string.</param>\n    /// </signature>\n  },\n  'attributeStartsWith': function() {\n    /// <signature>\n    ///   <summary>Selects elements that have the specified attribute with a value beginning exactly with a given string.</summary>\n    ///   <param name=\"attribute\" type=\"String\">An attribute name.</param>\n    ///   <param name=\"value\" type=\"String\">An attribute value. Can be either an unquoted single word or a quoted string.</param>\n    /// </signature>\n  },\n  'before': function() {\n    /// <signature>\n    ///   <summary>Insert content, specified by the parameter, before each element in the set of matched elements.</summary>\n    ///   <param name=\"content\" type=\"jQuery\">HTML string, DOM element, or jQuery object to insert before each element in the set of matched elements.</param>\n    ///   <param name=\"content\" type=\"jQuery\">One or more additional DOM elements, arrays of elements, HTML strings, or jQuery objects to insert before each element in the set of matched elements.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Insert content, specified by the parameter, before each element in the set of matched elements.</summary>\n    ///   <param name=\"function\" type=\"Function\">A function that returns an HTML string, DOM element(s), or jQuery object to insert before each element in the set of matched elements. Receives the index position of the element in the set as an argument. Within the function, this refers to the current element in the set.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'bind': function() {\n    /// <signature>\n    ///   <summary>Attach a handler to an event for the elements.</summary>\n    ///   <param name=\"eventType\" type=\"String\">A string containing one or more DOM event types, such as \"click\" or \"submit,\" or custom event names.</param>\n    ///   <param name=\"eventData\" type=\"Object\">A map of data that will be passed to the event handler.</param>\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Attach a handler to an event for the elements.</summary>\n    ///   <param name=\"eventType\" type=\"String\">A string containing one or more DOM event types, such as \"click\" or \"submit,\" or custom event names.</param>\n    ///   <param name=\"eventData\" type=\"Object\">A map of data that will be passed to the event handler.</param>\n    ///   <param name=\"preventBubble\" type=\"Boolean\">Setting the third argument to false will attach a function that prevents the default action from occurring and stops the event from bubbling. The default is true.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Attach a handler to an event for the elements.</summary>\n    ///   <param name=\"events\" type=\"Object\">A map of one or more DOM event types and functions to execute for them.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'blur': function() {\n    /// <signature>\n    ///   <summary>Bind an event handler to the \"blur\" JavaScript event, or trigger that event on an element.</summary>\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Bind an event handler to the \"blur\" JavaScript event, or trigger that event on an element.</summary>\n    ///   <param name=\"eventData\" type=\"Object\">A map of data that will be passed to the event handler.</param>\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'button': function() {\n    /// <summary>Selects all button elements and elements of type button.</summary>\n  },\n  'change': function() {\n    /// <signature>\n    ///   <summary>Bind an event handler to the \"change\" JavaScript event, or trigger that event on an element.</summary>\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Bind an event handler to the \"change\" JavaScript event, or trigger that event on an element.</summary>\n    ///   <param name=\"eventData\" type=\"Object\">A map of data that will be passed to the event handler.</param>\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'checkbox': function() {\n    /// <summary>Selects all elements of type checkbox.</summary>\n  },\n  'checked': function() {\n    /// <summary>Matches all elements that are checked.</summary>\n  },\n  'child': function() {\n    /// <signature>\n    ///   <summary>Selects all direct child elements specified by \"child\" of elements specified by \"parent\".</summary>\n    ///   <param name=\"parent\" type=\"String\">Any valid selector.</param>\n    ///   <param name=\"child\" type=\"String\">A selector to filter the child elements.</param>\n    /// </signature>\n  },\n  'children': function() {\n    /// <signature>\n    ///   <summary>Get the children of each element in the set of matched elements, optionally filtered by a selector.</summary>\n    ///   <param name=\"selector\" type=\"String\">A string containing a selector expression to match elements against.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'class': function() {\n    /// <signature>\n    ///   <summary>Selects all elements with the given class.</summary>\n    ///   <param name=\"class\" type=\"String\">A class to search for. An element can have multiple classes; only one of them must match.</param>\n    /// </signature>\n  },\n  'clearQueue': function() {\n    /// <signature>\n    ///   <summary>Remove from the queue all items that have not yet been run.</summary>\n    ///   <param name=\"queueName\" type=\"String\">A string containing the name of the queue. Defaults to fx, the standard effects queue.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'click': function() {\n    /// <signature>\n    ///   <summary>Bind an event handler to the \"click\" JavaScript event, or trigger that event on an element.</summary>\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Bind an event handler to the \"click\" JavaScript event, or trigger that event on an element.</summary>\n    ///   <param name=\"eventData\" type=\"Object\">A map of data that will be passed to the event handler.</param>\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'clone': function() {\n    /// <signature>\n    ///   <summary>Create a deep copy of the set of matched elements.</summary>\n    ///   <param name=\"withDataAndEvents\" type=\"Boolean\">A Boolean indicating whether event handlers should be copied along with the elements. As of jQuery 1.4, element data will be copied as well.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Create a deep copy of the set of matched elements.</summary>\n    ///   <param name=\"withDataAndEvents\" type=\"Boolean\">A Boolean indicating whether event handlers and data should be copied along with the elements. The default value is false. *In jQuery 1.5.0 the default value was incorrectly true; it was changed back to false in 1.5.1 and up.</param>\n    ///   <param name=\"deepWithDataAndEvents\" type=\"Boolean\">A Boolean indicating whether event handlers and data for all children of the cloned element should be copied. By default its value matches the first argument's value (which defaults to false).</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'closest': function() {\n    /// <signature>\n    ///   <summary>Get the first element that matches the selector, beginning at the current element and progressing up through the DOM tree.</summary>\n    ///   <param name=\"selector\" type=\"String\">A string containing a selector expression to match elements against.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Get the first element that matches the selector, beginning at the current element and progressing up through the DOM tree.</summary>\n    ///   <param name=\"selector\" type=\"String\">A string containing a selector expression to match elements against.</param>\n    ///   <param name=\"context\" type=\"Element\">A DOM element within which a matching element may be found. If no context is passed in then the context of the jQuery set will be used instead.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Get the first element that matches the selector, beginning at the current element and progressing up through the DOM tree.</summary>\n    ///   <param name=\"jQuery object\" type=\"jQuery\">A jQuery object to match elements against.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Get the first element that matches the selector, beginning at the current element and progressing up through the DOM tree.</summary>\n    ///   <param name=\"element\" type=\"Element\">An element to match elements against.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'contains': function() {\n    /// <signature>\n    ///   <summary>Select all elements that contain the specified text.</summary>\n    ///   <param name=\"text\" type=\"String\">A string of text to look for. It's case sensitive.</param>\n    /// </signature>\n  },\n  'contents': function() {\n    /// <summary>Get the children of each element in the set of matched elements, including text and comment nodes.</summary>\n    /// <returns type=\"jQuery\" />\n  },\n  'context': function() {\n    /// <summary>The DOM node context originally passed to jQuery(); if none was passed then context will likely be the document.</summary>\n    /// <returns type=\"Element\" />\n  },\n  'css': function() {\n    /// <signature>\n    ///   <summary>Set one or more CSS properties for the  set of matched elements.</summary>\n    ///   <param name=\"propertyName\" type=\"String\">A CSS property name.</param>\n    ///   <param name=\"value\" type=\"Number\">A value to set for the property.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Set one or more CSS properties for the  set of matched elements.</summary>\n    ///   <param name=\"propertyName\" type=\"String\">A CSS property name.</param>\n    ///   <param name=\"function(index, value)\" type=\"Function\">A function returning the value to set. this is the current element. Receives the index position of the element in the set and the old value as arguments.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Set one or more CSS properties for the  set of matched elements.</summary>\n    ///   <param name=\"map\" type=\"Object\">A map of property-value pairs to set.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'data': function() {\n    /// <signature>\n    ///   <summary>Store arbitrary data associated with the matched elements.</summary>\n    ///   <param name=\"key\" type=\"String\">A string naming the piece of data to set.</param>\n    ///   <param name=\"value\" type=\"Object\">The new data value; it can be any Javascript type including Array or Object.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Store arbitrary data associated with the matched elements.</summary>\n    ///   <param name=\"obj\" type=\"Object\">An object of key-value pairs of data to update.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'dblclick': function() {\n    /// <signature>\n    ///   <summary>Bind an event handler to the \"dblclick\" JavaScript event, or trigger that event on an element.</summary>\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Bind an event handler to the \"dblclick\" JavaScript event, or trigger that event on an element.</summary>\n    ///   <param name=\"eventData\" type=\"Object\">A map of data that will be passed to the event handler.</param>\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'delay': function() {\n    /// <signature>\n    ///   <summary>Set a timer to delay execution of subsequent items in the queue.</summary>\n    ///   <param name=\"duration\" type=\"Number\">An integer indicating the number of milliseconds to delay execution of the next item in the queue.</param>\n    ///   <param name=\"queueName\" type=\"String\">A string containing the name of the queue. Defaults to fx, the standard effects queue.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'delegate': function() {\n    /// <signature>\n    ///   <summary>Attach a handler to one or more events for all elements that match the selector, now or in the future, based on a specific set of root elements.</summary>\n    ///   <param name=\"selector\" type=\"String\">A selector to filter the elements that trigger the event.</param>\n    ///   <param name=\"eventType\" type=\"String\">A string containing one or more space-separated JavaScript event types, such as \"click\" or \"keydown,\" or custom event names.</param>\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute at the time the event is triggered.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Attach a handler to one or more events for all elements that match the selector, now or in the future, based on a specific set of root elements.</summary>\n    ///   <param name=\"selector\" type=\"String\">A selector to filter the elements that trigger the event.</param>\n    ///   <param name=\"eventType\" type=\"String\">A string containing one or more space-separated JavaScript event types, such as \"click\" or \"keydown,\" or custom event names.</param>\n    ///   <param name=\"eventData\" type=\"Object\">A map of data that will be passed to the event handler.</param>\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute at the time the event is triggered.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Attach a handler to one or more events for all elements that match the selector, now or in the future, based on a specific set of root elements.</summary>\n    ///   <param name=\"selector\" type=\"String\">A selector to filter the elements that trigger the event.</param>\n    ///   <param name=\"events\" type=\"Object\">A map of one or more event types and functions to execute for them.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'dequeue': function() {\n    /// <signature>\n    ///   <summary>Execute the next function on the queue for the matched elements.</summary>\n    ///   <param name=\"queueName\" type=\"String\">A string containing the name of the queue. Defaults to fx, the standard effects queue.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'descendant': function() {\n    /// <signature>\n    ///   <summary>Selects all elements that are descendants of a given ancestor.</summary>\n    ///   <param name=\"ancestor\" type=\"String\">Any valid selector.</param>\n    ///   <param name=\"descendant\" type=\"String\">A selector to filter the descendant elements.</param>\n    /// </signature>\n  },\n  'detach': function() {\n    /// <signature>\n    ///   <summary>Remove the set of matched elements from the DOM.</summary>\n    ///   <param name=\"selector\" type=\"String\">A selector expression that filters the set of matched elements to be removed.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'die': function() {\n    /// <signature>\n    ///   <summary>Remove an event handler previously attached using .live() from the elements.</summary>\n    ///   <param name=\"eventType\" type=\"String\">A string containing a JavaScript event type, such as click or keydown.</param>\n    ///   <param name=\"handler\" type=\"String\">The function that is no longer to be executed.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Remove an event handler previously attached using .live() from the elements.</summary>\n    ///   <param name=\"eventTypes\" type=\"Object\">A map of one or more event types, such as click or keydown and their corresponding functions that are no longer to be executed.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'disabled': function() {\n    /// <summary>Selects all elements that are disabled.</summary>\n  },\n  'each': function() {\n    /// <signature>\n    ///   <summary>Iterate over a jQuery object, executing a function for each matched element.</summary>\n    ///   <param name=\"function(index, Element)\" type=\"Function\">A function to execute for each matched element.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'element': function() {\n    /// <signature>\n    ///   <summary>Selects all elements with the given tag name.</summary>\n    ///   <param name=\"element\" type=\"String\">An element to search for. Refers to the tagName of DOM nodes.</param>\n    /// </signature>\n  },\n  'empty': function() {\n    /// <summary>Select all elements that have no children (including text nodes).</summary>\n  },\n  'enabled': function() {\n    /// <summary>Selects all elements that are enabled.</summary>\n  },\n  'end': function() {\n    /// <summary>End the most recent filtering operation in the current chain and return the set of matched elements to its previous state.</summary>\n    /// <returns type=\"jQuery\" />\n  },\n  'eq': function() {\n    /// <signature>\n    ///   <summary>Reduce the set of matched elements to the one at the specified index.</summary>\n    ///   <param name=\"index\" type=\"Number\">An integer indicating the 0-based position of the element.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Reduce the set of matched elements to the one at the specified index.</summary>\n    ///   <param name=\"-index\" type=\"Number\">An integer indicating the position of the element, counting backwards  from the last element in the set.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'error': function() {\n    /// <signature>\n    ///   <summary>Bind an event handler to the \"error\" JavaScript event.</summary>\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute when the event is triggered.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Bind an event handler to the \"error\" JavaScript event.</summary>\n    ///   <param name=\"eventData\" type=\"Object\">A map of data that will be passed to the event handler.</param>\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'even': function() {\n    /// <summary>Selects even elements, zero-indexed.  See also odd.</summary>\n  },\n  'fadeIn': function() {\n    /// <signature>\n    ///   <summary>Display the matched elements by fading them to opaque.</summary>\n    ///   <param name=\"duration\" type=\"Number\">A string or number determining how long the animation will run.</param>\n    ///   <param name=\"callback\" type=\"Function\">A function to call once the animation is complete.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Display the matched elements by fading them to opaque.</summary>\n    ///   <param name=\"duration\" type=\"Number\">A string or number determining how long the animation will run.</param>\n    ///   <param name=\"easing\" type=\"String\">A string indicating which easing function to use for the transition.</param>\n    ///   <param name=\"callback\" type=\"Function\">A function to call once the animation is complete.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'fadeOut': function() {\n    /// <signature>\n    ///   <summary>Hide the matched elements by fading them to transparent.</summary>\n    ///   <param name=\"duration\" type=\"Number\">A string or number determining how long the animation will run.</param>\n    ///   <param name=\"callback\" type=\"Function\">A function to call once the animation is complete.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Hide the matched elements by fading them to transparent.</summary>\n    ///   <param name=\"duration\" type=\"Number\">A string or number determining how long the animation will run.</param>\n    ///   <param name=\"easing\" type=\"String\">A string indicating which easing function to use for the transition.</param>\n    ///   <param name=\"callback\" type=\"Function\">A function to call once the animation is complete.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'fadeTo': function() {\n    /// <signature>\n    ///   <summary>Adjust the opacity of the matched elements.</summary>\n    ///   <param name=\"duration\" type=\"Number\">A string or number determining how long the animation will run.</param>\n    ///   <param name=\"opacity\" type=\"Number\">A number between 0 and 1 denoting the target opacity.</param>\n    ///   <param name=\"callback\" type=\"Function\">A function to call once the animation is complete.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Adjust the opacity of the matched elements.</summary>\n    ///   <param name=\"duration\" type=\"Number\">A string or number determining how long the animation will run.</param>\n    ///   <param name=\"opacity\" type=\"Number\">A number between 0 and 1 denoting the target opacity.</param>\n    ///   <param name=\"easing\" type=\"String\">A string indicating which easing function to use for the transition.</param>\n    ///   <param name=\"callback\" type=\"Function\">A function to call once the animation is complete.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'fadeToggle': function() {\n    /// <signature>\n    ///   <summary>Display or hide the matched elements by animating their opacity.</summary>\n    ///   <param name=\"duration\" type=\"Number\">A string or number determining how long the animation will run.</param>\n    ///   <param name=\"easing\" type=\"String\">A string indicating which easing function to use for the transition.</param>\n    ///   <param name=\"callback\" type=\"Function\">A function to call once the animation is complete.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'file': function() {\n    /// <summary>Selects all elements of type file.</summary>\n  },\n  'filter': function() {\n    /// <signature>\n    ///   <summary>Reduce the set of matched elements to those that match the selector or pass the function's test.</summary>\n    ///   <param name=\"selector\" type=\"String\">A string containing a selector expression to match the current set of elements against.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Reduce the set of matched elements to those that match the selector or pass the function's test.</summary>\n    ///   <param name=\"function(index)\" type=\"Function\">A function used as a test for each element in the set. this is the current DOM element.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Reduce the set of matched elements to those that match the selector or pass the function's test.</summary>\n    ///   <param name=\"element\" type=\"Element\">An element to match the current set of elements against.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Reduce the set of matched elements to those that match the selector or pass the function's test.</summary>\n    ///   <param name=\"jQuery object\" type=\"Object\">An existing jQuery object to match the current set of elements against.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'find': function() {\n    /// <signature>\n    ///   <summary>Get the descendants of each element in the current set of matched elements, filtered by a selector, jQuery object, or element.</summary>\n    ///   <param name=\"selector\" type=\"String\">A string containing a selector expression to match elements against.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Get the descendants of each element in the current set of matched elements, filtered by a selector, jQuery object, or element.</summary>\n    ///   <param name=\"jQuery object\" type=\"Object\">A jQuery object to match elements against.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Get the descendants of each element in the current set of matched elements, filtered by a selector, jQuery object, or element.</summary>\n    ///   <param name=\"element\" type=\"Element\">An element to match elements against.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'first': function() {\n    /// <summary>Selects the first matched element.</summary>\n  },\n  'first-child': function() {\n    /// <summary>Selects all elements that are the first child of their parent.</summary>\n  },\n  'focus': function() {\n    /// <signature>\n    ///   <summary>Bind an event handler to the \"focus\" JavaScript event, or trigger that event on an element.</summary>\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Bind an event handler to the \"focus\" JavaScript event, or trigger that event on an element.</summary>\n    ///   <param name=\"eventData\" type=\"Object\">A map of data that will be passed to the event handler.</param>\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'focusin': function() {\n    /// <signature>\n    ///   <summary>Bind an event handler to the \"focusin\" event.</summary>\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Bind an event handler to the \"focusin\" event.</summary>\n    ///   <param name=\"eventData\" type=\"Object\">A map of data that will be passed to the event handler.</param>\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'focusout': function() {\n    /// <signature>\n    ///   <summary>Bind an event handler to the \"focusout\" JavaScript event.</summary>\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Bind an event handler to the \"focusout\" JavaScript event.</summary>\n    ///   <param name=\"eventData\" type=\"Object\">A map of data that will be passed to the event handler.</param>\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'get': function() {\n    /// <signature>\n    ///   <summary>Retrieve the DOM elements matched by the jQuery object.</summary>\n    ///   <param name=\"index\" type=\"Number\">A zero-based integer indicating which element to retrieve.</param>\n    ///   <returns type=\"Element, Array\" />\n    /// </signature>\n  },\n  'gt': function() {\n    /// <signature>\n    ///   <summary>Select all elements at an index greater than index within the matched set.</summary>\n    ///   <param name=\"index\" type=\"Number\">Zero-based index.</param>\n    /// </signature>\n  },\n  'has': function() {\n    /// <signature>\n    ///   <summary>Reduce the set of matched elements to those that have a descendant that matches the selector or DOM element.</summary>\n    ///   <param name=\"selector\" type=\"String\">A string containing a selector expression to match elements against.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Reduce the set of matched elements to those that have a descendant that matches the selector or DOM element.</summary>\n    ///   <param name=\"contained\" type=\"Element\">A DOM element to match elements against.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'hasClass': function() {\n    /// <signature>\n    ///   <summary>Determine whether any of the matched elements are assigned the given class.</summary>\n    ///   <param name=\"className\" type=\"String\">The class name to search for.</param>\n    ///   <returns type=\"Boolean\" />\n    /// </signature>\n  },\n  'header': function() {\n    /// <summary>Selects all elements that are headers, like h1, h2, h3 and so on.</summary>\n  },\n  'height': function() {\n    /// <signature>\n    ///   <summary>Set the CSS height of every matched element.</summary>\n    ///   <param name=\"value\" type=\"Number\">An integer representing the number of pixels, or an integer with an optional unit of measure appended (as a string).</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Set the CSS height of every matched element.</summary>\n    ///   <param name=\"function(index, height)\" type=\"Function\">A function returning the height to set. Receives the index position of the element in the set and the old height as arguments. Within the function, this refers to the current element in the set.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'hidden': function() {\n    /// <summary>Selects all elements that are hidden.</summary>\n  },\n  'hide': function() {\n    /// <signature>\n    ///   <summary>Hide the matched elements.</summary>\n    ///   <param name=\"duration\" type=\"Number\">A string or number determining how long the animation will run.</param>\n    ///   <param name=\"callback\" type=\"Function\">A function to call once the animation is complete.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Hide the matched elements.</summary>\n    ///   <param name=\"duration\" type=\"Number\">A string or number determining how long the animation will run.</param>\n    ///   <param name=\"easing\" type=\"String\">A string indicating which easing function to use for the transition.</param>\n    ///   <param name=\"callback\" type=\"Function\">A function to call once the animation is complete.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'hover': function() {\n    /// <signature>\n    ///   <summary>Bind two handlers to the matched elements, to be executed when the mouse pointer enters and leaves the elements.</summary>\n    ///   <param name=\"handlerIn(eventObject)\" type=\"Function\">A function to execute when the mouse pointer enters the element.</param>\n    ///   <param name=\"handlerOut(eventObject)\" type=\"Function\">A function to execute when the mouse pointer leaves the element.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'html': function() {\n    /// <signature>\n    ///   <summary>Set the HTML contents of each element in the set of matched elements.</summary>\n    ///   <param name=\"htmlString\" type=\"String\">A string of HTML to set as the content of each matched element.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Set the HTML contents of each element in the set of matched elements.</summary>\n    ///   <param name=\"function(index, oldhtml)\" type=\"Function\">A function returning the HTML content to set. Receives the index position of the element in the set and the old HTML value as arguments. jQuery empties the element before calling the function; use the oldhtml argument to reference the previous content. Within the function, this refers to the current element in the set.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'id': function() {\n    /// <signature>\n    ///   <summary>Selects a single element with the given id attribute.</summary>\n    ///   <param name=\"id\" type=\"String\">An ID to search for, specified via the id attribute of an element.</param>\n    /// </signature>\n  },\n  'image': function() {\n    /// <summary>Selects all elements of type image.</summary>\n  },\n  'index': function() {\n    /// <signature>\n    ///   <summary>Search for a given element from among the matched elements.</summary>\n    ///   <param name=\"selector\" type=\"String\">A selector representing a jQuery collection in which to look for an element.</param>\n    ///   <returns type=\"Number\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Search for a given element from among the matched elements.</summary>\n    ///   <param name=\"element\" type=\"jQuery\">The DOM element or first element within the jQuery object to look for.</param>\n    ///   <returns type=\"Number\" />\n    /// </signature>\n  },\n  'init': function() {\n    /// <signature>\n    ///   <summary>Accepts a string containing a CSS selector which is then used to match a set of elements.</summary>\n    ///   <param name=\"selector\" type=\"String\">A string containing a selector expression</param>\n    ///   <param name=\"context\" type=\"jQuery\">A DOM Element, Document, or jQuery to use as context</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Accepts a string containing a CSS selector which is then used to match a set of elements.</summary>\n    ///   <param name=\"element\" type=\"Element\">A DOM element to wrap in a jQuery object.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Accepts a string containing a CSS selector which is then used to match a set of elements.</summary>\n    ///   <param name=\"object\" type=\"Object\">A plain object to wrap in a jQuery object.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Accepts a string containing a CSS selector which is then used to match a set of elements.</summary>\n    ///   <param name=\"elementArray\" type=\"Array\">An array containing a set of DOM elements to wrap in a jQuery object.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Accepts a string containing a CSS selector which is then used to match a set of elements.</summary>\n    ///   <param name=\"jQuery object\" type=\"Object\">An existing jQuery object to clone.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'innerHeight': function() {\n    /// <summary>Get the current computed height for the first element in the set of matched elements, including padding but not border.</summary>\n    /// <returns type=\"Integer\" />\n  },\n  'innerWidth': function() {\n    /// <summary>Get the current computed width for the first element in the set of matched elements, including padding but not border.</summary>\n    /// <returns type=\"Integer\" />\n  },\n  'input': function() {\n    /// <summary>Selects all input, textarea, select and button elements.</summary>\n  },\n  'insertAfter': function() {\n    /// <signature>\n    ///   <summary>Insert every element in the set of matched elements after the target.</summary>\n    ///   <param name=\"target\" type=\"jQuery\">A selector, element, HTML string, or jQuery object; the matched set of elements will be inserted after the element(s) specified by this parameter.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'insertBefore': function() {\n    /// <signature>\n    ///   <summary>Insert every element in the set of matched elements before the target.</summary>\n    ///   <param name=\"target\" type=\"jQuery\">A selector, element, HTML string, or jQuery object; the matched set of elements will be inserted before the element(s) specified by this parameter.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'is': function() {\n    /// <signature>\n    ///   <summary>Check the current matched set of elements against a selector, element, or jQuery object and return true if at least one of these elements matches the given arguments.</summary>\n    ///   <param name=\"selector\" type=\"String\">A string containing a selector expression to match elements against.</param>\n    ///   <returns type=\"Boolean\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Check the current matched set of elements against a selector, element, or jQuery object and return true if at least one of these elements matches the given arguments.</summary>\n    ///   <param name=\"function(index)\" type=\"Function\">A function used as a test for the set of elements. It accepts one argument, index, which is the element's index in the jQuery collection.Within the function, this refers to the current DOM element.</param>\n    ///   <returns type=\"Boolean\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Check the current matched set of elements against a selector, element, or jQuery object and return true if at least one of these elements matches the given arguments.</summary>\n    ///   <param name=\"jQuery object\" type=\"Object\">An existing jQuery object to match the current set of elements against.</param>\n    ///   <returns type=\"Boolean\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Check the current matched set of elements against a selector, element, or jQuery object and return true if at least one of these elements matches the given arguments.</summary>\n    ///   <param name=\"element\" type=\"Element\">An element to match the current set of elements against.</param>\n    ///   <returns type=\"Boolean\" />\n    /// </signature>\n  },\n  'jquery': function() {\n    /// <summary>A string containing the jQuery version number.</summary>\n    /// <returns type=\"String\" />\n  },\n  'keydown': function() {\n    /// <signature>\n    ///   <summary>Bind an event handler to the \"keydown\" JavaScript event, or trigger that event on an element.</summary>\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Bind an event handler to the \"keydown\" JavaScript event, or trigger that event on an element.</summary>\n    ///   <param name=\"eventData\" type=\"Object\">A map of data that will be passed to the event handler.</param>\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'keypress': function() {\n    /// <signature>\n    ///   <summary>Bind an event handler to the \"keypress\" JavaScript event, or trigger that event on an element.</summary>\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Bind an event handler to the \"keypress\" JavaScript event, or trigger that event on an element.</summary>\n    ///   <param name=\"eventData\" type=\"Object\">A map of data that will be passed to the event handler.</param>\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'keyup': function() {\n    /// <signature>\n    ///   <summary>Bind an event handler to the \"keyup\" JavaScript event, or trigger that event on an element.</summary>\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Bind an event handler to the \"keyup\" JavaScript event, or trigger that event on an element.</summary>\n    ///   <param name=\"eventData\" type=\"Object\">A map of data that will be passed to the event handler.</param>\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'last': function() {\n    /// <summary>Selects the last matched element.</summary>\n  },\n  'last-child': function() {\n    /// <summary>Selects all elements that are the last child of their parent.</summary>\n  },\n  'length': function() {\n    /// <summary>The number of elements in the jQuery object.</summary>\n    /// <returns type=\"Number\" />\n  },\n  'live': function() {\n    /// <signature>\n    ///   <summary>Attach an event handler for all elements which match the current selector, now and in the future.</summary>\n    ///   <param name=\"events\" type=\"String\">A string containing a JavaScript event type, such as \"click\" or \"keydown.\" As of jQuery 1.4 the string can contain multiple, space-separated event types or custom event names.</param>\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute at the time the event is triggered.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Attach an event handler for all elements which match the current selector, now and in the future.</summary>\n    ///   <param name=\"events\" type=\"String\">A string containing a JavaScript event type, such as \"click\" or \"keydown.\" As of jQuery 1.4 the string can contain multiple, space-separated event types or custom event names.</param>\n    ///   <param name=\"data\" type=\"Object\">A map of data that will be passed to the event handler.</param>\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute at the time the event is triggered.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Attach an event handler for all elements which match the current selector, now and in the future.</summary>\n    ///   <param name=\"events-map\" type=\"Object\">A map of one or more JavaScript event types and functions to execute for them.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'load': function() {\n    /// <signature>\n    ///   <summary>Bind an event handler to the \"load\" JavaScript event.</summary>\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute when the event is triggered.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Bind an event handler to the \"load\" JavaScript event.</summary>\n    ///   <param name=\"eventData\" type=\"Object\">A map of data that will be passed to the event handler.</param>\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'lt': function() {\n    /// <signature>\n    ///   <summary>Select all elements at an index less than index within the matched set.</summary>\n    ///   <param name=\"index\" type=\"Number\">Zero-based index.</param>\n    /// </signature>\n  },\n  'map': function() {\n    /// <signature>\n    ///   <summary>Pass each element in the current matched set through a function, producing a new jQuery object containing the return values.</summary>\n    ///   <param name=\"callback(index, domElement)\" type=\"Function\">A function object that will be invoked for each element in the current set.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'mousedown': function() {\n    /// <signature>\n    ///   <summary>Bind an event handler to the \"mousedown\" JavaScript event, or trigger that event on an element.</summary>\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Bind an event handler to the \"mousedown\" JavaScript event, or trigger that event on an element.</summary>\n    ///   <param name=\"eventData\" type=\"Object\">A map of data that will be passed to the event handler.</param>\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'mouseenter': function() {\n    /// <signature>\n    ///   <summary>Bind an event handler to be fired when the mouse enters an element, or trigger that handler on an element.</summary>\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Bind an event handler to be fired when the mouse enters an element, or trigger that handler on an element.</summary>\n    ///   <param name=\"eventData\" type=\"Object\">A map of data that will be passed to the event handler.</param>\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'mouseleave': function() {\n    /// <signature>\n    ///   <summary>Bind an event handler to be fired when the mouse leaves an element, or trigger that handler on an element.</summary>\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Bind an event handler to be fired when the mouse leaves an element, or trigger that handler on an element.</summary>\n    ///   <param name=\"eventData\" type=\"Object\">A map of data that will be passed to the event handler.</param>\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'mousemove': function() {\n    /// <signature>\n    ///   <summary>Bind an event handler to the \"mousemove\" JavaScript event, or trigger that event on an element.</summary>\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Bind an event handler to the \"mousemove\" JavaScript event, or trigger that event on an element.</summary>\n    ///   <param name=\"eventData\" type=\"Object\">A map of data that will be passed to the event handler.</param>\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'mouseout': function() {\n    /// <signature>\n    ///   <summary>Bind an event handler to the \"mouseout\" JavaScript event, or trigger that event on an element.</summary>\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Bind an event handler to the \"mouseout\" JavaScript event, or trigger that event on an element.</summary>\n    ///   <param name=\"eventData\" type=\"Object\">A map of data that will be passed to the event handler.</param>\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'mouseover': function() {\n    /// <signature>\n    ///   <summary>Bind an event handler to the \"mouseover\" JavaScript event, or trigger that event on an element.</summary>\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Bind an event handler to the \"mouseover\" JavaScript event, or trigger that event on an element.</summary>\n    ///   <param name=\"eventData\" type=\"Object\">A map of data that will be passed to the event handler.</param>\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'mouseup': function() {\n    /// <signature>\n    ///   <summary>Bind an event handler to the \"mouseup\" JavaScript event, or trigger that event on an element.</summary>\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Bind an event handler to the \"mouseup\" JavaScript event, or trigger that event on an element.</summary>\n    ///   <param name=\"eventData\" type=\"Object\">A map of data that will be passed to the event handler.</param>\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'multiple': function() {\n    /// <signature>\n    ///   <summary>Selects the combined results of all the specified selectors.</summary>\n    ///   <param name=\"selector1\" type=\"String\">Any valid selector.</param>\n    ///   <param name=\"selector2\" type=\"String\">Another valid selector.</param>\n    ///   <param name=\"selectorN\" type=\"String\">As many more valid selectors as you like.</param>\n    /// </signature>\n  },\n  'next': function() {\n    /// <signature>\n    ///   <summary>Get the immediately following sibling of each element in the set of matched elements. If a selector is provided, it retrieves the next sibling only if it matches that selector.</summary>\n    ///   <param name=\"selector\" type=\"String\">A string containing a selector expression to match elements against.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'next adjacent': function() {\n    /// <signature>\n    ///   <summary>Selects all next elements matching \"next\" that are immediately preceded by a sibling \"prev\".</summary>\n    ///   <param name=\"prev\" type=\"String\">Any valid selector.</param>\n    ///   <param name=\"next\" type=\"String\">A selector to match the element that is next to the first selector.</param>\n    /// </signature>\n  },\n  'next siblings': function() {\n    /// <signature>\n    ///   <summary>Selects all sibling elements that follow after the \"prev\" element, have the same parent, and match the filtering \"siblings\" selector.</summary>\n    ///   <param name=\"prev\" type=\"String\">Any valid selector.</param>\n    ///   <param name=\"siblings\" type=\"String\">A selector to filter elements that are the following siblings of the first selector.</param>\n    /// </signature>\n  },\n  'nextAll': function() {\n    /// <signature>\n    ///   <summary>Get all following siblings of each element in the set of matched elements, optionally filtered by a selector.</summary>\n    ///   <param name=\"selector\" type=\"String\">A string containing a selector expression to match elements against.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'nextUntil': function() {\n    /// <signature>\n    ///   <summary>Get all following siblings of each element up to but not including the element matched by the selector, DOM node, or jQuery object passed.</summary>\n    ///   <param name=\"selector\" type=\"String\">A string containing a selector expression to indicate where to stop matching following sibling elements.</param>\n    ///   <param name=\"filter\" type=\"String\">A string containing a selector expression to match elements against.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Get all following siblings of each element up to but not including the element matched by the selector, DOM node, or jQuery object passed.</summary>\n    ///   <param name=\"element\" type=\"Element\">A DOM node or jQuery object indicating where to stop matching following sibling elements.</param>\n    ///   <param name=\"filter\" type=\"String\">A string containing a selector expression to match elements against.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'not': function() {\n    /// <signature>\n    ///   <summary>Remove elements from the set of matched elements.</summary>\n    ///   <param name=\"selector\" type=\"String\">A string containing a selector expression to match elements against.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Remove elements from the set of matched elements.</summary>\n    ///   <param name=\"elements\" type=\"Array\">One or more DOM elements to remove from the matched set.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Remove elements from the set of matched elements.</summary>\n    ///   <param name=\"function(index)\" type=\"Function\">A function used as a test for each element in the set. this is the current DOM element.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Remove elements from the set of matched elements.</summary>\n    ///   <param name=\"jQuery object\" type=\"Object\">An existing jQuery object to match the current set of elements against.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'nth-child': function() {\n    /// <signature>\n    ///   <summary>Selects all elements that are the nth-child of their parent.</summary>\n    ///   <param name=\"index\" type=\"String\">The index of each child to match, starting with 1, the string even or odd, or an equation ( eg. :nth-child(even), :nth-child(4n) )</param>\n    /// </signature>\n  },\n  'odd': function() {\n    /// <summary>Selects odd elements, zero-indexed.  See also even.</summary>\n  },\n  'off': function() {\n    /// <signature>\n    ///   <summary>Remove an event handler.</summary>\n    ///   <param name=\"events\" type=\"String\">One or more space-separated event types and optional namespaces, or just namespaces, such as \"click\", \"keydown.myPlugin\", or \".myPlugin\".</param>\n    ///   <param name=\"selector\" type=\"String\">A selector which should match the one originally passed to .on() when attaching event handlers.</param>\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A handler function previously attached for the event(s), or the special value false.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Remove an event handler.</summary>\n    ///   <param name=\"events-map\" type=\"Object\">A map where the string keys represent one or more space-separated event types and optional namespaces, and the values represent handler functions previously attached for the event(s).</param>\n    ///   <param name=\"selector\" type=\"String\">A selector which should match the one originally passed to .on() when attaching event handlers.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'offset': function() {\n    /// <signature>\n    ///   <summary>Set the current coordinates of every element in the set of matched elements, relative to the document.</summary>\n    ///   <param name=\"coordinates\" type=\"Object\">An object containing the properties top and left, which are integers indicating the new top and left coordinates for the elements.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Set the current coordinates of every element in the set of matched elements, relative to the document.</summary>\n    ///   <param name=\"function(index, coords)\" type=\"Function\">A function to return the coordinates to set. Receives the index of the element in the collection as the first argument and the current coordinates as the second argument. The function should return an object with the new top and left properties.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'offsetParent': function() {\n    /// <summary>Get the closest ancestor element that is positioned.</summary>\n    /// <returns type=\"jQuery\" />\n  },\n  'on': function() {\n    /// <signature>\n    ///   <summary>Attach an event handler function for one or more events to the selected elements.</summary>\n    ///   <param name=\"events\" type=\"String\">One or more space-separated event types and optional namespaces, such as \"click\" or \"keydown.myPlugin\".</param>\n    ///   <param name=\"selector\" type=\"String\">A selector string to filter the descendants of the selected elements that trigger the event. If the selector is null or omitted, the event is always triggered when it reaches the selected element.</param>\n    ///   <param name=\"data\" type=\"Anything\">Data to be passed to the handler in event.data when an event is triggered.</param>\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute when the event is triggered. The value false is also allowed as a shorthand for a function that simply does return false.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Attach an event handler function for one or more events to the selected elements.</summary>\n    ///   <param name=\"events-map\" type=\"Object\">A map in which the string keys represent one or more space-separated event types and optional namespaces, and the values represent a handler function to be called for the event(s).</param>\n    ///   <param name=\"selector\" type=\"String\">A selector string to filter the descendants of the selected elements that will call the handler. If the selector is null or omitted, the handler is always called when it reaches the selected element.</param>\n    ///   <param name=\"data\" type=\"Anything\">Data to be passed to the handler in event.data when an event occurs.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'one': function() {\n    /// <signature>\n    ///   <summary>Attach a handler to an event for the elements. The handler is executed at most once per element.</summary>\n    ///   <param name=\"events\" type=\"String\">A string containing one or more JavaScript event types, such as \"click\" or \"submit,\" or custom event names.</param>\n    ///   <param name=\"data\" type=\"Object\">A map of data that will be passed to the event handler.</param>\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute at the time the event is triggered.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Attach a handler to an event for the elements. The handler is executed at most once per element.</summary>\n    ///   <param name=\"events\" type=\"String\">One or more space-separated event types and optional namespaces, such as \"click\" or \"keydown.myPlugin\".</param>\n    ///   <param name=\"selector\" type=\"String\">A selector string to filter the descendants of the selected elements that trigger the event. If the selector is null or omitted, the event is always triggered when it reaches the selected element.</param>\n    ///   <param name=\"data\" type=\"Anything\">Data to be passed to the handler in event.data when an event is triggered.</param>\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute when the event is triggered. The value false is also allowed as a shorthand for a function that simply does return false.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Attach a handler to an event for the elements. The handler is executed at most once per element.</summary>\n    ///   <param name=\"events-map\" type=\"Object\">A map in which the string keys represent one or more space-separated event types and optional namespaces, and the values represent a handler function to be called for the event(s).</param>\n    ///   <param name=\"selector\" type=\"String\">A selector string to filter the descendants of the selected elements that will call the handler. If the selector is null or omitted, the handler is always called when it reaches the selected element.</param>\n    ///   <param name=\"data\" type=\"Anything\">Data to be passed to the handler in event.data when an event occurs.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'only-child': function() {\n    /// <summary>Selects all elements that are the only child of their parent.</summary>\n  },\n  'outerHeight': function() {\n    /// <signature>\n    ///   <summary>Get the current computed height for the first element in the set of matched elements, including padding, border, and optionally margin. Returns an integer (without \"px\") representation of the value or null if called on an empty set of elements.</summary>\n    ///   <param name=\"includeMargin\" type=\"Boolean\">A Boolean indicating whether to include the element's margin in the calculation.</param>\n    ///   <returns type=\"Integer\" />\n    /// </signature>\n  },\n  'outerWidth': function() {\n    /// <signature>\n    ///   <summary>Get the current computed width for the first element in the set of matched elements, including padding and border.</summary>\n    ///   <param name=\"includeMargin\" type=\"Boolean\">A Boolean indicating whether to include the element's margin in the calculation.</param>\n    ///   <returns type=\"Integer\" />\n    /// </signature>\n  },\n  'parent': function() {\n    /// <signature>\n    ///   <summary>Get the parent of each element in the current set of matched elements, optionally filtered by a selector.</summary>\n    ///   <param name=\"selector\" type=\"String\">A string containing a selector expression to match elements against.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'parents': function() {\n    /// <signature>\n    ///   <summary>Get the ancestors of each element in the current set of matched elements, optionally filtered by a selector.</summary>\n    ///   <param name=\"selector\" type=\"String\">A string containing a selector expression to match elements against.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'parentsUntil': function() {\n    /// <signature>\n    ///   <summary>Get the ancestors of each element in the current set of matched elements, up to but not including the element matched by the selector, DOM node, or jQuery object.</summary>\n    ///   <param name=\"selector\" type=\"String\">A string containing a selector expression to indicate where to stop matching ancestor elements.</param>\n    ///   <param name=\"filter\" type=\"String\">A string containing a selector expression to match elements against.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Get the ancestors of each element in the current set of matched elements, up to but not including the element matched by the selector, DOM node, or jQuery object.</summary>\n    ///   <param name=\"element\" type=\"Element\">A DOM node or jQuery object indicating where to stop matching ancestor elements.</param>\n    ///   <param name=\"filter\" type=\"String\">A string containing a selector expression to match elements against.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'password': function() {\n    /// <summary>Selects all elements of type password.</summary>\n  },\n  'position': function() {\n    /// <summary>Get the current coordinates of the first element in the set of matched elements, relative to the offset parent.</summary>\n    /// <returns type=\"Object\" />\n  },\n  'prepend': function() {\n    /// <signature>\n    ///   <summary>Insert content, specified by the parameter, to the beginning of each element in the set of matched elements.</summary>\n    ///   <param name=\"content\" type=\"jQuery\">DOM element, array of elements, HTML string, or jQuery object to insert at the beginning of each element in the set of matched elements.</param>\n    ///   <param name=\"content\" type=\"jQuery\">One or more additional DOM elements, arrays of elements, HTML strings, or jQuery objects to insert at the beginning of each element in the set of matched elements.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Insert content, specified by the parameter, to the beginning of each element in the set of matched elements.</summary>\n    ///   <param name=\"function(index, html)\" type=\"Function\">A function that returns an HTML string, DOM element(s), or jQuery object to insert at the beginning of each element in the set of matched elements. Receives the index position of the element in the set and the old HTML value of the element as arguments. Within the function, this refers to the current element in the set.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'prependTo': function() {\n    /// <signature>\n    ///   <summary>Insert every element in the set of matched elements to the beginning of the target.</summary>\n    ///   <param name=\"target\" type=\"jQuery\">A selector, element, HTML string, or jQuery object; the matched set of elements will be inserted at the beginning of the element(s) specified by this parameter.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'prev': function() {\n    /// <signature>\n    ///   <summary>Get the immediately preceding sibling of each element in the set of matched elements, optionally filtered by a selector.</summary>\n    ///   <param name=\"selector\" type=\"String\">A string containing a selector expression to match elements against.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'prevAll': function() {\n    /// <signature>\n    ///   <summary>Get all preceding siblings of each element in the set of matched elements, optionally filtered by a selector.</summary>\n    ///   <param name=\"selector\" type=\"String\">A string containing a selector expression to match elements against.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'prevUntil': function() {\n    /// <signature>\n    ///   <summary>Get all preceding siblings of each element up to but not including the element matched by the selector, DOM node, or jQuery object.</summary>\n    ///   <param name=\"selector\" type=\"String\">A string containing a selector expression to indicate where to stop matching preceding sibling elements.</param>\n    ///   <param name=\"filter\" type=\"String\">A string containing a selector expression to match elements against.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Get all preceding siblings of each element up to but not including the element matched by the selector, DOM node, or jQuery object.</summary>\n    ///   <param name=\"element\" type=\"Element\">A DOM node or jQuery object indicating where to stop matching preceding sibling elements.</param>\n    ///   <param name=\"filter\" type=\"String\">A string containing a selector expression to match elements against.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'promise': function() {\n    /// <signature>\n    ///   <summary>Return a Promise object to observe when all actions of a certain type bound to the collection, queued or not, have finished.</summary>\n    ///   <param name=\"type\" type=\"String\">The type of queue that needs to be observed.</param>\n    ///   <param name=\"target\" type=\"Object\">Object onto which the promise methods have to be attached</param>\n    ///   <returns type=\"Promise\" />\n    /// </signature>\n  },\n  'prop': function() {\n    /// <signature>\n    ///   <summary>Set one or more properties for the set of matched elements.</summary>\n    ///   <param name=\"propertyName\" type=\"String\">The name of the property to set.</param>\n    ///   <param name=\"value\" type=\"Boolean\">A value to set for the property.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Set one or more properties for the set of matched elements.</summary>\n    ///   <param name=\"map\" type=\"Object\">A map of property-value pairs to set.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Set one or more properties for the set of matched elements.</summary>\n    ///   <param name=\"propertyName\" type=\"String\">The name of the property to set.</param>\n    ///   <param name=\"function(index, oldPropertyValue)\" type=\"Function\">A function returning the value to set. Receives the index position of the element in the set and the old property value as arguments. Within the function, the keyword this refers to the current element.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'pushStack': function() {\n    /// <signature>\n    ///   <summary>Add a collection of DOM elements onto the jQuery stack.</summary>\n    ///   <param name=\"elements\" type=\"Array\">An array of elements to push onto the stack and make into a new jQuery object.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Add a collection of DOM elements onto the jQuery stack.</summary>\n    ///   <param name=\"elements\" type=\"Array\">An array of elements to push onto the stack and make into a new jQuery object.</param>\n    ///   <param name=\"name\" type=\"String\">The name of a jQuery method that generated the array of elements.</param>\n    ///   <param name=\"arguments\" type=\"Array\">The arguments that were passed in to the jQuery method (for serialization).</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'queue': function() {\n    /// <signature>\n    ///   <summary>Manipulate the queue of functions to be executed on the matched elements.</summary>\n    ///   <param name=\"queueName\" type=\"String\">A string containing the name of the queue. Defaults to fx, the standard effects queue.</param>\n    ///   <param name=\"newQueue\" type=\"Array\">An array of functions to replace the current queue contents.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Manipulate the queue of functions to be executed on the matched elements.</summary>\n    ///   <param name=\"queueName\" type=\"String\">A string containing the name of the queue. Defaults to fx, the standard effects queue.</param>\n    ///   <param name=\"callback( next )\" type=\"Function\">The new function to add to the queue, with a function to call that will dequeue the next item.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'radio': function() {\n    /// <summary>Selects all  elements of type radio.</summary>\n  },\n  'ready': function() {\n    /// <signature>\n    ///   <summary>Specify a function to execute when the DOM is fully loaded.</summary>\n    ///   <param name=\"handler\" type=\"Function\">A function to execute after the DOM is ready.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'remove': function() {\n    /// <signature>\n    ///   <summary>Remove the set of matched elements from the DOM.</summary>\n    ///   <param name=\"selector\" type=\"String\">A selector expression that filters the set of matched elements to be removed.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'removeAttr': function() {\n    /// <signature>\n    ///   <summary>Remove an attribute from each element in the set of matched elements.</summary>\n    ///   <param name=\"attributeName\" type=\"String\">An attribute to remove; as of version 1.7, it can be a space-separated list of attributes.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'removeClass': function() {\n    /// <signature>\n    ///   <summary>Remove a single class, multiple classes, or all classes from each element in the set of matched elements.</summary>\n    ///   <param name=\"className\" type=\"String\">One or more space-separated classes to be removed from the class attribute of each matched element.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Remove a single class, multiple classes, or all classes from each element in the set of matched elements.</summary>\n    ///   <param name=\"function(index, class)\" type=\"Function\">A function returning one or more space-separated class names to be removed. Receives the index position of the element in the set and the old class value as arguments.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'removeData': function() {\n    /// <signature>\n    ///   <summary>Remove a previously-stored piece of data.</summary>\n    ///   <param name=\"name\" type=\"String\">A string naming the piece of data to delete.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Remove a previously-stored piece of data.</summary>\n    ///   <param name=\"list\" type=\"String\">An array or space-separated string naming the pieces of data to delete.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'removeProp': function() {\n    /// <signature>\n    ///   <summary>Remove a property for the set of matched elements.</summary>\n    ///   <param name=\"propertyName\" type=\"String\">The name of the property to set.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'replaceAll': function() {\n    /// <signature>\n    ///   <summary>Replace each target element with the set of matched elements.</summary>\n    ///   <param name=\"target\" type=\"String\">A selector expression indicating which element(s) to replace.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'replaceWith': function() {\n    /// <signature>\n    ///   <summary>Replace each element in the set of matched elements with the provided new content.</summary>\n    ///   <param name=\"newContent\" type=\"jQuery\">The content to insert. May be an HTML string, DOM element, or jQuery object.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Replace each element in the set of matched elements with the provided new content.</summary>\n    ///   <param name=\"function\" type=\"Function\">A function that returns content with which to replace the set of matched elements.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'reset': function() {\n    /// <summary>Selects all elements of type reset.</summary>\n  },\n  'resize': function() {\n    /// <signature>\n    ///   <summary>Bind an event handler to the \"resize\" JavaScript event, or trigger that event on an element.</summary>\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Bind an event handler to the \"resize\" JavaScript event, or trigger that event on an element.</summary>\n    ///   <param name=\"eventData\" type=\"Object\">A map of data that will be passed to the event handler.</param>\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'scroll': function() {\n    /// <signature>\n    ///   <summary>Bind an event handler to the \"scroll\" JavaScript event, or trigger that event on an element.</summary>\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Bind an event handler to the \"scroll\" JavaScript event, or trigger that event on an element.</summary>\n    ///   <param name=\"eventData\" type=\"Object\">A map of data that will be passed to the event handler.</param>\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'scrollLeft': function() {\n    /// <signature>\n    ///   <summary>Set the current horizontal position of the scroll bar for each of the set of matched elements.</summary>\n    ///   <param name=\"value\" type=\"Number\">An integer indicating the new position to set the scroll bar to.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'scrollTop': function() {\n    /// <signature>\n    ///   <summary>Set the current vertical position of the scroll bar for each of the set of matched elements.</summary>\n    ///   <param name=\"value\" type=\"Number\">An integer indicating the new position to set the scroll bar to.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'select': function() {\n    /// <signature>\n    ///   <summary>Bind an event handler to the \"select\" JavaScript event, or trigger that event on an element.</summary>\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Bind an event handler to the \"select\" JavaScript event, or trigger that event on an element.</summary>\n    ///   <param name=\"eventData\" type=\"Object\">A map of data that will be passed to the event handler.</param>\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'selected': function() {\n    /// <summary>Selects all elements that are selected.</summary>\n  },\n  'serialize': function() {\n    /// <summary>Encode a set of form elements as a string for submission.</summary>\n    /// <returns type=\"String\" />\n  },\n  'serializeArray': function() {\n    /// <summary>Encode a set of form elements as an array of names and values.</summary>\n    /// <returns type=\"Array\" />\n  },\n  'show': function() {\n    /// <signature>\n    ///   <summary>Display the matched elements.</summary>\n    ///   <param name=\"duration\" type=\"Number\">A string or number determining how long the animation will run.</param>\n    ///   <param name=\"callback\" type=\"Function\">A function to call once the animation is complete.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Display the matched elements.</summary>\n    ///   <param name=\"duration\" type=\"Number\">A string or number determining how long the animation will run.</param>\n    ///   <param name=\"easing\" type=\"String\">A string indicating which easing function to use for the transition.</param>\n    ///   <param name=\"callback\" type=\"Function\">A function to call once the animation is complete.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'siblings': function() {\n    /// <signature>\n    ///   <summary>Get the siblings of each element in the set of matched elements, optionally filtered by a selector.</summary>\n    ///   <param name=\"selector\" type=\"String\">A string containing a selector expression to match elements against.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'size': function() {\n    /// <summary>Return the number of elements in the jQuery object.</summary>\n    /// <returns type=\"Number\" />\n  },\n  'slice': function() {\n    /// <signature>\n    ///   <summary>Reduce the set of matched elements to a subset specified by a range of indices.</summary>\n    ///   <param name=\"start\" type=\"Number\">An integer indicating the 0-based position at which the elements begin to be selected. If negative, it indicates an offset from the end of the set.</param>\n    ///   <param name=\"end\" type=\"Number\">An integer indicating the 0-based position at which the elements stop being selected. If negative, it indicates an offset from the end of the set. If omitted, the range continues until the end of the set.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'slideDown': function() {\n    /// <signature>\n    ///   <summary>Display the matched elements with a sliding motion.</summary>\n    ///   <param name=\"duration\" type=\"Number\">A string or number determining how long the animation will run.</param>\n    ///   <param name=\"callback\" type=\"Function\">A function to call once the animation is complete.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Display the matched elements with a sliding motion.</summary>\n    ///   <param name=\"duration\" type=\"Number\">A string or number determining how long the animation will run.</param>\n    ///   <param name=\"easing\" type=\"String\">A string indicating which easing function to use for the transition.</param>\n    ///   <param name=\"callback\" type=\"Function\">A function to call once the animation is complete.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'slideToggle': function() {\n    /// <signature>\n    ///   <summary>Display or hide the matched elements with a sliding motion.</summary>\n    ///   <param name=\"duration\" type=\"Number\">A string or number determining how long the animation will run.</param>\n    ///   <param name=\"callback\" type=\"Function\">A function to call once the animation is complete.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Display or hide the matched elements with a sliding motion.</summary>\n    ///   <param name=\"duration\" type=\"Number\">A string or number determining how long the animation will run.</param>\n    ///   <param name=\"easing\" type=\"String\">A string indicating which easing function to use for the transition.</param>\n    ///   <param name=\"callback\" type=\"Function\">A function to call once the animation is complete.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'slideUp': function() {\n    /// <signature>\n    ///   <summary>Hide the matched elements with a sliding motion.</summary>\n    ///   <param name=\"duration\" type=\"Number\">A string or number determining how long the animation will run.</param>\n    ///   <param name=\"callback\" type=\"Function\">A function to call once the animation is complete.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Hide the matched elements with a sliding motion.</summary>\n    ///   <param name=\"duration\" type=\"Number\">A string or number determining how long the animation will run.</param>\n    ///   <param name=\"easing\" type=\"String\">A string indicating which easing function to use for the transition.</param>\n    ///   <param name=\"callback\" type=\"Function\">A function to call once the animation is complete.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'stop': function() {\n    /// <signature>\n    ///   <summary>Stop the currently-running animation on the matched elements.</summary>\n    ///   <param name=\"clearQueue\" type=\"Boolean\">A Boolean indicating whether to remove queued animation as well. Defaults to false.</param>\n    ///   <param name=\"jumpToEnd\" type=\"Boolean\">A Boolean indicating whether to complete the current animation immediately. Defaults to false.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Stop the currently-running animation on the matched elements.</summary>\n    ///   <param name=\"queue\" type=\"String\">The name of the queue in which to stop animations.</param>\n    ///   <param name=\"clearQueue\" type=\"Boolean\">A Boolean indicating whether to remove queued animation as well. Defaults to false.</param>\n    ///   <param name=\"jumpToEnd\" type=\"Boolean\">A Boolean indicating whether to complete the current animation immediately. Defaults to false.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'submit': function() {\n    /// <signature>\n    ///   <summary>Bind an event handler to the \"submit\" JavaScript event, or trigger that event on an element.</summary>\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Bind an event handler to the \"submit\" JavaScript event, or trigger that event on an element.</summary>\n    ///   <param name=\"eventData\" type=\"Object\">A map of data that will be passed to the event handler.</param>\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'text': function() {\n    /// <signature>\n    ///   <summary>Set the content of each element in the set of matched elements to the specified text.</summary>\n    ///   <param name=\"textString\" type=\"String\">A string of text to set as the content of each matched element.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Set the content of each element in the set of matched elements to the specified text.</summary>\n    ///   <param name=\"function(index, text)\" type=\"Function\">A function returning the text content to set. Receives the index position of the element in the set and the old text value as arguments.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'toArray': function() {\n    /// <summary>Retrieve all the DOM elements contained in the jQuery set, as an array.</summary>\n    /// <returns type=\"Array\" />\n  },\n  'toggle': function() {\n    /// <signature>\n    ///   <summary>Display or hide the matched elements.</summary>\n    ///   <param name=\"duration\" type=\"Number\">A string or number determining how long the animation will run.</param>\n    ///   <param name=\"callback\" type=\"Function\">A function to call once the animation is complete.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Display or hide the matched elements.</summary>\n    ///   <param name=\"duration\" type=\"Number\">A string or number determining how long the animation will run.</param>\n    ///   <param name=\"easing\" type=\"String\">A string indicating which easing function to use for the transition.</param>\n    ///   <param name=\"callback\" type=\"Function\">A function to call once the animation is complete.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Display or hide the matched elements.</summary>\n    ///   <param name=\"showOrHide\" type=\"Boolean\">A Boolean indicating whether to show or hide the elements.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'toggleClass': function() {\n    /// <signature>\n    ///   <summary>Add or remove one or more classes from each element in the set of matched elements, depending on either the class's presence or the value of the switch argument.</summary>\n    ///   <param name=\"className\" type=\"String\">One or more class names (separated by spaces) to be toggled for each element in the matched set.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Add or remove one or more classes from each element in the set of matched elements, depending on either the class's presence or the value of the switch argument.</summary>\n    ///   <param name=\"className\" type=\"String\">One or more class names (separated by spaces) to be toggled for each element in the matched set.</param>\n    ///   <param name=\"switch\" type=\"Boolean\">A Boolean (not just truthy/falsy) value to determine whether the class should be added or removed.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Add or remove one or more classes from each element in the set of matched elements, depending on either the class's presence or the value of the switch argument.</summary>\n    ///   <param name=\"switch\" type=\"Boolean\">A boolean value to determine whether the class should be added or removed.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Add or remove one or more classes from each element in the set of matched elements, depending on either the class's presence or the value of the switch argument.</summary>\n    ///   <param name=\"function(index, class, switch)\" type=\"Function\">A function that returns class names to be toggled in the class attribute of each element in the matched set. Receives the index position of the element in the set, the old class value, and the switch as arguments.</param>\n    ///   <param name=\"switch\" type=\"Boolean\">A boolean value to determine whether the class should be added or removed.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'trigger': function() {\n    /// <signature>\n    ///   <summary>Execute all handlers and behaviors attached to the matched elements for the given event type.</summary>\n    ///   <param name=\"eventType\" type=\"String\">A string containing a JavaScript event type, such as click or submit.</param>\n    ///   <param name=\"extraParameters\" type=\"Object\">Additional parameters to pass along to the event handler.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Execute all handlers and behaviors attached to the matched elements for the given event type.</summary>\n    ///   <param name=\"event\" type=\"Event\">A jQuery.Event object.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'triggerHandler': function() {\n    /// <signature>\n    ///   <summary>Execute all handlers attached to an element for an event.</summary>\n    ///   <param name=\"eventType\" type=\"String\">A string containing a JavaScript event type, such as click or submit.</param>\n    ///   <param name=\"extraParameters\" type=\"Array\">An array of additional parameters to pass along to the event handler.</param>\n    ///   <returns type=\"Object\" />\n    /// </signature>\n  },\n  'unbind': function() {\n    /// <signature>\n    ///   <summary>Remove a previously-attached event handler from the elements.</summary>\n    ///   <param name=\"eventType\" type=\"String\">A string containing a JavaScript event type, such as click or submit.</param>\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">The function that is to be no longer executed.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Remove a previously-attached event handler from the elements.</summary>\n    ///   <param name=\"eventType\" type=\"String\">A string containing a JavaScript event type, such as click or submit.</param>\n    ///   <param name=\"false\" type=\"Boolean\">Unbinds the corresponding 'return false' function that was bound using .bind( eventType, false ).</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Remove a previously-attached event handler from the elements.</summary>\n    ///   <param name=\"event\" type=\"Object\">A JavaScript event object as passed to an event handler.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'undelegate': function() {\n    /// <signature>\n    ///   <summary>Remove a handler from the event for all elements which match the current selector, based upon a specific set of root elements.</summary>\n    ///   <param name=\"selector\" type=\"String\">A selector which will be used to filter the event results.</param>\n    ///   <param name=\"eventType\" type=\"String\">A string containing a JavaScript event type, such as \"click\" or \"keydown\"</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Remove a handler from the event for all elements which match the current selector, based upon a specific set of root elements.</summary>\n    ///   <param name=\"selector\" type=\"String\">A selector which will be used to filter the event results.</param>\n    ///   <param name=\"eventType\" type=\"String\">A string containing a JavaScript event type, such as \"click\" or \"keydown\"</param>\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute at the time the event is triggered.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Remove a handler from the event for all elements which match the current selector, based upon a specific set of root elements.</summary>\n    ///   <param name=\"selector\" type=\"String\">A selector which will be used to filter the event results.</param>\n    ///   <param name=\"events\" type=\"Object\">A map of one or more event types and previously bound functions to unbind from them.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Remove a handler from the event for all elements which match the current selector, based upon a specific set of root elements.</summary>\n    ///   <param name=\"namespace\" type=\"String\">A string containing a namespace to unbind all events from.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'unload': function() {\n    /// <signature>\n    ///   <summary>Bind an event handler to the \"unload\" JavaScript event.</summary>\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute when the event is triggered.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Bind an event handler to the \"unload\" JavaScript event.</summary>\n    ///   <param name=\"eventData\" type=\"Object\">A map of data that will be passed to the event handler.</param>\n    ///   <param name=\"handler(eventObject)\" type=\"Function\">A function to execute each time the event is triggered.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'unwrap': function() {\n    /// <summary>Remove the parents of the set of matched elements from the DOM, leaving the matched elements in their place.</summary>\n    /// <returns type=\"jQuery\" />\n  },\n  'val': function() {\n    /// <signature>\n    ///   <summary>Set the value of each element in the set of matched elements.</summary>\n    ///   <param name=\"value\" type=\"String\">A string of text or an array of strings corresponding to the value of each matched element to set as selected/checked.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Set the value of each element in the set of matched elements.</summary>\n    ///   <param name=\"function(index, value)\" type=\"Function\">A function returning the value to set. this is the current element. Receives the index position of the element in the set and the old value as arguments.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'visible': function() {\n    /// <summary>Selects all elements that are visible.</summary>\n  },\n  'width': function() {\n    /// <signature>\n    ///   <summary>Set the CSS width of each element in the set of matched elements.</summary>\n    ///   <param name=\"value\" type=\"Number\">An integer representing the number of pixels, or an integer along with an optional unit of measure appended (as a string).</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Set the CSS width of each element in the set of matched elements.</summary>\n    ///   <param name=\"function(index, width)\" type=\"Function\">A function returning the width to set. Receives the index position of the element in the set and the old width as arguments. Within the function, this refers to the current element in the set.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'wrap': function() {\n    /// <signature>\n    ///   <summary>Wrap an HTML structure around each element in the set of matched elements.</summary>\n    ///   <param name=\"wrappingElement\" type=\"jQuery\">An HTML snippet, selector expression, jQuery object, or DOM element specifying the structure to wrap around the matched elements.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Wrap an HTML structure around each element in the set of matched elements.</summary>\n    ///   <param name=\"function(index)\" type=\"Function\">A callback function returning the HTML content or jQuery object to wrap around the matched elements. Receives the index position of the element in the set as an argument. Within the function, this refers to the current element in the set.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'wrapAll': function() {\n    /// <signature>\n    ///   <summary>Wrap an HTML structure around all elements in the set of matched elements.</summary>\n    ///   <param name=\"wrappingElement\" type=\"jQuery\">An HTML snippet, selector expression, jQuery object, or DOM element specifying the structure to wrap around the matched elements.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n  'wrapInner': function() {\n    /// <signature>\n    ///   <summary>Wrap an HTML structure around the content of each element in the set of matched elements.</summary>\n    ///   <param name=\"wrappingElement\" type=\"String\">An HTML snippet, selector expression, jQuery object, or DOM element specifying the structure to wrap around the content of the matched elements.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Wrap an HTML structure around the content of each element in the set of matched elements.</summary>\n    ///   <param name=\"function(index)\" type=\"Function\">A callback function which generates a structure to wrap around the content of the matched elements. Receives the index position of the element in the set as an argument. Within the function, this refers to the current element in the set.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n});\n\nintellisense.annotate(window, {\n  '$': function() {\n    /// <signature>\n    ///   <summary>Accepts a string containing a CSS selector which is then used to match a set of elements.</summary>\n    ///   <param name=\"selector\" type=\"String\">A string containing a selector expression</param>\n    ///   <param name=\"context\" type=\"jQuery\">A DOM Element, Document, or jQuery to use as context</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Accepts a string containing a CSS selector which is then used to match a set of elements.</summary>\n    ///   <param name=\"element\" type=\"Element\">A DOM element to wrap in a jQuery object.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Accepts a string containing a CSS selector which is then used to match a set of elements.</summary>\n    ///   <param name=\"object\" type=\"Object\">A plain object to wrap in a jQuery object.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Accepts a string containing a CSS selector which is then used to match a set of elements.</summary>\n    ///   <param name=\"elementArray\" type=\"Array\">An array containing a set of DOM elements to wrap in a jQuery object.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n    /// <signature>\n    ///   <summary>Accepts a string containing a CSS selector which is then used to match a set of elements.</summary>\n    ///   <param name=\"jQuery object\" type=\"Object\">An existing jQuery object to clone.</param>\n    ///   <returns type=\"jQuery\" />\n    /// </signature>\n  },\n});\n\n"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/DDDPPP.Chap20.CommandHandler.Presentation/Scripts/jquery-1.7.1.js",
    "content": "/*!\n * jQuery JavaScript Library v1.7.1\n * http://jquery.com/\n *\n * Copyright 2011, John Resig\n * Released under the the MIT License.\n * http://jquery.org/license\n *\n * Includes Sizzle.js\n * http://sizzlejs.com/\n * Copyright 2011, The Dojo Foundation\n * Released under the MIT and BSD Licenses.\n *\n * Date: Mon Nov 21 21:11:03 2011 -0500\n */\n(function( window, undefined ) {\n\n// Use the correct document accordingly with window argument (sandbox)\nvar document = window.document,\n\tnavigator = window.navigator,\n\tlocation = window.location;\nvar jQuery = (function() {\n\n// Define a local copy of jQuery\nvar jQuery = function( selector, context ) {\n\t\t// The jQuery object is actually just the init constructor 'enhanced'\n\t\treturn new jQuery.fn.init( selector, context, rootjQuery );\n\t},\n\n\t// Map over jQuery in case of overwrite\n\t_jQuery = window.jQuery,\n\n\t// Map over the $ in case of overwrite\n\t_$ = window.$,\n\n\t// A central reference to the root jQuery(document)\n\trootjQuery,\n\n\t// A simple way to check for HTML strings or ID strings\n\t// Prioritize #id over <tag> to avoid XSS via location.hash (#9521)\n\tquickExpr = /^(?:[^#<]*(<[\\w\\W]+>)[^>]*$|#([\\w\\-]*)$)/,\n\n\t// Check if a string has a non-whitespace character in it\n\trnotwhite = /\\S/,\n\n\t// Used for trimming whitespace\n\ttrimLeft = /^\\s+/,\n\ttrimRight = /\\s+$/,\n\n\t// Match a standalone tag\n\trsingleTag = /^<(\\w+)\\s*\\/?>(?:<\\/\\1>)?$/,\n\n\t// JSON RegExp\n\trvalidchars = /^[\\],:{}\\s]*$/,\n\trvalidescape = /\\\\(?:[\"\\\\\\/bfnrt]|u[0-9a-fA-F]{4})/g,\n\trvalidtokens = /\"[^\"\\\\\\n\\r]*\"|true|false|null|-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?/g,\n\trvalidbraces = /(?:^|:|,)(?:\\s*\\[)+/g,\n\n\t// Useragent RegExp\n\trwebkit = /(webkit)[ \\/]([\\w.]+)/,\n\tropera = /(opera)(?:.*version)?[ \\/]([\\w.]+)/,\n\trmsie = /(msie) ([\\w.]+)/,\n\trmozilla = /(mozilla)(?:.*? rv:([\\w.]+))?/,\n\n\t// Matches dashed string for camelizing\n\trdashAlpha = /-([a-z]|[0-9])/ig,\n\trmsPrefix = /^-ms-/,\n\n\t// Used by jQuery.camelCase as callback to replace()\n\tfcamelCase = function( all, letter ) {\n\t\treturn ( letter + \"\" ).toUpperCase();\n\t},\n\n\t// Keep a UserAgent string for use with jQuery.browser\n\tuserAgent = navigator.userAgent,\n\n\t// For matching the engine and version of the browser\n\tbrowserMatch,\n\n\t// The deferred used on DOM ready\n\treadyList,\n\n\t// The ready event handler\n\tDOMContentLoaded,\n\n\t// Save a reference to some core methods\n\ttoString = Object.prototype.toString,\n\thasOwn = Object.prototype.hasOwnProperty,\n\tpush = Array.prototype.push,\n\tslice = Array.prototype.slice,\n\ttrim = String.prototype.trim,\n\tindexOf = Array.prototype.indexOf,\n\n\t// [[Class]] -> type pairs\n\tclass2type = {};\n\njQuery.fn = jQuery.prototype = {\n\tconstructor: jQuery,\n\tinit: function( selector, context, rootjQuery ) {\n\t\tvar match, elem, ret, doc;\n\n\t\t// Handle $(\"\"), $(null), or $(undefined)\n\t\tif ( !selector ) {\n\t\t\treturn this;\n\t\t}\n\n\t\t// Handle $(DOMElement)\n\t\tif ( selector.nodeType ) {\n\t\t\tthis.context = this[0] = selector;\n\t\t\tthis.length = 1;\n\t\t\treturn this;\n\t\t}\n\n\t\t// The body element only exists once, optimize finding it\n\t\tif ( selector === \"body\" && !context && document.body ) {\n\t\t\tthis.context = document;\n\t\t\tthis[0] = document.body;\n\t\t\tthis.selector = selector;\n\t\t\tthis.length = 1;\n\t\t\treturn this;\n\t\t}\n\n\t\t// Handle HTML strings\n\t\tif ( typeof selector === \"string\" ) {\n\t\t\t// Are we dealing with HTML string or an ID?\n\t\t\tif ( selector.charAt(0) === \"<\" && selector.charAt( selector.length - 1 ) === \">\" && selector.length >= 3 ) {\n\t\t\t\t// Assume that strings that start and end with <> are HTML and skip the regex check\n\t\t\t\tmatch = [ null, selector, null ];\n\n\t\t\t} else {\n\t\t\t\tmatch = quickExpr.exec( selector );\n\t\t\t}\n\n\t\t\t// Verify a match, and that no context was specified for #id\n\t\t\tif ( match && (match[1] || !context) ) {\n\n\t\t\t\t// HANDLE: $(html) -> $(array)\n\t\t\t\tif ( match[1] ) {\n\t\t\t\t\tcontext = context instanceof jQuery ? context[0] : context;\n\t\t\t\t\tdoc = ( context ? context.ownerDocument || context : document );\n\n\t\t\t\t\t// If a single string is passed in and it's a single tag\n\t\t\t\t\t// just do a createElement and skip the rest\n\t\t\t\t\tret = rsingleTag.exec( selector );\n\n\t\t\t\t\tif ( ret ) {\n\t\t\t\t\t\tif ( jQuery.isPlainObject( context ) ) {\n\t\t\t\t\t\t\tselector = [ document.createElement( ret[1] ) ];\n\t\t\t\t\t\t\tjQuery.fn.attr.call( selector, context, true );\n\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tselector = [ doc.createElement( ret[1] ) ];\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\tret = jQuery.buildFragment( [ match[1] ], [ doc ] );\n\t\t\t\t\t\tselector = ( ret.cacheable ? jQuery.clone(ret.fragment) : ret.fragment ).childNodes;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn jQuery.merge( this, selector );\n\n\t\t\t\t// HANDLE: $(\"#id\")\n\t\t\t\t} else {\n\t\t\t\t\telem = document.getElementById( match[2] );\n\n\t\t\t\t\t// Check parentNode to catch when Blackberry 4.6 returns\n\t\t\t\t\t// nodes that are no longer in the document #6963\n\t\t\t\t\tif ( elem && elem.parentNode ) {\n\t\t\t\t\t\t// Handle the case where IE and Opera return items\n\t\t\t\t\t\t// by name instead of ID\n\t\t\t\t\t\tif ( elem.id !== match[2] ) {\n\t\t\t\t\t\t\treturn rootjQuery.find( selector );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Otherwise, we inject the element directly into the jQuery object\n\t\t\t\t\t\tthis.length = 1;\n\t\t\t\t\t\tthis[0] = elem;\n\t\t\t\t\t}\n\n\t\t\t\t\tthis.context = document;\n\t\t\t\t\tthis.selector = selector;\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\n\t\t\t// HANDLE: $(expr, $(...))\n\t\t\t} else if ( !context || context.jquery ) {\n\t\t\t\treturn ( context || rootjQuery ).find( selector );\n\n\t\t\t// HANDLE: $(expr, context)\n\t\t\t// (which is just equivalent to: $(context).find(expr)\n\t\t\t} else {\n\t\t\t\treturn this.constructor( context ).find( selector );\n\t\t\t}\n\n\t\t// HANDLE: $(function)\n\t\t// Shortcut for document ready\n\t\t} else if ( jQuery.isFunction( selector ) ) {\n\t\t\treturn rootjQuery.ready( selector );\n\t\t}\n\n\t\tif ( selector.selector !== undefined ) {\n\t\t\tthis.selector = selector.selector;\n\t\t\tthis.context = selector.context;\n\t\t}\n\n\t\treturn jQuery.makeArray( selector, this );\n\t},\n\n\t// Start with an empty selector\n\tselector: \"\",\n\n\t// The current version of jQuery being used\n\tjquery: \"1.7.1\",\n\n\t// The default length of a jQuery object is 0\n\tlength: 0,\n\n\t// The number of elements contained in the matched element set\n\tsize: function() {\n\t\treturn this.length;\n\t},\n\n\ttoArray: function() {\n\t\treturn slice.call( this, 0 );\n\t},\n\n\t// Get the Nth element in the matched element set OR\n\t// Get the whole matched element set as a clean array\n\tget: function( num ) {\n\t\treturn num == null ?\n\n\t\t\t// Return a 'clean' array\n\t\t\tthis.toArray() :\n\n\t\t\t// Return just the object\n\t\t\t( num < 0 ? this[ this.length + num ] : this[ num ] );\n\t},\n\n\t// Take an array of elements and push it onto the stack\n\t// (returning the new matched element set)\n\tpushStack: function( elems, name, selector ) {\n\t\t// Build a new jQuery matched element set\n\t\tvar ret = this.constructor();\n\n\t\tif ( jQuery.isArray( elems ) ) {\n\t\t\tpush.apply( ret, elems );\n\n\t\t} else {\n\t\t\tjQuery.merge( ret, elems );\n\t\t}\n\n\t\t// Add the old object onto the stack (as a reference)\n\t\tret.prevObject = this;\n\n\t\tret.context = this.context;\n\n\t\tif ( name === \"find\" ) {\n\t\t\tret.selector = this.selector + ( this.selector ? \" \" : \"\" ) + selector;\n\t\t} else if ( name ) {\n\t\t\tret.selector = this.selector + \".\" + name + \"(\" + selector + \")\";\n\t\t}\n\n\t\t// Return the newly-formed element set\n\t\treturn ret;\n\t},\n\n\t// Execute a callback for every element in the matched set.\n\t// (You can seed the arguments with an array of args, but this is\n\t// only used internally.)\n\teach: function( callback, args ) {\n\t\treturn jQuery.each( this, callback, args );\n\t},\n\n\tready: function( fn ) {\n\t\t// Attach the listeners\n\t\tjQuery.bindReady();\n\n\t\t// Add the callback\n\t\treadyList.add( fn );\n\n\t\treturn this;\n\t},\n\n\teq: function( i ) {\n\t\ti = +i;\n\t\treturn i === -1 ?\n\t\t\tthis.slice( i ) :\n\t\t\tthis.slice( i, i + 1 );\n\t},\n\n\tfirst: function() {\n\t\treturn this.eq( 0 );\n\t},\n\n\tlast: function() {\n\t\treturn this.eq( -1 );\n\t},\n\n\tslice: function() {\n\t\treturn this.pushStack( slice.apply( this, arguments ),\n\t\t\t\"slice\", slice.call(arguments).join(\",\") );\n\t},\n\n\tmap: function( callback ) {\n\t\treturn this.pushStack( jQuery.map(this, function( elem, i ) {\n\t\t\treturn callback.call( elem, i, elem );\n\t\t}));\n\t},\n\n\tend: function() {\n\t\treturn this.prevObject || this.constructor(null);\n\t},\n\n\t// For internal use only.\n\t// Behaves like an Array's method, not like a jQuery method.\n\tpush: push,\n\tsort: [].sort,\n\tsplice: [].splice\n};\n\n// Give the init function the jQuery prototype for later instantiation\njQuery.fn.init.prototype = jQuery.fn;\n\njQuery.extend = jQuery.fn.extend = function() {\n\tvar options, name, src, copy, copyIsArray, clone,\n\t\ttarget = arguments[0] || {},\n\t\ti = 1,\n\t\tlength = arguments.length,\n\t\tdeep = false;\n\n\t// Handle a deep copy situation\n\tif ( typeof target === \"boolean\" ) {\n\t\tdeep = target;\n\t\ttarget = arguments[1] || {};\n\t\t// skip the boolean and the target\n\t\ti = 2;\n\t}\n\n\t// Handle case when target is a string or something (possible in deep copy)\n\tif ( typeof target !== \"object\" && !jQuery.isFunction(target) ) {\n\t\ttarget = {};\n\t}\n\n\t// extend jQuery itself if only one argument is passed\n\tif ( length === i ) {\n\t\ttarget = this;\n\t\t--i;\n\t}\n\n\tfor ( ; i < length; i++ ) {\n\t\t// Only deal with non-null/undefined values\n\t\tif ( (options = arguments[ i ]) != null ) {\n\t\t\t// Extend the base object\n\t\t\tfor ( name in options ) {\n\t\t\t\tsrc = target[ name ];\n\t\t\t\tcopy = options[ name ];\n\n\t\t\t\t// Prevent never-ending loop\n\t\t\t\tif ( target === copy ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// Recurse if we're merging plain objects or arrays\n\t\t\t\tif ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) {\n\t\t\t\t\tif ( copyIsArray ) {\n\t\t\t\t\t\tcopyIsArray = false;\n\t\t\t\t\t\tclone = src && jQuery.isArray(src) ? src : [];\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\tclone = src && jQuery.isPlainObject(src) ? src : {};\n\t\t\t\t\t}\n\n\t\t\t\t\t// Never move original objects, clone them\n\t\t\t\t\ttarget[ name ] = jQuery.extend( deep, clone, copy );\n\n\t\t\t\t// Don't bring in undefined values\n\t\t\t\t} else if ( copy !== undefined ) {\n\t\t\t\t\ttarget[ name ] = copy;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Return the modified object\n\treturn target;\n};\n\njQuery.extend({\n\tnoConflict: function( deep ) {\n\t\tif ( window.$ === jQuery ) {\n\t\t\twindow.$ = _$;\n\t\t}\n\n\t\tif ( deep && window.jQuery === jQuery ) {\n\t\t\twindow.jQuery = _jQuery;\n\t\t}\n\n\t\treturn jQuery;\n\t},\n\n\t// Is the DOM ready to be used? Set to true once it occurs.\n\tisReady: false,\n\n\t// A counter to track how many items to wait for before\n\t// the ready event fires. See #6781\n\treadyWait: 1,\n\n\t// Hold (or release) the ready event\n\tholdReady: function( hold ) {\n\t\tif ( hold ) {\n\t\t\tjQuery.readyWait++;\n\t\t} else {\n\t\t\tjQuery.ready( true );\n\t\t}\n\t},\n\n\t// Handle when the DOM is ready\n\tready: function( wait ) {\n\t\t// Either a released hold or an DOMready/load event and not yet ready\n\t\tif ( (wait === true && !--jQuery.readyWait) || (wait !== true && !jQuery.isReady) ) {\n\t\t\t// Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).\n\t\t\tif ( !document.body ) {\n\t\t\t\treturn setTimeout( jQuery.ready, 1 );\n\t\t\t}\n\n\t\t\t// Remember that the DOM is ready\n\t\t\tjQuery.isReady = true;\n\n\t\t\t// If a normal DOM Ready event fired, decrement, and wait if need be\n\t\t\tif ( wait !== true && --jQuery.readyWait > 0 ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// If there are functions bound, to execute\n\t\t\treadyList.fireWith( document, [ jQuery ] );\n\n\t\t\t// Trigger any bound ready events\n\t\t\tif ( jQuery.fn.trigger ) {\n\t\t\t\tjQuery( document ).trigger( \"ready\" ).off( \"ready\" );\n\t\t\t}\n\t\t}\n\t},\n\n\tbindReady: function() {\n\t\tif ( readyList ) {\n\t\t\treturn;\n\t\t}\n\n\t\treadyList = jQuery.Callbacks( \"once memory\" );\n\n\t\t// Catch cases where $(document).ready() is called after the\n\t\t// browser event has already occurred.\n\t\tif ( document.readyState === \"complete\" ) {\n\t\t\t// Handle it asynchronously to allow scripts the opportunity to delay ready\n\t\t\treturn setTimeout( jQuery.ready, 1 );\n\t\t}\n\n\t\t// Mozilla, Opera and webkit nightlies currently support this event\n\t\tif ( document.addEventListener ) {\n\t\t\t// Use the handy event callback\n\t\t\tdocument.addEventListener( \"DOMContentLoaded\", DOMContentLoaded, false );\n\n\t\t\t// A fallback to window.onload, that will always work\n\t\t\twindow.addEventListener( \"load\", jQuery.ready, false );\n\n\t\t// If IE event model is used\n\t\t} else if ( document.attachEvent ) {\n\t\t\t// ensure firing before onload,\n\t\t\t// maybe late but safe also for iframes\n\t\t\tdocument.attachEvent( \"onreadystatechange\", DOMContentLoaded );\n\n\t\t\t// A fallback to window.onload, that will always work\n\t\t\twindow.attachEvent( \"onload\", jQuery.ready );\n\n\t\t\t// If IE and not a frame\n\t\t\t// continually check to see if the document is ready\n\t\t\tvar toplevel = false;\n\n\t\t\ttry {\n\t\t\t\ttoplevel = window.frameElement == null;\n\t\t\t} catch(e) {}\n\n\t\t\tif ( document.documentElement.doScroll && toplevel ) {\n\t\t\t\tdoScrollCheck();\n\t\t\t}\n\t\t}\n\t},\n\n\t// See test/unit/core.js for details concerning isFunction.\n\t// Since version 1.3, DOM methods and functions like alert\n\t// aren't supported. They return false on IE (#2968).\n\tisFunction: function( obj ) {\n\t\treturn jQuery.type(obj) === \"function\";\n\t},\n\n\tisArray: Array.isArray || function( obj ) {\n\t\treturn jQuery.type(obj) === \"array\";\n\t},\n\n\t// A crude way of determining if an object is a window\n\tisWindow: function( obj ) {\n\t\treturn obj && typeof obj === \"object\" && \"setInterval\" in obj;\n\t},\n\n\tisNumeric: function( obj ) {\n\t\treturn !isNaN( parseFloat(obj) ) && isFinite( obj );\n\t},\n\n\ttype: function( obj ) {\n\t\treturn obj == null ?\n\t\t\tString( obj ) :\n\t\t\tclass2type[ toString.call(obj) ] || \"object\";\n\t},\n\n\tisPlainObject: function( obj ) {\n\t\t// Must be an Object.\n\t\t// Because of IE, we also have to check the presence of the constructor property.\n\t\t// Make sure that DOM nodes and window objects don't pass through, as well\n\t\tif ( !obj || jQuery.type(obj) !== \"object\" || obj.nodeType || jQuery.isWindow( obj ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\ttry {\n\t\t\t// Not own constructor property must be Object\n\t\t\tif ( obj.constructor &&\n\t\t\t\t!hasOwn.call(obj, \"constructor\") &&\n\t\t\t\t!hasOwn.call(obj.constructor.prototype, \"isPrototypeOf\") ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} catch ( e ) {\n\t\t\t// IE8,9 Will throw exceptions on certain host objects #9897\n\t\t\treturn false;\n\t\t}\n\n\t\t// Own properties are enumerated firstly, so to speed up,\n\t\t// if last one is own, then all properties are own.\n\n\t\tvar key;\n\t\tfor ( key in obj ) {}\n\n\t\treturn key === undefined || hasOwn.call( obj, key );\n\t},\n\n\tisEmptyObject: function( obj ) {\n\t\tfor ( var name in obj ) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t},\n\n\terror: function( msg ) {\n\t\tthrow new Error( msg );\n\t},\n\n\tparseJSON: function( data ) {\n\t\tif ( typeof data !== \"string\" || !data ) {\n\t\t\treturn null;\n\t\t}\n\n\t\t// Make sure leading/trailing whitespace is removed (IE can't handle it)\n\t\tdata = jQuery.trim( data );\n\n\t\t// Attempt to parse using the native JSON parser first\n\t\tif ( window.JSON && window.JSON.parse ) {\n\t\t\treturn window.JSON.parse( data );\n\t\t}\n\n\t\t// Make sure the incoming data is actual JSON\n\t\t// Logic borrowed from http://json.org/json2.js\n\t\tif ( rvalidchars.test( data.replace( rvalidescape, \"@\" )\n\t\t\t.replace( rvalidtokens, \"]\" )\n\t\t\t.replace( rvalidbraces, \"\")) ) {\n\n\t\t\treturn ( new Function( \"return \" + data ) )();\n\n\t\t}\n\t\tjQuery.error( \"Invalid JSON: \" + data );\n\t},\n\n\t// Cross-browser xml parsing\n\tparseXML: function( data ) {\n\t\tvar xml, tmp;\n\t\ttry {\n\t\t\tif ( window.DOMParser ) { // Standard\n\t\t\t\ttmp = new DOMParser();\n\t\t\t\txml = tmp.parseFromString( data , \"text/xml\" );\n\t\t\t} else { // IE\n\t\t\t\txml = new ActiveXObject( \"Microsoft.XMLDOM\" );\n\t\t\t\txml.async = \"false\";\n\t\t\t\txml.loadXML( data );\n\t\t\t}\n\t\t} catch( e ) {\n\t\t\txml = undefined;\n\t\t}\n\t\tif ( !xml || !xml.documentElement || xml.getElementsByTagName( \"parsererror\" ).length ) {\n\t\t\tjQuery.error( \"Invalid XML: \" + data );\n\t\t}\n\t\treturn xml;\n\t},\n\n\tnoop: function() {},\n\n\t// Evaluates a script in a global context\n\t// Workarounds based on findings by Jim Driscoll\n\t// http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context\n\tglobalEval: function( data ) {\n\t\tif ( data && rnotwhite.test( data ) ) {\n\t\t\t// We use execScript on Internet Explorer\n\t\t\t// We use an anonymous function so that context is window\n\t\t\t// rather than jQuery in Firefox\n\t\t\t( window.execScript || function( data ) {\n\t\t\t\twindow[ \"eval\" ].call( window, data );\n\t\t\t} )( data );\n\t\t}\n\t},\n\n\t// Convert dashed to camelCase; used by the css and data modules\n\t// Microsoft forgot to hump their vendor prefix (#9572)\n\tcamelCase: function( string ) {\n\t\treturn string.replace( rmsPrefix, \"ms-\" ).replace( rdashAlpha, fcamelCase );\n\t},\n\n\tnodeName: function( elem, name ) {\n\t\treturn elem.nodeName && elem.nodeName.toUpperCase() === name.toUpperCase();\n\t},\n\n\t// args is for internal usage only\n\teach: function( object, callback, args ) {\n\t\tvar name, i = 0,\n\t\t\tlength = object.length,\n\t\t\tisObj = length === undefined || jQuery.isFunction( object );\n\n\t\tif ( args ) {\n\t\t\tif ( isObj ) {\n\t\t\t\tfor ( name in object ) {\n\t\t\t\t\tif ( callback.apply( object[ name ], args ) === false ) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfor ( ; i < length; ) {\n\t\t\t\t\tif ( callback.apply( object[ i++ ], args ) === false ) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t// A special, fast, case for the most common use of each\n\t\t} else {\n\t\t\tif ( isObj ) {\n\t\t\t\tfor ( name in object ) {\n\t\t\t\t\tif ( callback.call( object[ name ], name, object[ name ] ) === false ) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfor ( ; i < length; ) {\n\t\t\t\t\tif ( callback.call( object[ i ], i, object[ i++ ] ) === false ) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn object;\n\t},\n\n\t// Use native String.trim function wherever possible\n\ttrim: trim ?\n\t\tfunction( text ) {\n\t\t\treturn text == null ?\n\t\t\t\t\"\" :\n\t\t\t\ttrim.call( text );\n\t\t} :\n\n\t\t// Otherwise use our own trimming functionality\n\t\tfunction( text ) {\n\t\t\treturn text == null ?\n\t\t\t\t\"\" :\n\t\t\t\ttext.toString().replace( trimLeft, \"\" ).replace( trimRight, \"\" );\n\t\t},\n\n\t// results is for internal usage only\n\tmakeArray: function( array, results ) {\n\t\tvar ret = results || [];\n\n\t\tif ( array != null ) {\n\t\t\t// The window, strings (and functions) also have 'length'\n\t\t\t// Tweaked logic slightly to handle Blackberry 4.7 RegExp issues #6930\n\t\t\tvar type = jQuery.type( array );\n\n\t\t\tif ( array.length == null || type === \"string\" || type === \"function\" || type === \"regexp\" || jQuery.isWindow( array ) ) {\n\t\t\t\tpush.call( ret, array );\n\t\t\t} else {\n\t\t\t\tjQuery.merge( ret, array );\n\t\t\t}\n\t\t}\n\n\t\treturn ret;\n\t},\n\n\tinArray: function( elem, array, i ) {\n\t\tvar len;\n\n\t\tif ( array ) {\n\t\t\tif ( indexOf ) {\n\t\t\t\treturn indexOf.call( array, elem, i );\n\t\t\t}\n\n\t\t\tlen = array.length;\n\t\t\ti = i ? i < 0 ? Math.max( 0, len + i ) : i : 0;\n\n\t\t\tfor ( ; i < len; i++ ) {\n\t\t\t\t// Skip accessing in sparse arrays\n\t\t\t\tif ( i in array && array[ i ] === elem ) {\n\t\t\t\t\treturn i;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn -1;\n\t},\n\n\tmerge: function( first, second ) {\n\t\tvar i = first.length,\n\t\t\tj = 0;\n\n\t\tif ( typeof second.length === \"number\" ) {\n\t\t\tfor ( var l = second.length; j < l; j++ ) {\n\t\t\t\tfirst[ i++ ] = second[ j ];\n\t\t\t}\n\n\t\t} else {\n\t\t\twhile ( second[j] !== undefined ) {\n\t\t\t\tfirst[ i++ ] = second[ j++ ];\n\t\t\t}\n\t\t}\n\n\t\tfirst.length = i;\n\n\t\treturn first;\n\t},\n\n\tgrep: function( elems, callback, inv ) {\n\t\tvar ret = [], retVal;\n\t\tinv = !!inv;\n\n\t\t// Go through the array, only saving the items\n\t\t// that pass the validator function\n\t\tfor ( var i = 0, length = elems.length; i < length; i++ ) {\n\t\t\tretVal = !!callback( elems[ i ], i );\n\t\t\tif ( inv !== retVal ) {\n\t\t\t\tret.push( elems[ i ] );\n\t\t\t}\n\t\t}\n\n\t\treturn ret;\n\t},\n\n\t// arg is for internal usage only\n\tmap: function( elems, callback, arg ) {\n\t\tvar value, key, ret = [],\n\t\t\ti = 0,\n\t\t\tlength = elems.length,\n\t\t\t// jquery objects are treated as arrays\n\t\t\tisArray = elems instanceof jQuery || length !== undefined && typeof length === \"number\" && ( ( length > 0 && elems[ 0 ] && elems[ length -1 ] ) || length === 0 || jQuery.isArray( elems ) ) ;\n\n\t\t// Go through the array, translating each of the items to their\n\t\tif ( isArray ) {\n\t\t\tfor ( ; i < length; i++ ) {\n\t\t\t\tvalue = callback( elems[ i ], i, arg );\n\n\t\t\t\tif ( value != null ) {\n\t\t\t\t\tret[ ret.length ] = value;\n\t\t\t\t}\n\t\t\t}\n\n\t\t// Go through every key on the object,\n\t\t} else {\n\t\t\tfor ( key in elems ) {\n\t\t\t\tvalue = callback( elems[ key ], key, arg );\n\n\t\t\t\tif ( value != null ) {\n\t\t\t\t\tret[ ret.length ] = value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Flatten any nested arrays\n\t\treturn ret.concat.apply( [], ret );\n\t},\n\n\t// A global GUID counter for objects\n\tguid: 1,\n\n\t// Bind a function to a context, optionally partially applying any\n\t// arguments.\n\tproxy: function( fn, context ) {\n\t\tif ( typeof context === \"string\" ) {\n\t\t\tvar tmp = fn[ context ];\n\t\t\tcontext = fn;\n\t\t\tfn = tmp;\n\t\t}\n\n\t\t// Quick check to determine if target is callable, in the spec\n\t\t// this throws a TypeError, but we will just return undefined.\n\t\tif ( !jQuery.isFunction( fn ) ) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\t// Simulated bind\n\t\tvar args = slice.call( arguments, 2 ),\n\t\t\tproxy = function() {\n\t\t\t\treturn fn.apply( context, args.concat( slice.call( arguments ) ) );\n\t\t\t};\n\n\t\t// Set the guid of unique handler to the same of original handler, so it can be removed\n\t\tproxy.guid = fn.guid = fn.guid || proxy.guid || jQuery.guid++;\n\n\t\treturn proxy;\n\t},\n\n\t// Mutifunctional method to get and set values to a collection\n\t// The value/s can optionally be executed if it's a function\n\taccess: function( elems, key, value, exec, fn, pass ) {\n\t\tvar length = elems.length;\n\n\t\t// Setting many attributes\n\t\tif ( typeof key === \"object\" ) {\n\t\t\tfor ( var k in key ) {\n\t\t\t\tjQuery.access( elems, k, key[k], exec, fn, value );\n\t\t\t}\n\t\t\treturn elems;\n\t\t}\n\n\t\t// Setting one attribute\n\t\tif ( value !== undefined ) {\n\t\t\t// Optionally, function values get executed if exec is true\n\t\t\texec = !pass && exec && jQuery.isFunction(value);\n\n\t\t\tfor ( var i = 0; i < length; i++ ) {\n\t\t\t\tfn( elems[i], key, exec ? value.call( elems[i], i, fn( elems[i], key ) ) : value, pass );\n\t\t\t}\n\n\t\t\treturn elems;\n\t\t}\n\n\t\t// Getting an attribute\n\t\treturn length ? fn( elems[0], key ) : undefined;\n\t},\n\n\tnow: function() {\n\t\treturn ( new Date() ).getTime();\n\t},\n\n\t// Use of jQuery.browser is frowned upon.\n\t// More details: http://docs.jquery.com/Utilities/jQuery.browser\n\tuaMatch: function( ua ) {\n\t\tua = ua.toLowerCase();\n\n\t\tvar match = rwebkit.exec( ua ) ||\n\t\t\tropera.exec( ua ) ||\n\t\t\trmsie.exec( ua ) ||\n\t\t\tua.indexOf(\"compatible\") < 0 && rmozilla.exec( ua ) ||\n\t\t\t[];\n\n\t\treturn { browser: match[1] || \"\", version: match[2] || \"0\" };\n\t},\n\n\tsub: function() {\n\t\tfunction jQuerySub( selector, context ) {\n\t\t\treturn new jQuerySub.fn.init( selector, context );\n\t\t}\n\t\tjQuery.extend( true, jQuerySub, this );\n\t\tjQuerySub.superclass = this;\n\t\tjQuerySub.fn = jQuerySub.prototype = this();\n\t\tjQuerySub.fn.constructor = jQuerySub;\n\t\tjQuerySub.sub = this.sub;\n\t\tjQuerySub.fn.init = function init( selector, context ) {\n\t\t\tif ( context && context instanceof jQuery && !(context instanceof jQuerySub) ) {\n\t\t\t\tcontext = jQuerySub( context );\n\t\t\t}\n\n\t\t\treturn jQuery.fn.init.call( this, selector, context, rootjQuerySub );\n\t\t};\n\t\tjQuerySub.fn.init.prototype = jQuerySub.fn;\n\t\tvar rootjQuerySub = jQuerySub(document);\n\t\treturn jQuerySub;\n\t},\n\n\tbrowser: {}\n});\n\n// Populate the class2type map\njQuery.each(\"Boolean Number String Function Array Date RegExp Object\".split(\" \"), function(i, name) {\n\tclass2type[ \"[object \" + name + \"]\" ] = name.toLowerCase();\n});\n\nbrowserMatch = jQuery.uaMatch( userAgent );\nif ( browserMatch.browser ) {\n\tjQuery.browser[ browserMatch.browser ] = true;\n\tjQuery.browser.version = browserMatch.version;\n}\n\n// Deprecated, use jQuery.browser.webkit instead\nif ( jQuery.browser.webkit ) {\n\tjQuery.browser.safari = true;\n}\n\n// IE doesn't match non-breaking spaces with \\s\nif ( rnotwhite.test( \"\\xA0\" ) ) {\n\ttrimLeft = /^[\\s\\xA0]+/;\n\ttrimRight = /[\\s\\xA0]+$/;\n}\n\n// All jQuery objects should point back to these\nrootjQuery = jQuery(document);\n\n// Cleanup functions for the document ready method\nif ( document.addEventListener ) {\n\tDOMContentLoaded = function() {\n\t\tdocument.removeEventListener( \"DOMContentLoaded\", DOMContentLoaded, false );\n\t\tjQuery.ready();\n\t};\n\n} else if ( document.attachEvent ) {\n\tDOMContentLoaded = function() {\n\t\t// Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).\n\t\tif ( document.readyState === \"complete\" ) {\n\t\t\tdocument.detachEvent( \"onreadystatechange\", DOMContentLoaded );\n\t\t\tjQuery.ready();\n\t\t}\n\t};\n}\n\n// The DOM ready check for Internet Explorer\nfunction doScrollCheck() {\n\tif ( jQuery.isReady ) {\n\t\treturn;\n\t}\n\n\ttry {\n\t\t// If IE is used, use the trick by Diego Perini\n\t\t// http://javascript.nwbox.com/IEContentLoaded/\n\t\tdocument.documentElement.doScroll(\"left\");\n\t} catch(e) {\n\t\tsetTimeout( doScrollCheck, 1 );\n\t\treturn;\n\t}\n\n\t// and execute any waiting functions\n\tjQuery.ready();\n}\n\nreturn jQuery;\n\n})();\n\n\n// String to Object flags format cache\nvar flagsCache = {};\n\n// Convert String-formatted flags into Object-formatted ones and store in cache\nfunction createFlags( flags ) {\n\tvar object = flagsCache[ flags ] = {},\n\t\ti, length;\n\tflags = flags.split( /\\s+/ );\n\tfor ( i = 0, length = flags.length; i < length; i++ ) {\n\t\tobject[ flags[i] ] = true;\n\t}\n\treturn object;\n}\n\n/*\n * Create a callback list using the following parameters:\n *\n *\tflags:\tan optional list of space-separated flags that will change how\n *\t\t\tthe callback list behaves\n *\n * By default a callback list will act like an event callback list and can be\n * \"fired\" multiple times.\n *\n * Possible flags:\n *\n *\tonce:\t\t\twill ensure the callback list can only be fired once (like a Deferred)\n *\n *\tmemory:\t\t\twill keep track of previous values and will call any callback added\n *\t\t\t\t\tafter the list has been fired right away with the latest \"memorized\"\n *\t\t\t\t\tvalues (like a Deferred)\n *\n *\tunique:\t\t\twill ensure a callback can only be added once (no duplicate in the list)\n *\n *\tstopOnFalse:\tinterrupt callings when a callback returns false\n *\n */\njQuery.Callbacks = function( flags ) {\n\n\t// Convert flags from String-formatted to Object-formatted\n\t// (we check in cache first)\n\tflags = flags ? ( flagsCache[ flags ] || createFlags( flags ) ) : {};\n\n\tvar // Actual callback list\n\t\tlist = [],\n\t\t// Stack of fire calls for repeatable lists\n\t\tstack = [],\n\t\t// Last fire value (for non-forgettable lists)\n\t\tmemory,\n\t\t// Flag to know if list is currently firing\n\t\tfiring,\n\t\t// First callback to fire (used internally by add and fireWith)\n\t\tfiringStart,\n\t\t// End of the loop when firing\n\t\tfiringLength,\n\t\t// Index of currently firing callback (modified by remove if needed)\n\t\tfiringIndex,\n\t\t// Add one or several callbacks to the list\n\t\tadd = function( args ) {\n\t\t\tvar i,\n\t\t\t\tlength,\n\t\t\t\telem,\n\t\t\t\ttype,\n\t\t\t\tactual;\n\t\t\tfor ( i = 0, length = args.length; i < length; i++ ) {\n\t\t\t\telem = args[ i ];\n\t\t\t\ttype = jQuery.type( elem );\n\t\t\t\tif ( type === \"array\" ) {\n\t\t\t\t\t// Inspect recursively\n\t\t\t\t\tadd( elem );\n\t\t\t\t} else if ( type === \"function\" ) {\n\t\t\t\t\t// Add if not in unique mode and callback is not in\n\t\t\t\t\tif ( !flags.unique || !self.has( elem ) ) {\n\t\t\t\t\t\tlist.push( elem );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t// Fire callbacks\n\t\tfire = function( context, args ) {\n\t\t\targs = args || [];\n\t\t\tmemory = !flags.memory || [ context, args ];\n\t\t\tfiring = true;\n\t\t\tfiringIndex = firingStart || 0;\n\t\t\tfiringStart = 0;\n\t\t\tfiringLength = list.length;\n\t\t\tfor ( ; list && firingIndex < firingLength; firingIndex++ ) {\n\t\t\t\tif ( list[ firingIndex ].apply( context, args ) === false && flags.stopOnFalse ) {\n\t\t\t\t\tmemory = true; // Mark as halted\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tfiring = false;\n\t\t\tif ( list ) {\n\t\t\t\tif ( !flags.once ) {\n\t\t\t\t\tif ( stack && stack.length ) {\n\t\t\t\t\t\tmemory = stack.shift();\n\t\t\t\t\t\tself.fireWith( memory[ 0 ], memory[ 1 ] );\n\t\t\t\t\t}\n\t\t\t\t} else if ( memory === true ) {\n\t\t\t\t\tself.disable();\n\t\t\t\t} else {\n\t\t\t\t\tlist = [];\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t// Actual Callbacks object\n\t\tself = {\n\t\t\t// Add a callback or a collection of callbacks to the list\n\t\t\tadd: function() {\n\t\t\t\tif ( list ) {\n\t\t\t\t\tvar length = list.length;\n\t\t\t\t\tadd( arguments );\n\t\t\t\t\t// Do we need to add the callbacks to the\n\t\t\t\t\t// current firing batch?\n\t\t\t\t\tif ( firing ) {\n\t\t\t\t\t\tfiringLength = list.length;\n\t\t\t\t\t// With memory, if we're not firing then\n\t\t\t\t\t// we should call right away, unless previous\n\t\t\t\t\t// firing was halted (stopOnFalse)\n\t\t\t\t\t} else if ( memory && memory !== true ) {\n\t\t\t\t\t\tfiringStart = length;\n\t\t\t\t\t\tfire( memory[ 0 ], memory[ 1 ] );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\t\t\t// Remove a callback from the list\n\t\t\tremove: function() {\n\t\t\t\tif ( list ) {\n\t\t\t\t\tvar args = arguments,\n\t\t\t\t\t\targIndex = 0,\n\t\t\t\t\t\targLength = args.length;\n\t\t\t\t\tfor ( ; argIndex < argLength ; argIndex++ ) {\n\t\t\t\t\t\tfor ( var i = 0; i < list.length; i++ ) {\n\t\t\t\t\t\t\tif ( args[ argIndex ] === list[ i ] ) {\n\t\t\t\t\t\t\t\t// Handle firingIndex and firingLength\n\t\t\t\t\t\t\t\tif ( firing ) {\n\t\t\t\t\t\t\t\t\tif ( i <= firingLength ) {\n\t\t\t\t\t\t\t\t\t\tfiringLength--;\n\t\t\t\t\t\t\t\t\t\tif ( i <= firingIndex ) {\n\t\t\t\t\t\t\t\t\t\t\tfiringIndex--;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// Remove the element\n\t\t\t\t\t\t\t\tlist.splice( i--, 1 );\n\t\t\t\t\t\t\t\t// If we have some unicity property then\n\t\t\t\t\t\t\t\t// we only need to do this once\n\t\t\t\t\t\t\t\tif ( flags.unique ) {\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\t\t\t// Control if a given callback is in the list\n\t\t\thas: function( fn ) {\n\t\t\t\tif ( list ) {\n\t\t\t\t\tvar i = 0,\n\t\t\t\t\t\tlength = list.length;\n\t\t\t\t\tfor ( ; i < length; i++ ) {\n\t\t\t\t\t\tif ( fn === list[ i ] ) {\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t},\n\t\t\t// Remove all callbacks from the list\n\t\t\tempty: function() {\n\t\t\t\tlist = [];\n\t\t\t\treturn this;\n\t\t\t},\n\t\t\t// Have the list do nothing anymore\n\t\t\tdisable: function() {\n\t\t\t\tlist = stack = memory = undefined;\n\t\t\t\treturn this;\n\t\t\t},\n\t\t\t// Is it disabled?\n\t\t\tdisabled: function() {\n\t\t\t\treturn !list;\n\t\t\t},\n\t\t\t// Lock the list in its current state\n\t\t\tlock: function() {\n\t\t\t\tstack = undefined;\n\t\t\t\tif ( !memory || memory === true ) {\n\t\t\t\t\tself.disable();\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\t\t\t// Is it locked?\n\t\t\tlocked: function() {\n\t\t\t\treturn !stack;\n\t\t\t},\n\t\t\t// Call all callbacks with the given context and arguments\n\t\t\tfireWith: function( context, args ) {\n\t\t\t\tif ( stack ) {\n\t\t\t\t\tif ( firing ) {\n\t\t\t\t\t\tif ( !flags.once ) {\n\t\t\t\t\t\t\tstack.push( [ context, args ] );\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if ( !( flags.once && memory ) ) {\n\t\t\t\t\t\tfire( context, args );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\t\t\t// Call all the callbacks with the given arguments\n\t\t\tfire: function() {\n\t\t\t\tself.fireWith( this, arguments );\n\t\t\t\treturn this;\n\t\t\t},\n\t\t\t// To know if the callbacks have already been called at least once\n\t\t\tfired: function() {\n\t\t\t\treturn !!memory;\n\t\t\t}\n\t\t};\n\n\treturn self;\n};\n\n\n\n\nvar // Static reference to slice\n\tsliceDeferred = [].slice;\n\njQuery.extend({\n\n\tDeferred: function( func ) {\n\t\tvar doneList = jQuery.Callbacks( \"once memory\" ),\n\t\t\tfailList = jQuery.Callbacks( \"once memory\" ),\n\t\t\tprogressList = jQuery.Callbacks( \"memory\" ),\n\t\t\tstate = \"pending\",\n\t\t\tlists = {\n\t\t\t\tresolve: doneList,\n\t\t\t\treject: failList,\n\t\t\t\tnotify: progressList\n\t\t\t},\n\t\t\tpromise = {\n\t\t\t\tdone: doneList.add,\n\t\t\t\tfail: failList.add,\n\t\t\t\tprogress: progressList.add,\n\n\t\t\t\tstate: function() {\n\t\t\t\t\treturn state;\n\t\t\t\t},\n\n\t\t\t\t// Deprecated\n\t\t\t\tisResolved: doneList.fired,\n\t\t\t\tisRejected: failList.fired,\n\n\t\t\t\tthen: function( doneCallbacks, failCallbacks, progressCallbacks ) {\n\t\t\t\t\tdeferred.done( doneCallbacks ).fail( failCallbacks ).progress( progressCallbacks );\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\t\t\t\talways: function() {\n\t\t\t\t\tdeferred.done.apply( deferred, arguments ).fail.apply( deferred, arguments );\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\t\t\t\tpipe: function( fnDone, fnFail, fnProgress ) {\n\t\t\t\t\treturn jQuery.Deferred(function( newDefer ) {\n\t\t\t\t\t\tjQuery.each( {\n\t\t\t\t\t\t\tdone: [ fnDone, \"resolve\" ],\n\t\t\t\t\t\t\tfail: [ fnFail, \"reject\" ],\n\t\t\t\t\t\t\tprogress: [ fnProgress, \"notify\" ]\n\t\t\t\t\t\t}, function( handler, data ) {\n\t\t\t\t\t\t\tvar fn = data[ 0 ],\n\t\t\t\t\t\t\t\taction = data[ 1 ],\n\t\t\t\t\t\t\t\treturned;\n\t\t\t\t\t\t\tif ( jQuery.isFunction( fn ) ) {\n\t\t\t\t\t\t\t\tdeferred[ handler ](function() {\n\t\t\t\t\t\t\t\t\treturned = fn.apply( this, arguments );\n\t\t\t\t\t\t\t\t\tif ( returned && jQuery.isFunction( returned.promise ) ) {\n\t\t\t\t\t\t\t\t\t\treturned.promise().then( newDefer.resolve, newDefer.reject, newDefer.notify );\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tnewDefer[ action + \"With\" ]( this === deferred ? newDefer : this, [ returned ] );\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tdeferred[ handler ]( newDefer[ action ] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t}).promise();\n\t\t\t\t},\n\t\t\t\t// Get a promise for this deferred\n\t\t\t\t// If obj is provided, the promise aspect is added to the object\n\t\t\t\tpromise: function( obj ) {\n\t\t\t\t\tif ( obj == null ) {\n\t\t\t\t\t\tobj = promise;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfor ( var key in promise ) {\n\t\t\t\t\t\t\tobj[ key ] = promise[ key ];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn obj;\n\t\t\t\t}\n\t\t\t},\n\t\t\tdeferred = promise.promise({}),\n\t\t\tkey;\n\n\t\tfor ( key in lists ) {\n\t\t\tdeferred[ key ] = lists[ key ].fire;\n\t\t\tdeferred[ key + \"With\" ] = lists[ key ].fireWith;\n\t\t}\n\n\t\t// Handle state\n\t\tdeferred.done( function() {\n\t\t\tstate = \"resolved\";\n\t\t}, failList.disable, progressList.lock ).fail( function() {\n\t\t\tstate = \"rejected\";\n\t\t}, doneList.disable, progressList.lock );\n\n\t\t// Call given func if any\n\t\tif ( func ) {\n\t\t\tfunc.call( deferred, deferred );\n\t\t}\n\n\t\t// All done!\n\t\treturn deferred;\n\t},\n\n\t// Deferred helper\n\twhen: function( firstParam ) {\n\t\tvar args = sliceDeferred.call( arguments, 0 ),\n\t\t\ti = 0,\n\t\t\tlength = args.length,\n\t\t\tpValues = new Array( length ),\n\t\t\tcount = length,\n\t\t\tpCount = length,\n\t\t\tdeferred = length <= 1 && firstParam && jQuery.isFunction( firstParam.promise ) ?\n\t\t\t\tfirstParam :\n\t\t\t\tjQuery.Deferred(),\n\t\t\tpromise = deferred.promise();\n\t\tfunction resolveFunc( i ) {\n\t\t\treturn function( value ) {\n\t\t\t\targs[ i ] = arguments.length > 1 ? sliceDeferred.call( arguments, 0 ) : value;\n\t\t\t\tif ( !( --count ) ) {\n\t\t\t\t\tdeferred.resolveWith( deferred, args );\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t\tfunction progressFunc( i ) {\n\t\t\treturn function( value ) {\n\t\t\t\tpValues[ i ] = arguments.length > 1 ? sliceDeferred.call( arguments, 0 ) : value;\n\t\t\t\tdeferred.notifyWith( promise, pValues );\n\t\t\t};\n\t\t}\n\t\tif ( length > 1 ) {\n\t\t\tfor ( ; i < length; i++ ) {\n\t\t\t\tif ( args[ i ] && args[ i ].promise && jQuery.isFunction( args[ i ].promise ) ) {\n\t\t\t\t\targs[ i ].promise().then( resolveFunc(i), deferred.reject, progressFunc(i) );\n\t\t\t\t} else {\n\t\t\t\t\t--count;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( !count ) {\n\t\t\t\tdeferred.resolveWith( deferred, args );\n\t\t\t}\n\t\t} else if ( deferred !== firstParam ) {\n\t\t\tdeferred.resolveWith( deferred, length ? [ firstParam ] : [] );\n\t\t}\n\t\treturn promise;\n\t}\n});\n\n\n\n\njQuery.support = (function() {\n\n\tvar support,\n\t\tall,\n\t\ta,\n\t\tselect,\n\t\topt,\n\t\tinput,\n\t\tmarginDiv,\n\t\tfragment,\n\t\ttds,\n\t\tevents,\n\t\teventName,\n\t\ti,\n\t\tisSupported,\n\t\tdiv = document.createElement( \"div\" ),\n\t\tdocumentElement = document.documentElement;\n\n\t// Preliminary tests\n\tdiv.setAttribute(\"className\", \"t\");\n\tdiv.innerHTML = \"   <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>\";\n\n\tall = div.getElementsByTagName( \"*\" );\n\ta = div.getElementsByTagName( \"a\" )[ 0 ];\n\n\t// Can't get basic test support\n\tif ( !all || !all.length || !a ) {\n\t\treturn {};\n\t}\n\n\t// First batch of supports tests\n\tselect = document.createElement( \"select\" );\n\topt = select.appendChild( document.createElement(\"option\") );\n\tinput = div.getElementsByTagName( \"input\" )[ 0 ];\n\n\tsupport = {\n\t\t// IE strips leading whitespace when .innerHTML is used\n\t\tleadingWhitespace: ( div.firstChild.nodeType === 3 ),\n\n\t\t// Make sure that tbody elements aren't automatically inserted\n\t\t// IE will insert them into empty tables\n\t\ttbody: !div.getElementsByTagName(\"tbody\").length,\n\n\t\t// Make sure that link elements get serialized correctly by innerHTML\n\t\t// This requires a wrapper element in IE\n\t\thtmlSerialize: !!div.getElementsByTagName(\"link\").length,\n\n\t\t// Get the style information from getAttribute\n\t\t// (IE uses .cssText instead)\n\t\tstyle: /top/.test( a.getAttribute(\"style\") ),\n\n\t\t// Make sure that URLs aren't manipulated\n\t\t// (IE normalizes it by default)\n\t\threfNormalized: ( a.getAttribute(\"href\") === \"/a\" ),\n\n\t\t// Make sure that element opacity exists\n\t\t// (IE uses filter instead)\n\t\t// Use a regex to work around a WebKit issue. See #5145\n\t\topacity: /^0.55/.test( a.style.opacity ),\n\n\t\t// Verify style float existence\n\t\t// (IE uses styleFloat instead of cssFloat)\n\t\tcssFloat: !!a.style.cssFloat,\n\n\t\t// Make sure that if no value is specified for a checkbox\n\t\t// that it defaults to \"on\".\n\t\t// (WebKit defaults to \"\" instead)\n\t\tcheckOn: ( input.value === \"on\" ),\n\n\t\t// Make sure that a selected-by-default option has a working selected property.\n\t\t// (WebKit defaults to false instead of true, IE too, if it's in an optgroup)\n\t\toptSelected: opt.selected,\n\n\t\t// Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7)\n\t\tgetSetAttribute: div.className !== \"t\",\n\n\t\t// Tests for enctype support on a form(#6743)\n\t\tenctype: !!document.createElement(\"form\").enctype,\n\n\t\t// Makes sure cloning an html5 element does not cause problems\n\t\t// Where outerHTML is undefined, this still works\n\t\thtml5Clone: document.createElement(\"nav\").cloneNode( true ).outerHTML !== \"<:nav></:nav>\",\n\n\t\t// Will be defined later\n\t\tsubmitBubbles: true,\n\t\tchangeBubbles: true,\n\t\tfocusinBubbles: false,\n\t\tdeleteExpando: true,\n\t\tnoCloneEvent: true,\n\t\tinlineBlockNeedsLayout: false,\n\t\tshrinkWrapBlocks: false,\n\t\treliableMarginRight: true\n\t};\n\n\t// Make sure checked status is properly cloned\n\tinput.checked = true;\n\tsupport.noCloneChecked = input.cloneNode( true ).checked;\n\n\t// Make sure that the options inside disabled selects aren't marked as disabled\n\t// (WebKit marks them as disabled)\n\tselect.disabled = true;\n\tsupport.optDisabled = !opt.disabled;\n\n\t// Test to see if it's possible to delete an expando from an element\n\t// Fails in Internet Explorer\n\ttry {\n\t\tdelete div.test;\n\t} catch( e ) {\n\t\tsupport.deleteExpando = false;\n\t}\n\n\tif ( !div.addEventListener && div.attachEvent && div.fireEvent ) {\n\t\tdiv.attachEvent( \"onclick\", function() {\n\t\t\t// Cloning a node shouldn't copy over any\n\t\t\t// bound event handlers (IE does this)\n\t\t\tsupport.noCloneEvent = false;\n\t\t});\n\t\tdiv.cloneNode( true ).fireEvent( \"onclick\" );\n\t}\n\n\t// Check if a radio maintains its value\n\t// after being appended to the DOM\n\tinput = document.createElement(\"input\");\n\tinput.value = \"t\";\n\tinput.setAttribute(\"type\", \"radio\");\n\tsupport.radioValue = input.value === \"t\";\n\n\tinput.setAttribute(\"checked\", \"checked\");\n\tdiv.appendChild( input );\n\tfragment = document.createDocumentFragment();\n\tfragment.appendChild( div.lastChild );\n\n\t// WebKit doesn't clone checked state correctly in fragments\n\tsupport.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked;\n\n\t// Check if a disconnected checkbox will retain its checked\n\t// value of true after appended to the DOM (IE6/7)\n\tsupport.appendChecked = input.checked;\n\n\tfragment.removeChild( input );\n\tfragment.appendChild( div );\n\n\tdiv.innerHTML = \"\";\n\n\t// Check if div with explicit width and no margin-right incorrectly\n\t// gets computed margin-right based on width of container. For more\n\t// info see bug #3333\n\t// Fails in WebKit before Feb 2011 nightlies\n\t// WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right\n\tif ( window.getComputedStyle ) {\n\t\tmarginDiv = document.createElement( \"div\" );\n\t\tmarginDiv.style.width = \"0\";\n\t\tmarginDiv.style.marginRight = \"0\";\n\t\tdiv.style.width = \"2px\";\n\t\tdiv.appendChild( marginDiv );\n\t\tsupport.reliableMarginRight =\n\t\t\t( parseInt( ( window.getComputedStyle( marginDiv, null ) || { marginRight: 0 } ).marginRight, 10 ) || 0 ) === 0;\n\t}\n\n\t// Technique from Juriy Zaytsev\n\t// http://perfectionkills.com/detecting-event-support-without-browser-sniffing/\n\t// We only care about the case where non-standard event systems\n\t// are used, namely in IE. Short-circuiting here helps us to\n\t// avoid an eval call (in setAttribute) which can cause CSP\n\t// to go haywire. See: https://developer.mozilla.org/en/Security/CSP\n\tif ( div.attachEvent ) {\n\t\tfor( i in {\n\t\t\tsubmit: 1,\n\t\t\tchange: 1,\n\t\t\tfocusin: 1\n\t\t}) {\n\t\t\teventName = \"on\" + i;\n\t\t\tisSupported = ( eventName in div );\n\t\t\tif ( !isSupported ) {\n\t\t\t\tdiv.setAttribute( eventName, \"return;\" );\n\t\t\t\tisSupported = ( typeof div[ eventName ] === \"function\" );\n\t\t\t}\n\t\t\tsupport[ i + \"Bubbles\" ] = isSupported;\n\t\t}\n\t}\n\n\tfragment.removeChild( div );\n\n\t// Null elements to avoid leaks in IE\n\tfragment = select = opt = marginDiv = div = input = null;\n\n\t// Run tests that need a body at doc ready\n\tjQuery(function() {\n\t\tvar container, outer, inner, table, td, offsetSupport,\n\t\t\tconMarginTop, ptlm, vb, style, html,\n\t\t\tbody = document.getElementsByTagName(\"body\")[0];\n\n\t\tif ( !body ) {\n\t\t\t// Return for frameset docs that don't have a body\n\t\t\treturn;\n\t\t}\n\n\t\tconMarginTop = 1;\n\t\tptlm = \"position:absolute;top:0;left:0;width:1px;height:1px;margin:0;\";\n\t\tvb = \"visibility:hidden;border:0;\";\n\t\tstyle = \"style='\" + ptlm + \"border:5px solid #000;padding:0;'\";\n\t\thtml = \"<div \" + style + \"><div></div></div>\" +\n\t\t\t\"<table \" + style + \" cellpadding='0' cellspacing='0'>\" +\n\t\t\t\"<tr><td></td></tr></table>\";\n\n\t\tcontainer = document.createElement(\"div\");\n\t\tcontainer.style.cssText = vb + \"width:0;height:0;position:static;top:0;margin-top:\" + conMarginTop + \"px\";\n\t\tbody.insertBefore( container, body.firstChild );\n\n\t\t// Construct the test element\n\t\tdiv = document.createElement(\"div\");\n\t\tcontainer.appendChild( div );\n\n\t\t// Check if table cells still have offsetWidth/Height when they are set\n\t\t// to display:none and there are still other visible table cells in a\n\t\t// table row; if so, offsetWidth/Height are not reliable for use when\n\t\t// determining if an element has been hidden directly using\n\t\t// display:none (it is still safe to use offsets if a parent element is\n\t\t// hidden; don safety goggles and see bug #4512 for more information).\n\t\t// (only IE 8 fails this test)\n\t\tdiv.innerHTML = \"<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>\";\n\t\ttds = div.getElementsByTagName( \"td\" );\n\t\tisSupported = ( tds[ 0 ].offsetHeight === 0 );\n\n\t\ttds[ 0 ].style.display = \"\";\n\t\ttds[ 1 ].style.display = \"none\";\n\n\t\t// Check if empty table cells still have offsetWidth/Height\n\t\t// (IE <= 8 fail this test)\n\t\tsupport.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 );\n\n\t\t// Figure out if the W3C box model works as expected\n\t\tdiv.innerHTML = \"\";\n\t\tdiv.style.width = div.style.paddingLeft = \"1px\";\n\t\tjQuery.boxModel = support.boxModel = div.offsetWidth === 2;\n\n\t\tif ( typeof div.style.zoom !== \"undefined\" ) {\n\t\t\t// Check if natively block-level elements act like inline-block\n\t\t\t// elements when setting their display to 'inline' and giving\n\t\t\t// them layout\n\t\t\t// (IE < 8 does this)\n\t\t\tdiv.style.display = \"inline\";\n\t\t\tdiv.style.zoom = 1;\n\t\t\tsupport.inlineBlockNeedsLayout = ( div.offsetWidth === 2 );\n\n\t\t\t// Check if elements with layout shrink-wrap their children\n\t\t\t// (IE 6 does this)\n\t\t\tdiv.style.display = \"\";\n\t\t\tdiv.innerHTML = \"<div style='width:4px;'></div>\";\n\t\t\tsupport.shrinkWrapBlocks = ( div.offsetWidth !== 2 );\n\t\t}\n\n\t\tdiv.style.cssText = ptlm + vb;\n\t\tdiv.innerHTML = html;\n\n\t\touter = div.firstChild;\n\t\tinner = outer.firstChild;\n\t\ttd = outer.nextSibling.firstChild.firstChild;\n\n\t\toffsetSupport = {\n\t\t\tdoesNotAddBorder: ( inner.offsetTop !== 5 ),\n\t\t\tdoesAddBorderForTableAndCells: ( td.offsetTop === 5 )\n\t\t};\n\n\t\tinner.style.position = \"fixed\";\n\t\tinner.style.top = \"20px\";\n\n\t\t// safari subtracts parent border width here which is 5px\n\t\toffsetSupport.fixedPosition = ( inner.offsetTop === 20 || inner.offsetTop === 15 );\n\t\tinner.style.position = inner.style.top = \"\";\n\n\t\touter.style.overflow = \"hidden\";\n\t\touter.style.position = \"relative\";\n\n\t\toffsetSupport.subtractsBorderForOverflowNotVisible = ( inner.offsetTop === -5 );\n\t\toffsetSupport.doesNotIncludeMarginInBodyOffset = ( body.offsetTop !== conMarginTop );\n\n\t\tbody.removeChild( container );\n\t\tdiv  = container = null;\n\n\t\tjQuery.extend( support, offsetSupport );\n\t});\n\n\treturn support;\n})();\n\n\n\n\nvar rbrace = /^(?:\\{.*\\}|\\[.*\\])$/,\n\trmultiDash = /([A-Z])/g;\n\njQuery.extend({\n\tcache: {},\n\n\t// Please use with caution\n\tuuid: 0,\n\n\t// Unique for each copy of jQuery on the page\n\t// Non-digits removed to match rinlinejQuery\n\texpando: \"jQuery\" + ( jQuery.fn.jquery + Math.random() ).replace( /\\D/g, \"\" ),\n\n\t// The following elements throw uncatchable exceptions if you\n\t// attempt to add expando properties to them.\n\tnoData: {\n\t\t\"embed\": true,\n\t\t// Ban all objects except for Flash (which handle expandos)\n\t\t\"object\": \"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\",\n\t\t\"applet\": true\n\t},\n\n\thasData: function( elem ) {\n\t\telem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ];\n\t\treturn !!elem && !isEmptyDataObject( elem );\n\t},\n\n\tdata: function( elem, name, data, pvt /* Internal Use Only */ ) {\n\t\tif ( !jQuery.acceptData( elem ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar privateCache, thisCache, ret,\n\t\t\tinternalKey = jQuery.expando,\n\t\t\tgetByName = typeof name === \"string\",\n\n\t\t\t// We have to handle DOM nodes and JS objects differently because IE6-7\n\t\t\t// can't GC object references properly across the DOM-JS boundary\n\t\t\tisNode = elem.nodeType,\n\n\t\t\t// Only DOM nodes need the global jQuery cache; JS object data is\n\t\t\t// attached directly to the object so GC can occur automatically\n\t\t\tcache = isNode ? jQuery.cache : elem,\n\n\t\t\t// Only defining an ID for JS objects if its cache already exists allows\n\t\t\t// the code to shortcut on the same path as a DOM node with no cache\n\t\t\tid = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey,\n\t\t\tisEvents = name === \"events\";\n\n\t\t// Avoid doing any more work than we need to when trying to get data on an\n\t\t// object that has no data at all\n\t\tif ( (!id || !cache[id] || (!isEvents && !pvt && !cache[id].data)) && getByName && data === undefined ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( !id ) {\n\t\t\t// Only DOM nodes need a new unique ID for each element since their data\n\t\t\t// ends up in the global cache\n\t\t\tif ( isNode ) {\n\t\t\t\telem[ internalKey ] = id = ++jQuery.uuid;\n\t\t\t} else {\n\t\t\t\tid = internalKey;\n\t\t\t}\n\t\t}\n\n\t\tif ( !cache[ id ] ) {\n\t\t\tcache[ id ] = {};\n\n\t\t\t// Avoids exposing jQuery metadata on plain JS objects when the object\n\t\t\t// is serialized using JSON.stringify\n\t\t\tif ( !isNode ) {\n\t\t\t\tcache[ id ].toJSON = jQuery.noop;\n\t\t\t}\n\t\t}\n\n\t\t// An object can be passed to jQuery.data instead of a key/value pair; this gets\n\t\t// shallow copied over onto the existing cache\n\t\tif ( typeof name === \"object\" || typeof name === \"function\" ) {\n\t\t\tif ( pvt ) {\n\t\t\t\tcache[ id ] = jQuery.extend( cache[ id ], name );\n\t\t\t} else {\n\t\t\t\tcache[ id ].data = jQuery.extend( cache[ id ].data, name );\n\t\t\t}\n\t\t}\n\n\t\tprivateCache = thisCache = cache[ id ];\n\n\t\t// jQuery data() is stored in a separate object inside the object's internal data\n\t\t// cache in order to avoid key collisions between internal data and user-defined\n\t\t// data.\n\t\tif ( !pvt ) {\n\t\t\tif ( !thisCache.data ) {\n\t\t\t\tthisCache.data = {};\n\t\t\t}\n\n\t\t\tthisCache = thisCache.data;\n\t\t}\n\n\t\tif ( data !== undefined ) {\n\t\t\tthisCache[ jQuery.camelCase( name ) ] = data;\n\t\t}\n\n\t\t// Users should not attempt to inspect the internal events object using jQuery.data,\n\t\t// it is undocumented and subject to change. But does anyone listen? No.\n\t\tif ( isEvents && !thisCache[ name ] ) {\n\t\t\treturn privateCache.events;\n\t\t}\n\n\t\t// Check for both converted-to-camel and non-converted data property names\n\t\t// If a data property was specified\n\t\tif ( getByName ) {\n\n\t\t\t// First Try to find as-is property data\n\t\t\tret = thisCache[ name ];\n\n\t\t\t// Test for null|undefined property data\n\t\t\tif ( ret == null ) {\n\n\t\t\t\t// Try to find the camelCased property\n\t\t\t\tret = thisCache[ jQuery.camelCase( name ) ];\n\t\t\t}\n\t\t} else {\n\t\t\tret = thisCache;\n\t\t}\n\n\t\treturn ret;\n\t},\n\n\tremoveData: function( elem, name, pvt /* Internal Use Only */ ) {\n\t\tif ( !jQuery.acceptData( elem ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar thisCache, i, l,\n\n\t\t\t// Reference to internal data cache key\n\t\t\tinternalKey = jQuery.expando,\n\n\t\t\tisNode = elem.nodeType,\n\n\t\t\t// See jQuery.data for more information\n\t\t\tcache = isNode ? jQuery.cache : elem,\n\n\t\t\t// See jQuery.data for more information\n\t\t\tid = isNode ? elem[ internalKey ] : internalKey;\n\n\t\t// If there is already no cache entry for this object, there is no\n\t\t// purpose in continuing\n\t\tif ( !cache[ id ] ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( name ) {\n\n\t\t\tthisCache = pvt ? cache[ id ] : cache[ id ].data;\n\n\t\t\tif ( thisCache ) {\n\n\t\t\t\t// Support array or space separated string names for data keys\n\t\t\t\tif ( !jQuery.isArray( name ) ) {\n\n\t\t\t\t\t// try the string as a key before any manipulation\n\t\t\t\t\tif ( name in thisCache ) {\n\t\t\t\t\t\tname = [ name ];\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\t// split the camel cased version by spaces unless a key with the spaces exists\n\t\t\t\t\t\tname = jQuery.camelCase( name );\n\t\t\t\t\t\tif ( name in thisCache ) {\n\t\t\t\t\t\t\tname = [ name ];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tname = name.split( \" \" );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tfor ( i = 0, l = name.length; i < l; i++ ) {\n\t\t\t\t\tdelete thisCache[ name[i] ];\n\t\t\t\t}\n\n\t\t\t\t// If there is no data left in the cache, we want to continue\n\t\t\t\t// and let the cache object itself get destroyed\n\t\t\t\tif ( !( pvt ? isEmptyDataObject : jQuery.isEmptyObject )( thisCache ) ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// See jQuery.data for more information\n\t\tif ( !pvt ) {\n\t\t\tdelete cache[ id ].data;\n\n\t\t\t// Don't destroy the parent cache unless the internal data object\n\t\t\t// had been the only thing left in it\n\t\t\tif ( !isEmptyDataObject(cache[ id ]) ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\t// Browsers that fail expando deletion also refuse to delete expandos on\n\t\t// the window, but it will allow it on all other JS objects; other browsers\n\t\t// don't care\n\t\t// Ensure that `cache` is not a window object #10080\n\t\tif ( jQuery.support.deleteExpando || !cache.setInterval ) {\n\t\t\tdelete cache[ id ];\n\t\t} else {\n\t\t\tcache[ id ] = null;\n\t\t}\n\n\t\t// We destroyed the cache and need to eliminate the expando on the node to avoid\n\t\t// false lookups in the cache for entries that no longer exist\n\t\tif ( isNode ) {\n\t\t\t// IE does not allow us to delete expando properties from nodes,\n\t\t\t// nor does it have a removeAttribute function on Document nodes;\n\t\t\t// we must handle all of these cases\n\t\t\tif ( jQuery.support.deleteExpando ) {\n\t\t\t\tdelete elem[ internalKey ];\n\t\t\t} else if ( elem.removeAttribute ) {\n\t\t\t\telem.removeAttribute( internalKey );\n\t\t\t} else {\n\t\t\t\telem[ internalKey ] = null;\n\t\t\t}\n\t\t}\n\t},\n\n\t// For internal use only.\n\t_data: function( elem, name, data ) {\n\t\treturn jQuery.data( elem, name, data, true );\n\t},\n\n\t// A method for determining if a DOM node can handle the data expando\n\tacceptData: function( elem ) {\n\t\tif ( elem.nodeName ) {\n\t\t\tvar match = jQuery.noData[ elem.nodeName.toLowerCase() ];\n\n\t\t\tif ( match ) {\n\t\t\t\treturn !(match === true || elem.getAttribute(\"classid\") !== match);\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}\n});\n\njQuery.fn.extend({\n\tdata: function( key, value ) {\n\t\tvar parts, attr, name,\n\t\t\tdata = null;\n\n\t\tif ( typeof key === \"undefined\" ) {\n\t\t\tif ( this.length ) {\n\t\t\t\tdata = jQuery.data( this[0] );\n\n\t\t\t\tif ( this[0].nodeType === 1 && !jQuery._data( this[0], \"parsedAttrs\" ) ) {\n\t\t\t\t\tattr = this[0].attributes;\n\t\t\t\t\tfor ( var i = 0, l = attr.length; i < l; i++ ) {\n\t\t\t\t\t\tname = attr[i].name;\n\n\t\t\t\t\t\tif ( name.indexOf( \"data-\" ) === 0 ) {\n\t\t\t\t\t\t\tname = jQuery.camelCase( name.substring(5) );\n\n\t\t\t\t\t\t\tdataAttr( this[0], name, data[ name ] );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tjQuery._data( this[0], \"parsedAttrs\", true );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn data;\n\n\t\t} else if ( typeof key === \"object\" ) {\n\t\t\treturn this.each(function() {\n\t\t\t\tjQuery.data( this, key );\n\t\t\t});\n\t\t}\n\n\t\tparts = key.split(\".\");\n\t\tparts[1] = parts[1] ? \".\" + parts[1] : \"\";\n\n\t\tif ( value === undefined ) {\n\t\t\tdata = this.triggerHandler(\"getData\" + parts[1] + \"!\", [parts[0]]);\n\n\t\t\t// Try to fetch any internally stored data first\n\t\t\tif ( data === undefined && this.length ) {\n\t\t\t\tdata = jQuery.data( this[0], key );\n\t\t\t\tdata = dataAttr( this[0], key, data );\n\t\t\t}\n\n\t\t\treturn data === undefined && parts[1] ?\n\t\t\t\tthis.data( parts[0] ) :\n\t\t\t\tdata;\n\n\t\t} else {\n\t\t\treturn this.each(function() {\n\t\t\t\tvar self = jQuery( this ),\n\t\t\t\t\targs = [ parts[0], value ];\n\n\t\t\t\tself.triggerHandler( \"setData\" + parts[1] + \"!\", args );\n\t\t\t\tjQuery.data( this, key, value );\n\t\t\t\tself.triggerHandler( \"changeData\" + parts[1] + \"!\", args );\n\t\t\t});\n\t\t}\n\t},\n\n\tremoveData: function( key ) {\n\t\treturn this.each(function() {\n\t\t\tjQuery.removeData( this, key );\n\t\t});\n\t}\n});\n\nfunction dataAttr( elem, key, data ) {\n\t// If nothing was found internally, try to fetch any\n\t// data from the HTML5 data-* attribute\n\tif ( data === undefined && elem.nodeType === 1 ) {\n\n\t\tvar name = \"data-\" + key.replace( rmultiDash, \"-$1\" ).toLowerCase();\n\n\t\tdata = elem.getAttribute( name );\n\n\t\tif ( typeof data === \"string\" ) {\n\t\t\ttry {\n\t\t\t\tdata = data === \"true\" ? true :\n\t\t\t\tdata === \"false\" ? false :\n\t\t\t\tdata === \"null\" ? null :\n\t\t\t\tjQuery.isNumeric( data ) ? parseFloat( data ) :\n\t\t\t\t\trbrace.test( data ) ? jQuery.parseJSON( data ) :\n\t\t\t\t\tdata;\n\t\t\t} catch( e ) {}\n\n\t\t\t// Make sure we set the data so it isn't changed later\n\t\t\tjQuery.data( elem, key, data );\n\n\t\t} else {\n\t\t\tdata = undefined;\n\t\t}\n\t}\n\n\treturn data;\n}\n\n// checks a cache object for emptiness\nfunction isEmptyDataObject( obj ) {\n\tfor ( var name in obj ) {\n\n\t\t// if the public data object is empty, the private is still empty\n\t\tif ( name === \"data\" && jQuery.isEmptyObject( obj[name] ) ) {\n\t\t\tcontinue;\n\t\t}\n\t\tif ( name !== \"toJSON\" ) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\treturn true;\n}\n\n\n\n\nfunction handleQueueMarkDefer( elem, type, src ) {\n\tvar deferDataKey = type + \"defer\",\n\t\tqueueDataKey = type + \"queue\",\n\t\tmarkDataKey = type + \"mark\",\n\t\tdefer = jQuery._data( elem, deferDataKey );\n\tif ( defer &&\n\t\t( src === \"queue\" || !jQuery._data(elem, queueDataKey) ) &&\n\t\t( src === \"mark\" || !jQuery._data(elem, markDataKey) ) ) {\n\t\t// Give room for hard-coded callbacks to fire first\n\t\t// and eventually mark/queue something else on the element\n\t\tsetTimeout( function() {\n\t\t\tif ( !jQuery._data( elem, queueDataKey ) &&\n\t\t\t\t!jQuery._data( elem, markDataKey ) ) {\n\t\t\t\tjQuery.removeData( elem, deferDataKey, true );\n\t\t\t\tdefer.fire();\n\t\t\t}\n\t\t}, 0 );\n\t}\n}\n\njQuery.extend({\n\n\t_mark: function( elem, type ) {\n\t\tif ( elem ) {\n\t\t\ttype = ( type || \"fx\" ) + \"mark\";\n\t\t\tjQuery._data( elem, type, (jQuery._data( elem, type ) || 0) + 1 );\n\t\t}\n\t},\n\n\t_unmark: function( force, elem, type ) {\n\t\tif ( force !== true ) {\n\t\t\ttype = elem;\n\t\t\telem = force;\n\t\t\tforce = false;\n\t\t}\n\t\tif ( elem ) {\n\t\t\ttype = type || \"fx\";\n\t\t\tvar key = type + \"mark\",\n\t\t\t\tcount = force ? 0 : ( (jQuery._data( elem, key ) || 1) - 1 );\n\t\t\tif ( count ) {\n\t\t\t\tjQuery._data( elem, key, count );\n\t\t\t} else {\n\t\t\t\tjQuery.removeData( elem, key, true );\n\t\t\t\thandleQueueMarkDefer( elem, type, \"mark\" );\n\t\t\t}\n\t\t}\n\t},\n\n\tqueue: function( elem, type, data ) {\n\t\tvar q;\n\t\tif ( elem ) {\n\t\t\ttype = ( type || \"fx\" ) + \"queue\";\n\t\t\tq = jQuery._data( elem, type );\n\n\t\t\t// Speed up dequeue by getting out quickly if this is just a lookup\n\t\t\tif ( data ) {\n\t\t\t\tif ( !q || jQuery.isArray(data) ) {\n\t\t\t\t\tq = jQuery._data( elem, type, jQuery.makeArray(data) );\n\t\t\t\t} else {\n\t\t\t\t\tq.push( data );\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn q || [];\n\t\t}\n\t},\n\n\tdequeue: function( elem, type ) {\n\t\ttype = type || \"fx\";\n\n\t\tvar queue = jQuery.queue( elem, type ),\n\t\t\tfn = queue.shift(),\n\t\t\thooks = {};\n\n\t\t// If the fx queue is dequeued, always remove the progress sentinel\n\t\tif ( fn === \"inprogress\" ) {\n\t\t\tfn = queue.shift();\n\t\t}\n\n\t\tif ( fn ) {\n\t\t\t// Add a progress sentinel to prevent the fx queue from being\n\t\t\t// automatically dequeued\n\t\t\tif ( type === \"fx\" ) {\n\t\t\t\tqueue.unshift( \"inprogress\" );\n\t\t\t}\n\n\t\t\tjQuery._data( elem, type + \".run\", hooks );\n\t\t\tfn.call( elem, function() {\n\t\t\t\tjQuery.dequeue( elem, type );\n\t\t\t}, hooks );\n\t\t}\n\n\t\tif ( !queue.length ) {\n\t\t\tjQuery.removeData( elem, type + \"queue \" + type + \".run\", true );\n\t\t\thandleQueueMarkDefer( elem, type, \"queue\" );\n\t\t}\n\t}\n});\n\njQuery.fn.extend({\n\tqueue: function( type, data ) {\n\t\tif ( typeof type !== \"string\" ) {\n\t\t\tdata = type;\n\t\t\ttype = \"fx\";\n\t\t}\n\n\t\tif ( data === undefined ) {\n\t\t\treturn jQuery.queue( this[0], type );\n\t\t}\n\t\treturn this.each(function() {\n\t\t\tvar queue = jQuery.queue( this, type, data );\n\n\t\t\tif ( type === \"fx\" && queue[0] !== \"inprogress\" ) {\n\t\t\t\tjQuery.dequeue( this, type );\n\t\t\t}\n\t\t});\n\t},\n\tdequeue: function( type ) {\n\t\treturn this.each(function() {\n\t\t\tjQuery.dequeue( this, type );\n\t\t});\n\t},\n\t// Based off of the plugin by Clint Helfers, with permission.\n\t// http://blindsignals.com/index.php/2009/07/jquery-delay/\n\tdelay: function( time, type ) {\n\t\ttime = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;\n\t\ttype = type || \"fx\";\n\n\t\treturn this.queue( type, function( next, hooks ) {\n\t\t\tvar timeout = setTimeout( next, time );\n\t\t\thooks.stop = function() {\n\t\t\t\tclearTimeout( timeout );\n\t\t\t};\n\t\t});\n\t},\n\tclearQueue: function( type ) {\n\t\treturn this.queue( type || \"fx\", [] );\n\t},\n\t// Get a promise resolved when queues of a certain type\n\t// are emptied (fx is the type by default)\n\tpromise: function( type, object ) {\n\t\tif ( typeof type !== \"string\" ) {\n\t\t\tobject = type;\n\t\t\ttype = undefined;\n\t\t}\n\t\ttype = type || \"fx\";\n\t\tvar defer = jQuery.Deferred(),\n\t\t\telements = this,\n\t\t\ti = elements.length,\n\t\t\tcount = 1,\n\t\t\tdeferDataKey = type + \"defer\",\n\t\t\tqueueDataKey = type + \"queue\",\n\t\t\tmarkDataKey = type + \"mark\",\n\t\t\ttmp;\n\t\tfunction resolve() {\n\t\t\tif ( !( --count ) ) {\n\t\t\t\tdefer.resolveWith( elements, [ elements ] );\n\t\t\t}\n\t\t}\n\t\twhile( i-- ) {\n\t\t\tif (( tmp = jQuery.data( elements[ i ], deferDataKey, undefined, true ) ||\n\t\t\t\t\t( jQuery.data( elements[ i ], queueDataKey, undefined, true ) ||\n\t\t\t\t\t\tjQuery.data( elements[ i ], markDataKey, undefined, true ) ) &&\n\t\t\t\t\tjQuery.data( elements[ i ], deferDataKey, jQuery.Callbacks( \"once memory\" ), true ) )) {\n\t\t\t\tcount++;\n\t\t\t\ttmp.add( resolve );\n\t\t\t}\n\t\t}\n\t\tresolve();\n\t\treturn defer.promise();\n\t}\n});\n\n\n\n\nvar rclass = /[\\n\\t\\r]/g,\n\trspace = /\\s+/,\n\trreturn = /\\r/g,\n\trtype = /^(?:button|input)$/i,\n\trfocusable = /^(?:button|input|object|select|textarea)$/i,\n\trclickable = /^a(?:rea)?$/i,\n\trboolean = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,\n\tgetSetAttribute = jQuery.support.getSetAttribute,\n\tnodeHook, boolHook, fixSpecified;\n\njQuery.fn.extend({\n\tattr: function( name, value ) {\n\t\treturn jQuery.access( this, name, value, true, jQuery.attr );\n\t},\n\n\tremoveAttr: function( name ) {\n\t\treturn this.each(function() {\n\t\t\tjQuery.removeAttr( this, name );\n\t\t});\n\t},\n\n\tprop: function( name, value ) {\n\t\treturn jQuery.access( this, name, value, true, jQuery.prop );\n\t},\n\n\tremoveProp: function( name ) {\n\t\tname = jQuery.propFix[ name ] || name;\n\t\treturn this.each(function() {\n\t\t\t// try/catch handles cases where IE balks (such as removing a property on window)\n\t\t\ttry {\n\t\t\t\tthis[ name ] = undefined;\n\t\t\t\tdelete this[ name ];\n\t\t\t} catch( e ) {}\n\t\t});\n\t},\n\n\taddClass: function( value ) {\n\t\tvar classNames, i, l, elem,\n\t\t\tsetClass, c, cl;\n\n\t\tif ( jQuery.isFunction( value ) ) {\n\t\t\treturn this.each(function( j ) {\n\t\t\t\tjQuery( this ).addClass( value.call(this, j, this.className) );\n\t\t\t});\n\t\t}\n\n\t\tif ( value && typeof value === \"string\" ) {\n\t\t\tclassNames = value.split( rspace );\n\n\t\t\tfor ( i = 0, l = this.length; i < l; i++ ) {\n\t\t\t\telem = this[ i ];\n\n\t\t\t\tif ( elem.nodeType === 1 ) {\n\t\t\t\t\tif ( !elem.className && classNames.length === 1 ) {\n\t\t\t\t\t\telem.className = value;\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\tsetClass = \" \" + elem.className + \" \";\n\n\t\t\t\t\t\tfor ( c = 0, cl = classNames.length; c < cl; c++ ) {\n\t\t\t\t\t\t\tif ( !~setClass.indexOf( \" \" + classNames[ c ] + \" \" ) ) {\n\t\t\t\t\t\t\t\tsetClass += classNames[ c ] + \" \";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telem.className = jQuery.trim( setClass );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t},\n\n\tremoveClass: function( value ) {\n\t\tvar classNames, i, l, elem, className, c, cl;\n\n\t\tif ( jQuery.isFunction( value ) ) {\n\t\t\treturn this.each(function( j ) {\n\t\t\t\tjQuery( this ).removeClass( value.call(this, j, this.className) );\n\t\t\t});\n\t\t}\n\n\t\tif ( (value && typeof value === \"string\") || value === undefined ) {\n\t\t\tclassNames = ( value || \"\" ).split( rspace );\n\n\t\t\tfor ( i = 0, l = this.length; i < l; i++ ) {\n\t\t\t\telem = this[ i ];\n\n\t\t\t\tif ( elem.nodeType === 1 && elem.className ) {\n\t\t\t\t\tif ( value ) {\n\t\t\t\t\t\tclassName = (\" \" + elem.className + \" \").replace( rclass, \" \" );\n\t\t\t\t\t\tfor ( c = 0, cl = classNames.length; c < cl; c++ ) {\n\t\t\t\t\t\t\tclassName = className.replace(\" \" + classNames[ c ] + \" \", \" \");\n\t\t\t\t\t\t}\n\t\t\t\t\t\telem.className = jQuery.trim( className );\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\telem.className = \"\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t},\n\n\ttoggleClass: function( value, stateVal ) {\n\t\tvar type = typeof value,\n\t\t\tisBool = typeof stateVal === \"boolean\";\n\n\t\tif ( jQuery.isFunction( value ) ) {\n\t\t\treturn this.each(function( i ) {\n\t\t\t\tjQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal );\n\t\t\t});\n\t\t}\n\n\t\treturn this.each(function() {\n\t\t\tif ( type === \"string\" ) {\n\t\t\t\t// toggle individual class names\n\t\t\t\tvar className,\n\t\t\t\t\ti = 0,\n\t\t\t\t\tself = jQuery( this ),\n\t\t\t\t\tstate = stateVal,\n\t\t\t\t\tclassNames = value.split( rspace );\n\n\t\t\t\twhile ( (className = classNames[ i++ ]) ) {\n\t\t\t\t\t// check each className given, space seperated list\n\t\t\t\t\tstate = isBool ? state : !self.hasClass( className );\n\t\t\t\t\tself[ state ? \"addClass\" : \"removeClass\" ]( className );\n\t\t\t\t}\n\n\t\t\t} else if ( type === \"undefined\" || type === \"boolean\" ) {\n\t\t\t\tif ( this.className ) {\n\t\t\t\t\t// store className if set\n\t\t\t\t\tjQuery._data( this, \"__className__\", this.className );\n\t\t\t\t}\n\n\t\t\t\t// toggle whole className\n\t\t\t\tthis.className = this.className || value === false ? \"\" : jQuery._data( this, \"__className__\" ) || \"\";\n\t\t\t}\n\t\t});\n\t},\n\n\thasClass: function( selector ) {\n\t\tvar className = \" \" + selector + \" \",\n\t\t\ti = 0,\n\t\t\tl = this.length;\n\t\tfor ( ; i < l; i++ ) {\n\t\t\tif ( this[i].nodeType === 1 && (\" \" + this[i].className + \" \").replace(rclass, \" \").indexOf( className ) > -1 ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t},\n\n\tval: function( value ) {\n\t\tvar hooks, ret, isFunction,\n\t\t\telem = this[0];\n\n\t\tif ( !arguments.length ) {\n\t\t\tif ( elem ) {\n\t\t\t\thooks = jQuery.valHooks[ elem.nodeName.toLowerCase() ] || jQuery.valHooks[ elem.type ];\n\n\t\t\t\tif ( hooks && \"get\" in hooks && (ret = hooks.get( elem, \"value\" )) !== undefined ) {\n\t\t\t\t\treturn ret;\n\t\t\t\t}\n\n\t\t\t\tret = elem.value;\n\n\t\t\t\treturn typeof ret === \"string\" ?\n\t\t\t\t\t// handle most common string cases\n\t\t\t\t\tret.replace(rreturn, \"\") :\n\t\t\t\t\t// handle cases where value is null/undef or number\n\t\t\t\t\tret == null ? \"\" : ret;\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\n\t\tisFunction = jQuery.isFunction( value );\n\n\t\treturn this.each(function( i ) {\n\t\t\tvar self = jQuery(this), val;\n\n\t\t\tif ( this.nodeType !== 1 ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( isFunction ) {\n\t\t\t\tval = value.call( this, i, self.val() );\n\t\t\t} else {\n\t\t\t\tval = value;\n\t\t\t}\n\n\t\t\t// Treat null/undefined as \"\"; convert numbers to string\n\t\t\tif ( val == null ) {\n\t\t\t\tval = \"\";\n\t\t\t} else if ( typeof val === \"number\" ) {\n\t\t\t\tval += \"\";\n\t\t\t} else if ( jQuery.isArray( val ) ) {\n\t\t\t\tval = jQuery.map(val, function ( value ) {\n\t\t\t\t\treturn value == null ? \"\" : value + \"\";\n\t\t\t\t});\n\t\t\t}\n\n\t\t\thooks = jQuery.valHooks[ this.nodeName.toLowerCase() ] || jQuery.valHooks[ this.type ];\n\n\t\t\t// If set returns undefined, fall back to normal setting\n\t\t\tif ( !hooks || !(\"set\" in hooks) || hooks.set( this, val, \"value\" ) === undefined ) {\n\t\t\t\tthis.value = val;\n\t\t\t}\n\t\t});\n\t}\n});\n\njQuery.extend({\n\tvalHooks: {\n\t\toption: {\n\t\t\tget: function( elem ) {\n\t\t\t\t// attributes.value is undefined in Blackberry 4.7 but\n\t\t\t\t// uses .value. See #6932\n\t\t\t\tvar val = elem.attributes.value;\n\t\t\t\treturn !val || val.specified ? elem.value : elem.text;\n\t\t\t}\n\t\t},\n\t\tselect: {\n\t\t\tget: function( elem ) {\n\t\t\t\tvar value, i, max, option,\n\t\t\t\t\tindex = elem.selectedIndex,\n\t\t\t\t\tvalues = [],\n\t\t\t\t\toptions = elem.options,\n\t\t\t\t\tone = elem.type === \"select-one\";\n\n\t\t\t\t// Nothing was selected\n\t\t\t\tif ( index < 0 ) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t\t// Loop through all the selected options\n\t\t\t\ti = one ? index : 0;\n\t\t\t\tmax = one ? index + 1 : options.length;\n\t\t\t\tfor ( ; i < max; i++ ) {\n\t\t\t\t\toption = options[ i ];\n\n\t\t\t\t\t// Don't return options that are disabled or in a disabled optgroup\n\t\t\t\t\tif ( option.selected && (jQuery.support.optDisabled ? !option.disabled : option.getAttribute(\"disabled\") === null) &&\n\t\t\t\t\t\t\t(!option.parentNode.disabled || !jQuery.nodeName( option.parentNode, \"optgroup\" )) ) {\n\n\t\t\t\t\t\t// Get the specific value for the option\n\t\t\t\t\t\tvalue = jQuery( option ).val();\n\n\t\t\t\t\t\t// We don't need an array for one selects\n\t\t\t\t\t\tif ( one ) {\n\t\t\t\t\t\t\treturn value;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Multi-Selects return an array\n\t\t\t\t\t\tvalues.push( value );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Fixes Bug #2551 -- select.val() broken in IE after form.reset()\n\t\t\t\tif ( one && !values.length && options.length ) {\n\t\t\t\t\treturn jQuery( options[ index ] ).val();\n\t\t\t\t}\n\n\t\t\t\treturn values;\n\t\t\t},\n\n\t\t\tset: function( elem, value ) {\n\t\t\t\tvar values = jQuery.makeArray( value );\n\n\t\t\t\tjQuery(elem).find(\"option\").each(function() {\n\t\t\t\t\tthis.selected = jQuery.inArray( jQuery(this).val(), values ) >= 0;\n\t\t\t\t});\n\n\t\t\t\tif ( !values.length ) {\n\t\t\t\t\telem.selectedIndex = -1;\n\t\t\t\t}\n\t\t\t\treturn values;\n\t\t\t}\n\t\t}\n\t},\n\n\tattrFn: {\n\t\tval: true,\n\t\tcss: true,\n\t\thtml: true,\n\t\ttext: true,\n\t\tdata: true,\n\t\twidth: true,\n\t\theight: true,\n\t\toffset: true\n\t},\n\n\tattr: function( elem, name, value, pass ) {\n\t\tvar ret, hooks, notxml,\n\t\t\tnType = elem.nodeType;\n\n\t\t// don't get/set attributes on text, comment and attribute nodes\n\t\tif ( !elem || nType === 3 || nType === 8 || nType === 2 ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( pass && name in jQuery.attrFn ) {\n\t\t\treturn jQuery( elem )[ name ]( value );\n\t\t}\n\n\t\t// Fallback to prop when attributes are not supported\n\t\tif ( typeof elem.getAttribute === \"undefined\" ) {\n\t\t\treturn jQuery.prop( elem, name, value );\n\t\t}\n\n\t\tnotxml = nType !== 1 || !jQuery.isXMLDoc( elem );\n\n\t\t// All attributes are lowercase\n\t\t// Grab necessary hook if one is defined\n\t\tif ( notxml ) {\n\t\t\tname = name.toLowerCase();\n\t\t\thooks = jQuery.attrHooks[ name ] || ( rboolean.test( name ) ? boolHook : nodeHook );\n\t\t}\n\n\t\tif ( value !== undefined ) {\n\n\t\t\tif ( value === null ) {\n\t\t\t\tjQuery.removeAttr( elem, name );\n\t\t\t\treturn;\n\n\t\t\t} else if ( hooks && \"set\" in hooks && notxml && (ret = hooks.set( elem, value, name )) !== undefined ) {\n\t\t\t\treturn ret;\n\n\t\t\t} else {\n\t\t\t\telem.setAttribute( name, \"\" + value );\n\t\t\t\treturn value;\n\t\t\t}\n\n\t\t} else if ( hooks && \"get\" in hooks && notxml && (ret = hooks.get( elem, name )) !== null ) {\n\t\t\treturn ret;\n\n\t\t} else {\n\n\t\t\tret = elem.getAttribute( name );\n\n\t\t\t// Non-existent attributes return null, we normalize to undefined\n\t\t\treturn ret === null ?\n\t\t\t\tundefined :\n\t\t\t\tret;\n\t\t}\n\t},\n\n\tremoveAttr: function( elem, value ) {\n\t\tvar propName, attrNames, name, l,\n\t\t\ti = 0;\n\n\t\tif ( value && elem.nodeType === 1 ) {\n\t\t\tattrNames = value.toLowerCase().split( rspace );\n\t\t\tl = attrNames.length;\n\n\t\t\tfor ( ; i < l; i++ ) {\n\t\t\t\tname = attrNames[ i ];\n\n\t\t\t\tif ( name ) {\n\t\t\t\t\tpropName = jQuery.propFix[ name ] || name;\n\n\t\t\t\t\t// See #9699 for explanation of this approach (setting first, then removal)\n\t\t\t\t\tjQuery.attr( elem, name, \"\" );\n\t\t\t\t\telem.removeAttribute( getSetAttribute ? name : propName );\n\n\t\t\t\t\t// Set corresponding property to false for boolean attributes\n\t\t\t\t\tif ( rboolean.test( name ) && propName in elem ) {\n\t\t\t\t\t\telem[ propName ] = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\n\tattrHooks: {\n\t\ttype: {\n\t\t\tset: function( elem, value ) {\n\t\t\t\t// We can't allow the type property to be changed (since it causes problems in IE)\n\t\t\t\tif ( rtype.test( elem.nodeName ) && elem.parentNode ) {\n\t\t\t\t\tjQuery.error( \"type property can't be changed\" );\n\t\t\t\t} else if ( !jQuery.support.radioValue && value === \"radio\" && jQuery.nodeName(elem, \"input\") ) {\n\t\t\t\t\t// Setting the type on a radio button after the value resets the value in IE6-9\n\t\t\t\t\t// Reset value to it's default in case type is set after value\n\t\t\t\t\t// This is for element creation\n\t\t\t\t\tvar val = elem.value;\n\t\t\t\t\telem.setAttribute( \"type\", value );\n\t\t\t\t\tif ( val ) {\n\t\t\t\t\t\telem.value = val;\n\t\t\t\t\t}\n\t\t\t\t\treturn value;\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t// Use the value property for back compat\n\t\t// Use the nodeHook for button elements in IE6/7 (#1954)\n\t\tvalue: {\n\t\t\tget: function( elem, name ) {\n\t\t\t\tif ( nodeHook && jQuery.nodeName( elem, \"button\" ) ) {\n\t\t\t\t\treturn nodeHook.get( elem, name );\n\t\t\t\t}\n\t\t\t\treturn name in elem ?\n\t\t\t\t\telem.value :\n\t\t\t\t\tnull;\n\t\t\t},\n\t\t\tset: function( elem, value, name ) {\n\t\t\t\tif ( nodeHook && jQuery.nodeName( elem, \"button\" ) ) {\n\t\t\t\t\treturn nodeHook.set( elem, value, name );\n\t\t\t\t}\n\t\t\t\t// Does not return so that setAttribute is also used\n\t\t\t\telem.value = value;\n\t\t\t}\n\t\t}\n\t},\n\n\tpropFix: {\n\t\ttabindex: \"tabIndex\",\n\t\treadonly: \"readOnly\",\n\t\t\"for\": \"htmlFor\",\n\t\t\"class\": \"className\",\n\t\tmaxlength: \"maxLength\",\n\t\tcellspacing: \"cellSpacing\",\n\t\tcellpadding: \"cellPadding\",\n\t\trowspan: \"rowSpan\",\n\t\tcolspan: \"colSpan\",\n\t\tusemap: \"useMap\",\n\t\tframeborder: \"frameBorder\",\n\t\tcontenteditable: \"contentEditable\"\n\t},\n\n\tprop: function( elem, name, value ) {\n\t\tvar ret, hooks, notxml,\n\t\t\tnType = elem.nodeType;\n\n\t\t// don't get/set properties on text, comment and attribute nodes\n\t\tif ( !elem || nType === 3 || nType === 8 || nType === 2 ) {\n\t\t\treturn;\n\t\t}\n\n\t\tnotxml = nType !== 1 || !jQuery.isXMLDoc( elem );\n\n\t\tif ( notxml ) {\n\t\t\t// Fix name and attach hooks\n\t\t\tname = jQuery.propFix[ name ] || name;\n\t\t\thooks = jQuery.propHooks[ name ];\n\t\t}\n\n\t\tif ( value !== undefined ) {\n\t\t\tif ( hooks && \"set\" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) {\n\t\t\t\treturn ret;\n\n\t\t\t} else {\n\t\t\t\treturn ( elem[ name ] = value );\n\t\t\t}\n\n\t\t} else {\n\t\t\tif ( hooks && \"get\" in hooks && (ret = hooks.get( elem, name )) !== null ) {\n\t\t\t\treturn ret;\n\n\t\t\t} else {\n\t\t\t\treturn elem[ name ];\n\t\t\t}\n\t\t}\n\t},\n\n\tpropHooks: {\n\t\ttabIndex: {\n\t\t\tget: function( elem ) {\n\t\t\t\t// elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set\n\t\t\t\t// http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/\n\t\t\t\tvar attributeNode = elem.getAttributeNode(\"tabindex\");\n\n\t\t\t\treturn attributeNode && attributeNode.specified ?\n\t\t\t\t\tparseInt( attributeNode.value, 10 ) :\n\t\t\t\t\trfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ?\n\t\t\t\t\t\t0 :\n\t\t\t\t\t\tundefined;\n\t\t\t}\n\t\t}\n\t}\n});\n\n// Add the tabIndex propHook to attrHooks for back-compat (different case is intentional)\njQuery.attrHooks.tabindex = jQuery.propHooks.tabIndex;\n\n// Hook for boolean attributes\nboolHook = {\n\tget: function( elem, name ) {\n\t\t// Align boolean attributes with corresponding properties\n\t\t// Fall back to attribute presence where some booleans are not supported\n\t\tvar attrNode,\n\t\t\tproperty = jQuery.prop( elem, name );\n\t\treturn property === true || typeof property !== \"boolean\" && ( attrNode = elem.getAttributeNode(name) ) && attrNode.nodeValue !== false ?\n\t\t\tname.toLowerCase() :\n\t\t\tundefined;\n\t},\n\tset: function( elem, value, name ) {\n\t\tvar propName;\n\t\tif ( value === false ) {\n\t\t\t// Remove boolean attributes when set to false\n\t\t\tjQuery.removeAttr( elem, name );\n\t\t} else {\n\t\t\t// value is true since we know at this point it's type boolean and not false\n\t\t\t// Set boolean attributes to the same name and set the DOM property\n\t\t\tpropName = jQuery.propFix[ name ] || name;\n\t\t\tif ( propName in elem ) {\n\t\t\t\t// Only set the IDL specifically if it already exists on the element\n\t\t\t\telem[ propName ] = true;\n\t\t\t}\n\n\t\t\telem.setAttribute( name, name.toLowerCase() );\n\t\t}\n\t\treturn name;\n\t}\n};\n\n// IE6/7 do not support getting/setting some attributes with get/setAttribute\nif ( !getSetAttribute ) {\n\n\tfixSpecified = {\n\t\tname: true,\n\t\tid: true\n\t};\n\n\t// Use this for any attribute in IE6/7\n\t// This fixes almost every IE6/7 issue\n\tnodeHook = jQuery.valHooks.button = {\n\t\tget: function( elem, name ) {\n\t\t\tvar ret;\n\t\t\tret = elem.getAttributeNode( name );\n\t\t\treturn ret && ( fixSpecified[ name ] ? ret.nodeValue !== \"\" : ret.specified ) ?\n\t\t\t\tret.nodeValue :\n\t\t\t\tundefined;\n\t\t},\n\t\tset: function( elem, value, name ) {\n\t\t\t// Set the existing or create a new attribute node\n\t\t\tvar ret = elem.getAttributeNode( name );\n\t\t\tif ( !ret ) {\n\t\t\t\tret = document.createAttribute( name );\n\t\t\t\telem.setAttributeNode( ret );\n\t\t\t}\n\t\t\treturn ( ret.nodeValue = value + \"\" );\n\t\t}\n\t};\n\n\t// Apply the nodeHook to tabindex\n\tjQuery.attrHooks.tabindex.set = nodeHook.set;\n\n\t// Set width and height to auto instead of 0 on empty string( Bug #8150 )\n\t// This is for removals\n\tjQuery.each([ \"width\", \"height\" ], function( i, name ) {\n\t\tjQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], {\n\t\t\tset: function( elem, value ) {\n\t\t\t\tif ( value === \"\" ) {\n\t\t\t\t\telem.setAttribute( name, \"auto\" );\n\t\t\t\t\treturn value;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t});\n\n\t// Set contenteditable to false on removals(#10429)\n\t// Setting to empty string throws an error as an invalid value\n\tjQuery.attrHooks.contenteditable = {\n\t\tget: nodeHook.get,\n\t\tset: function( elem, value, name ) {\n\t\t\tif ( value === \"\" ) {\n\t\t\t\tvalue = \"false\";\n\t\t\t}\n\t\t\tnodeHook.set( elem, value, name );\n\t\t}\n\t};\n}\n\n\n// Some attributes require a special call on IE\nif ( !jQuery.support.hrefNormalized ) {\n\tjQuery.each([ \"href\", \"src\", \"width\", \"height\" ], function( i, name ) {\n\t\tjQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], {\n\t\t\tget: function( elem ) {\n\t\t\t\tvar ret = elem.getAttribute( name, 2 );\n\t\t\t\treturn ret === null ? undefined : ret;\n\t\t\t}\n\t\t});\n\t});\n}\n\nif ( !jQuery.support.style ) {\n\tjQuery.attrHooks.style = {\n\t\tget: function( elem ) {\n\t\t\t// Return undefined in the case of empty string\n\t\t\t// Normalize to lowercase since IE uppercases css property names\n\t\t\treturn elem.style.cssText.toLowerCase() || undefined;\n\t\t},\n\t\tset: function( elem, value ) {\n\t\t\treturn ( elem.style.cssText = \"\" + value );\n\t\t}\n\t};\n}\n\n// Safari mis-reports the default selected property of an option\n// Accessing the parent's selectedIndex property fixes it\nif ( !jQuery.support.optSelected ) {\n\tjQuery.propHooks.selected = jQuery.extend( jQuery.propHooks.selected, {\n\t\tget: function( elem ) {\n\t\t\tvar parent = elem.parentNode;\n\n\t\t\tif ( parent ) {\n\t\t\t\tparent.selectedIndex;\n\n\t\t\t\t// Make sure that it also works with optgroups, see #5701\n\t\t\t\tif ( parent.parentNode ) {\n\t\t\t\t\tparent.parentNode.selectedIndex;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn null;\n\t\t}\n\t});\n}\n\n// IE6/7 call enctype encoding\nif ( !jQuery.support.enctype ) {\n\tjQuery.propFix.enctype = \"encoding\";\n}\n\n// Radios and checkboxes getter/setter\nif ( !jQuery.support.checkOn ) {\n\tjQuery.each([ \"radio\", \"checkbox\" ], function() {\n\t\tjQuery.valHooks[ this ] = {\n\t\t\tget: function( elem ) {\n\t\t\t\t// Handle the case where in Webkit \"\" is returned instead of \"on\" if a value isn't specified\n\t\t\t\treturn elem.getAttribute(\"value\") === null ? \"on\" : elem.value;\n\t\t\t}\n\t\t};\n\t});\n}\njQuery.each([ \"radio\", \"checkbox\" ], function() {\n\tjQuery.valHooks[ this ] = jQuery.extend( jQuery.valHooks[ this ], {\n\t\tset: function( elem, value ) {\n\t\t\tif ( jQuery.isArray( value ) ) {\n\t\t\t\treturn ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 );\n\t\t\t}\n\t\t}\n\t});\n});\n\n\n\n\nvar rformElems = /^(?:textarea|input|select)$/i,\n\trtypenamespace = /^([^\\.]*)?(?:\\.(.+))?$/,\n\trhoverHack = /\\bhover(\\.\\S+)?\\b/,\n\trkeyEvent = /^key/,\n\trmouseEvent = /^(?:mouse|contextmenu)|click/,\n\trfocusMorph = /^(?:focusinfocus|focusoutblur)$/,\n\trquickIs = /^(\\w*)(?:#([\\w\\-]+))?(?:\\.([\\w\\-]+))?$/,\n\tquickParse = function( selector ) {\n\t\tvar quick = rquickIs.exec( selector );\n\t\tif ( quick ) {\n\t\t\t//   0  1    2   3\n\t\t\t// [ _, tag, id, class ]\n\t\t\tquick[1] = ( quick[1] || \"\" ).toLowerCase();\n\t\t\tquick[3] = quick[3] && new RegExp( \"(?:^|\\\\s)\" + quick[3] + \"(?:\\\\s|$)\" );\n\t\t}\n\t\treturn quick;\n\t},\n\tquickIs = function( elem, m ) {\n\t\tvar attrs = elem.attributes || {};\n\t\treturn (\n\t\t\t(!m[1] || elem.nodeName.toLowerCase() === m[1]) &&\n\t\t\t(!m[2] || (attrs.id || {}).value === m[2]) &&\n\t\t\t(!m[3] || m[3].test( (attrs[ \"class\" ] || {}).value ))\n\t\t);\n\t},\n\thoverHack = function( events ) {\n\t\treturn jQuery.event.special.hover ? events : events.replace( rhoverHack, \"mouseenter$1 mouseleave$1\" );\n\t};\n\n/*\n * Helper functions for managing events -- not part of the public interface.\n * Props to Dean Edwards' addEvent library for many of the ideas.\n */\njQuery.event = {\n\n\tadd: function( elem, types, handler, data, selector ) {\n\n\t\tvar elemData, eventHandle, events,\n\t\t\tt, tns, type, namespaces, handleObj,\n\t\t\thandleObjIn, quick, handlers, special;\n\n\t\t// Don't attach events to noData or text/comment nodes (allow plain objects tho)\n\t\tif ( elem.nodeType === 3 || elem.nodeType === 8 || !types || !handler || !(elemData = jQuery._data( elem )) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Caller can pass in an object of custom data in lieu of the handler\n\t\tif ( handler.handler ) {\n\t\t\thandleObjIn = handler;\n\t\t\thandler = handleObjIn.handler;\n\t\t}\n\n\t\t// Make sure that the handler has a unique ID, used to find/remove it later\n\t\tif ( !handler.guid ) {\n\t\t\thandler.guid = jQuery.guid++;\n\t\t}\n\n\t\t// Init the element's event structure and main handler, if this is the first\n\t\tevents = elemData.events;\n\t\tif ( !events ) {\n\t\t\telemData.events = events = {};\n\t\t}\n\t\teventHandle = elemData.handle;\n\t\tif ( !eventHandle ) {\n\t\t\telemData.handle = eventHandle = function( e ) {\n\t\t\t\t// Discard the second event of a jQuery.event.trigger() and\n\t\t\t\t// when an event is called after a page has unloaded\n\t\t\t\treturn typeof jQuery !== \"undefined\" && (!e || jQuery.event.triggered !== e.type) ?\n\t\t\t\t\tjQuery.event.dispatch.apply( eventHandle.elem, arguments ) :\n\t\t\t\t\tundefined;\n\t\t\t};\n\t\t\t// Add elem as a property of the handle fn to prevent a memory leak with IE non-native events\n\t\t\teventHandle.elem = elem;\n\t\t}\n\n\t\t// Handle multiple events separated by a space\n\t\t// jQuery(...).bind(\"mouseover mouseout\", fn);\n\t\ttypes = jQuery.trim( hoverHack(types) ).split( \" \" );\n\t\tfor ( t = 0; t < types.length; t++ ) {\n\n\t\t\ttns = rtypenamespace.exec( types[t] ) || [];\n\t\t\ttype = tns[1];\n\t\t\tnamespaces = ( tns[2] || \"\" ).split( \".\" ).sort();\n\n\t\t\t// If event changes its type, use the special event handlers for the changed type\n\t\t\tspecial = jQuery.event.special[ type ] || {};\n\n\t\t\t// If selector defined, determine special event api type, otherwise given type\n\t\t\ttype = ( selector ? special.delegateType : special.bindType ) || type;\n\n\t\t\t// Update special based on newly reset type\n\t\t\tspecial = jQuery.event.special[ type ] || {};\n\n\t\t\t// handleObj is passed to all event handlers\n\t\t\thandleObj = jQuery.extend({\n\t\t\t\ttype: type,\n\t\t\t\torigType: tns[1],\n\t\t\t\tdata: data,\n\t\t\t\thandler: handler,\n\t\t\t\tguid: handler.guid,\n\t\t\t\tselector: selector,\n\t\t\t\tquick: quickParse( selector ),\n\t\t\t\tnamespace: namespaces.join(\".\")\n\t\t\t}, handleObjIn );\n\n\t\t\t// Init the event handler queue if we're the first\n\t\t\thandlers = events[ type ];\n\t\t\tif ( !handlers ) {\n\t\t\t\thandlers = events[ type ] = [];\n\t\t\t\thandlers.delegateCount = 0;\n\n\t\t\t\t// Only use addEventListener/attachEvent if the special events handler returns false\n\t\t\t\tif ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) {\n\t\t\t\t\t// Bind the global event handler to the element\n\t\t\t\t\tif ( elem.addEventListener ) {\n\t\t\t\t\t\telem.addEventListener( type, eventHandle, false );\n\n\t\t\t\t\t} else if ( elem.attachEvent ) {\n\t\t\t\t\t\telem.attachEvent( \"on\" + type, eventHandle );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( special.add ) {\n\t\t\t\tspecial.add.call( elem, handleObj );\n\n\t\t\t\tif ( !handleObj.handler.guid ) {\n\t\t\t\t\thandleObj.handler.guid = handler.guid;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Add to the element's handler list, delegates in front\n\t\t\tif ( selector ) {\n\t\t\t\thandlers.splice( handlers.delegateCount++, 0, handleObj );\n\t\t\t} else {\n\t\t\t\thandlers.push( handleObj );\n\t\t\t}\n\n\t\t\t// Keep track of which events have ever been used, for event optimization\n\t\t\tjQuery.event.global[ type ] = true;\n\t\t}\n\n\t\t// Nullify elem to prevent memory leaks in IE\n\t\telem = null;\n\t},\n\n\tglobal: {},\n\n\t// Detach an event or set of events from an element\n\tremove: function( elem, types, handler, selector, mappedTypes ) {\n\n\t\tvar elemData = jQuery.hasData( elem ) && jQuery._data( elem ),\n\t\t\tt, tns, type, origType, namespaces, origCount,\n\t\t\tj, events, special, handle, eventType, handleObj;\n\n\t\tif ( !elemData || !(events = elemData.events) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Once for each type.namespace in types; type may be omitted\n\t\ttypes = jQuery.trim( hoverHack( types || \"\" ) ).split(\" \");\n\t\tfor ( t = 0; t < types.length; t++ ) {\n\t\t\ttns = rtypenamespace.exec( types[t] ) || [];\n\t\t\ttype = origType = tns[1];\n\t\t\tnamespaces = tns[2];\n\n\t\t\t// Unbind all events (on this namespace, if provided) for the element\n\t\t\tif ( !type ) {\n\t\t\t\tfor ( type in events ) {\n\t\t\t\t\tjQuery.event.remove( elem, type + types[ t ], handler, selector, true );\n\t\t\t\t}\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tspecial = jQuery.event.special[ type ] || {};\n\t\t\ttype = ( selector? special.delegateType : special.bindType ) || type;\n\t\t\teventType = events[ type ] || [];\n\t\t\torigCount = eventType.length;\n\t\t\tnamespaces = namespaces ? new RegExp(\"(^|\\\\.)\" + namespaces.split(\".\").sort().join(\"\\\\.(?:.*\\\\.)?\") + \"(\\\\.|$)\") : null;\n\n\t\t\t// Remove matching events\n\t\t\tfor ( j = 0; j < eventType.length; j++ ) {\n\t\t\t\thandleObj = eventType[ j ];\n\n\t\t\t\tif ( ( mappedTypes || origType === handleObj.origType ) &&\n\t\t\t\t\t ( !handler || handler.guid === handleObj.guid ) &&\n\t\t\t\t\t ( !namespaces || namespaces.test( handleObj.namespace ) ) &&\n\t\t\t\t\t ( !selector || selector === handleObj.selector || selector === \"**\" && handleObj.selector ) ) {\n\t\t\t\t\teventType.splice( j--, 1 );\n\n\t\t\t\t\tif ( handleObj.selector ) {\n\t\t\t\t\t\teventType.delegateCount--;\n\t\t\t\t\t}\n\t\t\t\t\tif ( special.remove ) {\n\t\t\t\t\t\tspecial.remove.call( elem, handleObj );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Remove generic event handler if we removed something and no more handlers exist\n\t\t\t// (avoids potential for endless recursion during removal of special event handlers)\n\t\t\tif ( eventType.length === 0 && origCount !== eventType.length ) {\n\t\t\t\tif ( !special.teardown || special.teardown.call( elem, namespaces ) === false ) {\n\t\t\t\t\tjQuery.removeEvent( elem, type, elemData.handle );\n\t\t\t\t}\n\n\t\t\t\tdelete events[ type ];\n\t\t\t}\n\t\t}\n\n\t\t// Remove the expando if it's no longer used\n\t\tif ( jQuery.isEmptyObject( events ) ) {\n\t\t\thandle = elemData.handle;\n\t\t\tif ( handle ) {\n\t\t\t\thandle.elem = null;\n\t\t\t}\n\n\t\t\t// removeData also checks for emptiness and clears the expando if empty\n\t\t\t// so use it instead of delete\n\t\t\tjQuery.removeData( elem, [ \"events\", \"handle\" ], true );\n\t\t}\n\t},\n\n\t// Events that are safe to short-circuit if no handlers are attached.\n\t// Native DOM events should not be added, they may have inline handlers.\n\tcustomEvent: {\n\t\t\"getData\": true,\n\t\t\"setData\": true,\n\t\t\"changeData\": true\n\t},\n\n\ttrigger: function( event, data, elem, onlyHandlers ) {\n\t\t// Don't do events on text and comment nodes\n\t\tif ( elem && (elem.nodeType === 3 || elem.nodeType === 8) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Event object or event type\n\t\tvar type = event.type || event,\n\t\t\tnamespaces = [],\n\t\t\tcache, exclusive, i, cur, old, ontype, special, handle, eventPath, bubbleType;\n\n\t\t// focus/blur morphs to focusin/out; ensure we're not firing them right now\n\t\tif ( rfocusMorph.test( type + jQuery.event.triggered ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( type.indexOf( \"!\" ) >= 0 ) {\n\t\t\t// Exclusive events trigger only for the exact event (no namespaces)\n\t\t\ttype = type.slice(0, -1);\n\t\t\texclusive = true;\n\t\t}\n\n\t\tif ( type.indexOf( \".\" ) >= 0 ) {\n\t\t\t// Namespaced trigger; create a regexp to match event type in handle()\n\t\t\tnamespaces = type.split(\".\");\n\t\t\ttype = namespaces.shift();\n\t\t\tnamespaces.sort();\n\t\t}\n\n\t\tif ( (!elem || jQuery.event.customEvent[ type ]) && !jQuery.event.global[ type ] ) {\n\t\t\t// No jQuery handlers for this event type, and it can't have inline handlers\n\t\t\treturn;\n\t\t}\n\n\t\t// Caller can pass in an Event, Object, or just an event type string\n\t\tevent = typeof event === \"object\" ?\n\t\t\t// jQuery.Event object\n\t\t\tevent[ jQuery.expando ] ? event :\n\t\t\t// Object literal\n\t\t\tnew jQuery.Event( type, event ) :\n\t\t\t// Just the event type (string)\n\t\t\tnew jQuery.Event( type );\n\n\t\tevent.type = type;\n\t\tevent.isTrigger = true;\n\t\tevent.exclusive = exclusive;\n\t\tevent.namespace = namespaces.join( \".\" );\n\t\tevent.namespace_re = event.namespace? new RegExp(\"(^|\\\\.)\" + namespaces.join(\"\\\\.(?:.*\\\\.)?\") + \"(\\\\.|$)\") : null;\n\t\tontype = type.indexOf( \":\" ) < 0 ? \"on\" + type : \"\";\n\n\t\t// Handle a global trigger\n\t\tif ( !elem ) {\n\n\t\t\t// TODO: Stop taunting the data cache; remove global events and always attach to document\n\t\t\tcache = jQuery.cache;\n\t\t\tfor ( i in cache ) {\n\t\t\t\tif ( cache[ i ].events && cache[ i ].events[ type ] ) {\n\t\t\t\t\tjQuery.event.trigger( event, data, cache[ i ].handle.elem, true );\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\t// Clean up the event in case it is being reused\n\t\tevent.result = undefined;\n\t\tif ( !event.target ) {\n\t\t\tevent.target = elem;\n\t\t}\n\n\t\t// Clone any incoming data and prepend the event, creating the handler arg list\n\t\tdata = data != null ? jQuery.makeArray( data ) : [];\n\t\tdata.unshift( event );\n\n\t\t// Allow special events to draw outside the lines\n\t\tspecial = jQuery.event.special[ type ] || {};\n\t\tif ( special.trigger && special.trigger.apply( elem, data ) === false ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Determine event propagation path in advance, per W3C events spec (#9951)\n\t\t// Bubble up to document, then to window; watch for a global ownerDocument var (#9724)\n\t\teventPath = [[ elem, special.bindType || type ]];\n\t\tif ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) {\n\n\t\t\tbubbleType = special.delegateType || type;\n\t\t\tcur = rfocusMorph.test( bubbleType + type ) ? elem : elem.parentNode;\n\t\t\told = null;\n\t\t\tfor ( ; cur; cur = cur.parentNode ) {\n\t\t\t\teventPath.push([ cur, bubbleType ]);\n\t\t\t\told = cur;\n\t\t\t}\n\n\t\t\t// Only add window if we got to document (e.g., not plain obj or detached DOM)\n\t\t\tif ( old && old === elem.ownerDocument ) {\n\t\t\t\teventPath.push([ old.defaultView || old.parentWindow || window, bubbleType ]);\n\t\t\t}\n\t\t}\n\n\t\t// Fire handlers on the event path\n\t\tfor ( i = 0; i < eventPath.length && !event.isPropagationStopped(); i++ ) {\n\n\t\t\tcur = eventPath[i][0];\n\t\t\tevent.type = eventPath[i][1];\n\n\t\t\thandle = ( jQuery._data( cur, \"events\" ) || {} )[ event.type ] && jQuery._data( cur, \"handle\" );\n\t\t\tif ( handle ) {\n\t\t\t\thandle.apply( cur, data );\n\t\t\t}\n\t\t\t// Note that this is a bare JS function and not a jQuery handler\n\t\t\thandle = ontype && cur[ ontype ];\n\t\t\tif ( handle && jQuery.acceptData( cur ) && handle.apply( cur, data ) === false ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t}\n\t\t}\n\t\tevent.type = type;\n\n\t\t// If nobody prevented the default action, do it now\n\t\tif ( !onlyHandlers && !event.isDefaultPrevented() ) {\n\n\t\t\tif ( (!special._default || special._default.apply( elem.ownerDocument, data ) === false) &&\n\t\t\t\t!(type === \"click\" && jQuery.nodeName( elem, \"a\" )) && jQuery.acceptData( elem ) ) {\n\n\t\t\t\t// Call a native DOM method on the target with the same name name as the event.\n\t\t\t\t// Can't use an .isFunction() check here because IE6/7 fails that test.\n\t\t\t\t// Don't do default actions on window, that's where global variables be (#6170)\n\t\t\t\t// IE<9 dies on focus/blur to hidden element (#1486)\n\t\t\t\tif ( ontype && elem[ type ] && ((type !== \"focus\" && type !== \"blur\") || event.target.offsetWidth !== 0) && !jQuery.isWindow( elem ) ) {\n\n\t\t\t\t\t// Don't re-trigger an onFOO event when we call its FOO() method\n\t\t\t\t\told = elem[ ontype ];\n\n\t\t\t\t\tif ( old ) {\n\t\t\t\t\t\telem[ ontype ] = null;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Prevent re-triggering of the same event, since we already bubbled it above\n\t\t\t\t\tjQuery.event.triggered = type;\n\t\t\t\t\telem[ type ]();\n\t\t\t\t\tjQuery.event.triggered = undefined;\n\n\t\t\t\t\tif ( old ) {\n\t\t\t\t\t\telem[ ontype ] = old;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn event.result;\n\t},\n\n\tdispatch: function( event ) {\n\n\t\t// Make a writable jQuery.Event from the native event object\n\t\tevent = jQuery.event.fix( event || window.event );\n\n\t\tvar handlers = ( (jQuery._data( this, \"events\" ) || {} )[ event.type ] || []),\n\t\t\tdelegateCount = handlers.delegateCount,\n\t\t\targs = [].slice.call( arguments, 0 ),\n\t\t\trun_all = !event.exclusive && !event.namespace,\n\t\t\thandlerQueue = [],\n\t\t\ti, j, cur, jqcur, ret, selMatch, matched, matches, handleObj, sel, related;\n\n\t\t// Use the fix-ed jQuery.Event rather than the (read-only) native event\n\t\targs[0] = event;\n\t\tevent.delegateTarget = this;\n\n\t\t// Determine handlers that should run if there are delegated events\n\t\t// Avoid disabled elements in IE (#6911) and non-left-click bubbling in Firefox (#3861)\n\t\tif ( delegateCount && !event.target.disabled && !(event.button && event.type === \"click\") ) {\n\n\t\t\t// Pregenerate a single jQuery object for reuse with .is()\n\t\t\tjqcur = jQuery(this);\n\t\t\tjqcur.context = this.ownerDocument || this;\n\n\t\t\tfor ( cur = event.target; cur != this; cur = cur.parentNode || this ) {\n\t\t\t\tselMatch = {};\n\t\t\t\tmatches = [];\n\t\t\t\tjqcur[0] = cur;\n\t\t\t\tfor ( i = 0; i < delegateCount; i++ ) {\n\t\t\t\t\thandleObj = handlers[ i ];\n\t\t\t\t\tsel = handleObj.selector;\n\n\t\t\t\t\tif ( selMatch[ sel ] === undefined ) {\n\t\t\t\t\t\tselMatch[ sel ] = (\n\t\t\t\t\t\t\thandleObj.quick ? quickIs( cur, handleObj.quick ) : jqcur.is( sel )\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\tif ( selMatch[ sel ] ) {\n\t\t\t\t\t\tmatches.push( handleObj );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ( matches.length ) {\n\t\t\t\t\thandlerQueue.push({ elem: cur, matches: matches });\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Add the remaining (directly-bound) handlers\n\t\tif ( handlers.length > delegateCount ) {\n\t\t\thandlerQueue.push({ elem: this, matches: handlers.slice( delegateCount ) });\n\t\t}\n\n\t\t// Run delegates first; they may want to stop propagation beneath us\n\t\tfor ( i = 0; i < handlerQueue.length && !event.isPropagationStopped(); i++ ) {\n\t\t\tmatched = handlerQueue[ i ];\n\t\t\tevent.currentTarget = matched.elem;\n\n\t\t\tfor ( j = 0; j < matched.matches.length && !event.isImmediatePropagationStopped(); j++ ) {\n\t\t\t\thandleObj = matched.matches[ j ];\n\n\t\t\t\t// Triggered event must either 1) be non-exclusive and have no namespace, or\n\t\t\t\t// 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace).\n\t\t\t\tif ( run_all || (!event.namespace && !handleObj.namespace) || event.namespace_re && event.namespace_re.test( handleObj.namespace ) ) {\n\n\t\t\t\t\tevent.data = handleObj.data;\n\t\t\t\t\tevent.handleObj = handleObj;\n\n\t\t\t\t\tret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler )\n\t\t\t\t\t\t\t.apply( matched.elem, args );\n\n\t\t\t\t\tif ( ret !== undefined ) {\n\t\t\t\t\t\tevent.result = ret;\n\t\t\t\t\t\tif ( ret === false ) {\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn event.result;\n\t},\n\n\t// Includes some event props shared by KeyEvent and MouseEvent\n\t// *** attrChange attrName relatedNode srcElement  are not normalized, non-W3C, deprecated, will be removed in 1.8 ***\n\tprops: \"attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which\".split(\" \"),\n\n\tfixHooks: {},\n\n\tkeyHooks: {\n\t\tprops: \"char charCode key keyCode\".split(\" \"),\n\t\tfilter: function( event, original ) {\n\n\t\t\t// Add which for key events\n\t\t\tif ( event.which == null ) {\n\t\t\t\tevent.which = original.charCode != null ? original.charCode : original.keyCode;\n\t\t\t}\n\n\t\t\treturn event;\n\t\t}\n\t},\n\n\tmouseHooks: {\n\t\tprops: \"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement\".split(\" \"),\n\t\tfilter: function( event, original ) {\n\t\t\tvar eventDoc, doc, body,\n\t\t\t\tbutton = original.button,\n\t\t\t\tfromElement = original.fromElement;\n\n\t\t\t// Calculate pageX/Y if missing and clientX/Y available\n\t\t\tif ( event.pageX == null && original.clientX != null ) {\n\t\t\t\teventDoc = event.target.ownerDocument || document;\n\t\t\t\tdoc = eventDoc.documentElement;\n\t\t\t\tbody = eventDoc.body;\n\n\t\t\t\tevent.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 );\n\t\t\t\tevent.pageY = original.clientY + ( doc && doc.scrollTop  || body && body.scrollTop  || 0 ) - ( doc && doc.clientTop  || body && body.clientTop  || 0 );\n\t\t\t}\n\n\t\t\t// Add relatedTarget, if necessary\n\t\t\tif ( !event.relatedTarget && fromElement ) {\n\t\t\t\tevent.relatedTarget = fromElement === event.target ? original.toElement : fromElement;\n\t\t\t}\n\n\t\t\t// Add which for click: 1 === left; 2 === middle; 3 === right\n\t\t\t// Note: button is not normalized, so don't use it\n\t\t\tif ( !event.which && button !== undefined ) {\n\t\t\t\tevent.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) );\n\t\t\t}\n\n\t\t\treturn event;\n\t\t}\n\t},\n\n\tfix: function( event ) {\n\t\tif ( event[ jQuery.expando ] ) {\n\t\t\treturn event;\n\t\t}\n\n\t\t// Create a writable copy of the event object and normalize some properties\n\t\tvar i, prop,\n\t\t\toriginalEvent = event,\n\t\t\tfixHook = jQuery.event.fixHooks[ event.type ] || {},\n\t\t\tcopy = fixHook.props ? this.props.concat( fixHook.props ) : this.props;\n\n\t\tevent = jQuery.Event( originalEvent );\n\n\t\tfor ( i = copy.length; i; ) {\n\t\t\tprop = copy[ --i ];\n\t\t\tevent[ prop ] = originalEvent[ prop ];\n\t\t}\n\n\t\t// Fix target property, if necessary (#1925, IE 6/7/8 & Safari2)\n\t\tif ( !event.target ) {\n\t\t\tevent.target = originalEvent.srcElement || document;\n\t\t}\n\n\t\t// Target should not be a text node (#504, Safari)\n\t\tif ( event.target.nodeType === 3 ) {\n\t\t\tevent.target = event.target.parentNode;\n\t\t}\n\n\t\t// For mouse/key events; add metaKey if it's not there (#3368, IE6/7/8)\n\t\tif ( event.metaKey === undefined ) {\n\t\t\tevent.metaKey = event.ctrlKey;\n\t\t}\n\n\t\treturn fixHook.filter? fixHook.filter( event, originalEvent ) : event;\n\t},\n\n\tspecial: {\n\t\tready: {\n\t\t\t// Make sure the ready event is setup\n\t\t\tsetup: jQuery.bindReady\n\t\t},\n\n\t\tload: {\n\t\t\t// Prevent triggered image.load events from bubbling to window.load\n\t\t\tnoBubble: true\n\t\t},\n\n\t\tfocus: {\n\t\t\tdelegateType: \"focusin\"\n\t\t},\n\t\tblur: {\n\t\t\tdelegateType: \"focusout\"\n\t\t},\n\n\t\tbeforeunload: {\n\t\t\tsetup: function( data, namespaces, eventHandle ) {\n\t\t\t\t// We only want to do this special case on windows\n\t\t\t\tif ( jQuery.isWindow( this ) ) {\n\t\t\t\t\tthis.onbeforeunload = eventHandle;\n\t\t\t\t}\n\t\t\t},\n\n\t\t\tteardown: function( namespaces, eventHandle ) {\n\t\t\t\tif ( this.onbeforeunload === eventHandle ) {\n\t\t\t\t\tthis.onbeforeunload = null;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\n\tsimulate: function( type, elem, event, bubble ) {\n\t\t// Piggyback on a donor event to simulate a different one.\n\t\t// Fake originalEvent to avoid donor's stopPropagation, but if the\n\t\t// simulated event prevents default then we do the same on the donor.\n\t\tvar e = jQuery.extend(\n\t\t\tnew jQuery.Event(),\n\t\t\tevent,\n\t\t\t{ type: type,\n\t\t\t\tisSimulated: true,\n\t\t\t\toriginalEvent: {}\n\t\t\t}\n\t\t);\n\t\tif ( bubble ) {\n\t\t\tjQuery.event.trigger( e, null, elem );\n\t\t} else {\n\t\t\tjQuery.event.dispatch.call( elem, e );\n\t\t}\n\t\tif ( e.isDefaultPrevented() ) {\n\t\t\tevent.preventDefault();\n\t\t}\n\t}\n};\n\n// Some plugins are using, but it's undocumented/deprecated and will be removed.\n// The 1.7 special event interface should provide all the hooks needed now.\njQuery.event.handle = jQuery.event.dispatch;\n\njQuery.removeEvent = document.removeEventListener ?\n\tfunction( elem, type, handle ) {\n\t\tif ( elem.removeEventListener ) {\n\t\t\telem.removeEventListener( type, handle, false );\n\t\t}\n\t} :\n\tfunction( elem, type, handle ) {\n\t\tif ( elem.detachEvent ) {\n\t\t\telem.detachEvent( \"on\" + type, handle );\n\t\t}\n\t};\n\njQuery.Event = function( src, props ) {\n\t// Allow instantiation without the 'new' keyword\n\tif ( !(this instanceof jQuery.Event) ) {\n\t\treturn new jQuery.Event( src, props );\n\t}\n\n\t// Event object\n\tif ( src && src.type ) {\n\t\tthis.originalEvent = src;\n\t\tthis.type = src.type;\n\n\t\t// Events bubbling up the document may have been marked as prevented\n\t\t// by a handler lower down the tree; reflect the correct value.\n\t\tthis.isDefaultPrevented = ( src.defaultPrevented || src.returnValue === false ||\n\t\t\tsrc.getPreventDefault && src.getPreventDefault() ) ? returnTrue : returnFalse;\n\n\t// Event type\n\t} else {\n\t\tthis.type = src;\n\t}\n\n\t// Put explicitly provided properties onto the event object\n\tif ( props ) {\n\t\tjQuery.extend( this, props );\n\t}\n\n\t// Create a timestamp if incoming event doesn't have one\n\tthis.timeStamp = src && src.timeStamp || jQuery.now();\n\n\t// Mark it as fixed\n\tthis[ jQuery.expando ] = true;\n};\n\nfunction returnFalse() {\n\treturn false;\n}\nfunction returnTrue() {\n\treturn true;\n}\n\n// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding\n// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html\njQuery.Event.prototype = {\n\tpreventDefault: function() {\n\t\tthis.isDefaultPrevented = returnTrue;\n\n\t\tvar e = this.originalEvent;\n\t\tif ( !e ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// if preventDefault exists run it on the original event\n\t\tif ( e.preventDefault ) {\n\t\t\te.preventDefault();\n\n\t\t// otherwise set the returnValue property of the original event to false (IE)\n\t\t} else {\n\t\t\te.returnValue = false;\n\t\t}\n\t},\n\tstopPropagation: function() {\n\t\tthis.isPropagationStopped = returnTrue;\n\n\t\tvar e = this.originalEvent;\n\t\tif ( !e ) {\n\t\t\treturn;\n\t\t}\n\t\t// if stopPropagation exists run it on the original event\n\t\tif ( e.stopPropagation ) {\n\t\t\te.stopPropagation();\n\t\t}\n\t\t// otherwise set the cancelBubble property of the original event to true (IE)\n\t\te.cancelBubble = true;\n\t},\n\tstopImmediatePropagation: function() {\n\t\tthis.isImmediatePropagationStopped = returnTrue;\n\t\tthis.stopPropagation();\n\t},\n\tisDefaultPrevented: returnFalse,\n\tisPropagationStopped: returnFalse,\n\tisImmediatePropagationStopped: returnFalse\n};\n\n// Create mouseenter/leave events using mouseover/out and event-time checks\njQuery.each({\n\tmouseenter: \"mouseover\",\n\tmouseleave: \"mouseout\"\n}, function( orig, fix ) {\n\tjQuery.event.special[ orig ] = {\n\t\tdelegateType: fix,\n\t\tbindType: fix,\n\n\t\thandle: function( event ) {\n\t\t\tvar target = this,\n\t\t\t\trelated = event.relatedTarget,\n\t\t\t\thandleObj = event.handleObj,\n\t\t\t\tselector = handleObj.selector,\n\t\t\t\tret;\n\n\t\t\t// For mousenter/leave call the handler if related is outside the target.\n\t\t\t// NB: No relatedTarget if the mouse left/entered the browser window\n\t\t\tif ( !related || (related !== target && !jQuery.contains( target, related )) ) {\n\t\t\t\tevent.type = handleObj.origType;\n\t\t\t\tret = handleObj.handler.apply( this, arguments );\n\t\t\t\tevent.type = fix;\n\t\t\t}\n\t\t\treturn ret;\n\t\t}\n\t};\n});\n\n// IE submit delegation\nif ( !jQuery.support.submitBubbles ) {\n\n\tjQuery.event.special.submit = {\n\t\tsetup: function() {\n\t\t\t// Only need this for delegated form submit events\n\t\t\tif ( jQuery.nodeName( this, \"form\" ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// Lazy-add a submit handler when a descendant form may potentially be submitted\n\t\t\tjQuery.event.add( this, \"click._submit keypress._submit\", function( e ) {\n\t\t\t\t// Node name check avoids a VML-related crash in IE (#9807)\n\t\t\t\tvar elem = e.target,\n\t\t\t\t\tform = jQuery.nodeName( elem, \"input\" ) || jQuery.nodeName( elem, \"button\" ) ? elem.form : undefined;\n\t\t\t\tif ( form && !form._submit_attached ) {\n\t\t\t\t\tjQuery.event.add( form, \"submit._submit\", function( event ) {\n\t\t\t\t\t\t// If form was submitted by the user, bubble the event up the tree\n\t\t\t\t\t\tif ( this.parentNode && !event.isTrigger ) {\n\t\t\t\t\t\t\tjQuery.event.simulate( \"submit\", this.parentNode, event, true );\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\tform._submit_attached = true;\n\t\t\t\t}\n\t\t\t});\n\t\t\t// return undefined since we don't need an event listener\n\t\t},\n\n\t\tteardown: function() {\n\t\t\t// Only need this for delegated form submit events\n\t\t\tif ( jQuery.nodeName( this, \"form\" ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// Remove delegated handlers; cleanData eventually reaps submit handlers attached above\n\t\t\tjQuery.event.remove( this, \"._submit\" );\n\t\t}\n\t};\n}\n\n// IE change delegation and checkbox/radio fix\nif ( !jQuery.support.changeBubbles ) {\n\n\tjQuery.event.special.change = {\n\n\t\tsetup: function() {\n\n\t\t\tif ( rformElems.test( this.nodeName ) ) {\n\t\t\t\t// IE doesn't fire change on a check/radio until blur; trigger it on click\n\t\t\t\t// after a propertychange. Eat the blur-change in special.change.handle.\n\t\t\t\t// This still fires onchange a second time for check/radio after blur.\n\t\t\t\tif ( this.type === \"checkbox\" || this.type === \"radio\" ) {\n\t\t\t\t\tjQuery.event.add( this, \"propertychange._change\", function( event ) {\n\t\t\t\t\t\tif ( event.originalEvent.propertyName === \"checked\" ) {\n\t\t\t\t\t\t\tthis._just_changed = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\tjQuery.event.add( this, \"click._change\", function( event ) {\n\t\t\t\t\t\tif ( this._just_changed && !event.isTrigger ) {\n\t\t\t\t\t\t\tthis._just_changed = false;\n\t\t\t\t\t\t\tjQuery.event.simulate( \"change\", this, event, true );\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t// Delegated event; lazy-add a change handler on descendant inputs\n\t\t\tjQuery.event.add( this, \"beforeactivate._change\", function( e ) {\n\t\t\t\tvar elem = e.target;\n\n\t\t\t\tif ( rformElems.test( elem.nodeName ) && !elem._change_attached ) {\n\t\t\t\t\tjQuery.event.add( elem, \"change._change\", function( event ) {\n\t\t\t\t\t\tif ( this.parentNode && !event.isSimulated && !event.isTrigger ) {\n\t\t\t\t\t\t\tjQuery.event.simulate( \"change\", this.parentNode, event, true );\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\telem._change_attached = true;\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\n\t\thandle: function( event ) {\n\t\t\tvar elem = event.target;\n\n\t\t\t// Swallow native change events from checkbox/radio, we already triggered them above\n\t\t\tif ( this !== elem || event.isSimulated || event.isTrigger || (elem.type !== \"radio\" && elem.type !== \"checkbox\") ) {\n\t\t\t\treturn event.handleObj.handler.apply( this, arguments );\n\t\t\t}\n\t\t},\n\n\t\tteardown: function() {\n\t\t\tjQuery.event.remove( this, \"._change\" );\n\n\t\t\treturn rformElems.test( this.nodeName );\n\t\t}\n\t};\n}\n\n// Create \"bubbling\" focus and blur events\nif ( !jQuery.support.focusinBubbles ) {\n\tjQuery.each({ focus: \"focusin\", blur: \"focusout\" }, function( orig, fix ) {\n\n\t\t// Attach a single capturing handler while someone wants focusin/focusout\n\t\tvar attaches = 0,\n\t\t\thandler = function( event ) {\n\t\t\t\tjQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true );\n\t\t\t};\n\n\t\tjQuery.event.special[ fix ] = {\n\t\t\tsetup: function() {\n\t\t\t\tif ( attaches++ === 0 ) {\n\t\t\t\t\tdocument.addEventListener( orig, handler, true );\n\t\t\t\t}\n\t\t\t},\n\t\t\tteardown: function() {\n\t\t\t\tif ( --attaches === 0 ) {\n\t\t\t\t\tdocument.removeEventListener( orig, handler, true );\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t});\n}\n\njQuery.fn.extend({\n\n\ton: function( types, selector, data, fn, /*INTERNAL*/ one ) {\n\t\tvar origFn, type;\n\n\t\t// Types can be a map of types/handlers\n\t\tif ( typeof types === \"object\" ) {\n\t\t\t// ( types-Object, selector, data )\n\t\t\tif ( typeof selector !== \"string\" ) {\n\t\t\t\t// ( types-Object, data )\n\t\t\t\tdata = selector;\n\t\t\t\tselector = undefined;\n\t\t\t}\n\t\t\tfor ( type in types ) {\n\t\t\t\tthis.on( type, selector, data, types[ type ], one );\n\t\t\t}\n\t\t\treturn this;\n\t\t}\n\n\t\tif ( data == null && fn == null ) {\n\t\t\t// ( types, fn )\n\t\t\tfn = selector;\n\t\t\tdata = selector = undefined;\n\t\t} else if ( fn == null ) {\n\t\t\tif ( typeof selector === \"string\" ) {\n\t\t\t\t// ( types, selector, fn )\n\t\t\t\tfn = data;\n\t\t\t\tdata = undefined;\n\t\t\t} else {\n\t\t\t\t// ( types, data, fn )\n\t\t\t\tfn = data;\n\t\t\t\tdata = selector;\n\t\t\t\tselector = undefined;\n\t\t\t}\n\t\t}\n\t\tif ( fn === false ) {\n\t\t\tfn = returnFalse;\n\t\t} else if ( !fn ) {\n\t\t\treturn this;\n\t\t}\n\n\t\tif ( one === 1 ) {\n\t\t\torigFn = fn;\n\t\t\tfn = function( event ) {\n\t\t\t\t// Can use an empty set, since event contains the info\n\t\t\t\tjQuery().off( event );\n\t\t\t\treturn origFn.apply( this, arguments );\n\t\t\t};\n\t\t\t// Use same guid so caller can remove using origFn\n\t\t\tfn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );\n\t\t}\n\t\treturn this.each( function() {\n\t\t\tjQuery.event.add( this, types, fn, data, selector );\n\t\t});\n\t},\n\tone: function( types, selector, data, fn ) {\n\t\treturn this.on.call( this, types, selector, data, fn, 1 );\n\t},\n\toff: function( types, selector, fn ) {\n\t\tif ( types && types.preventDefault && types.handleObj ) {\n\t\t\t// ( event )  dispatched jQuery.Event\n\t\t\tvar handleObj = types.handleObj;\n\t\t\tjQuery( types.delegateTarget ).off(\n\t\t\t\thandleObj.namespace? handleObj.type + \".\" + handleObj.namespace : handleObj.type,\n\t\t\t\thandleObj.selector,\n\t\t\t\thandleObj.handler\n\t\t\t);\n\t\t\treturn this;\n\t\t}\n\t\tif ( typeof types === \"object\" ) {\n\t\t\t// ( types-object [, selector] )\n\t\t\tfor ( var type in types ) {\n\t\t\t\tthis.off( type, selector, types[ type ] );\n\t\t\t}\n\t\t\treturn this;\n\t\t}\n\t\tif ( selector === false || typeof selector === \"function\" ) {\n\t\t\t// ( types [, fn] )\n\t\t\tfn = selector;\n\t\t\tselector = undefined;\n\t\t}\n\t\tif ( fn === false ) {\n\t\t\tfn = returnFalse;\n\t\t}\n\t\treturn this.each(function() {\n\t\t\tjQuery.event.remove( this, types, fn, selector );\n\t\t});\n\t},\n\n\tbind: function( types, data, fn ) {\n\t\treturn this.on( types, null, data, fn );\n\t},\n\tunbind: function( types, fn ) {\n\t\treturn this.off( types, null, fn );\n\t},\n\n\tlive: function( types, data, fn ) {\n\t\tjQuery( this.context ).on( types, this.selector, data, fn );\n\t\treturn this;\n\t},\n\tdie: function( types, fn ) {\n\t\tjQuery( this.context ).off( types, this.selector || \"**\", fn );\n\t\treturn this;\n\t},\n\n\tdelegate: function( selector, types, data, fn ) {\n\t\treturn this.on( types, selector, data, fn );\n\t},\n\tundelegate: function( selector, types, fn ) {\n\t\t// ( namespace ) or ( selector, types [, fn] )\n\t\treturn arguments.length == 1? this.off( selector, \"**\" ) : this.off( types, selector, fn );\n\t},\n\n\ttrigger: function( type, data ) {\n\t\treturn this.each(function() {\n\t\t\tjQuery.event.trigger( type, data, this );\n\t\t});\n\t},\n\ttriggerHandler: function( type, data ) {\n\t\tif ( this[0] ) {\n\t\t\treturn jQuery.event.trigger( type, data, this[0], true );\n\t\t}\n\t},\n\n\ttoggle: function( fn ) {\n\t\t// Save reference to arguments for access in closure\n\t\tvar args = arguments,\n\t\t\tguid = fn.guid || jQuery.guid++,\n\t\t\ti = 0,\n\t\t\ttoggler = function( event ) {\n\t\t\t\t// Figure out which function to execute\n\t\t\t\tvar lastToggle = ( jQuery._data( this, \"lastToggle\" + fn.guid ) || 0 ) % i;\n\t\t\t\tjQuery._data( this, \"lastToggle\" + fn.guid, lastToggle + 1 );\n\n\t\t\t\t// Make sure that clicks stop\n\t\t\t\tevent.preventDefault();\n\n\t\t\t\t// and execute the function\n\t\t\t\treturn args[ lastToggle ].apply( this, arguments ) || false;\n\t\t\t};\n\n\t\t// link all the functions, so any of them can unbind this click handler\n\t\ttoggler.guid = guid;\n\t\twhile ( i < args.length ) {\n\t\t\targs[ i++ ].guid = guid;\n\t\t}\n\n\t\treturn this.click( toggler );\n\t},\n\n\thover: function( fnOver, fnOut ) {\n\t\treturn this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );\n\t}\n});\n\njQuery.each( (\"blur focus focusin focusout load resize scroll unload click dblclick \" +\n\t\"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave \" +\n\t\"change select submit keydown keypress keyup error contextmenu\").split(\" \"), function( i, name ) {\n\n\t// Handle event binding\n\tjQuery.fn[ name ] = function( data, fn ) {\n\t\tif ( fn == null ) {\n\t\t\tfn = data;\n\t\t\tdata = null;\n\t\t}\n\n\t\treturn arguments.length > 0 ?\n\t\t\tthis.on( name, null, data, fn ) :\n\t\t\tthis.trigger( name );\n\t};\n\n\tif ( jQuery.attrFn ) {\n\t\tjQuery.attrFn[ name ] = true;\n\t}\n\n\tif ( rkeyEvent.test( name ) ) {\n\t\tjQuery.event.fixHooks[ name ] = jQuery.event.keyHooks;\n\t}\n\n\tif ( rmouseEvent.test( name ) ) {\n\t\tjQuery.event.fixHooks[ name ] = jQuery.event.mouseHooks;\n\t}\n});\n\n\n\n/*!\n * Sizzle CSS Selector Engine\n *  Copyright 2011, The Dojo Foundation\n *  Released under the MIT, BSD, and GPL Licenses.\n *  More information: http://sizzlejs.com/\n */\n(function(){\n\nvar chunker = /((?:\\((?:\\([^()]+\\)|[^()]+)+\\)|\\[(?:\\[[^\\[\\]]*\\]|['\"][^'\"]*['\"]|[^\\[\\]'\"]+)+\\]|\\\\.|[^ >+~,(\\[\\\\]+)+|[>+~])(\\s*,\\s*)?((?:.|\\r|\\n)*)/g,\n\texpando = \"sizcache\" + (Math.random() + '').replace('.', ''),\n\tdone = 0,\n\ttoString = Object.prototype.toString,\n\thasDuplicate = false,\n\tbaseHasDuplicate = true,\n\trBackslash = /\\\\/g,\n\trReturn = /\\r\\n/g,\n\trNonWord = /\\W/;\n\n// Here we check if the JavaScript engine is using some sort of\n// optimization where it does not always call our comparision\n// function. If that is the case, discard the hasDuplicate value.\n//   Thus far that includes Google Chrome.\n[0, 0].sort(function() {\n\tbaseHasDuplicate = false;\n\treturn 0;\n});\n\nvar Sizzle = function( selector, context, results, seed ) {\n\tresults = results || [];\n\tcontext = context || document;\n\n\tvar origContext = context;\n\n\tif ( context.nodeType !== 1 && context.nodeType !== 9 ) {\n\t\treturn [];\n\t}\n\t\n\tif ( !selector || typeof selector !== \"string\" ) {\n\t\treturn results;\n\t}\n\n\tvar m, set, checkSet, extra, ret, cur, pop, i,\n\t\tprune = true,\n\t\tcontextXML = Sizzle.isXML( context ),\n\t\tparts = [],\n\t\tsoFar = selector;\n\t\n\t// Reset the position of the chunker regexp (start from head)\n\tdo {\n\t\tchunker.exec( \"\" );\n\t\tm = chunker.exec( soFar );\n\n\t\tif ( m ) {\n\t\t\tsoFar = m[3];\n\t\t\n\t\t\tparts.push( m[1] );\n\t\t\n\t\t\tif ( m[2] ) {\n\t\t\t\textra = m[3];\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t} while ( m );\n\n\tif ( parts.length > 1 && origPOS.exec( selector ) ) {\n\n\t\tif ( parts.length === 2 && Expr.relative[ parts[0] ] ) {\n\t\t\tset = posProcess( parts[0] + parts[1], context, seed );\n\n\t\t} else {\n\t\t\tset = Expr.relative[ parts[0] ] ?\n\t\t\t\t[ context ] :\n\t\t\t\tSizzle( parts.shift(), context );\n\n\t\t\twhile ( parts.length ) {\n\t\t\t\tselector = parts.shift();\n\n\t\t\t\tif ( Expr.relative[ selector ] ) {\n\t\t\t\t\tselector += parts.shift();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tset = posProcess( selector, set, seed );\n\t\t\t}\n\t\t}\n\n\t} else {\n\t\t// Take a shortcut and set the context if the root selector is an ID\n\t\t// (but not if it'll be faster if the inner selector is an ID)\n\t\tif ( !seed && parts.length > 1 && context.nodeType === 9 && !contextXML &&\n\t\t\t\tExpr.match.ID.test(parts[0]) && !Expr.match.ID.test(parts[parts.length - 1]) ) {\n\n\t\t\tret = Sizzle.find( parts.shift(), context, contextXML );\n\t\t\tcontext = ret.expr ?\n\t\t\t\tSizzle.filter( ret.expr, ret.set )[0] :\n\t\t\t\tret.set[0];\n\t\t}\n\n\t\tif ( context ) {\n\t\t\tret = seed ?\n\t\t\t\t{ expr: parts.pop(), set: makeArray(seed) } :\n\t\t\t\tSizzle.find( parts.pop(), parts.length === 1 && (parts[0] === \"~\" || parts[0] === \"+\") && context.parentNode ? context.parentNode : context, contextXML );\n\n\t\t\tset = ret.expr ?\n\t\t\t\tSizzle.filter( ret.expr, ret.set ) :\n\t\t\t\tret.set;\n\n\t\t\tif ( parts.length > 0 ) {\n\t\t\t\tcheckSet = makeArray( set );\n\n\t\t\t} else {\n\t\t\t\tprune = false;\n\t\t\t}\n\n\t\t\twhile ( parts.length ) {\n\t\t\t\tcur = parts.pop();\n\t\t\t\tpop = cur;\n\n\t\t\t\tif ( !Expr.relative[ cur ] ) {\n\t\t\t\t\tcur = \"\";\n\t\t\t\t} else {\n\t\t\t\t\tpop = parts.pop();\n\t\t\t\t}\n\n\t\t\t\tif ( pop == null ) {\n\t\t\t\t\tpop = context;\n\t\t\t\t}\n\n\t\t\t\tExpr.relative[ cur ]( checkSet, pop, contextXML );\n\t\t\t}\n\n\t\t} else {\n\t\t\tcheckSet = parts = [];\n\t\t}\n\t}\n\n\tif ( !checkSet ) {\n\t\tcheckSet = set;\n\t}\n\n\tif ( !checkSet ) {\n\t\tSizzle.error( cur || selector );\n\t}\n\n\tif ( toString.call(checkSet) === \"[object Array]\" ) {\n\t\tif ( !prune ) {\n\t\t\tresults.push.apply( results, checkSet );\n\n\t\t} else if ( context && context.nodeType === 1 ) {\n\t\t\tfor ( i = 0; checkSet[i] != null; i++ ) {\n\t\t\t\tif ( checkSet[i] && (checkSet[i] === true || checkSet[i].nodeType === 1 && Sizzle.contains(context, checkSet[i])) ) {\n\t\t\t\t\tresults.push( set[i] );\n\t\t\t\t}\n\t\t\t}\n\n\t\t} else {\n\t\t\tfor ( i = 0; checkSet[i] != null; i++ ) {\n\t\t\t\tif ( checkSet[i] && checkSet[i].nodeType === 1 ) {\n\t\t\t\t\tresults.push( set[i] );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t} else {\n\t\tmakeArray( checkSet, results );\n\t}\n\n\tif ( extra ) {\n\t\tSizzle( extra, origContext, results, seed );\n\t\tSizzle.uniqueSort( results );\n\t}\n\n\treturn results;\n};\n\nSizzle.uniqueSort = function( results ) {\n\tif ( sortOrder ) {\n\t\thasDuplicate = baseHasDuplicate;\n\t\tresults.sort( sortOrder );\n\n\t\tif ( hasDuplicate ) {\n\t\t\tfor ( var i = 1; i < results.length; i++ ) {\n\t\t\t\tif ( results[i] === results[ i - 1 ] ) {\n\t\t\t\t\tresults.splice( i--, 1 );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn results;\n};\n\nSizzle.matches = function( expr, set ) {\n\treturn Sizzle( expr, null, null, set );\n};\n\nSizzle.matchesSelector = function( node, expr ) {\n\treturn Sizzle( expr, null, null, [node] ).length > 0;\n};\n\nSizzle.find = function( expr, context, isXML ) {\n\tvar set, i, len, match, type, left;\n\n\tif ( !expr ) {\n\t\treturn [];\n\t}\n\n\tfor ( i = 0, len = Expr.order.length; i < len; i++ ) {\n\t\ttype = Expr.order[i];\n\t\t\n\t\tif ( (match = Expr.leftMatch[ type ].exec( expr )) ) {\n\t\t\tleft = match[1];\n\t\t\tmatch.splice( 1, 1 );\n\n\t\t\tif ( left.substr( left.length - 1 ) !== \"\\\\\" ) {\n\t\t\t\tmatch[1] = (match[1] || \"\").replace( rBackslash, \"\" );\n\t\t\t\tset = Expr.find[ type ]( match, context, isXML );\n\n\t\t\t\tif ( set != null ) {\n\t\t\t\t\texpr = expr.replace( Expr.match[ type ], \"\" );\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tif ( !set ) {\n\t\tset = typeof context.getElementsByTagName !== \"undefined\" ?\n\t\t\tcontext.getElementsByTagName( \"*\" ) :\n\t\t\t[];\n\t}\n\n\treturn { set: set, expr: expr };\n};\n\nSizzle.filter = function( expr, set, inplace, not ) {\n\tvar match, anyFound,\n\t\ttype, found, item, filter, left,\n\t\ti, pass,\n\t\told = expr,\n\t\tresult = [],\n\t\tcurLoop = set,\n\t\tisXMLFilter = set && set[0] && Sizzle.isXML( set[0] );\n\n\twhile ( expr && set.length ) {\n\t\tfor ( type in Expr.filter ) {\n\t\t\tif ( (match = Expr.leftMatch[ type ].exec( expr )) != null && match[2] ) {\n\t\t\t\tfilter = Expr.filter[ type ];\n\t\t\t\tleft = match[1];\n\n\t\t\t\tanyFound = false;\n\n\t\t\t\tmatch.splice(1,1);\n\n\t\t\t\tif ( left.substr( left.length - 1 ) === \"\\\\\" ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif ( curLoop === result ) {\n\t\t\t\t\tresult = [];\n\t\t\t\t}\n\n\t\t\t\tif ( Expr.preFilter[ type ] ) {\n\t\t\t\t\tmatch = Expr.preFilter[ type ]( match, curLoop, inplace, result, not, isXMLFilter );\n\n\t\t\t\t\tif ( !match ) {\n\t\t\t\t\t\tanyFound = found = true;\n\n\t\t\t\t\t} else if ( match === true ) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif ( match ) {\n\t\t\t\t\tfor ( i = 0; (item = curLoop[i]) != null; i++ ) {\n\t\t\t\t\t\tif ( item ) {\n\t\t\t\t\t\t\tfound = filter( item, match, i, curLoop );\n\t\t\t\t\t\t\tpass = not ^ found;\n\n\t\t\t\t\t\t\tif ( inplace && found != null ) {\n\t\t\t\t\t\t\t\tif ( pass ) {\n\t\t\t\t\t\t\t\t\tanyFound = true;\n\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tcurLoop[i] = false;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t} else if ( pass ) {\n\t\t\t\t\t\t\t\tresult.push( item );\n\t\t\t\t\t\t\t\tanyFound = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif ( found !== undefined ) {\n\t\t\t\t\tif ( !inplace ) {\n\t\t\t\t\t\tcurLoop = result;\n\t\t\t\t\t}\n\n\t\t\t\t\texpr = expr.replace( Expr.match[ type ], \"\" );\n\n\t\t\t\t\tif ( !anyFound ) {\n\t\t\t\t\t\treturn [];\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Improper expression\n\t\tif ( expr === old ) {\n\t\t\tif ( anyFound == null ) {\n\t\t\t\tSizzle.error( expr );\n\n\t\t\t} else {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\told = expr;\n\t}\n\n\treturn curLoop;\n};\n\nSizzle.error = function( msg ) {\n\tthrow new Error( \"Syntax error, unrecognized expression: \" + msg );\n};\n\n/**\n * Utility function for retreiving the text value of an array of DOM nodes\n * @param {Array|Element} elem\n */\nvar getText = Sizzle.getText = function( elem ) {\n    var i, node,\n\t\tnodeType = elem.nodeType,\n\t\tret = \"\";\n\n\tif ( nodeType ) {\n\t\tif ( nodeType === 1 || nodeType === 9 ) {\n\t\t\t// Use textContent || innerText for elements\n\t\t\tif ( typeof elem.textContent === 'string' ) {\n\t\t\t\treturn elem.textContent;\n\t\t\t} else if ( typeof elem.innerText === 'string' ) {\n\t\t\t\t// Replace IE's carriage returns\n\t\t\t\treturn elem.innerText.replace( rReturn, '' );\n\t\t\t} else {\n\t\t\t\t// Traverse it's children\n\t\t\t\tfor ( elem = elem.firstChild; elem; elem = elem.nextSibling) {\n\t\t\t\t\tret += getText( elem );\n\t\t\t\t}\n\t\t\t}\n\t\t} else if ( nodeType === 3 || nodeType === 4 ) {\n\t\t\treturn elem.nodeValue;\n\t\t}\n\t} else {\n\n\t\t// If no nodeType, this is expected to be an array\n\t\tfor ( i = 0; (node = elem[i]); i++ ) {\n\t\t\t// Do not traverse comment nodes\n\t\t\tif ( node.nodeType !== 8 ) {\n\t\t\t\tret += getText( node );\n\t\t\t}\n\t\t}\n\t}\n\treturn ret;\n};\n\nvar Expr = Sizzle.selectors = {\n\torder: [ \"ID\", \"NAME\", \"TAG\" ],\n\n\tmatch: {\n\t\tID: /#((?:[\\w\\u00c0-\\uFFFF\\-]|\\\\.)+)/,\n\t\tCLASS: /\\.((?:[\\w\\u00c0-\\uFFFF\\-]|\\\\.)+)/,\n\t\tNAME: /\\[name=['\"]*((?:[\\w\\u00c0-\\uFFFF\\-]|\\\\.)+)['\"]*\\]/,\n\t\tATTR: /\\[\\s*((?:[\\w\\u00c0-\\uFFFF\\-]|\\\\.)+)\\s*(?:(\\S?=)\\s*(?:(['\"])(.*?)\\3|(#?(?:[\\w\\u00c0-\\uFFFF\\-]|\\\\.)*)|)|)\\s*\\]/,\n\t\tTAG: /^((?:[\\w\\u00c0-\\uFFFF\\*\\-]|\\\\.)+)/,\n\t\tCHILD: /:(only|nth|last|first)-child(?:\\(\\s*(even|odd|(?:[+\\-]?\\d+|(?:[+\\-]?\\d*)?n\\s*(?:[+\\-]\\s*\\d+)?))\\s*\\))?/,\n\t\tPOS: /:(nth|eq|gt|lt|first|last|even|odd)(?:\\((\\d*)\\))?(?=[^\\-]|$)/,\n\t\tPSEUDO: /:((?:[\\w\\u00c0-\\uFFFF\\-]|\\\\.)+)(?:\\((['\"]?)((?:\\([^\\)]+\\)|[^\\(\\)]*)+)\\2\\))?/\n\t},\n\n\tleftMatch: {},\n\n\tattrMap: {\n\t\t\"class\": \"className\",\n\t\t\"for\": \"htmlFor\"\n\t},\n\n\tattrHandle: {\n\t\thref: function( elem ) {\n\t\t\treturn elem.getAttribute( \"href\" );\n\t\t},\n\t\ttype: function( elem ) {\n\t\t\treturn elem.getAttribute( \"type\" );\n\t\t}\n\t},\n\n\trelative: {\n\t\t\"+\": function(checkSet, part){\n\t\t\tvar isPartStr = typeof part === \"string\",\n\t\t\t\tisTag = isPartStr && !rNonWord.test( part ),\n\t\t\t\tisPartStrNotTag = isPartStr && !isTag;\n\n\t\t\tif ( isTag ) {\n\t\t\t\tpart = part.toLowerCase();\n\t\t\t}\n\n\t\t\tfor ( var i = 0, l = checkSet.length, elem; i < l; i++ ) {\n\t\t\t\tif ( (elem = checkSet[i]) ) {\n\t\t\t\t\twhile ( (elem = elem.previousSibling) && elem.nodeType !== 1 ) {}\n\n\t\t\t\t\tcheckSet[i] = isPartStrNotTag || elem && elem.nodeName.toLowerCase() === part ?\n\t\t\t\t\t\telem || false :\n\t\t\t\t\t\telem === part;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( isPartStrNotTag ) {\n\t\t\t\tSizzle.filter( part, checkSet, true );\n\t\t\t}\n\t\t},\n\n\t\t\">\": function( checkSet, part ) {\n\t\t\tvar elem,\n\t\t\t\tisPartStr = typeof part === \"string\",\n\t\t\t\ti = 0,\n\t\t\t\tl = checkSet.length;\n\n\t\t\tif ( isPartStr && !rNonWord.test( part ) ) {\n\t\t\t\tpart = part.toLowerCase();\n\n\t\t\t\tfor ( ; i < l; i++ ) {\n\t\t\t\t\telem = checkSet[i];\n\n\t\t\t\t\tif ( elem ) {\n\t\t\t\t\t\tvar parent = elem.parentNode;\n\t\t\t\t\t\tcheckSet[i] = parent.nodeName.toLowerCase() === part ? parent : false;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\tfor ( ; i < l; i++ ) {\n\t\t\t\t\telem = checkSet[i];\n\n\t\t\t\t\tif ( elem ) {\n\t\t\t\t\t\tcheckSet[i] = isPartStr ?\n\t\t\t\t\t\t\telem.parentNode :\n\t\t\t\t\t\t\telem.parentNode === part;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif ( isPartStr ) {\n\t\t\t\t\tSizzle.filter( part, checkSet, true );\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\t\"\": function(checkSet, part, isXML){\n\t\t\tvar nodeCheck,\n\t\t\t\tdoneName = done++,\n\t\t\t\tcheckFn = dirCheck;\n\n\t\t\tif ( typeof part === \"string\" && !rNonWord.test( part ) ) {\n\t\t\t\tpart = part.toLowerCase();\n\t\t\t\tnodeCheck = part;\n\t\t\t\tcheckFn = dirNodeCheck;\n\t\t\t}\n\n\t\t\tcheckFn( \"parentNode\", part, doneName, checkSet, nodeCheck, isXML );\n\t\t},\n\n\t\t\"~\": function( checkSet, part, isXML ) {\n\t\t\tvar nodeCheck,\n\t\t\t\tdoneName = done++,\n\t\t\t\tcheckFn = dirCheck;\n\n\t\t\tif ( typeof part === \"string\" && !rNonWord.test( part ) ) {\n\t\t\t\tpart = part.toLowerCase();\n\t\t\t\tnodeCheck = part;\n\t\t\t\tcheckFn = dirNodeCheck;\n\t\t\t}\n\n\t\t\tcheckFn( \"previousSibling\", part, doneName, checkSet, nodeCheck, isXML );\n\t\t}\n\t},\n\n\tfind: {\n\t\tID: function( match, context, isXML ) {\n\t\t\tif ( typeof context.getElementById !== \"undefined\" && !isXML ) {\n\t\t\t\tvar m = context.getElementById(match[1]);\n\t\t\t\t// Check parentNode to catch when Blackberry 4.6 returns\n\t\t\t\t// nodes that are no longer in the document #6963\n\t\t\t\treturn m && m.parentNode ? [m] : [];\n\t\t\t}\n\t\t},\n\n\t\tNAME: function( match, context ) {\n\t\t\tif ( typeof context.getElementsByName !== \"undefined\" ) {\n\t\t\t\tvar ret = [],\n\t\t\t\t\tresults = context.getElementsByName( match[1] );\n\n\t\t\t\tfor ( var i = 0, l = results.length; i < l; i++ ) {\n\t\t\t\t\tif ( results[i].getAttribute(\"name\") === match[1] ) {\n\t\t\t\t\t\tret.push( results[i] );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn ret.length === 0 ? null : ret;\n\t\t\t}\n\t\t},\n\n\t\tTAG: function( match, context ) {\n\t\t\tif ( typeof context.getElementsByTagName !== \"undefined\" ) {\n\t\t\t\treturn context.getElementsByTagName( match[1] );\n\t\t\t}\n\t\t}\n\t},\n\tpreFilter: {\n\t\tCLASS: function( match, curLoop, inplace, result, not, isXML ) {\n\t\t\tmatch = \" \" + match[1].replace( rBackslash, \"\" ) + \" \";\n\n\t\t\tif ( isXML ) {\n\t\t\t\treturn match;\n\t\t\t}\n\n\t\t\tfor ( var i = 0, elem; (elem = curLoop[i]) != null; i++ ) {\n\t\t\t\tif ( elem ) {\n\t\t\t\t\tif ( not ^ (elem.className && (\" \" + elem.className + \" \").replace(/[\\t\\n\\r]/g, \" \").indexOf(match) >= 0) ) {\n\t\t\t\t\t\tif ( !inplace ) {\n\t\t\t\t\t\t\tresult.push( elem );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} else if ( inplace ) {\n\t\t\t\t\t\tcurLoop[i] = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn false;\n\t\t},\n\n\t\tID: function( match ) {\n\t\t\treturn match[1].replace( rBackslash, \"\" );\n\t\t},\n\n\t\tTAG: function( match, curLoop ) {\n\t\t\treturn match[1].replace( rBackslash, \"\" ).toLowerCase();\n\t\t},\n\n\t\tCHILD: function( match ) {\n\t\t\tif ( match[1] === \"nth\" ) {\n\t\t\t\tif ( !match[2] ) {\n\t\t\t\t\tSizzle.error( match[0] );\n\t\t\t\t}\n\n\t\t\t\tmatch[2] = match[2].replace(/^\\+|\\s*/g, '');\n\n\t\t\t\t// parse equations like 'even', 'odd', '5', '2n', '3n+2', '4n-1', '-n+6'\n\t\t\t\tvar test = /(-?)(\\d*)(?:n([+\\-]?\\d*))?/.exec(\n\t\t\t\t\tmatch[2] === \"even\" && \"2n\" || match[2] === \"odd\" && \"2n+1\" ||\n\t\t\t\t\t!/\\D/.test( match[2] ) && \"0n+\" + match[2] || match[2]);\n\n\t\t\t\t// calculate the numbers (first)n+(last) including if they are negative\n\t\t\t\tmatch[2] = (test[1] + (test[2] || 1)) - 0;\n\t\t\t\tmatch[3] = test[3] - 0;\n\t\t\t}\n\t\t\telse if ( match[2] ) {\n\t\t\t\tSizzle.error( match[0] );\n\t\t\t}\n\n\t\t\t// TODO: Move to normal caching system\n\t\t\tmatch[0] = done++;\n\n\t\t\treturn match;\n\t\t},\n\n\t\tATTR: function( match, curLoop, inplace, result, not, isXML ) {\n\t\t\tvar name = match[1] = match[1].replace( rBackslash, \"\" );\n\t\t\t\n\t\t\tif ( !isXML && Expr.attrMap[name] ) {\n\t\t\t\tmatch[1] = Expr.attrMap[name];\n\t\t\t}\n\n\t\t\t// Handle if an un-quoted value was used\n\t\t\tmatch[4] = ( match[4] || match[5] || \"\" ).replace( rBackslash, \"\" );\n\n\t\t\tif ( match[2] === \"~=\" ) {\n\t\t\t\tmatch[4] = \" \" + match[4] + \" \";\n\t\t\t}\n\n\t\t\treturn match;\n\t\t},\n\n\t\tPSEUDO: function( match, curLoop, inplace, result, not ) {\n\t\t\tif ( match[1] === \"not\" ) {\n\t\t\t\t// If we're dealing with a complex expression, or a simple one\n\t\t\t\tif ( ( chunker.exec(match[3]) || \"\" ).length > 1 || /^\\w/.test(match[3]) ) {\n\t\t\t\t\tmatch[3] = Sizzle(match[3], null, null, curLoop);\n\n\t\t\t\t} else {\n\t\t\t\t\tvar ret = Sizzle.filter(match[3], curLoop, inplace, true ^ not);\n\n\t\t\t\t\tif ( !inplace ) {\n\t\t\t\t\t\tresult.push.apply( result, ret );\n\t\t\t\t\t}\n\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t} else if ( Expr.match.POS.test( match[0] ) || Expr.match.CHILD.test( match[0] ) ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\t\n\t\t\treturn match;\n\t\t},\n\n\t\tPOS: function( match ) {\n\t\t\tmatch.unshift( true );\n\n\t\t\treturn match;\n\t\t}\n\t},\n\t\n\tfilters: {\n\t\tenabled: function( elem ) {\n\t\t\treturn elem.disabled === false && elem.type !== \"hidden\";\n\t\t},\n\n\t\tdisabled: function( elem ) {\n\t\t\treturn elem.disabled === true;\n\t\t},\n\n\t\tchecked: function( elem ) {\n\t\t\treturn elem.checked === true;\n\t\t},\n\t\t\n\t\tselected: function( elem ) {\n\t\t\t// Accessing this property makes selected-by-default\n\t\t\t// options in Safari work properly\n\t\t\tif ( elem.parentNode ) {\n\t\t\t\telem.parentNode.selectedIndex;\n\t\t\t}\n\t\t\t\n\t\t\treturn elem.selected === true;\n\t\t},\n\n\t\tparent: function( elem ) {\n\t\t\treturn !!elem.firstChild;\n\t\t},\n\n\t\tempty: function( elem ) {\n\t\t\treturn !elem.firstChild;\n\t\t},\n\n\t\thas: function( elem, i, match ) {\n\t\t\treturn !!Sizzle( match[3], elem ).length;\n\t\t},\n\n\t\theader: function( elem ) {\n\t\t\treturn (/h\\d/i).test( elem.nodeName );\n\t\t},\n\n\t\ttext: function( elem ) {\n\t\t\tvar attr = elem.getAttribute( \"type\" ), type = elem.type;\n\t\t\t// IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc) \n\t\t\t// use getAttribute instead to test this case\n\t\t\treturn elem.nodeName.toLowerCase() === \"input\" && \"text\" === type && ( attr === type || attr === null );\n\t\t},\n\n\t\tradio: function( elem ) {\n\t\t\treturn elem.nodeName.toLowerCase() === \"input\" && \"radio\" === elem.type;\n\t\t},\n\n\t\tcheckbox: function( elem ) {\n\t\t\treturn elem.nodeName.toLowerCase() === \"input\" && \"checkbox\" === elem.type;\n\t\t},\n\n\t\tfile: function( elem ) {\n\t\t\treturn elem.nodeName.toLowerCase() === \"input\" && \"file\" === elem.type;\n\t\t},\n\n\t\tpassword: function( elem ) {\n\t\t\treturn elem.nodeName.toLowerCase() === \"input\" && \"password\" === elem.type;\n\t\t},\n\n\t\tsubmit: function( elem ) {\n\t\t\tvar name = elem.nodeName.toLowerCase();\n\t\t\treturn (name === \"input\" || name === \"button\") && \"submit\" === elem.type;\n\t\t},\n\n\t\timage: function( elem ) {\n\t\t\treturn elem.nodeName.toLowerCase() === \"input\" && \"image\" === elem.type;\n\t\t},\n\n\t\treset: function( elem ) {\n\t\t\tvar name = elem.nodeName.toLowerCase();\n\t\t\treturn (name === \"input\" || name === \"button\") && \"reset\" === elem.type;\n\t\t},\n\n\t\tbutton: function( elem ) {\n\t\t\tvar name = elem.nodeName.toLowerCase();\n\t\t\treturn name === \"input\" && \"button\" === elem.type || name === \"button\";\n\t\t},\n\n\t\tinput: function( elem ) {\n\t\t\treturn (/input|select|textarea|button/i).test( elem.nodeName );\n\t\t},\n\n\t\tfocus: function( elem ) {\n\t\t\treturn elem === elem.ownerDocument.activeElement;\n\t\t}\n\t},\n\tsetFilters: {\n\t\tfirst: function( elem, i ) {\n\t\t\treturn i === 0;\n\t\t},\n\n\t\tlast: function( elem, i, match, array ) {\n\t\t\treturn i === array.length - 1;\n\t\t},\n\n\t\teven: function( elem, i ) {\n\t\t\treturn i % 2 === 0;\n\t\t},\n\n\t\todd: function( elem, i ) {\n\t\t\treturn i % 2 === 1;\n\t\t},\n\n\t\tlt: function( elem, i, match ) {\n\t\t\treturn i < match[3] - 0;\n\t\t},\n\n\t\tgt: function( elem, i, match ) {\n\t\t\treturn i > match[3] - 0;\n\t\t},\n\n\t\tnth: function( elem, i, match ) {\n\t\t\treturn match[3] - 0 === i;\n\t\t},\n\n\t\teq: function( elem, i, match ) {\n\t\t\treturn match[3] - 0 === i;\n\t\t}\n\t},\n\tfilter: {\n\t\tPSEUDO: function( elem, match, i, array ) {\n\t\t\tvar name = match[1],\n\t\t\t\tfilter = Expr.filters[ name ];\n\n\t\t\tif ( filter ) {\n\t\t\t\treturn filter( elem, i, match, array );\n\n\t\t\t} else if ( name === \"contains\" ) {\n\t\t\t\treturn (elem.textContent || elem.innerText || getText([ elem ]) || \"\").indexOf(match[3]) >= 0;\n\n\t\t\t} else if ( name === \"not\" ) {\n\t\t\t\tvar not = match[3];\n\n\t\t\t\tfor ( var j = 0, l = not.length; j < l; j++ ) {\n\t\t\t\t\tif ( not[j] === elem ) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\n\t\t\t} else {\n\t\t\t\tSizzle.error( name );\n\t\t\t}\n\t\t},\n\n\t\tCHILD: function( elem, match ) {\n\t\t\tvar first, last,\n\t\t\t\tdoneName, parent, cache,\n\t\t\t\tcount, diff,\n\t\t\t\ttype = match[1],\n\t\t\t\tnode = elem;\n\n\t\t\tswitch ( type ) {\n\t\t\t\tcase \"only\":\n\t\t\t\tcase \"first\":\n\t\t\t\t\twhile ( (node = node.previousSibling) )\t {\n\t\t\t\t\t\tif ( node.nodeType === 1 ) { \n\t\t\t\t\t\t\treturn false; \n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( type === \"first\" ) { \n\t\t\t\t\t\treturn true; \n\t\t\t\t\t}\n\n\t\t\t\t\tnode = elem;\n\n\t\t\t\tcase \"last\":\n\t\t\t\t\twhile ( (node = node.nextSibling) )\t {\n\t\t\t\t\t\tif ( node.nodeType === 1 ) { \n\t\t\t\t\t\t\treturn false; \n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\treturn true;\n\n\t\t\t\tcase \"nth\":\n\t\t\t\t\tfirst = match[2];\n\t\t\t\t\tlast = match[3];\n\n\t\t\t\t\tif ( first === 1 && last === 0 ) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tdoneName = match[0];\n\t\t\t\t\tparent = elem.parentNode;\n\t\n\t\t\t\t\tif ( parent && (parent[ expando ] !== doneName || !elem.nodeIndex) ) {\n\t\t\t\t\t\tcount = 0;\n\t\t\t\t\t\t\n\t\t\t\t\t\tfor ( node = parent.firstChild; node; node = node.nextSibling ) {\n\t\t\t\t\t\t\tif ( node.nodeType === 1 ) {\n\t\t\t\t\t\t\t\tnode.nodeIndex = ++count;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} \n\n\t\t\t\t\t\tparent[ expando ] = doneName;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tdiff = elem.nodeIndex - last;\n\n\t\t\t\t\tif ( first === 0 ) {\n\t\t\t\t\t\treturn diff === 0;\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn ( diff % first === 0 && diff / first >= 0 );\n\t\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\tID: function( elem, match ) {\n\t\t\treturn elem.nodeType === 1 && elem.getAttribute(\"id\") === match;\n\t\t},\n\n\t\tTAG: function( elem, match ) {\n\t\t\treturn (match === \"*\" && elem.nodeType === 1) || !!elem.nodeName && elem.nodeName.toLowerCase() === match;\n\t\t},\n\t\t\n\t\tCLASS: function( elem, match ) {\n\t\t\treturn (\" \" + (elem.className || elem.getAttribute(\"class\")) + \" \")\n\t\t\t\t.indexOf( match ) > -1;\n\t\t},\n\n\t\tATTR: function( elem, match ) {\n\t\t\tvar name = match[1],\n\t\t\t\tresult = Sizzle.attr ?\n\t\t\t\t\tSizzle.attr( elem, name ) :\n\t\t\t\t\tExpr.attrHandle[ name ] ?\n\t\t\t\t\tExpr.attrHandle[ name ]( elem ) :\n\t\t\t\t\telem[ name ] != null ?\n\t\t\t\t\t\telem[ name ] :\n\t\t\t\t\t\telem.getAttribute( name ),\n\t\t\t\tvalue = result + \"\",\n\t\t\t\ttype = match[2],\n\t\t\t\tcheck = match[4];\n\n\t\t\treturn result == null ?\n\t\t\t\ttype === \"!=\" :\n\t\t\t\t!type && Sizzle.attr ?\n\t\t\t\tresult != null :\n\t\t\t\ttype === \"=\" ?\n\t\t\t\tvalue === check :\n\t\t\t\ttype === \"*=\" ?\n\t\t\t\tvalue.indexOf(check) >= 0 :\n\t\t\t\ttype === \"~=\" ?\n\t\t\t\t(\" \" + value + \" \").indexOf(check) >= 0 :\n\t\t\t\t!check ?\n\t\t\t\tvalue && result !== false :\n\t\t\t\ttype === \"!=\" ?\n\t\t\t\tvalue !== check :\n\t\t\t\ttype === \"^=\" ?\n\t\t\t\tvalue.indexOf(check) === 0 :\n\t\t\t\ttype === \"$=\" ?\n\t\t\t\tvalue.substr(value.length - check.length) === check :\n\t\t\t\ttype === \"|=\" ?\n\t\t\t\tvalue === check || value.substr(0, check.length + 1) === check + \"-\" :\n\t\t\t\tfalse;\n\t\t},\n\n\t\tPOS: function( elem, match, i, array ) {\n\t\t\tvar name = match[2],\n\t\t\t\tfilter = Expr.setFilters[ name ];\n\n\t\t\tif ( filter ) {\n\t\t\t\treturn filter( elem, i, match, array );\n\t\t\t}\n\t\t}\n\t}\n};\n\nvar origPOS = Expr.match.POS,\n\tfescape = function(all, num){\n\t\treturn \"\\\\\" + (num - 0 + 1);\n\t};\n\nfor ( var type in Expr.match ) {\n\tExpr.match[ type ] = new RegExp( Expr.match[ type ].source + (/(?![^\\[]*\\])(?![^\\(]*\\))/.source) );\n\tExpr.leftMatch[ type ] = new RegExp( /(^(?:.|\\r|\\n)*?)/.source + Expr.match[ type ].source.replace(/\\\\(\\d+)/g, fescape) );\n}\n\nvar makeArray = function( array, results ) {\n\tarray = Array.prototype.slice.call( array, 0 );\n\n\tif ( results ) {\n\t\tresults.push.apply( results, array );\n\t\treturn results;\n\t}\n\t\n\treturn array;\n};\n\n// Perform a simple check to determine if the browser is capable of\n// converting a NodeList to an array using builtin methods.\n// Also verifies that the returned array holds DOM nodes\n// (which is not the case in the Blackberry browser)\ntry {\n\tArray.prototype.slice.call( document.documentElement.childNodes, 0 )[0].nodeType;\n\n// Provide a fallback method if it does not work\n} catch( e ) {\n\tmakeArray = function( array, results ) {\n\t\tvar i = 0,\n\t\t\tret = results || [];\n\n\t\tif ( toString.call(array) === \"[object Array]\" ) {\n\t\t\tArray.prototype.push.apply( ret, array );\n\n\t\t} else {\n\t\t\tif ( typeof array.length === \"number\" ) {\n\t\t\t\tfor ( var l = array.length; i < l; i++ ) {\n\t\t\t\t\tret.push( array[i] );\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\tfor ( ; array[i]; i++ ) {\n\t\t\t\t\tret.push( array[i] );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn ret;\n\t};\n}\n\nvar sortOrder, siblingCheck;\n\nif ( document.documentElement.compareDocumentPosition ) {\n\tsortOrder = function( a, b ) {\n\t\tif ( a === b ) {\n\t\t\thasDuplicate = true;\n\t\t\treturn 0;\n\t\t}\n\n\t\tif ( !a.compareDocumentPosition || !b.compareDocumentPosition ) {\n\t\t\treturn a.compareDocumentPosition ? -1 : 1;\n\t\t}\n\n\t\treturn a.compareDocumentPosition(b) & 4 ? -1 : 1;\n\t};\n\n} else {\n\tsortOrder = function( a, b ) {\n\t\t// The nodes are identical, we can exit early\n\t\tif ( a === b ) {\n\t\t\thasDuplicate = true;\n\t\t\treturn 0;\n\n\t\t// Fallback to using sourceIndex (in IE) if it's available on both nodes\n\t\t} else if ( a.sourceIndex && b.sourceIndex ) {\n\t\t\treturn a.sourceIndex - b.sourceIndex;\n\t\t}\n\n\t\tvar al, bl,\n\t\t\tap = [],\n\t\t\tbp = [],\n\t\t\taup = a.parentNode,\n\t\t\tbup = b.parentNode,\n\t\t\tcur = aup;\n\n\t\t// If the nodes are siblings (or identical) we can do a quick check\n\t\tif ( aup === bup ) {\n\t\t\treturn siblingCheck( a, b );\n\n\t\t// If no parents were found then the nodes are disconnected\n\t\t} else if ( !aup ) {\n\t\t\treturn -1;\n\n\t\t} else if ( !bup ) {\n\t\t\treturn 1;\n\t\t}\n\n\t\t// Otherwise they're somewhere else in the tree so we need\n\t\t// to build up a full list of the parentNodes for comparison\n\t\twhile ( cur ) {\n\t\t\tap.unshift( cur );\n\t\t\tcur = cur.parentNode;\n\t\t}\n\n\t\tcur = bup;\n\n\t\twhile ( cur ) {\n\t\t\tbp.unshift( cur );\n\t\t\tcur = cur.parentNode;\n\t\t}\n\n\t\tal = ap.length;\n\t\tbl = bp.length;\n\n\t\t// Start walking down the tree looking for a discrepancy\n\t\tfor ( var i = 0; i < al && i < bl; i++ ) {\n\t\t\tif ( ap[i] !== bp[i] ) {\n\t\t\t\treturn siblingCheck( ap[i], bp[i] );\n\t\t\t}\n\t\t}\n\n\t\t// We ended someplace up the tree so do a sibling check\n\t\treturn i === al ?\n\t\t\tsiblingCheck( a, bp[i], -1 ) :\n\t\t\tsiblingCheck( ap[i], b, 1 );\n\t};\n\n\tsiblingCheck = function( a, b, ret ) {\n\t\tif ( a === b ) {\n\t\t\treturn ret;\n\t\t}\n\n\t\tvar cur = a.nextSibling;\n\n\t\twhile ( cur ) {\n\t\t\tif ( cur === b ) {\n\t\t\t\treturn -1;\n\t\t\t}\n\n\t\t\tcur = cur.nextSibling;\n\t\t}\n\n\t\treturn 1;\n\t};\n}\n\n// Check to see if the browser returns elements by name when\n// querying by getElementById (and provide a workaround)\n(function(){\n\t// We're going to inject a fake input element with a specified name\n\tvar form = document.createElement(\"div\"),\n\t\tid = \"script\" + (new Date()).getTime(),\n\t\troot = document.documentElement;\n\n\tform.innerHTML = \"<a name='\" + id + \"'/>\";\n\n\t// Inject it into the root element, check its status, and remove it quickly\n\troot.insertBefore( form, root.firstChild );\n\n\t// The workaround has to do additional checks after a getElementById\n\t// Which slows things down for other browsers (hence the branching)\n\tif ( document.getElementById( id ) ) {\n\t\tExpr.find.ID = function( match, context, isXML ) {\n\t\t\tif ( typeof context.getElementById !== \"undefined\" && !isXML ) {\n\t\t\t\tvar m = context.getElementById(match[1]);\n\n\t\t\t\treturn m ?\n\t\t\t\t\tm.id === match[1] || typeof m.getAttributeNode !== \"undefined\" && m.getAttributeNode(\"id\").nodeValue === match[1] ?\n\t\t\t\t\t\t[m] :\n\t\t\t\t\t\tundefined :\n\t\t\t\t\t[];\n\t\t\t}\n\t\t};\n\n\t\tExpr.filter.ID = function( elem, match ) {\n\t\t\tvar node = typeof elem.getAttributeNode !== \"undefined\" && elem.getAttributeNode(\"id\");\n\n\t\t\treturn elem.nodeType === 1 && node && node.nodeValue === match;\n\t\t};\n\t}\n\n\troot.removeChild( form );\n\n\t// release memory in IE\n\troot = form = null;\n})();\n\n(function(){\n\t// Check to see if the browser returns only elements\n\t// when doing getElementsByTagName(\"*\")\n\n\t// Create a fake element\n\tvar div = document.createElement(\"div\");\n\tdiv.appendChild( document.createComment(\"\") );\n\n\t// Make sure no comments are found\n\tif ( div.getElementsByTagName(\"*\").length > 0 ) {\n\t\tExpr.find.TAG = function( match, context ) {\n\t\t\tvar results = context.getElementsByTagName( match[1] );\n\n\t\t\t// Filter out possible comments\n\t\t\tif ( match[1] === \"*\" ) {\n\t\t\t\tvar tmp = [];\n\n\t\t\t\tfor ( var i = 0; results[i]; i++ ) {\n\t\t\t\t\tif ( results[i].nodeType === 1 ) {\n\t\t\t\t\t\ttmp.push( results[i] );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tresults = tmp;\n\t\t\t}\n\n\t\t\treturn results;\n\t\t};\n\t}\n\n\t// Check to see if an attribute returns normalized href attributes\n\tdiv.innerHTML = \"<a href='#'></a>\";\n\n\tif ( div.firstChild && typeof div.firstChild.getAttribute !== \"undefined\" &&\n\t\t\tdiv.firstChild.getAttribute(\"href\") !== \"#\" ) {\n\n\t\tExpr.attrHandle.href = function( elem ) {\n\t\t\treturn elem.getAttribute( \"href\", 2 );\n\t\t};\n\t}\n\n\t// release memory in IE\n\tdiv = null;\n})();\n\nif ( document.querySelectorAll ) {\n\t(function(){\n\t\tvar oldSizzle = Sizzle,\n\t\t\tdiv = document.createElement(\"div\"),\n\t\t\tid = \"__sizzle__\";\n\n\t\tdiv.innerHTML = \"<p class='TEST'></p>\";\n\n\t\t// Safari can't handle uppercase or unicode characters when\n\t\t// in quirks mode.\n\t\tif ( div.querySelectorAll && div.querySelectorAll(\".TEST\").length === 0 ) {\n\t\t\treturn;\n\t\t}\n\t\n\t\tSizzle = function( query, context, extra, seed ) {\n\t\t\tcontext = context || document;\n\n\t\t\t// Only use querySelectorAll on non-XML documents\n\t\t\t// (ID selectors don't work in non-HTML documents)\n\t\t\tif ( !seed && !Sizzle.isXML(context) ) {\n\t\t\t\t// See if we find a selector to speed up\n\t\t\t\tvar match = /^(\\w+$)|^\\.([\\w\\-]+$)|^#([\\w\\-]+$)/.exec( query );\n\t\t\t\t\n\t\t\t\tif ( match && (context.nodeType === 1 || context.nodeType === 9) ) {\n\t\t\t\t\t// Speed-up: Sizzle(\"TAG\")\n\t\t\t\t\tif ( match[1] ) {\n\t\t\t\t\t\treturn makeArray( context.getElementsByTagName( query ), extra );\n\t\t\t\t\t\n\t\t\t\t\t// Speed-up: Sizzle(\".CLASS\")\n\t\t\t\t\t} else if ( match[2] && Expr.find.CLASS && context.getElementsByClassName ) {\n\t\t\t\t\t\treturn makeArray( context.getElementsByClassName( match[2] ), extra );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ( context.nodeType === 9 ) {\n\t\t\t\t\t// Speed-up: Sizzle(\"body\")\n\t\t\t\t\t// The body element only exists once, optimize finding it\n\t\t\t\t\tif ( query === \"body\" && context.body ) {\n\t\t\t\t\t\treturn makeArray( [ context.body ], extra );\n\t\t\t\t\t\t\n\t\t\t\t\t// Speed-up: Sizzle(\"#ID\")\n\t\t\t\t\t} else if ( match && match[3] ) {\n\t\t\t\t\t\tvar elem = context.getElementById( match[3] );\n\n\t\t\t\t\t\t// Check parentNode to catch when Blackberry 4.6 returns\n\t\t\t\t\t\t// nodes that are no longer in the document #6963\n\t\t\t\t\t\tif ( elem && elem.parentNode ) {\n\t\t\t\t\t\t\t// Handle the case where IE and Opera return items\n\t\t\t\t\t\t\t// by name instead of ID\n\t\t\t\t\t\t\tif ( elem.id === match[3] ) {\n\t\t\t\t\t\t\t\treturn makeArray( [ elem ], extra );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn makeArray( [], extra );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\ttry {\n\t\t\t\t\t\treturn makeArray( context.querySelectorAll(query), extra );\n\t\t\t\t\t} catch(qsaError) {}\n\n\t\t\t\t// qSA works strangely on Element-rooted queries\n\t\t\t\t// We can work around this by specifying an extra ID on the root\n\t\t\t\t// and working up from there (Thanks to Andrew Dupont for the technique)\n\t\t\t\t// IE 8 doesn't work on object elements\n\t\t\t\t} else if ( context.nodeType === 1 && context.nodeName.toLowerCase() !== \"object\" ) {\n\t\t\t\t\tvar oldContext = context,\n\t\t\t\t\t\told = context.getAttribute( \"id\" ),\n\t\t\t\t\t\tnid = old || id,\n\t\t\t\t\t\thasParent = context.parentNode,\n\t\t\t\t\t\trelativeHierarchySelector = /^\\s*[+~]/.test( query );\n\n\t\t\t\t\tif ( !old ) {\n\t\t\t\t\t\tcontext.setAttribute( \"id\", nid );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tnid = nid.replace( /'/g, \"\\\\$&\" );\n\t\t\t\t\t}\n\t\t\t\t\tif ( relativeHierarchySelector && hasParent ) {\n\t\t\t\t\t\tcontext = context.parentNode;\n\t\t\t\t\t}\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif ( !relativeHierarchySelector || hasParent ) {\n\t\t\t\t\t\t\treturn makeArray( context.querySelectorAll( \"[id='\" + nid + \"'] \" + query ), extra );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} catch(pseudoError) {\n\t\t\t\t\t} finally {\n\t\t\t\t\t\tif ( !old ) {\n\t\t\t\t\t\t\toldContext.removeAttribute( \"id\" );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t\treturn oldSizzle(query, context, extra, seed);\n\t\t};\n\n\t\tfor ( var prop in oldSizzle ) {\n\t\t\tSizzle[ prop ] = oldSizzle[ prop ];\n\t\t}\n\n\t\t// release memory in IE\n\t\tdiv = null;\n\t})();\n}\n\n(function(){\n\tvar html = document.documentElement,\n\t\tmatches = html.matchesSelector || html.mozMatchesSelector || html.webkitMatchesSelector || html.msMatchesSelector;\n\n\tif ( matches ) {\n\t\t// Check to see if it's possible to do matchesSelector\n\t\t// on a disconnected node (IE 9 fails this)\n\t\tvar disconnectedMatch = !matches.call( document.createElement( \"div\" ), \"div\" ),\n\t\t\tpseudoWorks = false;\n\n\t\ttry {\n\t\t\t// This should fail with an exception\n\t\t\t// Gecko does not error, returns false instead\n\t\t\tmatches.call( document.documentElement, \"[test!='']:sizzle\" );\n\t\n\t\t} catch( pseudoError ) {\n\t\t\tpseudoWorks = true;\n\t\t}\n\n\t\tSizzle.matchesSelector = function( node, expr ) {\n\t\t\t// Make sure that attribute selectors are quoted\n\t\t\texpr = expr.replace(/\\=\\s*([^'\"\\]]*)\\s*\\]/g, \"='$1']\");\n\n\t\t\tif ( !Sizzle.isXML( node ) ) {\n\t\t\t\ttry { \n\t\t\t\t\tif ( pseudoWorks || !Expr.match.PSEUDO.test( expr ) && !/!=/.test( expr ) ) {\n\t\t\t\t\t\tvar ret = matches.call( node, expr );\n\n\t\t\t\t\t\t// IE 9's matchesSelector returns false on disconnected nodes\n\t\t\t\t\t\tif ( ret || !disconnectedMatch ||\n\t\t\t\t\t\t\t\t// As well, disconnected nodes are said to be in a document\n\t\t\t\t\t\t\t\t// fragment in IE 9, so check for that\n\t\t\t\t\t\t\t\tnode.document && node.document.nodeType !== 11 ) {\n\t\t\t\t\t\t\treturn ret;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} catch(e) {}\n\t\t\t}\n\n\t\t\treturn Sizzle(expr, null, null, [node]).length > 0;\n\t\t};\n\t}\n})();\n\n(function(){\n\tvar div = document.createElement(\"div\");\n\n\tdiv.innerHTML = \"<div class='test e'></div><div class='test'></div>\";\n\n\t// Opera can't find a second classname (in 9.6)\n\t// Also, make sure that getElementsByClassName actually exists\n\tif ( !div.getElementsByClassName || div.getElementsByClassName(\"e\").length === 0 ) {\n\t\treturn;\n\t}\n\n\t// Safari caches class attributes, doesn't catch changes (in 3.2)\n\tdiv.lastChild.className = \"e\";\n\n\tif ( div.getElementsByClassName(\"e\").length === 1 ) {\n\t\treturn;\n\t}\n\t\n\tExpr.order.splice(1, 0, \"CLASS\");\n\tExpr.find.CLASS = function( match, context, isXML ) {\n\t\tif ( typeof context.getElementsByClassName !== \"undefined\" && !isXML ) {\n\t\t\treturn context.getElementsByClassName(match[1]);\n\t\t}\n\t};\n\n\t// release memory in IE\n\tdiv = null;\n})();\n\nfunction dirNodeCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {\n\tfor ( var i = 0, l = checkSet.length; i < l; i++ ) {\n\t\tvar elem = checkSet[i];\n\n\t\tif ( elem ) {\n\t\t\tvar match = false;\n\n\t\t\telem = elem[dir];\n\n\t\t\twhile ( elem ) {\n\t\t\t\tif ( elem[ expando ] === doneName ) {\n\t\t\t\t\tmatch = checkSet[elem.sizset];\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tif ( elem.nodeType === 1 && !isXML ){\n\t\t\t\t\telem[ expando ] = doneName;\n\t\t\t\t\telem.sizset = i;\n\t\t\t\t}\n\n\t\t\t\tif ( elem.nodeName.toLowerCase() === cur ) {\n\t\t\t\t\tmatch = elem;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\telem = elem[dir];\n\t\t\t}\n\n\t\t\tcheckSet[i] = match;\n\t\t}\n\t}\n}\n\nfunction dirCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {\n\tfor ( var i = 0, l = checkSet.length; i < l; i++ ) {\n\t\tvar elem = checkSet[i];\n\n\t\tif ( elem ) {\n\t\t\tvar match = false;\n\t\t\t\n\t\t\telem = elem[dir];\n\n\t\t\twhile ( elem ) {\n\t\t\t\tif ( elem[ expando ] === doneName ) {\n\t\t\t\t\tmatch = checkSet[elem.sizset];\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tif ( elem.nodeType === 1 ) {\n\t\t\t\t\tif ( !isXML ) {\n\t\t\t\t\t\telem[ expando ] = doneName;\n\t\t\t\t\t\telem.sizset = i;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( typeof cur !== \"string\" ) {\n\t\t\t\t\t\tif ( elem === cur ) {\n\t\t\t\t\t\t\tmatch = true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} else if ( Sizzle.filter( cur, [elem] ).length > 0 ) {\n\t\t\t\t\t\tmatch = elem;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\telem = elem[dir];\n\t\t\t}\n\n\t\t\tcheckSet[i] = match;\n\t\t}\n\t}\n}\n\nif ( document.documentElement.contains ) {\n\tSizzle.contains = function( a, b ) {\n\t\treturn a !== b && (a.contains ? a.contains(b) : true);\n\t};\n\n} else if ( document.documentElement.compareDocumentPosition ) {\n\tSizzle.contains = function( a, b ) {\n\t\treturn !!(a.compareDocumentPosition(b) & 16);\n\t};\n\n} else {\n\tSizzle.contains = function() {\n\t\treturn false;\n\t};\n}\n\nSizzle.isXML = function( elem ) {\n\t// documentElement is verified for cases where it doesn't yet exist\n\t// (such as loading iframes in IE - #4833) \n\tvar documentElement = (elem ? elem.ownerDocument || elem : 0).documentElement;\n\n\treturn documentElement ? documentElement.nodeName !== \"HTML\" : false;\n};\n\nvar posProcess = function( selector, context, seed ) {\n\tvar match,\n\t\ttmpSet = [],\n\t\tlater = \"\",\n\t\troot = context.nodeType ? [context] : context;\n\n\t// Position selectors must be done after the filter\n\t// And so must :not(positional) so we move all PSEUDOs to the end\n\twhile ( (match = Expr.match.PSEUDO.exec( selector )) ) {\n\t\tlater += match[0];\n\t\tselector = selector.replace( Expr.match.PSEUDO, \"\" );\n\t}\n\n\tselector = Expr.relative[selector] ? selector + \"*\" : selector;\n\n\tfor ( var i = 0, l = root.length; i < l; i++ ) {\n\t\tSizzle( selector, root[i], tmpSet, seed );\n\t}\n\n\treturn Sizzle.filter( later, tmpSet );\n};\n\n// EXPOSE\n// Override sizzle attribute retrieval\nSizzle.attr = jQuery.attr;\nSizzle.selectors.attrMap = {};\njQuery.find = Sizzle;\njQuery.expr = Sizzle.selectors;\njQuery.expr[\":\"] = jQuery.expr.filters;\njQuery.unique = Sizzle.uniqueSort;\njQuery.text = Sizzle.getText;\njQuery.isXMLDoc = Sizzle.isXML;\njQuery.contains = Sizzle.contains;\n\n\n})();\n\n\nvar runtil = /Until$/,\n\trparentsprev = /^(?:parents|prevUntil|prevAll)/,\n\t// Note: This RegExp should be improved, or likely pulled from Sizzle\n\trmultiselector = /,/,\n\tisSimple = /^.[^:#\\[\\.,]*$/,\n\tslice = Array.prototype.slice,\n\tPOS = jQuery.expr.match.POS,\n\t// methods guaranteed to produce a unique set when starting from a unique set\n\tguaranteedUnique = {\n\t\tchildren: true,\n\t\tcontents: true,\n\t\tnext: true,\n\t\tprev: true\n\t};\n\njQuery.fn.extend({\n\tfind: function( selector ) {\n\t\tvar self = this,\n\t\t\ti, l;\n\n\t\tif ( typeof selector !== \"string\" ) {\n\t\t\treturn jQuery( selector ).filter(function() {\n\t\t\t\tfor ( i = 0, l = self.length; i < l; i++ ) {\n\t\t\t\t\tif ( jQuery.contains( self[ i ], this ) ) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\tvar ret = this.pushStack( \"\", \"find\", selector ),\n\t\t\tlength, n, r;\n\n\t\tfor ( i = 0, l = this.length; i < l; i++ ) {\n\t\t\tlength = ret.length;\n\t\t\tjQuery.find( selector, this[i], ret );\n\n\t\t\tif ( i > 0 ) {\n\t\t\t\t// Make sure that the results are unique\n\t\t\t\tfor ( n = length; n < ret.length; n++ ) {\n\t\t\t\t\tfor ( r = 0; r < length; r++ ) {\n\t\t\t\t\t\tif ( ret[r] === ret[n] ) {\n\t\t\t\t\t\t\tret.splice(n--, 1);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn ret;\n\t},\n\n\thas: function( target ) {\n\t\tvar targets = jQuery( target );\n\t\treturn this.filter(function() {\n\t\t\tfor ( var i = 0, l = targets.length; i < l; i++ ) {\n\t\t\t\tif ( jQuery.contains( this, targets[i] ) ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t},\n\n\tnot: function( selector ) {\n\t\treturn this.pushStack( winnow(this, selector, false), \"not\", selector);\n\t},\n\n\tfilter: function( selector ) {\n\t\treturn this.pushStack( winnow(this, selector, true), \"filter\", selector );\n\t},\n\n\tis: function( selector ) {\n\t\treturn !!selector && ( \n\t\t\ttypeof selector === \"string\" ?\n\t\t\t\t// If this is a positional selector, check membership in the returned set\n\t\t\t\t// so $(\"p:first\").is(\"p:last\") won't return true for a doc with two \"p\".\n\t\t\t\tPOS.test( selector ) ? \n\t\t\t\t\tjQuery( selector, this.context ).index( this[0] ) >= 0 :\n\t\t\t\t\tjQuery.filter( selector, this ).length > 0 :\n\t\t\t\tthis.filter( selector ).length > 0 );\n\t},\n\n\tclosest: function( selectors, context ) {\n\t\tvar ret = [], i, l, cur = this[0];\n\t\t\n\t\t// Array (deprecated as of jQuery 1.7)\n\t\tif ( jQuery.isArray( selectors ) ) {\n\t\t\tvar level = 1;\n\n\t\t\twhile ( cur && cur.ownerDocument && cur !== context ) {\n\t\t\t\tfor ( i = 0; i < selectors.length; i++ ) {\n\n\t\t\t\t\tif ( jQuery( cur ).is( selectors[ i ] ) ) {\n\t\t\t\t\t\tret.push({ selector: selectors[ i ], elem: cur, level: level });\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tcur = cur.parentNode;\n\t\t\t\tlevel++;\n\t\t\t}\n\n\t\t\treturn ret;\n\t\t}\n\n\t\t// String\n\t\tvar pos = POS.test( selectors ) || typeof selectors !== \"string\" ?\n\t\t\t\tjQuery( selectors, context || this.context ) :\n\t\t\t\t0;\n\n\t\tfor ( i = 0, l = this.length; i < l; i++ ) {\n\t\t\tcur = this[i];\n\n\t\t\twhile ( cur ) {\n\t\t\t\tif ( pos ? pos.index(cur) > -1 : jQuery.find.matchesSelector(cur, selectors) ) {\n\t\t\t\t\tret.push( cur );\n\t\t\t\t\tbreak;\n\n\t\t\t\t} else {\n\t\t\t\t\tcur = cur.parentNode;\n\t\t\t\t\tif ( !cur || !cur.ownerDocument || cur === context || cur.nodeType === 11 ) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tret = ret.length > 1 ? jQuery.unique( ret ) : ret;\n\n\t\treturn this.pushStack( ret, \"closest\", selectors );\n\t},\n\n\t// Determine the position of an element within\n\t// the matched set of elements\n\tindex: function( elem ) {\n\n\t\t// No argument, return index in parent\n\t\tif ( !elem ) {\n\t\t\treturn ( this[0] && this[0].parentNode ) ? this.prevAll().length : -1;\n\t\t}\n\n\t\t// index in selector\n\t\tif ( typeof elem === \"string\" ) {\n\t\t\treturn jQuery.inArray( this[0], jQuery( elem ) );\n\t\t}\n\n\t\t// Locate the position of the desired element\n\t\treturn jQuery.inArray(\n\t\t\t// If it receives a jQuery object, the first element is used\n\t\t\telem.jquery ? elem[0] : elem, this );\n\t},\n\n\tadd: function( selector, context ) {\n\t\tvar set = typeof selector === \"string\" ?\n\t\t\t\tjQuery( selector, context ) :\n\t\t\t\tjQuery.makeArray( selector && selector.nodeType ? [ selector ] : selector ),\n\t\t\tall = jQuery.merge( this.get(), set );\n\n\t\treturn this.pushStack( isDisconnected( set[0] ) || isDisconnected( all[0] ) ?\n\t\t\tall :\n\t\t\tjQuery.unique( all ) );\n\t},\n\n\tandSelf: function() {\n\t\treturn this.add( this.prevObject );\n\t}\n});\n\n// A painfully simple check to see if an element is disconnected\n// from a document (should be improved, where feasible).\nfunction isDisconnected( node ) {\n\treturn !node || !node.parentNode || node.parentNode.nodeType === 11;\n}\n\njQuery.each({\n\tparent: function( elem ) {\n\t\tvar parent = elem.parentNode;\n\t\treturn parent && parent.nodeType !== 11 ? parent : null;\n\t},\n\tparents: function( elem ) {\n\t\treturn jQuery.dir( elem, \"parentNode\" );\n\t},\n\tparentsUntil: function( elem, i, until ) {\n\t\treturn jQuery.dir( elem, \"parentNode\", until );\n\t},\n\tnext: function( elem ) {\n\t\treturn jQuery.nth( elem, 2, \"nextSibling\" );\n\t},\n\tprev: function( elem ) {\n\t\treturn jQuery.nth( elem, 2, \"previousSibling\" );\n\t},\n\tnextAll: function( elem ) {\n\t\treturn jQuery.dir( elem, \"nextSibling\" );\n\t},\n\tprevAll: function( elem ) {\n\t\treturn jQuery.dir( elem, \"previousSibling\" );\n\t},\n\tnextUntil: function( elem, i, until ) {\n\t\treturn jQuery.dir( elem, \"nextSibling\", until );\n\t},\n\tprevUntil: function( elem, i, until ) {\n\t\treturn jQuery.dir( elem, \"previousSibling\", until );\n\t},\n\tsiblings: function( elem ) {\n\t\treturn jQuery.sibling( elem.parentNode.firstChild, elem );\n\t},\n\tchildren: function( elem ) {\n\t\treturn jQuery.sibling( elem.firstChild );\n\t},\n\tcontents: function( elem ) {\n\t\treturn jQuery.nodeName( elem, \"iframe\" ) ?\n\t\t\telem.contentDocument || elem.contentWindow.document :\n\t\t\tjQuery.makeArray( elem.childNodes );\n\t}\n}, function( name, fn ) {\n\tjQuery.fn[ name ] = function( until, selector ) {\n\t\tvar ret = jQuery.map( this, fn, until );\n\n\t\tif ( !runtil.test( name ) ) {\n\t\t\tselector = until;\n\t\t}\n\n\t\tif ( selector && typeof selector === \"string\" ) {\n\t\t\tret = jQuery.filter( selector, ret );\n\t\t}\n\n\t\tret = this.length > 1 && !guaranteedUnique[ name ] ? jQuery.unique( ret ) : ret;\n\n\t\tif ( (this.length > 1 || rmultiselector.test( selector )) && rparentsprev.test( name ) ) {\n\t\t\tret = ret.reverse();\n\t\t}\n\n\t\treturn this.pushStack( ret, name, slice.call( arguments ).join(\",\") );\n\t};\n});\n\njQuery.extend({\n\tfilter: function( expr, elems, not ) {\n\t\tif ( not ) {\n\t\t\texpr = \":not(\" + expr + \")\";\n\t\t}\n\n\t\treturn elems.length === 1 ?\n\t\t\tjQuery.find.matchesSelector(elems[0], expr) ? [ elems[0] ] : [] :\n\t\t\tjQuery.find.matches(expr, elems);\n\t},\n\n\tdir: function( elem, dir, until ) {\n\t\tvar matched = [],\n\t\t\tcur = elem[ dir ];\n\n\t\twhile ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) {\n\t\t\tif ( cur.nodeType === 1 ) {\n\t\t\t\tmatched.push( cur );\n\t\t\t}\n\t\t\tcur = cur[dir];\n\t\t}\n\t\treturn matched;\n\t},\n\n\tnth: function( cur, result, dir, elem ) {\n\t\tresult = result || 1;\n\t\tvar num = 0;\n\n\t\tfor ( ; cur; cur = cur[dir] ) {\n\t\t\tif ( cur.nodeType === 1 && ++num === result ) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\treturn cur;\n\t},\n\n\tsibling: function( n, elem ) {\n\t\tvar r = [];\n\n\t\tfor ( ; n; n = n.nextSibling ) {\n\t\t\tif ( n.nodeType === 1 && n !== elem ) {\n\t\t\t\tr.push( n );\n\t\t\t}\n\t\t}\n\n\t\treturn r;\n\t}\n});\n\n// Implement the identical functionality for filter and not\nfunction winnow( elements, qualifier, keep ) {\n\n\t// Can't pass null or undefined to indexOf in Firefox 4\n\t// Set to 0 to skip string check\n\tqualifier = qualifier || 0;\n\n\tif ( jQuery.isFunction( qualifier ) ) {\n\t\treturn jQuery.grep(elements, function( elem, i ) {\n\t\t\tvar retVal = !!qualifier.call( elem, i, elem );\n\t\t\treturn retVal === keep;\n\t\t});\n\n\t} else if ( qualifier.nodeType ) {\n\t\treturn jQuery.grep(elements, function( elem, i ) {\n\t\t\treturn ( elem === qualifier ) === keep;\n\t\t});\n\n\t} else if ( typeof qualifier === \"string\" ) {\n\t\tvar filtered = jQuery.grep(elements, function( elem ) {\n\t\t\treturn elem.nodeType === 1;\n\t\t});\n\n\t\tif ( isSimple.test( qualifier ) ) {\n\t\t\treturn jQuery.filter(qualifier, filtered, !keep);\n\t\t} else {\n\t\t\tqualifier = jQuery.filter( qualifier, filtered );\n\t\t}\n\t}\n\n\treturn jQuery.grep(elements, function( elem, i ) {\n\t\treturn ( jQuery.inArray( elem, qualifier ) >= 0 ) === keep;\n\t});\n}\n\n\n\n\nfunction createSafeFragment( document ) {\n\tvar list = nodeNames.split( \"|\" ),\n\tsafeFrag = document.createDocumentFragment();\n\n\tif ( safeFrag.createElement ) {\n\t\twhile ( list.length ) {\n\t\t\tsafeFrag.createElement(\n\t\t\t\tlist.pop()\n\t\t\t);\n\t\t}\n\t}\n\treturn safeFrag;\n}\n\nvar nodeNames = \"abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|\" +\n\t\t\"header|hgroup|mark|meter|nav|output|progress|section|summary|time|video\",\n\trinlinejQuery = / jQuery\\d+=\"(?:\\d+|null)\"/g,\n\trleadingWhitespace = /^\\s+/,\n\trxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\\w:]+)[^>]*)\\/>/ig,\n\trtagName = /<([\\w:]+)/,\n\trtbody = /<tbody/i,\n\trhtml = /<|&#?\\w+;/,\n\trnoInnerhtml = /<(?:script|style)/i,\n\trnocache = /<(?:script|object|embed|option|style)/i,\n\trnoshimcache = new RegExp(\"<(?:\" + nodeNames + \")\", \"i\"),\n\t// checked=\"checked\" or checked\n\trchecked = /checked\\s*(?:[^=]|=\\s*.checked.)/i,\n\trscriptType = /\\/(java|ecma)script/i,\n\trcleanScript = /^\\s*<!(?:\\[CDATA\\[|\\-\\-)/,\n\twrapMap = {\n\t\toption: [ 1, \"<select multiple='multiple'>\", \"</select>\" ],\n\t\tlegend: [ 1, \"<fieldset>\", \"</fieldset>\" ],\n\t\tthead: [ 1, \"<table>\", \"</table>\" ],\n\t\ttr: [ 2, \"<table><tbody>\", \"</tbody></table>\" ],\n\t\ttd: [ 3, \"<table><tbody><tr>\", \"</tr></tbody></table>\" ],\n\t\tcol: [ 2, \"<table><tbody></tbody><colgroup>\", \"</colgroup></table>\" ],\n\t\tarea: [ 1, \"<map>\", \"</map>\" ],\n\t\t_default: [ 0, \"\", \"\" ]\n\t},\n\tsafeFragment = createSafeFragment( document );\n\nwrapMap.optgroup = wrapMap.option;\nwrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;\nwrapMap.th = wrapMap.td;\n\n// IE can't serialize <link> and <script> tags normally\nif ( !jQuery.support.htmlSerialize ) {\n\twrapMap._default = [ 1, \"div<div>\", \"</div>\" ];\n}\n\njQuery.fn.extend({\n\ttext: function( text ) {\n\t\tif ( jQuery.isFunction(text) ) {\n\t\t\treturn this.each(function(i) {\n\t\t\t\tvar self = jQuery( this );\n\n\t\t\t\tself.text( text.call(this, i, self.text()) );\n\t\t\t});\n\t\t}\n\n\t\tif ( typeof text !== \"object\" && text !== undefined ) {\n\t\t\treturn this.empty().append( (this[0] && this[0].ownerDocument || document).createTextNode( text ) );\n\t\t}\n\n\t\treturn jQuery.text( this );\n\t},\n\n\twrapAll: function( html ) {\n\t\tif ( jQuery.isFunction( html ) ) {\n\t\t\treturn this.each(function(i) {\n\t\t\t\tjQuery(this).wrapAll( html.call(this, i) );\n\t\t\t});\n\t\t}\n\n\t\tif ( this[0] ) {\n\t\t\t// The elements to wrap the target around\n\t\t\tvar wrap = jQuery( html, this[0].ownerDocument ).eq(0).clone(true);\n\n\t\t\tif ( this[0].parentNode ) {\n\t\t\t\twrap.insertBefore( this[0] );\n\t\t\t}\n\n\t\t\twrap.map(function() {\n\t\t\t\tvar elem = this;\n\n\t\t\t\twhile ( elem.firstChild && elem.firstChild.nodeType === 1 ) {\n\t\t\t\t\telem = elem.firstChild;\n\t\t\t\t}\n\n\t\t\t\treturn elem;\n\t\t\t}).append( this );\n\t\t}\n\n\t\treturn this;\n\t},\n\n\twrapInner: function( html ) {\n\t\tif ( jQuery.isFunction( html ) ) {\n\t\t\treturn this.each(function(i) {\n\t\t\t\tjQuery(this).wrapInner( html.call(this, i) );\n\t\t\t});\n\t\t}\n\n\t\treturn this.each(function() {\n\t\t\tvar self = jQuery( this ),\n\t\t\t\tcontents = self.contents();\n\n\t\t\tif ( contents.length ) {\n\t\t\t\tcontents.wrapAll( html );\n\n\t\t\t} else {\n\t\t\t\tself.append( html );\n\t\t\t}\n\t\t});\n\t},\n\n\twrap: function( html ) {\n\t\tvar isFunction = jQuery.isFunction( html );\n\n\t\treturn this.each(function(i) {\n\t\t\tjQuery( this ).wrapAll( isFunction ? html.call(this, i) : html );\n\t\t});\n\t},\n\n\tunwrap: function() {\n\t\treturn this.parent().each(function() {\n\t\t\tif ( !jQuery.nodeName( this, \"body\" ) ) {\n\t\t\t\tjQuery( this ).replaceWith( this.childNodes );\n\t\t\t}\n\t\t}).end();\n\t},\n\n\tappend: function() {\n\t\treturn this.domManip(arguments, true, function( elem ) {\n\t\t\tif ( this.nodeType === 1 ) {\n\t\t\t\tthis.appendChild( elem );\n\t\t\t}\n\t\t});\n\t},\n\n\tprepend: function() {\n\t\treturn this.domManip(arguments, true, function( elem ) {\n\t\t\tif ( this.nodeType === 1 ) {\n\t\t\t\tthis.insertBefore( elem, this.firstChild );\n\t\t\t}\n\t\t});\n\t},\n\n\tbefore: function() {\n\t\tif ( this[0] && this[0].parentNode ) {\n\t\t\treturn this.domManip(arguments, false, function( elem ) {\n\t\t\t\tthis.parentNode.insertBefore( elem, this );\n\t\t\t});\n\t\t} else if ( arguments.length ) {\n\t\t\tvar set = jQuery.clean( arguments );\n\t\t\tset.push.apply( set, this.toArray() );\n\t\t\treturn this.pushStack( set, \"before\", arguments );\n\t\t}\n\t},\n\n\tafter: function() {\n\t\tif ( this[0] && this[0].parentNode ) {\n\t\t\treturn this.domManip(arguments, false, function( elem ) {\n\t\t\t\tthis.parentNode.insertBefore( elem, this.nextSibling );\n\t\t\t});\n\t\t} else if ( arguments.length ) {\n\t\t\tvar set = this.pushStack( this, \"after\", arguments );\n\t\t\tset.push.apply( set, jQuery.clean(arguments) );\n\t\t\treturn set;\n\t\t}\n\t},\n\n\t// keepData is for internal use only--do not document\n\tremove: function( selector, keepData ) {\n\t\tfor ( var i = 0, elem; (elem = this[i]) != null; i++ ) {\n\t\t\tif ( !selector || jQuery.filter( selector, [ elem ] ).length ) {\n\t\t\t\tif ( !keepData && elem.nodeType === 1 ) {\n\t\t\t\t\tjQuery.cleanData( elem.getElementsByTagName(\"*\") );\n\t\t\t\t\tjQuery.cleanData( [ elem ] );\n\t\t\t\t}\n\n\t\t\t\tif ( elem.parentNode ) {\n\t\t\t\t\telem.parentNode.removeChild( elem );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t},\n\n\tempty: function() {\n\t\tfor ( var i = 0, elem; (elem = this[i]) != null; i++ ) {\n\t\t\t// Remove element nodes and prevent memory leaks\n\t\t\tif ( elem.nodeType === 1 ) {\n\t\t\t\tjQuery.cleanData( elem.getElementsByTagName(\"*\") );\n\t\t\t}\n\n\t\t\t// Remove any remaining nodes\n\t\t\twhile ( elem.firstChild ) {\n\t\t\t\telem.removeChild( elem.firstChild );\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t},\n\n\tclone: function( dataAndEvents, deepDataAndEvents ) {\n\t\tdataAndEvents = dataAndEvents == null ? false : dataAndEvents;\n\t\tdeepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;\n\n\t\treturn this.map( function () {\n\t\t\treturn jQuery.clone( this, dataAndEvents, deepDataAndEvents );\n\t\t});\n\t},\n\n\thtml: function( value ) {\n\t\tif ( value === undefined ) {\n\t\t\treturn this[0] && this[0].nodeType === 1 ?\n\t\t\t\tthis[0].innerHTML.replace(rinlinejQuery, \"\") :\n\t\t\t\tnull;\n\n\t\t// See if we can take a shortcut and just use innerHTML\n\t\t} else if ( typeof value === \"string\" && !rnoInnerhtml.test( value ) &&\n\t\t\t(jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value )) &&\n\t\t\t!wrapMap[ (rtagName.exec( value ) || [\"\", \"\"])[1].toLowerCase() ] ) {\n\n\t\t\tvalue = value.replace(rxhtmlTag, \"<$1></$2>\");\n\n\t\t\ttry {\n\t\t\t\tfor ( var i = 0, l = this.length; i < l; i++ ) {\n\t\t\t\t\t// Remove element nodes and prevent memory leaks\n\t\t\t\t\tif ( this[i].nodeType === 1 ) {\n\t\t\t\t\t\tjQuery.cleanData( this[i].getElementsByTagName(\"*\") );\n\t\t\t\t\t\tthis[i].innerHTML = value;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t// If using innerHTML throws an exception, use the fallback method\n\t\t\t} catch(e) {\n\t\t\t\tthis.empty().append( value );\n\t\t\t}\n\n\t\t} else if ( jQuery.isFunction( value ) ) {\n\t\t\tthis.each(function(i){\n\t\t\t\tvar self = jQuery( this );\n\n\t\t\t\tself.html( value.call(this, i, self.html()) );\n\t\t\t});\n\n\t\t} else {\n\t\t\tthis.empty().append( value );\n\t\t}\n\n\t\treturn this;\n\t},\n\n\treplaceWith: function( value ) {\n\t\tif ( this[0] && this[0].parentNode ) {\n\t\t\t// Make sure that the elements are removed from the DOM before they are inserted\n\t\t\t// this can help fix replacing a parent with child elements\n\t\t\tif ( jQuery.isFunction( value ) ) {\n\t\t\t\treturn this.each(function(i) {\n\t\t\t\t\tvar self = jQuery(this), old = self.html();\n\t\t\t\t\tself.replaceWith( value.call( this, i, old ) );\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tif ( typeof value !== \"string\" ) {\n\t\t\t\tvalue = jQuery( value ).detach();\n\t\t\t}\n\n\t\t\treturn this.each(function() {\n\t\t\t\tvar next = this.nextSibling,\n\t\t\t\t\tparent = this.parentNode;\n\n\t\t\t\tjQuery( this ).remove();\n\n\t\t\t\tif ( next ) {\n\t\t\t\t\tjQuery(next).before( value );\n\t\t\t\t} else {\n\t\t\t\t\tjQuery(parent).append( value );\n\t\t\t\t}\n\t\t\t});\n\t\t} else {\n\t\t\treturn this.length ?\n\t\t\t\tthis.pushStack( jQuery(jQuery.isFunction(value) ? value() : value), \"replaceWith\", value ) :\n\t\t\t\tthis;\n\t\t}\n\t},\n\n\tdetach: function( selector ) {\n\t\treturn this.remove( selector, true );\n\t},\n\n\tdomManip: function( args, table, callback ) {\n\t\tvar results, first, fragment, parent,\n\t\t\tvalue = args[0],\n\t\t\tscripts = [];\n\n\t\t// We can't cloneNode fragments that contain checked, in WebKit\n\t\tif ( !jQuery.support.checkClone && arguments.length === 3 && typeof value === \"string\" && rchecked.test( value ) ) {\n\t\t\treturn this.each(function() {\n\t\t\t\tjQuery(this).domManip( args, table, callback, true );\n\t\t\t});\n\t\t}\n\n\t\tif ( jQuery.isFunction(value) ) {\n\t\t\treturn this.each(function(i) {\n\t\t\t\tvar self = jQuery(this);\n\t\t\t\targs[0] = value.call(this, i, table ? self.html() : undefined);\n\t\t\t\tself.domManip( args, table, callback );\n\t\t\t});\n\t\t}\n\n\t\tif ( this[0] ) {\n\t\t\tparent = value && value.parentNode;\n\n\t\t\t// If we're in a fragment, just use that instead of building a new one\n\t\t\tif ( jQuery.support.parentNode && parent && parent.nodeType === 11 && parent.childNodes.length === this.length ) {\n\t\t\t\tresults = { fragment: parent };\n\n\t\t\t} else {\n\t\t\t\tresults = jQuery.buildFragment( args, this, scripts );\n\t\t\t}\n\n\t\t\tfragment = results.fragment;\n\n\t\t\tif ( fragment.childNodes.length === 1 ) {\n\t\t\t\tfirst = fragment = fragment.firstChild;\n\t\t\t} else {\n\t\t\t\tfirst = fragment.firstChild;\n\t\t\t}\n\n\t\t\tif ( first ) {\n\t\t\t\ttable = table && jQuery.nodeName( first, \"tr\" );\n\n\t\t\t\tfor ( var i = 0, l = this.length, lastIndex = l - 1; i < l; i++ ) {\n\t\t\t\t\tcallback.call(\n\t\t\t\t\t\ttable ?\n\t\t\t\t\t\t\troot(this[i], first) :\n\t\t\t\t\t\t\tthis[i],\n\t\t\t\t\t\t// Make sure that we do not leak memory by inadvertently discarding\n\t\t\t\t\t\t// the original fragment (which might have attached data) instead of\n\t\t\t\t\t\t// using it; in addition, use the original fragment object for the last\n\t\t\t\t\t\t// item instead of first because it can end up being emptied incorrectly\n\t\t\t\t\t\t// in certain situations (Bug #8070).\n\t\t\t\t\t\t// Fragments from the fragment cache must always be cloned and never used\n\t\t\t\t\t\t// in place.\n\t\t\t\t\t\tresults.cacheable || ( l > 1 && i < lastIndex ) ?\n\t\t\t\t\t\t\tjQuery.clone( fragment, true, true ) :\n\t\t\t\t\t\t\tfragment\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( scripts.length ) {\n\t\t\t\tjQuery.each( scripts, evalScript );\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t}\n});\n\nfunction root( elem, cur ) {\n\treturn jQuery.nodeName(elem, \"table\") ?\n\t\t(elem.getElementsByTagName(\"tbody\")[0] ||\n\t\telem.appendChild(elem.ownerDocument.createElement(\"tbody\"))) :\n\t\telem;\n}\n\nfunction cloneCopyEvent( src, dest ) {\n\n\tif ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) {\n\t\treturn;\n\t}\n\n\tvar type, i, l,\n\t\toldData = jQuery._data( src ),\n\t\tcurData = jQuery._data( dest, oldData ),\n\t\tevents = oldData.events;\n\n\tif ( events ) {\n\t\tdelete curData.handle;\n\t\tcurData.events = {};\n\n\t\tfor ( type in events ) {\n\t\t\tfor ( i = 0, l = events[ type ].length; i < l; i++ ) {\n\t\t\t\tjQuery.event.add( dest, type + ( events[ type ][ i ].namespace ? \".\" : \"\" ) + events[ type ][ i ].namespace, events[ type ][ i ], events[ type ][ i ].data );\n\t\t\t}\n\t\t}\n\t}\n\n\t// make the cloned public data object a copy from the original\n\tif ( curData.data ) {\n\t\tcurData.data = jQuery.extend( {}, curData.data );\n\t}\n}\n\nfunction cloneFixAttributes( src, dest ) {\n\tvar nodeName;\n\n\t// We do not need to do anything for non-Elements\n\tif ( dest.nodeType !== 1 ) {\n\t\treturn;\n\t}\n\n\t// clearAttributes removes the attributes, which we don't want,\n\t// but also removes the attachEvent events, which we *do* want\n\tif ( dest.clearAttributes ) {\n\t\tdest.clearAttributes();\n\t}\n\n\t// mergeAttributes, in contrast, only merges back on the\n\t// original attributes, not the events\n\tif ( dest.mergeAttributes ) {\n\t\tdest.mergeAttributes( src );\n\t}\n\n\tnodeName = dest.nodeName.toLowerCase();\n\n\t// IE6-8 fail to clone children inside object elements that use\n\t// the proprietary classid attribute value (rather than the type\n\t// attribute) to identify the type of content to display\n\tif ( nodeName === \"object\" ) {\n\t\tdest.outerHTML = src.outerHTML;\n\n\t} else if ( nodeName === \"input\" && (src.type === \"checkbox\" || src.type === \"radio\") ) {\n\t\t// IE6-8 fails to persist the checked state of a cloned checkbox\n\t\t// or radio button. Worse, IE6-7 fail to give the cloned element\n\t\t// a checked appearance if the defaultChecked value isn't also set\n\t\tif ( src.checked ) {\n\t\t\tdest.defaultChecked = dest.checked = src.checked;\n\t\t}\n\n\t\t// IE6-7 get confused and end up setting the value of a cloned\n\t\t// checkbox/radio button to an empty string instead of \"on\"\n\t\tif ( dest.value !== src.value ) {\n\t\t\tdest.value = src.value;\n\t\t}\n\n\t// IE6-8 fails to return the selected option to the default selected\n\t// state when cloning options\n\t} else if ( nodeName === \"option\" ) {\n\t\tdest.selected = src.defaultSelected;\n\n\t// IE6-8 fails to set the defaultValue to the correct value when\n\t// cloning other types of input fields\n\t} else if ( nodeName === \"input\" || nodeName === \"textarea\" ) {\n\t\tdest.defaultValue = src.defaultValue;\n\t}\n\n\t// Event data gets referenced instead of copied if the expando\n\t// gets copied too\n\tdest.removeAttribute( jQuery.expando );\n}\n\njQuery.buildFragment = function( args, nodes, scripts ) {\n\tvar fragment, cacheable, cacheresults, doc,\n\tfirst = args[ 0 ];\n\n\t// nodes may contain either an explicit document object,\n\t// a jQuery collection or context object.\n\t// If nodes[0] contains a valid object to assign to doc\n\tif ( nodes && nodes[0] ) {\n\t\tdoc = nodes[0].ownerDocument || nodes[0];\n\t}\n\n\t// Ensure that an attr object doesn't incorrectly stand in as a document object\n\t// Chrome and Firefox seem to allow this to occur and will throw exception\n\t// Fixes #8950\n\tif ( !doc.createDocumentFragment ) {\n\t\tdoc = document;\n\t}\n\n\t// Only cache \"small\" (1/2 KB) HTML strings that are associated with the main document\n\t// Cloning options loses the selected state, so don't cache them\n\t// IE 6 doesn't like it when you put <object> or <embed> elements in a fragment\n\t// Also, WebKit does not clone 'checked' attributes on cloneNode, so don't cache\n\t// Lastly, IE6,7,8 will not correctly reuse cached fragments that were created from unknown elems #10501\n\tif ( args.length === 1 && typeof first === \"string\" && first.length < 512 && doc === document &&\n\t\tfirst.charAt(0) === \"<\" && !rnocache.test( first ) &&\n\t\t(jQuery.support.checkClone || !rchecked.test( first )) &&\n\t\t(jQuery.support.html5Clone || !rnoshimcache.test( first )) ) {\n\n\t\tcacheable = true;\n\n\t\tcacheresults = jQuery.fragments[ first ];\n\t\tif ( cacheresults && cacheresults !== 1 ) {\n\t\t\tfragment = cacheresults;\n\t\t}\n\t}\n\n\tif ( !fragment ) {\n\t\tfragment = doc.createDocumentFragment();\n\t\tjQuery.clean( args, doc, fragment, scripts );\n\t}\n\n\tif ( cacheable ) {\n\t\tjQuery.fragments[ first ] = cacheresults ? fragment : 1;\n\t}\n\n\treturn { fragment: fragment, cacheable: cacheable };\n};\n\njQuery.fragments = {};\n\njQuery.each({\n\tappendTo: \"append\",\n\tprependTo: \"prepend\",\n\tinsertBefore: \"before\",\n\tinsertAfter: \"after\",\n\treplaceAll: \"replaceWith\"\n}, function( name, original ) {\n\tjQuery.fn[ name ] = function( selector ) {\n\t\tvar ret = [],\n\t\t\tinsert = jQuery( selector ),\n\t\t\tparent = this.length === 1 && this[0].parentNode;\n\n\t\tif ( parent && parent.nodeType === 11 && parent.childNodes.length === 1 && insert.length === 1 ) {\n\t\t\tinsert[ original ]( this[0] );\n\t\t\treturn this;\n\n\t\t} else {\n\t\t\tfor ( var i = 0, l = insert.length; i < l; i++ ) {\n\t\t\t\tvar elems = ( i > 0 ? this.clone(true) : this ).get();\n\t\t\t\tjQuery( insert[i] )[ original ]( elems );\n\t\t\t\tret = ret.concat( elems );\n\t\t\t}\n\n\t\t\treturn this.pushStack( ret, name, insert.selector );\n\t\t}\n\t};\n});\n\nfunction getAll( elem ) {\n\tif ( typeof elem.getElementsByTagName !== \"undefined\" ) {\n\t\treturn elem.getElementsByTagName( \"*\" );\n\n\t} else if ( typeof elem.querySelectorAll !== \"undefined\" ) {\n\t\treturn elem.querySelectorAll( \"*\" );\n\n\t} else {\n\t\treturn [];\n\t}\n}\n\n// Used in clean, fixes the defaultChecked property\nfunction fixDefaultChecked( elem ) {\n\tif ( elem.type === \"checkbox\" || elem.type === \"radio\" ) {\n\t\telem.defaultChecked = elem.checked;\n\t}\n}\n// Finds all inputs and passes them to fixDefaultChecked\nfunction findInputs( elem ) {\n\tvar nodeName = ( elem.nodeName || \"\" ).toLowerCase();\n\tif ( nodeName === \"input\" ) {\n\t\tfixDefaultChecked( elem );\n\t// Skip scripts, get other children\n\t} else if ( nodeName !== \"script\" && typeof elem.getElementsByTagName !== \"undefined\" ) {\n\t\tjQuery.grep( elem.getElementsByTagName(\"input\"), fixDefaultChecked );\n\t}\n}\n\n// Derived From: http://www.iecss.com/shimprove/javascript/shimprove.1-0-1.js\nfunction shimCloneNode( elem ) {\n\tvar div = document.createElement( \"div\" );\n\tsafeFragment.appendChild( div );\n\n\tdiv.innerHTML = elem.outerHTML;\n\treturn div.firstChild;\n}\n\njQuery.extend({\n\tclone: function( elem, dataAndEvents, deepDataAndEvents ) {\n\t\tvar srcElements,\n\t\t\tdestElements,\n\t\t\ti,\n\t\t\t// IE<=8 does not properly clone detached, unknown element nodes\n\t\t\tclone = jQuery.support.html5Clone || !rnoshimcache.test( \"<\" + elem.nodeName ) ?\n\t\t\t\telem.cloneNode( true ) :\n\t\t\t\tshimCloneNode( elem );\n\n\t\tif ( (!jQuery.support.noCloneEvent || !jQuery.support.noCloneChecked) &&\n\t\t\t\t(elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem) ) {\n\t\t\t// IE copies events bound via attachEvent when using cloneNode.\n\t\t\t// Calling detachEvent on the clone will also remove the events\n\t\t\t// from the original. In order to get around this, we use some\n\t\t\t// proprietary methods to clear the events. Thanks to MooTools\n\t\t\t// guys for this hotness.\n\n\t\t\tcloneFixAttributes( elem, clone );\n\n\t\t\t// Using Sizzle here is crazy slow, so we use getElementsByTagName instead\n\t\t\tsrcElements = getAll( elem );\n\t\t\tdestElements = getAll( clone );\n\n\t\t\t// Weird iteration because IE will replace the length property\n\t\t\t// with an element if you are cloning the body and one of the\n\t\t\t// elements on the page has a name or id of \"length\"\n\t\t\tfor ( i = 0; srcElements[i]; ++i ) {\n\t\t\t\t// Ensure that the destination node is not null; Fixes #9587\n\t\t\t\tif ( destElements[i] ) {\n\t\t\t\t\tcloneFixAttributes( srcElements[i], destElements[i] );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Copy the events from the original to the clone\n\t\tif ( dataAndEvents ) {\n\t\t\tcloneCopyEvent( elem, clone );\n\n\t\t\tif ( deepDataAndEvents ) {\n\t\t\t\tsrcElements = getAll( elem );\n\t\t\t\tdestElements = getAll( clone );\n\n\t\t\t\tfor ( i = 0; srcElements[i]; ++i ) {\n\t\t\t\t\tcloneCopyEvent( srcElements[i], destElements[i] );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tsrcElements = destElements = null;\n\n\t\t// Return the cloned set\n\t\treturn clone;\n\t},\n\n\tclean: function( elems, context, fragment, scripts ) {\n\t\tvar checkScriptType;\n\n\t\tcontext = context || document;\n\n\t\t// !context.createElement fails in IE with an error but returns typeof 'object'\n\t\tif ( typeof context.createElement === \"undefined\" ) {\n\t\t\tcontext = context.ownerDocument || context[0] && context[0].ownerDocument || document;\n\t\t}\n\n\t\tvar ret = [], j;\n\n\t\tfor ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {\n\t\t\tif ( typeof elem === \"number\" ) {\n\t\t\t\telem += \"\";\n\t\t\t}\n\n\t\t\tif ( !elem ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Convert html string into DOM nodes\n\t\t\tif ( typeof elem === \"string\" ) {\n\t\t\t\tif ( !rhtml.test( elem ) ) {\n\t\t\t\t\telem = context.createTextNode( elem );\n\t\t\t\t} else {\n\t\t\t\t\t// Fix \"XHTML\"-style tags in all browsers\n\t\t\t\t\telem = elem.replace(rxhtmlTag, \"<$1></$2>\");\n\n\t\t\t\t\t// Trim whitespace, otherwise indexOf won't work as expected\n\t\t\t\t\tvar tag = ( rtagName.exec( elem ) || [\"\", \"\"] )[1].toLowerCase(),\n\t\t\t\t\t\twrap = wrapMap[ tag ] || wrapMap._default,\n\t\t\t\t\t\tdepth = wrap[0],\n\t\t\t\t\t\tdiv = context.createElement(\"div\");\n\n\t\t\t\t\t// Append wrapper element to unknown element safe doc fragment\n\t\t\t\t\tif ( context === document ) {\n\t\t\t\t\t\t// Use the fragment we've already created for this document\n\t\t\t\t\t\tsafeFragment.appendChild( div );\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Use a fragment created with the owner document\n\t\t\t\t\t\tcreateSafeFragment( context ).appendChild( div );\n\t\t\t\t\t}\n\n\t\t\t\t\t// Go to html and back, then peel off extra wrappers\n\t\t\t\t\tdiv.innerHTML = wrap[1] + elem + wrap[2];\n\n\t\t\t\t\t// Move to the right depth\n\t\t\t\t\twhile ( depth-- ) {\n\t\t\t\t\t\tdiv = div.lastChild;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Remove IE's autoinserted <tbody> from table fragments\n\t\t\t\t\tif ( !jQuery.support.tbody ) {\n\n\t\t\t\t\t\t// String was a <table>, *may* have spurious <tbody>\n\t\t\t\t\t\tvar hasBody = rtbody.test(elem),\n\t\t\t\t\t\t\ttbody = tag === \"table\" && !hasBody ?\n\t\t\t\t\t\t\t\tdiv.firstChild && div.firstChild.childNodes :\n\n\t\t\t\t\t\t\t\t// String was a bare <thead> or <tfoot>\n\t\t\t\t\t\t\t\twrap[1] === \"<table>\" && !hasBody ?\n\t\t\t\t\t\t\t\t\tdiv.childNodes :\n\t\t\t\t\t\t\t\t\t[];\n\n\t\t\t\t\t\tfor ( j = tbody.length - 1; j >= 0 ; --j ) {\n\t\t\t\t\t\t\tif ( jQuery.nodeName( tbody[ j ], \"tbody\" ) && !tbody[ j ].childNodes.length ) {\n\t\t\t\t\t\t\t\ttbody[ j ].parentNode.removeChild( tbody[ j ] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// IE completely kills leading whitespace when innerHTML is used\n\t\t\t\t\tif ( !jQuery.support.leadingWhitespace && rleadingWhitespace.test( elem ) ) {\n\t\t\t\t\t\tdiv.insertBefore( context.createTextNode( rleadingWhitespace.exec(elem)[0] ), div.firstChild );\n\t\t\t\t\t}\n\n\t\t\t\t\telem = div.childNodes;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Resets defaultChecked for any radios and checkboxes\n\t\t\t// about to be appended to the DOM in IE 6/7 (#8060)\n\t\t\tvar len;\n\t\t\tif ( !jQuery.support.appendChecked ) {\n\t\t\t\tif ( elem[0] && typeof (len = elem.length) === \"number\" ) {\n\t\t\t\t\tfor ( j = 0; j < len; j++ ) {\n\t\t\t\t\t\tfindInputs( elem[j] );\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tfindInputs( elem );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( elem.nodeType ) {\n\t\t\t\tret.push( elem );\n\t\t\t} else {\n\t\t\t\tret = jQuery.merge( ret, elem );\n\t\t\t}\n\t\t}\n\n\t\tif ( fragment ) {\n\t\t\tcheckScriptType = function( elem ) {\n\t\t\t\treturn !elem.type || rscriptType.test( elem.type );\n\t\t\t};\n\t\t\tfor ( i = 0; ret[i]; i++ ) {\n\t\t\t\tif ( scripts && jQuery.nodeName( ret[i], \"script\" ) && (!ret[i].type || ret[i].type.toLowerCase() === \"text/javascript\") ) {\n\t\t\t\t\tscripts.push( ret[i].parentNode ? ret[i].parentNode.removeChild( ret[i] ) : ret[i] );\n\n\t\t\t\t} else {\n\t\t\t\t\tif ( ret[i].nodeType === 1 ) {\n\t\t\t\t\t\tvar jsTags = jQuery.grep( ret[i].getElementsByTagName( \"script\" ), checkScriptType );\n\n\t\t\t\t\t\tret.splice.apply( ret, [i + 1, 0].concat( jsTags ) );\n\t\t\t\t\t}\n\t\t\t\t\tfragment.appendChild( ret[i] );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn ret;\n\t},\n\n\tcleanData: function( elems ) {\n\t\tvar data, id,\n\t\t\tcache = jQuery.cache,\n\t\t\tspecial = jQuery.event.special,\n\t\t\tdeleteExpando = jQuery.support.deleteExpando;\n\n\t\tfor ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {\n\t\t\tif ( elem.nodeName && jQuery.noData[elem.nodeName.toLowerCase()] ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tid = elem[ jQuery.expando ];\n\n\t\t\tif ( id ) {\n\t\t\t\tdata = cache[ id ];\n\n\t\t\t\tif ( data && data.events ) {\n\t\t\t\t\tfor ( var type in data.events ) {\n\t\t\t\t\t\tif ( special[ type ] ) {\n\t\t\t\t\t\t\tjQuery.event.remove( elem, type );\n\n\t\t\t\t\t\t// This is a shortcut to avoid jQuery.event.remove's overhead\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tjQuery.removeEvent( elem, type, data.handle );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Null the DOM reference to avoid IE6/7/8 leak (#7054)\n\t\t\t\t\tif ( data.handle ) {\n\t\t\t\t\t\tdata.handle.elem = null;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif ( deleteExpando ) {\n\t\t\t\t\tdelete elem[ jQuery.expando ];\n\n\t\t\t\t} else if ( elem.removeAttribute ) {\n\t\t\t\t\telem.removeAttribute( jQuery.expando );\n\t\t\t\t}\n\n\t\t\t\tdelete cache[ id ];\n\t\t\t}\n\t\t}\n\t}\n});\n\nfunction evalScript( i, elem ) {\n\tif ( elem.src ) {\n\t\tjQuery.ajax({\n\t\t\turl: elem.src,\n\t\t\tasync: false,\n\t\t\tdataType: \"script\"\n\t\t});\n\t} else {\n\t\tjQuery.globalEval( ( elem.text || elem.textContent || elem.innerHTML || \"\" ).replace( rcleanScript, \"/*$0*/\" ) );\n\t}\n\n\tif ( elem.parentNode ) {\n\t\telem.parentNode.removeChild( elem );\n\t}\n}\n\n\n\n\nvar ralpha = /alpha\\([^)]*\\)/i,\n\tropacity = /opacity=([^)]*)/,\n\t// fixed for IE9, see #8346\n\trupper = /([A-Z]|^ms)/g,\n\trnumpx = /^-?\\d+(?:px)?$/i,\n\trnum = /^-?\\d/,\n\trrelNum = /^([\\-+])=([\\-+.\\de]+)/,\n\n\tcssShow = { position: \"absolute\", visibility: \"hidden\", display: \"block\" },\n\tcssWidth = [ \"Left\", \"Right\" ],\n\tcssHeight = [ \"Top\", \"Bottom\" ],\n\tcurCSS,\n\n\tgetComputedStyle,\n\tcurrentStyle;\n\njQuery.fn.css = function( name, value ) {\n\t// Setting 'undefined' is a no-op\n\tif ( arguments.length === 2 && value === undefined ) {\n\t\treturn this;\n\t}\n\n\treturn jQuery.access( this, name, value, true, function( elem, name, value ) {\n\t\treturn value !== undefined ?\n\t\t\tjQuery.style( elem, name, value ) :\n\t\t\tjQuery.css( elem, name );\n\t});\n};\n\njQuery.extend({\n\t// Add in style property hooks for overriding the default\n\t// behavior of getting and setting a style property\n\tcssHooks: {\n\t\topacity: {\n\t\t\tget: function( elem, computed ) {\n\t\t\t\tif ( computed ) {\n\t\t\t\t\t// We should always get a number back from opacity\n\t\t\t\t\tvar ret = curCSS( elem, \"opacity\", \"opacity\" );\n\t\t\t\t\treturn ret === \"\" ? \"1\" : ret;\n\n\t\t\t\t} else {\n\t\t\t\t\treturn elem.style.opacity;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\n\t// Exclude the following css properties to add px\n\tcssNumber: {\n\t\t\"fillOpacity\": true,\n\t\t\"fontWeight\": true,\n\t\t\"lineHeight\": true,\n\t\t\"opacity\": true,\n\t\t\"orphans\": true,\n\t\t\"widows\": true,\n\t\t\"zIndex\": true,\n\t\t\"zoom\": true\n\t},\n\n\t// Add in properties whose names you wish to fix before\n\t// setting or getting the value\n\tcssProps: {\n\t\t// normalize float css property\n\t\t\"float\": jQuery.support.cssFloat ? \"cssFloat\" : \"styleFloat\"\n\t},\n\n\t// Get and set the style property on a DOM Node\n\tstyle: function( elem, name, value, extra ) {\n\t\t// Don't set styles on text and comment nodes\n\t\tif ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Make sure that we're working with the right name\n\t\tvar ret, type, origName = jQuery.camelCase( name ),\n\t\t\tstyle = elem.style, hooks = jQuery.cssHooks[ origName ];\n\n\t\tname = jQuery.cssProps[ origName ] || origName;\n\n\t\t// Check if we're setting a value\n\t\tif ( value !== undefined ) {\n\t\t\ttype = typeof value;\n\n\t\t\t// convert relative number strings (+= or -=) to relative numbers. #7345\n\t\t\tif ( type === \"string\" && (ret = rrelNum.exec( value )) ) {\n\t\t\t\tvalue = ( +( ret[1] + 1) * +ret[2] ) + parseFloat( jQuery.css( elem, name ) );\n\t\t\t\t// Fixes bug #9237\n\t\t\t\ttype = \"number\";\n\t\t\t}\n\n\t\t\t// Make sure that NaN and null values aren't set. See: #7116\n\t\t\tif ( value == null || type === \"number\" && isNaN( value ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// If a number was passed in, add 'px' to the (except for certain CSS properties)\n\t\t\tif ( type === \"number\" && !jQuery.cssNumber[ origName ] ) {\n\t\t\t\tvalue += \"px\";\n\t\t\t}\n\n\t\t\t// If a hook was provided, use that value, otherwise just set the specified value\n\t\t\tif ( !hooks || !(\"set\" in hooks) || (value = hooks.set( elem, value )) !== undefined ) {\n\t\t\t\t// Wrapped to prevent IE from throwing errors when 'invalid' values are provided\n\t\t\t\t// Fixes bug #5509\n\t\t\t\ttry {\n\t\t\t\t\tstyle[ name ] = value;\n\t\t\t\t} catch(e) {}\n\t\t\t}\n\n\t\t} else {\n\t\t\t// If a hook was provided get the non-computed value from there\n\t\t\tif ( hooks && \"get\" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) {\n\t\t\t\treturn ret;\n\t\t\t}\n\n\t\t\t// Otherwise just get the value from the style object\n\t\t\treturn style[ name ];\n\t\t}\n\t},\n\n\tcss: function( elem, name, extra ) {\n\t\tvar ret, hooks;\n\n\t\t// Make sure that we're working with the right name\n\t\tname = jQuery.camelCase( name );\n\t\thooks = jQuery.cssHooks[ name ];\n\t\tname = jQuery.cssProps[ name ] || name;\n\n\t\t// cssFloat needs a special treatment\n\t\tif ( name === \"cssFloat\" ) {\n\t\t\tname = \"float\";\n\t\t}\n\n\t\t// If a hook was provided get the computed value from there\n\t\tif ( hooks && \"get\" in hooks && (ret = hooks.get( elem, true, extra )) !== undefined ) {\n\t\t\treturn ret;\n\n\t\t// Otherwise, if a way to get the computed value exists, use that\n\t\t} else if ( curCSS ) {\n\t\t\treturn curCSS( elem, name );\n\t\t}\n\t},\n\n\t// A method for quickly swapping in/out CSS properties to get correct calculations\n\tswap: function( elem, options, callback ) {\n\t\tvar old = {};\n\n\t\t// Remember the old values, and insert the new ones\n\t\tfor ( var name in options ) {\n\t\t\told[ name ] = elem.style[ name ];\n\t\t\telem.style[ name ] = options[ name ];\n\t\t}\n\n\t\tcallback.call( elem );\n\n\t\t// Revert the old values\n\t\tfor ( name in options ) {\n\t\t\telem.style[ name ] = old[ name ];\n\t\t}\n\t}\n});\n\n// DEPRECATED, Use jQuery.css() instead\njQuery.curCSS = jQuery.css;\n\njQuery.each([\"height\", \"width\"], function( i, name ) {\n\tjQuery.cssHooks[ name ] = {\n\t\tget: function( elem, computed, extra ) {\n\t\t\tvar val;\n\n\t\t\tif ( computed ) {\n\t\t\t\tif ( elem.offsetWidth !== 0 ) {\n\t\t\t\t\treturn getWH( elem, name, extra );\n\t\t\t\t} else {\n\t\t\t\t\tjQuery.swap( elem, cssShow, function() {\n\t\t\t\t\t\tval = getWH( elem, name, extra );\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\treturn val;\n\t\t\t}\n\t\t},\n\n\t\tset: function( elem, value ) {\n\t\t\tif ( rnumpx.test( value ) ) {\n\t\t\t\t// ignore negative width and height values #1599\n\t\t\t\tvalue = parseFloat( value );\n\n\t\t\t\tif ( value >= 0 ) {\n\t\t\t\t\treturn value + \"px\";\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\treturn value;\n\t\t\t}\n\t\t}\n\t};\n});\n\nif ( !jQuery.support.opacity ) {\n\tjQuery.cssHooks.opacity = {\n\t\tget: function( elem, computed ) {\n\t\t\t// IE uses filters for opacity\n\t\t\treturn ropacity.test( (computed && elem.currentStyle ? elem.currentStyle.filter : elem.style.filter) || \"\" ) ?\n\t\t\t\t( parseFloat( RegExp.$1 ) / 100 ) + \"\" :\n\t\t\t\tcomputed ? \"1\" : \"\";\n\t\t},\n\n\t\tset: function( elem, value ) {\n\t\t\tvar style = elem.style,\n\t\t\t\tcurrentStyle = elem.currentStyle,\n\t\t\t\topacity = jQuery.isNumeric( value ) ? \"alpha(opacity=\" + value * 100 + \")\" : \"\",\n\t\t\t\tfilter = currentStyle && currentStyle.filter || style.filter || \"\";\n\n\t\t\t// IE has trouble with opacity if it does not have layout\n\t\t\t// Force it by setting the zoom level\n\t\t\tstyle.zoom = 1;\n\n\t\t\t// if setting opacity to 1, and no other filters exist - attempt to remove filter attribute #6652\n\t\t\tif ( value >= 1 && jQuery.trim( filter.replace( ralpha, \"\" ) ) === \"\" ) {\n\n\t\t\t\t// Setting style.filter to null, \"\" & \" \" still leave \"filter:\" in the cssText\n\t\t\t\t// if \"filter:\" is present at all, clearType is disabled, we want to avoid this\n\t\t\t\t// style.removeAttribute is IE Only, but so apparently is this code path...\n\t\t\t\tstyle.removeAttribute( \"filter\" );\n\n\t\t\t\t// if there there is no filter style applied in a css rule, we are done\n\t\t\t\tif ( currentStyle && !currentStyle.filter ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// otherwise, set new filter values\n\t\t\tstyle.filter = ralpha.test( filter ) ?\n\t\t\t\tfilter.replace( ralpha, opacity ) :\n\t\t\t\tfilter + \" \" + opacity;\n\t\t}\n\t};\n}\n\njQuery(function() {\n\t// This hook cannot be added until DOM ready because the support test\n\t// for it is not run until after DOM ready\n\tif ( !jQuery.support.reliableMarginRight ) {\n\t\tjQuery.cssHooks.marginRight = {\n\t\t\tget: function( elem, computed ) {\n\t\t\t\t// WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right\n\t\t\t\t// Work around by temporarily setting element display to inline-block\n\t\t\t\tvar ret;\n\t\t\t\tjQuery.swap( elem, { \"display\": \"inline-block\" }, function() {\n\t\t\t\t\tif ( computed ) {\n\t\t\t\t\t\tret = curCSS( elem, \"margin-right\", \"marginRight\" );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tret = elem.style.marginRight;\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\treturn ret;\n\t\t\t}\n\t\t};\n\t}\n});\n\nif ( document.defaultView && document.defaultView.getComputedStyle ) {\n\tgetComputedStyle = function( elem, name ) {\n\t\tvar ret, defaultView, computedStyle;\n\n\t\tname = name.replace( rupper, \"-$1\" ).toLowerCase();\n\n\t\tif ( (defaultView = elem.ownerDocument.defaultView) &&\n\t\t\t\t(computedStyle = defaultView.getComputedStyle( elem, null )) ) {\n\t\t\tret = computedStyle.getPropertyValue( name );\n\t\t\tif ( ret === \"\" && !jQuery.contains( elem.ownerDocument.documentElement, elem ) ) {\n\t\t\t\tret = jQuery.style( elem, name );\n\t\t\t}\n\t\t}\n\n\t\treturn ret;\n\t};\n}\n\nif ( document.documentElement.currentStyle ) {\n\tcurrentStyle = function( elem, name ) {\n\t\tvar left, rsLeft, uncomputed,\n\t\t\tret = elem.currentStyle && elem.currentStyle[ name ],\n\t\t\tstyle = elem.style;\n\n\t\t// Avoid setting ret to empty string here\n\t\t// so we don't default to auto\n\t\tif ( ret === null && style && (uncomputed = style[ name ]) ) {\n\t\t\tret = uncomputed;\n\t\t}\n\n\t\t// From the awesome hack by Dean Edwards\n\t\t// http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291\n\n\t\t// If we're not dealing with a regular pixel number\n\t\t// but a number that has a weird ending, we need to convert it to pixels\n\t\tif ( !rnumpx.test( ret ) && rnum.test( ret ) ) {\n\n\t\t\t// Remember the original values\n\t\t\tleft = style.left;\n\t\t\trsLeft = elem.runtimeStyle && elem.runtimeStyle.left;\n\n\t\t\t// Put in the new values to get a computed value out\n\t\t\tif ( rsLeft ) {\n\t\t\t\telem.runtimeStyle.left = elem.currentStyle.left;\n\t\t\t}\n\t\t\tstyle.left = name === \"fontSize\" ? \"1em\" : ( ret || 0 );\n\t\t\tret = style.pixelLeft + \"px\";\n\n\t\t\t// Revert the changed values\n\t\t\tstyle.left = left;\n\t\t\tif ( rsLeft ) {\n\t\t\t\telem.runtimeStyle.left = rsLeft;\n\t\t\t}\n\t\t}\n\n\t\treturn ret === \"\" ? \"auto\" : ret;\n\t};\n}\n\ncurCSS = getComputedStyle || currentStyle;\n\nfunction getWH( elem, name, extra ) {\n\n\t// Start with offset property\n\tvar val = name === \"width\" ? elem.offsetWidth : elem.offsetHeight,\n\t\twhich = name === \"width\" ? cssWidth : cssHeight,\n\t\ti = 0,\n\t\tlen = which.length;\n\n\tif ( val > 0 ) {\n\t\tif ( extra !== \"border\" ) {\n\t\t\tfor ( ; i < len; i++ ) {\n\t\t\t\tif ( !extra ) {\n\t\t\t\t\tval -= parseFloat( jQuery.css( elem, \"padding\" + which[ i ] ) ) || 0;\n\t\t\t\t}\n\t\t\t\tif ( extra === \"margin\" ) {\n\t\t\t\t\tval += parseFloat( jQuery.css( elem, extra + which[ i ] ) ) || 0;\n\t\t\t\t} else {\n\t\t\t\t\tval -= parseFloat( jQuery.css( elem, \"border\" + which[ i ] + \"Width\" ) ) || 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn val + \"px\";\n\t}\n\n\t// Fall back to computed then uncomputed css if necessary\n\tval = curCSS( elem, name, name );\n\tif ( val < 0 || val == null ) {\n\t\tval = elem.style[ name ] || 0;\n\t}\n\t// Normalize \"\", auto, and prepare for extra\n\tval = parseFloat( val ) || 0;\n\n\t// Add padding, border, margin\n\tif ( extra ) {\n\t\tfor ( ; i < len; i++ ) {\n\t\t\tval += parseFloat( jQuery.css( elem, \"padding\" + which[ i ] ) ) || 0;\n\t\t\tif ( extra !== \"padding\" ) {\n\t\t\t\tval += parseFloat( jQuery.css( elem, \"border\" + which[ i ] + \"Width\" ) ) || 0;\n\t\t\t}\n\t\t\tif ( extra === \"margin\" ) {\n\t\t\t\tval += parseFloat( jQuery.css( elem, extra + which[ i ] ) ) || 0;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn val + \"px\";\n}\n\nif ( jQuery.expr && jQuery.expr.filters ) {\n\tjQuery.expr.filters.hidden = function( elem ) {\n\t\tvar width = elem.offsetWidth,\n\t\t\theight = elem.offsetHeight;\n\n\t\treturn ( width === 0 && height === 0 ) || (!jQuery.support.reliableHiddenOffsets && ((elem.style && elem.style.display) || jQuery.css( elem, \"display\" )) === \"none\");\n\t};\n\n\tjQuery.expr.filters.visible = function( elem ) {\n\t\treturn !jQuery.expr.filters.hidden( elem );\n\t};\n}\n\n\n\n\nvar r20 = /%20/g,\n\trbracket = /\\[\\]$/,\n\trCRLF = /\\r?\\n/g,\n\trhash = /#.*$/,\n\trheaders = /^(.*?):[ \\t]*([^\\r\\n]*)\\r?$/mg, // IE leaves an \\r character at EOL\n\trinput = /^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,\n\t// #7653, #8125, #8152: local protocol detection\n\trlocalProtocol = /^(?:about|app|app\\-storage|.+\\-extension|file|res|widget):$/,\n\trnoContent = /^(?:GET|HEAD)$/,\n\trprotocol = /^\\/\\//,\n\trquery = /\\?/,\n\trscript = /<script\\b[^<]*(?:(?!<\\/script>)<[^<]*)*<\\/script>/gi,\n\trselectTextarea = /^(?:select|textarea)/i,\n\trspacesAjax = /\\s+/,\n\trts = /([?&])_=[^&]*/,\n\trurl = /^([\\w\\+\\.\\-]+:)(?:\\/\\/([^\\/?#:]*)(?::(\\d+))?)?/,\n\n\t// Keep a copy of the old load method\n\t_load = jQuery.fn.load,\n\n\t/* Prefilters\n\t * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)\n\t * 2) These are called:\n\t *    - BEFORE asking for a transport\n\t *    - AFTER param serialization (s.data is a string if s.processData is true)\n\t * 3) key is the dataType\n\t * 4) the catchall symbol \"*\" can be used\n\t * 5) execution will start with transport dataType and THEN continue down to \"*\" if needed\n\t */\n\tprefilters = {},\n\n\t/* Transports bindings\n\t * 1) key is the dataType\n\t * 2) the catchall symbol \"*\" can be used\n\t * 3) selection will start with transport dataType and THEN go to \"*\" if needed\n\t */\n\ttransports = {},\n\n\t// Document location\n\tajaxLocation,\n\n\t// Document location segments\n\tajaxLocParts,\n\n\t// Avoid comment-prolog char sequence (#10098); must appease lint and evade compression\n\tallTypes = [\"*/\"] + [\"*\"];\n\n// #8138, IE may throw an exception when accessing\n// a field from window.location if document.domain has been set\ntry {\n\tajaxLocation = location.href;\n} catch( e ) {\n\t// Use the href attribute of an A element\n\t// since IE will modify it given document.location\n\tajaxLocation = document.createElement( \"a\" );\n\tajaxLocation.href = \"\";\n\tajaxLocation = ajaxLocation.href;\n}\n\n// Segment location into parts\najaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || [];\n\n// Base \"constructor\" for jQuery.ajaxPrefilter and jQuery.ajaxTransport\nfunction addToPrefiltersOrTransports( structure ) {\n\n\t// dataTypeExpression is optional and defaults to \"*\"\n\treturn function( dataTypeExpression, func ) {\n\n\t\tif ( typeof dataTypeExpression !== \"string\" ) {\n\t\t\tfunc = dataTypeExpression;\n\t\t\tdataTypeExpression = \"*\";\n\t\t}\n\n\t\tif ( jQuery.isFunction( func ) ) {\n\t\t\tvar dataTypes = dataTypeExpression.toLowerCase().split( rspacesAjax ),\n\t\t\t\ti = 0,\n\t\t\t\tlength = dataTypes.length,\n\t\t\t\tdataType,\n\t\t\t\tlist,\n\t\t\t\tplaceBefore;\n\n\t\t\t// For each dataType in the dataTypeExpression\n\t\t\tfor ( ; i < length; i++ ) {\n\t\t\t\tdataType = dataTypes[ i ];\n\t\t\t\t// We control if we're asked to add before\n\t\t\t\t// any existing element\n\t\t\t\tplaceBefore = /^\\+/.test( dataType );\n\t\t\t\tif ( placeBefore ) {\n\t\t\t\t\tdataType = dataType.substr( 1 ) || \"*\";\n\t\t\t\t}\n\t\t\t\tlist = structure[ dataType ] = structure[ dataType ] || [];\n\t\t\t\t// then we add to the structure accordingly\n\t\t\t\tlist[ placeBefore ? \"unshift\" : \"push\" ]( func );\n\t\t\t}\n\t\t}\n\t};\n}\n\n// Base inspection function for prefilters and transports\nfunction inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR,\n\t\tdataType /* internal */, inspected /* internal */ ) {\n\n\tdataType = dataType || options.dataTypes[ 0 ];\n\tinspected = inspected || {};\n\n\tinspected[ dataType ] = true;\n\n\tvar list = structure[ dataType ],\n\t\ti = 0,\n\t\tlength = list ? list.length : 0,\n\t\texecuteOnly = ( structure === prefilters ),\n\t\tselection;\n\n\tfor ( ; i < length && ( executeOnly || !selection ); i++ ) {\n\t\tselection = list[ i ]( options, originalOptions, jqXHR );\n\t\t// If we got redirected to another dataType\n\t\t// we try there if executing only and not done already\n\t\tif ( typeof selection === \"string\" ) {\n\t\t\tif ( !executeOnly || inspected[ selection ] ) {\n\t\t\t\tselection = undefined;\n\t\t\t} else {\n\t\t\t\toptions.dataTypes.unshift( selection );\n\t\t\t\tselection = inspectPrefiltersOrTransports(\n\t\t\t\t\t\tstructure, options, originalOptions, jqXHR, selection, inspected );\n\t\t\t}\n\t\t}\n\t}\n\t// If we're only executing or nothing was selected\n\t// we try the catchall dataType if not done already\n\tif ( ( executeOnly || !selection ) && !inspected[ \"*\" ] ) {\n\t\tselection = inspectPrefiltersOrTransports(\n\t\t\t\tstructure, options, originalOptions, jqXHR, \"*\", inspected );\n\t}\n\t// unnecessary when only executing (prefilters)\n\t// but it'll be ignored by the caller in that case\n\treturn selection;\n}\n\n// A special extend for ajax options\n// that takes \"flat\" options (not to be deep extended)\n// Fixes #9887\nfunction ajaxExtend( target, src ) {\n\tvar key, deep,\n\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\n\tfor ( key in src ) {\n\t\tif ( src[ key ] !== undefined ) {\n\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n\t\t}\n\t}\n\tif ( deep ) {\n\t\tjQuery.extend( true, target, deep );\n\t}\n}\n\njQuery.fn.extend({\n\tload: function( url, params, callback ) {\n\t\tif ( typeof url !== \"string\" && _load ) {\n\t\t\treturn _load.apply( this, arguments );\n\n\t\t// Don't do a request if no elements are being requested\n\t\t} else if ( !this.length ) {\n\t\t\treturn this;\n\t\t}\n\n\t\tvar off = url.indexOf( \" \" );\n\t\tif ( off >= 0 ) {\n\t\t\tvar selector = url.slice( off, url.length );\n\t\t\turl = url.slice( 0, off );\n\t\t}\n\n\t\t// Default to a GET request\n\t\tvar type = \"GET\";\n\n\t\t// If the second parameter was provided\n\t\tif ( params ) {\n\t\t\t// If it's a function\n\t\t\tif ( jQuery.isFunction( params ) ) {\n\t\t\t\t// We assume that it's the callback\n\t\t\t\tcallback = params;\n\t\t\t\tparams = undefined;\n\n\t\t\t// Otherwise, build a param string\n\t\t\t} else if ( typeof params === \"object\" ) {\n\t\t\t\tparams = jQuery.param( params, jQuery.ajaxSettings.traditional );\n\t\t\t\ttype = \"POST\";\n\t\t\t}\n\t\t}\n\n\t\tvar self = this;\n\n\t\t// Request the remote document\n\t\tjQuery.ajax({\n\t\t\turl: url,\n\t\t\ttype: type,\n\t\t\tdataType: \"html\",\n\t\t\tdata: params,\n\t\t\t// Complete callback (responseText is used internally)\n\t\t\tcomplete: function( jqXHR, status, responseText ) {\n\t\t\t\t// Store the response as specified by the jqXHR object\n\t\t\t\tresponseText = jqXHR.responseText;\n\t\t\t\t// If successful, inject the HTML into all the matched elements\n\t\t\t\tif ( jqXHR.isResolved() ) {\n\t\t\t\t\t// #4825: Get the actual response in case\n\t\t\t\t\t// a dataFilter is present in ajaxSettings\n\t\t\t\t\tjqXHR.done(function( r ) {\n\t\t\t\t\t\tresponseText = r;\n\t\t\t\t\t});\n\t\t\t\t\t// See if a selector was specified\n\t\t\t\t\tself.html( selector ?\n\t\t\t\t\t\t// Create a dummy div to hold the results\n\t\t\t\t\t\tjQuery(\"<div>\")\n\t\t\t\t\t\t\t// inject the contents of the document in, removing the scripts\n\t\t\t\t\t\t\t// to avoid any 'Permission Denied' errors in IE\n\t\t\t\t\t\t\t.append(responseText.replace(rscript, \"\"))\n\n\t\t\t\t\t\t\t// Locate the specified elements\n\t\t\t\t\t\t\t.find(selector) :\n\n\t\t\t\t\t\t// If not, just inject the full result\n\t\t\t\t\t\tresponseText );\n\t\t\t\t}\n\n\t\t\t\tif ( callback ) {\n\t\t\t\t\tself.each( callback, [ responseText, status, jqXHR ] );\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\treturn this;\n\t},\n\n\tserialize: function() {\n\t\treturn jQuery.param( this.serializeArray() );\n\t},\n\n\tserializeArray: function() {\n\t\treturn this.map(function(){\n\t\t\treturn this.elements ? jQuery.makeArray( this.elements ) : this;\n\t\t})\n\t\t.filter(function(){\n\t\t\treturn this.name && !this.disabled &&\n\t\t\t\t( this.checked || rselectTextarea.test( this.nodeName ) ||\n\t\t\t\t\trinput.test( this.type ) );\n\t\t})\n\t\t.map(function( i, elem ){\n\t\t\tvar val = jQuery( this ).val();\n\n\t\t\treturn val == null ?\n\t\t\t\tnull :\n\t\t\t\tjQuery.isArray( val ) ?\n\t\t\t\t\tjQuery.map( val, function( val, i ){\n\t\t\t\t\t\treturn { name: elem.name, value: val.replace( rCRLF, \"\\r\\n\" ) };\n\t\t\t\t\t}) :\n\t\t\t\t\t{ name: elem.name, value: val.replace( rCRLF, \"\\r\\n\" ) };\n\t\t}).get();\n\t}\n});\n\n// Attach a bunch of functions for handling common AJAX events\njQuery.each( \"ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend\".split( \" \" ), function( i, o ){\n\tjQuery.fn[ o ] = function( f ){\n\t\treturn this.on( o, f );\n\t};\n});\n\njQuery.each( [ \"get\", \"post\" ], function( i, method ) {\n\tjQuery[ method ] = function( url, data, callback, type ) {\n\t\t// shift arguments if data argument was omitted\n\t\tif ( jQuery.isFunction( data ) ) {\n\t\t\ttype = type || callback;\n\t\t\tcallback = data;\n\t\t\tdata = undefined;\n\t\t}\n\n\t\treturn jQuery.ajax({\n\t\t\ttype: method,\n\t\t\turl: url,\n\t\t\tdata: data,\n\t\t\tsuccess: callback,\n\t\t\tdataType: type\n\t\t});\n\t};\n});\n\njQuery.extend({\n\n\tgetScript: function( url, callback ) {\n\t\treturn jQuery.get( url, undefined, callback, \"script\" );\n\t},\n\n\tgetJSON: function( url, data, callback ) {\n\t\treturn jQuery.get( url, data, callback, \"json\" );\n\t},\n\n\t// Creates a full fledged settings object into target\n\t// with both ajaxSettings and settings fields.\n\t// If target is omitted, writes into ajaxSettings.\n\tajaxSetup: function( target, settings ) {\n\t\tif ( settings ) {\n\t\t\t// Building a settings object\n\t\t\tajaxExtend( target, jQuery.ajaxSettings );\n\t\t} else {\n\t\t\t// Extending ajaxSettings\n\t\t\tsettings = target;\n\t\t\ttarget = jQuery.ajaxSettings;\n\t\t}\n\t\tajaxExtend( target, settings );\n\t\treturn target;\n\t},\n\n\tajaxSettings: {\n\t\turl: ajaxLocation,\n\t\tisLocal: rlocalProtocol.test( ajaxLocParts[ 1 ] ),\n\t\tglobal: true,\n\t\ttype: \"GET\",\n\t\tcontentType: \"application/x-www-form-urlencoded\",\n\t\tprocessData: true,\n\t\tasync: true,\n\t\t/*\n\t\ttimeout: 0,\n\t\tdata: null,\n\t\tdataType: null,\n\t\tusername: null,\n\t\tpassword: null,\n\t\tcache: null,\n\t\ttraditional: false,\n\t\theaders: {},\n\t\t*/\n\n\t\taccepts: {\n\t\t\txml: \"application/xml, text/xml\",\n\t\t\thtml: \"text/html\",\n\t\t\ttext: \"text/plain\",\n\t\t\tjson: \"application/json, text/javascript\",\n\t\t\t\"*\": allTypes\n\t\t},\n\n\t\tcontents: {\n\t\t\txml: /xml/,\n\t\t\thtml: /html/,\n\t\t\tjson: /json/\n\t\t},\n\n\t\tresponseFields: {\n\t\t\txml: \"responseXML\",\n\t\t\ttext: \"responseText\"\n\t\t},\n\n\t\t// List of data converters\n\t\t// 1) key format is \"source_type destination_type\" (a single space in-between)\n\t\t// 2) the catchall symbol \"*\" can be used for source_type\n\t\tconverters: {\n\n\t\t\t// Convert anything to text\n\t\t\t\"* text\": window.String,\n\n\t\t\t// Text to html (true = no transformation)\n\t\t\t\"text html\": true,\n\n\t\t\t// Evaluate text as a json expression\n\t\t\t\"text json\": jQuery.parseJSON,\n\n\t\t\t// Parse text as xml\n\t\t\t\"text xml\": jQuery.parseXML\n\t\t},\n\n\t\t// For options that shouldn't be deep extended:\n\t\t// you can add your own custom options here if\n\t\t// and when you create one that shouldn't be\n\t\t// deep extended (see ajaxExtend)\n\t\tflatOptions: {\n\t\t\tcontext: true,\n\t\t\turl: true\n\t\t}\n\t},\n\n\tajaxPrefilter: addToPrefiltersOrTransports( prefilters ),\n\tajaxTransport: addToPrefiltersOrTransports( transports ),\n\n\t// Main method\n\tajax: function( url, options ) {\n\n\t\t// If url is an object, simulate pre-1.5 signature\n\t\tif ( typeof url === \"object\" ) {\n\t\t\toptions = url;\n\t\t\turl = undefined;\n\t\t}\n\n\t\t// Force options to be an object\n\t\toptions = options || {};\n\n\t\tvar // Create the final options object\n\t\t\ts = jQuery.ajaxSetup( {}, options ),\n\t\t\t// Callbacks context\n\t\t\tcallbackContext = s.context || s,\n\t\t\t// Context for global events\n\t\t\t// It's the callbackContext if one was provided in the options\n\t\t\t// and if it's a DOM node or a jQuery collection\n\t\t\tglobalEventContext = callbackContext !== s &&\n\t\t\t\t( callbackContext.nodeType || callbackContext instanceof jQuery ) ?\n\t\t\t\t\t\tjQuery( callbackContext ) : jQuery.event,\n\t\t\t// Deferreds\n\t\t\tdeferred = jQuery.Deferred(),\n\t\t\tcompleteDeferred = jQuery.Callbacks( \"once memory\" ),\n\t\t\t// Status-dependent callbacks\n\t\t\tstatusCode = s.statusCode || {},\n\t\t\t// ifModified key\n\t\t\tifModifiedKey,\n\t\t\t// Headers (they are sent all at once)\n\t\t\trequestHeaders = {},\n\t\t\trequestHeadersNames = {},\n\t\t\t// Response headers\n\t\t\tresponseHeadersString,\n\t\t\tresponseHeaders,\n\t\t\t// transport\n\t\t\ttransport,\n\t\t\t// timeout handle\n\t\t\ttimeoutTimer,\n\t\t\t// Cross-domain detection vars\n\t\t\tparts,\n\t\t\t// The jqXHR state\n\t\t\tstate = 0,\n\t\t\t// To know if global events are to be dispatched\n\t\t\tfireGlobals,\n\t\t\t// Loop variable\n\t\t\ti,\n\t\t\t// Fake xhr\n\t\t\tjqXHR = {\n\n\t\t\t\treadyState: 0,\n\n\t\t\t\t// Caches the header\n\t\t\t\tsetRequestHeader: function( name, value ) {\n\t\t\t\t\tif ( !state ) {\n\t\t\t\t\t\tvar lname = name.toLowerCase();\n\t\t\t\t\t\tname = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name;\n\t\t\t\t\t\trequestHeaders[ name ] = value;\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\n\t\t\t\t// Raw string\n\t\t\t\tgetAllResponseHeaders: function() {\n\t\t\t\t\treturn state === 2 ? responseHeadersString : null;\n\t\t\t\t},\n\n\t\t\t\t// Builds headers hashtable if needed\n\t\t\t\tgetResponseHeader: function( key ) {\n\t\t\t\t\tvar match;\n\t\t\t\t\tif ( state === 2 ) {\n\t\t\t\t\t\tif ( !responseHeaders ) {\n\t\t\t\t\t\t\tresponseHeaders = {};\n\t\t\t\t\t\t\twhile( ( match = rheaders.exec( responseHeadersString ) ) ) {\n\t\t\t\t\t\t\t\tresponseHeaders[ match[1].toLowerCase() ] = match[ 2 ];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tmatch = responseHeaders[ key.toLowerCase() ];\n\t\t\t\t\t}\n\t\t\t\t\treturn match === undefined ? null : match;\n\t\t\t\t},\n\n\t\t\t\t// Overrides response content-type header\n\t\t\t\toverrideMimeType: function( type ) {\n\t\t\t\t\tif ( !state ) {\n\t\t\t\t\t\ts.mimeType = type;\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\n\t\t\t\t// Cancel the request\n\t\t\t\tabort: function( statusText ) {\n\t\t\t\t\tstatusText = statusText || \"abort\";\n\t\t\t\t\tif ( transport ) {\n\t\t\t\t\t\ttransport.abort( statusText );\n\t\t\t\t\t}\n\t\t\t\t\tdone( 0, statusText );\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\t\t\t};\n\n\t\t// Callback for when everything is done\n\t\t// It is defined here because jslint complains if it is declared\n\t\t// at the end of the function (which would be more logical and readable)\n\t\tfunction done( status, nativeStatusText, responses, headers ) {\n\n\t\t\t// Called once\n\t\t\tif ( state === 2 ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// State is \"done\" now\n\t\t\tstate = 2;\n\n\t\t\t// Clear timeout if it exists\n\t\t\tif ( timeoutTimer ) {\n\t\t\t\tclearTimeout( timeoutTimer );\n\t\t\t}\n\n\t\t\t// Dereference transport for early garbage collection\n\t\t\t// (no matter how long the jqXHR object will be used)\n\t\t\ttransport = undefined;\n\n\t\t\t// Cache response headers\n\t\t\tresponseHeadersString = headers || \"\";\n\n\t\t\t// Set readyState\n\t\t\tjqXHR.readyState = status > 0 ? 4 : 0;\n\n\t\t\tvar isSuccess,\n\t\t\t\tsuccess,\n\t\t\t\terror,\n\t\t\t\tstatusText = nativeStatusText,\n\t\t\t\tresponse = responses ? ajaxHandleResponses( s, jqXHR, responses ) : undefined,\n\t\t\t\tlastModified,\n\t\t\t\tetag;\n\n\t\t\t// If successful, handle type chaining\n\t\t\tif ( status >= 200 && status < 300 || status === 304 ) {\n\n\t\t\t\t// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.\n\t\t\t\tif ( s.ifModified ) {\n\n\t\t\t\t\tif ( ( lastModified = jqXHR.getResponseHeader( \"Last-Modified\" ) ) ) {\n\t\t\t\t\t\tjQuery.lastModified[ ifModifiedKey ] = lastModified;\n\t\t\t\t\t}\n\t\t\t\t\tif ( ( etag = jqXHR.getResponseHeader( \"Etag\" ) ) ) {\n\t\t\t\t\t\tjQuery.etag[ ifModifiedKey ] = etag;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// If not modified\n\t\t\t\tif ( status === 304 ) {\n\n\t\t\t\t\tstatusText = \"notmodified\";\n\t\t\t\t\tisSuccess = true;\n\n\t\t\t\t// If we have data\n\t\t\t\t} else {\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\tsuccess = ajaxConvert( s, response );\n\t\t\t\t\t\tstatusText = \"success\";\n\t\t\t\t\t\tisSuccess = true;\n\t\t\t\t\t} catch(e) {\n\t\t\t\t\t\t// We have a parsererror\n\t\t\t\t\t\tstatusText = \"parsererror\";\n\t\t\t\t\t\terror = e;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// We extract error from statusText\n\t\t\t\t// then normalize statusText and status for non-aborts\n\t\t\t\terror = statusText;\n\t\t\t\tif ( !statusText || status ) {\n\t\t\t\t\tstatusText = \"error\";\n\t\t\t\t\tif ( status < 0 ) {\n\t\t\t\t\t\tstatus = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Set data for the fake xhr object\n\t\t\tjqXHR.status = status;\n\t\t\tjqXHR.statusText = \"\" + ( nativeStatusText || statusText );\n\n\t\t\t// Success/Error\n\t\t\tif ( isSuccess ) {\n\t\t\t\tdeferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );\n\t\t\t} else {\n\t\t\t\tdeferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );\n\t\t\t}\n\n\t\t\t// Status-dependent callbacks\n\t\t\tjqXHR.statusCode( statusCode );\n\t\t\tstatusCode = undefined;\n\n\t\t\tif ( fireGlobals ) {\n\t\t\t\tglobalEventContext.trigger( \"ajax\" + ( isSuccess ? \"Success\" : \"Error\" ),\n\t\t\t\t\t\t[ jqXHR, s, isSuccess ? success : error ] );\n\t\t\t}\n\n\t\t\t// Complete\n\t\t\tcompleteDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );\n\n\t\t\tif ( fireGlobals ) {\n\t\t\t\tglobalEventContext.trigger( \"ajaxComplete\", [ jqXHR, s ] );\n\t\t\t\t// Handle the global AJAX counter\n\t\t\t\tif ( !( --jQuery.active ) ) {\n\t\t\t\t\tjQuery.event.trigger( \"ajaxStop\" );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Attach deferreds\n\t\tdeferred.promise( jqXHR );\n\t\tjqXHR.success = jqXHR.done;\n\t\tjqXHR.error = jqXHR.fail;\n\t\tjqXHR.complete = completeDeferred.add;\n\n\t\t// Status-dependent callbacks\n\t\tjqXHR.statusCode = function( map ) {\n\t\t\tif ( map ) {\n\t\t\t\tvar tmp;\n\t\t\t\tif ( state < 2 ) {\n\t\t\t\t\tfor ( tmp in map ) {\n\t\t\t\t\t\tstatusCode[ tmp ] = [ statusCode[tmp], map[tmp] ];\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\ttmp = map[ jqXHR.status ];\n\t\t\t\t\tjqXHR.then( tmp, tmp );\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn this;\n\t\t};\n\n\t\t// Remove hash character (#7531: and string promotion)\n\t\t// Add protocol if not provided (#5866: IE7 issue with protocol-less urls)\n\t\t// We also use the url parameter if available\n\t\ts.url = ( ( url || s.url ) + \"\" ).replace( rhash, \"\" ).replace( rprotocol, ajaxLocParts[ 1 ] + \"//\" );\n\n\t\t// Extract dataTypes list\n\t\ts.dataTypes = jQuery.trim( s.dataType || \"*\" ).toLowerCase().split( rspacesAjax );\n\n\t\t// Determine if a cross-domain request is in order\n\t\tif ( s.crossDomain == null ) {\n\t\t\tparts = rurl.exec( s.url.toLowerCase() );\n\t\t\ts.crossDomain = !!( parts &&\n\t\t\t\t( parts[ 1 ] != ajaxLocParts[ 1 ] || parts[ 2 ] != ajaxLocParts[ 2 ] ||\n\t\t\t\t\t( parts[ 3 ] || ( parts[ 1 ] === \"http:\" ? 80 : 443 ) ) !=\n\t\t\t\t\t\t( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === \"http:\" ? 80 : 443 ) ) )\n\t\t\t);\n\t\t}\n\n\t\t// Convert data if not already a string\n\t\tif ( s.data && s.processData && typeof s.data !== \"string\" ) {\n\t\t\ts.data = jQuery.param( s.data, s.traditional );\n\t\t}\n\n\t\t// Apply prefilters\n\t\tinspectPrefiltersOrTransports( prefilters, s, options, jqXHR );\n\n\t\t// If request was aborted inside a prefiler, stop there\n\t\tif ( state === 2 ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// We can fire global events as of now if asked to\n\t\tfireGlobals = s.global;\n\n\t\t// Uppercase the type\n\t\ts.type = s.type.toUpperCase();\n\n\t\t// Determine if request has content\n\t\ts.hasContent = !rnoContent.test( s.type );\n\n\t\t// Watch for a new set of requests\n\t\tif ( fireGlobals && jQuery.active++ === 0 ) {\n\t\t\tjQuery.event.trigger( \"ajaxStart\" );\n\t\t}\n\n\t\t// More options handling for requests with no content\n\t\tif ( !s.hasContent ) {\n\n\t\t\t// If data is available, append data to url\n\t\t\tif ( s.data ) {\n\t\t\t\ts.url += ( rquery.test( s.url ) ? \"&\" : \"?\" ) + s.data;\n\t\t\t\t// #9682: remove data so that it's not used in an eventual retry\n\t\t\t\tdelete s.data;\n\t\t\t}\n\n\t\t\t// Get ifModifiedKey before adding the anti-cache parameter\n\t\t\tifModifiedKey = s.url;\n\n\t\t\t// Add anti-cache in url if needed\n\t\t\tif ( s.cache === false ) {\n\n\t\t\t\tvar ts = jQuery.now(),\n\t\t\t\t\t// try replacing _= if it is there\n\t\t\t\t\tret = s.url.replace( rts, \"$1_=\" + ts );\n\n\t\t\t\t// if nothing was replaced, add timestamp to the end\n\t\t\t\ts.url = ret + ( ( ret === s.url ) ? ( rquery.test( s.url ) ? \"&\" : \"?\" ) + \"_=\" + ts : \"\" );\n\t\t\t}\n\t\t}\n\n\t\t// Set the correct header, if data is being sent\n\t\tif ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {\n\t\t\tjqXHR.setRequestHeader( \"Content-Type\", s.contentType );\n\t\t}\n\n\t\t// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.\n\t\tif ( s.ifModified ) {\n\t\t\tifModifiedKey = ifModifiedKey || s.url;\n\t\t\tif ( jQuery.lastModified[ ifModifiedKey ] ) {\n\t\t\t\tjqXHR.setRequestHeader( \"If-Modified-Since\", jQuery.lastModified[ ifModifiedKey ] );\n\t\t\t}\n\t\t\tif ( jQuery.etag[ ifModifiedKey ] ) {\n\t\t\t\tjqXHR.setRequestHeader( \"If-None-Match\", jQuery.etag[ ifModifiedKey ] );\n\t\t\t}\n\t\t}\n\n\t\t// Set the Accepts header for the server, depending on the dataType\n\t\tjqXHR.setRequestHeader(\n\t\t\t\"Accept\",\n\t\t\ts.dataTypes[ 0 ] && s.accepts[ s.dataTypes[0] ] ?\n\t\t\t\ts.accepts[ s.dataTypes[0] ] + ( s.dataTypes[ 0 ] !== \"*\" ? \", \" + allTypes + \"; q=0.01\" : \"\" ) :\n\t\t\t\ts.accepts[ \"*\" ]\n\t\t);\n\n\t\t// Check for headers option\n\t\tfor ( i in s.headers ) {\n\t\t\tjqXHR.setRequestHeader( i, s.headers[ i ] );\n\t\t}\n\n\t\t// Allow custom headers/mimetypes and early abort\n\t\tif ( s.beforeSend && ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) {\n\t\t\t\t// Abort if not done already\n\t\t\t\tjqXHR.abort();\n\t\t\t\treturn false;\n\n\t\t}\n\n\t\t// Install callbacks on deferreds\n\t\tfor ( i in { success: 1, error: 1, complete: 1 } ) {\n\t\t\tjqXHR[ i ]( s[ i ] );\n\t\t}\n\n\t\t// Get transport\n\t\ttransport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );\n\n\t\t// If no transport, we auto-abort\n\t\tif ( !transport ) {\n\t\t\tdone( -1, \"No Transport\" );\n\t\t} else {\n\t\t\tjqXHR.readyState = 1;\n\t\t\t// Send global event\n\t\t\tif ( fireGlobals ) {\n\t\t\t\tglobalEventContext.trigger( \"ajaxSend\", [ jqXHR, s ] );\n\t\t\t}\n\t\t\t// Timeout\n\t\t\tif ( s.async && s.timeout > 0 ) {\n\t\t\t\ttimeoutTimer = setTimeout( function(){\n\t\t\t\t\tjqXHR.abort( \"timeout\" );\n\t\t\t\t}, s.timeout );\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\tstate = 1;\n\t\t\t\ttransport.send( requestHeaders, done );\n\t\t\t} catch (e) {\n\t\t\t\t// Propagate exception as error if not done\n\t\t\t\tif ( state < 2 ) {\n\t\t\t\t\tdone( -1, e );\n\t\t\t\t// Simply rethrow otherwise\n\t\t\t\t} else {\n\t\t\t\t\tthrow e;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn jqXHR;\n\t},\n\n\t// Serialize an array of form elements or a set of\n\t// key/values into a query string\n\tparam: function( a, traditional ) {\n\t\tvar s = [],\n\t\t\tadd = function( key, value ) {\n\t\t\t\t// If value is a function, invoke it and return its value\n\t\t\t\tvalue = jQuery.isFunction( value ) ? value() : value;\n\t\t\t\ts[ s.length ] = encodeURIComponent( key ) + \"=\" + encodeURIComponent( value );\n\t\t\t};\n\n\t\t// Set traditional to true for jQuery <= 1.3.2 behavior.\n\t\tif ( traditional === undefined ) {\n\t\t\ttraditional = jQuery.ajaxSettings.traditional;\n\t\t}\n\n\t\t// If an array was passed in, assume that it is an array of form elements.\n\t\tif ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {\n\t\t\t// Serialize the form elements\n\t\t\tjQuery.each( a, function() {\n\t\t\t\tadd( this.name, this.value );\n\t\t\t});\n\n\t\t} else {\n\t\t\t// If traditional, encode the \"old\" way (the way 1.3.2 or older\n\t\t\t// did it), otherwise encode params recursively.\n\t\t\tfor ( var prefix in a ) {\n\t\t\t\tbuildParams( prefix, a[ prefix ], traditional, add );\n\t\t\t}\n\t\t}\n\n\t\t// Return the resulting serialization\n\t\treturn s.join( \"&\" ).replace( r20, \"+\" );\n\t}\n});\n\nfunction buildParams( prefix, obj, traditional, add ) {\n\tif ( jQuery.isArray( obj ) ) {\n\t\t// Serialize array item.\n\t\tjQuery.each( obj, function( i, v ) {\n\t\t\tif ( traditional || rbracket.test( prefix ) ) {\n\t\t\t\t// Treat each array item as a scalar.\n\t\t\t\tadd( prefix, v );\n\n\t\t\t} else {\n\t\t\t\t// If array item is non-scalar (array or object), encode its\n\t\t\t\t// numeric index to resolve deserialization ambiguity issues.\n\t\t\t\t// Note that rack (as of 1.0.0) can't currently deserialize\n\t\t\t\t// nested arrays properly, and attempting to do so may cause\n\t\t\t\t// a server error. Possible fixes are to modify rack's\n\t\t\t\t// deserialization algorithm or to provide an option or flag\n\t\t\t\t// to force array serialization to be shallow.\n\t\t\t\tbuildParams( prefix + \"[\" + ( typeof v === \"object\" || jQuery.isArray(v) ? i : \"\" ) + \"]\", v, traditional, add );\n\t\t\t}\n\t\t});\n\n\t} else if ( !traditional && obj != null && typeof obj === \"object\" ) {\n\t\t// Serialize object item.\n\t\tfor ( var name in obj ) {\n\t\t\tbuildParams( prefix + \"[\" + name + \"]\", obj[ name ], traditional, add );\n\t\t}\n\n\t} else {\n\t\t// Serialize scalar item.\n\t\tadd( prefix, obj );\n\t}\n}\n\n// This is still on the jQuery object... for now\n// Want to move this to jQuery.ajax some day\njQuery.extend({\n\n\t// Counter for holding the number of active queries\n\tactive: 0,\n\n\t// Last-Modified header cache for next request\n\tlastModified: {},\n\tetag: {}\n\n});\n\n/* Handles responses to an ajax request:\n * - sets all responseXXX fields accordingly\n * - finds the right dataType (mediates between content-type and expected dataType)\n * - returns the corresponding response\n */\nfunction ajaxHandleResponses( s, jqXHR, responses ) {\n\n\tvar contents = s.contents,\n\t\tdataTypes = s.dataTypes,\n\t\tresponseFields = s.responseFields,\n\t\tct,\n\t\ttype,\n\t\tfinalDataType,\n\t\tfirstDataType;\n\n\t// Fill responseXXX fields\n\tfor ( type in responseFields ) {\n\t\tif ( type in responses ) {\n\t\t\tjqXHR[ responseFields[type] ] = responses[ type ];\n\t\t}\n\t}\n\n\t// Remove auto dataType and get content-type in the process\n\twhile( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader( \"content-type\" );\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}\n\n// Chain conversions given the request and the original response\nfunction ajaxConvert( s, response ) {\n\n\t// Apply the dataFilter if provided\n\tif ( s.dataFilter ) {\n\t\tresponse = s.dataFilter( response, s.dataType );\n\t}\n\n\tvar dataTypes = s.dataTypes,\n\t\tconverters = {},\n\t\ti,\n\t\tkey,\n\t\tlength = dataTypes.length,\n\t\ttmp,\n\t\t// Current and previous dataTypes\n\t\tcurrent = dataTypes[ 0 ],\n\t\tprev,\n\t\t// Conversion expression\n\t\tconversion,\n\t\t// Conversion function\n\t\tconv,\n\t\t// Conversion functions (transitive conversion)\n\t\tconv1,\n\t\tconv2;\n\n\t// For each dataType in the chain\n\tfor ( i = 1; i < length; i++ ) {\n\n\t\t// Create converters map\n\t\t// with lowercased keys\n\t\tif ( i === 1 ) {\n\t\t\tfor ( key in s.converters ) {\n\t\t\t\tif ( typeof key === \"string\" ) {\n\t\t\t\t\tconverters[ key.toLowerCase() ] = s.converters[ key ];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Get the dataTypes\n\t\tprev = current;\n\t\tcurrent = dataTypes[ i ];\n\n\t\t// If current is auto dataType, update it to prev\n\t\tif ( current === \"*\" ) {\n\t\t\tcurrent = prev;\n\t\t// If no auto and dataTypes are actually different\n\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t// Get the converter\n\t\t\tconversion = prev + \" \" + current;\n\t\t\tconv = converters[ conversion ] || converters[ \"* \" + current ];\n\n\t\t\t// If there is no direct converter, search transitively\n\t\t\tif ( !conv ) {\n\t\t\t\tconv2 = undefined;\n\t\t\t\tfor ( conv1 in converters ) {\n\t\t\t\t\ttmp = conv1.split( \" \" );\n\t\t\t\t\tif ( tmp[ 0 ] === prev || tmp[ 0 ] === \"*\" ) {\n\t\t\t\t\t\tconv2 = converters[ tmp[1] + \" \" + current ];\n\t\t\t\t\t\tif ( conv2 ) {\n\t\t\t\t\t\t\tconv1 = converters[ conv1 ];\n\t\t\t\t\t\t\tif ( conv1 === true ) {\n\t\t\t\t\t\t\t\tconv = conv2;\n\t\t\t\t\t\t\t} else if ( conv2 === true ) {\n\t\t\t\t\t\t\t\tconv = conv1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// If we found no converter, dispatch an error\n\t\t\tif ( !( conv || conv2 ) ) {\n\t\t\t\tjQuery.error( \"No conversion from \" + conversion.replace(\" \",\" to \") );\n\t\t\t}\n\t\t\t// If found converter is not an equivalence\n\t\t\tif ( conv !== true ) {\n\t\t\t\t// Convert with 1 or 2 converters accordingly\n\t\t\t\tresponse = conv ? conv( response ) : conv2( conv1(response) );\n\t\t\t}\n\t\t}\n\t}\n\treturn response;\n}\n\n\n\n\nvar jsc = jQuery.now(),\n\tjsre = /(\\=)\\?(&|$)|\\?\\?/i;\n\n// Default jsonp settings\njQuery.ajaxSetup({\n\tjsonp: \"callback\",\n\tjsonpCallback: function() {\n\t\treturn jQuery.expando + \"_\" + ( jsc++ );\n\t}\n});\n\n// Detect, normalize options and install callbacks for jsonp requests\njQuery.ajaxPrefilter( \"json jsonp\", function( s, originalSettings, jqXHR ) {\n\n\tvar inspectData = s.contentType === \"application/x-www-form-urlencoded\" &&\n\t\t( typeof s.data === \"string\" );\n\n\tif ( s.dataTypes[ 0 ] === \"jsonp\" ||\n\t\ts.jsonp !== false && ( jsre.test( s.url ) ||\n\t\t\t\tinspectData && jsre.test( s.data ) ) ) {\n\n\t\tvar responseContainer,\n\t\t\tjsonpCallback = s.jsonpCallback =\n\t\t\t\tjQuery.isFunction( s.jsonpCallback ) ? s.jsonpCallback() : s.jsonpCallback,\n\t\t\tprevious = window[ jsonpCallback ],\n\t\t\turl = s.url,\n\t\t\tdata = s.data,\n\t\t\treplace = \"$1\" + jsonpCallback + \"$2\";\n\n\t\tif ( s.jsonp !== false ) {\n\t\t\turl = url.replace( jsre, replace );\n\t\t\tif ( s.url === url ) {\n\t\t\t\tif ( inspectData ) {\n\t\t\t\t\tdata = data.replace( jsre, replace );\n\t\t\t\t}\n\t\t\t\tif ( s.data === data ) {\n\t\t\t\t\t// Add callback manually\n\t\t\t\t\turl += (/\\?/.test( url ) ? \"&\" : \"?\") + s.jsonp + \"=\" + jsonpCallback;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\ts.url = url;\n\t\ts.data = data;\n\n\t\t// Install callback\n\t\twindow[ jsonpCallback ] = function( response ) {\n\t\t\tresponseContainer = [ response ];\n\t\t};\n\n\t\t// Clean-up function\n\t\tjqXHR.always(function() {\n\t\t\t// Set callback back to previous value\n\t\t\twindow[ jsonpCallback ] = previous;\n\t\t\t// Call if it was a function and we have a response\n\t\t\tif ( responseContainer && jQuery.isFunction( previous ) ) {\n\t\t\t\twindow[ jsonpCallback ]( responseContainer[ 0 ] );\n\t\t\t}\n\t\t});\n\n\t\t// Use data converter to retrieve json after script execution\n\t\ts.converters[\"script json\"] = function() {\n\t\t\tif ( !responseContainer ) {\n\t\t\t\tjQuery.error( jsonpCallback + \" was not called\" );\n\t\t\t}\n\t\t\treturn responseContainer[ 0 ];\n\t\t};\n\n\t\t// force json dataType\n\t\ts.dataTypes[ 0 ] = \"json\";\n\n\t\t// Delegate to script\n\t\treturn \"script\";\n\t}\n});\n\n\n\n\n// Install script dataType\njQuery.ajaxSetup({\n\taccepts: {\n\t\tscript: \"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript\"\n\t},\n\tcontents: {\n\t\tscript: /javascript|ecmascript/\n\t},\n\tconverters: {\n\t\t\"text script\": function( text ) {\n\t\t\tjQuery.globalEval( text );\n\t\t\treturn text;\n\t\t}\n\t}\n});\n\n// Handle cache's special case and global\njQuery.ajaxPrefilter( \"script\", function( s ) {\n\tif ( s.cache === undefined ) {\n\t\ts.cache = false;\n\t}\n\tif ( s.crossDomain ) {\n\t\ts.type = \"GET\";\n\t\ts.global = false;\n\t}\n});\n\n// Bind script tag hack transport\njQuery.ajaxTransport( \"script\", function(s) {\n\n\t// This transport only deals with cross domain requests\n\tif ( s.crossDomain ) {\n\n\t\tvar script,\n\t\t\thead = document.head || document.getElementsByTagName( \"head\" )[0] || document.documentElement;\n\n\t\treturn {\n\n\t\t\tsend: function( _, callback ) {\n\n\t\t\t\tscript = document.createElement( \"script\" );\n\n\t\t\t\tscript.async = \"async\";\n\n\t\t\t\tif ( s.scriptCharset ) {\n\t\t\t\t\tscript.charset = s.scriptCharset;\n\t\t\t\t}\n\n\t\t\t\tscript.src = s.url;\n\n\t\t\t\t// Attach handlers for all browsers\n\t\t\t\tscript.onload = script.onreadystatechange = function( _, isAbort ) {\n\n\t\t\t\t\tif ( isAbort || !script.readyState || /loaded|complete/.test( script.readyState ) ) {\n\n\t\t\t\t\t\t// Handle memory leak in IE\n\t\t\t\t\t\tscript.onload = script.onreadystatechange = null;\n\n\t\t\t\t\t\t// Remove the script\n\t\t\t\t\t\tif ( head && script.parentNode ) {\n\t\t\t\t\t\t\thead.removeChild( script );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Dereference the script\n\t\t\t\t\t\tscript = undefined;\n\n\t\t\t\t\t\t// Callback if not abort\n\t\t\t\t\t\tif ( !isAbort ) {\n\t\t\t\t\t\t\tcallback( 200, \"success\" );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\t// Use insertBefore instead of appendChild  to circumvent an IE6 bug.\n\t\t\t\t// This arises when a base node is used (#2709 and #4378).\n\t\t\t\thead.insertBefore( script, head.firstChild );\n\t\t\t},\n\n\t\t\tabort: function() {\n\t\t\t\tif ( script ) {\n\t\t\t\t\tscript.onload( 0, 1 );\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t}\n});\n\n\n\n\nvar // #5280: Internet Explorer will keep connections alive if we don't abort on unload\n\txhrOnUnloadAbort = window.ActiveXObject ? function() {\n\t\t// Abort all pending requests\n\t\tfor ( var key in xhrCallbacks ) {\n\t\t\txhrCallbacks[ key ]( 0, 1 );\n\t\t}\n\t} : false,\n\txhrId = 0,\n\txhrCallbacks;\n\n// Functions to create xhrs\nfunction createStandardXHR() {\n\ttry {\n\t\treturn new window.XMLHttpRequest();\n\t} catch( e ) {}\n}\n\nfunction createActiveXHR() {\n\ttry {\n\t\treturn new window.ActiveXObject( \"Microsoft.XMLHTTP\" );\n\t} catch( e ) {}\n}\n\n// Create the request object\n// (This is still attached to ajaxSettings for backward compatibility)\njQuery.ajaxSettings.xhr = window.ActiveXObject ?\n\t/* Microsoft failed to properly\n\t * implement the XMLHttpRequest in IE7 (can't request local files),\n\t * so we use the ActiveXObject when it is available\n\t * Additionally XMLHttpRequest can be disabled in IE7/IE8 so\n\t * we need a fallback.\n\t */\n\tfunction() {\n\t\treturn !this.isLocal && createStandardXHR() || createActiveXHR();\n\t} :\n\t// For all other browsers, use the standard XMLHttpRequest object\n\tcreateStandardXHR;\n\n// Determine support properties\n(function( xhr ) {\n\tjQuery.extend( jQuery.support, {\n\t\tajax: !!xhr,\n\t\tcors: !!xhr && ( \"withCredentials\" in xhr )\n\t});\n})( jQuery.ajaxSettings.xhr() );\n\n// Create transport if the browser can provide an xhr\nif ( jQuery.support.ajax ) {\n\n\tjQuery.ajaxTransport(function( s ) {\n\t\t// Cross domain only allowed if supported through XMLHttpRequest\n\t\tif ( !s.crossDomain || jQuery.support.cors ) {\n\n\t\t\tvar callback;\n\n\t\t\treturn {\n\t\t\t\tsend: function( headers, complete ) {\n\n\t\t\t\t\t// Get a new xhr\n\t\t\t\t\tvar xhr = s.xhr(),\n\t\t\t\t\t\thandle,\n\t\t\t\t\t\ti;\n\n\t\t\t\t\t// Open the socket\n\t\t\t\t\t// Passing null username, generates a login popup on Opera (#2865)\n\t\t\t\t\tif ( s.username ) {\n\t\t\t\t\t\txhr.open( s.type, s.url, s.async, s.username, s.password );\n\t\t\t\t\t} else {\n\t\t\t\t\t\txhr.open( s.type, s.url, s.async );\n\t\t\t\t\t}\n\n\t\t\t\t\t// Apply custom fields if provided\n\t\t\t\t\tif ( s.xhrFields ) {\n\t\t\t\t\t\tfor ( i in s.xhrFields ) {\n\t\t\t\t\t\t\txhr[ i ] = s.xhrFields[ i ];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Override mime type if needed\n\t\t\t\t\tif ( s.mimeType && xhr.overrideMimeType ) {\n\t\t\t\t\t\txhr.overrideMimeType( s.mimeType );\n\t\t\t\t\t}\n\n\t\t\t\t\t// X-Requested-With header\n\t\t\t\t\t// For cross-domain requests, seeing as conditions for a preflight are\n\t\t\t\t\t// akin to a jigsaw puzzle, we simply never set it to be sure.\n\t\t\t\t\t// (it can always be set on a per-request basis or even using ajaxSetup)\n\t\t\t\t\t// For same-domain requests, won't change header if already provided.\n\t\t\t\t\tif ( !s.crossDomain && !headers[\"X-Requested-With\"] ) {\n\t\t\t\t\t\theaders[ \"X-Requested-With\" ] = \"XMLHttpRequest\";\n\t\t\t\t\t}\n\n\t\t\t\t\t// Need an extra try/catch for cross domain requests in Firefox 3\n\t\t\t\t\ttry {\n\t\t\t\t\t\tfor ( i in headers ) {\n\t\t\t\t\t\t\txhr.setRequestHeader( i, headers[ i ] );\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch( _ ) {}\n\n\t\t\t\t\t// Do send the request\n\t\t\t\t\t// This may raise an exception which is actually\n\t\t\t\t\t// handled in jQuery.ajax (so no try/catch here)\n\t\t\t\t\txhr.send( ( s.hasContent && s.data ) || null );\n\n\t\t\t\t\t// Listener\n\t\t\t\t\tcallback = function( _, isAbort ) {\n\n\t\t\t\t\t\tvar status,\n\t\t\t\t\t\t\tstatusText,\n\t\t\t\t\t\t\tresponseHeaders,\n\t\t\t\t\t\t\tresponses,\n\t\t\t\t\t\t\txml;\n\n\t\t\t\t\t\t// Firefox throws exceptions when accessing properties\n\t\t\t\t\t\t// of an xhr when a network error occured\n\t\t\t\t\t\t// http://helpful.knobs-dials.com/index.php/Component_returned_failure_code:_0x80040111_(NS_ERROR_NOT_AVAILABLE)\n\t\t\t\t\t\ttry {\n\n\t\t\t\t\t\t\t// Was never called and is aborted or complete\n\t\t\t\t\t\t\tif ( callback && ( isAbort || xhr.readyState === 4 ) ) {\n\n\t\t\t\t\t\t\t\t// Only called once\n\t\t\t\t\t\t\t\tcallback = undefined;\n\n\t\t\t\t\t\t\t\t// Do not keep as active anymore\n\t\t\t\t\t\t\t\tif ( handle ) {\n\t\t\t\t\t\t\t\t\txhr.onreadystatechange = jQuery.noop;\n\t\t\t\t\t\t\t\t\tif ( xhrOnUnloadAbort ) {\n\t\t\t\t\t\t\t\t\t\tdelete xhrCallbacks[ handle ];\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// If it's an abort\n\t\t\t\t\t\t\t\tif ( isAbort ) {\n\t\t\t\t\t\t\t\t\t// Abort it manually if needed\n\t\t\t\t\t\t\t\t\tif ( xhr.readyState !== 4 ) {\n\t\t\t\t\t\t\t\t\t\txhr.abort();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tstatus = xhr.status;\n\t\t\t\t\t\t\t\t\tresponseHeaders = xhr.getAllResponseHeaders();\n\t\t\t\t\t\t\t\t\tresponses = {};\n\t\t\t\t\t\t\t\t\txml = xhr.responseXML;\n\n\t\t\t\t\t\t\t\t\t// Construct response list\n\t\t\t\t\t\t\t\t\tif ( xml && xml.documentElement /* #4958 */ ) {\n\t\t\t\t\t\t\t\t\t\tresponses.xml = xml;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tresponses.text = xhr.responseText;\n\n\t\t\t\t\t\t\t\t\t// Firefox throws an exception when accessing\n\t\t\t\t\t\t\t\t\t// statusText for faulty cross-domain requests\n\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\tstatusText = xhr.statusText;\n\t\t\t\t\t\t\t\t\t} catch( e ) {\n\t\t\t\t\t\t\t\t\t\t// We normalize with Webkit giving an empty statusText\n\t\t\t\t\t\t\t\t\t\tstatusText = \"\";\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t// Filter status for non standard behaviors\n\n\t\t\t\t\t\t\t\t\t// If the request is local and we have data: assume a success\n\t\t\t\t\t\t\t\t\t// (success with no data won't get notified, that's the best we\n\t\t\t\t\t\t\t\t\t// can do given current implementations)\n\t\t\t\t\t\t\t\t\tif ( !status && s.isLocal && !s.crossDomain ) {\n\t\t\t\t\t\t\t\t\t\tstatus = responses.text ? 200 : 404;\n\t\t\t\t\t\t\t\t\t// IE - #1450: sometimes returns 1223 when it should be 204\n\t\t\t\t\t\t\t\t\t} else if ( status === 1223 ) {\n\t\t\t\t\t\t\t\t\t\tstatus = 204;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} catch( firefoxAccessException ) {\n\t\t\t\t\t\t\tif ( !isAbort ) {\n\t\t\t\t\t\t\t\tcomplete( -1, firefoxAccessException );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Call complete if needed\n\t\t\t\t\t\tif ( responses ) {\n\t\t\t\t\t\t\tcomplete( status, statusText, responses, responseHeaders );\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\n\t\t\t\t\t// if we're in sync mode or it's in cache\n\t\t\t\t\t// and has been retrieved directly (IE6 & IE7)\n\t\t\t\t\t// we need to manually fire the callback\n\t\t\t\t\tif ( !s.async || xhr.readyState === 4 ) {\n\t\t\t\t\t\tcallback();\n\t\t\t\t\t} else {\n\t\t\t\t\t\thandle = ++xhrId;\n\t\t\t\t\t\tif ( xhrOnUnloadAbort ) {\n\t\t\t\t\t\t\t// Create the active xhrs callbacks list if needed\n\t\t\t\t\t\t\t// and attach the unload handler\n\t\t\t\t\t\t\tif ( !xhrCallbacks ) {\n\t\t\t\t\t\t\t\txhrCallbacks = {};\n\t\t\t\t\t\t\t\tjQuery( window ).unload( xhrOnUnloadAbort );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// Add to list of active xhrs callbacks\n\t\t\t\t\t\t\txhrCallbacks[ handle ] = callback;\n\t\t\t\t\t\t}\n\t\t\t\t\t\txhr.onreadystatechange = callback;\n\t\t\t\t\t}\n\t\t\t\t},\n\n\t\t\t\tabort: function() {\n\t\t\t\t\tif ( callback ) {\n\t\t\t\t\t\tcallback(0,1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t});\n}\n\n\n\n\nvar elemdisplay = {},\n\tiframe, iframeDoc,\n\trfxtypes = /^(?:toggle|show|hide)$/,\n\trfxnum = /^([+\\-]=)?([\\d+.\\-]+)([a-z%]*)$/i,\n\ttimerId,\n\tfxAttrs = [\n\t\t// height animations\n\t\t[ \"height\", \"marginTop\", \"marginBottom\", \"paddingTop\", \"paddingBottom\" ],\n\t\t// width animations\n\t\t[ \"width\", \"marginLeft\", \"marginRight\", \"paddingLeft\", \"paddingRight\" ],\n\t\t// opacity animations\n\t\t[ \"opacity\" ]\n\t],\n\tfxNow;\n\njQuery.fn.extend({\n\tshow: function( speed, easing, callback ) {\n\t\tvar elem, display;\n\n\t\tif ( speed || speed === 0 ) {\n\t\t\treturn this.animate( genFx(\"show\", 3), speed, easing, callback );\n\n\t\t} else {\n\t\t\tfor ( var i = 0, j = this.length; i < j; i++ ) {\n\t\t\t\telem = this[ i ];\n\n\t\t\t\tif ( elem.style ) {\n\t\t\t\t\tdisplay = elem.style.display;\n\n\t\t\t\t\t// Reset the inline display of this element to learn if it is\n\t\t\t\t\t// being hidden by cascaded rules or not\n\t\t\t\t\tif ( !jQuery._data(elem, \"olddisplay\") && display === \"none\" ) {\n\t\t\t\t\t\tdisplay = elem.style.display = \"\";\n\t\t\t\t\t}\n\n\t\t\t\t\t// Set elements which have been overridden with display: none\n\t\t\t\t\t// in a stylesheet to whatever the default browser style is\n\t\t\t\t\t// for such an element\n\t\t\t\t\tif ( display === \"\" && jQuery.css(elem, \"display\") === \"none\" ) {\n\t\t\t\t\t\tjQuery._data( elem, \"olddisplay\", defaultDisplay(elem.nodeName) );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Set the display of most of the elements in a second loop\n\t\t\t// to avoid the constant reflow\n\t\t\tfor ( i = 0; i < j; i++ ) {\n\t\t\t\telem = this[ i ];\n\n\t\t\t\tif ( elem.style ) {\n\t\t\t\t\tdisplay = elem.style.display;\n\n\t\t\t\t\tif ( display === \"\" || display === \"none\" ) {\n\t\t\t\t\t\telem.style.display = jQuery._data( elem, \"olddisplay\" ) || \"\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn this;\n\t\t}\n\t},\n\n\thide: function( speed, easing, callback ) {\n\t\tif ( speed || speed === 0 ) {\n\t\t\treturn this.animate( genFx(\"hide\", 3), speed, easing, callback);\n\n\t\t} else {\n\t\t\tvar elem, display,\n\t\t\t\ti = 0,\n\t\t\t\tj = this.length;\n\n\t\t\tfor ( ; i < j; i++ ) {\n\t\t\t\telem = this[i];\n\t\t\t\tif ( elem.style ) {\n\t\t\t\t\tdisplay = jQuery.css( elem, \"display\" );\n\n\t\t\t\t\tif ( display !== \"none\" && !jQuery._data( elem, \"olddisplay\" ) ) {\n\t\t\t\t\t\tjQuery._data( elem, \"olddisplay\", display );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Set the display of the elements in a second loop\n\t\t\t// to avoid the constant reflow\n\t\t\tfor ( i = 0; i < j; i++ ) {\n\t\t\t\tif ( this[i].style ) {\n\t\t\t\t\tthis[i].style.display = \"none\";\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn this;\n\t\t}\n\t},\n\n\t// Save the old toggle function\n\t_toggle: jQuery.fn.toggle,\n\n\ttoggle: function( fn, fn2, callback ) {\n\t\tvar bool = typeof fn === \"boolean\";\n\n\t\tif ( jQuery.isFunction(fn) && jQuery.isFunction(fn2) ) {\n\t\t\tthis._toggle.apply( this, arguments );\n\n\t\t} else if ( fn == null || bool ) {\n\t\t\tthis.each(function() {\n\t\t\t\tvar state = bool ? fn : jQuery(this).is(\":hidden\");\n\t\t\t\tjQuery(this)[ state ? \"show\" : \"hide\" ]();\n\t\t\t});\n\n\t\t} else {\n\t\t\tthis.animate(genFx(\"toggle\", 3), fn, fn2, callback);\n\t\t}\n\n\t\treturn this;\n\t},\n\n\tfadeTo: function( speed, to, easing, callback ) {\n\t\treturn this.filter(\":hidden\").css(\"opacity\", 0).show().end()\n\t\t\t\t\t.animate({opacity: to}, speed, easing, callback);\n\t},\n\n\tanimate: function( prop, speed, easing, callback ) {\n\t\tvar optall = jQuery.speed( speed, easing, callback );\n\n\t\tif ( jQuery.isEmptyObject( prop ) ) {\n\t\t\treturn this.each( optall.complete, [ false ] );\n\t\t}\n\n\t\t// Do not change referenced properties as per-property easing will be lost\n\t\tprop = jQuery.extend( {}, prop );\n\n\t\tfunction doAnimation() {\n\t\t\t// XXX 'this' does not always have a nodeName when running the\n\t\t\t// test suite\n\n\t\t\tif ( optall.queue === false ) {\n\t\t\t\tjQuery._mark( this );\n\t\t\t}\n\n\t\t\tvar opt = jQuery.extend( {}, optall ),\n\t\t\t\tisElement = this.nodeType === 1,\n\t\t\t\thidden = isElement && jQuery(this).is(\":hidden\"),\n\t\t\t\tname, val, p, e,\n\t\t\t\tparts, start, end, unit,\n\t\t\t\tmethod;\n\n\t\t\t// will store per property easing and be used to determine when an animation is complete\n\t\t\topt.animatedProperties = {};\n\n\t\t\tfor ( p in prop ) {\n\n\t\t\t\t// property name normalization\n\t\t\t\tname = jQuery.camelCase( p );\n\t\t\t\tif ( p !== name ) {\n\t\t\t\t\tprop[ name ] = prop[ p ];\n\t\t\t\t\tdelete prop[ p ];\n\t\t\t\t}\n\n\t\t\t\tval = prop[ name ];\n\n\t\t\t\t// easing resolution: per property > opt.specialEasing > opt.easing > 'swing' (default)\n\t\t\t\tif ( jQuery.isArray( val ) ) {\n\t\t\t\t\topt.animatedProperties[ name ] = val[ 1 ];\n\t\t\t\t\tval = prop[ name ] = val[ 0 ];\n\t\t\t\t} else {\n\t\t\t\t\topt.animatedProperties[ name ] = opt.specialEasing && opt.specialEasing[ name ] || opt.easing || 'swing';\n\t\t\t\t}\n\n\t\t\t\tif ( val === \"hide\" && hidden || val === \"show\" && !hidden ) {\n\t\t\t\t\treturn opt.complete.call( this );\n\t\t\t\t}\n\n\t\t\t\tif ( isElement && ( name === \"height\" || name === \"width\" ) ) {\n\t\t\t\t\t// Make sure that nothing sneaks out\n\t\t\t\t\t// Record all 3 overflow attributes because IE does not\n\t\t\t\t\t// change the overflow attribute when overflowX and\n\t\t\t\t\t// overflowY are set to the same value\n\t\t\t\t\topt.overflow = [ this.style.overflow, this.style.overflowX, this.style.overflowY ];\n\n\t\t\t\t\t// Set display property to inline-block for height/width\n\t\t\t\t\t// animations on inline elements that are having width/height animated\n\t\t\t\t\tif ( jQuery.css( this, \"display\" ) === \"inline\" &&\n\t\t\t\t\t\t\tjQuery.css( this, \"float\" ) === \"none\" ) {\n\n\t\t\t\t\t\t// inline-level elements accept inline-block;\n\t\t\t\t\t\t// block-level elements need to be inline with layout\n\t\t\t\t\t\tif ( !jQuery.support.inlineBlockNeedsLayout || defaultDisplay( this.nodeName ) === \"inline\" ) {\n\t\t\t\t\t\t\tthis.style.display = \"inline-block\";\n\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthis.style.zoom = 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( opt.overflow != null ) {\n\t\t\t\tthis.style.overflow = \"hidden\";\n\t\t\t}\n\n\t\t\tfor ( p in prop ) {\n\t\t\t\te = new jQuery.fx( this, opt, p );\n\t\t\t\tval = prop[ p ];\n\n\t\t\t\tif ( rfxtypes.test( val ) ) {\n\n\t\t\t\t\t// Tracks whether to show or hide based on private\n\t\t\t\t\t// data attached to the element\n\t\t\t\t\tmethod = jQuery._data( this, \"toggle\" + p ) || ( val === \"toggle\" ? hidden ? \"show\" : \"hide\" : 0 );\n\t\t\t\t\tif ( method ) {\n\t\t\t\t\t\tjQuery._data( this, \"toggle\" + p, method === \"show\" ? \"hide\" : \"show\" );\n\t\t\t\t\t\te[ method ]();\n\t\t\t\t\t} else {\n\t\t\t\t\t\te[ val ]();\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\t\t\t\t\tparts = rfxnum.exec( val );\n\t\t\t\t\tstart = e.cur();\n\n\t\t\t\t\tif ( parts ) {\n\t\t\t\t\t\tend = parseFloat( parts[2] );\n\t\t\t\t\t\tunit = parts[3] || ( jQuery.cssNumber[ p ] ? \"\" : \"px\" );\n\n\t\t\t\t\t\t// We need to compute starting value\n\t\t\t\t\t\tif ( unit !== \"px\" ) {\n\t\t\t\t\t\t\tjQuery.style( this, p, (end || 1) + unit);\n\t\t\t\t\t\t\tstart = ( (end || 1) / e.cur() ) * start;\n\t\t\t\t\t\t\tjQuery.style( this, p, start + unit);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// If a +=/-= token was provided, we're doing a relative animation\n\t\t\t\t\t\tif ( parts[1] ) {\n\t\t\t\t\t\t\tend = ( (parts[ 1 ] === \"-=\" ? -1 : 1) * end ) + start;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\te.custom( start, end, unit );\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\te.custom( start, val, \"\" );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// For JS strict compliance\n\t\t\treturn true;\n\t\t}\n\n\t\treturn optall.queue === false ?\n\t\t\tthis.each( doAnimation ) :\n\t\t\tthis.queue( optall.queue, doAnimation );\n\t},\n\n\tstop: function( type, clearQueue, gotoEnd ) {\n\t\tif ( typeof type !== \"string\" ) {\n\t\t\tgotoEnd = clearQueue;\n\t\t\tclearQueue = type;\n\t\t\ttype = undefined;\n\t\t}\n\t\tif ( clearQueue && type !== false ) {\n\t\t\tthis.queue( type || \"fx\", [] );\n\t\t}\n\n\t\treturn this.each(function() {\n\t\t\tvar index,\n\t\t\t\thadTimers = false,\n\t\t\t\ttimers = jQuery.timers,\n\t\t\t\tdata = jQuery._data( this );\n\n\t\t\t// clear marker counters if we know they won't be\n\t\t\tif ( !gotoEnd ) {\n\t\t\t\tjQuery._unmark( true, this );\n\t\t\t}\n\n\t\t\tfunction stopQueue( elem, data, index ) {\n\t\t\t\tvar hooks = data[ index ];\n\t\t\t\tjQuery.removeData( elem, index, true );\n\t\t\t\thooks.stop( gotoEnd );\n\t\t\t}\n\n\t\t\tif ( type == null ) {\n\t\t\t\tfor ( index in data ) {\n\t\t\t\t\tif ( data[ index ] && data[ index ].stop && index.indexOf(\".run\") === index.length - 4 ) {\n\t\t\t\t\t\tstopQueue( this, data, index );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if ( data[ index = type + \".run\" ] && data[ index ].stop ){\n\t\t\t\tstopQueue( this, data, index );\n\t\t\t}\n\n\t\t\tfor ( index = timers.length; index--; ) {\n\t\t\t\tif ( timers[ index ].elem === this && (type == null || timers[ index ].queue === type) ) {\n\t\t\t\t\tif ( gotoEnd ) {\n\n\t\t\t\t\t\t// force the next step to be the last\n\t\t\t\t\t\ttimers[ index ]( true );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttimers[ index ].saveState();\n\t\t\t\t\t}\n\t\t\t\t\thadTimers = true;\n\t\t\t\t\ttimers.splice( index, 1 );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// start the next in the queue if the last step wasn't forced\n\t\t\t// timers currently will call their complete callbacks, which will dequeue\n\t\t\t// but only if they were gotoEnd\n\t\t\tif ( !( gotoEnd && hadTimers ) ) {\n\t\t\t\tjQuery.dequeue( this, type );\n\t\t\t}\n\t\t});\n\t}\n\n});\n\n// Animations created synchronously will run synchronously\nfunction createFxNow() {\n\tsetTimeout( clearFxNow, 0 );\n\treturn ( fxNow = jQuery.now() );\n}\n\nfunction clearFxNow() {\n\tfxNow = undefined;\n}\n\n// Generate parameters to create a standard animation\nfunction genFx( type, num ) {\n\tvar obj = {};\n\n\tjQuery.each( fxAttrs.concat.apply([], fxAttrs.slice( 0, num )), function() {\n\t\tobj[ this ] = type;\n\t});\n\n\treturn obj;\n}\n\n// Generate shortcuts for custom animations\njQuery.each({\n\tslideDown: genFx( \"show\", 1 ),\n\tslideUp: genFx( \"hide\", 1 ),\n\tslideToggle: genFx( \"toggle\", 1 ),\n\tfadeIn: { opacity: \"show\" },\n\tfadeOut: { opacity: \"hide\" },\n\tfadeToggle: { opacity: \"toggle\" }\n}, function( name, props ) {\n\tjQuery.fn[ name ] = function( speed, easing, callback ) {\n\t\treturn this.animate( props, speed, easing, callback );\n\t};\n});\n\njQuery.extend({\n\tspeed: function( speed, easing, fn ) {\n\t\tvar opt = speed && typeof speed === \"object\" ? jQuery.extend( {}, speed ) : {\n\t\t\tcomplete: fn || !fn && easing ||\n\t\t\t\tjQuery.isFunction( speed ) && speed,\n\t\t\tduration: speed,\n\t\t\teasing: fn && easing || easing && !jQuery.isFunction( easing ) && easing\n\t\t};\n\n\t\topt.duration = jQuery.fx.off ? 0 : typeof opt.duration === \"number\" ? opt.duration :\n\t\t\topt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default;\n\n\t\t// normalize opt.queue - true/undefined/null -> \"fx\"\n\t\tif ( opt.queue == null || opt.queue === true ) {\n\t\t\topt.queue = \"fx\";\n\t\t}\n\n\t\t// Queueing\n\t\topt.old = opt.complete;\n\n\t\topt.complete = function( noUnmark ) {\n\t\t\tif ( jQuery.isFunction( opt.old ) ) {\n\t\t\t\topt.old.call( this );\n\t\t\t}\n\n\t\t\tif ( opt.queue ) {\n\t\t\t\tjQuery.dequeue( this, opt.queue );\n\t\t\t} else if ( noUnmark !== false ) {\n\t\t\t\tjQuery._unmark( this );\n\t\t\t}\n\t\t};\n\n\t\treturn opt;\n\t},\n\n\teasing: {\n\t\tlinear: function( p, n, firstNum, diff ) {\n\t\t\treturn firstNum + diff * p;\n\t\t},\n\t\tswing: function( p, n, firstNum, diff ) {\n\t\t\treturn ( ( -Math.cos( p*Math.PI ) / 2 ) + 0.5 ) * diff + firstNum;\n\t\t}\n\t},\n\n\ttimers: [],\n\n\tfx: function( elem, options, prop ) {\n\t\tthis.options = options;\n\t\tthis.elem = elem;\n\t\tthis.prop = prop;\n\n\t\toptions.orig = options.orig || {};\n\t}\n\n});\n\njQuery.fx.prototype = {\n\t// Simple function for setting a style value\n\tupdate: function() {\n\t\tif ( this.options.step ) {\n\t\t\tthis.options.step.call( this.elem, this.now, this );\n\t\t}\n\n\t\t( jQuery.fx.step[ this.prop ] || jQuery.fx.step._default )( this );\n\t},\n\n\t// Get the current size\n\tcur: function() {\n\t\tif ( this.elem[ this.prop ] != null && (!this.elem.style || this.elem.style[ this.prop ] == null) ) {\n\t\t\treturn this.elem[ this.prop ];\n\t\t}\n\n\t\tvar parsed,\n\t\t\tr = jQuery.css( this.elem, this.prop );\n\t\t// Empty strings, null, undefined and \"auto\" are converted to 0,\n\t\t// complex values such as \"rotate(1rad)\" are returned as is,\n\t\t// simple values such as \"10px\" are parsed to Float.\n\t\treturn isNaN( parsed = parseFloat( r ) ) ? !r || r === \"auto\" ? 0 : r : parsed;\n\t},\n\n\t// Start an animation from one number to another\n\tcustom: function( from, to, unit ) {\n\t\tvar self = this,\n\t\t\tfx = jQuery.fx;\n\n\t\tthis.startTime = fxNow || createFxNow();\n\t\tthis.end = to;\n\t\tthis.now = this.start = from;\n\t\tthis.pos = this.state = 0;\n\t\tthis.unit = unit || this.unit || ( jQuery.cssNumber[ this.prop ] ? \"\" : \"px\" );\n\n\t\tfunction t( gotoEnd ) {\n\t\t\treturn self.step( gotoEnd );\n\t\t}\n\n\t\tt.queue = this.options.queue;\n\t\tt.elem = this.elem;\n\t\tt.saveState = function() {\n\t\t\tif ( self.options.hide && jQuery._data( self.elem, \"fxshow\" + self.prop ) === undefined ) {\n\t\t\t\tjQuery._data( self.elem, \"fxshow\" + self.prop, self.start );\n\t\t\t}\n\t\t};\n\n\t\tif ( t() && jQuery.timers.push(t) && !timerId ) {\n\t\t\ttimerId = setInterval( fx.tick, fx.interval );\n\t\t}\n\t},\n\n\t// Simple 'show' function\n\tshow: function() {\n\t\tvar dataShow = jQuery._data( this.elem, \"fxshow\" + this.prop );\n\n\t\t// Remember where we started, so that we can go back to it later\n\t\tthis.options.orig[ this.prop ] = dataShow || jQuery.style( this.elem, this.prop );\n\t\tthis.options.show = true;\n\n\t\t// Begin the animation\n\t\t// Make sure that we start at a small width/height to avoid any flash of content\n\t\tif ( dataShow !== undefined ) {\n\t\t\t// This show is picking up where a previous hide or show left off\n\t\t\tthis.custom( this.cur(), dataShow );\n\t\t} else {\n\t\t\tthis.custom( this.prop === \"width\" || this.prop === \"height\" ? 1 : 0, this.cur() );\n\t\t}\n\n\t\t// Start by showing the element\n\t\tjQuery( this.elem ).show();\n\t},\n\n\t// Simple 'hide' function\n\thide: function() {\n\t\t// Remember where we started, so that we can go back to it later\n\t\tthis.options.orig[ this.prop ] = jQuery._data( this.elem, \"fxshow\" + this.prop ) || jQuery.style( this.elem, this.prop );\n\t\tthis.options.hide = true;\n\n\t\t// Begin the animation\n\t\tthis.custom( this.cur(), 0 );\n\t},\n\n\t// Each step of an animation\n\tstep: function( gotoEnd ) {\n\t\tvar p, n, complete,\n\t\t\tt = fxNow || createFxNow(),\n\t\t\tdone = true,\n\t\t\telem = this.elem,\n\t\t\toptions = this.options;\n\n\t\tif ( gotoEnd || t >= options.duration + this.startTime ) {\n\t\t\tthis.now = this.end;\n\t\t\tthis.pos = this.state = 1;\n\t\t\tthis.update();\n\n\t\t\toptions.animatedProperties[ this.prop ] = true;\n\n\t\t\tfor ( p in options.animatedProperties ) {\n\t\t\t\tif ( options.animatedProperties[ p ] !== true ) {\n\t\t\t\t\tdone = false;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( done ) {\n\t\t\t\t// Reset the overflow\n\t\t\t\tif ( options.overflow != null && !jQuery.support.shrinkWrapBlocks ) {\n\n\t\t\t\t\tjQuery.each( [ \"\", \"X\", \"Y\" ], function( index, value ) {\n\t\t\t\t\t\telem.style[ \"overflow\" + value ] = options.overflow[ index ];\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\t// Hide the element if the \"hide\" operation was done\n\t\t\t\tif ( options.hide ) {\n\t\t\t\t\tjQuery( elem ).hide();\n\t\t\t\t}\n\n\t\t\t\t// Reset the properties, if the item has been hidden or shown\n\t\t\t\tif ( options.hide || options.show ) {\n\t\t\t\t\tfor ( p in options.animatedProperties ) {\n\t\t\t\t\t\tjQuery.style( elem, p, options.orig[ p ] );\n\t\t\t\t\t\tjQuery.removeData( elem, \"fxshow\" + p, true );\n\t\t\t\t\t\t// Toggle data is no longer needed\n\t\t\t\t\t\tjQuery.removeData( elem, \"toggle\" + p, true );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Execute the complete function\n\t\t\t\t// in the event that the complete function throws an exception\n\t\t\t\t// we must ensure it won't be called twice. #5684\n\n\t\t\t\tcomplete = options.complete;\n\t\t\t\tif ( complete ) {\n\n\t\t\t\t\toptions.complete = false;\n\t\t\t\t\tcomplete.call( elem );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn false;\n\n\t\t} else {\n\t\t\t// classical easing cannot be used with an Infinity duration\n\t\t\tif ( options.duration == Infinity ) {\n\t\t\t\tthis.now = t;\n\t\t\t} else {\n\t\t\t\tn = t - this.startTime;\n\t\t\t\tthis.state = n / options.duration;\n\n\t\t\t\t// Perform the easing function, defaults to swing\n\t\t\t\tthis.pos = jQuery.easing[ options.animatedProperties[this.prop] ]( this.state, n, 0, 1, options.duration );\n\t\t\t\tthis.now = this.start + ( (this.end - this.start) * this.pos );\n\t\t\t}\n\t\t\t// Perform the next step of the animation\n\t\t\tthis.update();\n\t\t}\n\n\t\treturn true;\n\t}\n};\n\njQuery.extend( jQuery.fx, {\n\ttick: function() {\n\t\tvar timer,\n\t\t\ttimers = jQuery.timers,\n\t\t\ti = 0;\n\n\t\tfor ( ; i < timers.length; i++ ) {\n\t\t\ttimer = timers[ i ];\n\t\t\t// Checks the timer has not already been removed\n\t\t\tif ( !timer() && timers[ i ] === timer ) {\n\t\t\t\ttimers.splice( i--, 1 );\n\t\t\t}\n\t\t}\n\n\t\tif ( !timers.length ) {\n\t\t\tjQuery.fx.stop();\n\t\t}\n\t},\n\n\tinterval: 13,\n\n\tstop: function() {\n\t\tclearInterval( timerId );\n\t\ttimerId = null;\n\t},\n\n\tspeeds: {\n\t\tslow: 600,\n\t\tfast: 200,\n\t\t// Default speed\n\t\t_default: 400\n\t},\n\n\tstep: {\n\t\topacity: function( fx ) {\n\t\t\tjQuery.style( fx.elem, \"opacity\", fx.now );\n\t\t},\n\n\t\t_default: function( fx ) {\n\t\t\tif ( fx.elem.style && fx.elem.style[ fx.prop ] != null ) {\n\t\t\t\tfx.elem.style[ fx.prop ] = fx.now + fx.unit;\n\t\t\t} else {\n\t\t\t\tfx.elem[ fx.prop ] = fx.now;\n\t\t\t}\n\t\t}\n\t}\n});\n\n// Adds width/height step functions\n// Do not set anything below 0\njQuery.each([ \"width\", \"height\" ], function( i, prop ) {\n\tjQuery.fx.step[ prop ] = function( fx ) {\n\t\tjQuery.style( fx.elem, prop, Math.max(0, fx.now) + fx.unit );\n\t};\n});\n\nif ( jQuery.expr && jQuery.expr.filters ) {\n\tjQuery.expr.filters.animated = function( elem ) {\n\t\treturn jQuery.grep(jQuery.timers, function( fn ) {\n\t\t\treturn elem === fn.elem;\n\t\t}).length;\n\t};\n}\n\n// Try to restore the default display value of an element\nfunction defaultDisplay( nodeName ) {\n\n\tif ( !elemdisplay[ nodeName ] ) {\n\n\t\tvar body = document.body,\n\t\t\telem = jQuery( \"<\" + nodeName + \">\" ).appendTo( body ),\n\t\t\tdisplay = elem.css( \"display\" );\n\t\telem.remove();\n\n\t\t// If the simple way fails,\n\t\t// get element's real default display by attaching it to a temp iframe\n\t\tif ( display === \"none\" || display === \"\" ) {\n\t\t\t// No iframe to use yet, so create it\n\t\t\tif ( !iframe ) {\n\t\t\t\tiframe = document.createElement( \"iframe\" );\n\t\t\t\tiframe.frameBorder = iframe.width = iframe.height = 0;\n\t\t\t}\n\n\t\t\tbody.appendChild( iframe );\n\n\t\t\t// Create a cacheable copy of the iframe document on first call.\n\t\t\t// IE and Opera will allow us to reuse the iframeDoc without re-writing the fake HTML\n\t\t\t// document to it; WebKit & Firefox won't allow reusing the iframe document.\n\t\t\tif ( !iframeDoc || !iframe.createElement ) {\n\t\t\t\tiframeDoc = ( iframe.contentWindow || iframe.contentDocument ).document;\n\t\t\t\tiframeDoc.write( ( document.compatMode === \"CSS1Compat\" ? \"<!doctype html>\" : \"\" ) + \"<html><body>\" );\n\t\t\t\tiframeDoc.close();\n\t\t\t}\n\n\t\t\telem = iframeDoc.createElement( nodeName );\n\n\t\t\tiframeDoc.body.appendChild( elem );\n\n\t\t\tdisplay = jQuery.css( elem, \"display\" );\n\t\t\tbody.removeChild( iframe );\n\t\t}\n\n\t\t// Store the correct default display\n\t\telemdisplay[ nodeName ] = display;\n\t}\n\n\treturn elemdisplay[ nodeName ];\n}\n\n\n\n\nvar rtable = /^t(?:able|d|h)$/i,\n\trroot = /^(?:body|html)$/i;\n\nif ( \"getBoundingClientRect\" in document.documentElement ) {\n\tjQuery.fn.offset = function( options ) {\n\t\tvar elem = this[0], box;\n\n\t\tif ( options ) {\n\t\t\treturn this.each(function( i ) {\n\t\t\t\tjQuery.offset.setOffset( this, options, i );\n\t\t\t});\n\t\t}\n\n\t\tif ( !elem || !elem.ownerDocument ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tif ( elem === elem.ownerDocument.body ) {\n\t\t\treturn jQuery.offset.bodyOffset( elem );\n\t\t}\n\n\t\ttry {\n\t\t\tbox = elem.getBoundingClientRect();\n\t\t} catch(e) {}\n\n\t\tvar doc = elem.ownerDocument,\n\t\t\tdocElem = doc.documentElement;\n\n\t\t// Make sure we're not dealing with a disconnected DOM node\n\t\tif ( !box || !jQuery.contains( docElem, elem ) ) {\n\t\t\treturn box ? { top: box.top, left: box.left } : { top: 0, left: 0 };\n\t\t}\n\n\t\tvar body = doc.body,\n\t\t\twin = getWindow(doc),\n\t\t\tclientTop  = docElem.clientTop  || body.clientTop  || 0,\n\t\t\tclientLeft = docElem.clientLeft || body.clientLeft || 0,\n\t\t\tscrollTop  = win.pageYOffset || jQuery.support.boxModel && docElem.scrollTop  || body.scrollTop,\n\t\t\tscrollLeft = win.pageXOffset || jQuery.support.boxModel && docElem.scrollLeft || body.scrollLeft,\n\t\t\ttop  = box.top  + scrollTop  - clientTop,\n\t\t\tleft = box.left + scrollLeft - clientLeft;\n\n\t\treturn { top: top, left: left };\n\t};\n\n} else {\n\tjQuery.fn.offset = function( options ) {\n\t\tvar elem = this[0];\n\n\t\tif ( options ) {\n\t\t\treturn this.each(function( i ) {\n\t\t\t\tjQuery.offset.setOffset( this, options, i );\n\t\t\t});\n\t\t}\n\n\t\tif ( !elem || !elem.ownerDocument ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tif ( elem === elem.ownerDocument.body ) {\n\t\t\treturn jQuery.offset.bodyOffset( elem );\n\t\t}\n\n\t\tvar computedStyle,\n\t\t\toffsetParent = elem.offsetParent,\n\t\t\tprevOffsetParent = elem,\n\t\t\tdoc = elem.ownerDocument,\n\t\t\tdocElem = doc.documentElement,\n\t\t\tbody = doc.body,\n\t\t\tdefaultView = doc.defaultView,\n\t\t\tprevComputedStyle = defaultView ? defaultView.getComputedStyle( elem, null ) : elem.currentStyle,\n\t\t\ttop = elem.offsetTop,\n\t\t\tleft = elem.offsetLeft;\n\n\t\twhile ( (elem = elem.parentNode) && elem !== body && elem !== docElem ) {\n\t\t\tif ( jQuery.support.fixedPosition && prevComputedStyle.position === \"fixed\" ) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcomputedStyle = defaultView ? defaultView.getComputedStyle(elem, null) : elem.currentStyle;\n\t\t\ttop  -= elem.scrollTop;\n\t\t\tleft -= elem.scrollLeft;\n\n\t\t\tif ( elem === offsetParent ) {\n\t\t\t\ttop  += elem.offsetTop;\n\t\t\t\tleft += elem.offsetLeft;\n\n\t\t\t\tif ( jQuery.support.doesNotAddBorder && !(jQuery.support.doesAddBorderForTableAndCells && rtable.test(elem.nodeName)) ) {\n\t\t\t\t\ttop  += parseFloat( computedStyle.borderTopWidth  ) || 0;\n\t\t\t\t\tleft += parseFloat( computedStyle.borderLeftWidth ) || 0;\n\t\t\t\t}\n\n\t\t\t\tprevOffsetParent = offsetParent;\n\t\t\t\toffsetParent = elem.offsetParent;\n\t\t\t}\n\n\t\t\tif ( jQuery.support.subtractsBorderForOverflowNotVisible && computedStyle.overflow !== \"visible\" ) {\n\t\t\t\ttop  += parseFloat( computedStyle.borderTopWidth  ) || 0;\n\t\t\t\tleft += parseFloat( computedStyle.borderLeftWidth ) || 0;\n\t\t\t}\n\n\t\t\tprevComputedStyle = computedStyle;\n\t\t}\n\n\t\tif ( prevComputedStyle.position === \"relative\" || prevComputedStyle.position === \"static\" ) {\n\t\t\ttop  += body.offsetTop;\n\t\t\tleft += body.offsetLeft;\n\t\t}\n\n\t\tif ( jQuery.support.fixedPosition && prevComputedStyle.position === \"fixed\" ) {\n\t\t\ttop  += Math.max( docElem.scrollTop, body.scrollTop );\n\t\t\tleft += Math.max( docElem.scrollLeft, body.scrollLeft );\n\t\t}\n\n\t\treturn { top: top, left: left };\n\t};\n}\n\njQuery.offset = {\n\n\tbodyOffset: function( body ) {\n\t\tvar top = body.offsetTop,\n\t\t\tleft = body.offsetLeft;\n\n\t\tif ( jQuery.support.doesNotIncludeMarginInBodyOffset ) {\n\t\t\ttop  += parseFloat( jQuery.css(body, \"marginTop\") ) || 0;\n\t\t\tleft += parseFloat( jQuery.css(body, \"marginLeft\") ) || 0;\n\t\t}\n\n\t\treturn { top: top, left: left };\n\t},\n\n\tsetOffset: function( elem, options, i ) {\n\t\tvar position = jQuery.css( elem, \"position\" );\n\n\t\t// set position first, in-case top/left are set even on static elem\n\t\tif ( position === \"static\" ) {\n\t\t\telem.style.position = \"relative\";\n\t\t}\n\n\t\tvar curElem = jQuery( elem ),\n\t\t\tcurOffset = curElem.offset(),\n\t\t\tcurCSSTop = jQuery.css( elem, \"top\" ),\n\t\t\tcurCSSLeft = jQuery.css( elem, \"left\" ),\n\t\t\tcalculatePosition = ( position === \"absolute\" || position === \"fixed\" ) && jQuery.inArray(\"auto\", [curCSSTop, curCSSLeft]) > -1,\n\t\t\tprops = {}, curPosition = {}, curTop, curLeft;\n\n\t\t// need to be able to calculate position if either top or left is auto and position is either absolute or fixed\n\t\tif ( calculatePosition ) {\n\t\t\tcurPosition = curElem.position();\n\t\t\tcurTop = curPosition.top;\n\t\t\tcurLeft = curPosition.left;\n\t\t} else {\n\t\t\tcurTop = parseFloat( curCSSTop ) || 0;\n\t\t\tcurLeft = parseFloat( curCSSLeft ) || 0;\n\t\t}\n\n\t\tif ( jQuery.isFunction( options ) ) {\n\t\t\toptions = options.call( elem, i, curOffset );\n\t\t}\n\n\t\tif ( options.top != null ) {\n\t\t\tprops.top = ( options.top - curOffset.top ) + curTop;\n\t\t}\n\t\tif ( options.left != null ) {\n\t\t\tprops.left = ( options.left - curOffset.left ) + curLeft;\n\t\t}\n\n\t\tif ( \"using\" in options ) {\n\t\t\toptions.using.call( elem, props );\n\t\t} else {\n\t\t\tcurElem.css( props );\n\t\t}\n\t}\n};\n\n\njQuery.fn.extend({\n\n\tposition: function() {\n\t\tif ( !this[0] ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tvar elem = this[0],\n\n\t\t// Get *real* offsetParent\n\t\toffsetParent = this.offsetParent(),\n\n\t\t// Get correct offsets\n\t\toffset       = this.offset(),\n\t\tparentOffset = rroot.test(offsetParent[0].nodeName) ? { top: 0, left: 0 } : offsetParent.offset();\n\n\t\t// Subtract element margins\n\t\t// note: when an element has margin: auto the offsetLeft and marginLeft\n\t\t// are the same in Safari causing offset.left to incorrectly be 0\n\t\toffset.top  -= parseFloat( jQuery.css(elem, \"marginTop\") ) || 0;\n\t\toffset.left -= parseFloat( jQuery.css(elem, \"marginLeft\") ) || 0;\n\n\t\t// Add offsetParent borders\n\t\tparentOffset.top  += parseFloat( jQuery.css(offsetParent[0], \"borderTopWidth\") ) || 0;\n\t\tparentOffset.left += parseFloat( jQuery.css(offsetParent[0], \"borderLeftWidth\") ) || 0;\n\n\t\t// Subtract the two offsets\n\t\treturn {\n\t\t\ttop:  offset.top  - parentOffset.top,\n\t\t\tleft: offset.left - parentOffset.left\n\t\t};\n\t},\n\n\toffsetParent: function() {\n\t\treturn this.map(function() {\n\t\t\tvar offsetParent = this.offsetParent || document.body;\n\t\t\twhile ( offsetParent && (!rroot.test(offsetParent.nodeName) && jQuery.css(offsetParent, \"position\") === \"static\") ) {\n\t\t\t\toffsetParent = offsetParent.offsetParent;\n\t\t\t}\n\t\t\treturn offsetParent;\n\t\t});\n\t}\n});\n\n\n// Create scrollLeft and scrollTop methods\njQuery.each( [\"Left\", \"Top\"], function( i, name ) {\n\tvar method = \"scroll\" + name;\n\n\tjQuery.fn[ method ] = function( val ) {\n\t\tvar elem, win;\n\n\t\tif ( val === undefined ) {\n\t\t\telem = this[ 0 ];\n\n\t\t\tif ( !elem ) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\twin = getWindow( elem );\n\n\t\t\t// Return the scroll offset\n\t\t\treturn win ? (\"pageXOffset\" in win) ? win[ i ? \"pageYOffset\" : \"pageXOffset\" ] :\n\t\t\t\tjQuery.support.boxModel && win.document.documentElement[ method ] ||\n\t\t\t\t\twin.document.body[ method ] :\n\t\t\t\telem[ method ];\n\t\t}\n\n\t\t// Set the scroll offset\n\t\treturn this.each(function() {\n\t\t\twin = getWindow( this );\n\n\t\t\tif ( win ) {\n\t\t\t\twin.scrollTo(\n\t\t\t\t\t!i ? val : jQuery( win ).scrollLeft(),\n\t\t\t\t\t i ? val : jQuery( win ).scrollTop()\n\t\t\t\t);\n\n\t\t\t} else {\n\t\t\t\tthis[ method ] = val;\n\t\t\t}\n\t\t});\n\t};\n});\n\nfunction getWindow( elem ) {\n\treturn jQuery.isWindow( elem ) ?\n\t\telem :\n\t\telem.nodeType === 9 ?\n\t\t\telem.defaultView || elem.parentWindow :\n\t\t\tfalse;\n}\n\n\n\n\n// Create width, height, innerHeight, innerWidth, outerHeight and outerWidth methods\njQuery.each([ \"Height\", \"Width\" ], function( i, name ) {\n\n\tvar type = name.toLowerCase();\n\n\t// innerHeight and innerWidth\n\tjQuery.fn[ \"inner\" + name ] = function() {\n\t\tvar elem = this[0];\n\t\treturn elem ?\n\t\t\telem.style ?\n\t\t\tparseFloat( jQuery.css( elem, type, \"padding\" ) ) :\n\t\t\tthis[ type ]() :\n\t\t\tnull;\n\t};\n\n\t// outerHeight and outerWidth\n\tjQuery.fn[ \"outer\" + name ] = function( margin ) {\n\t\tvar elem = this[0];\n\t\treturn elem ?\n\t\t\telem.style ?\n\t\t\tparseFloat( jQuery.css( elem, type, margin ? \"margin\" : \"border\" ) ) :\n\t\t\tthis[ type ]() :\n\t\t\tnull;\n\t};\n\n\tjQuery.fn[ type ] = function( size ) {\n\t\t// Get window width or height\n\t\tvar elem = this[0];\n\t\tif ( !elem ) {\n\t\t\treturn size == null ? null : this;\n\t\t}\n\n\t\tif ( jQuery.isFunction( size ) ) {\n\t\t\treturn this.each(function( i ) {\n\t\t\t\tvar self = jQuery( this );\n\t\t\t\tself[ type ]( size.call( this, i, self[ type ]() ) );\n\t\t\t});\n\t\t}\n\n\t\tif ( jQuery.isWindow( elem ) ) {\n\t\t\t// Everyone else use document.documentElement or document.body depending on Quirks vs Standards mode\n\t\t\t// 3rd condition allows Nokia support, as it supports the docElem prop but not CSS1Compat\n\t\t\tvar docElemProp = elem.document.documentElement[ \"client\" + name ],\n\t\t\t\tbody = elem.document.body;\n\t\t\treturn elem.document.compatMode === \"CSS1Compat\" && docElemProp ||\n\t\t\t\tbody && body[ \"client\" + name ] || docElemProp;\n\n\t\t// Get document width or height\n\t\t} else if ( elem.nodeType === 9 ) {\n\t\t\t// Either scroll[Width/Height] or offset[Width/Height], whichever is greater\n\t\t\treturn Math.max(\n\t\t\t\telem.documentElement[\"client\" + name],\n\t\t\t\telem.body[\"scroll\" + name], elem.documentElement[\"scroll\" + name],\n\t\t\t\telem.body[\"offset\" + name], elem.documentElement[\"offset\" + name]\n\t\t\t);\n\n\t\t// Get or set width or height on the element\n\t\t} else if ( size === undefined ) {\n\t\t\tvar orig = jQuery.css( elem, type ),\n\t\t\t\tret = parseFloat( orig );\n\n\t\t\treturn jQuery.isNumeric( ret ) ? ret : orig;\n\n\t\t// Set the width or height on the element (default to pixels if value is unitless)\n\t\t} else {\n\t\t\treturn this.css( type, typeof size === \"string\" ? size : size + \"px\" );\n\t\t}\n\t};\n\n});\n\n\n\n\n// Expose jQuery to the global object\nwindow.jQuery = window.$ = jQuery;\n\n// Expose jQuery as an AMD module, but only for AMD loaders that\n// understand the issues with loading multiple versions of jQuery\n// in a page that all might call define(). The loader will indicate\n// they have special allowances for multiple jQuery versions by\n// specifying define.amd.jQuery = true. Register as a named module,\n// since jQuery can be concatenated with other files that may use define,\n// but not use a proper concatenation script that understands anonymous\n// AMD modules. A named AMD is safest and most robust way to register.\n// Lowercase jquery is used because AMD module names are derived from\n// file names, and jQuery is normally delivered in a lowercase file name.\n// Do this after creating the global so that if an AMD module wants to call\n// noConflict to hide this version of jQuery, it will work.\nif ( typeof define === \"function\" && define.amd && define.amd.jQuery ) {\n\tdefine( \"jquery\", [], function () { return jQuery; } );\n}\n\n\n\n})( window );\n"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/DDDPPP.Chap20.CommandHandler.Presentation/Scripts/jquery-ui-1.8.20.js",
    "content": "/*! jQuery UI - v1.8.20 - 2012-04-30\n* https://github.com/jquery/jquery-ui\n* Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.draggable.js, jquery.ui.droppable.js, jquery.ui.resizable.js, jquery.ui.selectable.js, jquery.ui.sortable.js, jquery.effects.core.js, jquery.effects.blind.js, jquery.effects.bounce.js, jquery.effects.clip.js, jquery.effects.drop.js, jquery.effects.explode.js, jquery.effects.fade.js, jquery.effects.fold.js, jquery.effects.highlight.js, jquery.effects.pulsate.js, jquery.effects.scale.js, jquery.effects.shake.js, jquery.effects.slide.js, jquery.effects.transfer.js, jquery.ui.accordion.js, jquery.ui.autocomplete.js, jquery.ui.button.js, jquery.ui.datepicker.js, jquery.ui.dialog.js, jquery.ui.position.js, jquery.ui.progressbar.js, jquery.ui.slider.js, jquery.ui.tabs.js\n* Copyright (c) 2012 AUTHORS.txt; Licensed MIT */\n\n(function( $, undefined ) {\n\n// prevent duplicate loading\n// this is only a problem because we proxy existing functions\n// and we don't want to double proxy them\n$.ui = $.ui || {};\nif ( $.ui.version ) {\n\treturn;\n}\n\n$.extend( $.ui, {\n\tversion: \"1.8.20\",\n\n\tkeyCode: {\n\t\tALT: 18,\n\t\tBACKSPACE: 8,\n\t\tCAPS_LOCK: 20,\n\t\tCOMMA: 188,\n\t\tCOMMAND: 91,\n\t\tCOMMAND_LEFT: 91, // COMMAND\n\t\tCOMMAND_RIGHT: 93,\n\t\tCONTROL: 17,\n\t\tDELETE: 46,\n\t\tDOWN: 40,\n\t\tEND: 35,\n\t\tENTER: 13,\n\t\tESCAPE: 27,\n\t\tHOME: 36,\n\t\tINSERT: 45,\n\t\tLEFT: 37,\n\t\tMENU: 93, // COMMAND_RIGHT\n\t\tNUMPAD_ADD: 107,\n\t\tNUMPAD_DECIMAL: 110,\n\t\tNUMPAD_DIVIDE: 111,\n\t\tNUMPAD_ENTER: 108,\n\t\tNUMPAD_MULTIPLY: 106,\n\t\tNUMPAD_SUBTRACT: 109,\n\t\tPAGE_DOWN: 34,\n\t\tPAGE_UP: 33,\n\t\tPERIOD: 190,\n\t\tRIGHT: 39,\n\t\tSHIFT: 16,\n\t\tSPACE: 32,\n\t\tTAB: 9,\n\t\tUP: 38,\n\t\tWINDOWS: 91 // COMMAND\n\t}\n});\n\n// plugins\n$.fn.extend({\n\tpropAttr: $.fn.prop || $.fn.attr,\n\n\t_focus: $.fn.focus,\n\tfocus: function( delay, fn ) {\n\t\treturn typeof delay === \"number\" ?\n\t\t\tthis.each(function() {\n\t\t\t\tvar elem = this;\n\t\t\t\tsetTimeout(function() {\n\t\t\t\t\t$( elem ).focus();\n\t\t\t\t\tif ( fn ) {\n\t\t\t\t\t\tfn.call( elem );\n\t\t\t\t\t}\n\t\t\t\t}, delay );\n\t\t\t}) :\n\t\t\tthis._focus.apply( this, arguments );\n\t},\n\n\tscrollParent: function() {\n\t\tvar scrollParent;\n\t\tif (($.browser.msie && (/(static|relative)/).test(this.css('position'))) || (/absolute/).test(this.css('position'))) {\n\t\t\tscrollParent = this.parents().filter(function() {\n\t\t\t\treturn (/(relative|absolute|fixed)/).test($.curCSS(this,'position',1)) && (/(auto|scroll)/).test($.curCSS(this,'overflow',1)+$.curCSS(this,'overflow-y',1)+$.curCSS(this,'overflow-x',1));\n\t\t\t}).eq(0);\n\t\t} else {\n\t\t\tscrollParent = this.parents().filter(function() {\n\t\t\t\treturn (/(auto|scroll)/).test($.curCSS(this,'overflow',1)+$.curCSS(this,'overflow-y',1)+$.curCSS(this,'overflow-x',1));\n\t\t\t}).eq(0);\n\t\t}\n\n\t\treturn (/fixed/).test(this.css('position')) || !scrollParent.length ? $(document) : scrollParent;\n\t},\n\n\tzIndex: function( zIndex ) {\n\t\tif ( zIndex !== undefined ) {\n\t\t\treturn this.css( \"zIndex\", zIndex );\n\t\t}\n\n\t\tif ( this.length ) {\n\t\t\tvar elem = $( this[ 0 ] ), position, value;\n\t\t\twhile ( elem.length && elem[ 0 ] !== document ) {\n\t\t\t\t// Ignore z-index if position is set to a value where z-index is ignored by the browser\n\t\t\t\t// This makes behavior of this function consistent across browsers\n\t\t\t\t// WebKit always returns auto if the element is positioned\n\t\t\t\tposition = elem.css( \"position\" );\n\t\t\t\tif ( position === \"absolute\" || position === \"relative\" || position === \"fixed\" ) {\n\t\t\t\t\t// IE returns 0 when zIndex is not specified\n\t\t\t\t\t// other browsers return a string\n\t\t\t\t\t// we ignore the case of nested elements with an explicit value of 0\n\t\t\t\t\t// <div style=\"z-index: -10;\"><div style=\"z-index: 0;\"></div></div>\n\t\t\t\t\tvalue = parseInt( elem.css( \"zIndex\" ), 10 );\n\t\t\t\t\tif ( !isNaN( value ) && value !== 0 ) {\n\t\t\t\t\t\treturn value;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telem = elem.parent();\n\t\t\t}\n\t\t}\n\n\t\treturn 0;\n\t},\n\n\tdisableSelection: function() {\n\t\treturn this.bind( ( $.support.selectstart ? \"selectstart\" : \"mousedown\" ) +\n\t\t\t\".ui-disableSelection\", function( event ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t});\n\t},\n\n\tenableSelection: function() {\n\t\treturn this.unbind( \".ui-disableSelection\" );\n\t}\n});\n\n$.each( [ \"Width\", \"Height\" ], function( i, name ) {\n\tvar side = name === \"Width\" ? [ \"Left\", \"Right\" ] : [ \"Top\", \"Bottom\" ],\n\t\ttype = name.toLowerCase(),\n\t\torig = {\n\t\t\tinnerWidth: $.fn.innerWidth,\n\t\t\tinnerHeight: $.fn.innerHeight,\n\t\t\touterWidth: $.fn.outerWidth,\n\t\t\touterHeight: $.fn.outerHeight\n\t\t};\n\n\tfunction reduce( elem, size, border, margin ) {\n\t\t$.each( side, function() {\n\t\t\tsize -= parseFloat( $.curCSS( elem, \"padding\" + this, true) ) || 0;\n\t\t\tif ( border ) {\n\t\t\t\tsize -= parseFloat( $.curCSS( elem, \"border\" + this + \"Width\", true) ) || 0;\n\t\t\t}\n\t\t\tif ( margin ) {\n\t\t\t\tsize -= parseFloat( $.curCSS( elem, \"margin\" + this, true) ) || 0;\n\t\t\t}\n\t\t});\n\t\treturn size;\n\t}\n\n\t$.fn[ \"inner\" + name ] = function( size ) {\n\t\tif ( size === undefined ) {\n\t\t\treturn orig[ \"inner\" + name ].call( this );\n\t\t}\n\n\t\treturn this.each(function() {\n\t\t\t$( this ).css( type, reduce( this, size ) + \"px\" );\n\t\t});\n\t};\n\n\t$.fn[ \"outer\" + name] = function( size, margin ) {\n\t\tif ( typeof size !== \"number\" ) {\n\t\t\treturn orig[ \"outer\" + name ].call( this, size );\n\t\t}\n\n\t\treturn this.each(function() {\n\t\t\t$( this).css( type, reduce( this, size, true, margin ) + \"px\" );\n\t\t});\n\t};\n});\n\n// selectors\nfunction focusable( element, isTabIndexNotNaN ) {\n\tvar nodeName = element.nodeName.toLowerCase();\n\tif ( \"area\" === nodeName ) {\n\t\tvar map = element.parentNode,\n\t\t\tmapName = map.name,\n\t\t\timg;\n\t\tif ( !element.href || !mapName || map.nodeName.toLowerCase() !== \"map\" ) {\n\t\t\treturn false;\n\t\t}\n\t\timg = $( \"img[usemap=#\" + mapName + \"]\" )[0];\n\t\treturn !!img && visible( img );\n\t}\n\treturn ( /input|select|textarea|button|object/.test( nodeName )\n\t\t? !element.disabled\n\t\t: \"a\" == nodeName\n\t\t\t? element.href || isTabIndexNotNaN\n\t\t\t: isTabIndexNotNaN)\n\t\t// the element and all of its ancestors must be visible\n\t\t&& visible( element );\n}\n\nfunction visible( element ) {\n\treturn !$( element ).parents().andSelf().filter(function() {\n\t\treturn $.curCSS( this, \"visibility\" ) === \"hidden\" ||\n\t\t\t$.expr.filters.hidden( this );\n\t}).length;\n}\n\n$.extend( $.expr[ \":\" ], {\n\tdata: function( elem, i, match ) {\n\t\treturn !!$.data( elem, match[ 3 ] );\n\t},\n\n\tfocusable: function( element ) {\n\t\treturn focusable( element, !isNaN( $.attr( element, \"tabindex\" ) ) );\n\t},\n\n\ttabbable: function( element ) {\n\t\tvar tabIndex = $.attr( element, \"tabindex\" ),\n\t\t\tisTabIndexNaN = isNaN( tabIndex );\n\t\treturn ( isTabIndexNaN || tabIndex >= 0 ) && focusable( element, !isTabIndexNaN );\n\t}\n});\n\n// support\n$(function() {\n\tvar body = document.body,\n\t\tdiv = body.appendChild( div = document.createElement( \"div\" ) );\n\n\t// access offsetHeight before setting the style to prevent a layout bug\n\t// in IE 9 which causes the elemnt to continue to take up space even\n\t// after it is removed from the DOM (#8026)\n\tdiv.offsetHeight;\n\n\t$.extend( div.style, {\n\t\tminHeight: \"100px\",\n\t\theight: \"auto\",\n\t\tpadding: 0,\n\t\tborderWidth: 0\n\t});\n\n\t$.support.minHeight = div.offsetHeight === 100;\n\t$.support.selectstart = \"onselectstart\" in div;\n\n\t// set display to none to avoid a layout bug in IE\n\t// http://dev.jquery.com/ticket/4014\n\tbody.removeChild( div ).style.display = \"none\";\n});\n\n\n\n\n\n// deprecated\n$.extend( $.ui, {\n\t// $.ui.plugin is deprecated.  Use the proxy pattern instead.\n\tplugin: {\n\t\tadd: function( module, option, set ) {\n\t\t\tvar proto = $.ui[ module ].prototype;\n\t\t\tfor ( var i in set ) {\n\t\t\t\tproto.plugins[ i ] = proto.plugins[ i ] || [];\n\t\t\t\tproto.plugins[ i ].push( [ option, set[ i ] ] );\n\t\t\t}\n\t\t},\n\t\tcall: function( instance, name, args ) {\n\t\t\tvar set = instance.plugins[ name ];\n\t\t\tif ( !set || !instance.element[ 0 ].parentNode ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\n\t\t\tfor ( var i = 0; i < set.length; i++ ) {\n\t\t\t\tif ( instance.options[ set[ i ][ 0 ] ] ) {\n\t\t\t\t\tset[ i ][ 1 ].apply( instance.element, args );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\t\n\t// will be deprecated when we switch to jQuery 1.4 - use jQuery.contains()\n\tcontains: function( a, b ) {\n\t\treturn document.compareDocumentPosition ?\n\t\t\ta.compareDocumentPosition( b ) & 16 :\n\t\t\ta !== b && a.contains( b );\n\t},\n\t\n\t// only used by resizable\n\thasScroll: function( el, a ) {\n\t\n\t\t//If overflow is hidden, the element might have extra content, but the user wants to hide it\n\t\tif ( $( el ).css( \"overflow\" ) === \"hidden\") {\n\t\t\treturn false;\n\t\t}\n\t\n\t\tvar scroll = ( a && a === \"left\" ) ? \"scrollLeft\" : \"scrollTop\",\n\t\t\thas = false;\n\t\n\t\tif ( el[ scroll ] > 0 ) {\n\t\t\treturn true;\n\t\t}\n\t\n\t\t// TODO: determine which cases actually cause this to happen\n\t\t// if the element doesn't have the scroll set, see if it's possible to\n\t\t// set the scroll\n\t\tel[ scroll ] = 1;\n\t\thas = ( el[ scroll ] > 0 );\n\t\tel[ scroll ] = 0;\n\t\treturn has;\n\t},\n\t\n\t// these are odd functions, fix the API or move into individual plugins\n\tisOverAxis: function( x, reference, size ) {\n\t\t//Determines when x coordinate is over \"b\" element axis\n\t\treturn ( x > reference ) && ( x < ( reference + size ) );\n\t},\n\tisOver: function( y, x, top, left, height, width ) {\n\t\t//Determines when x, y coordinates is over \"b\" element\n\t\treturn $.ui.isOverAxis( y, top, height ) && $.ui.isOverAxis( x, left, width );\n\t}\n});\n\n})( jQuery );\n\n(function( $, undefined ) {\n\n// jQuery 1.4+\nif ( $.cleanData ) {\n\tvar _cleanData = $.cleanData;\n\t$.cleanData = function( elems ) {\n\t\tfor ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {\n\t\t\ttry {\n\t\t\t\t$( elem ).triggerHandler( \"remove\" );\n\t\t\t// http://bugs.jquery.com/ticket/8235\n\t\t\t} catch( e ) {}\n\t\t}\n\t\t_cleanData( elems );\n\t};\n} else {\n\tvar _remove = $.fn.remove;\n\t$.fn.remove = function( selector, keepData ) {\n\t\treturn this.each(function() {\n\t\t\tif ( !keepData ) {\n\t\t\t\tif ( !selector || $.filter( selector, [ this ] ).length ) {\n\t\t\t\t\t$( \"*\", this ).add( [ this ] ).each(function() {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t$( this ).triggerHandler( \"remove\" );\n\t\t\t\t\t\t// http://bugs.jquery.com/ticket/8235\n\t\t\t\t\t\t} catch( e ) {}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn _remove.call( $(this), selector, keepData );\n\t\t});\n\t};\n}\n\n$.widget = function( name, base, prototype ) {\n\tvar namespace = name.split( \".\" )[ 0 ],\n\t\tfullName;\n\tname = name.split( \".\" )[ 1 ];\n\tfullName = namespace + \"-\" + name;\n\n\tif ( !prototype ) {\n\t\tprototype = base;\n\t\tbase = $.Widget;\n\t}\n\n\t// create selector for plugin\n\t$.expr[ \":\" ][ fullName ] = function( elem ) {\n\t\treturn !!$.data( elem, name );\n\t};\n\n\t$[ namespace ] = $[ namespace ] || {};\n\t$[ namespace ][ name ] = function( options, element ) {\n\t\t// allow instantiation without initializing for simple inheritance\n\t\tif ( arguments.length ) {\n\t\t\tthis._createWidget( options, element );\n\t\t}\n\t};\n\n\tvar basePrototype = new base();\n\t// we need to make the options hash a property directly on the new instance\n\t// otherwise we'll modify the options hash on the prototype that we're\n\t// inheriting from\n//\t$.each( basePrototype, function( key, val ) {\n//\t\tif ( $.isPlainObject(val) ) {\n//\t\t\tbasePrototype[ key ] = $.extend( {}, val );\n//\t\t}\n//\t});\n\tbasePrototype.options = $.extend( true, {}, basePrototype.options );\n\t$[ namespace ][ name ].prototype = $.extend( true, basePrototype, {\n\t\tnamespace: namespace,\n\t\twidgetName: name,\n\t\twidgetEventPrefix: $[ namespace ][ name ].prototype.widgetEventPrefix || name,\n\t\twidgetBaseClass: fullName\n\t}, prototype );\n\n\t$.widget.bridge( name, $[ namespace ][ name ] );\n};\n\n$.widget.bridge = function( name, object ) {\n\t$.fn[ name ] = function( options ) {\n\t\tvar isMethodCall = typeof options === \"string\",\n\t\t\targs = Array.prototype.slice.call( arguments, 1 ),\n\t\t\treturnValue = this;\n\n\t\t// allow multiple hashes to be passed on init\n\t\toptions = !isMethodCall && args.length ?\n\t\t\t$.extend.apply( null, [ true, options ].concat(args) ) :\n\t\t\toptions;\n\n\t\t// prevent calls to internal methods\n\t\tif ( isMethodCall && options.charAt( 0 ) === \"_\" ) {\n\t\t\treturn returnValue;\n\t\t}\n\n\t\tif ( isMethodCall ) {\n\t\t\tthis.each(function() {\n\t\t\t\tvar instance = $.data( this, name ),\n\t\t\t\t\tmethodValue = instance && $.isFunction( instance[options] ) ?\n\t\t\t\t\t\tinstance[ options ].apply( instance, args ) :\n\t\t\t\t\t\tinstance;\n\t\t\t\t// TODO: add this back in 1.9 and use $.error() (see #5972)\n//\t\t\t\tif ( !instance ) {\n//\t\t\t\t\tthrow \"cannot call methods on \" + name + \" prior to initialization; \" +\n//\t\t\t\t\t\t\"attempted to call method '\" + options + \"'\";\n//\t\t\t\t}\n//\t\t\t\tif ( !$.isFunction( instance[options] ) ) {\n//\t\t\t\t\tthrow \"no such method '\" + options + \"' for \" + name + \" widget instance\";\n//\t\t\t\t}\n//\t\t\t\tvar methodValue = instance[ options ].apply( instance, args );\n\t\t\t\tif ( methodValue !== instance && methodValue !== undefined ) {\n\t\t\t\t\treturnValue = methodValue;\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t});\n\t\t} else {\n\t\t\tthis.each(function() {\n\t\t\t\tvar instance = $.data( this, name );\n\t\t\t\tif ( instance ) {\n\t\t\t\t\tinstance.option( options || {} )._init();\n\t\t\t\t} else {\n\t\t\t\t\t$.data( this, name, new object( options, this ) );\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\treturn returnValue;\n\t};\n};\n\n$.Widget = function( options, element ) {\n\t// allow instantiation without initializing for simple inheritance\n\tif ( arguments.length ) {\n\t\tthis._createWidget( options, element );\n\t}\n};\n\n$.Widget.prototype = {\n\twidgetName: \"widget\",\n\twidgetEventPrefix: \"\",\n\toptions: {\n\t\tdisabled: false\n\t},\n\t_createWidget: function( options, element ) {\n\t\t// $.widget.bridge stores the plugin instance, but we do it anyway\n\t\t// so that it's stored even before the _create function runs\n\t\t$.data( element, this.widgetName, this );\n\t\tthis.element = $( element );\n\t\tthis.options = $.extend( true, {},\n\t\t\tthis.options,\n\t\t\tthis._getCreateOptions(),\n\t\t\toptions );\n\n\t\tvar self = this;\n\t\tthis.element.bind( \"remove.\" + this.widgetName, function() {\n\t\t\tself.destroy();\n\t\t});\n\n\t\tthis._create();\n\t\tthis._trigger( \"create\" );\n\t\tthis._init();\n\t},\n\t_getCreateOptions: function() {\n\t\treturn $.metadata && $.metadata.get( this.element[0] )[ this.widgetName ];\n\t},\n\t_create: function() {},\n\t_init: function() {},\n\n\tdestroy: function() {\n\t\tthis.element\n\t\t\t.unbind( \".\" + this.widgetName )\n\t\t\t.removeData( this.widgetName );\n\t\tthis.widget()\n\t\t\t.unbind( \".\" + this.widgetName )\n\t\t\t.removeAttr( \"aria-disabled\" )\n\t\t\t.removeClass(\n\t\t\t\tthis.widgetBaseClass + \"-disabled \" +\n\t\t\t\t\"ui-state-disabled\" );\n\t},\n\n\twidget: function() {\n\t\treturn this.element;\n\t},\n\n\toption: function( key, value ) {\n\t\tvar options = key;\n\n\t\tif ( arguments.length === 0 ) {\n\t\t\t// don't return a reference to the internal hash\n\t\t\treturn $.extend( {}, this.options );\n\t\t}\n\n\t\tif  (typeof key === \"string\" ) {\n\t\t\tif ( value === undefined ) {\n\t\t\t\treturn this.options[ key ];\n\t\t\t}\n\t\t\toptions = {};\n\t\t\toptions[ key ] = value;\n\t\t}\n\n\t\tthis._setOptions( options );\n\n\t\treturn this;\n\t},\n\t_setOptions: function( options ) {\n\t\tvar self = this;\n\t\t$.each( options, function( key, value ) {\n\t\t\tself._setOption( key, value );\n\t\t});\n\n\t\treturn this;\n\t},\n\t_setOption: function( key, value ) {\n\t\tthis.options[ key ] = value;\n\n\t\tif ( key === \"disabled\" ) {\n\t\t\tthis.widget()\n\t\t\t\t[ value ? \"addClass\" : \"removeClass\"](\n\t\t\t\t\tthis.widgetBaseClass + \"-disabled\" + \" \" +\n\t\t\t\t\t\"ui-state-disabled\" )\n\t\t\t\t.attr( \"aria-disabled\", value );\n\t\t}\n\n\t\treturn this;\n\t},\n\n\tenable: function() {\n\t\treturn this._setOption( \"disabled\", false );\n\t},\n\tdisable: function() {\n\t\treturn this._setOption( \"disabled\", true );\n\t},\n\n\t_trigger: function( type, event, data ) {\n\t\tvar prop, orig,\n\t\t\tcallback = this.options[ type ];\n\n\t\tdata = data || {};\n\t\tevent = $.Event( event );\n\t\tevent.type = ( type === this.widgetEventPrefix ?\n\t\t\ttype :\n\t\t\tthis.widgetEventPrefix + type ).toLowerCase();\n\t\t// the original event may come from any element\n\t\t// so we need to reset the target on the new event\n\t\tevent.target = this.element[ 0 ];\n\n\t\t// copy original event properties over to the new event\n\t\torig = event.originalEvent;\n\t\tif ( orig ) {\n\t\t\tfor ( prop in orig ) {\n\t\t\t\tif ( !( prop in event ) ) {\n\t\t\t\t\tevent[ prop ] = orig[ prop ];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tthis.element.trigger( event, data );\n\n\t\treturn !( $.isFunction(callback) &&\n\t\t\tcallback.call( this.element[0], event, data ) === false ||\n\t\t\tevent.isDefaultPrevented() );\n\t}\n};\n\n})( jQuery );\n\n(function( $, undefined ) {\n\nvar mouseHandled = false;\n$( document ).mouseup( function( e ) {\n\tmouseHandled = false;\n});\n\n$.widget(\"ui.mouse\", {\n\toptions: {\n\t\tcancel: ':input,option',\n\t\tdistance: 1,\n\t\tdelay: 0\n\t},\n\t_mouseInit: function() {\n\t\tvar self = this;\n\n\t\tthis.element\n\t\t\t.bind('mousedown.'+this.widgetName, function(event) {\n\t\t\t\treturn self._mouseDown(event);\n\t\t\t})\n\t\t\t.bind('click.'+this.widgetName, function(event) {\n\t\t\t\tif (true === $.data(event.target, self.widgetName + '.preventClickEvent')) {\n\t\t\t\t    $.removeData(event.target, self.widgetName + '.preventClickEvent');\n\t\t\t\t\tevent.stopImmediatePropagation();\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t});\n\n\t\tthis.started = false;\n\t},\n\n\t// TODO: make sure destroying one instance of mouse doesn't mess with\n\t// other instances of mouse\n\t_mouseDestroy: function() {\n\t\tthis.element.unbind('.'+this.widgetName);\n\t\t$(document)\n\t\t\t.unbind('mousemove.'+this.widgetName, this._mouseMoveDelegate)\n\t\t\t.unbind('mouseup.'+this.widgetName, this._mouseUpDelegate);\n\t},\n\n\t_mouseDown: function(event) {\n\t\t// don't let more than one widget handle mouseStart\n\t\tif( mouseHandled ) { return };\n\n\t\t// we may have missed mouseup (out of window)\n\t\t(this._mouseStarted && this._mouseUp(event));\n\n\t\tthis._mouseDownEvent = event;\n\n\t\tvar self = this,\n\t\t\tbtnIsLeft = (event.which == 1),\n\t\t\t// event.target.nodeName works around a bug in IE 8 with\n\t\t\t// disabled inputs (#7620)\n\t\t\telIsCancel = (typeof this.options.cancel == \"string\" && event.target.nodeName ? $(event.target).closest(this.options.cancel).length : false);\n\t\tif (!btnIsLeft || elIsCancel || !this._mouseCapture(event)) {\n\t\t\treturn true;\n\t\t}\n\n\t\tthis.mouseDelayMet = !this.options.delay;\n\t\tif (!this.mouseDelayMet) {\n\t\t\tthis._mouseDelayTimer = setTimeout(function() {\n\t\t\t\tself.mouseDelayMet = true;\n\t\t\t}, this.options.delay);\n\t\t}\n\n\t\tif (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) {\n\t\t\tthis._mouseStarted = (this._mouseStart(event) !== false);\n\t\t\tif (!this._mouseStarted) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\t// Click event may never have fired (Gecko & Opera)\n\t\tif (true === $.data(event.target, this.widgetName + '.preventClickEvent')) {\n\t\t\t$.removeData(event.target, this.widgetName + '.preventClickEvent');\n\t\t}\n\n\t\t// these delegates are required to keep context\n\t\tthis._mouseMoveDelegate = function(event) {\n\t\t\treturn self._mouseMove(event);\n\t\t};\n\t\tthis._mouseUpDelegate = function(event) {\n\t\t\treturn self._mouseUp(event);\n\t\t};\n\t\t$(document)\n\t\t\t.bind('mousemove.'+this.widgetName, this._mouseMoveDelegate)\n\t\t\t.bind('mouseup.'+this.widgetName, this._mouseUpDelegate);\n\n\t\tevent.preventDefault();\n\t\t\n\t\tmouseHandled = true;\n\t\treturn true;\n\t},\n\n\t_mouseMove: function(event) {\n\t\t// IE mouseup check - mouseup happened when mouse was out of window\n\t\tif ($.browser.msie && !(document.documentMode >= 9) && !event.button) {\n\t\t\treturn this._mouseUp(event);\n\t\t}\n\n\t\tif (this._mouseStarted) {\n\t\t\tthis._mouseDrag(event);\n\t\t\treturn event.preventDefault();\n\t\t}\n\n\t\tif (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) {\n\t\t\tthis._mouseStarted =\n\t\t\t\t(this._mouseStart(this._mouseDownEvent, event) !== false);\n\t\t\t(this._mouseStarted ? this._mouseDrag(event) : this._mouseUp(event));\n\t\t}\n\n\t\treturn !this._mouseStarted;\n\t},\n\n\t_mouseUp: function(event) {\n\t\t$(document)\n\t\t\t.unbind('mousemove.'+this.widgetName, this._mouseMoveDelegate)\n\t\t\t.unbind('mouseup.'+this.widgetName, this._mouseUpDelegate);\n\n\t\tif (this._mouseStarted) {\n\t\t\tthis._mouseStarted = false;\n\n\t\t\tif (event.target == this._mouseDownEvent.target) {\n\t\t\t    $.data(event.target, this.widgetName + '.preventClickEvent', true);\n\t\t\t}\n\n\t\t\tthis._mouseStop(event);\n\t\t}\n\n\t\treturn false;\n\t},\n\n\t_mouseDistanceMet: function(event) {\n\t\treturn (Math.max(\n\t\t\t\tMath.abs(this._mouseDownEvent.pageX - event.pageX),\n\t\t\t\tMath.abs(this._mouseDownEvent.pageY - event.pageY)\n\t\t\t) >= this.options.distance\n\t\t);\n\t},\n\n\t_mouseDelayMet: function(event) {\n\t\treturn this.mouseDelayMet;\n\t},\n\n\t// These are placeholder methods, to be overriden by extending plugin\n\t_mouseStart: function(event) {},\n\t_mouseDrag: function(event) {},\n\t_mouseStop: function(event) {},\n\t_mouseCapture: function(event) { return true; }\n});\n\n})(jQuery);\n\n(function( $, undefined ) {\n\n$.widget(\"ui.draggable\", $.ui.mouse, {\n\twidgetEventPrefix: \"drag\",\n\toptions: {\n\t\taddClasses: true,\n\t\tappendTo: \"parent\",\n\t\taxis: false,\n\t\tconnectToSortable: false,\n\t\tcontainment: false,\n\t\tcursor: \"auto\",\n\t\tcursorAt: false,\n\t\tgrid: false,\n\t\thandle: false,\n\t\thelper: \"original\",\n\t\tiframeFix: false,\n\t\topacity: false,\n\t\trefreshPositions: false,\n\t\trevert: false,\n\t\trevertDuration: 500,\n\t\tscope: \"default\",\n\t\tscroll: true,\n\t\tscrollSensitivity: 20,\n\t\tscrollSpeed: 20,\n\t\tsnap: false,\n\t\tsnapMode: \"both\",\n\t\tsnapTolerance: 20,\n\t\tstack: false,\n\t\tzIndex: false\n\t},\n\t_create: function() {\n\n\t\tif (this.options.helper == 'original' && !(/^(?:r|a|f)/).test(this.element.css(\"position\")))\n\t\t\tthis.element[0].style.position = 'relative';\n\n\t\t(this.options.addClasses && this.element.addClass(\"ui-draggable\"));\n\t\t(this.options.disabled && this.element.addClass(\"ui-draggable-disabled\"));\n\n\t\tthis._mouseInit();\n\n\t},\n\n\tdestroy: function() {\n\t\tif(!this.element.data('draggable')) return;\n\t\tthis.element\n\t\t\t.removeData(\"draggable\")\n\t\t\t.unbind(\".draggable\")\n\t\t\t.removeClass(\"ui-draggable\"\n\t\t\t\t+ \" ui-draggable-dragging\"\n\t\t\t\t+ \" ui-draggable-disabled\");\n\t\tthis._mouseDestroy();\n\n\t\treturn this;\n\t},\n\n\t_mouseCapture: function(event) {\n\n\t\tvar o = this.options;\n\n\t\t// among others, prevent a drag on a resizable-handle\n\t\tif (this.helper || o.disabled || $(event.target).is('.ui-resizable-handle'))\n\t\t\treturn false;\n\n\t\t//Quit if we're not on a valid handle\n\t\tthis.handle = this._getHandle(event);\n\t\tif (!this.handle)\n\t\t\treturn false;\n\t\t\n\t\tif ( o.iframeFix ) {\n\t\t\t$(o.iframeFix === true ? \"iframe\" : o.iframeFix).each(function() {\n\t\t\t\t$('<div class=\"ui-draggable-iframeFix\" style=\"background: #fff;\"></div>')\n\t\t\t\t.css({\n\t\t\t\t\twidth: this.offsetWidth+\"px\", height: this.offsetHeight+\"px\",\n\t\t\t\t\tposition: \"absolute\", opacity: \"0.001\", zIndex: 1000\n\t\t\t\t})\n\t\t\t\t.css($(this).offset())\n\t\t\t\t.appendTo(\"body\");\n\t\t\t});\n\t\t}\n\n\t\treturn true;\n\n\t},\n\n\t_mouseStart: function(event) {\n\n\t\tvar o = this.options;\n\n\t\t//Create and append the visible helper\n\t\tthis.helper = this._createHelper(event);\n\n\t\t//Cache the helper size\n\t\tthis._cacheHelperProportions();\n\n\t\t//If ddmanager is used for droppables, set the global draggable\n\t\tif($.ui.ddmanager)\n\t\t\t$.ui.ddmanager.current = this;\n\n\t\t/*\n\t\t * - Position generation -\n\t\t * This block generates everything position related - it's the core of draggables.\n\t\t */\n\n\t\t//Cache the margins of the original element\n\t\tthis._cacheMargins();\n\n\t\t//Store the helper's css position\n\t\tthis.cssPosition = this.helper.css(\"position\");\n\t\tthis.scrollParent = this.helper.scrollParent();\n\n\t\t//The element's absolute position on the page minus margins\n\t\tthis.offset = this.positionAbs = this.element.offset();\n\t\tthis.offset = {\n\t\t\ttop: this.offset.top - this.margins.top,\n\t\t\tleft: this.offset.left - this.margins.left\n\t\t};\n\n\t\t$.extend(this.offset, {\n\t\t\tclick: { //Where the click happened, relative to the element\n\t\t\t\tleft: event.pageX - this.offset.left,\n\t\t\t\ttop: event.pageY - this.offset.top\n\t\t\t},\n\t\t\tparent: this._getParentOffset(),\n\t\t\trelative: this._getRelativeOffset() //This is a relative to absolute position minus the actual position calculation - only used for relative positioned helper\n\t\t});\n\n\t\t//Generate the original position\n\t\tthis.originalPosition = this.position = this._generatePosition(event);\n\t\tthis.originalPageX = event.pageX;\n\t\tthis.originalPageY = event.pageY;\n\n\t\t//Adjust the mouse offset relative to the helper if 'cursorAt' is supplied\n\t\t(o.cursorAt && this._adjustOffsetFromHelper(o.cursorAt));\n\n\t\t//Set a containment if given in the options\n\t\tif(o.containment)\n\t\t\tthis._setContainment();\n\n\t\t//Trigger event + callbacks\n\t\tif(this._trigger(\"start\", event) === false) {\n\t\t\tthis._clear();\n\t\t\treturn false;\n\t\t}\n\n\t\t//Recache the helper size\n\t\tthis._cacheHelperProportions();\n\n\t\t//Prepare the droppable offsets\n\t\tif ($.ui.ddmanager && !o.dropBehaviour)\n\t\t\t$.ui.ddmanager.prepareOffsets(this, event);\n\n\t\tthis.helper.addClass(\"ui-draggable-dragging\");\n\t\tthis._mouseDrag(event, true); //Execute the drag once - this causes the helper not to be visible before getting its correct position\n\t\t\n\t\t//If the ddmanager is used for droppables, inform the manager that dragging has started (see #5003)\n\t\tif ( $.ui.ddmanager ) $.ui.ddmanager.dragStart(this, event);\n\t\t\n\t\treturn true;\n\t},\n\n\t_mouseDrag: function(event, noPropagation) {\n\n\t\t//Compute the helpers position\n\t\tthis.position = this._generatePosition(event);\n\t\tthis.positionAbs = this._convertPositionTo(\"absolute\");\n\n\t\t//Call plugins and callbacks and use the resulting position if something is returned\n\t\tif (!noPropagation) {\n\t\t\tvar ui = this._uiHash();\n\t\t\tif(this._trigger('drag', event, ui) === false) {\n\t\t\t\tthis._mouseUp({});\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tthis.position = ui.position;\n\t\t}\n\n\t\tif(!this.options.axis || this.options.axis != \"y\") this.helper[0].style.left = this.position.left+'px';\n\t\tif(!this.options.axis || this.options.axis != \"x\") this.helper[0].style.top = this.position.top+'px';\n\t\tif($.ui.ddmanager) $.ui.ddmanager.drag(this, event);\n\n\t\treturn false;\n\t},\n\n\t_mouseStop: function(event) {\n\n\t\t//If we are using droppables, inform the manager about the drop\n\t\tvar dropped = false;\n\t\tif ($.ui.ddmanager && !this.options.dropBehaviour)\n\t\t\tdropped = $.ui.ddmanager.drop(this, event);\n\n\t\t//if a drop comes from outside (a sortable)\n\t\tif(this.dropped) {\n\t\t\tdropped = this.dropped;\n\t\t\tthis.dropped = false;\n\t\t}\n\t\t\n\t\t//if the original element is no longer in the DOM don't bother to continue (see #8269)\n\t\tvar element = this.element[0], elementInDom = false;\n\t\twhile ( element && (element = element.parentNode) ) {\n\t\t\tif (element == document ) {\n\t\t\t\telementInDom = true;\n\t\t\t}\n\t\t}\n\t\tif ( !elementInDom && this.options.helper === \"original\" )\n\t\t\treturn false;\n\n\t\tif((this.options.revert == \"invalid\" && !dropped) || (this.options.revert == \"valid\" && dropped) || this.options.revert === true || ($.isFunction(this.options.revert) && this.options.revert.call(this.element, dropped))) {\n\t\t\tvar self = this;\n\t\t\t$(this.helper).animate(this.originalPosition, parseInt(this.options.revertDuration, 10), function() {\n\t\t\t\tif(self._trigger(\"stop\", event) !== false) {\n\t\t\t\t\tself._clear();\n\t\t\t\t}\n\t\t\t});\n\t\t} else {\n\t\t\tif(this._trigger(\"stop\", event) !== false) {\n\t\t\t\tthis._clear();\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t},\n\t\n\t_mouseUp: function(event) {\n\t\tif (this.options.iframeFix === true) {\n\t\t\t$(\"div.ui-draggable-iframeFix\").each(function() { \n\t\t\t\tthis.parentNode.removeChild(this); \n\t\t\t}); //Remove frame helpers\n\t\t}\n\t\t\n\t\t//If the ddmanager is used for droppables, inform the manager that dragging has stopped (see #5003)\n\t\tif( $.ui.ddmanager ) $.ui.ddmanager.dragStop(this, event);\n\t\t\n\t\treturn $.ui.mouse.prototype._mouseUp.call(this, event);\n\t},\n\t\n\tcancel: function() {\n\t\t\n\t\tif(this.helper.is(\".ui-draggable-dragging\")) {\n\t\t\tthis._mouseUp({});\n\t\t} else {\n\t\t\tthis._clear();\n\t\t}\n\t\t\n\t\treturn this;\n\t\t\n\t},\n\n\t_getHandle: function(event) {\n\n\t\tvar handle = !this.options.handle || !$(this.options.handle, this.element).length ? true : false;\n\t\t$(this.options.handle, this.element)\n\t\t\t.find(\"*\")\n\t\t\t.andSelf()\n\t\t\t.each(function() {\n\t\t\t\tif(this == event.target) handle = true;\n\t\t\t});\n\n\t\treturn handle;\n\n\t},\n\n\t_createHelper: function(event) {\n\n\t\tvar o = this.options;\n\t\tvar helper = $.isFunction(o.helper) ? $(o.helper.apply(this.element[0], [event])) : (o.helper == 'clone' ? this.element.clone().removeAttr('id') : this.element);\n\n\t\tif(!helper.parents('body').length)\n\t\t\thelper.appendTo((o.appendTo == 'parent' ? this.element[0].parentNode : o.appendTo));\n\n\t\tif(helper[0] != this.element[0] && !(/(fixed|absolute)/).test(helper.css(\"position\")))\n\t\t\thelper.css(\"position\", \"absolute\");\n\n\t\treturn helper;\n\n\t},\n\n\t_adjustOffsetFromHelper: function(obj) {\n\t\tif (typeof obj == 'string') {\n\t\t\tobj = obj.split(' ');\n\t\t}\n\t\tif ($.isArray(obj)) {\n\t\t\tobj = {left: +obj[0], top: +obj[1] || 0};\n\t\t}\n\t\tif ('left' in obj) {\n\t\t\tthis.offset.click.left = obj.left + this.margins.left;\n\t\t}\n\t\tif ('right' in obj) {\n\t\t\tthis.offset.click.left = this.helperProportions.width - obj.right + this.margins.left;\n\t\t}\n\t\tif ('top' in obj) {\n\t\t\tthis.offset.click.top = obj.top + this.margins.top;\n\t\t}\n\t\tif ('bottom' in obj) {\n\t\t\tthis.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top;\n\t\t}\n\t},\n\n\t_getParentOffset: function() {\n\n\t\t//Get the offsetParent and cache its position\n\t\tthis.offsetParent = this.helper.offsetParent();\n\t\tvar po = this.offsetParent.offset();\n\n\t\t// This is a special case where we need to modify a offset calculated on start, since the following happened:\n\t\t// 1. The position of the helper is absolute, so it's position is calculated based on the next positioned parent\n\t\t// 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't the document, which means that\n\t\t//    the scroll is included in the initial calculation of the offset of the parent, and never recalculated upon drag\n\t\tif(this.cssPosition == 'absolute' && this.scrollParent[0] != document && $.ui.contains(this.scrollParent[0], this.offsetParent[0])) {\n\t\t\tpo.left += this.scrollParent.scrollLeft();\n\t\t\tpo.top += this.scrollParent.scrollTop();\n\t\t}\n\n\t\tif((this.offsetParent[0] == document.body) //This needs to be actually done for all browsers, since pageX/pageY includes this information\n\t\t|| (this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() == 'html' && $.browser.msie)) //Ugly IE fix\n\t\t\tpo = { top: 0, left: 0 };\n\n\t\treturn {\n\t\t\ttop: po.top + (parseInt(this.offsetParent.css(\"borderTopWidth\"),10) || 0),\n\t\t\tleft: po.left + (parseInt(this.offsetParent.css(\"borderLeftWidth\"),10) || 0)\n\t\t};\n\n\t},\n\n\t_getRelativeOffset: function() {\n\n\t\tif(this.cssPosition == \"relative\") {\n\t\t\tvar p = this.element.position();\n\t\t\treturn {\n\t\t\t\ttop: p.top - (parseInt(this.helper.css(\"top\"),10) || 0) + this.scrollParent.scrollTop(),\n\t\t\t\tleft: p.left - (parseInt(this.helper.css(\"left\"),10) || 0) + this.scrollParent.scrollLeft()\n\t\t\t};\n\t\t} else {\n\t\t\treturn { top: 0, left: 0 };\n\t\t}\n\n\t},\n\n\t_cacheMargins: function() {\n\t\tthis.margins = {\n\t\t\tleft: (parseInt(this.element.css(\"marginLeft\"),10) || 0),\n\t\t\ttop: (parseInt(this.element.css(\"marginTop\"),10) || 0),\n\t\t\tright: (parseInt(this.element.css(\"marginRight\"),10) || 0),\n\t\t\tbottom: (parseInt(this.element.css(\"marginBottom\"),10) || 0)\n\t\t};\n\t},\n\n\t_cacheHelperProportions: function() {\n\t\tthis.helperProportions = {\n\t\t\twidth: this.helper.outerWidth(),\n\t\t\theight: this.helper.outerHeight()\n\t\t};\n\t},\n\n\t_setContainment: function() {\n\n\t\tvar o = this.options;\n\t\tif(o.containment == 'parent') o.containment = this.helper[0].parentNode;\n\t\tif(o.containment == 'document' || o.containment == 'window') this.containment = [\n\t\t\to.containment == 'document' ? 0 : $(window).scrollLeft() - this.offset.relative.left - this.offset.parent.left,\n\t\t\to.containment == 'document' ? 0 : $(window).scrollTop() - this.offset.relative.top - this.offset.parent.top,\n\t\t\t(o.containment == 'document' ? 0 : $(window).scrollLeft()) + $(o.containment == 'document' ? document : window).width() - this.helperProportions.width - this.margins.left,\n\t\t\t(o.containment == 'document' ? 0 : $(window).scrollTop()) + ($(o.containment == 'document' ? document : window).height() || document.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top\n\t\t];\n\n\t\tif(!(/^(document|window|parent)$/).test(o.containment) && o.containment.constructor != Array) {\n\t\t        var c = $(o.containment);\n\t\t\tvar ce = c[0]; if(!ce) return;\n\t\t\tvar co = c.offset();\n\t\t\tvar over = ($(ce).css(\"overflow\") != 'hidden');\n\n\t\t\tthis.containment = [\n\t\t\t\t(parseInt($(ce).css(\"borderLeftWidth\"),10) || 0) + (parseInt($(ce).css(\"paddingLeft\"),10) || 0),\n\t\t\t\t(parseInt($(ce).css(\"borderTopWidth\"),10) || 0) + (parseInt($(ce).css(\"paddingTop\"),10) || 0),\n\t\t\t\t(over ? Math.max(ce.scrollWidth,ce.offsetWidth) : ce.offsetWidth) - (parseInt($(ce).css(\"borderLeftWidth\"),10) || 0) - (parseInt($(ce).css(\"paddingRight\"),10) || 0) - this.helperProportions.width - this.margins.left - this.margins.right,\n\t\t\t\t(over ? Math.max(ce.scrollHeight,ce.offsetHeight) : ce.offsetHeight) - (parseInt($(ce).css(\"borderTopWidth\"),10) || 0) - (parseInt($(ce).css(\"paddingBottom\"),10) || 0) - this.helperProportions.height - this.margins.top  - this.margins.bottom\n\t\t\t];\n\t\t\tthis.relative_container = c;\n\n\t\t} else if(o.containment.constructor == Array) {\n\t\t\tthis.containment = o.containment;\n\t\t}\n\n\t},\n\n\t_convertPositionTo: function(d, pos) {\n\n\t\tif(!pos) pos = this.position;\n\t\tvar mod = d == \"absolute\" ? 1 : -1;\n\t\tvar o = this.options, scroll = this.cssPosition == 'absolute' && !(this.scrollParent[0] != document && $.ui.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);\n\n\t\treturn {\n\t\t\ttop: (\n\t\t\t\tpos.top\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// The absolute mouse position\n\t\t\t\t+ this.offset.relative.top * mod\t\t\t\t\t\t\t\t\t\t// Only for relative positioned nodes: Relative offset from element to offset parent\n\t\t\t\t+ this.offset.parent.top * mod\t\t\t\t\t\t\t\t\t\t\t// The offsetParent's offset without borders (offset + border)\n\t\t\t\t- ($.browser.safari && $.browser.version < 526 && this.cssPosition == 'fixed' ? 0 : ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) * mod)\n\t\t\t),\n\t\t\tleft: (\n\t\t\t\tpos.left\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// The absolute mouse position\n\t\t\t\t+ this.offset.relative.left * mod\t\t\t\t\t\t\t\t\t\t// Only for relative positioned nodes: Relative offset from element to offset parent\n\t\t\t\t+ this.offset.parent.left * mod\t\t\t\t\t\t\t\t\t\t\t// The offsetParent's offset without borders (offset + border)\n\t\t\t\t- ($.browser.safari && $.browser.version < 526 && this.cssPosition == 'fixed' ? 0 : ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ) * mod)\n\t\t\t)\n\t\t};\n\n\t},\n\n\t_generatePosition: function(event) {\n\n\t\tvar o = this.options, scroll = this.cssPosition == 'absolute' && !(this.scrollParent[0] != document && $.ui.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);\n\t\tvar pageX = event.pageX;\n\t\tvar pageY = event.pageY;\n\n\t\t/*\n\t\t * - Position constraining -\n\t\t * Constrain the position to a mix of grid, containment.\n\t\t */\n\n\t\tif(this.originalPosition) { //If we are not dragging yet, we won't check for options\n\t\t         var containment;\n\t\t         if(this.containment) {\n\t\t\t\t if (this.relative_container){\n\t\t\t\t     var co = this.relative_container.offset();\n\t\t\t\t     containment = [ this.containment[0] + co.left,\n\t\t\t\t\t\t     this.containment[1] + co.top,\n\t\t\t\t\t\t     this.containment[2] + co.left,\n\t\t\t\t\t\t     this.containment[3] + co.top ];\n\t\t\t\t }\n\t\t\t\t else {\n\t\t\t\t     containment = this.containment;\n\t\t\t\t }\n\n\t\t\t\tif(event.pageX - this.offset.click.left < containment[0]) pageX = containment[0] + this.offset.click.left;\n\t\t\t\tif(event.pageY - this.offset.click.top < containment[1]) pageY = containment[1] + this.offset.click.top;\n\t\t\t\tif(event.pageX - this.offset.click.left > containment[2]) pageX = containment[2] + this.offset.click.left;\n\t\t\t\tif(event.pageY - this.offset.click.top > containment[3]) pageY = containment[3] + this.offset.click.top;\n\t\t\t}\n\n\t\t\tif(o.grid) {\n\t\t\t\t//Check for grid elements set to 0 to prevent divide by 0 error causing invalid argument errors in IE (see ticket #6950)\n\t\t\t\tvar top = o.grid[1] ? this.originalPageY + Math.round((pageY - this.originalPageY) / o.grid[1]) * o.grid[1] : this.originalPageY;\n\t\t\t\tpageY = containment ? (!(top - this.offset.click.top < containment[1] || top - this.offset.click.top > containment[3]) ? top : (!(top - this.offset.click.top < containment[1]) ? top - o.grid[1] : top + o.grid[1])) : top;\n\n\t\t\t\tvar left = o.grid[0] ? this.originalPageX + Math.round((pageX - this.originalPageX) / o.grid[0]) * o.grid[0] : this.originalPageX;\n\t\t\t\tpageX = containment ? (!(left - this.offset.click.left < containment[0] || left - this.offset.click.left > containment[2]) ? left : (!(left - this.offset.click.left < containment[0]) ? left - o.grid[0] : left + o.grid[0])) : left;\n\t\t\t}\n\n\t\t}\n\n\t\treturn {\n\t\t\ttop: (\n\t\t\t\tpageY\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// The absolute mouse position\n\t\t\t\t- this.offset.click.top\t\t\t\t\t\t\t\t\t\t\t\t\t// Click offset (relative to the element)\n\t\t\t\t- this.offset.relative.top\t\t\t\t\t\t\t\t\t\t\t\t// Only for relative positioned nodes: Relative offset from element to offset parent\n\t\t\t\t- this.offset.parent.top\t\t\t\t\t\t\t\t\t\t\t\t// The offsetParent's offset without borders (offset + border)\n\t\t\t\t+ ($.browser.safari && $.browser.version < 526 && this.cssPosition == 'fixed' ? 0 : ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ))\n\t\t\t),\n\t\t\tleft: (\n\t\t\t\tpageX\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// The absolute mouse position\n\t\t\t\t- this.offset.click.left\t\t\t\t\t\t\t\t\t\t\t\t// Click offset (relative to the element)\n\t\t\t\t- this.offset.relative.left\t\t\t\t\t\t\t\t\t\t\t\t// Only for relative positioned nodes: Relative offset from element to offset parent\n\t\t\t\t- this.offset.parent.left\t\t\t\t\t\t\t\t\t\t\t\t// The offsetParent's offset without borders (offset + border)\n\t\t\t\t+ ($.browser.safari && $.browser.version < 526 && this.cssPosition == 'fixed' ? 0 : ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ))\n\t\t\t)\n\t\t};\n\n\t},\n\n\t_clear: function() {\n\t\tthis.helper.removeClass(\"ui-draggable-dragging\");\n\t\tif(this.helper[0] != this.element[0] && !this.cancelHelperRemoval) this.helper.remove();\n\t\t//if($.ui.ddmanager) $.ui.ddmanager.current = null;\n\t\tthis.helper = null;\n\t\tthis.cancelHelperRemoval = false;\n\t},\n\n\t// From now on bulk stuff - mainly helpers\n\n\t_trigger: function(type, event, ui) {\n\t\tui = ui || this._uiHash();\n\t\t$.ui.plugin.call(this, type, [event, ui]);\n\t\tif(type == \"drag\") this.positionAbs = this._convertPositionTo(\"absolute\"); //The absolute position has to be recalculated after plugins\n\t\treturn $.Widget.prototype._trigger.call(this, type, event, ui);\n\t},\n\n\tplugins: {},\n\n\t_uiHash: function(event) {\n\t\treturn {\n\t\t\thelper: this.helper,\n\t\t\tposition: this.position,\n\t\t\toriginalPosition: this.originalPosition,\n\t\t\toffset: this.positionAbs\n\t\t};\n\t}\n\n});\n\n$.extend($.ui.draggable, {\n\tversion: \"1.8.20\"\n});\n\n$.ui.plugin.add(\"draggable\", \"connectToSortable\", {\n\tstart: function(event, ui) {\n\n\t\tvar inst = $(this).data(\"draggable\"), o = inst.options,\n\t\t\tuiSortable = $.extend({}, ui, { item: inst.element });\n\t\tinst.sortables = [];\n\t\t$(o.connectToSortable).each(function() {\n\t\t\tvar sortable = $.data(this, 'sortable');\n\t\t\tif (sortable && !sortable.options.disabled) {\n\t\t\t\tinst.sortables.push({\n\t\t\t\t\tinstance: sortable,\n\t\t\t\t\tshouldRevert: sortable.options.revert\n\t\t\t\t});\n\t\t\t\tsortable.refreshPositions();\t// Call the sortable's refreshPositions at drag start to refresh the containerCache since the sortable container cache is used in drag and needs to be up to date (this will ensure it's initialised as well as being kept in step with any changes that might have happened on the page).\n\t\t\t\tsortable._trigger(\"activate\", event, uiSortable);\n\t\t\t}\n\t\t});\n\n\t},\n\tstop: function(event, ui) {\n\n\t\t//If we are still over the sortable, we fake the stop event of the sortable, but also remove helper\n\t\tvar inst = $(this).data(\"draggable\"),\n\t\t\tuiSortable = $.extend({}, ui, { item: inst.element });\n\n\t\t$.each(inst.sortables, function() {\n\t\t\tif(this.instance.isOver) {\n\n\t\t\t\tthis.instance.isOver = 0;\n\n\t\t\t\tinst.cancelHelperRemoval = true; //Don't remove the helper in the draggable instance\n\t\t\t\tthis.instance.cancelHelperRemoval = false; //Remove it in the sortable instance (so sortable plugins like revert still work)\n\n\t\t\t\t//The sortable revert is supported, and we have to set a temporary dropped variable on the draggable to support revert: 'valid/invalid'\n\t\t\t\tif(this.shouldRevert) this.instance.options.revert = true;\n\n\t\t\t\t//Trigger the stop of the sortable\n\t\t\t\tthis.instance._mouseStop(event);\n\n\t\t\t\tthis.instance.options.helper = this.instance.options._helper;\n\n\t\t\t\t//If the helper has been the original item, restore properties in the sortable\n\t\t\t\tif(inst.options.helper == 'original')\n\t\t\t\t\tthis.instance.currentItem.css({ top: 'auto', left: 'auto' });\n\n\t\t\t} else {\n\t\t\t\tthis.instance.cancelHelperRemoval = false; //Remove the helper in the sortable instance\n\t\t\t\tthis.instance._trigger(\"deactivate\", event, uiSortable);\n\t\t\t}\n\n\t\t});\n\n\t},\n\tdrag: function(event, ui) {\n\n\t\tvar inst = $(this).data(\"draggable\"), self = this;\n\n\t\tvar checkPos = function(o) {\n\t\t\tvar dyClick = this.offset.click.top, dxClick = this.offset.click.left;\n\t\t\tvar helperTop = this.positionAbs.top, helperLeft = this.positionAbs.left;\n\t\t\tvar itemHeight = o.height, itemWidth = o.width;\n\t\t\tvar itemTop = o.top, itemLeft = o.left;\n\n\t\t\treturn $.ui.isOver(helperTop + dyClick, helperLeft + dxClick, itemTop, itemLeft, itemHeight, itemWidth);\n\t\t};\n\n\t\t$.each(inst.sortables, function(i) {\n\t\t\t\n\t\t\t//Copy over some variables to allow calling the sortable's native _intersectsWith\n\t\t\tthis.instance.positionAbs = inst.positionAbs;\n\t\t\tthis.instance.helperProportions = inst.helperProportions;\n\t\t\tthis.instance.offset.click = inst.offset.click;\n\t\t\t\n\t\t\tif(this.instance._intersectsWith(this.instance.containerCache)) {\n\n\t\t\t\t//If it intersects, we use a little isOver variable and set it once, so our move-in stuff gets fired only once\n\t\t\t\tif(!this.instance.isOver) {\n\n\t\t\t\t\tthis.instance.isOver = 1;\n\t\t\t\t\t//Now we fake the start of dragging for the sortable instance,\n\t\t\t\t\t//by cloning the list group item, appending it to the sortable and using it as inst.currentItem\n\t\t\t\t\t//We can then fire the start event of the sortable with our passed browser event, and our own helper (so it doesn't create a new one)\n\t\t\t\t\tthis.instance.currentItem = $(self).clone().removeAttr('id').appendTo(this.instance.element).data(\"sortable-item\", true);\n\t\t\t\t\tthis.instance.options._helper = this.instance.options.helper; //Store helper option to later restore it\n\t\t\t\t\tthis.instance.options.helper = function() { return ui.helper[0]; };\n\n\t\t\t\t\tevent.target = this.instance.currentItem[0];\n\t\t\t\t\tthis.instance._mouseCapture(event, true);\n\t\t\t\t\tthis.instance._mouseStart(event, true, true);\n\n\t\t\t\t\t//Because the browser event is way off the new appended portlet, we modify a couple of variables to reflect the changes\n\t\t\t\t\tthis.instance.offset.click.top = inst.offset.click.top;\n\t\t\t\t\tthis.instance.offset.click.left = inst.offset.click.left;\n\t\t\t\t\tthis.instance.offset.parent.left -= inst.offset.parent.left - this.instance.offset.parent.left;\n\t\t\t\t\tthis.instance.offset.parent.top -= inst.offset.parent.top - this.instance.offset.parent.top;\n\n\t\t\t\t\tinst._trigger(\"toSortable\", event);\n\t\t\t\t\tinst.dropped = this.instance.element; //draggable revert needs that\n\t\t\t\t\t//hack so receive/update callbacks work (mostly)\n\t\t\t\t\tinst.currentItem = inst.element;\n\t\t\t\t\tthis.instance.fromOutside = inst;\n\n\t\t\t\t}\n\n\t\t\t\t//Provided we did all the previous steps, we can fire the drag event of the sortable on every draggable drag, when it intersects with the sortable\n\t\t\t\tif(this.instance.currentItem) this.instance._mouseDrag(event);\n\n\t\t\t} else {\n\n\t\t\t\t//If it doesn't intersect with the sortable, and it intersected before,\n\t\t\t\t//we fake the drag stop of the sortable, but make sure it doesn't remove the helper by using cancelHelperRemoval\n\t\t\t\tif(this.instance.isOver) {\n\n\t\t\t\t\tthis.instance.isOver = 0;\n\t\t\t\t\tthis.instance.cancelHelperRemoval = true;\n\t\t\t\t\t\n\t\t\t\t\t//Prevent reverting on this forced stop\n\t\t\t\t\tthis.instance.options.revert = false;\n\t\t\t\t\t\n\t\t\t\t\t// The out event needs to be triggered independently\n\t\t\t\t\tthis.instance._trigger('out', event, this.instance._uiHash(this.instance));\n\t\t\t\t\t\n\t\t\t\t\tthis.instance._mouseStop(event, true);\n\t\t\t\t\tthis.instance.options.helper = this.instance.options._helper;\n\n\t\t\t\t\t//Now we remove our currentItem, the list group clone again, and the placeholder, and animate the helper back to it's original size\n\t\t\t\t\tthis.instance.currentItem.remove();\n\t\t\t\t\tif(this.instance.placeholder) this.instance.placeholder.remove();\n\n\t\t\t\t\tinst._trigger(\"fromSortable\", event);\n\t\t\t\t\tinst.dropped = false; //draggable revert needs that\n\t\t\t\t}\n\n\t\t\t};\n\n\t\t});\n\n\t}\n});\n\n$.ui.plugin.add(\"draggable\", \"cursor\", {\n\tstart: function(event, ui) {\n\t\tvar t = $('body'), o = $(this).data('draggable').options;\n\t\tif (t.css(\"cursor\")) o._cursor = t.css(\"cursor\");\n\t\tt.css(\"cursor\", o.cursor);\n\t},\n\tstop: function(event, ui) {\n\t\tvar o = $(this).data('draggable').options;\n\t\tif (o._cursor) $('body').css(\"cursor\", o._cursor);\n\t}\n});\n\n$.ui.plugin.add(\"draggable\", \"opacity\", {\n\tstart: function(event, ui) {\n\t\tvar t = $(ui.helper), o = $(this).data('draggable').options;\n\t\tif(t.css(\"opacity\")) o._opacity = t.css(\"opacity\");\n\t\tt.css('opacity', o.opacity);\n\t},\n\tstop: function(event, ui) {\n\t\tvar o = $(this).data('draggable').options;\n\t\tif(o._opacity) $(ui.helper).css('opacity', o._opacity);\n\t}\n});\n\n$.ui.plugin.add(\"draggable\", \"scroll\", {\n\tstart: function(event, ui) {\n\t\tvar i = $(this).data(\"draggable\");\n\t\tif(i.scrollParent[0] != document && i.scrollParent[0].tagName != 'HTML') i.overflowOffset = i.scrollParent.offset();\n\t},\n\tdrag: function(event, ui) {\n\n\t\tvar i = $(this).data(\"draggable\"), o = i.options, scrolled = false;\n\n\t\tif(i.scrollParent[0] != document && i.scrollParent[0].tagName != 'HTML') {\n\n\t\t\tif(!o.axis || o.axis != 'x') {\n\t\t\t\tif((i.overflowOffset.top + i.scrollParent[0].offsetHeight) - event.pageY < o.scrollSensitivity)\n\t\t\t\t\ti.scrollParent[0].scrollTop = scrolled = i.scrollParent[0].scrollTop + o.scrollSpeed;\n\t\t\t\telse if(event.pageY - i.overflowOffset.top < o.scrollSensitivity)\n\t\t\t\t\ti.scrollParent[0].scrollTop = scrolled = i.scrollParent[0].scrollTop - o.scrollSpeed;\n\t\t\t}\n\n\t\t\tif(!o.axis || o.axis != 'y') {\n\t\t\t\tif((i.overflowOffset.left + i.scrollParent[0].offsetWidth) - event.pageX < o.scrollSensitivity)\n\t\t\t\t\ti.scrollParent[0].scrollLeft = scrolled = i.scrollParent[0].scrollLeft + o.scrollSpeed;\n\t\t\t\telse if(event.pageX - i.overflowOffset.left < o.scrollSensitivity)\n\t\t\t\t\ti.scrollParent[0].scrollLeft = scrolled = i.scrollParent[0].scrollLeft - o.scrollSpeed;\n\t\t\t}\n\n\t\t} else {\n\n\t\t\tif(!o.axis || o.axis != 'x') {\n\t\t\t\tif(event.pageY - $(document).scrollTop() < o.scrollSensitivity)\n\t\t\t\t\tscrolled = $(document).scrollTop($(document).scrollTop() - o.scrollSpeed);\n\t\t\t\telse if($(window).height() - (event.pageY - $(document).scrollTop()) < o.scrollSensitivity)\n\t\t\t\t\tscrolled = $(document).scrollTop($(document).scrollTop() + o.scrollSpeed);\n\t\t\t}\n\n\t\t\tif(!o.axis || o.axis != 'y') {\n\t\t\t\tif(event.pageX - $(document).scrollLeft() < o.scrollSensitivity)\n\t\t\t\t\tscrolled = $(document).scrollLeft($(document).scrollLeft() - o.scrollSpeed);\n\t\t\t\telse if($(window).width() - (event.pageX - $(document).scrollLeft()) < o.scrollSensitivity)\n\t\t\t\t\tscrolled = $(document).scrollLeft($(document).scrollLeft() + o.scrollSpeed);\n\t\t\t}\n\n\t\t}\n\n\t\tif(scrolled !== false && $.ui.ddmanager && !o.dropBehaviour)\n\t\t\t$.ui.ddmanager.prepareOffsets(i, event);\n\n\t}\n});\n\n$.ui.plugin.add(\"draggable\", \"snap\", {\n\tstart: function(event, ui) {\n\n\t\tvar i = $(this).data(\"draggable\"), o = i.options;\n\t\ti.snapElements = [];\n\n\t\t$(o.snap.constructor != String ? ( o.snap.items || ':data(draggable)' ) : o.snap).each(function() {\n\t\t\tvar $t = $(this); var $o = $t.offset();\n\t\t\tif(this != i.element[0]) i.snapElements.push({\n\t\t\t\titem: this,\n\t\t\t\twidth: $t.outerWidth(), height: $t.outerHeight(),\n\t\t\t\ttop: $o.top, left: $o.left\n\t\t\t});\n\t\t});\n\n\t},\n\tdrag: function(event, ui) {\n\n\t\tvar inst = $(this).data(\"draggable\"), o = inst.options;\n\t\tvar d = o.snapTolerance;\n\n\t\tvar x1 = ui.offset.left, x2 = x1 + inst.helperProportions.width,\n\t\t\ty1 = ui.offset.top, y2 = y1 + inst.helperProportions.height;\n\n\t\tfor (var i = inst.snapElements.length - 1; i >= 0; i--){\n\n\t\t\tvar l = inst.snapElements[i].left, r = l + inst.snapElements[i].width,\n\t\t\t\tt = inst.snapElements[i].top, b = t + inst.snapElements[i].height;\n\n\t\t\t//Yes, I know, this is insane ;)\n\t\t\tif(!((l-d < x1 && x1 < r+d && t-d < y1 && y1 < b+d) || (l-d < x1 && x1 < r+d && t-d < y2 && y2 < b+d) || (l-d < x2 && x2 < r+d && t-d < y1 && y1 < b+d) || (l-d < x2 && x2 < r+d && t-d < y2 && y2 < b+d))) {\n\t\t\t\tif(inst.snapElements[i].snapping) (inst.options.snap.release && inst.options.snap.release.call(inst.element, event, $.extend(inst._uiHash(), { snapItem: inst.snapElements[i].item })));\n\t\t\t\tinst.snapElements[i].snapping = false;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif(o.snapMode != 'inner') {\n\t\t\t\tvar ts = Math.abs(t - y2) <= d;\n\t\t\t\tvar bs = Math.abs(b - y1) <= d;\n\t\t\t\tvar ls = Math.abs(l - x2) <= d;\n\t\t\t\tvar rs = Math.abs(r - x1) <= d;\n\t\t\t\tif(ts) ui.position.top = inst._convertPositionTo(\"relative\", { top: t - inst.helperProportions.height, left: 0 }).top - inst.margins.top;\n\t\t\t\tif(bs) ui.position.top = inst._convertPositionTo(\"relative\", { top: b, left: 0 }).top - inst.margins.top;\n\t\t\t\tif(ls) ui.position.left = inst._convertPositionTo(\"relative\", { top: 0, left: l - inst.helperProportions.width }).left - inst.margins.left;\n\t\t\t\tif(rs) ui.position.left = inst._convertPositionTo(\"relative\", { top: 0, left: r }).left - inst.margins.left;\n\t\t\t}\n\n\t\t\tvar first = (ts || bs || ls || rs);\n\n\t\t\tif(o.snapMode != 'outer') {\n\t\t\t\tvar ts = Math.abs(t - y1) <= d;\n\t\t\t\tvar bs = Math.abs(b - y2) <= d;\n\t\t\t\tvar ls = Math.abs(l - x1) <= d;\n\t\t\t\tvar rs = Math.abs(r - x2) <= d;\n\t\t\t\tif(ts) ui.position.top = inst._convertPositionTo(\"relative\", { top: t, left: 0 }).top - inst.margins.top;\n\t\t\t\tif(bs) ui.position.top = inst._convertPositionTo(\"relative\", { top: b - inst.helperProportions.height, left: 0 }).top - inst.margins.top;\n\t\t\t\tif(ls) ui.position.left = inst._convertPositionTo(\"relative\", { top: 0, left: l }).left - inst.margins.left;\n\t\t\t\tif(rs) ui.position.left = inst._convertPositionTo(\"relative\", { top: 0, left: r - inst.helperProportions.width }).left - inst.margins.left;\n\t\t\t}\n\n\t\t\tif(!inst.snapElements[i].snapping && (ts || bs || ls || rs || first))\n\t\t\t\t(inst.options.snap.snap && inst.options.snap.snap.call(inst.element, event, $.extend(inst._uiHash(), { snapItem: inst.snapElements[i].item })));\n\t\t\tinst.snapElements[i].snapping = (ts || bs || ls || rs || first);\n\n\t\t};\n\n\t}\n});\n\n$.ui.plugin.add(\"draggable\", \"stack\", {\n\tstart: function(event, ui) {\n\n\t\tvar o = $(this).data(\"draggable\").options;\n\n\t\tvar group = $.makeArray($(o.stack)).sort(function(a,b) {\n\t\t\treturn (parseInt($(a).css(\"zIndex\"),10) || 0) - (parseInt($(b).css(\"zIndex\"),10) || 0);\n\t\t});\n\t\tif (!group.length) { return; }\n\t\t\n\t\tvar min = parseInt(group[0].style.zIndex) || 0;\n\t\t$(group).each(function(i) {\n\t\t\tthis.style.zIndex = min + i;\n\t\t});\n\n\t\tthis[0].style.zIndex = min + group.length;\n\n\t}\n});\n\n$.ui.plugin.add(\"draggable\", \"zIndex\", {\n\tstart: function(event, ui) {\n\t\tvar t = $(ui.helper), o = $(this).data(\"draggable\").options;\n\t\tif(t.css(\"zIndex\")) o._zIndex = t.css(\"zIndex\");\n\t\tt.css('zIndex', o.zIndex);\n\t},\n\tstop: function(event, ui) {\n\t\tvar o = $(this).data(\"draggable\").options;\n\t\tif(o._zIndex) $(ui.helper).css('zIndex', o._zIndex);\n\t}\n});\n\n})(jQuery);\n\n(function( $, undefined ) {\n\n$.widget(\"ui.droppable\", {\n\twidgetEventPrefix: \"drop\",\n\toptions: {\n\t\taccept: '*',\n\t\tactiveClass: false,\n\t\taddClasses: true,\n\t\tgreedy: false,\n\t\thoverClass: false,\n\t\tscope: 'default',\n\t\ttolerance: 'intersect'\n\t},\n\t_create: function() {\n\n\t\tvar o = this.options, accept = o.accept;\n\t\tthis.isover = 0; this.isout = 1;\n\n\t\tthis.accept = $.isFunction(accept) ? accept : function(d) {\n\t\t\treturn d.is(accept);\n\t\t};\n\n\t\t//Store the droppable's proportions\n\t\tthis.proportions = { width: this.element[0].offsetWidth, height: this.element[0].offsetHeight };\n\n\t\t// Add the reference and positions to the manager\n\t\t$.ui.ddmanager.droppables[o.scope] = $.ui.ddmanager.droppables[o.scope] || [];\n\t\t$.ui.ddmanager.droppables[o.scope].push(this);\n\n\t\t(o.addClasses && this.element.addClass(\"ui-droppable\"));\n\n\t},\n\n\tdestroy: function() {\n\t\tvar drop = $.ui.ddmanager.droppables[this.options.scope];\n\t\tfor ( var i = 0; i < drop.length; i++ )\n\t\t\tif ( drop[i] == this )\n\t\t\t\tdrop.splice(i, 1);\n\n\t\tthis.element\n\t\t\t.removeClass(\"ui-droppable ui-droppable-disabled\")\n\t\t\t.removeData(\"droppable\")\n\t\t\t.unbind(\".droppable\");\n\n\t\treturn this;\n\t},\n\n\t_setOption: function(key, value) {\n\n\t\tif(key == 'accept') {\n\t\t\tthis.accept = $.isFunction(value) ? value : function(d) {\n\t\t\t\treturn d.is(value);\n\t\t\t};\n\t\t}\n\t\t$.Widget.prototype._setOption.apply(this, arguments);\n\t},\n\n\t_activate: function(event) {\n\t\tvar draggable = $.ui.ddmanager.current;\n\t\tif(this.options.activeClass) this.element.addClass(this.options.activeClass);\n\t\t(draggable && this._trigger('activate', event, this.ui(draggable)));\n\t},\n\n\t_deactivate: function(event) {\n\t\tvar draggable = $.ui.ddmanager.current;\n\t\tif(this.options.activeClass) this.element.removeClass(this.options.activeClass);\n\t\t(draggable && this._trigger('deactivate', event, this.ui(draggable)));\n\t},\n\n\t_over: function(event) {\n\n\t\tvar draggable = $.ui.ddmanager.current;\n\t\tif (!draggable || (draggable.currentItem || draggable.element)[0] == this.element[0]) return; // Bail if draggable and droppable are same element\n\n\t\tif (this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) {\n\t\t\tif(this.options.hoverClass) this.element.addClass(this.options.hoverClass);\n\t\t\tthis._trigger('over', event, this.ui(draggable));\n\t\t}\n\n\t},\n\n\t_out: function(event) {\n\n\t\tvar draggable = $.ui.ddmanager.current;\n\t\tif (!draggable || (draggable.currentItem || draggable.element)[0] == this.element[0]) return; // Bail if draggable and droppable are same element\n\n\t\tif (this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) {\n\t\t\tif(this.options.hoverClass) this.element.removeClass(this.options.hoverClass);\n\t\t\tthis._trigger('out', event, this.ui(draggable));\n\t\t}\n\n\t},\n\n\t_drop: function(event,custom) {\n\n\t\tvar draggable = custom || $.ui.ddmanager.current;\n\t\tif (!draggable || (draggable.currentItem || draggable.element)[0] == this.element[0]) return false; // Bail if draggable and droppable are same element\n\n\t\tvar childrenIntersection = false;\n\t\tthis.element.find(\":data(droppable)\").not(\".ui-draggable-dragging\").each(function() {\n\t\t\tvar inst = $.data(this, 'droppable');\n\t\t\tif(\n\t\t\t\tinst.options.greedy\n\t\t\t\t&& !inst.options.disabled\n\t\t\t\t&& inst.options.scope == draggable.options.scope\n\t\t\t\t&& inst.accept.call(inst.element[0], (draggable.currentItem || draggable.element))\n\t\t\t\t&& $.ui.intersect(draggable, $.extend(inst, { offset: inst.element.offset() }), inst.options.tolerance)\n\t\t\t) { childrenIntersection = true; return false; }\n\t\t});\n\t\tif(childrenIntersection) return false;\n\n\t\tif(this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) {\n\t\t\tif(this.options.activeClass) this.element.removeClass(this.options.activeClass);\n\t\t\tif(this.options.hoverClass) this.element.removeClass(this.options.hoverClass);\n\t\t\tthis._trigger('drop', event, this.ui(draggable));\n\t\t\treturn this.element;\n\t\t}\n\n\t\treturn false;\n\n\t},\n\n\tui: function(c) {\n\t\treturn {\n\t\t\tdraggable: (c.currentItem || c.element),\n\t\t\thelper: c.helper,\n\t\t\tposition: c.position,\n\t\t\toffset: c.positionAbs\n\t\t};\n\t}\n\n});\n\n$.extend($.ui.droppable, {\n\tversion: \"1.8.20\"\n});\n\n$.ui.intersect = function(draggable, droppable, toleranceMode) {\n\n\tif (!droppable.offset) return false;\n\n\tvar x1 = (draggable.positionAbs || draggable.position.absolute).left, x2 = x1 + draggable.helperProportions.width,\n\t\ty1 = (draggable.positionAbs || draggable.position.absolute).top, y2 = y1 + draggable.helperProportions.height;\n\tvar l = droppable.offset.left, r = l + droppable.proportions.width,\n\t\tt = droppable.offset.top, b = t + droppable.proportions.height;\n\n\tswitch (toleranceMode) {\n\t\tcase 'fit':\n\t\t\treturn (l <= x1 && x2 <= r\n\t\t\t\t&& t <= y1 && y2 <= b);\n\t\t\tbreak;\n\t\tcase 'intersect':\n\t\t\treturn (l < x1 + (draggable.helperProportions.width / 2) // Right Half\n\t\t\t\t&& x2 - (draggable.helperProportions.width / 2) < r // Left Half\n\t\t\t\t&& t < y1 + (draggable.helperProportions.height / 2) // Bottom Half\n\t\t\t\t&& y2 - (draggable.helperProportions.height / 2) < b ); // Top Half\n\t\t\tbreak;\n\t\tcase 'pointer':\n\t\t\tvar draggableLeft = ((draggable.positionAbs || draggable.position.absolute).left + (draggable.clickOffset || draggable.offset.click).left),\n\t\t\t\tdraggableTop = ((draggable.positionAbs || draggable.position.absolute).top + (draggable.clickOffset || draggable.offset.click).top),\n\t\t\t\tisOver = $.ui.isOver(draggableTop, draggableLeft, t, l, droppable.proportions.height, droppable.proportions.width);\n\t\t\treturn isOver;\n\t\t\tbreak;\n\t\tcase 'touch':\n\t\t\treturn (\n\t\t\t\t\t(y1 >= t && y1 <= b) ||\t// Top edge touching\n\t\t\t\t\t(y2 >= t && y2 <= b) ||\t// Bottom edge touching\n\t\t\t\t\t(y1 < t && y2 > b)\t\t// Surrounded vertically\n\t\t\t\t) && (\n\t\t\t\t\t(x1 >= l && x1 <= r) ||\t// Left edge touching\n\t\t\t\t\t(x2 >= l && x2 <= r) ||\t// Right edge touching\n\t\t\t\t\t(x1 < l && x2 > r)\t\t// Surrounded horizontally\n\t\t\t\t);\n\t\t\tbreak;\n\t\tdefault:\n\t\t\treturn false;\n\t\t\tbreak;\n\t\t}\n\n};\n\n/*\n\tThis manager tracks offsets of draggables and droppables\n*/\n$.ui.ddmanager = {\n\tcurrent: null,\n\tdroppables: { 'default': [] },\n\tprepareOffsets: function(t, event) {\n\n\t\tvar m = $.ui.ddmanager.droppables[t.options.scope] || [];\n\t\tvar type = event ? event.type : null; // workaround for #2317\n\t\tvar list = (t.currentItem || t.element).find(\":data(droppable)\").andSelf();\n\n\t\tdroppablesLoop: for (var i = 0; i < m.length; i++) {\n\n\t\t\tif(m[i].options.disabled || (t && !m[i].accept.call(m[i].element[0],(t.currentItem || t.element)))) continue;\t//No disabled and non-accepted\n\t\t\tfor (var j=0; j < list.length; j++) { if(list[j] == m[i].element[0]) { m[i].proportions.height = 0; continue droppablesLoop; } }; //Filter out elements in the current dragged item\n\t\t\tm[i].visible = m[i].element.css(\"display\") != \"none\"; if(!m[i].visible) continue; \t\t\t\t\t\t\t\t\t//If the element is not visible, continue\n\n\t\t\tif(type == \"mousedown\") m[i]._activate.call(m[i], event); //Activate the droppable if used directly from draggables\n\n\t\t\tm[i].offset = m[i].element.offset();\n\t\t\tm[i].proportions = { width: m[i].element[0].offsetWidth, height: m[i].element[0].offsetHeight };\n\n\t\t}\n\n\t},\n\tdrop: function(draggable, event) {\n\n\t\tvar dropped = false;\n\t\t$.each($.ui.ddmanager.droppables[draggable.options.scope] || [], function() {\n\n\t\t\tif(!this.options) return;\n\t\t\tif (!this.options.disabled && this.visible && $.ui.intersect(draggable, this, this.options.tolerance))\n\t\t\t\tdropped = this._drop.call(this, event) || dropped;\n\n\t\t\tif (!this.options.disabled && this.visible && this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) {\n\t\t\t\tthis.isout = 1; this.isover = 0;\n\t\t\t\tthis._deactivate.call(this, event);\n\t\t\t}\n\n\t\t});\n\t\treturn dropped;\n\n\t},\n\tdragStart: function( draggable, event ) {\n\t\t//Listen for scrolling so that if the dragging causes scrolling the position of the droppables can be recalculated (see #5003)\n\t\tdraggable.element.parents( \":not(body,html)\" ).bind( \"scroll.droppable\", function() {\n\t\t\tif( !draggable.options.refreshPositions ) $.ui.ddmanager.prepareOffsets( draggable, event );\n\t\t});\n\t},\n\tdrag: function(draggable, event) {\n\n\t\t//If you have a highly dynamic page, you might try this option. It renders positions every time you move the mouse.\n\t\tif(draggable.options.refreshPositions) $.ui.ddmanager.prepareOffsets(draggable, event);\n\n\t\t//Run through all droppables and check their positions based on specific tolerance options\n\t\t$.each($.ui.ddmanager.droppables[draggable.options.scope] || [], function() {\n\n\t\t\tif(this.options.disabled || this.greedyChild || !this.visible) return;\n\t\t\tvar intersects = $.ui.intersect(draggable, this, this.options.tolerance);\n\n\t\t\tvar c = !intersects && this.isover == 1 ? 'isout' : (intersects && this.isover == 0 ? 'isover' : null);\n\t\t\tif(!c) return;\n\n\t\t\tvar parentInstance;\n\t\t\tif (this.options.greedy) {\n\t\t\t\tvar parent = this.element.parents(':data(droppable):eq(0)');\n\t\t\t\tif (parent.length) {\n\t\t\t\t\tparentInstance = $.data(parent[0], 'droppable');\n\t\t\t\t\tparentInstance.greedyChild = (c == 'isover' ? 1 : 0);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// we just moved into a greedy child\n\t\t\tif (parentInstance && c == 'isover') {\n\t\t\t\tparentInstance['isover'] = 0;\n\t\t\t\tparentInstance['isout'] = 1;\n\t\t\t\tparentInstance._out.call(parentInstance, event);\n\t\t\t}\n\n\t\t\tthis[c] = 1; this[c == 'isout' ? 'isover' : 'isout'] = 0;\n\t\t\tthis[c == \"isover\" ? \"_over\" : \"_out\"].call(this, event);\n\n\t\t\t// we just moved out of a greedy child\n\t\t\tif (parentInstance && c == 'isout') {\n\t\t\t\tparentInstance['isout'] = 0;\n\t\t\t\tparentInstance['isover'] = 1;\n\t\t\t\tparentInstance._over.call(parentInstance, event);\n\t\t\t}\n\t\t});\n\n\t},\n\tdragStop: function( draggable, event ) {\n\t\tdraggable.element.parents( \":not(body,html)\" ).unbind( \"scroll.droppable\" );\n\t\t//Call prepareOffsets one final time since IE does not fire return scroll events when overflow was caused by drag (see #5003)\n\t\tif( !draggable.options.refreshPositions ) $.ui.ddmanager.prepareOffsets( draggable, event );\n\t}\n};\n\n})(jQuery);\n\n(function( $, undefined ) {\n\n$.widget(\"ui.resizable\", $.ui.mouse, {\n\twidgetEventPrefix: \"resize\",\n\toptions: {\n\t\talsoResize: false,\n\t\tanimate: false,\n\t\tanimateDuration: \"slow\",\n\t\tanimateEasing: \"swing\",\n\t\taspectRatio: false,\n\t\tautoHide: false,\n\t\tcontainment: false,\n\t\tghost: false,\n\t\tgrid: false,\n\t\thandles: \"e,s,se\",\n\t\thelper: false,\n\t\tmaxHeight: null,\n\t\tmaxWidth: null,\n\t\tminHeight: 10,\n\t\tminWidth: 10,\n\t\tzIndex: 1000\n\t},\n\t_create: function() {\n\n\t\tvar self = this, o = this.options;\n\t\tthis.element.addClass(\"ui-resizable\");\n\n\t\t$.extend(this, {\n\t\t\t_aspectRatio: !!(o.aspectRatio),\n\t\t\taspectRatio: o.aspectRatio,\n\t\t\toriginalElement: this.element,\n\t\t\t_proportionallyResizeElements: [],\n\t\t\t_helper: o.helper || o.ghost || o.animate ? o.helper || 'ui-resizable-helper' : null\n\t\t});\n\n\t\t//Wrap the element if it cannot hold child nodes\n\t\tif(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)) {\n\n\t\t\t//Create a wrapper element and set the wrapper to the new current internal element\n\t\t\tthis.element.wrap(\n\t\t\t\t$('<div class=\"ui-wrapper\" style=\"overflow: hidden;\"></div>').css({\n\t\t\t\t\tposition: this.element.css('position'),\n\t\t\t\t\twidth: this.element.outerWidth(),\n\t\t\t\t\theight: this.element.outerHeight(),\n\t\t\t\t\ttop: this.element.css('top'),\n\t\t\t\t\tleft: this.element.css('left')\n\t\t\t\t})\n\t\t\t);\n\n\t\t\t//Overwrite the original this.element\n\t\t\tthis.element = this.element.parent().data(\n\t\t\t\t\"resizable\", this.element.data('resizable')\n\t\t\t);\n\n\t\t\tthis.elementIsWrapper = true;\n\n\t\t\t//Move margins to the wrapper\n\t\t\tthis.element.css({ marginLeft: this.originalElement.css(\"marginLeft\"), marginTop: this.originalElement.css(\"marginTop\"), marginRight: this.originalElement.css(\"marginRight\"), marginBottom: this.originalElement.css(\"marginBottom\") });\n\t\t\tthis.originalElement.css({ marginLeft: 0, marginTop: 0, marginRight: 0, marginBottom: 0});\n\n\t\t\t//Prevent Safari textarea resize\n\t\t\tthis.originalResizeStyle = this.originalElement.css('resize');\n\t\t\tthis.originalElement.css('resize', 'none');\n\n\t\t\t//Push the actual element to our proportionallyResize internal array\n\t\t\tthis._proportionallyResizeElements.push(this.originalElement.css({ position: 'static', zoom: 1, display: 'block' }));\n\n\t\t\t// avoid IE jump (hard set the margin)\n\t\t\tthis.originalElement.css({ margin: this.originalElement.css('margin') });\n\n\t\t\t// fix handlers offset\n\t\t\tthis._proportionallyResize();\n\n\t\t}\n\n\t\tthis.handles = o.handles || (!$('.ui-resizable-handle', this.element).length ? \"e,s,se\" : { n: '.ui-resizable-n', e: '.ui-resizable-e', s: '.ui-resizable-s', w: '.ui-resizable-w', se: '.ui-resizable-se', sw: '.ui-resizable-sw', ne: '.ui-resizable-ne', nw: '.ui-resizable-nw' });\n\t\tif(this.handles.constructor == String) {\n\n\t\t\tif(this.handles == 'all') this.handles = 'n,e,s,w,se,sw,ne,nw';\n\t\t\tvar n = this.handles.split(\",\"); this.handles = {};\n\n\t\t\tfor(var i = 0; i < n.length; i++) {\n\n\t\t\t\tvar handle = $.trim(n[i]), hname = 'ui-resizable-'+handle;\n\t\t\t\tvar axis = $('<div class=\"ui-resizable-handle ' + hname + '\"></div>');\n\n\t\t\t\t// Apply zIndex to all handles - see #7960\n\t\t\t\taxis.css({ zIndex: o.zIndex });\n\n\t\t\t\t//TODO : What's going on here?\n\t\t\t\tif ('se' == handle) {\n\t\t\t\t\taxis.addClass('ui-icon ui-icon-gripsmall-diagonal-se');\n\t\t\t\t};\n\n\t\t\t\t//Insert into internal handles object and append to element\n\t\t\t\tthis.handles[handle] = '.ui-resizable-'+handle;\n\t\t\t\tthis.element.append(axis);\n\t\t\t}\n\n\t\t}\n\n\t\tthis._renderAxis = function(target) {\n\n\t\t\ttarget = target || this.element;\n\n\t\t\tfor(var i in this.handles) {\n\n\t\t\t\tif(this.handles[i].constructor == String)\n\t\t\t\t\tthis.handles[i] = $(this.handles[i], this.element).show();\n\n\t\t\t\t//Apply pad to wrapper element, needed to fix axis position (textarea, inputs, scrolls)\n\t\t\t\tif (this.elementIsWrapper && this.originalElement[0].nodeName.match(/textarea|input|select|button/i)) {\n\n\t\t\t\t\tvar axis = $(this.handles[i], this.element), padWrapper = 0;\n\n\t\t\t\t\t//Checking the correct pad and border\n\t\t\t\t\tpadWrapper = /sw|ne|nw|se|n|s/.test(i) ? axis.outerHeight() : axis.outerWidth();\n\n\t\t\t\t\t//The padding type i have to apply...\n\t\t\t\t\tvar padPos = [ 'padding',\n\t\t\t\t\t\t/ne|nw|n/.test(i) ? 'Top' :\n\t\t\t\t\t\t/se|sw|s/.test(i) ? 'Bottom' :\n\t\t\t\t\t\t/^e$/.test(i) ? 'Right' : 'Left' ].join(\"\");\n\n\t\t\t\t\ttarget.css(padPos, padWrapper);\n\n\t\t\t\t\tthis._proportionallyResize();\n\n\t\t\t\t}\n\n\t\t\t\t//TODO: What's that good for? There's not anything to be executed left\n\t\t\t\tif(!$(this.handles[i]).length)\n\t\t\t\t\tcontinue;\n\n\t\t\t}\n\t\t};\n\n\t\t//TODO: make renderAxis a prototype function\n\t\tthis._renderAxis(this.element);\n\n\t\tthis._handles = $('.ui-resizable-handle', this.element)\n\t\t\t.disableSelection();\n\n\t\t//Matching axis name\n\t\tthis._handles.mouseover(function() {\n\t\t\tif (!self.resizing) {\n\t\t\t\tif (this.className)\n\t\t\t\t\tvar axis = this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);\n\t\t\t\t//Axis, default = se\n\t\t\t\tself.axis = axis && axis[1] ? axis[1] : 'se';\n\t\t\t}\n\t\t});\n\n\t\t//If we want to auto hide the elements\n\t\tif (o.autoHide) {\n\t\t\tthis._handles.hide();\n\t\t\t$(this.element)\n\t\t\t\t.addClass(\"ui-resizable-autohide\")\n\t\t\t\t.hover(function() {\n\t\t\t\t\tif (o.disabled) return;\n\t\t\t\t\t$(this).removeClass(\"ui-resizable-autohide\");\n\t\t\t\t\tself._handles.show();\n\t\t\t\t},\n\t\t\t\tfunction(){\n\t\t\t\t\tif (o.disabled) return;\n\t\t\t\t\tif (!self.resizing) {\n\t\t\t\t\t\t$(this).addClass(\"ui-resizable-autohide\");\n\t\t\t\t\t\tself._handles.hide();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t}\n\n\t\t//Initialize the mouse interaction\n\t\tthis._mouseInit();\n\n\t},\n\n\tdestroy: function() {\n\n\t\tthis._mouseDestroy();\n\n\t\tvar _destroy = function(exp) {\n\t\t\t$(exp).removeClass(\"ui-resizable ui-resizable-disabled ui-resizable-resizing\")\n\t\t\t\t.removeData(\"resizable\").unbind(\".resizable\").find('.ui-resizable-handle').remove();\n\t\t};\n\n\t\t//TODO: Unwrap at same DOM position\n\t\tif (this.elementIsWrapper) {\n\t\t\t_destroy(this.element);\n\t\t\tvar wrapper = this.element;\n\t\t\twrapper.after(\n\t\t\t\tthis.originalElement.css({\n\t\t\t\t\tposition: wrapper.css('position'),\n\t\t\t\t\twidth: wrapper.outerWidth(),\n\t\t\t\t\theight: wrapper.outerHeight(),\n\t\t\t\t\ttop: wrapper.css('top'),\n\t\t\t\t\tleft: wrapper.css('left')\n\t\t\t\t})\n\t\t\t).remove();\n\t\t}\n\n\t\tthis.originalElement.css('resize', this.originalResizeStyle);\n\t\t_destroy(this.originalElement);\n\n\t\treturn this;\n\t},\n\n\t_mouseCapture: function(event) {\n\t\tvar handle = false;\n\t\tfor (var i in this.handles) {\n\t\t\tif ($(this.handles[i])[0] == event.target) {\n\t\t\t\thandle = true;\n\t\t\t}\n\t\t}\n\n\t\treturn !this.options.disabled && handle;\n\t},\n\n\t_mouseStart: function(event) {\n\n\t\tvar o = this.options, iniPos = this.element.position(), el = this.element;\n\n\t\tthis.resizing = true;\n\t\tthis.documentScroll = { top: $(document).scrollTop(), left: $(document).scrollLeft() };\n\n\t\t// bugfix for http://dev.jquery.com/ticket/1749\n\t\tif (el.is('.ui-draggable') || (/absolute/).test(el.css('position'))) {\n\t\t\tel.css({ position: 'absolute', top: iniPos.top, left: iniPos.left });\n\t\t}\n\n\t\tthis._renderProxy();\n\n\t\tvar curleft = num(this.helper.css('left')), curtop = num(this.helper.css('top'));\n\n\t\tif (o.containment) {\n\t\t\tcurleft += $(o.containment).scrollLeft() || 0;\n\t\t\tcurtop += $(o.containment).scrollTop() || 0;\n\t\t}\n\n\t\t//Store needed variables\n\t\tthis.offset = this.helper.offset();\n\t\tthis.position = { left: curleft, top: curtop };\n\t\tthis.size = this._helper ? { width: el.outerWidth(), height: el.outerHeight() } : { width: el.width(), height: el.height() };\n\t\tthis.originalSize = this._helper ? { width: el.outerWidth(), height: el.outerHeight() } : { width: el.width(), height: el.height() };\n\t\tthis.originalPosition = { left: curleft, top: curtop };\n\t\tthis.sizeDiff = { width: el.outerWidth() - el.width(), height: el.outerHeight() - el.height() };\n\t\tthis.originalMousePosition = { left: event.pageX, top: event.pageY };\n\n\t\t//Aspect Ratio\n\t\tthis.aspectRatio = (typeof o.aspectRatio == 'number') ? o.aspectRatio : ((this.originalSize.width / this.originalSize.height) || 1);\n\n\t    var cursor = $('.ui-resizable-' + this.axis).css('cursor');\n\t    $('body').css('cursor', cursor == 'auto' ? this.axis + '-resize' : cursor);\n\n\t\tel.addClass(\"ui-resizable-resizing\");\n\t\tthis._propagate(\"start\", event);\n\t\treturn true;\n\t},\n\n\t_mouseDrag: function(event) {\n\n\t\t//Increase performance, avoid regex\n\t\tvar el = this.helper, o = this.options, props = {},\n\t\t\tself = this, smp = this.originalMousePosition, a = this.axis;\n\n\t\tvar dx = (event.pageX-smp.left)||0, dy = (event.pageY-smp.top)||0;\n\t\tvar trigger = this._change[a];\n\t\tif (!trigger) return false;\n\n\t\t// Calculate the attrs that will be change\n\t\tvar data = trigger.apply(this, [event, dx, dy]), ie6 = $.browser.msie && $.browser.version < 7, csdif = this.sizeDiff;\n\n\t\t// Put this in the mouseDrag handler since the user can start pressing shift while resizing\n\t\tthis._updateVirtualBoundaries(event.shiftKey);\n\t\tif (this._aspectRatio || event.shiftKey)\n\t\t\tdata = this._updateRatio(data, event);\n\n\t\tdata = this._respectSize(data, event);\n\n\t\t// plugins callbacks need to be called first\n\t\tthis._propagate(\"resize\", event);\n\n\t\tel.css({\n\t\t\ttop: this.position.top + \"px\", left: this.position.left + \"px\",\n\t\t\twidth: this.size.width + \"px\", height: this.size.height + \"px\"\n\t\t});\n\n\t\tif (!this._helper && this._proportionallyResizeElements.length)\n\t\t\tthis._proportionallyResize();\n\n\t\tthis._updateCache(data);\n\n\t\t// calling the user callback at the end\n\t\tthis._trigger('resize', event, this.ui());\n\n\t\treturn false;\n\t},\n\n\t_mouseStop: function(event) {\n\n\t\tthis.resizing = false;\n\t\tvar o = this.options, self = this;\n\n\t\tif(this._helper) {\n\t\t\tvar pr = this._proportionallyResizeElements, ista = pr.length && (/textarea/i).test(pr[0].nodeName),\n\t\t\t\tsoffseth = ista && $.ui.hasScroll(pr[0], 'left') /* TODO - jump height */ ? 0 : self.sizeDiff.height,\n\t\t\t\tsoffsetw = ista ? 0 : self.sizeDiff.width;\n\n\t\t\tvar s = { width: (self.helper.width()  - soffsetw), height: (self.helper.height() - soffseth) },\n\t\t\t\tleft = (parseInt(self.element.css('left'), 10) + (self.position.left - self.originalPosition.left)) || null,\n\t\t\t\ttop = (parseInt(self.element.css('top'), 10) + (self.position.top - self.originalPosition.top)) || null;\n\n\t\t\tif (!o.animate)\n\t\t\t\tthis.element.css($.extend(s, { top: top, left: left }));\n\n\t\t\tself.helper.height(self.size.height);\n\t\t\tself.helper.width(self.size.width);\n\n\t\t\tif (this._helper && !o.animate) this._proportionallyResize();\n\t\t}\n\n\t\t$('body').css('cursor', 'auto');\n\n\t\tthis.element.removeClass(\"ui-resizable-resizing\");\n\n\t\tthis._propagate(\"stop\", event);\n\n\t\tif (this._helper) this.helper.remove();\n\t\treturn false;\n\n\t},\n\n    _updateVirtualBoundaries: function(forceAspectRatio) {\n        var o = this.options, pMinWidth, pMaxWidth, pMinHeight, pMaxHeight, b;\n\n        b = {\n            minWidth: isNumber(o.minWidth) ? o.minWidth : 0,\n            maxWidth: isNumber(o.maxWidth) ? o.maxWidth : Infinity,\n            minHeight: isNumber(o.minHeight) ? o.minHeight : 0,\n            maxHeight: isNumber(o.maxHeight) ? o.maxHeight : Infinity\n        };\n\n        if(this._aspectRatio || forceAspectRatio) {\n            // We want to create an enclosing box whose aspect ration is the requested one\n            // First, compute the \"projected\" size for each dimension based on the aspect ratio and other dimension\n            pMinWidth = b.minHeight * this.aspectRatio;\n            pMinHeight = b.minWidth / this.aspectRatio;\n            pMaxWidth = b.maxHeight * this.aspectRatio;\n            pMaxHeight = b.maxWidth / this.aspectRatio;\n\n            if(pMinWidth > b.minWidth) b.minWidth = pMinWidth;\n            if(pMinHeight > b.minHeight) b.minHeight = pMinHeight;\n            if(pMaxWidth < b.maxWidth) b.maxWidth = pMaxWidth;\n            if(pMaxHeight < b.maxHeight) b.maxHeight = pMaxHeight;\n        }\n        this._vBoundaries = b;\n    },\n\n\t_updateCache: function(data) {\n\t\tvar o = this.options;\n\t\tthis.offset = this.helper.offset();\n\t\tif (isNumber(data.left)) this.position.left = data.left;\n\t\tif (isNumber(data.top)) this.position.top = data.top;\n\t\tif (isNumber(data.height)) this.size.height = data.height;\n\t\tif (isNumber(data.width)) this.size.width = data.width;\n\t},\n\n\t_updateRatio: function(data, event) {\n\n\t\tvar o = this.options, cpos = this.position, csize = this.size, a = this.axis;\n\n\t\tif (isNumber(data.height)) data.width = (data.height * this.aspectRatio);\n\t\telse if (isNumber(data.width)) data.height = (data.width / this.aspectRatio);\n\n\t\tif (a == 'sw') {\n\t\t\tdata.left = cpos.left + (csize.width - data.width);\n\t\t\tdata.top = null;\n\t\t}\n\t\tif (a == 'nw') {\n\t\t\tdata.top = cpos.top + (csize.height - data.height);\n\t\t\tdata.left = cpos.left + (csize.width - data.width);\n\t\t}\n\n\t\treturn data;\n\t},\n\n\t_respectSize: function(data, event) {\n\n\t\tvar el = this.helper, o = this._vBoundaries, pRatio = this._aspectRatio || event.shiftKey, a = this.axis,\n\t\t\t\tismaxw = isNumber(data.width) && o.maxWidth && (o.maxWidth < data.width), ismaxh = isNumber(data.height) && o.maxHeight && (o.maxHeight < data.height),\n\t\t\t\t\tisminw = isNumber(data.width) && o.minWidth && (o.minWidth > data.width), isminh = isNumber(data.height) && o.minHeight && (o.minHeight > data.height);\n\n\t\tif (isminw) data.width = o.minWidth;\n\t\tif (isminh) data.height = o.minHeight;\n\t\tif (ismaxw) data.width = o.maxWidth;\n\t\tif (ismaxh) data.height = o.maxHeight;\n\n\t\tvar dw = this.originalPosition.left + this.originalSize.width, dh = this.position.top + this.size.height;\n\t\tvar cw = /sw|nw|w/.test(a), ch = /nw|ne|n/.test(a);\n\n\t\tif (isminw && cw) data.left = dw - o.minWidth;\n\t\tif (ismaxw && cw) data.left = dw - o.maxWidth;\n\t\tif (isminh && ch)\tdata.top = dh - o.minHeight;\n\t\tif (ismaxh && ch)\tdata.top = dh - o.maxHeight;\n\n\t\t// fixing jump error on top/left - bug #2330\n\t\tvar isNotwh = !data.width && !data.height;\n\t\tif (isNotwh && !data.left && data.top) data.top = null;\n\t\telse if (isNotwh && !data.top && data.left) data.left = null;\n\n\t\treturn data;\n\t},\n\n\t_proportionallyResize: function() {\n\n\t\tvar o = this.options;\n\t\tif (!this._proportionallyResizeElements.length) return;\n\t\tvar element = this.helper || this.element;\n\n\t\tfor (var i=0; i < this._proportionallyResizeElements.length; i++) {\n\n\t\t\tvar prel = this._proportionallyResizeElements[i];\n\n\t\t\tif (!this.borderDif) {\n\t\t\t\tvar b = [prel.css('borderTopWidth'), prel.css('borderRightWidth'), prel.css('borderBottomWidth'), prel.css('borderLeftWidth')],\n\t\t\t\t\tp = [prel.css('paddingTop'), prel.css('paddingRight'), prel.css('paddingBottom'), prel.css('paddingLeft')];\n\n\t\t\t\tthis.borderDif = $.map(b, function(v, i) {\n\t\t\t\t\tvar border = parseInt(v,10)||0, padding = parseInt(p[i],10)||0;\n\t\t\t\t\treturn border + padding;\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tif ($.browser.msie && !(!($(element).is(':hidden') || $(element).parents(':hidden').length)))\n\t\t\t\tcontinue;\n\n\t\t\tprel.css({\n\t\t\t\theight: (element.height() - this.borderDif[0] - this.borderDif[2]) || 0,\n\t\t\t\twidth: (element.width() - this.borderDif[1] - this.borderDif[3]) || 0\n\t\t\t});\n\n\t\t};\n\n\t},\n\n\t_renderProxy: function() {\n\n\t\tvar el = this.element, o = this.options;\n\t\tthis.elementOffset = el.offset();\n\n\t\tif(this._helper) {\n\n\t\t\tthis.helper = this.helper || $('<div style=\"overflow:hidden;\"></div>');\n\n\t\t\t// fix ie6 offset TODO: This seems broken\n\t\t\tvar ie6 = $.browser.msie && $.browser.version < 7, ie6offset = (ie6 ? 1 : 0),\n\t\t\tpxyoffset = ( ie6 ? 2 : -1 );\n\n\t\t\tthis.helper.addClass(this._helper).css({\n\t\t\t\twidth: this.element.outerWidth() + pxyoffset,\n\t\t\t\theight: this.element.outerHeight() + pxyoffset,\n\t\t\t\tposition: 'absolute',\n\t\t\t\tleft: this.elementOffset.left - ie6offset +'px',\n\t\t\t\ttop: this.elementOffset.top - ie6offset +'px',\n\t\t\t\tzIndex: ++o.zIndex //TODO: Don't modify option\n\t\t\t});\n\n\t\t\tthis.helper\n\t\t\t\t.appendTo(\"body\")\n\t\t\t\t.disableSelection();\n\n\t\t} else {\n\t\t\tthis.helper = this.element;\n\t\t}\n\n\t},\n\n\t_change: {\n\t\te: function(event, dx, dy) {\n\t\t\treturn { width: this.originalSize.width + dx };\n\t\t},\n\t\tw: function(event, dx, dy) {\n\t\t\tvar o = this.options, cs = this.originalSize, sp = this.originalPosition;\n\t\t\treturn { left: sp.left + dx, width: cs.width - dx };\n\t\t},\n\t\tn: function(event, dx, dy) {\n\t\t\tvar o = this.options, cs = this.originalSize, sp = this.originalPosition;\n\t\t\treturn { top: sp.top + dy, height: cs.height - dy };\n\t\t},\n\t\ts: function(event, dx, dy) {\n\t\t\treturn { height: this.originalSize.height + dy };\n\t\t},\n\t\tse: function(event, dx, dy) {\n\t\t\treturn $.extend(this._change.s.apply(this, arguments), this._change.e.apply(this, [event, dx, dy]));\n\t\t},\n\t\tsw: function(event, dx, dy) {\n\t\t\treturn $.extend(this._change.s.apply(this, arguments), this._change.w.apply(this, [event, dx, dy]));\n\t\t},\n\t\tne: function(event, dx, dy) {\n\t\t\treturn $.extend(this._change.n.apply(this, arguments), this._change.e.apply(this, [event, dx, dy]));\n\t\t},\n\t\tnw: function(event, dx, dy) {\n\t\t\treturn $.extend(this._change.n.apply(this, arguments), this._change.w.apply(this, [event, dx, dy]));\n\t\t}\n\t},\n\n\t_propagate: function(n, event) {\n\t\t$.ui.plugin.call(this, n, [event, this.ui()]);\n\t\t(n != \"resize\" && this._trigger(n, event, this.ui()));\n\t},\n\n\tplugins: {},\n\n\tui: function() {\n\t\treturn {\n\t\t\toriginalElement: this.originalElement,\n\t\t\telement: this.element,\n\t\t\thelper: this.helper,\n\t\t\tposition: this.position,\n\t\t\tsize: this.size,\n\t\t\toriginalSize: this.originalSize,\n\t\t\toriginalPosition: this.originalPosition\n\t\t};\n\t}\n\n});\n\n$.extend($.ui.resizable, {\n\tversion: \"1.8.20\"\n});\n\n/*\n * Resizable Extensions\n */\n\n$.ui.plugin.add(\"resizable\", \"alsoResize\", {\n\n\tstart: function (event, ui) {\n\t\tvar self = $(this).data(\"resizable\"), o = self.options;\n\n\t\tvar _store = function (exp) {\n\t\t\t$(exp).each(function() {\n\t\t\t\tvar el = $(this);\n\t\t\t\tel.data(\"resizable-alsoresize\", {\n\t\t\t\t\twidth: parseInt(el.width(), 10), height: parseInt(el.height(), 10),\n\t\t\t\t\tleft: parseInt(el.css('left'), 10), top: parseInt(el.css('top'), 10)\n\t\t\t\t});\n\t\t\t});\n\t\t};\n\n\t\tif (typeof(o.alsoResize) == 'object' && !o.alsoResize.parentNode) {\n\t\t\tif (o.alsoResize.length) { o.alsoResize = o.alsoResize[0]; _store(o.alsoResize); }\n\t\t\telse { $.each(o.alsoResize, function (exp) { _store(exp); }); }\n\t\t}else{\n\t\t\t_store(o.alsoResize);\n\t\t}\n\t},\n\n\tresize: function (event, ui) {\n\t\tvar self = $(this).data(\"resizable\"), o = self.options, os = self.originalSize, op = self.originalPosition;\n\n\t\tvar delta = {\n\t\t\theight: (self.size.height - os.height) || 0, width: (self.size.width - os.width) || 0,\n\t\t\ttop: (self.position.top - op.top) || 0, left: (self.position.left - op.left) || 0\n\t\t},\n\n\t\t_alsoResize = function (exp, c) {\n\t\t\t$(exp).each(function() {\n\t\t\t\tvar el = $(this), start = $(this).data(\"resizable-alsoresize\"), style = {}, \n\t\t\t\t\tcss = c && c.length ? c : el.parents(ui.originalElement[0]).length ? ['width', 'height'] : ['width', 'height', 'top', 'left'];\n\n\t\t\t\t$.each(css, function (i, prop) {\n\t\t\t\t\tvar sum = (start[prop]||0) + (delta[prop]||0);\n\t\t\t\t\tif (sum && sum >= 0)\n\t\t\t\t\t\tstyle[prop] = sum || null;\n\t\t\t\t});\n\n\t\t\t\tel.css(style);\n\t\t\t});\n\t\t};\n\n\t\tif (typeof(o.alsoResize) == 'object' && !o.alsoResize.nodeType) {\n\t\t\t$.each(o.alsoResize, function (exp, c) { _alsoResize(exp, c); });\n\t\t}else{\n\t\t\t_alsoResize(o.alsoResize);\n\t\t}\n\t},\n\n\tstop: function (event, ui) {\n\t\t$(this).removeData(\"resizable-alsoresize\");\n\t}\n});\n\n$.ui.plugin.add(\"resizable\", \"animate\", {\n\n\tstop: function(event, ui) {\n\t\tvar self = $(this).data(\"resizable\"), o = self.options;\n\n\t\tvar pr = self._proportionallyResizeElements, ista = pr.length && (/textarea/i).test(pr[0].nodeName),\n\t\t\t\t\tsoffseth = ista && $.ui.hasScroll(pr[0], 'left') /* TODO - jump height */ ? 0 : self.sizeDiff.height,\n\t\t\t\t\t\tsoffsetw = ista ? 0 : self.sizeDiff.width;\n\n\t\tvar style = { width: (self.size.width - soffsetw), height: (self.size.height - soffseth) },\n\t\t\t\t\tleft = (parseInt(self.element.css('left'), 10) + (self.position.left - self.originalPosition.left)) || null,\n\t\t\t\t\t\ttop = (parseInt(self.element.css('top'), 10) + (self.position.top - self.originalPosition.top)) || null;\n\n\t\tself.element.animate(\n\t\t\t$.extend(style, top && left ? { top: top, left: left } : {}), {\n\t\t\t\tduration: o.animateDuration,\n\t\t\t\teasing: o.animateEasing,\n\t\t\t\tstep: function() {\n\n\t\t\t\t\tvar data = {\n\t\t\t\t\t\twidth: parseInt(self.element.css('width'), 10),\n\t\t\t\t\t\theight: parseInt(self.element.css('height'), 10),\n\t\t\t\t\t\ttop: parseInt(self.element.css('top'), 10),\n\t\t\t\t\t\tleft: parseInt(self.element.css('left'), 10)\n\t\t\t\t\t};\n\n\t\t\t\t\tif (pr && pr.length) $(pr[0]).css({ width: data.width, height: data.height });\n\n\t\t\t\t\t// propagating resize, and updating values for each animation step\n\t\t\t\t\tself._updateCache(data);\n\t\t\t\t\tself._propagate(\"resize\", event);\n\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t}\n\n});\n\n$.ui.plugin.add(\"resizable\", \"containment\", {\n\n\tstart: function(event, ui) {\n\t\tvar self = $(this).data(\"resizable\"), o = self.options, el = self.element;\n\t\tvar oc = o.containment,\tce = (oc instanceof $) ? oc.get(0) : (/parent/.test(oc)) ? el.parent().get(0) : oc;\n\t\tif (!ce) return;\n\n\t\tself.containerElement = $(ce);\n\n\t\tif (/document/.test(oc) || oc == document) {\n\t\t\tself.containerOffset = { left: 0, top: 0 };\n\t\t\tself.containerPosition = { left: 0, top: 0 };\n\n\t\t\tself.parentData = {\n\t\t\t\telement: $(document), left: 0, top: 0,\n\t\t\t\twidth: $(document).width(), height: $(document).height() || document.body.parentNode.scrollHeight\n\t\t\t};\n\t\t}\n\n\t\t// i'm a node, so compute top, left, right, bottom\n\t\telse {\n\t\t\tvar element = $(ce), p = [];\n\t\t\t$([ \"Top\", \"Right\", \"Left\", \"Bottom\" ]).each(function(i, name) { p[i] = num(element.css(\"padding\" + name)); });\n\n\t\t\tself.containerOffset = element.offset();\n\t\t\tself.containerPosition = element.position();\n\t\t\tself.containerSize = { height: (element.innerHeight() - p[3]), width: (element.innerWidth() - p[1]) };\n\n\t\t\tvar co = self.containerOffset, ch = self.containerSize.height,\tcw = self.containerSize.width,\n\t\t\t\t\t\twidth = ($.ui.hasScroll(ce, \"left\") ? ce.scrollWidth : cw ), height = ($.ui.hasScroll(ce) ? ce.scrollHeight : ch);\n\n\t\t\tself.parentData = {\n\t\t\t\telement: ce, left: co.left, top: co.top, width: width, height: height\n\t\t\t};\n\t\t}\n\t},\n\n\tresize: function(event, ui) {\n\t\tvar self = $(this).data(\"resizable\"), o = self.options,\n\t\t\t\tps = self.containerSize, co = self.containerOffset, cs = self.size, cp = self.position,\n\t\t\t\tpRatio = self._aspectRatio || event.shiftKey, cop = { top:0, left:0 }, ce = self.containerElement;\n\n\t\tif (ce[0] != document && (/static/).test(ce.css('position'))) cop = co;\n\n\t\tif (cp.left < (self._helper ? co.left : 0)) {\n\t\t\tself.size.width = self.size.width + (self._helper ? (self.position.left - co.left) : (self.position.left - cop.left));\n\t\t\tif (pRatio) self.size.height = self.size.width / self.aspectRatio;\n\t\t\tself.position.left = o.helper ? co.left : 0;\n\t\t}\n\n\t\tif (cp.top < (self._helper ? co.top : 0)) {\n\t\t\tself.size.height = self.size.height + (self._helper ? (self.position.top - co.top) : self.position.top);\n\t\t\tif (pRatio) self.size.width = self.size.height * self.aspectRatio;\n\t\t\tself.position.top = self._helper ? co.top : 0;\n\t\t}\n\n\t\tself.offset.left = self.parentData.left+self.position.left;\n\t\tself.offset.top = self.parentData.top+self.position.top;\n\n\t\tvar woset = Math.abs( (self._helper ? self.offset.left - cop.left : (self.offset.left - cop.left)) + self.sizeDiff.width ),\n\t\t\t\t\thoset = Math.abs( (self._helper ? self.offset.top - cop.top : (self.offset.top - co.top)) + self.sizeDiff.height );\n\n\t\tvar isParent = self.containerElement.get(0) == self.element.parent().get(0),\n\t\t    isOffsetRelative = /relative|absolute/.test(self.containerElement.css('position'));\n\n\t\tif(isParent && isOffsetRelative) woset -= self.parentData.left;\n\n\t\tif (woset + self.size.width >= self.parentData.width) {\n\t\t\tself.size.width = self.parentData.width - woset;\n\t\t\tif (pRatio) self.size.height = self.size.width / self.aspectRatio;\n\t\t}\n\n\t\tif (hoset + self.size.height >= self.parentData.height) {\n\t\t\tself.size.height = self.parentData.height - hoset;\n\t\t\tif (pRatio) self.size.width = self.size.height * self.aspectRatio;\n\t\t}\n\t},\n\n\tstop: function(event, ui){\n\t\tvar self = $(this).data(\"resizable\"), o = self.options, cp = self.position,\n\t\t\t\tco = self.containerOffset, cop = self.containerPosition, ce = self.containerElement;\n\n\t\tvar helper = $(self.helper), ho = helper.offset(), w = helper.outerWidth() - self.sizeDiff.width, h = helper.outerHeight() - self.sizeDiff.height;\n\n\t\tif (self._helper && !o.animate && (/relative/).test(ce.css('position')))\n\t\t\t$(this).css({ left: ho.left - cop.left - co.left, width: w, height: h });\n\n\t\tif (self._helper && !o.animate && (/static/).test(ce.css('position')))\n\t\t\t$(this).css({ left: ho.left - cop.left - co.left, width: w, height: h });\n\n\t}\n});\n\n$.ui.plugin.add(\"resizable\", \"ghost\", {\n\n\tstart: function(event, ui) {\n\n\t\tvar self = $(this).data(\"resizable\"), o = self.options, cs = self.size;\n\n\t\tself.ghost = self.originalElement.clone();\n\t\tself.ghost\n\t\t\t.css({ opacity: .25, display: 'block', position: 'relative', height: cs.height, width: cs.width, margin: 0, left: 0, top: 0 })\n\t\t\t.addClass('ui-resizable-ghost')\n\t\t\t.addClass(typeof o.ghost == 'string' ? o.ghost : '');\n\n\t\tself.ghost.appendTo(self.helper);\n\n\t},\n\n\tresize: function(event, ui){\n\t\tvar self = $(this).data(\"resizable\"), o = self.options;\n\t\tif (self.ghost) self.ghost.css({ position: 'relative', height: self.size.height, width: self.size.width });\n\t},\n\n\tstop: function(event, ui){\n\t\tvar self = $(this).data(\"resizable\"), o = self.options;\n\t\tif (self.ghost && self.helper) self.helper.get(0).removeChild(self.ghost.get(0));\n\t}\n\n});\n\n$.ui.plugin.add(\"resizable\", \"grid\", {\n\n\tresize: function(event, ui) {\n\t\tvar self = $(this).data(\"resizable\"), o = self.options, cs = self.size, os = self.originalSize, op = self.originalPosition, a = self.axis, ratio = o._aspectRatio || event.shiftKey;\n\t\to.grid = typeof o.grid == \"number\" ? [o.grid, o.grid] : o.grid;\n\t\tvar ox = Math.round((cs.width - os.width) / (o.grid[0]||1)) * (o.grid[0]||1), oy = Math.round((cs.height - os.height) / (o.grid[1]||1)) * (o.grid[1]||1);\n\n\t\tif (/^(se|s|e)$/.test(a)) {\n\t\t\tself.size.width = os.width + ox;\n\t\t\tself.size.height = os.height + oy;\n\t\t}\n\t\telse if (/^(ne)$/.test(a)) {\n\t\t\tself.size.width = os.width + ox;\n\t\t\tself.size.height = os.height + oy;\n\t\t\tself.position.top = op.top - oy;\n\t\t}\n\t\telse if (/^(sw)$/.test(a)) {\n\t\t\tself.size.width = os.width + ox;\n\t\t\tself.size.height = os.height + oy;\n\t\t\tself.position.left = op.left - ox;\n\t\t}\n\t\telse {\n\t\t\tself.size.width = os.width + ox;\n\t\t\tself.size.height = os.height + oy;\n\t\t\tself.position.top = op.top - oy;\n\t\t\tself.position.left = op.left - ox;\n\t\t}\n\t}\n\n});\n\nvar num = function(v) {\n\treturn parseInt(v, 10) || 0;\n};\n\nvar isNumber = function(value) {\n\treturn !isNaN(parseInt(value, 10));\n};\n\n})(jQuery);\n\n(function( $, undefined ) {\n\n$.widget(\"ui.selectable\", $.ui.mouse, {\n\toptions: {\n\t\tappendTo: 'body',\n\t\tautoRefresh: true,\n\t\tdistance: 0,\n\t\tfilter: '*',\n\t\ttolerance: 'touch'\n\t},\n\t_create: function() {\n\t\tvar self = this;\n\n\t\tthis.element.addClass(\"ui-selectable\");\n\n\t\tthis.dragged = false;\n\n\t\t// cache selectee children based on filter\n\t\tvar selectees;\n\t\tthis.refresh = function() {\n\t\t\tselectees = $(self.options.filter, self.element[0]);\n\t\t\tselectees.addClass(\"ui-selectee\");\n\t\t\tselectees.each(function() {\n\t\t\t\tvar $this = $(this);\n\t\t\t\tvar pos = $this.offset();\n\t\t\t\t$.data(this, \"selectable-item\", {\n\t\t\t\t\telement: this,\n\t\t\t\t\t$element: $this,\n\t\t\t\t\tleft: pos.left,\n\t\t\t\t\ttop: pos.top,\n\t\t\t\t\tright: pos.left + $this.outerWidth(),\n\t\t\t\t\tbottom: pos.top + $this.outerHeight(),\n\t\t\t\t\tstartselected: false,\n\t\t\t\t\tselected: $this.hasClass('ui-selected'),\n\t\t\t\t\tselecting: $this.hasClass('ui-selecting'),\n\t\t\t\t\tunselecting: $this.hasClass('ui-unselecting')\n\t\t\t\t});\n\t\t\t});\n\t\t};\n\t\tthis.refresh();\n\n\t\tthis.selectees = selectees.addClass(\"ui-selectee\");\n\n\t\tthis._mouseInit();\n\n\t\tthis.helper = $(\"<div class='ui-selectable-helper'></div>\");\n\t},\n\n\tdestroy: function() {\n\t\tthis.selectees\n\t\t\t.removeClass(\"ui-selectee\")\n\t\t\t.removeData(\"selectable-item\");\n\t\tthis.element\n\t\t\t.removeClass(\"ui-selectable ui-selectable-disabled\")\n\t\t\t.removeData(\"selectable\")\n\t\t\t.unbind(\".selectable\");\n\t\tthis._mouseDestroy();\n\n\t\treturn this;\n\t},\n\n\t_mouseStart: function(event) {\n\t\tvar self = this;\n\n\t\tthis.opos = [event.pageX, event.pageY];\n\n\t\tif (this.options.disabled)\n\t\t\treturn;\n\n\t\tvar options = this.options;\n\n\t\tthis.selectees = $(options.filter, this.element[0]);\n\n\t\tthis._trigger(\"start\", event);\n\n\t\t$(options.appendTo).append(this.helper);\n\t\t// position helper (lasso)\n\t\tthis.helper.css({\n\t\t\t\"left\": event.clientX,\n\t\t\t\"top\": event.clientY,\n\t\t\t\"width\": 0,\n\t\t\t\"height\": 0\n\t\t});\n\n\t\tif (options.autoRefresh) {\n\t\t\tthis.refresh();\n\t\t}\n\n\t\tthis.selectees.filter('.ui-selected').each(function() {\n\t\t\tvar selectee = $.data(this, \"selectable-item\");\n\t\t\tselectee.startselected = true;\n\t\t\tif (!event.metaKey && !event.ctrlKey) {\n\t\t\t\tselectee.$element.removeClass('ui-selected');\n\t\t\t\tselectee.selected = false;\n\t\t\t\tselectee.$element.addClass('ui-unselecting');\n\t\t\t\tselectee.unselecting = true;\n\t\t\t\t// selectable UNSELECTING callback\n\t\t\t\tself._trigger(\"unselecting\", event, {\n\t\t\t\t\tunselecting: selectee.element\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\n\t\t$(event.target).parents().andSelf().each(function() {\n\t\t\tvar selectee = $.data(this, \"selectable-item\");\n\t\t\tif (selectee) {\n\t\t\t\tvar doSelect = (!event.metaKey && !event.ctrlKey) || !selectee.$element.hasClass('ui-selected');\n\t\t\t\tselectee.$element\n\t\t\t\t\t.removeClass(doSelect ? \"ui-unselecting\" : \"ui-selected\")\n\t\t\t\t\t.addClass(doSelect ? \"ui-selecting\" : \"ui-unselecting\");\n\t\t\t\tselectee.unselecting = !doSelect;\n\t\t\t\tselectee.selecting = doSelect;\n\t\t\t\tselectee.selected = doSelect;\n\t\t\t\t// selectable (UN)SELECTING callback\n\t\t\t\tif (doSelect) {\n\t\t\t\t\tself._trigger(\"selecting\", event, {\n\t\t\t\t\t\tselecting: selectee.element\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tself._trigger(\"unselecting\", event, {\n\t\t\t\t\t\tunselecting: selectee.element\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t}\n\t\t});\n\n\t},\n\n\t_mouseDrag: function(event) {\n\t\tvar self = this;\n\t\tthis.dragged = true;\n\n\t\tif (this.options.disabled)\n\t\t\treturn;\n\n\t\tvar options = this.options;\n\n\t\tvar x1 = this.opos[0], y1 = this.opos[1], x2 = event.pageX, y2 = event.pageY;\n\t\tif (x1 > x2) { var tmp = x2; x2 = x1; x1 = tmp; }\n\t\tif (y1 > y2) { var tmp = y2; y2 = y1; y1 = tmp; }\n\t\tthis.helper.css({left: x1, top: y1, width: x2-x1, height: y2-y1});\n\n\t\tthis.selectees.each(function() {\n\t\t\tvar selectee = $.data(this, \"selectable-item\");\n\t\t\t//prevent helper from being selected if appendTo: selectable\n\t\t\tif (!selectee || selectee.element == self.element[0])\n\t\t\t\treturn;\n\t\t\tvar hit = false;\n\t\t\tif (options.tolerance == 'touch') {\n\t\t\t\thit = ( !(selectee.left > x2 || selectee.right < x1 || selectee.top > y2 || selectee.bottom < y1) );\n\t\t\t} else if (options.tolerance == 'fit') {\n\t\t\t\thit = (selectee.left > x1 && selectee.right < x2 && selectee.top > y1 && selectee.bottom < y2);\n\t\t\t}\n\n\t\t\tif (hit) {\n\t\t\t\t// SELECT\n\t\t\t\tif (selectee.selected) {\n\t\t\t\t\tselectee.$element.removeClass('ui-selected');\n\t\t\t\t\tselectee.selected = false;\n\t\t\t\t}\n\t\t\t\tif (selectee.unselecting) {\n\t\t\t\t\tselectee.$element.removeClass('ui-unselecting');\n\t\t\t\t\tselectee.unselecting = false;\n\t\t\t\t}\n\t\t\t\tif (!selectee.selecting) {\n\t\t\t\t\tselectee.$element.addClass('ui-selecting');\n\t\t\t\t\tselectee.selecting = true;\n\t\t\t\t\t// selectable SELECTING callback\n\t\t\t\t\tself._trigger(\"selecting\", event, {\n\t\t\t\t\t\tselecting: selectee.element\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// UNSELECT\n\t\t\t\tif (selectee.selecting) {\n\t\t\t\t\tif ((event.metaKey || event.ctrlKey) && selectee.startselected) {\n\t\t\t\t\t\tselectee.$element.removeClass('ui-selecting');\n\t\t\t\t\t\tselectee.selecting = false;\n\t\t\t\t\t\tselectee.$element.addClass('ui-selected');\n\t\t\t\t\t\tselectee.selected = true;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tselectee.$element.removeClass('ui-selecting');\n\t\t\t\t\t\tselectee.selecting = false;\n\t\t\t\t\t\tif (selectee.startselected) {\n\t\t\t\t\t\t\tselectee.$element.addClass('ui-unselecting');\n\t\t\t\t\t\t\tselectee.unselecting = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// selectable UNSELECTING callback\n\t\t\t\t\t\tself._trigger(\"unselecting\", event, {\n\t\t\t\t\t\t\tunselecting: selectee.element\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (selectee.selected) {\n\t\t\t\t\tif (!event.metaKey && !event.ctrlKey && !selectee.startselected) {\n\t\t\t\t\t\tselectee.$element.removeClass('ui-selected');\n\t\t\t\t\t\tselectee.selected = false;\n\n\t\t\t\t\t\tselectee.$element.addClass('ui-unselecting');\n\t\t\t\t\t\tselectee.unselecting = true;\n\t\t\t\t\t\t// selectable UNSELECTING callback\n\t\t\t\t\t\tself._trigger(\"unselecting\", event, {\n\t\t\t\t\t\t\tunselecting: selectee.element\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\treturn false;\n\t},\n\n\t_mouseStop: function(event) {\n\t\tvar self = this;\n\n\t\tthis.dragged = false;\n\n\t\tvar options = this.options;\n\n\t\t$('.ui-unselecting', this.element[0]).each(function() {\n\t\t\tvar selectee = $.data(this, \"selectable-item\");\n\t\t\tselectee.$element.removeClass('ui-unselecting');\n\t\t\tselectee.unselecting = false;\n\t\t\tselectee.startselected = false;\n\t\t\tself._trigger(\"unselected\", event, {\n\t\t\t\tunselected: selectee.element\n\t\t\t});\n\t\t});\n\t\t$('.ui-selecting', this.element[0]).each(function() {\n\t\t\tvar selectee = $.data(this, \"selectable-item\");\n\t\t\tselectee.$element.removeClass('ui-selecting').addClass('ui-selected');\n\t\t\tselectee.selecting = false;\n\t\t\tselectee.selected = true;\n\t\t\tselectee.startselected = true;\n\t\t\tself._trigger(\"selected\", event, {\n\t\t\t\tselected: selectee.element\n\t\t\t});\n\t\t});\n\t\tthis._trigger(\"stop\", event);\n\n\t\tthis.helper.remove();\n\n\t\treturn false;\n\t}\n\n});\n\n$.extend($.ui.selectable, {\n\tversion: \"1.8.20\"\n});\n\n})(jQuery);\n\n(function( $, undefined ) {\n\n$.widget(\"ui.sortable\", $.ui.mouse, {\n\twidgetEventPrefix: \"sort\",\n\tready: false,\n\toptions: {\n\t\tappendTo: \"parent\",\n\t\taxis: false,\n\t\tconnectWith: false,\n\t\tcontainment: false,\n\t\tcursor: 'auto',\n\t\tcursorAt: false,\n\t\tdropOnEmpty: true,\n\t\tforcePlaceholderSize: false,\n\t\tforceHelperSize: false,\n\t\tgrid: false,\n\t\thandle: false,\n\t\thelper: \"original\",\n\t\titems: '> *',\n\t\topacity: false,\n\t\tplaceholder: false,\n\t\trevert: false,\n\t\tscroll: true,\n\t\tscrollSensitivity: 20,\n\t\tscrollSpeed: 20,\n\t\tscope: \"default\",\n\t\ttolerance: \"intersect\",\n\t\tzIndex: 1000\n\t},\n\t_create: function() {\n\n\t\tvar o = this.options;\n\t\tthis.containerCache = {};\n\t\tthis.element.addClass(\"ui-sortable\");\n\n\t\t//Get the items\n\t\tthis.refresh();\n\n\t\t//Let's determine if the items are being displayed horizontally\n\t\tthis.floating = this.items.length ? o.axis === 'x' || (/left|right/).test(this.items[0].item.css('float')) || (/inline|table-cell/).test(this.items[0].item.css('display')) : false;\n\n\t\t//Let's determine the parent's offset\n\t\tthis.offset = this.element.offset();\n\n\t\t//Initialize mouse events for interaction\n\t\tthis._mouseInit();\n\t\t\n\t\t//We're ready to go\n\t\tthis.ready = true\n\n\t},\n\n\tdestroy: function() {\n\t\t$.Widget.prototype.destroy.call( this );\n\t\tthis.element\n\t\t\t.removeClass(\"ui-sortable ui-sortable-disabled\");\n\t\tthis._mouseDestroy();\n\n\t\tfor ( var i = this.items.length - 1; i >= 0; i-- )\n\t\t\tthis.items[i].item.removeData(this.widgetName + \"-item\");\n\n\t\treturn this;\n\t},\n\n\t_setOption: function(key, value){\n\t\tif ( key === \"disabled\" ) {\n\t\t\tthis.options[ key ] = value;\n\t\n\t\t\tthis.widget()\n\t\t\t\t[ value ? \"addClass\" : \"removeClass\"]( \"ui-sortable-disabled\" );\n\t\t} else {\n\t\t\t// Don't call widget base _setOption for disable as it adds ui-state-disabled class\n\t\t\t$.Widget.prototype._setOption.apply(this, arguments);\n\t\t}\n\t},\n\n\t_mouseCapture: function(event, overrideHandle) {\n\t\tvar that = this;\n\n\t\tif (this.reverting) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif(this.options.disabled || this.options.type == 'static') return false;\n\n\t\t//We have to refresh the items data once first\n\t\tthis._refreshItems(event);\n\n\t\t//Find out if the clicked node (or one of its parents) is a actual item in this.items\n\t\tvar currentItem = null, self = this, nodes = $(event.target).parents().each(function() {\n\t\t\tif($.data(this, that.widgetName + '-item') == self) {\n\t\t\t\tcurrentItem = $(this);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t});\n\t\tif($.data(event.target, that.widgetName + '-item') == self) currentItem = $(event.target);\n\n\t\tif(!currentItem) return false;\n\t\tif(this.options.handle && !overrideHandle) {\n\t\t\tvar validHandle = false;\n\n\t\t\t$(this.options.handle, currentItem).find(\"*\").andSelf().each(function() { if(this == event.target) validHandle = true; });\n\t\t\tif(!validHandle) return false;\n\t\t}\n\n\t\tthis.currentItem = currentItem;\n\t\tthis._removeCurrentsFromItems();\n\t\treturn true;\n\n\t},\n\n\t_mouseStart: function(event, overrideHandle, noActivation) {\n\n\t\tvar o = this.options, self = this;\n\t\tthis.currentContainer = this;\n\n\t\t//We only need to call refreshPositions, because the refreshItems call has been moved to mouseCapture\n\t\tthis.refreshPositions();\n\n\t\t//Create and append the visible helper\n\t\tthis.helper = this._createHelper(event);\n\n\t\t//Cache the helper size\n\t\tthis._cacheHelperProportions();\n\n\t\t/*\n\t\t * - Position generation -\n\t\t * This block generates everything position related - it's the core of draggables.\n\t\t */\n\n\t\t//Cache the margins of the original element\n\t\tthis._cacheMargins();\n\n\t\t//Get the next scrolling parent\n\t\tthis.scrollParent = this.helper.scrollParent();\n\n\t\t//The element's absolute position on the page minus margins\n\t\tthis.offset = this.currentItem.offset();\n\t\tthis.offset = {\n\t\t\ttop: this.offset.top - this.margins.top,\n\t\t\tleft: this.offset.left - this.margins.left\n\t\t};\n\n\t\t// Only after we got the offset, we can change the helper's position to absolute\n\t\t// TODO: Still need to figure out a way to make relative sorting possible\n\t\tthis.helper.css(\"position\", \"absolute\");\n\t\tthis.cssPosition = this.helper.css(\"position\");\n\n\t\t$.extend(this.offset, {\n\t\t\tclick: { //Where the click happened, relative to the element\n\t\t\t\tleft: event.pageX - this.offset.left,\n\t\t\t\ttop: event.pageY - this.offset.top\n\t\t\t},\n\t\t\tparent: this._getParentOffset(),\n\t\t\trelative: this._getRelativeOffset() //This is a relative to absolute position minus the actual position calculation - only used for relative positioned helper\n\t\t});\n\n\t\t//Generate the original position\n\t\tthis.originalPosition = this._generatePosition(event);\n\t\tthis.originalPageX = event.pageX;\n\t\tthis.originalPageY = event.pageY;\n\n\t\t//Adjust the mouse offset relative to the helper if 'cursorAt' is supplied\n\t\t(o.cursorAt && this._adjustOffsetFromHelper(o.cursorAt));\n\n\t\t//Cache the former DOM position\n\t\tthis.domPosition = { prev: this.currentItem.prev()[0], parent: this.currentItem.parent()[0] };\n\n\t\t//If the helper is not the original, hide the original so it's not playing any role during the drag, won't cause anything bad this way\n\t\tif(this.helper[0] != this.currentItem[0]) {\n\t\t\tthis.currentItem.hide();\n\t\t}\n\n\t\t//Create the placeholder\n\t\tthis._createPlaceholder();\n\n\t\t//Set a containment if given in the options\n\t\tif(o.containment)\n\t\t\tthis._setContainment();\n\n\t\tif(o.cursor) { // cursor option\n\t\t\tif ($('body').css(\"cursor\")) this._storedCursor = $('body').css(\"cursor\");\n\t\t\t$('body').css(\"cursor\", o.cursor);\n\t\t}\n\n\t\tif(o.opacity) { // opacity option\n\t\t\tif (this.helper.css(\"opacity\")) this._storedOpacity = this.helper.css(\"opacity\");\n\t\t\tthis.helper.css(\"opacity\", o.opacity);\n\t\t}\n\n\t\tif(o.zIndex) { // zIndex option\n\t\t\tif (this.helper.css(\"zIndex\")) this._storedZIndex = this.helper.css(\"zIndex\");\n\t\t\tthis.helper.css(\"zIndex\", o.zIndex);\n\t\t}\n\n\t\t//Prepare scrolling\n\t\tif(this.scrollParent[0] != document && this.scrollParent[0].tagName != 'HTML')\n\t\t\tthis.overflowOffset = this.scrollParent.offset();\n\n\t\t//Call callbacks\n\t\tthis._trigger(\"start\", event, this._uiHash());\n\n\t\t//Recache the helper size\n\t\tif(!this._preserveHelperProportions)\n\t\t\tthis._cacheHelperProportions();\n\n\n\t\t//Post 'activate' events to possible containers\n\t\tif(!noActivation) {\n\t\t\t for (var i = this.containers.length - 1; i >= 0; i--) { this.containers[i]._trigger(\"activate\", event, self._uiHash(this)); }\n\t\t}\n\n\t\t//Prepare possible droppables\n\t\tif($.ui.ddmanager)\n\t\t\t$.ui.ddmanager.current = this;\n\n\t\tif ($.ui.ddmanager && !o.dropBehaviour)\n\t\t\t$.ui.ddmanager.prepareOffsets(this, event);\n\n\t\tthis.dragging = true;\n\n\t\tthis.helper.addClass(\"ui-sortable-helper\");\n\t\tthis._mouseDrag(event); //Execute the drag once - this causes the helper not to be visible before getting its correct position\n\t\treturn true;\n\n\t},\n\n\t_mouseDrag: function(event) {\n\n\t\t//Compute the helpers position\n\t\tthis.position = this._generatePosition(event);\n\t\tthis.positionAbs = this._convertPositionTo(\"absolute\");\n\n\t\tif (!this.lastPositionAbs) {\n\t\t\tthis.lastPositionAbs = this.positionAbs;\n\t\t}\n\n\t\t//Do scrolling\n\t\tif(this.options.scroll) {\n\t\t\tvar o = this.options, scrolled = false;\n\t\t\tif(this.scrollParent[0] != document && this.scrollParent[0].tagName != 'HTML') {\n\n\t\t\t\tif((this.overflowOffset.top + this.scrollParent[0].offsetHeight) - event.pageY < o.scrollSensitivity)\n\t\t\t\t\tthis.scrollParent[0].scrollTop = scrolled = this.scrollParent[0].scrollTop + o.scrollSpeed;\n\t\t\t\telse if(event.pageY - this.overflowOffset.top < o.scrollSensitivity)\n\t\t\t\t\tthis.scrollParent[0].scrollTop = scrolled = this.scrollParent[0].scrollTop - o.scrollSpeed;\n\n\t\t\t\tif((this.overflowOffset.left + this.scrollParent[0].offsetWidth) - event.pageX < o.scrollSensitivity)\n\t\t\t\t\tthis.scrollParent[0].scrollLeft = scrolled = this.scrollParent[0].scrollLeft + o.scrollSpeed;\n\t\t\t\telse if(event.pageX - this.overflowOffset.left < o.scrollSensitivity)\n\t\t\t\t\tthis.scrollParent[0].scrollLeft = scrolled = this.scrollParent[0].scrollLeft - o.scrollSpeed;\n\n\t\t\t} else {\n\n\t\t\t\tif(event.pageY - $(document).scrollTop() < o.scrollSensitivity)\n\t\t\t\t\tscrolled = $(document).scrollTop($(document).scrollTop() - o.scrollSpeed);\n\t\t\t\telse if($(window).height() - (event.pageY - $(document).scrollTop()) < o.scrollSensitivity)\n\t\t\t\t\tscrolled = $(document).scrollTop($(document).scrollTop() + o.scrollSpeed);\n\n\t\t\t\tif(event.pageX - $(document).scrollLeft() < o.scrollSensitivity)\n\t\t\t\t\tscrolled = $(document).scrollLeft($(document).scrollLeft() - o.scrollSpeed);\n\t\t\t\telse if($(window).width() - (event.pageX - $(document).scrollLeft()) < o.scrollSensitivity)\n\t\t\t\t\tscrolled = $(document).scrollLeft($(document).scrollLeft() + o.scrollSpeed);\n\n\t\t\t}\n\n\t\t\tif(scrolled !== false && $.ui.ddmanager && !o.dropBehaviour)\n\t\t\t\t$.ui.ddmanager.prepareOffsets(this, event);\n\t\t}\n\n\t\t//Regenerate the absolute position used for position checks\n\t\tthis.positionAbs = this._convertPositionTo(\"absolute\");\n\n\t\t//Set the helper position\n\t\tif(!this.options.axis || this.options.axis != \"y\") this.helper[0].style.left = this.position.left+'px';\n\t\tif(!this.options.axis || this.options.axis != \"x\") this.helper[0].style.top = this.position.top+'px';\n\n\t\t//Rearrange\n\t\tfor (var i = this.items.length - 1; i >= 0; i--) {\n\n\t\t\t//Cache variables and intersection, continue if no intersection\n\t\t\tvar item = this.items[i], itemElement = item.item[0], intersection = this._intersectsWithPointer(item);\n\t\t\tif (!intersection) continue;\n\n\t\t\tif(itemElement != this.currentItem[0] //cannot intersect with itself\n\t\t\t\t&&\tthis.placeholder[intersection == 1 ? \"next\" : \"prev\"]()[0] != itemElement //no useless actions that have been done before\n\t\t\t\t&&\t!$.ui.contains(this.placeholder[0], itemElement) //no action if the item moved is the parent of the item checked\n\t\t\t\t&& (this.options.type == 'semi-dynamic' ? !$.ui.contains(this.element[0], itemElement) : true)\n\t\t\t\t//&& itemElement.parentNode == this.placeholder[0].parentNode // only rearrange items within the same container\n\t\t\t) {\n\n\t\t\t\tthis.direction = intersection == 1 ? \"down\" : \"up\";\n\n\t\t\t\tif (this.options.tolerance == \"pointer\" || this._intersectsWithSides(item)) {\n\t\t\t\t\tthis._rearrange(event, item);\n\t\t\t\t} else {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tthis._trigger(\"change\", event, this._uiHash());\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t//Post events to containers\n\t\tthis._contactContainers(event);\n\n\t\t//Interconnect with droppables\n\t\tif($.ui.ddmanager) $.ui.ddmanager.drag(this, event);\n\n\t\t//Call callbacks\n\t\tthis._trigger('sort', event, this._uiHash());\n\n\t\tthis.lastPositionAbs = this.positionAbs;\n\t\treturn false;\n\n\t},\n\n\t_mouseStop: function(event, noPropagation) {\n\n\t\tif(!event) return;\n\n\t\t//If we are using droppables, inform the manager about the drop\n\t\tif ($.ui.ddmanager && !this.options.dropBehaviour)\n\t\t\t$.ui.ddmanager.drop(this, event);\n\n\t\tif(this.options.revert) {\n\t\t\tvar self = this;\n\t\t\tvar cur = self.placeholder.offset();\n\n\t\t\tself.reverting = true;\n\n\t\t\t$(this.helper).animate({\n\t\t\t\tleft: cur.left - this.offset.parent.left - self.margins.left + (this.offsetParent[0] == document.body ? 0 : this.offsetParent[0].scrollLeft),\n\t\t\t\ttop: cur.top - this.offset.parent.top - self.margins.top + (this.offsetParent[0] == document.body ? 0 : this.offsetParent[0].scrollTop)\n\t\t\t}, parseInt(this.options.revert, 10) || 500, function() {\n\t\t\t\tself._clear(event);\n\t\t\t});\n\t\t} else {\n\t\t\tthis._clear(event, noPropagation);\n\t\t}\n\n\t\treturn false;\n\n\t},\n\n\tcancel: function() {\n\n\t\tvar self = this;\n\n\t\tif(this.dragging) {\n\n\t\t\tthis._mouseUp({ target: null });\n\n\t\t\tif(this.options.helper == \"original\")\n\t\t\t\tthis.currentItem.css(this._storedCSS).removeClass(\"ui-sortable-helper\");\n\t\t\telse\n\t\t\t\tthis.currentItem.show();\n\n\t\t\t//Post deactivating events to containers\n\t\t\tfor (var i = this.containers.length - 1; i >= 0; i--){\n\t\t\t\tthis.containers[i]._trigger(\"deactivate\", null, self._uiHash(this));\n\t\t\t\tif(this.containers[i].containerCache.over) {\n\t\t\t\t\tthis.containers[i]._trigger(\"out\", null, self._uiHash(this));\n\t\t\t\t\tthis.containers[i].containerCache.over = 0;\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\tif (this.placeholder) {\n\t\t\t//$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately, it unbinds ALL events from the original node!\n\t\t\tif(this.placeholder[0].parentNode) this.placeholder[0].parentNode.removeChild(this.placeholder[0]);\n\t\t\tif(this.options.helper != \"original\" && this.helper && this.helper[0].parentNode) this.helper.remove();\n\n\t\t\t$.extend(this, {\n\t\t\t\thelper: null,\n\t\t\t\tdragging: false,\n\t\t\t\treverting: false,\n\t\t\t\t_noFinalSort: null\n\t\t\t});\n\n\t\t\tif(this.domPosition.prev) {\n\t\t\t\t$(this.domPosition.prev).after(this.currentItem);\n\t\t\t} else {\n\t\t\t\t$(this.domPosition.parent).prepend(this.currentItem);\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\n\t},\n\n\tserialize: function(o) {\n\n\t\tvar items = this._getItemsAsjQuery(o && o.connected);\n\t\tvar str = []; o = o || {};\n\n\t\t$(items).each(function() {\n\t\t\tvar res = ($(o.item || this).attr(o.attribute || 'id') || '').match(o.expression || (/(.+)[-=_](.+)/));\n\t\t\tif(res) str.push((o.key || res[1]+'[]')+'='+(o.key && o.expression ? res[1] : res[2]));\n\t\t});\n\n\t\tif(!str.length && o.key) {\n\t\t\tstr.push(o.key + '=');\n\t\t}\n\n\t\treturn str.join('&');\n\n\t},\n\n\ttoArray: function(o) {\n\n\t\tvar items = this._getItemsAsjQuery(o && o.connected);\n\t\tvar ret = []; o = o || {};\n\n\t\titems.each(function() { ret.push($(o.item || this).attr(o.attribute || 'id') || ''); });\n\t\treturn ret;\n\n\t},\n\n\t/* Be careful with the following core functions */\n\t_intersectsWith: function(item) {\n\n\t\tvar x1 = this.positionAbs.left,\n\t\t\tx2 = x1 + this.helperProportions.width,\n\t\t\ty1 = this.positionAbs.top,\n\t\t\ty2 = y1 + this.helperProportions.height;\n\n\t\tvar l = item.left,\n\t\t\tr = l + item.width,\n\t\t\tt = item.top,\n\t\t\tb = t + item.height;\n\n\t\tvar dyClick = this.offset.click.top,\n\t\t\tdxClick = this.offset.click.left;\n\n\t\tvar isOverElement = (y1 + dyClick) > t && (y1 + dyClick) < b && (x1 + dxClick) > l && (x1 + dxClick) < r;\n\n\t\tif(\t   this.options.tolerance == \"pointer\"\n\t\t\t|| this.options.forcePointerForContainers\n\t\t\t|| (this.options.tolerance != \"pointer\" && this.helperProportions[this.floating ? 'width' : 'height'] > item[this.floating ? 'width' : 'height'])\n\t\t) {\n\t\t\treturn isOverElement;\n\t\t} else {\n\n\t\t\treturn (l < x1 + (this.helperProportions.width / 2) // Right Half\n\t\t\t\t&& x2 - (this.helperProportions.width / 2) < r // Left Half\n\t\t\t\t&& t < y1 + (this.helperProportions.height / 2) // Bottom Half\n\t\t\t\t&& y2 - (this.helperProportions.height / 2) < b ); // Top Half\n\n\t\t}\n\t},\n\n\t_intersectsWithPointer: function(item) {\n\n\t\tvar isOverElementHeight = (this.options.axis === 'x') || $.ui.isOverAxis(this.positionAbs.top + this.offset.click.top, item.top, item.height),\n\t\t\tisOverElementWidth = (this.options.axis === 'y') || $.ui.isOverAxis(this.positionAbs.left + this.offset.click.left, item.left, item.width),\n\t\t\tisOverElement = isOverElementHeight && isOverElementWidth,\n\t\t\tverticalDirection = this._getDragVerticalDirection(),\n\t\t\thorizontalDirection = this._getDragHorizontalDirection();\n\n\t\tif (!isOverElement)\n\t\t\treturn false;\n\n\t\treturn this.floating ?\n\t\t\t( ((horizontalDirection && horizontalDirection == \"right\") || verticalDirection == \"down\") ? 2 : 1 )\n\t\t\t: ( verticalDirection && (verticalDirection == \"down\" ? 2 : 1) );\n\n\t},\n\n\t_intersectsWithSides: function(item) {\n\n\t\tvar isOverBottomHalf = $.ui.isOverAxis(this.positionAbs.top + this.offset.click.top, item.top + (item.height/2), item.height),\n\t\t\tisOverRightHalf = $.ui.isOverAxis(this.positionAbs.left + this.offset.click.left, item.left + (item.width/2), item.width),\n\t\t\tverticalDirection = this._getDragVerticalDirection(),\n\t\t\thorizontalDirection = this._getDragHorizontalDirection();\n\n\t\tif (this.floating && horizontalDirection) {\n\t\t\treturn ((horizontalDirection == \"right\" && isOverRightHalf) || (horizontalDirection == \"left\" && !isOverRightHalf));\n\t\t} else {\n\t\t\treturn verticalDirection && ((verticalDirection == \"down\" && isOverBottomHalf) || (verticalDirection == \"up\" && !isOverBottomHalf));\n\t\t}\n\n\t},\n\n\t_getDragVerticalDirection: function() {\n\t\tvar delta = this.positionAbs.top - this.lastPositionAbs.top;\n\t\treturn delta != 0 && (delta > 0 ? \"down\" : \"up\");\n\t},\n\n\t_getDragHorizontalDirection: function() {\n\t\tvar delta = this.positionAbs.left - this.lastPositionAbs.left;\n\t\treturn delta != 0 && (delta > 0 ? \"right\" : \"left\");\n\t},\n\n\trefresh: function(event) {\n\t\tthis._refreshItems(event);\n\t\tthis.refreshPositions();\n\t\treturn this;\n\t},\n\n\t_connectWith: function() {\n\t\tvar options = this.options;\n\t\treturn options.connectWith.constructor == String\n\t\t\t? [options.connectWith]\n\t\t\t: options.connectWith;\n\t},\n\t\n\t_getItemsAsjQuery: function(connected) {\n\n\t\tvar self = this;\n\t\tvar items = [];\n\t\tvar queries = [];\n\t\tvar connectWith = this._connectWith();\n\n\t\tif(connectWith && connected) {\n\t\t\tfor (var i = connectWith.length - 1; i >= 0; i--){\n\t\t\t\tvar cur = $(connectWith[i]);\n\t\t\t\tfor (var j = cur.length - 1; j >= 0; j--){\n\t\t\t\t\tvar inst = $.data(cur[j], this.widgetName);\n\t\t\t\t\tif(inst && inst != this && !inst.options.disabled) {\n\t\t\t\t\t\tqueries.push([$.isFunction(inst.options.items) ? inst.options.items.call(inst.element) : $(inst.options.items, inst.element).not(\".ui-sortable-helper\").not('.ui-sortable-placeholder'), inst]);\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t};\n\t\t}\n\n\t\tqueries.push([$.isFunction(this.options.items) ? this.options.items.call(this.element, null, { options: this.options, item: this.currentItem }) : $(this.options.items, this.element).not(\".ui-sortable-helper\").not('.ui-sortable-placeholder'), this]);\n\n\t\tfor (var i = queries.length - 1; i >= 0; i--){\n\t\t\tqueries[i][0].each(function() {\n\t\t\t\titems.push(this);\n\t\t\t});\n\t\t};\n\n\t\treturn $(items);\n\n\t},\n\n\t_removeCurrentsFromItems: function() {\n\n\t\tvar list = this.currentItem.find(\":data(\" + this.widgetName + \"-item)\");\n\n\t\tfor (var i=0; i < this.items.length; i++) {\n\n\t\t\tfor (var j=0; j < list.length; j++) {\n\t\t\t\tif(list[j] == this.items[i].item[0])\n\t\t\t\t\tthis.items.splice(i,1);\n\t\t\t};\n\n\t\t};\n\n\t},\n\n\t_refreshItems: function(event) {\n\n\t\tthis.items = [];\n\t\tthis.containers = [this];\n\t\tvar items = this.items;\n\t\tvar self = this;\n\t\tvar queries = [[$.isFunction(this.options.items) ? this.options.items.call(this.element[0], event, { item: this.currentItem }) : $(this.options.items, this.element), this]];\n\t\tvar connectWith = this._connectWith();\n\n\t\tif(connectWith && this.ready) { //Shouldn't be run the first time through due to massive slow-down\n\t\t\tfor (var i = connectWith.length - 1; i >= 0; i--){\n\t\t\t\tvar cur = $(connectWith[i]);\n\t\t\t\tfor (var j = cur.length - 1; j >= 0; j--){\n\t\t\t\t\tvar inst = $.data(cur[j], this.widgetName);\n\t\t\t\t\tif(inst && inst != this && !inst.options.disabled) {\n\t\t\t\t\t\tqueries.push([$.isFunction(inst.options.items) ? inst.options.items.call(inst.element[0], event, { item: this.currentItem }) : $(inst.options.items, inst.element), inst]);\n\t\t\t\t\t\tthis.containers.push(inst);\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t};\n\t\t}\n\n\t\tfor (var i = queries.length - 1; i >= 0; i--) {\n\t\t\tvar targetData = queries[i][1];\n\t\t\tvar _queries = queries[i][0];\n\n\t\t\tfor (var j=0, queriesLength = _queries.length; j < queriesLength; j++) {\n\t\t\t\tvar item = $(_queries[j]);\n\n\t\t\t\titem.data(this.widgetName + '-item', targetData); // Data for target checking (mouse manager)\n\n\t\t\t\titems.push({\n\t\t\t\t\titem: item,\n\t\t\t\t\tinstance: targetData,\n\t\t\t\t\twidth: 0, height: 0,\n\t\t\t\t\tleft: 0, top: 0\n\t\t\t\t});\n\t\t\t};\n\t\t};\n\n\t},\n\n\trefreshPositions: function(fast) {\n\n\t\t//This has to be redone because due to the item being moved out/into the offsetParent, the offsetParent's position will change\n\t\tif(this.offsetParent && this.helper) {\n\t\t\tthis.offset.parent = this._getParentOffset();\n\t\t}\n\n\t\tfor (var i = this.items.length - 1; i >= 0; i--){\n\t\t\tvar item = this.items[i];\n\n\t\t\t//We ignore calculating positions of all connected containers when we're not over them\n\t\t\tif(item.instance != this.currentContainer && this.currentContainer && item.item[0] != this.currentItem[0])\n\t\t\t\tcontinue;\n\n\t\t\tvar t = this.options.toleranceElement ? $(this.options.toleranceElement, item.item) : item.item;\n\n\t\t\tif (!fast) {\n\t\t\t\titem.width = t.outerWidth();\n\t\t\t\titem.height = t.outerHeight();\n\t\t\t}\n\n\t\t\tvar p = t.offset();\n\t\t\titem.left = p.left;\n\t\t\titem.top = p.top;\n\t\t};\n\n\t\tif(this.options.custom && this.options.custom.refreshContainers) {\n\t\t\tthis.options.custom.refreshContainers.call(this);\n\t\t} else {\n\t\t\tfor (var i = this.containers.length - 1; i >= 0; i--){\n\t\t\t\tvar p = this.containers[i].element.offset();\n\t\t\t\tthis.containers[i].containerCache.left = p.left;\n\t\t\t\tthis.containers[i].containerCache.top = p.top;\n\t\t\t\tthis.containers[i].containerCache.width\t= this.containers[i].element.outerWidth();\n\t\t\t\tthis.containers[i].containerCache.height = this.containers[i].element.outerHeight();\n\t\t\t};\n\t\t}\n\n\t\treturn this;\n\t},\n\n\t_createPlaceholder: function(that) {\n\n\t\tvar self = that || this, o = self.options;\n\n\t\tif(!o.placeholder || o.placeholder.constructor == String) {\n\t\t\tvar className = o.placeholder;\n\t\t\to.placeholder = {\n\t\t\t\telement: function() {\n\n\t\t\t\t\tvar el = $(document.createElement(self.currentItem[0].nodeName))\n\t\t\t\t\t\t.addClass(className || self.currentItem[0].className+\" ui-sortable-placeholder\")\n\t\t\t\t\t\t.removeClass(\"ui-sortable-helper\")[0];\n\n\t\t\t\t\tif(!className)\n\t\t\t\t\t\tel.style.visibility = \"hidden\";\n\n\t\t\t\t\treturn el;\n\t\t\t\t},\n\t\t\t\tupdate: function(container, p) {\n\n\t\t\t\t\t// 1. If a className is set as 'placeholder option, we don't force sizes - the class is responsible for that\n\t\t\t\t\t// 2. The option 'forcePlaceholderSize can be enabled to force it even if a class name is specified\n\t\t\t\t\tif(className && !o.forcePlaceholderSize) return;\n\n\t\t\t\t\t//If the element doesn't have a actual height by itself (without styles coming from a stylesheet), it receives the inline height from the dragged item\n\t\t\t\t\tif(!p.height()) { p.height(self.currentItem.innerHeight() - parseInt(self.currentItem.css('paddingTop')||0, 10) - parseInt(self.currentItem.css('paddingBottom')||0, 10)); };\n\t\t\t\t\tif(!p.width()) { p.width(self.currentItem.innerWidth() - parseInt(self.currentItem.css('paddingLeft')||0, 10) - parseInt(self.currentItem.css('paddingRight')||0, 10)); };\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\n\t\t//Create the placeholder\n\t\tself.placeholder = $(o.placeholder.element.call(self.element, self.currentItem));\n\n\t\t//Append it after the actual current item\n\t\tself.currentItem.after(self.placeholder);\n\n\t\t//Update the size of the placeholder (TODO: Logic to fuzzy, see line 316/317)\n\t\to.placeholder.update(self, self.placeholder);\n\n\t},\n\n\t_contactContainers: function(event) {\n\t\t\n\t\t// get innermost container that intersects with item \n\t\tvar innermostContainer = null, innermostIndex = null;\t\t\n\t\t\n\t\t\n\t\tfor (var i = this.containers.length - 1; i >= 0; i--){\n\n\t\t\t// never consider a container that's located within the item itself \n\t\t\tif($.ui.contains(this.currentItem[0], this.containers[i].element[0]))\n\t\t\t\tcontinue;\n\n\t\t\tif(this._intersectsWith(this.containers[i].containerCache)) {\n\n\t\t\t\t// if we've already found a container and it's more \"inner\" than this, then continue \n\t\t\t\tif(innermostContainer && $.ui.contains(this.containers[i].element[0], innermostContainer.element[0]))\n\t\t\t\t\tcontinue;\n\n\t\t\t\tinnermostContainer = this.containers[i]; \n\t\t\t\tinnermostIndex = i;\n\t\t\t\t\t\n\t\t\t} else {\n\t\t\t\t// container doesn't intersect. trigger \"out\" event if necessary \n\t\t\t\tif(this.containers[i].containerCache.over) {\n\t\t\t\t\tthis.containers[i]._trigger(\"out\", event, this._uiHash(this));\n\t\t\t\t\tthis.containers[i].containerCache.over = 0;\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\t\t\n\t\t// if no intersecting containers found, return \n\t\tif(!innermostContainer) return; \n\n\t\t// move the item into the container if it's not there already\n\t\tif(this.containers.length === 1) {\n\t\t\tthis.containers[innermostIndex]._trigger(\"over\", event, this._uiHash(this));\n\t\t\tthis.containers[innermostIndex].containerCache.over = 1;\n\t\t} else if(this.currentContainer != this.containers[innermostIndex]) { \n\n\t\t\t//When entering a new container, we will find the item with the least distance and append our item near it \n\t\t\tvar dist = 10000; var itemWithLeastDistance = null; var base = this.positionAbs[this.containers[innermostIndex].floating ? 'left' : 'top']; \n\t\t\tfor (var j = this.items.length - 1; j >= 0; j--) { \n\t\t\t\tif(!$.ui.contains(this.containers[innermostIndex].element[0], this.items[j].item[0])) continue; \n\t\t\t\tvar cur = this.items[j][this.containers[innermostIndex].floating ? 'left' : 'top']; \n\t\t\t\tif(Math.abs(cur - base) < dist) { \n\t\t\t\t\tdist = Math.abs(cur - base); itemWithLeastDistance = this.items[j]; \n\t\t\t\t} \n\t\t\t} \n\n\t\t\tif(!itemWithLeastDistance && !this.options.dropOnEmpty) //Check if dropOnEmpty is enabled \n\t\t\t\treturn; \n\n\t\t\tthis.currentContainer = this.containers[innermostIndex]; \n\t\t\titemWithLeastDistance ? this._rearrange(event, itemWithLeastDistance, null, true) : this._rearrange(event, null, this.containers[innermostIndex].element, true); \n\t\t\tthis._trigger(\"change\", event, this._uiHash()); \n\t\t\tthis.containers[innermostIndex]._trigger(\"change\", event, this._uiHash(this)); \n\n\t\t\t//Update the placeholder \n\t\t\tthis.options.placeholder.update(this.currentContainer, this.placeholder); \n\t\t\n\t\t\tthis.containers[innermostIndex]._trigger(\"over\", event, this._uiHash(this)); \n\t\t\tthis.containers[innermostIndex].containerCache.over = 1;\n\t\t} \n\t\n\t\t\n\t},\n\n\t_createHelper: function(event) {\n\n\t\tvar o = this.options;\n\t\tvar helper = $.isFunction(o.helper) ? $(o.helper.apply(this.element[0], [event, this.currentItem])) : (o.helper == 'clone' ? this.currentItem.clone() : this.currentItem);\n\n\t\tif(!helper.parents('body').length) //Add the helper to the DOM if that didn't happen already\n\t\t\t$(o.appendTo != 'parent' ? o.appendTo : this.currentItem[0].parentNode)[0].appendChild(helper[0]);\n\n\t\tif(helper[0] == this.currentItem[0])\n\t\t\tthis._storedCSS = { width: this.currentItem[0].style.width, height: this.currentItem[0].style.height, position: this.currentItem.css(\"position\"), top: this.currentItem.css(\"top\"), left: this.currentItem.css(\"left\") };\n\n\t\tif(helper[0].style.width == '' || o.forceHelperSize) helper.width(this.currentItem.width());\n\t\tif(helper[0].style.height == '' || o.forceHelperSize) helper.height(this.currentItem.height());\n\n\t\treturn helper;\n\n\t},\n\n\t_adjustOffsetFromHelper: function(obj) {\n\t\tif (typeof obj == 'string') {\n\t\t\tobj = obj.split(' ');\n\t\t}\n\t\tif ($.isArray(obj)) {\n\t\t\tobj = {left: +obj[0], top: +obj[1] || 0};\n\t\t}\n\t\tif ('left' in obj) {\n\t\t\tthis.offset.click.left = obj.left + this.margins.left;\n\t\t}\n\t\tif ('right' in obj) {\n\t\t\tthis.offset.click.left = this.helperProportions.width - obj.right + this.margins.left;\n\t\t}\n\t\tif ('top' in obj) {\n\t\t\tthis.offset.click.top = obj.top + this.margins.top;\n\t\t}\n\t\tif ('bottom' in obj) {\n\t\t\tthis.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top;\n\t\t}\n\t},\n\n\t_getParentOffset: function() {\n\n\n\t\t//Get the offsetParent and cache its position\n\t\tthis.offsetParent = this.helper.offsetParent();\n\t\tvar po = this.offsetParent.offset();\n\n\t\t// This is a special case where we need to modify a offset calculated on start, since the following happened:\n\t\t// 1. The position of the helper is absolute, so it's position is calculated based on the next positioned parent\n\t\t// 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't the document, which means that\n\t\t//    the scroll is included in the initial calculation of the offset of the parent, and never recalculated upon drag\n\t\tif(this.cssPosition == 'absolute' && this.scrollParent[0] != document && $.ui.contains(this.scrollParent[0], this.offsetParent[0])) {\n\t\t\tpo.left += this.scrollParent.scrollLeft();\n\t\t\tpo.top += this.scrollParent.scrollTop();\n\t\t}\n\n\t\tif((this.offsetParent[0] == document.body) //This needs to be actually done for all browsers, since pageX/pageY includes this information\n\t\t|| (this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() == 'html' && $.browser.msie)) //Ugly IE fix\n\t\t\tpo = { top: 0, left: 0 };\n\n\t\treturn {\n\t\t\ttop: po.top + (parseInt(this.offsetParent.css(\"borderTopWidth\"),10) || 0),\n\t\t\tleft: po.left + (parseInt(this.offsetParent.css(\"borderLeftWidth\"),10) || 0)\n\t\t};\n\n\t},\n\n\t_getRelativeOffset: function() {\n\n\t\tif(this.cssPosition == \"relative\") {\n\t\t\tvar p = this.currentItem.position();\n\t\t\treturn {\n\t\t\t\ttop: p.top - (parseInt(this.helper.css(\"top\"),10) || 0) + this.scrollParent.scrollTop(),\n\t\t\t\tleft: p.left - (parseInt(this.helper.css(\"left\"),10) || 0) + this.scrollParent.scrollLeft()\n\t\t\t};\n\t\t} else {\n\t\t\treturn { top: 0, left: 0 };\n\t\t}\n\n\t},\n\n\t_cacheMargins: function() {\n\t\tthis.margins = {\n\t\t\tleft: (parseInt(this.currentItem.css(\"marginLeft\"),10) || 0),\n\t\t\ttop: (parseInt(this.currentItem.css(\"marginTop\"),10) || 0)\n\t\t};\n\t},\n\n\t_cacheHelperProportions: function() {\n\t\tthis.helperProportions = {\n\t\t\twidth: this.helper.outerWidth(),\n\t\t\theight: this.helper.outerHeight()\n\t\t};\n\t},\n\n\t_setContainment: function() {\n\n\t\tvar o = this.options;\n\t\tif(o.containment == 'parent') o.containment = this.helper[0].parentNode;\n\t\tif(o.containment == 'document' || o.containment == 'window') this.containment = [\n\t\t\t0 - this.offset.relative.left - this.offset.parent.left,\n\t\t\t0 - this.offset.relative.top - this.offset.parent.top,\n\t\t\t$(o.containment == 'document' ? document : window).width() - this.helperProportions.width - this.margins.left,\n\t\t\t($(o.containment == 'document' ? document : window).height() || document.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top\n\t\t];\n\n\t\tif(!(/^(document|window|parent)$/).test(o.containment)) {\n\t\t\tvar ce = $(o.containment)[0];\n\t\t\tvar co = $(o.containment).offset();\n\t\t\tvar over = ($(ce).css(\"overflow\") != 'hidden');\n\n\t\t\tthis.containment = [\n\t\t\t\tco.left + (parseInt($(ce).css(\"borderLeftWidth\"),10) || 0) + (parseInt($(ce).css(\"paddingLeft\"),10) || 0) - this.margins.left,\n\t\t\t\tco.top + (parseInt($(ce).css(\"borderTopWidth\"),10) || 0) + (parseInt($(ce).css(\"paddingTop\"),10) || 0) - this.margins.top,\n\t\t\t\tco.left+(over ? Math.max(ce.scrollWidth,ce.offsetWidth) : ce.offsetWidth) - (parseInt($(ce).css(\"borderLeftWidth\"),10) || 0) - (parseInt($(ce).css(\"paddingRight\"),10) || 0) - this.helperProportions.width - this.margins.left,\n\t\t\t\tco.top+(over ? Math.max(ce.scrollHeight,ce.offsetHeight) : ce.offsetHeight) - (parseInt($(ce).css(\"borderTopWidth\"),10) || 0) - (parseInt($(ce).css(\"paddingBottom\"),10) || 0) - this.helperProportions.height - this.margins.top\n\t\t\t];\n\t\t}\n\n\t},\n\n\t_convertPositionTo: function(d, pos) {\n\n\t\tif(!pos) pos = this.position;\n\t\tvar mod = d == \"absolute\" ? 1 : -1;\n\t\tvar o = this.options, scroll = this.cssPosition == 'absolute' && !(this.scrollParent[0] != document && $.ui.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);\n\n\t\treturn {\n\t\t\ttop: (\n\t\t\t\tpos.top\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// The absolute mouse position\n\t\t\t\t+ this.offset.relative.top * mod\t\t\t\t\t\t\t\t\t\t// Only for relative positioned nodes: Relative offset from element to offset parent\n\t\t\t\t+ this.offset.parent.top * mod\t\t\t\t\t\t\t\t\t\t\t// The offsetParent's offset without borders (offset + border)\n\t\t\t\t- ($.browser.safari && this.cssPosition == 'fixed' ? 0 : ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) * mod)\n\t\t\t),\n\t\t\tleft: (\n\t\t\t\tpos.left\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// The absolute mouse position\n\t\t\t\t+ this.offset.relative.left * mod\t\t\t\t\t\t\t\t\t\t// Only for relative positioned nodes: Relative offset from element to offset parent\n\t\t\t\t+ this.offset.parent.left * mod\t\t\t\t\t\t\t\t\t\t\t// The offsetParent's offset without borders (offset + border)\n\t\t\t\t- ($.browser.safari && this.cssPosition == 'fixed' ? 0 : ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ) * mod)\n\t\t\t)\n\t\t};\n\n\t},\n\n\t_generatePosition: function(event) {\n\n\t\tvar o = this.options, scroll = this.cssPosition == 'absolute' && !(this.scrollParent[0] != document && $.ui.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);\n\n\t\t// This is another very weird special case that only happens for relative elements:\n\t\t// 1. If the css position is relative\n\t\t// 2. and the scroll parent is the document or similar to the offset parent\n\t\t// we have to refresh the relative offset during the scroll so there are no jumps\n\t\tif(this.cssPosition == 'relative' && !(this.scrollParent[0] != document && this.scrollParent[0] != this.offsetParent[0])) {\n\t\t\tthis.offset.relative = this._getRelativeOffset();\n\t\t}\n\n\t\tvar pageX = event.pageX;\n\t\tvar pageY = event.pageY;\n\n\t\t/*\n\t\t * - Position constraining -\n\t\t * Constrain the position to a mix of grid, containment.\n\t\t */\n\n\t\tif(this.originalPosition) { //If we are not dragging yet, we won't check for options\n\n\t\t\tif(this.containment) {\n\t\t\t\tif(event.pageX - this.offset.click.left < this.containment[0]) pageX = this.containment[0] + this.offset.click.left;\n\t\t\t\tif(event.pageY - this.offset.click.top < this.containment[1]) pageY = this.containment[1] + this.offset.click.top;\n\t\t\t\tif(event.pageX - this.offset.click.left > this.containment[2]) pageX = this.containment[2] + this.offset.click.left;\n\t\t\t\tif(event.pageY - this.offset.click.top > this.containment[3]) pageY = this.containment[3] + this.offset.click.top;\n\t\t\t}\n\n\t\t\tif(o.grid) {\n\t\t\t\tvar top = this.originalPageY + Math.round((pageY - this.originalPageY) / o.grid[1]) * o.grid[1];\n\t\t\t\tpageY = this.containment ? (!(top - this.offset.click.top < this.containment[1] || top - this.offset.click.top > this.containment[3]) ? top : (!(top - this.offset.click.top < this.containment[1]) ? top - o.grid[1] : top + o.grid[1])) : top;\n\n\t\t\t\tvar left = this.originalPageX + Math.round((pageX - this.originalPageX) / o.grid[0]) * o.grid[0];\n\t\t\t\tpageX = this.containment ? (!(left - this.offset.click.left < this.containment[0] || left - this.offset.click.left > this.containment[2]) ? left : (!(left - this.offset.click.left < this.containment[0]) ? left - o.grid[0] : left + o.grid[0])) : left;\n\t\t\t}\n\n\t\t}\n\n\t\treturn {\n\t\t\ttop: (\n\t\t\t\tpageY\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// The absolute mouse position\n\t\t\t\t- this.offset.click.top\t\t\t\t\t\t\t\t\t\t\t\t\t// Click offset (relative to the element)\n\t\t\t\t- this.offset.relative.top\t\t\t\t\t\t\t\t\t\t\t\t// Only for relative positioned nodes: Relative offset from element to offset parent\n\t\t\t\t- this.offset.parent.top\t\t\t\t\t\t\t\t\t\t\t\t// The offsetParent's offset without borders (offset + border)\n\t\t\t\t+ ($.browser.safari && this.cssPosition == 'fixed' ? 0 : ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ))\n\t\t\t),\n\t\t\tleft: (\n\t\t\t\tpageX\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// The absolute mouse position\n\t\t\t\t- this.offset.click.left\t\t\t\t\t\t\t\t\t\t\t\t// Click offset (relative to the element)\n\t\t\t\t- this.offset.relative.left\t\t\t\t\t\t\t\t\t\t\t\t// Only for relative positioned nodes: Relative offset from element to offset parent\n\t\t\t\t- this.offset.parent.left\t\t\t\t\t\t\t\t\t\t\t\t// The offsetParent's offset without borders (offset + border)\n\t\t\t\t+ ($.browser.safari && this.cssPosition == 'fixed' ? 0 : ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ))\n\t\t\t)\n\t\t};\n\n\t},\n\n\t_rearrange: function(event, i, a, hardRefresh) {\n\n\t\ta ? a[0].appendChild(this.placeholder[0]) : i.item[0].parentNode.insertBefore(this.placeholder[0], (this.direction == 'down' ? i.item[0] : i.item[0].nextSibling));\n\n\t\t//Various things done here to improve the performance:\n\t\t// 1. we create a setTimeout, that calls refreshPositions\n\t\t// 2. on the instance, we have a counter variable, that get's higher after every append\n\t\t// 3. on the local scope, we copy the counter variable, and check in the timeout, if it's still the same\n\t\t// 4. this lets only the last addition to the timeout stack through\n\t\tthis.counter = this.counter ? ++this.counter : 1;\n\t\tvar self = this, counter = this.counter;\n\n\t\twindow.setTimeout(function() {\n\t\t\tif(counter == self.counter) self.refreshPositions(!hardRefresh); //Precompute after each DOM insertion, NOT on mousemove\n\t\t},0);\n\n\t},\n\n\t_clear: function(event, noPropagation) {\n\n\t\tthis.reverting = false;\n\t\t// We delay all events that have to be triggered to after the point where the placeholder has been removed and\n\t\t// everything else normalized again\n\t\tvar delayedTriggers = [], self = this;\n\n\t\t// We first have to update the dom position of the actual currentItem\n\t\t// Note: don't do it if the current item is already removed (by a user), or it gets reappended (see #4088)\n\t\tif(!this._noFinalSort && this.currentItem.parent().length) this.placeholder.before(this.currentItem);\n\t\tthis._noFinalSort = null;\n\n\t\tif(this.helper[0] == this.currentItem[0]) {\n\t\t\tfor(var i in this._storedCSS) {\n\t\t\t\tif(this._storedCSS[i] == 'auto' || this._storedCSS[i] == 'static') this._storedCSS[i] = '';\n\t\t\t}\n\t\t\tthis.currentItem.css(this._storedCSS).removeClass(\"ui-sortable-helper\");\n\t\t} else {\n\t\t\tthis.currentItem.show();\n\t\t}\n\n\t\tif(this.fromOutside && !noPropagation) delayedTriggers.push(function(event) { this._trigger(\"receive\", event, this._uiHash(this.fromOutside)); });\n\t\tif((this.fromOutside || this.domPosition.prev != this.currentItem.prev().not(\".ui-sortable-helper\")[0] || this.domPosition.parent != this.currentItem.parent()[0]) && !noPropagation) delayedTriggers.push(function(event) { this._trigger(\"update\", event, this._uiHash()); }); //Trigger update callback if the DOM position has changed\n\t\tif(!$.ui.contains(this.element[0], this.currentItem[0])) { //Node was moved out of the current element\n\t\t\tif(!noPropagation) delayedTriggers.push(function(event) { this._trigger(\"remove\", event, this._uiHash()); });\n\t\t\tfor (var i = this.containers.length - 1; i >= 0; i--){\n\t\t\t\tif($.ui.contains(this.containers[i].element[0], this.currentItem[0]) && !noPropagation) {\n\t\t\t\t\tdelayedTriggers.push((function(c) { return function(event) { c._trigger(\"receive\", event, this._uiHash(this)); };  }).call(this, this.containers[i]));\n\t\t\t\t\tdelayedTriggers.push((function(c) { return function(event) { c._trigger(\"update\", event, this._uiHash(this));  }; }).call(this, this.containers[i]));\n\t\t\t\t}\n\t\t\t};\n\t\t};\n\n\t\t//Post events to containers\n\t\tfor (var i = this.containers.length - 1; i >= 0; i--){\n\t\t\tif(!noPropagation) delayedTriggers.push((function(c) { return function(event) { c._trigger(\"deactivate\", event, this._uiHash(this)); };  }).call(this, this.containers[i]));\n\t\t\tif(this.containers[i].containerCache.over) {\n\t\t\t\tdelayedTriggers.push((function(c) { return function(event) { c._trigger(\"out\", event, this._uiHash(this)); };  }).call(this, this.containers[i]));\n\t\t\t\tthis.containers[i].containerCache.over = 0;\n\t\t\t}\n\t\t}\n\n\t\t//Do what was originally in plugins\n\t\tif(this._storedCursor) $('body').css(\"cursor\", this._storedCursor); //Reset cursor\n\t\tif(this._storedOpacity) this.helper.css(\"opacity\", this._storedOpacity); //Reset opacity\n\t\tif(this._storedZIndex) this.helper.css(\"zIndex\", this._storedZIndex == 'auto' ? '' : this._storedZIndex); //Reset z-index\n\n\t\tthis.dragging = false;\n\t\tif(this.cancelHelperRemoval) {\n\t\t\tif(!noPropagation) {\n\t\t\t\tthis._trigger(\"beforeStop\", event, this._uiHash());\n\t\t\t\tfor (var i=0; i < delayedTriggers.length; i++) { delayedTriggers[i].call(this, event); }; //Trigger all delayed events\n\t\t\t\tthis._trigger(\"stop\", event, this._uiHash());\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\n\t\tif(!noPropagation) this._trigger(\"beforeStop\", event, this._uiHash());\n\n\t\t//$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately, it unbinds ALL events from the original node!\n\t\tthis.placeholder[0].parentNode.removeChild(this.placeholder[0]);\n\n\t\tif(this.helper[0] != this.currentItem[0]) this.helper.remove(); this.helper = null;\n\n\t\tif(!noPropagation) {\n\t\t\tfor (var i=0; i < delayedTriggers.length; i++) { delayedTriggers[i].call(this, event); }; //Trigger all delayed events\n\t\t\tthis._trigger(\"stop\", event, this._uiHash());\n\t\t}\n\n\t\tthis.fromOutside = false;\n\t\treturn true;\n\n\t},\n\n\t_trigger: function() {\n\t\tif ($.Widget.prototype._trigger.apply(this, arguments) === false) {\n\t\t\tthis.cancel();\n\t\t}\n\t},\n\n\t_uiHash: function(inst) {\n\t\tvar self = inst || this;\n\t\treturn {\n\t\t\thelper: self.helper,\n\t\t\tplaceholder: self.placeholder || $([]),\n\t\t\tposition: self.position,\n\t\t\toriginalPosition: self.originalPosition,\n\t\t\toffset: self.positionAbs,\n\t\t\titem: self.currentItem,\n\t\t\tsender: inst ? inst.element : null\n\t\t};\n\t}\n\n});\n\n$.extend($.ui.sortable, {\n\tversion: \"1.8.20\"\n});\n\n})(jQuery);\n\n;jQuery.effects || (function($, undefined) {\n\n$.effects = {};\n\n\n\n/******************************************************************************/\n/****************************** COLOR ANIMATIONS ******************************/\n/******************************************************************************/\n\n// override the animation for color styles\n$.each(['backgroundColor', 'borderBottomColor', 'borderLeftColor',\n\t'borderRightColor', 'borderTopColor', 'borderColor', 'color', 'outlineColor'],\nfunction(i, attr) {\n\t$.fx.step[attr] = function(fx) {\n\t\tif (!fx.colorInit) {\n\t\t\tfx.start = getColor(fx.elem, attr);\n\t\t\tfx.end = getRGB(fx.end);\n\t\t\tfx.colorInit = true;\n\t\t}\n\n\t\tfx.elem.style[attr] = 'rgb(' +\n\t\t\tMath.max(Math.min(parseInt((fx.pos * (fx.end[0] - fx.start[0])) + fx.start[0], 10), 255), 0) + ',' +\n\t\t\tMath.max(Math.min(parseInt((fx.pos * (fx.end[1] - fx.start[1])) + fx.start[1], 10), 255), 0) + ',' +\n\t\t\tMath.max(Math.min(parseInt((fx.pos * (fx.end[2] - fx.start[2])) + fx.start[2], 10), 255), 0) + ')';\n\t};\n});\n\n// Color Conversion functions from highlightFade\n// By Blair Mitchelmore\n// http://jquery.offput.ca/highlightFade/\n\n// Parse strings looking for color tuples [255,255,255]\nfunction getRGB(color) {\n\t\tvar result;\n\n\t\t// Check if we're already dealing with an array of colors\n\t\tif ( color && color.constructor == Array && color.length == 3 )\n\t\t\t\treturn color;\n\n\t\t// Look for rgb(num,num,num)\n\t\tif (result = /rgb\\(\\s*([0-9]{1,3})\\s*,\\s*([0-9]{1,3})\\s*,\\s*([0-9]{1,3})\\s*\\)/.exec(color))\n\t\t\t\treturn [parseInt(result[1],10), parseInt(result[2],10), parseInt(result[3],10)];\n\n\t\t// Look for rgb(num%,num%,num%)\n\t\tif (result = /rgb\\(\\s*([0-9]+(?:\\.[0-9]+)?)\\%\\s*,\\s*([0-9]+(?:\\.[0-9]+)?)\\%\\s*,\\s*([0-9]+(?:\\.[0-9]+)?)\\%\\s*\\)/.exec(color))\n\t\t\t\treturn [parseFloat(result[1])*2.55, parseFloat(result[2])*2.55, parseFloat(result[3])*2.55];\n\n\t\t// Look for #a0b1c2\n\t\tif (result = /#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(color))\n\t\t\t\treturn [parseInt(result[1],16), parseInt(result[2],16), parseInt(result[3],16)];\n\n\t\t// Look for #fff\n\t\tif (result = /#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(color))\n\t\t\t\treturn [parseInt(result[1]+result[1],16), parseInt(result[2]+result[2],16), parseInt(result[3]+result[3],16)];\n\n\t\t// Look for rgba(0, 0, 0, 0) == transparent in Safari 3\n\t\tif (result = /rgba\\(0, 0, 0, 0\\)/.exec(color))\n\t\t\t\treturn colors['transparent'];\n\n\t\t// Otherwise, we're most likely dealing with a named color\n\t\treturn colors[$.trim(color).toLowerCase()];\n}\n\nfunction getColor(elem, attr) {\n\t\tvar color;\n\n\t\tdo {\n\t\t\t\tcolor = $.curCSS(elem, attr);\n\n\t\t\t\t// Keep going until we find an element that has color, or we hit the body\n\t\t\t\tif ( color != '' && color != 'transparent' || $.nodeName(elem, \"body\") )\n\t\t\t\t\t\tbreak;\n\n\t\t\t\tattr = \"backgroundColor\";\n\t\t} while ( elem = elem.parentNode );\n\n\t\treturn getRGB(color);\n};\n\n// Some named colors to work with\n// From Interface by Stefan Petre\n// http://interface.eyecon.ro/\n\nvar colors = {\n\taqua:[0,255,255],\n\tazure:[240,255,255],\n\tbeige:[245,245,220],\n\tblack:[0,0,0],\n\tblue:[0,0,255],\n\tbrown:[165,42,42],\n\tcyan:[0,255,255],\n\tdarkblue:[0,0,139],\n\tdarkcyan:[0,139,139],\n\tdarkgrey:[169,169,169],\n\tdarkgreen:[0,100,0],\n\tdarkkhaki:[189,183,107],\n\tdarkmagenta:[139,0,139],\n\tdarkolivegreen:[85,107,47],\n\tdarkorange:[255,140,0],\n\tdarkorchid:[153,50,204],\n\tdarkred:[139,0,0],\n\tdarksalmon:[233,150,122],\n\tdarkviolet:[148,0,211],\n\tfuchsia:[255,0,255],\n\tgold:[255,215,0],\n\tgreen:[0,128,0],\n\tindigo:[75,0,130],\n\tkhaki:[240,230,140],\n\tlightblue:[173,216,230],\n\tlightcyan:[224,255,255],\n\tlightgreen:[144,238,144],\n\tlightgrey:[211,211,211],\n\tlightpink:[255,182,193],\n\tlightyellow:[255,255,224],\n\tlime:[0,255,0],\n\tmagenta:[255,0,255],\n\tmaroon:[128,0,0],\n\tnavy:[0,0,128],\n\tolive:[128,128,0],\n\torange:[255,165,0],\n\tpink:[255,192,203],\n\tpurple:[128,0,128],\n\tviolet:[128,0,128],\n\tred:[255,0,0],\n\tsilver:[192,192,192],\n\twhite:[255,255,255],\n\tyellow:[255,255,0],\n\ttransparent: [255,255,255]\n};\n\n\n\n/******************************************************************************/\n/****************************** CLASS ANIMATIONS ******************************/\n/******************************************************************************/\n\nvar classAnimationActions = ['add', 'remove', 'toggle'],\n\tshorthandStyles = {\n\t\tborder: 1,\n\t\tborderBottom: 1,\n\t\tborderColor: 1,\n\t\tborderLeft: 1,\n\t\tborderRight: 1,\n\t\tborderTop: 1,\n\t\tborderWidth: 1,\n\t\tmargin: 1,\n\t\tpadding: 1\n\t};\n\nfunction getElementStyles() {\n\tvar style = document.defaultView\n\t\t\t? document.defaultView.getComputedStyle(this, null)\n\t\t\t: this.currentStyle,\n\t\tnewStyle = {},\n\t\tkey,\n\t\tcamelCase;\n\n\t// webkit enumerates style porperties\n\tif (style && style.length && style[0] && style[style[0]]) {\n\t\tvar len = style.length;\n\t\twhile (len--) {\n\t\t\tkey = style[len];\n\t\t\tif (typeof style[key] == 'string') {\n\t\t\t\tcamelCase = key.replace(/\\-(\\w)/g, function(all, letter){\n\t\t\t\t\treturn letter.toUpperCase();\n\t\t\t\t});\n\t\t\t\tnewStyle[camelCase] = style[key];\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfor (key in style) {\n\t\t\tif (typeof style[key] === 'string') {\n\t\t\t\tnewStyle[key] = style[key];\n\t\t\t}\n\t\t}\n\t}\n\t\n\treturn newStyle;\n}\n\nfunction filterStyles(styles) {\n\tvar name, value;\n\tfor (name in styles) {\n\t\tvalue = styles[name];\n\t\tif (\n\t\t\t// ignore null and undefined values\n\t\t\tvalue == null ||\n\t\t\t// ignore functions (when does this occur?)\n\t\t\t$.isFunction(value) ||\n\t\t\t// shorthand styles that need to be expanded\n\t\t\tname in shorthandStyles ||\n\t\t\t// ignore scrollbars (break in IE)\n\t\t\t(/scrollbar/).test(name) ||\n\n\t\t\t// only colors or values that can be converted to numbers\n\t\t\t(!(/color/i).test(name) && isNaN(parseFloat(value)))\n\t\t) {\n\t\t\tdelete styles[name];\n\t\t}\n\t}\n\t\n\treturn styles;\n}\n\nfunction styleDifference(oldStyle, newStyle) {\n\tvar diff = { _: 0 }, // http://dev.jquery.com/ticket/5459\n\t\tname;\n\n\tfor (name in newStyle) {\n\t\tif (oldStyle[name] != newStyle[name]) {\n\t\t\tdiff[name] = newStyle[name];\n\t\t}\n\t}\n\n\treturn diff;\n}\n\n$.effects.animateClass = function(value, duration, easing, callback) {\n\tif ($.isFunction(easing)) {\n\t\tcallback = easing;\n\t\teasing = null;\n\t}\n\n\treturn this.queue(function() {\n\t\tvar that = $(this),\n\t\t\toriginalStyleAttr = that.attr('style') || ' ',\n\t\t\toriginalStyle = filterStyles(getElementStyles.call(this)),\n\t\t\tnewStyle,\n\t\t\tclassName = that.attr('class') || \"\";\n\n\t\t$.each(classAnimationActions, function(i, action) {\n\t\t\tif (value[action]) {\n\t\t\t\tthat[action + 'Class'](value[action]);\n\t\t\t}\n\t\t});\n\t\tnewStyle = filterStyles(getElementStyles.call(this));\n\t\tthat.attr('class', className);\n\n\t\tthat.animate(styleDifference(originalStyle, newStyle), {\n\t\t\tqueue: false,\n\t\t\tduration: duration,\n\t\t\teasing: easing,\n\t\t\tcomplete: function() {\n\t\t\t\t$.each(classAnimationActions, function(i, action) {\n\t\t\t\t\tif (value[action]) { that[action + 'Class'](value[action]); }\n\t\t\t\t});\n\t\t\t\t// work around bug in IE by clearing the cssText before setting it\n\t\t\t\tif (typeof that.attr('style') == 'object') {\n\t\t\t\t\tthat.attr('style').cssText = '';\n\t\t\t\t\tthat.attr('style').cssText = originalStyleAttr;\n\t\t\t\t} else {\n\t\t\t\t\tthat.attr('style', originalStyleAttr);\n\t\t\t\t}\n\t\t\t\tif (callback) { callback.apply(this, arguments); }\n\t\t\t\t$.dequeue( this );\n\t\t\t}\n\t\t});\n\t});\n};\n\n$.fn.extend({\n\t_addClass: $.fn.addClass,\n\taddClass: function(classNames, speed, easing, callback) {\n\t\treturn speed ? $.effects.animateClass.apply(this, [{ add: classNames },speed,easing,callback]) : this._addClass(classNames);\n\t},\n\n\t_removeClass: $.fn.removeClass,\n\tremoveClass: function(classNames,speed,easing,callback) {\n\t\treturn speed ? $.effects.animateClass.apply(this, [{ remove: classNames },speed,easing,callback]) : this._removeClass(classNames);\n\t},\n\n\t_toggleClass: $.fn.toggleClass,\n\ttoggleClass: function(classNames, force, speed, easing, callback) {\n\t\tif ( typeof force == \"boolean\" || force === undefined ) {\n\t\t\tif ( !speed ) {\n\t\t\t\t// without speed parameter;\n\t\t\t\treturn this._toggleClass(classNames, force);\n\t\t\t} else {\n\t\t\t\treturn $.effects.animateClass.apply(this, [(force?{add:classNames}:{remove:classNames}),speed,easing,callback]);\n\t\t\t}\n\t\t} else {\n\t\t\t// without switch parameter;\n\t\t\treturn $.effects.animateClass.apply(this, [{ toggle: classNames },force,speed,easing]);\n\t\t}\n\t},\n\n\tswitchClass: function(remove,add,speed,easing,callback) {\n\t\treturn $.effects.animateClass.apply(this, [{ add: add, remove: remove },speed,easing,callback]);\n\t}\n});\n\n\n\n/******************************************************************************/\n/*********************************** EFFECTS **********************************/\n/******************************************************************************/\n\n$.extend($.effects, {\n\tversion: \"1.8.20\",\n\n\t// Saves a set of properties in a data storage\n\tsave: function(element, set) {\n\t\tfor(var i=0; i < set.length; i++) {\n\t\t\tif(set[i] !== null) element.data(\"ec.storage.\"+set[i], element[0].style[set[i]]);\n\t\t}\n\t},\n\n\t// Restores a set of previously saved properties from a data storage\n\trestore: function(element, set) {\n\t\tfor(var i=0; i < set.length; i++) {\n\t\t\tif(set[i] !== null) element.css(set[i], element.data(\"ec.storage.\"+set[i]));\n\t\t}\n\t},\n\n\tsetMode: function(el, mode) {\n\t\tif (mode == 'toggle') mode = el.is(':hidden') ? 'show' : 'hide'; // Set for toggle\n\t\treturn mode;\n\t},\n\n\tgetBaseline: function(origin, original) { // Translates a [top,left] array into a baseline value\n\t\t// this should be a little more flexible in the future to handle a string & hash\n\t\tvar y, x;\n\t\tswitch (origin[0]) {\n\t\t\tcase 'top': y = 0; break;\n\t\t\tcase 'middle': y = 0.5; break;\n\t\t\tcase 'bottom': y = 1; break;\n\t\t\tdefault: y = origin[0] / original.height;\n\t\t};\n\t\tswitch (origin[1]) {\n\t\t\tcase 'left': x = 0; break;\n\t\t\tcase 'center': x = 0.5; break;\n\t\t\tcase 'right': x = 1; break;\n\t\t\tdefault: x = origin[1] / original.width;\n\t\t};\n\t\treturn {x: x, y: y};\n\t},\n\n\t// Wraps the element around a wrapper that copies position properties\n\tcreateWrapper: function(element) {\n\n\t\t// if the element is already wrapped, return it\n\t\tif (element.parent().is('.ui-effects-wrapper')) {\n\t\t\treturn element.parent();\n\t\t}\n\n\t\t// wrap the element\n\t\tvar props = {\n\t\t\t\twidth: element.outerWidth(true),\n\t\t\t\theight: element.outerHeight(true),\n\t\t\t\t'float': element.css('float')\n\t\t\t},\n\t\t\twrapper = $('<div></div>')\n\t\t\t\t.addClass('ui-effects-wrapper')\n\t\t\t\t.css({\n\t\t\t\t\tfontSize: '100%',\n\t\t\t\t\tbackground: 'transparent',\n\t\t\t\t\tborder: 'none',\n\t\t\t\t\tmargin: 0,\n\t\t\t\t\tpadding: 0\n\t\t\t\t}),\n\t\t\tactive = document.activeElement;\n\n\t\telement.wrap(wrapper);\n\n\t\t// Fixes #7595 - Elements lose focus when wrapped.\n\t\tif ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) {\n\t\t\t$( active ).focus();\n\t\t}\n\t\t\n\t\twrapper = element.parent(); //Hotfix for jQuery 1.4 since some change in wrap() seems to actually loose the reference to the wrapped element\n\n\t\t// transfer positioning properties to the wrapper\n\t\tif (element.css('position') == 'static') {\n\t\t\twrapper.css({ position: 'relative' });\n\t\t\telement.css({ position: 'relative' });\n\t\t} else {\n\t\t\t$.extend(props, {\n\t\t\t\tposition: element.css('position'),\n\t\t\t\tzIndex: element.css('z-index')\n\t\t\t});\n\t\t\t$.each(['top', 'left', 'bottom', 'right'], function(i, pos) {\n\t\t\t\tprops[pos] = element.css(pos);\n\t\t\t\tif (isNaN(parseInt(props[pos], 10))) {\n\t\t\t\t\tprops[pos] = 'auto';\n\t\t\t\t}\n\t\t\t});\n\t\t\telement.css({position: 'relative', top: 0, left: 0, right: 'auto', bottom: 'auto' });\n\t\t}\n\n\t\treturn wrapper.css(props).show();\n\t},\n\n\tremoveWrapper: function(element) {\n\t\tvar parent,\n\t\t\tactive = document.activeElement;\n\t\t\n\t\tif (element.parent().is('.ui-effects-wrapper')) {\n\t\t\tparent = element.parent().replaceWith(element);\n\t\t\t// Fixes #7595 - Elements lose focus when wrapped.\n\t\t\tif ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) {\n\t\t\t\t$( active ).focus();\n\t\t\t}\n\t\t\treturn parent;\n\t\t}\n\t\t\t\n\t\treturn element;\n\t},\n\n\tsetTransition: function(element, list, factor, value) {\n\t\tvalue = value || {};\n\t\t$.each(list, function(i, x){\n\t\t\tvar unit = element.cssUnit(x);\n\t\t\tif (unit[0] > 0) value[x] = unit[0] * factor + unit[1];\n\t\t});\n\t\treturn value;\n\t}\n});\n\n\nfunction _normalizeArguments(effect, options, speed, callback) {\n\t// shift params for method overloading\n\tif (typeof effect == 'object') {\n\t\tcallback = options;\n\t\tspeed = null;\n\t\toptions = effect;\n\t\teffect = options.effect;\n\t}\n\tif ($.isFunction(options)) {\n\t\tcallback = options;\n\t\tspeed = null;\n\t\toptions = {};\n\t}\n        if (typeof options == 'number' || $.fx.speeds[options]) {\n\t\tcallback = speed;\n\t\tspeed = options;\n\t\toptions = {};\n\t}\n\tif ($.isFunction(speed)) {\n\t\tcallback = speed;\n\t\tspeed = null;\n\t}\n\n\toptions = options || {};\n\n\tspeed = speed || options.duration;\n\tspeed = $.fx.off ? 0 : typeof speed == 'number'\n\t\t? speed : speed in $.fx.speeds ? $.fx.speeds[speed] : $.fx.speeds._default;\n\n\tcallback = callback || options.complete;\n\n\treturn [effect, options, speed, callback];\n}\n\nfunction standardSpeed( speed ) {\n\t// valid standard speeds\n\tif ( !speed || typeof speed === \"number\" || $.fx.speeds[ speed ] ) {\n\t\treturn true;\n\t}\n\t\n\t// invalid strings - treat as \"normal\" speed\n\tif ( typeof speed === \"string\" && !$.effects[ speed ] ) {\n\t\treturn true;\n\t}\n\t\n\treturn false;\n}\n\n$.fn.extend({\n\teffect: function(effect, options, speed, callback) {\n\t\tvar args = _normalizeArguments.apply(this, arguments),\n\t\t\t// TODO: make effects take actual parameters instead of a hash\n\t\t\targs2 = {\n\t\t\t\toptions: args[1],\n\t\t\t\tduration: args[2],\n\t\t\t\tcallback: args[3]\n\t\t\t},\n\t\t\tmode = args2.options.mode,\n\t\t\teffectMethod = $.effects[effect];\n\t\t\n\t\tif ( $.fx.off || !effectMethod ) {\n\t\t\t// delegate to the original method (e.g., .show()) if possible\n\t\t\tif ( mode ) {\n\t\t\t\treturn this[ mode ]( args2.duration, args2.callback );\n\t\t\t} else {\n\t\t\t\treturn this.each(function() {\n\t\t\t\t\tif ( args2.callback ) {\n\t\t\t\t\t\targs2.callback.call( this );\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn effectMethod.call(this, args2);\n\t},\n\n\t_show: $.fn.show,\n\tshow: function(speed) {\n\t\tif ( standardSpeed( speed ) ) {\n\t\t\treturn this._show.apply(this, arguments);\n\t\t} else {\n\t\t\tvar args = _normalizeArguments.apply(this, arguments);\n\t\t\targs[1].mode = 'show';\n\t\t\treturn this.effect.apply(this, args);\n\t\t}\n\t},\n\n\t_hide: $.fn.hide,\n\thide: function(speed) {\n\t\tif ( standardSpeed( speed ) ) {\n\t\t\treturn this._hide.apply(this, arguments);\n\t\t} else {\n\t\t\tvar args = _normalizeArguments.apply(this, arguments);\n\t\t\targs[1].mode = 'hide';\n\t\t\treturn this.effect.apply(this, args);\n\t\t}\n\t},\n\n\t// jQuery core overloads toggle and creates _toggle\n\t__toggle: $.fn.toggle,\n\ttoggle: function(speed) {\n\t\tif ( standardSpeed( speed ) || typeof speed === \"boolean\" || $.isFunction( speed ) ) {\n\t\t\treturn this.__toggle.apply(this, arguments);\n\t\t} else {\n\t\t\tvar args = _normalizeArguments.apply(this, arguments);\n\t\t\targs[1].mode = 'toggle';\n\t\t\treturn this.effect.apply(this, args);\n\t\t}\n\t},\n\n\t// helper functions\n\tcssUnit: function(key) {\n\t\tvar style = this.css(key), val = [];\n\t\t$.each( ['em','px','%','pt'], function(i, unit){\n\t\t\tif(style.indexOf(unit) > 0)\n\t\t\t\tval = [parseFloat(style), unit];\n\t\t});\n\t\treturn val;\n\t}\n});\n\n\n\n/******************************************************************************/\n/*********************************** EASING ***********************************/\n/******************************************************************************/\n\n/*\n * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/\n *\n * Uses the built in easing capabilities added In jQuery 1.1\n * to offer multiple easing options\n *\n * TERMS OF USE - jQuery Easing\n *\n * Open source under the BSD License.\n *\n * Copyright 2008 George McGinley Smith\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n *\n * Redistributions of source code must retain the above copyright notice, this list of\n * conditions and the following disclaimer.\n * Redistributions in binary form must reproduce the above copyright notice, this list\n * of conditions and the following disclaimer in the documentation and/or other materials\n * provided with the distribution.\n *\n * Neither the name of the author nor the names of contributors may be used to endorse\n * or promote products derived from this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE\n * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE\n * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED\n * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED\n * OF THE POSSIBILITY OF SUCH DAMAGE.\n *\n*/\n\n// t: current time, b: begInnIng value, c: change In value, d: duration\n$.easing.jswing = $.easing.swing;\n\n$.extend($.easing,\n{\n\tdef: 'easeOutQuad',\n\tswing: function (x, t, b, c, d) {\n\t\t//alert($.easing.default);\n\t\treturn $.easing[$.easing.def](x, t, b, c, d);\n\t},\n\teaseInQuad: function (x, t, b, c, d) {\n\t\treturn c*(t/=d)*t + b;\n\t},\n\teaseOutQuad: function (x, t, b, c, d) {\n\t\treturn -c *(t/=d)*(t-2) + b;\n\t},\n\teaseInOutQuad: function (x, t, b, c, d) {\n\t\tif ((t/=d/2) < 1) return c/2*t*t + b;\n\t\treturn -c/2 * ((--t)*(t-2) - 1) + b;\n\t},\n\teaseInCubic: function (x, t, b, c, d) {\n\t\treturn c*(t/=d)*t*t + b;\n\t},\n\teaseOutCubic: function (x, t, b, c, d) {\n\t\treturn c*((t=t/d-1)*t*t + 1) + b;\n\t},\n\teaseInOutCubic: function (x, t, b, c, d) {\n\t\tif ((t/=d/2) < 1) return c/2*t*t*t + b;\n\t\treturn c/2*((t-=2)*t*t + 2) + b;\n\t},\n\teaseInQuart: function (x, t, b, c, d) {\n\t\treturn c*(t/=d)*t*t*t + b;\n\t},\n\teaseOutQuart: function (x, t, b, c, d) {\n\t\treturn -c * ((t=t/d-1)*t*t*t - 1) + b;\n\t},\n\teaseInOutQuart: function (x, t, b, c, d) {\n\t\tif ((t/=d/2) < 1) return c/2*t*t*t*t + b;\n\t\treturn -c/2 * ((t-=2)*t*t*t - 2) + b;\n\t},\n\teaseInQuint: function (x, t, b, c, d) {\n\t\treturn c*(t/=d)*t*t*t*t + b;\n\t},\n\teaseOutQuint: function (x, t, b, c, d) {\n\t\treturn c*((t=t/d-1)*t*t*t*t + 1) + b;\n\t},\n\teaseInOutQuint: function (x, t, b, c, d) {\n\t\tif ((t/=d/2) < 1) return c/2*t*t*t*t*t + b;\n\t\treturn c/2*((t-=2)*t*t*t*t + 2) + b;\n\t},\n\teaseInSine: function (x, t, b, c, d) {\n\t\treturn -c * Math.cos(t/d * (Math.PI/2)) + c + b;\n\t},\n\teaseOutSine: function (x, t, b, c, d) {\n\t\treturn c * Math.sin(t/d * (Math.PI/2)) + b;\n\t},\n\teaseInOutSine: function (x, t, b, c, d) {\n\t\treturn -c/2 * (Math.cos(Math.PI*t/d) - 1) + b;\n\t},\n\teaseInExpo: function (x, t, b, c, d) {\n\t\treturn (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b;\n\t},\n\teaseOutExpo: function (x, t, b, c, d) {\n\t\treturn (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b;\n\t},\n\teaseInOutExpo: function (x, t, b, c, d) {\n\t\tif (t==0) return b;\n\t\tif (t==d) return b+c;\n\t\tif ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b;\n\t\treturn c/2 * (-Math.pow(2, -10 * --t) + 2) + b;\n\t},\n\teaseInCirc: function (x, t, b, c, d) {\n\t\treturn -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b;\n\t},\n\teaseOutCirc: function (x, t, b, c, d) {\n\t\treturn c * Math.sqrt(1 - (t=t/d-1)*t) + b;\n\t},\n\teaseInOutCirc: function (x, t, b, c, d) {\n\t\tif ((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b;\n\t\treturn c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b;\n\t},\n\teaseInElastic: function (x, t, b, c, d) {\n\t\tvar s=1.70158;var p=0;var a=c;\n\t\tif (t==0) return b;  if ((t/=d)==1) return b+c;  if (!p) p=d*.3;\n\t\tif (a < Math.abs(c)) { a=c; var s=p/4; }\n\t\telse var s = p/(2*Math.PI) * Math.asin (c/a);\n\t\treturn -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;\n\t},\n\teaseOutElastic: function (x, t, b, c, d) {\n\t\tvar s=1.70158;var p=0;var a=c;\n\t\tif (t==0) return b;  if ((t/=d)==1) return b+c;  if (!p) p=d*.3;\n\t\tif (a < Math.abs(c)) { a=c; var s=p/4; }\n\t\telse var s = p/(2*Math.PI) * Math.asin (c/a);\n\t\treturn a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b;\n\t},\n\teaseInOutElastic: function (x, t, b, c, d) {\n\t\tvar s=1.70158;var p=0;var a=c;\n\t\tif (t==0) return b;  if ((t/=d/2)==2) return b+c;  if (!p) p=d*(.3*1.5);\n\t\tif (a < Math.abs(c)) { a=c; var s=p/4; }\n\t\telse var s = p/(2*Math.PI) * Math.asin (c/a);\n\t\tif (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;\n\t\treturn a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b;\n\t},\n\teaseInBack: function (x, t, b, c, d, s) {\n\t\tif (s == undefined) s = 1.70158;\n\t\treturn c*(t/=d)*t*((s+1)*t - s) + b;\n\t},\n\teaseOutBack: function (x, t, b, c, d, s) {\n\t\tif (s == undefined) s = 1.70158;\n\t\treturn c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;\n\t},\n\teaseInOutBack: function (x, t, b, c, d, s) {\n\t\tif (s == undefined) s = 1.70158;\n\t\tif ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;\n\t\treturn c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;\n\t},\n\teaseInBounce: function (x, t, b, c, d) {\n\t\treturn c - $.easing.easeOutBounce (x, d-t, 0, c, d) + b;\n\t},\n\teaseOutBounce: function (x, t, b, c, d) {\n\t\tif ((t/=d) < (1/2.75)) {\n\t\t\treturn c*(7.5625*t*t) + b;\n\t\t} else if (t < (2/2.75)) {\n\t\t\treturn c*(7.5625*(t-=(1.5/2.75))*t + .75) + b;\n\t\t} else if (t < (2.5/2.75)) {\n\t\t\treturn c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b;\n\t\t} else {\n\t\t\treturn c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b;\n\t\t}\n\t},\n\teaseInOutBounce: function (x, t, b, c, d) {\n\t\tif (t < d/2) return $.easing.easeInBounce (x, t*2, 0, c, d) * .5 + b;\n\t\treturn $.easing.easeOutBounce (x, t*2-d, 0, c, d) * .5 + c*.5 + b;\n\t}\n});\n\n/*\n *\n * TERMS OF USE - EASING EQUATIONS\n *\n * Open source under the BSD License.\n *\n * Copyright 2001 Robert Penner\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n *\n * Redistributions of source code must retain the above copyright notice, this list of\n * conditions and the following disclaimer.\n * Redistributions in binary form must reproduce the above copyright notice, this list\n * of conditions and the following disclaimer in the documentation and/or other materials\n * provided with the distribution.\n *\n * Neither the name of the author nor the names of contributors may be used to endorse\n * or promote products derived from this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE\n * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE\n * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED\n * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED\n * OF THE POSSIBILITY OF SUCH DAMAGE.\n *\n */\n\n})(jQuery);\n\n(function( $, undefined ) {\n\n$.effects.blind = function(o) {\n\n\treturn this.queue(function() {\n\n\t\t// Create element\n\t\tvar el = $(this), props = ['position','top','bottom','left','right'];\n\n\t\t// Set options\n\t\tvar mode = $.effects.setMode(el, o.options.mode || 'hide'); // Set Mode\n\t\tvar direction = o.options.direction || 'vertical'; // Default direction\n\n\t\t// Adjust\n\t\t$.effects.save(el, props); el.show(); // Save & Show\n\t\tvar wrapper = $.effects.createWrapper(el).css({overflow:'hidden'}); // Create Wrapper\n\t\tvar ref = (direction == 'vertical') ? 'height' : 'width';\n\t\tvar distance = (direction == 'vertical') ? wrapper.height() : wrapper.width();\n\t\tif(mode == 'show') wrapper.css(ref, 0); // Shift\n\n\t\t// Animation\n\t\tvar animation = {};\n\t\tanimation[ref] = mode == 'show' ? distance : 0;\n\n\t\t// Animate\n\t\twrapper.animate(animation, o.duration, o.options.easing, function() {\n\t\t\tif(mode == 'hide') el.hide(); // Hide\n\t\t\t$.effects.restore(el, props); $.effects.removeWrapper(el); // Restore\n\t\t\tif(o.callback) o.callback.apply(el[0], arguments); // Callback\n\t\t\tel.dequeue();\n\t\t});\n\n\t});\n\n};\n\n})(jQuery);\n\n(function( $, undefined ) {\n\n$.effects.bounce = function(o) {\n\n\treturn this.queue(function() {\n\n\t\t// Create element\n\t\tvar el = $(this), props = ['position','top','bottom','left','right'];\n\n\t\t// Set options\n\t\tvar mode = $.effects.setMode(el, o.options.mode || 'effect'); // Set Mode\n\t\tvar direction = o.options.direction || 'up'; // Default direction\n\t\tvar distance = o.options.distance || 20; // Default distance\n\t\tvar times = o.options.times || 5; // Default # of times\n\t\tvar speed = o.duration || 250; // Default speed per bounce\n\t\tif (/show|hide/.test(mode)) props.push('opacity'); // Avoid touching opacity to prevent clearType and PNG issues in IE\n\n\t\t// Adjust\n\t\t$.effects.save(el, props); el.show(); // Save & Show\n\t\t$.effects.createWrapper(el); // Create Wrapper\n\t\tvar ref = (direction == 'up' || direction == 'down') ? 'top' : 'left';\n\t\tvar motion = (direction == 'up' || direction == 'left') ? 'pos' : 'neg';\n\t\tvar distance = o.options.distance || (ref == 'top' ? el.outerHeight({margin:true}) / 3 : el.outerWidth({margin:true}) / 3);\n\t\tif (mode == 'show') el.css('opacity', 0).css(ref, motion == 'pos' ? -distance : distance); // Shift\n\t\tif (mode == 'hide') distance = distance / (times * 2);\n\t\tif (mode != 'hide') times--;\n\n\t\t// Animate\n\t\tif (mode == 'show') { // Show Bounce\n\t\t\tvar animation = {opacity: 1};\n\t\t\tanimation[ref] = (motion == 'pos' ? '+=' : '-=') + distance;\n\t\t\tel.animate(animation, speed / 2, o.options.easing);\n\t\t\tdistance = distance / 2;\n\t\t\ttimes--;\n\t\t};\n\t\tfor (var i = 0; i < times; i++) { // Bounces\n\t\t\tvar animation1 = {}, animation2 = {};\n\t\t\tanimation1[ref] = (motion == 'pos' ? '-=' : '+=') + distance;\n\t\t\tanimation2[ref] = (motion == 'pos' ? '+=' : '-=') + distance;\n\t\t\tel.animate(animation1, speed / 2, o.options.easing).animate(animation2, speed / 2, o.options.easing);\n\t\t\tdistance = (mode == 'hide') ? distance * 2 : distance / 2;\n\t\t};\n\t\tif (mode == 'hide') { // Last Bounce\n\t\t\tvar animation = {opacity: 0};\n\t\t\tanimation[ref] = (motion == 'pos' ? '-=' : '+=')  + distance;\n\t\t\tel.animate(animation, speed / 2, o.options.easing, function(){\n\t\t\t\tel.hide(); // Hide\n\t\t\t\t$.effects.restore(el, props); $.effects.removeWrapper(el); // Restore\n\t\t\t\tif(o.callback) o.callback.apply(this, arguments); // Callback\n\t\t\t});\n\t\t} else {\n\t\t\tvar animation1 = {}, animation2 = {};\n\t\t\tanimation1[ref] = (motion == 'pos' ? '-=' : '+=') + distance;\n\t\t\tanimation2[ref] = (motion == 'pos' ? '+=' : '-=') + distance;\n\t\t\tel.animate(animation1, speed / 2, o.options.easing).animate(animation2, speed / 2, o.options.easing, function(){\n\t\t\t\t$.effects.restore(el, props); $.effects.removeWrapper(el); // Restore\n\t\t\t\tif(o.callback) o.callback.apply(this, arguments); // Callback\n\t\t\t});\n\t\t};\n\t\tel.queue('fx', function() { el.dequeue(); });\n\t\tel.dequeue();\n\t});\n\n};\n\n})(jQuery);\n\n(function( $, undefined ) {\n\n$.effects.clip = function(o) {\n\n\treturn this.queue(function() {\n\n\t\t// Create element\n\t\tvar el = $(this), props = ['position','top','bottom','left','right','height','width'];\n\n\t\t// Set options\n\t\tvar mode = $.effects.setMode(el, o.options.mode || 'hide'); // Set Mode\n\t\tvar direction = o.options.direction || 'vertical'; // Default direction\n\n\t\t// Adjust\n\t\t$.effects.save(el, props); el.show(); // Save & Show\n\t\tvar wrapper = $.effects.createWrapper(el).css({overflow:'hidden'}); // Create Wrapper\n\t\tvar animate = el[0].tagName == 'IMG' ? wrapper : el;\n\t\tvar ref = {\n\t\t\tsize: (direction == 'vertical') ? 'height' : 'width',\n\t\t\tposition: (direction == 'vertical') ? 'top' : 'left'\n\t\t};\n\t\tvar distance = (direction == 'vertical') ? animate.height() : animate.width();\n\t\tif(mode == 'show') { animate.css(ref.size, 0); animate.css(ref.position, distance / 2); } // Shift\n\n\t\t// Animation\n\t\tvar animation = {};\n\t\tanimation[ref.size] = mode == 'show' ? distance : 0;\n\t\tanimation[ref.position] = mode == 'show' ? 0 : distance / 2;\n\n\t\t// Animate\n\t\tanimate.animate(animation, { queue: false, duration: o.duration, easing: o.options.easing, complete: function() {\n\t\t\tif(mode == 'hide') el.hide(); // Hide\n\t\t\t$.effects.restore(el, props); $.effects.removeWrapper(el); // Restore\n\t\t\tif(o.callback) o.callback.apply(el[0], arguments); // Callback\n\t\t\tel.dequeue();\n\t\t}});\n\n\t});\n\n};\n\n})(jQuery);\n\n(function( $, undefined ) {\n\n$.effects.drop = function(o) {\n\n\treturn this.queue(function() {\n\n\t\t// Create element\n\t\tvar el = $(this), props = ['position','top','bottom','left','right','opacity'];\n\n\t\t// Set options\n\t\tvar mode = $.effects.setMode(el, o.options.mode || 'hide'); // Set Mode\n\t\tvar direction = o.options.direction || 'left'; // Default Direction\n\n\t\t// Adjust\n\t\t$.effects.save(el, props); el.show(); // Save & Show\n\t\t$.effects.createWrapper(el); // Create Wrapper\n\t\tvar ref = (direction == 'up' || direction == 'down') ? 'top' : 'left';\n\t\tvar motion = (direction == 'up' || direction == 'left') ? 'pos' : 'neg';\n\t\tvar distance = o.options.distance || (ref == 'top' ? el.outerHeight({margin:true}) / 2 : el.outerWidth({margin:true}) / 2);\n\t\tif (mode == 'show') el.css('opacity', 0).css(ref, motion == 'pos' ? -distance : distance); // Shift\n\n\t\t// Animation\n\t\tvar animation = {opacity: mode == 'show' ? 1 : 0};\n\t\tanimation[ref] = (mode == 'show' ? (motion == 'pos' ? '+=' : '-=') : (motion == 'pos' ? '-=' : '+=')) + distance;\n\n\t\t// Animate\n\t\tel.animate(animation, { queue: false, duration: o.duration, easing: o.options.easing, complete: function() {\n\t\t\tif(mode == 'hide') el.hide(); // Hide\n\t\t\t$.effects.restore(el, props); $.effects.removeWrapper(el); // Restore\n\t\t\tif(o.callback) o.callback.apply(this, arguments); // Callback\n\t\t\tel.dequeue();\n\t\t}});\n\n\t});\n\n};\n\n})(jQuery);\n\n(function( $, undefined ) {\n\n$.effects.explode = function(o) {\n\n\treturn this.queue(function() {\n\n\tvar rows = o.options.pieces ? Math.round(Math.sqrt(o.options.pieces)) : 3;\n\tvar cells = o.options.pieces ? Math.round(Math.sqrt(o.options.pieces)) : 3;\n\n\to.options.mode = o.options.mode == 'toggle' ? ($(this).is(':visible') ? 'hide' : 'show') : o.options.mode;\n\tvar el = $(this).show().css('visibility', 'hidden');\n\tvar offset = el.offset();\n\n\t//Substract the margins - not fixing the problem yet.\n\toffset.top -= parseInt(el.css(\"marginTop\"),10) || 0;\n\toffset.left -= parseInt(el.css(\"marginLeft\"),10) || 0;\n\n\tvar width = el.outerWidth(true);\n\tvar height = el.outerHeight(true);\n\n\tfor(var i=0;i<rows;i++) { // =\n\t\tfor(var j=0;j<cells;j++) { // ||\n\t\t\tel\n\t\t\t\t.clone()\n\t\t\t\t.appendTo('body')\n\t\t\t\t.wrap('<div></div>')\n\t\t\t\t.css({\n\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\tvisibility: 'visible',\n\t\t\t\t\tleft: -j*(width/cells),\n\t\t\t\t\ttop: -i*(height/rows)\n\t\t\t\t})\n\t\t\t\t.parent()\n\t\t\t\t.addClass('ui-effects-explode')\n\t\t\t\t.css({\n\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\toverflow: 'hidden',\n\t\t\t\t\twidth: width/cells,\n\t\t\t\t\theight: height/rows,\n\t\t\t\t\tleft: offset.left + j*(width/cells) + (o.options.mode == 'show' ? (j-Math.floor(cells/2))*(width/cells) : 0),\n\t\t\t\t\ttop: offset.top + i*(height/rows) + (o.options.mode == 'show' ? (i-Math.floor(rows/2))*(height/rows) : 0),\n\t\t\t\t\topacity: o.options.mode == 'show' ? 0 : 1\n\t\t\t\t}).animate({\n\t\t\t\t\tleft: offset.left + j*(width/cells) + (o.options.mode == 'show' ? 0 : (j-Math.floor(cells/2))*(width/cells)),\n\t\t\t\t\ttop: offset.top + i*(height/rows) + (o.options.mode == 'show' ? 0 : (i-Math.floor(rows/2))*(height/rows)),\n\t\t\t\t\topacity: o.options.mode == 'show' ? 1 : 0\n\t\t\t\t}, o.duration || 500);\n\t\t}\n\t}\n\n\t// Set a timeout, to call the callback approx. when the other animations have finished\n\tsetTimeout(function() {\n\n\t\to.options.mode == 'show' ? el.css({ visibility: 'visible' }) : el.css({ visibility: 'visible' }).hide();\n\t\t\t\tif(o.callback) o.callback.apply(el[0]); // Callback\n\t\t\t\tel.dequeue();\n\n\t\t\t\t$('div.ui-effects-explode').remove();\n\n\t}, o.duration || 500);\n\n\n\t});\n\n};\n\n})(jQuery);\n\n(function( $, undefined ) {\n\n$.effects.fade = function(o) {\n\treturn this.queue(function() {\n\t\tvar elem = $(this),\n\t\t\tmode = $.effects.setMode(elem, o.options.mode || 'hide');\n\n\t\telem.animate({ opacity: mode }, {\n\t\t\tqueue: false,\n\t\t\tduration: o.duration,\n\t\t\teasing: o.options.easing,\n\t\t\tcomplete: function() {\n\t\t\t\t(o.callback && o.callback.apply(this, arguments));\n\t\t\t\telem.dequeue();\n\t\t\t}\n\t\t});\n\t});\n};\n\n})(jQuery);\n\n(function( $, undefined ) {\n\n$.effects.fold = function(o) {\n\n\treturn this.queue(function() {\n\n\t\t// Create element\n\t\tvar el = $(this), props = ['position','top','bottom','left','right'];\n\n\t\t// Set options\n\t\tvar mode = $.effects.setMode(el, o.options.mode || 'hide'); // Set Mode\n\t\tvar size = o.options.size || 15; // Default fold size\n\t\tvar horizFirst = !(!o.options.horizFirst); // Ensure a boolean value\n\t\tvar duration = o.duration ? o.duration / 2 : $.fx.speeds._default / 2;\n\n\t\t// Adjust\n\t\t$.effects.save(el, props); el.show(); // Save & Show\n\t\tvar wrapper = $.effects.createWrapper(el).css({overflow:'hidden'}); // Create Wrapper\n\t\tvar widthFirst = ((mode == 'show') != horizFirst);\n\t\tvar ref = widthFirst ? ['width', 'height'] : ['height', 'width'];\n\t\tvar distance = widthFirst ? [wrapper.width(), wrapper.height()] : [wrapper.height(), wrapper.width()];\n\t\tvar percent = /([0-9]+)%/.exec(size);\n\t\tif(percent) size = parseInt(percent[1],10) / 100 * distance[mode == 'hide' ? 0 : 1];\n\t\tif(mode == 'show') wrapper.css(horizFirst ? {height: 0, width: size} : {height: size, width: 0}); // Shift\n\n\t\t// Animation\n\t\tvar animation1 = {}, animation2 = {};\n\t\tanimation1[ref[0]] = mode == 'show' ? distance[0] : size;\n\t\tanimation2[ref[1]] = mode == 'show' ? distance[1] : 0;\n\n\t\t// Animate\n\t\twrapper.animate(animation1, duration, o.options.easing)\n\t\t.animate(animation2, duration, o.options.easing, function() {\n\t\t\tif(mode == 'hide') el.hide(); // Hide\n\t\t\t$.effects.restore(el, props); $.effects.removeWrapper(el); // Restore\n\t\t\tif(o.callback) o.callback.apply(el[0], arguments); // Callback\n\t\t\tel.dequeue();\n\t\t});\n\n\t});\n\n};\n\n})(jQuery);\n\n(function( $, undefined ) {\n\n$.effects.highlight = function(o) {\n\treturn this.queue(function() {\n\t\tvar elem = $(this),\n\t\t\tprops = ['backgroundImage', 'backgroundColor', 'opacity'],\n\t\t\tmode = $.effects.setMode(elem, o.options.mode || 'show'),\n\t\t\tanimation = {\n\t\t\t\tbackgroundColor: elem.css('backgroundColor')\n\t\t\t};\n\n\t\tif (mode == 'hide') {\n\t\t\tanimation.opacity = 0;\n\t\t}\n\n\t\t$.effects.save(elem, props);\n\t\telem\n\t\t\t.show()\n\t\t\t.css({\n\t\t\t\tbackgroundImage: 'none',\n\t\t\t\tbackgroundColor: o.options.color || '#ffff99'\n\t\t\t})\n\t\t\t.animate(animation, {\n\t\t\t\tqueue: false,\n\t\t\t\tduration: o.duration,\n\t\t\t\teasing: o.options.easing,\n\t\t\t\tcomplete: function() {\n\t\t\t\t\t(mode == 'hide' && elem.hide());\n\t\t\t\t\t$.effects.restore(elem, props);\n\t\t\t\t\t(mode == 'show' && !$.support.opacity && this.style.removeAttribute('filter'));\n\t\t\t\t\t(o.callback && o.callback.apply(this, arguments));\n\t\t\t\t\telem.dequeue();\n\t\t\t\t}\n\t\t\t});\n\t});\n};\n\n})(jQuery);\n\n(function( $, undefined ) {\n\n$.effects.pulsate = function(o) {\n\treturn this.queue(function() {\n\t\tvar elem = $(this),\n\t\t\tmode = $.effects.setMode(elem, o.options.mode || 'show'),\n\t\t\ttimes = ((o.options.times || 5) * 2) - 1,\n\t\t\tduration = o.duration ? o.duration / 2 : $.fx.speeds._default / 2,\n\t\t\tisVisible = elem.is(':visible'),\n\t\t\tanimateTo = 0;\n\n\t\tif (!isVisible) {\n\t\t\telem.css('opacity', 0).show();\n\t\t\tanimateTo = 1;\n\t\t}\n\n\t\tif ((mode == 'hide' && isVisible) || (mode == 'show' && !isVisible)) {\n\t\t\ttimes--;\n\t\t}\n\n\t\tfor (var i = 0; i < times; i++) {\n\t\t\telem.animate({ opacity: animateTo }, duration, o.options.easing);\n\t\t\tanimateTo = (animateTo + 1) % 2;\n\t\t}\n\n\t\telem.animate({ opacity: animateTo }, duration, o.options.easing, function() {\n\t\t\tif (animateTo == 0) {\n\t\t\t\telem.hide();\n\t\t\t}\n\t\t\t(o.callback && o.callback.apply(this, arguments));\n\t\t});\n\n\t\telem\n\t\t\t.queue('fx', function() { elem.dequeue(); })\n\t\t\t.dequeue();\n\t});\n};\n\n})(jQuery);\n\n(function( $, undefined ) {\n\n$.effects.puff = function(o) {\n\treturn this.queue(function() {\n\t\tvar elem = $(this),\n\t\t\tmode = $.effects.setMode(elem, o.options.mode || 'hide'),\n\t\t\tpercent = parseInt(o.options.percent, 10) || 150,\n\t\t\tfactor = percent / 100,\n\t\t\toriginal = { height: elem.height(), width: elem.width() };\n\n\t\t$.extend(o.options, {\n\t\t\tfade: true,\n\t\t\tmode: mode,\n\t\t\tpercent: mode == 'hide' ? percent : 100,\n\t\t\tfrom: mode == 'hide'\n\t\t\t\t? original\n\t\t\t\t: {\n\t\t\t\t\theight: original.height * factor,\n\t\t\t\t\twidth: original.width * factor\n\t\t\t\t}\n\t\t});\n\n\t\telem.effect('scale', o.options, o.duration, o.callback);\n\t\telem.dequeue();\n\t});\n};\n\n$.effects.scale = function(o) {\n\n\treturn this.queue(function() {\n\n\t\t// Create element\n\t\tvar el = $(this);\n\n\t\t// Set options\n\t\tvar options = $.extend(true, {}, o.options);\n\t\tvar mode = $.effects.setMode(el, o.options.mode || 'effect'); // Set Mode\n\t\tvar percent = parseInt(o.options.percent,10) || (parseInt(o.options.percent,10) == 0 ? 0 : (mode == 'hide' ? 0 : 100)); // Set default scaling percent\n\t\tvar direction = o.options.direction || 'both'; // Set default axis\n\t\tvar origin = o.options.origin; // The origin of the scaling\n\t\tif (mode != 'effect') { // Set default origin and restore for show/hide\n\t\t\toptions.origin = origin || ['middle','center'];\n\t\t\toptions.restore = true;\n\t\t}\n\t\tvar original = {height: el.height(), width: el.width()}; // Save original\n\t\tel.from = o.options.from || (mode == 'show' ? {height: 0, width: 0} : original); // Default from state\n\n\t\t// Adjust\n\t\tvar factor = { // Set scaling factor\n\t\t\ty: direction != 'horizontal' ? (percent / 100) : 1,\n\t\t\tx: direction != 'vertical' ? (percent / 100) : 1\n\t\t};\n\t\tel.to = {height: original.height * factor.y, width: original.width * factor.x}; // Set to state\n\n\t\tif (o.options.fade) { // Fade option to support puff\n\t\t\tif (mode == 'show') {el.from.opacity = 0; el.to.opacity = 1;};\n\t\t\tif (mode == 'hide') {el.from.opacity = 1; el.to.opacity = 0;};\n\t\t};\n\n\t\t// Animation\n\t\toptions.from = el.from; options.to = el.to; options.mode = mode;\n\n\t\t// Animate\n\t\tel.effect('size', options, o.duration, o.callback);\n\t\tel.dequeue();\n\t});\n\n};\n\n$.effects.size = function(o) {\n\n\treturn this.queue(function() {\n\n\t\t// Create element\n\t\tvar el = $(this), props = ['position','top','bottom','left','right','width','height','overflow','opacity'];\n\t\tvar props1 = ['position','top','bottom','left','right','overflow','opacity']; // Always restore\n\t\tvar props2 = ['width','height','overflow']; // Copy for children\n\t\tvar cProps = ['fontSize'];\n\t\tvar vProps = ['borderTopWidth', 'borderBottomWidth', 'paddingTop', 'paddingBottom'];\n\t\tvar hProps = ['borderLeftWidth', 'borderRightWidth', 'paddingLeft', 'paddingRight'];\n\n\t\t// Set options\n\t\tvar mode = $.effects.setMode(el, o.options.mode || 'effect'); // Set Mode\n\t\tvar restore = o.options.restore || false; // Default restore\n\t\tvar scale = o.options.scale || 'both'; // Default scale mode\n\t\tvar origin = o.options.origin; // The origin of the sizing\n\t\tvar original = {height: el.height(), width: el.width()}; // Save original\n\t\tel.from = o.options.from || original; // Default from state\n\t\tel.to = o.options.to || original; // Default to state\n\t\t// Adjust\n\t\tif (origin) { // Calculate baseline shifts\n\t\t\tvar baseline = $.effects.getBaseline(origin, original);\n\t\t\tel.from.top = (original.height - el.from.height) * baseline.y;\n\t\t\tel.from.left = (original.width - el.from.width) * baseline.x;\n\t\t\tel.to.top = (original.height - el.to.height) * baseline.y;\n\t\t\tel.to.left = (original.width - el.to.width) * baseline.x;\n\t\t};\n\t\tvar factor = { // Set scaling factor\n\t\t\tfrom: {y: el.from.height / original.height, x: el.from.width / original.width},\n\t\t\tto: {y: el.to.height / original.height, x: el.to.width / original.width}\n\t\t};\n\t\tif (scale == 'box' || scale == 'both') { // Scale the css box\n\t\t\tif (factor.from.y != factor.to.y) { // Vertical props scaling\n\t\t\t\tprops = props.concat(vProps);\n\t\t\t\tel.from = $.effects.setTransition(el, vProps, factor.from.y, el.from);\n\t\t\t\tel.to = $.effects.setTransition(el, vProps, factor.to.y, el.to);\n\t\t\t};\n\t\t\tif (factor.from.x != factor.to.x) { // Horizontal props scaling\n\t\t\t\tprops = props.concat(hProps);\n\t\t\t\tel.from = $.effects.setTransition(el, hProps, factor.from.x, el.from);\n\t\t\t\tel.to = $.effects.setTransition(el, hProps, factor.to.x, el.to);\n\t\t\t};\n\t\t};\n\t\tif (scale == 'content' || scale == 'both') { // Scale the content\n\t\t\tif (factor.from.y != factor.to.y) { // Vertical props scaling\n\t\t\t\tprops = props.concat(cProps);\n\t\t\t\tel.from = $.effects.setTransition(el, cProps, factor.from.y, el.from);\n\t\t\t\tel.to = $.effects.setTransition(el, cProps, factor.to.y, el.to);\n\t\t\t};\n\t\t};\n\t\t$.effects.save(el, restore ? props : props1); el.show(); // Save & Show\n\t\t$.effects.createWrapper(el); // Create Wrapper\n\t\tel.css('overflow','hidden').css(el.from); // Shift\n\n\t\t// Animate\n\t\tif (scale == 'content' || scale == 'both') { // Scale the children\n\t\t\tvProps = vProps.concat(['marginTop','marginBottom']).concat(cProps); // Add margins/font-size\n\t\t\thProps = hProps.concat(['marginLeft','marginRight']); // Add margins\n\t\t\tprops2 = props.concat(vProps).concat(hProps); // Concat\n\t\t\tel.find(\"*[width]\").each(function(){\n\t\t\t\tvar child = $(this);\n\t\t\t\tif (restore) $.effects.save(child, props2);\n\t\t\t\tvar c_original = {height: child.height(), width: child.width()}; // Save original\n\t\t\t\tchild.from = {height: c_original.height * factor.from.y, width: c_original.width * factor.from.x};\n\t\t\t\tchild.to = {height: c_original.height * factor.to.y, width: c_original.width * factor.to.x};\n\t\t\t\tif (factor.from.y != factor.to.y) { // Vertical props scaling\n\t\t\t\t\tchild.from = $.effects.setTransition(child, vProps, factor.from.y, child.from);\n\t\t\t\t\tchild.to = $.effects.setTransition(child, vProps, factor.to.y, child.to);\n\t\t\t\t};\n\t\t\t\tif (factor.from.x != factor.to.x) { // Horizontal props scaling\n\t\t\t\t\tchild.from = $.effects.setTransition(child, hProps, factor.from.x, child.from);\n\t\t\t\t\tchild.to = $.effects.setTransition(child, hProps, factor.to.x, child.to);\n\t\t\t\t};\n\t\t\t\tchild.css(child.from); // Shift children\n\t\t\t\tchild.animate(child.to, o.duration, o.options.easing, function(){\n\t\t\t\t\tif (restore) $.effects.restore(child, props2); // Restore children\n\t\t\t\t}); // Animate children\n\t\t\t});\n\t\t};\n\n\t\t// Animate\n\t\tel.animate(el.to, { queue: false, duration: o.duration, easing: o.options.easing, complete: function() {\n\t\t\tif (el.to.opacity === 0) {\n\t\t\t\tel.css('opacity', el.from.opacity);\n\t\t\t}\n\t\t\tif(mode == 'hide') el.hide(); // Hide\n\t\t\t$.effects.restore(el, restore ? props : props1); $.effects.removeWrapper(el); // Restore\n\t\t\tif(o.callback) o.callback.apply(this, arguments); // Callback\n\t\t\tel.dequeue();\n\t\t}});\n\n\t});\n\n};\n\n})(jQuery);\n\n(function( $, undefined ) {\n\n$.effects.shake = function(o) {\n\n\treturn this.queue(function() {\n\n\t\t// Create element\n\t\tvar el = $(this), props = ['position','top','bottom','left','right'];\n\n\t\t// Set options\n\t\tvar mode = $.effects.setMode(el, o.options.mode || 'effect'); // Set Mode\n\t\tvar direction = o.options.direction || 'left'; // Default direction\n\t\tvar distance = o.options.distance || 20; // Default distance\n\t\tvar times = o.options.times || 3; // Default # of times\n\t\tvar speed = o.duration || o.options.duration || 140; // Default speed per shake\n\n\t\t// Adjust\n\t\t$.effects.save(el, props); el.show(); // Save & Show\n\t\t$.effects.createWrapper(el); // Create Wrapper\n\t\tvar ref = (direction == 'up' || direction == 'down') ? 'top' : 'left';\n\t\tvar motion = (direction == 'up' || direction == 'left') ? 'pos' : 'neg';\n\n\t\t// Animation\n\t\tvar animation = {}, animation1 = {}, animation2 = {};\n\t\tanimation[ref] = (motion == 'pos' ? '-=' : '+=')  + distance;\n\t\tanimation1[ref] = (motion == 'pos' ? '+=' : '-=')  + distance * 2;\n\t\tanimation2[ref] = (motion == 'pos' ? '-=' : '+=')  + distance * 2;\n\n\t\t// Animate\n\t\tel.animate(animation, speed, o.options.easing);\n\t\tfor (var i = 1; i < times; i++) { // Shakes\n\t\t\tel.animate(animation1, speed, o.options.easing).animate(animation2, speed, o.options.easing);\n\t\t};\n\t\tel.animate(animation1, speed, o.options.easing).\n\t\tanimate(animation, speed / 2, o.options.easing, function(){ // Last shake\n\t\t\t$.effects.restore(el, props); $.effects.removeWrapper(el); // Restore\n\t\t\tif(o.callback) o.callback.apply(this, arguments); // Callback\n\t\t});\n\t\tel.queue('fx', function() { el.dequeue(); });\n\t\tel.dequeue();\n\t});\n\n};\n\n})(jQuery);\n\n(function( $, undefined ) {\n\n$.effects.slide = function(o) {\n\n\treturn this.queue(function() {\n\n\t\t// Create element\n\t\tvar el = $(this), props = ['position','top','bottom','left','right'];\n\n\t\t// Set options\n\t\tvar mode = $.effects.setMode(el, o.options.mode || 'show'); // Set Mode\n\t\tvar direction = o.options.direction || 'left'; // Default Direction\n\n\t\t// Adjust\n\t\t$.effects.save(el, props); el.show(); // Save & Show\n\t\t$.effects.createWrapper(el).css({overflow:'hidden'}); // Create Wrapper\n\t\tvar ref = (direction == 'up' || direction == 'down') ? 'top' : 'left';\n\t\tvar motion = (direction == 'up' || direction == 'left') ? 'pos' : 'neg';\n\t\tvar distance = o.options.distance || (ref == 'top' ? el.outerHeight({margin:true}) : el.outerWidth({margin:true}));\n\t\tif (mode == 'show') el.css(ref, motion == 'pos' ? (isNaN(distance) ? \"-\" + distance : -distance) : distance); // Shift\n\n\t\t// Animation\n\t\tvar animation = {};\n\t\tanimation[ref] = (mode == 'show' ? (motion == 'pos' ? '+=' : '-=') : (motion == 'pos' ? '-=' : '+=')) + distance;\n\n\t\t// Animate\n\t\tel.animate(animation, { queue: false, duration: o.duration, easing: o.options.easing, complete: function() {\n\t\t\tif(mode == 'hide') el.hide(); // Hide\n\t\t\t$.effects.restore(el, props); $.effects.removeWrapper(el); // Restore\n\t\t\tif(o.callback) o.callback.apply(this, arguments); // Callback\n\t\t\tel.dequeue();\n\t\t}});\n\n\t});\n\n};\n\n})(jQuery);\n\n(function( $, undefined ) {\n\n$.effects.transfer = function(o) {\n\treturn this.queue(function() {\n\t\tvar elem = $(this),\n\t\t\ttarget = $(o.options.to),\n\t\t\tendPosition = target.offset(),\n\t\t\tanimation = {\n\t\t\t\ttop: endPosition.top,\n\t\t\t\tleft: endPosition.left,\n\t\t\t\theight: target.innerHeight(),\n\t\t\t\twidth: target.innerWidth()\n\t\t\t},\n\t\t\tstartPosition = elem.offset(),\n\t\t\ttransfer = $('<div class=\"ui-effects-transfer\"></div>')\n\t\t\t\t.appendTo(document.body)\n\t\t\t\t.addClass(o.options.className)\n\t\t\t\t.css({\n\t\t\t\t\ttop: startPosition.top,\n\t\t\t\t\tleft: startPosition.left,\n\t\t\t\t\theight: elem.innerHeight(),\n\t\t\t\t\twidth: elem.innerWidth(),\n\t\t\t\t\tposition: 'absolute'\n\t\t\t\t})\n\t\t\t\t.animate(animation, o.duration, o.options.easing, function() {\n\t\t\t\t\ttransfer.remove();\n\t\t\t\t\t(o.callback && o.callback.apply(elem[0], arguments));\n\t\t\t\t\telem.dequeue();\n\t\t\t\t});\n\t});\n};\n\n})(jQuery);\n\n(function( $, undefined ) {\n\n$.widget( \"ui.accordion\", {\n\toptions: {\n\t\tactive: 0,\n\t\tanimated: \"slide\",\n\t\tautoHeight: true,\n\t\tclearStyle: false,\n\t\tcollapsible: false,\n\t\tevent: \"click\",\n\t\tfillSpace: false,\n\t\theader: \"> li > :first-child,> :not(li):even\",\n\t\ticons: {\n\t\t\theader: \"ui-icon-triangle-1-e\",\n\t\t\theaderSelected: \"ui-icon-triangle-1-s\"\n\t\t},\n\t\tnavigation: false,\n\t\tnavigationFilter: function() {\n\t\t\treturn this.href.toLowerCase() === location.href.toLowerCase();\n\t\t}\n\t},\n\n\t_create: function() {\n\t\tvar self = this,\n\t\t\toptions = self.options;\n\n\t\tself.running = 0;\n\n\t\tself.element\n\t\t\t.addClass( \"ui-accordion ui-widget ui-helper-reset\" )\n\t\t\t// in lack of child-selectors in CSS\n\t\t\t// we need to mark top-LIs in a UL-accordion for some IE-fix\n\t\t\t.children( \"li\" )\n\t\t\t\t.addClass( \"ui-accordion-li-fix\" );\n\n\t\tself.headers = self.element.find( options.header )\n\t\t\t.addClass( \"ui-accordion-header ui-helper-reset ui-state-default ui-corner-all\" )\n\t\t\t.bind( \"mouseenter.accordion\", function() {\n\t\t\t\tif ( options.disabled ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t$( this ).addClass( \"ui-state-hover\" );\n\t\t\t})\n\t\t\t.bind( \"mouseleave.accordion\", function() {\n\t\t\t\tif ( options.disabled ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t$( this ).removeClass( \"ui-state-hover\" );\n\t\t\t})\n\t\t\t.bind( \"focus.accordion\", function() {\n\t\t\t\tif ( options.disabled ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t$( this ).addClass( \"ui-state-focus\" );\n\t\t\t})\n\t\t\t.bind( \"blur.accordion\", function() {\n\t\t\t\tif ( options.disabled ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t$( this ).removeClass( \"ui-state-focus\" );\n\t\t\t});\n\n\t\tself.headers.next()\n\t\t\t.addClass( \"ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom\" );\n\n\t\tif ( options.navigation ) {\n\t\t\tvar current = self.element.find( \"a\" ).filter( options.navigationFilter ).eq( 0 );\n\t\t\tif ( current.length ) {\n\t\t\t\tvar header = current.closest( \".ui-accordion-header\" );\n\t\t\t\tif ( header.length ) {\n\t\t\t\t\t// anchor within header\n\t\t\t\t\tself.active = header;\n\t\t\t\t} else {\n\t\t\t\t\t// anchor within content\n\t\t\t\t\tself.active = current.closest( \".ui-accordion-content\" ).prev();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tself.active = self._findActive( self.active || options.active )\n\t\t\t.addClass( \"ui-state-default ui-state-active\" )\n\t\t\t.toggleClass( \"ui-corner-all\" )\n\t\t\t.toggleClass( \"ui-corner-top\" );\n\t\tself.active.next().addClass( \"ui-accordion-content-active\" );\n\n\t\tself._createIcons();\n\t\tself.resize();\n\t\t\n\t\t// ARIA\n\t\tself.element.attr( \"role\", \"tablist\" );\n\n\t\tself.headers\n\t\t\t.attr( \"role\", \"tab\" )\n\t\t\t.bind( \"keydown.accordion\", function( event ) {\n\t\t\t\treturn self._keydown( event );\n\t\t\t})\n\t\t\t.next()\n\t\t\t\t.attr( \"role\", \"tabpanel\" );\n\n\t\tself.headers\n\t\t\t.not( self.active || \"\" )\n\t\t\t.attr({\n\t\t\t\t\"aria-expanded\": \"false\",\n\t\t\t\t\"aria-selected\": \"false\",\n\t\t\t\ttabIndex: -1\n\t\t\t})\n\t\t\t.next()\n\t\t\t\t.hide();\n\n\t\t// make sure at least one header is in the tab order\n\t\tif ( !self.active.length ) {\n\t\t\tself.headers.eq( 0 ).attr( \"tabIndex\", 0 );\n\t\t} else {\n\t\t\tself.active\n\t\t\t\t.attr({\n\t\t\t\t\t\"aria-expanded\": \"true\",\n\t\t\t\t\t\"aria-selected\": \"true\",\n\t\t\t\t\ttabIndex: 0\n\t\t\t\t});\n\t\t}\n\n\t\t// only need links in tab order for Safari\n\t\tif ( !$.browser.safari ) {\n\t\t\tself.headers.find( \"a\" ).attr( \"tabIndex\", -1 );\n\t\t}\n\n\t\tif ( options.event ) {\n\t\t\tself.headers.bind( options.event.split(\" \").join(\".accordion \") + \".accordion\", function(event) {\n\t\t\t\tself._clickHandler.call( self, event, this );\n\t\t\t\tevent.preventDefault();\n\t\t\t});\n\t\t}\n\t},\n\n\t_createIcons: function() {\n\t\tvar options = this.options;\n\t\tif ( options.icons ) {\n\t\t\t$( \"<span></span>\" )\n\t\t\t\t.addClass( \"ui-icon \" + options.icons.header )\n\t\t\t\t.prependTo( this.headers );\n\t\t\tthis.active.children( \".ui-icon\" )\n\t\t\t\t.toggleClass(options.icons.header)\n\t\t\t\t.toggleClass(options.icons.headerSelected);\n\t\t\tthis.element.addClass( \"ui-accordion-icons\" );\n\t\t}\n\t},\n\n\t_destroyIcons: function() {\n\t\tthis.headers.children( \".ui-icon\" ).remove();\n\t\tthis.element.removeClass( \"ui-accordion-icons\" );\n\t},\n\n\tdestroy: function() {\n\t\tvar options = this.options;\n\n\t\tthis.element\n\t\t\t.removeClass( \"ui-accordion ui-widget ui-helper-reset\" )\n\t\t\t.removeAttr( \"role\" );\n\n\t\tthis.headers\n\t\t\t.unbind( \".accordion\" )\n\t\t\t.removeClass( \"ui-accordion-header ui-accordion-disabled ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top\" )\n\t\t\t.removeAttr( \"role\" )\n\t\t\t.removeAttr( \"aria-expanded\" )\n\t\t\t.removeAttr( \"aria-selected\" )\n\t\t\t.removeAttr( \"tabIndex\" );\n\n\t\tthis.headers.find( \"a\" ).removeAttr( \"tabIndex\" );\n\t\tthis._destroyIcons();\n\t\tvar contents = this.headers.next()\n\t\t\t.css( \"display\", \"\" )\n\t\t\t.removeAttr( \"role\" )\n\t\t\t.removeClass( \"ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-accordion-disabled ui-state-disabled\" );\n\t\tif ( options.autoHeight || options.fillHeight ) {\n\t\t\tcontents.css( \"height\", \"\" );\n\t\t}\n\n\t\treturn $.Widget.prototype.destroy.call( this );\n\t},\n\n\t_setOption: function( key, value ) {\n\t\t$.Widget.prototype._setOption.apply( this, arguments );\n\t\t\t\n\t\tif ( key == \"active\" ) {\n\t\t\tthis.activate( value );\n\t\t}\n\t\tif ( key == \"icons\" ) {\n\t\t\tthis._destroyIcons();\n\t\t\tif ( value ) {\n\t\t\t\tthis._createIcons();\n\t\t\t}\n\t\t}\n\t\t// #5332 - opacity doesn't cascade to positioned elements in IE\n\t\t// so we need to add the disabled class to the headers and panels\n\t\tif ( key == \"disabled\" ) {\n\t\t\tthis.headers.add(this.headers.next())\n\t\t\t\t[ value ? \"addClass\" : \"removeClass\" ](\n\t\t\t\t\t\"ui-accordion-disabled ui-state-disabled\" );\n\t\t}\n\t},\n\n\t_keydown: function( event ) {\n\t\tif ( this.options.disabled || event.altKey || event.ctrlKey ) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar keyCode = $.ui.keyCode,\n\t\t\tlength = this.headers.length,\n\t\t\tcurrentIndex = this.headers.index( event.target ),\n\t\t\ttoFocus = false;\n\n\t\tswitch ( event.keyCode ) {\n\t\t\tcase keyCode.RIGHT:\n\t\t\tcase keyCode.DOWN:\n\t\t\t\ttoFocus = this.headers[ ( currentIndex + 1 ) % length ];\n\t\t\t\tbreak;\n\t\t\tcase keyCode.LEFT:\n\t\t\tcase keyCode.UP:\n\t\t\t\ttoFocus = this.headers[ ( currentIndex - 1 + length ) % length ];\n\t\t\t\tbreak;\n\t\t\tcase keyCode.SPACE:\n\t\t\tcase keyCode.ENTER:\n\t\t\t\tthis._clickHandler( { target: event.target }, event.target );\n\t\t\t\tevent.preventDefault();\n\t\t}\n\n\t\tif ( toFocus ) {\n\t\t\t$( event.target ).attr( \"tabIndex\", -1 );\n\t\t\t$( toFocus ).attr( \"tabIndex\", 0 );\n\t\t\ttoFocus.focus();\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t},\n\n\tresize: function() {\n\t\tvar options = this.options,\n\t\t\tmaxHeight;\n\n\t\tif ( options.fillSpace ) {\n\t\t\tif ( $.browser.msie ) {\n\t\t\t\tvar defOverflow = this.element.parent().css( \"overflow\" );\n\t\t\t\tthis.element.parent().css( \"overflow\", \"hidden\");\n\t\t\t}\n\t\t\tmaxHeight = this.element.parent().height();\n\t\t\tif ($.browser.msie) {\n\t\t\t\tthis.element.parent().css( \"overflow\", defOverflow );\n\t\t\t}\n\n\t\t\tthis.headers.each(function() {\n\t\t\t\tmaxHeight -= $( this ).outerHeight( true );\n\t\t\t});\n\n\t\t\tthis.headers.next()\n\t\t\t\t.each(function() {\n\t\t\t\t\t$( this ).height( Math.max( 0, maxHeight -\n\t\t\t\t\t\t$( this ).innerHeight() + $( this ).height() ) );\n\t\t\t\t})\n\t\t\t\t.css( \"overflow\", \"auto\" );\n\t\t} else if ( options.autoHeight ) {\n\t\t\tmaxHeight = 0;\n\t\t\tthis.headers.next()\n\t\t\t\t.each(function() {\n\t\t\t\t\tmaxHeight = Math.max( maxHeight, $( this ).height( \"\" ).height() );\n\t\t\t\t})\n\t\t\t\t.height( maxHeight );\n\t\t}\n\n\t\treturn this;\n\t},\n\n\tactivate: function( index ) {\n\t\t// TODO this gets called on init, changing the option without an explicit call for that\n\t\tthis.options.active = index;\n\t\t// call clickHandler with custom event\n\t\tvar active = this._findActive( index )[ 0 ];\n\t\tthis._clickHandler( { target: active }, active );\n\n\t\treturn this;\n\t},\n\n\t_findActive: function( selector ) {\n\t\treturn selector\n\t\t\t? typeof selector === \"number\"\n\t\t\t\t? this.headers.filter( \":eq(\" + selector + \")\" )\n\t\t\t\t: this.headers.not( this.headers.not( selector ) )\n\t\t\t: selector === false\n\t\t\t\t? $( [] )\n\t\t\t\t: this.headers.filter( \":eq(0)\" );\n\t},\n\n\t// TODO isn't event.target enough? why the separate target argument?\n\t_clickHandler: function( event, target ) {\n\t\tvar options = this.options;\n\t\tif ( options.disabled ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// called only when using activate(false) to close all parts programmatically\n\t\tif ( !event.target ) {\n\t\t\tif ( !options.collapsible ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis.active\n\t\t\t\t.removeClass( \"ui-state-active ui-corner-top\" )\n\t\t\t\t.addClass( \"ui-state-default ui-corner-all\" )\n\t\t\t\t.children( \".ui-icon\" )\n\t\t\t\t\t.removeClass( options.icons.headerSelected )\n\t\t\t\t\t.addClass( options.icons.header );\n\t\t\tthis.active.next().addClass( \"ui-accordion-content-active\" );\n\t\t\tvar toHide = this.active.next(),\n\t\t\t\tdata = {\n\t\t\t\t\toptions: options,\n\t\t\t\t\tnewHeader: $( [] ),\n\t\t\t\t\toldHeader: options.active,\n\t\t\t\t\tnewContent: $( [] ),\n\t\t\t\t\toldContent: toHide\n\t\t\t\t},\n\t\t\t\ttoShow = ( this.active = $( [] ) );\n\t\t\tthis._toggle( toShow, toHide, data );\n\t\t\treturn;\n\t\t}\n\n\t\t// get the click target\n\t\tvar clicked = $( event.currentTarget || target ),\n\t\t\tclickedIsActive = clicked[0] === this.active[0];\n\n\t\t// TODO the option is changed, is that correct?\n\t\t// TODO if it is correct, shouldn't that happen after determining that the click is valid?\n\t\toptions.active = options.collapsible && clickedIsActive ?\n\t\t\tfalse :\n\t\t\tthis.headers.index( clicked );\n\n\t\t// if animations are still active, or the active header is the target, ignore click\n\t\tif ( this.running || ( !options.collapsible && clickedIsActive ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// find elements to show and hide\n\t\tvar active = this.active,\n\t\t\ttoShow = clicked.next(),\n\t\t\ttoHide = this.active.next(),\n\t\t\tdata = {\n\t\t\t\toptions: options,\n\t\t\t\tnewHeader: clickedIsActive && options.collapsible ? $([]) : clicked,\n\t\t\t\toldHeader: this.active,\n\t\t\t\tnewContent: clickedIsActive && options.collapsible ? $([]) : toShow,\n\t\t\t\toldContent: toHide\n\t\t\t},\n\t\t\tdown = this.headers.index( this.active[0] ) > this.headers.index( clicked[0] );\n\n\t\t// when the call to ._toggle() comes after the class changes\n\t\t// it causes a very odd bug in IE 8 (see #6720)\n\t\tthis.active = clickedIsActive ? $([]) : clicked;\n\t\tthis._toggle( toShow, toHide, data, clickedIsActive, down );\n\n\t\t// switch classes\n\t\tactive\n\t\t\t.removeClass( \"ui-state-active ui-corner-top\" )\n\t\t\t.addClass( \"ui-state-default ui-corner-all\" )\n\t\t\t.children( \".ui-icon\" )\n\t\t\t\t.removeClass( options.icons.headerSelected )\n\t\t\t\t.addClass( options.icons.header );\n\t\tif ( !clickedIsActive ) {\n\t\t\tclicked\n\t\t\t\t.removeClass( \"ui-state-default ui-corner-all\" )\n\t\t\t\t.addClass( \"ui-state-active ui-corner-top\" )\n\t\t\t\t.children( \".ui-icon\" )\n\t\t\t\t\t.removeClass( options.icons.header )\n\t\t\t\t\t.addClass( options.icons.headerSelected );\n\t\t\tclicked\n\t\t\t\t.next()\n\t\t\t\t.addClass( \"ui-accordion-content-active\" );\n\t\t}\n\n\t\treturn;\n\t},\n\n\t_toggle: function( toShow, toHide, data, clickedIsActive, down ) {\n\t\tvar self = this,\n\t\t\toptions = self.options;\n\n\t\tself.toShow = toShow;\n\t\tself.toHide = toHide;\n\t\tself.data = data;\n\n\t\tvar complete = function() {\n\t\t\tif ( !self ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\treturn self._completed.apply( self, arguments );\n\t\t};\n\n\t\t// trigger changestart event\n\t\tself._trigger( \"changestart\", null, self.data );\n\n\t\t// count elements to animate\n\t\tself.running = toHide.size() === 0 ? toShow.size() : toHide.size();\n\n\t\tif ( options.animated ) {\n\t\t\tvar animOptions = {};\n\n\t\t\tif ( options.collapsible && clickedIsActive ) {\n\t\t\t\tanimOptions = {\n\t\t\t\t\ttoShow: $( [] ),\n\t\t\t\t\ttoHide: toHide,\n\t\t\t\t\tcomplete: complete,\n\t\t\t\t\tdown: down,\n\t\t\t\t\tautoHeight: options.autoHeight || options.fillSpace\n\t\t\t\t};\n\t\t\t} else {\n\t\t\t\tanimOptions = {\n\t\t\t\t\ttoShow: toShow,\n\t\t\t\t\ttoHide: toHide,\n\t\t\t\t\tcomplete: complete,\n\t\t\t\t\tdown: down,\n\t\t\t\t\tautoHeight: options.autoHeight || options.fillSpace\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tif ( !options.proxied ) {\n\t\t\t\toptions.proxied = options.animated;\n\t\t\t}\n\n\t\t\tif ( !options.proxiedDuration ) {\n\t\t\t\toptions.proxiedDuration = options.duration;\n\t\t\t}\n\n\t\t\toptions.animated = $.isFunction( options.proxied ) ?\n\t\t\t\toptions.proxied( animOptions ) :\n\t\t\t\toptions.proxied;\n\n\t\t\toptions.duration = $.isFunction( options.proxiedDuration ) ?\n\t\t\t\toptions.proxiedDuration( animOptions ) :\n\t\t\t\toptions.proxiedDuration;\n\n\t\t\tvar animations = $.ui.accordion.animations,\n\t\t\t\tduration = options.duration,\n\t\t\t\teasing = options.animated;\n\n\t\t\tif ( easing && !animations[ easing ] && !$.easing[ easing ] ) {\n\t\t\t\teasing = \"slide\";\n\t\t\t}\n\t\t\tif ( !animations[ easing ] ) {\n\t\t\t\tanimations[ easing ] = function( options ) {\n\t\t\t\t\tthis.slide( options, {\n\t\t\t\t\t\teasing: easing,\n\t\t\t\t\t\tduration: duration || 700\n\t\t\t\t\t});\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tanimations[ easing ]( animOptions );\n\t\t} else {\n\t\t\tif ( options.collapsible && clickedIsActive ) {\n\t\t\t\ttoShow.toggle();\n\t\t\t} else {\n\t\t\t\ttoHide.hide();\n\t\t\t\ttoShow.show();\n\t\t\t}\n\n\t\t\tcomplete( true );\n\t\t}\n\n\t\t// TODO assert that the blur and focus triggers are really necessary, remove otherwise\n\t\ttoHide.prev()\n\t\t\t.attr({\n\t\t\t\t\"aria-expanded\": \"false\",\n\t\t\t\t\"aria-selected\": \"false\",\n\t\t\t\ttabIndex: -1\n\t\t\t})\n\t\t\t.blur();\n\t\ttoShow.prev()\n\t\t\t.attr({\n\t\t\t\t\"aria-expanded\": \"true\",\n\t\t\t\t\"aria-selected\": \"true\",\n\t\t\t\ttabIndex: 0\n\t\t\t})\n\t\t\t.focus();\n\t},\n\n\t_completed: function( cancel ) {\n\t\tthis.running = cancel ? 0 : --this.running;\n\t\tif ( this.running ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( this.options.clearStyle ) {\n\t\t\tthis.toShow.add( this.toHide ).css({\n\t\t\t\theight: \"\",\n\t\t\t\toverflow: \"\"\n\t\t\t});\n\t\t}\n\n\t\t// other classes are removed before the animation; this one needs to stay until completed\n\t\tthis.toHide.removeClass( \"ui-accordion-content-active\" );\n\t\t// Work around for rendering bug in IE (#5421)\n\t\tif ( this.toHide.length ) {\n\t\t\tthis.toHide.parent()[0].className = this.toHide.parent()[0].className;\n\t\t}\n\n\t\tthis._trigger( \"change\", null, this.data );\n\t}\n});\n\n$.extend( $.ui.accordion, {\n\tversion: \"1.8.20\",\n\tanimations: {\n\t\tslide: function( options, additions ) {\n\t\t\toptions = $.extend({\n\t\t\t\teasing: \"swing\",\n\t\t\t\tduration: 300\n\t\t\t}, options, additions );\n\t\t\tif ( !options.toHide.size() ) {\n\t\t\t\toptions.toShow.animate({\n\t\t\t\t\theight: \"show\",\n\t\t\t\t\tpaddingTop: \"show\",\n\t\t\t\t\tpaddingBottom: \"show\"\n\t\t\t\t}, options );\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif ( !options.toShow.size() ) {\n\t\t\t\toptions.toHide.animate({\n\t\t\t\t\theight: \"hide\",\n\t\t\t\t\tpaddingTop: \"hide\",\n\t\t\t\t\tpaddingBottom: \"hide\"\n\t\t\t\t}, options );\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tvar overflow = options.toShow.css( \"overflow\" ),\n\t\t\t\tpercentDone = 0,\n\t\t\t\tshowProps = {},\n\t\t\t\thideProps = {},\n\t\t\t\tfxAttrs = [ \"height\", \"paddingTop\", \"paddingBottom\" ],\n\t\t\t\toriginalWidth;\n\t\t\t// fix width before calculating height of hidden element\n\t\t\tvar s = options.toShow;\n\t\t\toriginalWidth = s[0].style.width;\n\t\t\ts.width( s.parent().width()\n\t\t\t\t- parseFloat( s.css( \"paddingLeft\" ) )\n\t\t\t\t- parseFloat( s.css( \"paddingRight\" ) )\n\t\t\t\t- ( parseFloat( s.css( \"borderLeftWidth\" ) ) || 0 )\n\t\t\t\t- ( parseFloat( s.css( \"borderRightWidth\" ) ) || 0 ) );\n\n\t\t\t$.each( fxAttrs, function( i, prop ) {\n\t\t\t\thideProps[ prop ] = \"hide\";\n\n\t\t\t\tvar parts = ( \"\" + $.css( options.toShow[0], prop ) ).match( /^([\\d+-.]+)(.*)$/ );\n\t\t\t\tshowProps[ prop ] = {\n\t\t\t\t\tvalue: parts[ 1 ],\n\t\t\t\t\tunit: parts[ 2 ] || \"px\"\n\t\t\t\t};\n\t\t\t});\n\t\t\toptions.toShow.css({ height: 0, overflow: \"hidden\" }).show();\n\t\t\toptions.toHide\n\t\t\t\t.filter( \":hidden\" )\n\t\t\t\t\t.each( options.complete )\n\t\t\t\t.end()\n\t\t\t\t.filter( \":visible\" )\n\t\t\t\t.animate( hideProps, {\n\t\t\t\tstep: function( now, settings ) {\n\t\t\t\t\t// only calculate the percent when animating height\n\t\t\t\t\t// IE gets very inconsistent results when animating elements\n\t\t\t\t\t// with small values, which is common for padding\n\t\t\t\t\tif ( settings.prop == \"height\" ) {\n\t\t\t\t\t\tpercentDone = ( settings.end - settings.start === 0 ) ? 0 :\n\t\t\t\t\t\t\t( settings.now - settings.start ) / ( settings.end - settings.start );\n\t\t\t\t\t}\n\n\t\t\t\t\toptions.toShow[ 0 ].style[ settings.prop ] =\n\t\t\t\t\t\t( percentDone * showProps[ settings.prop ].value )\n\t\t\t\t\t\t+ showProps[ settings.prop ].unit;\n\t\t\t\t},\n\t\t\t\tduration: options.duration,\n\t\t\t\teasing: options.easing,\n\t\t\t\tcomplete: function() {\n\t\t\t\t\tif ( !options.autoHeight ) {\n\t\t\t\t\t\toptions.toShow.css( \"height\", \"\" );\n\t\t\t\t\t}\n\t\t\t\t\toptions.toShow.css({\n\t\t\t\t\t\twidth: originalWidth,\n\t\t\t\t\t\toverflow: overflow\n\t\t\t\t\t});\n\t\t\t\t\toptions.complete();\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\t\tbounceslide: function( options ) {\n\t\t\tthis.slide( options, {\n\t\t\t\teasing: options.down ? \"easeOutBounce\" : \"swing\",\n\t\t\t\tduration: options.down ? 1000 : 200\n\t\t\t});\n\t\t}\n\t}\n});\n\n})( jQuery );\n\n(function( $, undefined ) {\n\n// used to prevent race conditions with remote data sources\nvar requestIndex = 0;\n\n$.widget( \"ui.autocomplete\", {\n\toptions: {\n\t\tappendTo: \"body\",\n\t\tautoFocus: false,\n\t\tdelay: 300,\n\t\tminLength: 1,\n\t\tposition: {\n\t\t\tmy: \"left top\",\n\t\t\tat: \"left bottom\",\n\t\t\tcollision: \"none\"\n\t\t},\n\t\tsource: null\n\t},\n\n\tpending: 0,\n\n\t_create: function() {\n\t\tvar self = this,\n\t\t\tdoc = this.element[ 0 ].ownerDocument,\n\t\t\tsuppressKeyPress;\n\t\tthis.isMultiLine = this.element.is( \"textarea\" );\n\n\t\tthis.element\n\t\t\t.addClass( \"ui-autocomplete-input\" )\n\t\t\t.attr( \"autocomplete\", \"off\" )\n\t\t\t// TODO verify these actually work as intended\n\t\t\t.attr({\n\t\t\t\trole: \"textbox\",\n\t\t\t\t\"aria-autocomplete\": \"list\",\n\t\t\t\t\"aria-haspopup\": \"true\"\n\t\t\t})\n\t\t\t.bind( \"keydown.autocomplete\", function( event ) {\n\t\t\t\tif ( self.options.disabled || self.element.propAttr( \"readOnly\" ) ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tsuppressKeyPress = false;\n\t\t\t\tvar keyCode = $.ui.keyCode;\n\t\t\t\tswitch( event.keyCode ) {\n\t\t\t\tcase keyCode.PAGE_UP:\n\t\t\t\t\tself._move( \"previousPage\", event );\n\t\t\t\t\tbreak;\n\t\t\t\tcase keyCode.PAGE_DOWN:\n\t\t\t\t\tself._move( \"nextPage\", event );\n\t\t\t\t\tbreak;\n\t\t\t\tcase keyCode.UP:\n\t\t\t\t\tself._keyEvent( \"previous\", event );\n\t\t\t\t\tbreak;\n\t\t\t\tcase keyCode.DOWN:\n\t\t\t\t\tself._keyEvent( \"next\", event );\n\t\t\t\t\tbreak;\n\t\t\t\tcase keyCode.ENTER:\n\t\t\t\tcase keyCode.NUMPAD_ENTER:\n\t\t\t\t\t// when menu is open and has focus\n\t\t\t\t\tif ( self.menu.active ) {\n\t\t\t\t\t\t// #6055 - Opera still allows the keypress to occur\n\t\t\t\t\t\t// which causes forms to submit\n\t\t\t\t\t\tsuppressKeyPress = true;\n\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t}\n\t\t\t\t\t//passthrough - ENTER and TAB both select the current element\n\t\t\t\tcase keyCode.TAB:\n\t\t\t\t\tif ( !self.menu.active ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tself.menu.select( event );\n\t\t\t\t\tbreak;\n\t\t\t\tcase keyCode.ESCAPE:\n\t\t\t\t\tself.element.val( self.term );\n\t\t\t\t\tself.close( event );\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t// keypress is triggered before the input value is changed\n\t\t\t\t\tclearTimeout( self.searching );\n\t\t\t\t\tself.searching = setTimeout(function() {\n\t\t\t\t\t\t// only search if the value has changed\n\t\t\t\t\t\tif ( self.term != self.element.val() ) {\n\t\t\t\t\t\t\tself.selectedItem = null;\n\t\t\t\t\t\t\tself.search( null, event );\n\t\t\t\t\t\t}\n\t\t\t\t\t}, self.options.delay );\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t})\n\t\t\t.bind( \"keypress.autocomplete\", function( event ) {\n\t\t\t\tif ( suppressKeyPress ) {\n\t\t\t\t\tsuppressKeyPress = false;\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t}\n\t\t\t})\n\t\t\t.bind( \"focus.autocomplete\", function() {\n\t\t\t\tif ( self.options.disabled ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tself.selectedItem = null;\n\t\t\t\tself.previous = self.element.val();\n\t\t\t})\n\t\t\t.bind( \"blur.autocomplete\", function( event ) {\n\t\t\t\tif ( self.options.disabled ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tclearTimeout( self.searching );\n\t\t\t\t// clicks on the menu (or a button to trigger a search) will cause a blur event\n\t\t\t\tself.closing = setTimeout(function() {\n\t\t\t\t\tself.close( event );\n\t\t\t\t\tself._change( event );\n\t\t\t\t}, 150 );\n\t\t\t});\n\t\tthis._initSource();\n\t\tthis.menu = $( \"<ul></ul>\" )\n\t\t\t.addClass( \"ui-autocomplete\" )\n\t\t\t.appendTo( $( this.options.appendTo || \"body\", doc )[0] )\n\t\t\t// prevent the close-on-blur in case of a \"slow\" click on the menu (long mousedown)\n\t\t\t.mousedown(function( event ) {\n\t\t\t\t// clicking on the scrollbar causes focus to shift to the body\n\t\t\t\t// but we can't detect a mouseup or a click immediately afterward\n\t\t\t\t// so we have to track the next mousedown and close the menu if\n\t\t\t\t// the user clicks somewhere outside of the autocomplete\n\t\t\t\tvar menuElement = self.menu.element[ 0 ];\n\t\t\t\tif ( !$( event.target ).closest( \".ui-menu-item\" ).length ) {\n\t\t\t\t\tsetTimeout(function() {\n\t\t\t\t\t\t$( document ).one( 'mousedown', function( event ) {\n\t\t\t\t\t\t\tif ( event.target !== self.element[ 0 ] &&\n\t\t\t\t\t\t\t\tevent.target !== menuElement &&\n\t\t\t\t\t\t\t\t!$.ui.contains( menuElement, event.target ) ) {\n\t\t\t\t\t\t\t\tself.close();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t}, 1 );\n\t\t\t\t}\n\n\t\t\t\t// use another timeout to make sure the blur-event-handler on the input was already triggered\n\t\t\t\tsetTimeout(function() {\n\t\t\t\t\tclearTimeout( self.closing );\n\t\t\t\t}, 13);\n\t\t\t})\n\t\t\t.menu({\n\t\t\t\tfocus: function( event, ui ) {\n\t\t\t\t\tvar item = ui.item.data( \"item.autocomplete\" );\n\t\t\t\t\tif ( false !== self._trigger( \"focus\", event, { item: item } ) ) {\n\t\t\t\t\t\t// use value to match what will end up in the input, if it was a key event\n\t\t\t\t\t\tif ( /^key/.test(event.originalEvent.type) ) {\n\t\t\t\t\t\t\tself.element.val( item.value );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tselected: function( event, ui ) {\n\t\t\t\t\tvar item = ui.item.data( \"item.autocomplete\" ),\n\t\t\t\t\t\tprevious = self.previous;\n\n\t\t\t\t\t// only trigger when focus was lost (click on menu)\n\t\t\t\t\tif ( self.element[0] !== doc.activeElement ) {\n\t\t\t\t\t\tself.element.focus();\n\t\t\t\t\t\tself.previous = previous;\n\t\t\t\t\t\t// #6109 - IE triggers two focus events and the second\n\t\t\t\t\t\t// is asynchronous, so we need to reset the previous\n\t\t\t\t\t\t// term synchronously and asynchronously :-(\n\t\t\t\t\t\tsetTimeout(function() {\n\t\t\t\t\t\t\tself.previous = previous;\n\t\t\t\t\t\t\tself.selectedItem = item;\n\t\t\t\t\t\t}, 1);\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( false !== self._trigger( \"select\", event, { item: item } ) ) {\n\t\t\t\t\t\tself.element.val( item.value );\n\t\t\t\t\t}\n\t\t\t\t\t// reset the term after the select event\n\t\t\t\t\t// this allows custom select handling to work properly\n\t\t\t\t\tself.term = self.element.val();\n\n\t\t\t\t\tself.close( event );\n\t\t\t\t\tself.selectedItem = item;\n\t\t\t\t},\n\t\t\t\tblur: function( event, ui ) {\n\t\t\t\t\t// don't set the value of the text field if it's already correct\n\t\t\t\t\t// this prevents moving the cursor unnecessarily\n\t\t\t\t\tif ( self.menu.element.is(\":visible\") &&\n\t\t\t\t\t\t( self.element.val() !== self.term ) ) {\n\t\t\t\t\t\tself.element.val( self.term );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\t\t\t.zIndex( this.element.zIndex() + 1 )\n\t\t\t// workaround for jQuery bug #5781 http://dev.jquery.com/ticket/5781\n\t\t\t.css({ top: 0, left: 0 })\n\t\t\t.hide()\n\t\t\t.data( \"menu\" );\n\t\tif ( $.fn.bgiframe ) {\n\t\t\t this.menu.element.bgiframe();\n\t\t}\n\t\t// turning off autocomplete prevents the browser from remembering the\n\t\t// value when navigating through history, so we re-enable autocomplete\n\t\t// if the page is unloaded before the widget is destroyed. #7790\n\t\tself.beforeunloadHandler = function() {\n\t\t\tself.element.removeAttr( \"autocomplete\" );\n\t\t};\n\t\t$( window ).bind( \"beforeunload\", self.beforeunloadHandler );\n\t},\n\n\tdestroy: function() {\n\t\tthis.element\n\t\t\t.removeClass( \"ui-autocomplete-input\" )\n\t\t\t.removeAttr( \"autocomplete\" )\n\t\t\t.removeAttr( \"role\" )\n\t\t\t.removeAttr( \"aria-autocomplete\" )\n\t\t\t.removeAttr( \"aria-haspopup\" );\n\t\tthis.menu.element.remove();\n\t\t$( window ).unbind( \"beforeunload\", this.beforeunloadHandler );\n\t\t$.Widget.prototype.destroy.call( this );\n\t},\n\n\t_setOption: function( key, value ) {\n\t\t$.Widget.prototype._setOption.apply( this, arguments );\n\t\tif ( key === \"source\" ) {\n\t\t\tthis._initSource();\n\t\t}\n\t\tif ( key === \"appendTo\" ) {\n\t\t\tthis.menu.element.appendTo( $( value || \"body\", this.element[0].ownerDocument )[0] )\n\t\t}\n\t\tif ( key === \"disabled\" && value && this.xhr ) {\n\t\t\tthis.xhr.abort();\n\t\t}\n\t},\n\n\t_initSource: function() {\n\t\tvar self = this,\n\t\t\tarray,\n\t\t\turl;\n\t\tif ( $.isArray(this.options.source) ) {\n\t\t\tarray = this.options.source;\n\t\t\tthis.source = function( request, response ) {\n\t\t\t\tresponse( $.ui.autocomplete.filter(array, request.term) );\n\t\t\t};\n\t\t} else if ( typeof this.options.source === \"string\" ) {\n\t\t\turl = this.options.source;\n\t\t\tthis.source = function( request, response ) {\n\t\t\t\tif ( self.xhr ) {\n\t\t\t\t\tself.xhr.abort();\n\t\t\t\t}\n\t\t\t\tself.xhr = $.ajax({\n\t\t\t\t\turl: url,\n\t\t\t\t\tdata: request,\n\t\t\t\t\tdataType: \"json\",\n\t\t\t\t\tsuccess: function( data, status ) {\n\t\t\t\t\t\tresponse( data );\n\t\t\t\t\t},\n\t\t\t\t\terror: function() {\n\t\t\t\t\t\tresponse( [] );\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t};\n\t\t} else {\n\t\t\tthis.source = this.options.source;\n\t\t}\n\t},\n\n\tsearch: function( value, event ) {\n\t\tvalue = value != null ? value : this.element.val();\n\n\t\t// always save the actual value, not the one passed as an argument\n\t\tthis.term = this.element.val();\n\n\t\tif ( value.length < this.options.minLength ) {\n\t\t\treturn this.close( event );\n\t\t}\n\n\t\tclearTimeout( this.closing );\n\t\tif ( this._trigger( \"search\", event ) === false ) {\n\t\t\treturn;\n\t\t}\n\n\t\treturn this._search( value );\n\t},\n\n\t_search: function( value ) {\n\t\tthis.pending++;\n\t\tthis.element.addClass( \"ui-autocomplete-loading\" );\n\n\t\tthis.source( { term: value }, this._response() );\n\t},\n\n\t_response: function() {\n\t\tvar that = this,\n\t\t\tindex = ++requestIndex;\n\n\t\treturn function( content ) {\n\t\t\tif ( index === requestIndex ) {\n\t\t\t\tthat.__response( content );\n\t\t\t}\n\n\t\t\tthat.pending--;\n\t\t\tif ( !that.pending ) {\n\t\t\t\tthat.element.removeClass( \"ui-autocomplete-loading\" );\n\t\t\t}\n\t\t};\n\t},\n\n\t__response: function( content ) {\n\t\tif ( !this.options.disabled && content && content.length ) {\n\t\t\tcontent = this._normalize( content );\n\t\t\tthis._suggest( content );\n\t\t\tthis._trigger( \"open\" );\n\t\t} else {\n\t\t\tthis.close();\n\t\t}\n\t},\n\n\tclose: function( event ) {\n\t\tclearTimeout( this.closing );\n\t\tif ( this.menu.element.is(\":visible\") ) {\n\t\t\tthis.menu.element.hide();\n\t\t\tthis.menu.deactivate();\n\t\t\tthis._trigger( \"close\", event );\n\t\t}\n\t},\n\t\n\t_change: function( event ) {\n\t\tif ( this.previous !== this.element.val() ) {\n\t\t\tthis._trigger( \"change\", event, { item: this.selectedItem } );\n\t\t}\n\t},\n\n\t_normalize: function( items ) {\n\t\t// assume all items have the right format when the first item is complete\n\t\tif ( items.length && items[0].label && items[0].value ) {\n\t\t\treturn items;\n\t\t}\n\t\treturn $.map( items, function(item) {\n\t\t\tif ( typeof item === \"string\" ) {\n\t\t\t\treturn {\n\t\t\t\t\tlabel: item,\n\t\t\t\t\tvalue: item\n\t\t\t\t};\n\t\t\t}\n\t\t\treturn $.extend({\n\t\t\t\tlabel: item.label || item.value,\n\t\t\t\tvalue: item.value || item.label\n\t\t\t}, item );\n\t\t});\n\t},\n\n\t_suggest: function( items ) {\n\t\tvar ul = this.menu.element\n\t\t\t.empty()\n\t\t\t.zIndex( this.element.zIndex() + 1 );\n\t\tthis._renderMenu( ul, items );\n\t\t// TODO refresh should check if the active item is still in the dom, removing the need for a manual deactivate\n\t\tthis.menu.deactivate();\n\t\tthis.menu.refresh();\n\n\t\t// size and position menu\n\t\tul.show();\n\t\tthis._resizeMenu();\n\t\tul.position( $.extend({\n\t\t\tof: this.element\n\t\t}, this.options.position ));\n\n\t\tif ( this.options.autoFocus ) {\n\t\t\tthis.menu.next( new $.Event(\"mouseover\") );\n\t\t}\n\t},\n\n\t_resizeMenu: function() {\n\t\tvar ul = this.menu.element;\n\t\tul.outerWidth( Math.max(\n\t\t\t// Firefox wraps long text (possibly a rounding bug)\n\t\t\t// so we add 1px to avoid the wrapping (#7513)\n\t\t\tul.width( \"\" ).outerWidth() + 1,\n\t\t\tthis.element.outerWidth()\n\t\t) );\n\t},\n\n\t_renderMenu: function( ul, items ) {\n\t\tvar self = this;\n\t\t$.each( items, function( index, item ) {\n\t\t\tself._renderItem( ul, item );\n\t\t});\n\t},\n\n\t_renderItem: function( ul, item) {\n\t\treturn $( \"<li></li>\" )\n\t\t\t.data( \"item.autocomplete\", item )\n\t\t\t.append( $( \"<a></a>\" ).text( item.label ) )\n\t\t\t.appendTo( ul );\n\t},\n\n\t_move: function( direction, event ) {\n\t\tif ( !this.menu.element.is(\":visible\") ) {\n\t\t\tthis.search( null, event );\n\t\t\treturn;\n\t\t}\n\t\tif ( this.menu.first() && /^previous/.test(direction) ||\n\t\t\t\tthis.menu.last() && /^next/.test(direction) ) {\n\t\t\tthis.element.val( this.term );\n\t\t\tthis.menu.deactivate();\n\t\t\treturn;\n\t\t}\n\t\tthis.menu[ direction ]( event );\n\t},\n\n\twidget: function() {\n\t\treturn this.menu.element;\n\t},\n\t_keyEvent: function( keyEvent, event ) {\n\t\tif ( !this.isMultiLine || this.menu.element.is( \":visible\" ) ) {\n\t\t\tthis._move( keyEvent, event );\n\n\t\t\t// prevents moving cursor to beginning/end of the text field in some browsers\n\t\t\tevent.preventDefault();\n\t\t}\n\t}\n});\n\n$.extend( $.ui.autocomplete, {\n\tescapeRegex: function( value ) {\n\t\treturn value.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, \"\\\\$&\");\n\t},\n\tfilter: function(array, term) {\n\t\tvar matcher = new RegExp( $.ui.autocomplete.escapeRegex(term), \"i\" );\n\t\treturn $.grep( array, function(value) {\n\t\t\treturn matcher.test( value.label || value.value || value );\n\t\t});\n\t}\n});\n\n}( jQuery ));\n\n/*\n * jQuery UI Menu (not officially released)\n * \n * This widget isn't yet finished and the API is subject to change. We plan to finish\n * it for the next release. You're welcome to give it a try anyway and give us feedback,\n * as long as you're okay with migrating your code later on. We can help with that, too.\n *\n * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)\n * Dual licensed under the MIT or GPL Version 2 licenses.\n * http://jquery.org/license\n *\n * http://docs.jquery.com/UI/Menu\n *\n * Depends:\n *\tjquery.ui.core.js\n *  jquery.ui.widget.js\n */\n(function($) {\n\n$.widget(\"ui.menu\", {\n\t_create: function() {\n\t\tvar self = this;\n\t\tthis.element\n\t\t\t.addClass(\"ui-menu ui-widget ui-widget-content ui-corner-all\")\n\t\t\t.attr({\n\t\t\t\trole: \"listbox\",\n\t\t\t\t\"aria-activedescendant\": \"ui-active-menuitem\"\n\t\t\t})\n\t\t\t.click(function( event ) {\n\t\t\t\tif ( !$( event.target ).closest( \".ui-menu-item a\" ).length ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t// temporary\n\t\t\t\tevent.preventDefault();\n\t\t\t\tself.select( event );\n\t\t\t});\n\t\tthis.refresh();\n\t},\n\t\n\trefresh: function() {\n\t\tvar self = this;\n\n\t\t// don't refresh list items that are already adapted\n\t\tvar items = this.element.children(\"li:not(.ui-menu-item):has(a)\")\n\t\t\t.addClass(\"ui-menu-item\")\n\t\t\t.attr(\"role\", \"menuitem\");\n\t\t\n\t\titems.children(\"a\")\n\t\t\t.addClass(\"ui-corner-all\")\n\t\t\t.attr(\"tabindex\", -1)\n\t\t\t// mouseenter doesn't work with event delegation\n\t\t\t.mouseenter(function( event ) {\n\t\t\t\tself.activate( event, $(this).parent() );\n\t\t\t})\n\t\t\t.mouseleave(function() {\n\t\t\t\tself.deactivate();\n\t\t\t});\n\t},\n\n\tactivate: function( event, item ) {\n\t\tthis.deactivate();\n\t\tif (this.hasScroll()) {\n\t\t\tvar offset = item.offset().top - this.element.offset().top,\n\t\t\t\tscroll = this.element.scrollTop(),\n\t\t\t\telementHeight = this.element.height();\n\t\t\tif (offset < 0) {\n\t\t\t\tthis.element.scrollTop( scroll + offset);\n\t\t\t} else if (offset >= elementHeight) {\n\t\t\t\tthis.element.scrollTop( scroll + offset - elementHeight + item.height());\n\t\t\t}\n\t\t}\n\t\tthis.active = item.eq(0)\n\t\t\t.children(\"a\")\n\t\t\t\t.addClass(\"ui-state-hover\")\n\t\t\t\t.attr(\"id\", \"ui-active-menuitem\")\n\t\t\t.end();\n\t\tthis._trigger(\"focus\", event, { item: item });\n\t},\n\n\tdeactivate: function() {\n\t\tif (!this.active) { return; }\n\n\t\tthis.active.children(\"a\")\n\t\t\t.removeClass(\"ui-state-hover\")\n\t\t\t.removeAttr(\"id\");\n\t\tthis._trigger(\"blur\");\n\t\tthis.active = null;\n\t},\n\n\tnext: function(event) {\n\t\tthis.move(\"next\", \".ui-menu-item:first\", event);\n\t},\n\n\tprevious: function(event) {\n\t\tthis.move(\"prev\", \".ui-menu-item:last\", event);\n\t},\n\n\tfirst: function() {\n\t\treturn this.active && !this.active.prevAll(\".ui-menu-item\").length;\n\t},\n\n\tlast: function() {\n\t\treturn this.active && !this.active.nextAll(\".ui-menu-item\").length;\n\t},\n\n\tmove: function(direction, edge, event) {\n\t\tif (!this.active) {\n\t\t\tthis.activate(event, this.element.children(edge));\n\t\t\treturn;\n\t\t}\n\t\tvar next = this.active[direction + \"All\"](\".ui-menu-item\").eq(0);\n\t\tif (next.length) {\n\t\t\tthis.activate(event, next);\n\t\t} else {\n\t\t\tthis.activate(event, this.element.children(edge));\n\t\t}\n\t},\n\n\t// TODO merge with previousPage\n\tnextPage: function(event) {\n\t\tif (this.hasScroll()) {\n\t\t\t// TODO merge with no-scroll-else\n\t\t\tif (!this.active || this.last()) {\n\t\t\t\tthis.activate(event, this.element.children(\".ui-menu-item:first\"));\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tvar base = this.active.offset().top,\n\t\t\t\theight = this.element.height(),\n\t\t\t\tresult = this.element.children(\".ui-menu-item\").filter(function() {\n\t\t\t\t\tvar close = $(this).offset().top - base - height + $(this).height();\n\t\t\t\t\t// TODO improve approximation\n\t\t\t\t\treturn close < 10 && close > -10;\n\t\t\t\t});\n\n\t\t\t// TODO try to catch this earlier when scrollTop indicates the last page anyway\n\t\t\tif (!result.length) {\n\t\t\t\tresult = this.element.children(\".ui-menu-item:last\");\n\t\t\t}\n\t\t\tthis.activate(event, result);\n\t\t} else {\n\t\t\tthis.activate(event, this.element.children(\".ui-menu-item\")\n\t\t\t\t.filter(!this.active || this.last() ? \":first\" : \":last\"));\n\t\t}\n\t},\n\n\t// TODO merge with nextPage\n\tpreviousPage: function(event) {\n\t\tif (this.hasScroll()) {\n\t\t\t// TODO merge with no-scroll-else\n\t\t\tif (!this.active || this.first()) {\n\t\t\t\tthis.activate(event, this.element.children(\".ui-menu-item:last\"));\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar base = this.active.offset().top,\n\t\t\t\theight = this.element.height(),\n\t\t\t\tresult = this.element.children(\".ui-menu-item\").filter(function() {\n\t\t\t\t\tvar close = $(this).offset().top - base + height - $(this).height();\n\t\t\t\t\t// TODO improve approximation\n\t\t\t\t\treturn close < 10 && close > -10;\n\t\t\t\t});\n\n\t\t\t// TODO try to catch this earlier when scrollTop indicates the last page anyway\n\t\t\tif (!result.length) {\n\t\t\t\tresult = this.element.children(\".ui-menu-item:first\");\n\t\t\t}\n\t\t\tthis.activate(event, result);\n\t\t} else {\n\t\t\tthis.activate(event, this.element.children(\".ui-menu-item\")\n\t\t\t\t.filter(!this.active || this.first() ? \":last\" : \":first\"));\n\t\t}\n\t},\n\n\thasScroll: function() {\n\t\treturn this.element.height() < this.element[ $.fn.prop ? \"prop\" : \"attr\" ](\"scrollHeight\");\n\t},\n\n\tselect: function( event ) {\n\t\tthis._trigger(\"selected\", event, { item: this.active });\n\t}\n});\n\n}(jQuery));\n\n(function( $, undefined ) {\n\nvar lastActive, startXPos, startYPos, clickDragged,\n\tbaseClasses = \"ui-button ui-widget ui-state-default ui-corner-all\",\n\tstateClasses = \"ui-state-hover ui-state-active \",\n\ttypeClasses = \"ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only\",\n\tformResetHandler = function() {\n\t\tvar buttons = $( this ).find( \":ui-button\" );\n\t\tsetTimeout(function() {\n\t\t\tbuttons.button( \"refresh\" );\n\t\t}, 1 );\n\t},\n\tradioGroup = function( radio ) {\n\t\tvar name = radio.name,\n\t\t\tform = radio.form,\n\t\t\tradios = $( [] );\n\t\tif ( name ) {\n\t\t\tif ( form ) {\n\t\t\t\tradios = $( form ).find( \"[name='\" + name + \"']\" );\n\t\t\t} else {\n\t\t\t\tradios = $( \"[name='\" + name + \"']\", radio.ownerDocument )\n\t\t\t\t\t.filter(function() {\n\t\t\t\t\t\treturn !this.form;\n\t\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\treturn radios;\n\t};\n\n$.widget( \"ui.button\", {\n\toptions: {\n\t\tdisabled: null,\n\t\ttext: true,\n\t\tlabel: null,\n\t\ticons: {\n\t\t\tprimary: null,\n\t\t\tsecondary: null\n\t\t}\n\t},\n\t_create: function() {\n\t\tthis.element.closest( \"form\" )\n\t\t\t.unbind( \"reset.button\" )\n\t\t\t.bind( \"reset.button\", formResetHandler );\n\n\t\tif ( typeof this.options.disabled !== \"boolean\" ) {\n\t\t\tthis.options.disabled = !!this.element.propAttr( \"disabled\" );\n\t\t} else {\n\t\t\tthis.element.propAttr( \"disabled\", this.options.disabled );\n\t\t}\n\n\t\tthis._determineButtonType();\n\t\tthis.hasTitle = !!this.buttonElement.attr( \"title\" );\n\n\t\tvar self = this,\n\t\t\toptions = this.options,\n\t\t\ttoggleButton = this.type === \"checkbox\" || this.type === \"radio\",\n\t\t\thoverClass = \"ui-state-hover\" + ( !toggleButton ? \" ui-state-active\" : \"\" ),\n\t\t\tfocusClass = \"ui-state-focus\";\n\n\t\tif ( options.label === null ) {\n\t\t\toptions.label = this.buttonElement.html();\n\t\t}\n\n\t\tthis.buttonElement\n\t\t\t.addClass( baseClasses )\n\t\t\t.attr( \"role\", \"button\" )\n\t\t\t.bind( \"mouseenter.button\", function() {\n\t\t\t\tif ( options.disabled ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t$( this ).addClass( \"ui-state-hover\" );\n\t\t\t\tif ( this === lastActive ) {\n\t\t\t\t\t$( this ).addClass( \"ui-state-active\" );\n\t\t\t\t}\n\t\t\t})\n\t\t\t.bind( \"mouseleave.button\", function() {\n\t\t\t\tif ( options.disabled ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t$( this ).removeClass( hoverClass );\n\t\t\t})\n\t\t\t.bind( \"click.button\", function( event ) {\n\t\t\t\tif ( options.disabled ) {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\tevent.stopImmediatePropagation();\n\t\t\t\t}\n\t\t\t});\n\n\t\tthis.element\n\t\t\t.bind( \"focus.button\", function() {\n\t\t\t\t// no need to check disabled, focus won't be triggered anyway\n\t\t\t\tself.buttonElement.addClass( focusClass );\n\t\t\t})\n\t\t\t.bind( \"blur.button\", function() {\n\t\t\t\tself.buttonElement.removeClass( focusClass );\n\t\t\t});\n\n\t\tif ( toggleButton ) {\n\t\t\tthis.element.bind( \"change.button\", function() {\n\t\t\t\tif ( clickDragged ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tself.refresh();\n\t\t\t});\n\t\t\t// if mouse moves between mousedown and mouseup (drag) set clickDragged flag\n\t\t\t// prevents issue where button state changes but checkbox/radio checked state\n\t\t\t// does not in Firefox (see ticket #6970)\n\t\t\tthis.buttonElement\n\t\t\t\t.bind( \"mousedown.button\", function( event ) {\n\t\t\t\t\tif ( options.disabled ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tclickDragged = false;\n\t\t\t\t\tstartXPos = event.pageX;\n\t\t\t\t\tstartYPos = event.pageY;\n\t\t\t\t})\n\t\t\t\t.bind( \"mouseup.button\", function( event ) {\n\t\t\t\t\tif ( options.disabled ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tif ( startXPos !== event.pageX || startYPos !== event.pageY ) {\n\t\t\t\t\t\tclickDragged = true;\n\t\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\tif ( this.type === \"checkbox\" ) {\n\t\t\tthis.buttonElement.bind( \"click.button\", function() {\n\t\t\t\tif ( options.disabled || clickDragged ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\t$( this ).toggleClass( \"ui-state-active\" );\n\t\t\t\tself.buttonElement.attr( \"aria-pressed\", self.element[0].checked );\n\t\t\t});\n\t\t} else if ( this.type === \"radio\" ) {\n\t\t\tthis.buttonElement.bind( \"click.button\", function() {\n\t\t\t\tif ( options.disabled || clickDragged ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\t$( this ).addClass( \"ui-state-active\" );\n\t\t\t\tself.buttonElement.attr( \"aria-pressed\", \"true\" );\n\n\t\t\t\tvar radio = self.element[ 0 ];\n\t\t\t\tradioGroup( radio )\n\t\t\t\t\t.not( radio )\n\t\t\t\t\t.map(function() {\n\t\t\t\t\t\treturn $( this ).button( \"widget\" )[ 0 ];\n\t\t\t\t\t})\n\t\t\t\t\t.removeClass( \"ui-state-active\" )\n\t\t\t\t\t.attr( \"aria-pressed\", \"false\" );\n\t\t\t});\n\t\t} else {\n\t\t\tthis.buttonElement\n\t\t\t\t.bind( \"mousedown.button\", function() {\n\t\t\t\t\tif ( options.disabled ) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\t$( this ).addClass( \"ui-state-active\" );\n\t\t\t\t\tlastActive = this;\n\t\t\t\t\t$( document ).one( \"mouseup\", function() {\n\t\t\t\t\t\tlastActive = null;\n\t\t\t\t\t});\n\t\t\t\t})\n\t\t\t\t.bind( \"mouseup.button\", function() {\n\t\t\t\t\tif ( options.disabled ) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\t$( this ).removeClass( \"ui-state-active\" );\n\t\t\t\t})\n\t\t\t\t.bind( \"keydown.button\", function(event) {\n\t\t\t\t\tif ( options.disabled ) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\tif ( event.keyCode == $.ui.keyCode.SPACE || event.keyCode == $.ui.keyCode.ENTER ) {\n\t\t\t\t\t\t$( this ).addClass( \"ui-state-active\" );\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\t.bind( \"keyup.button\", function() {\n\t\t\t\t\t$( this ).removeClass( \"ui-state-active\" );\n\t\t\t\t});\n\n\t\t\tif ( this.buttonElement.is(\"a\") ) {\n\t\t\t\tthis.buttonElement.keyup(function(event) {\n\t\t\t\t\tif ( event.keyCode === $.ui.keyCode.SPACE ) {\n\t\t\t\t\t\t// TODO pass through original event correctly (just as 2nd argument doesn't work)\n\t\t\t\t\t\t$( this ).click();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\t// TODO: pull out $.Widget's handling for the disabled option into\n\t\t// $.Widget.prototype._setOptionDisabled so it's easy to proxy and can\n\t\t// be overridden by individual plugins\n\t\tthis._setOption( \"disabled\", options.disabled );\n\t\tthis._resetButton();\n\t},\n\n\t_determineButtonType: function() {\n\n\t\tif ( this.element.is(\":checkbox\") ) {\n\t\t\tthis.type = \"checkbox\";\n\t\t} else if ( this.element.is(\":radio\") ) {\n\t\t\tthis.type = \"radio\";\n\t\t} else if ( this.element.is(\"input\") ) {\n\t\t\tthis.type = \"input\";\n\t\t} else {\n\t\t\tthis.type = \"button\";\n\t\t}\n\n\t\tif ( this.type === \"checkbox\" || this.type === \"radio\" ) {\n\t\t\t// we don't search against the document in case the element\n\t\t\t// is disconnected from the DOM\n\t\t\tvar ancestor = this.element.parents().filter(\":last\"),\n\t\t\t\tlabelSelector = \"label[for='\" + this.element.attr(\"id\") + \"']\";\n\t\t\tthis.buttonElement = ancestor.find( labelSelector );\n\t\t\tif ( !this.buttonElement.length ) {\n\t\t\t\tancestor = ancestor.length ? ancestor.siblings() : this.element.siblings();\n\t\t\t\tthis.buttonElement = ancestor.filter( labelSelector );\n\t\t\t\tif ( !this.buttonElement.length ) {\n\t\t\t\t\tthis.buttonElement = ancestor.find( labelSelector );\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.element.addClass( \"ui-helper-hidden-accessible\" );\n\n\t\t\tvar checked = this.element.is( \":checked\" );\n\t\t\tif ( checked ) {\n\t\t\t\tthis.buttonElement.addClass( \"ui-state-active\" );\n\t\t\t}\n\t\t\tthis.buttonElement.attr( \"aria-pressed\", checked );\n\t\t} else {\n\t\t\tthis.buttonElement = this.element;\n\t\t}\n\t},\n\n\twidget: function() {\n\t\treturn this.buttonElement;\n\t},\n\n\tdestroy: function() {\n\t\tthis.element\n\t\t\t.removeClass( \"ui-helper-hidden-accessible\" );\n\t\tthis.buttonElement\n\t\t\t.removeClass( baseClasses + \" \" + stateClasses + \" \" + typeClasses )\n\t\t\t.removeAttr( \"role\" )\n\t\t\t.removeAttr( \"aria-pressed\" )\n\t\t\t.html( this.buttonElement.find(\".ui-button-text\").html() );\n\n\t\tif ( !this.hasTitle ) {\n\t\t\tthis.buttonElement.removeAttr( \"title\" );\n\t\t}\n\n\t\t$.Widget.prototype.destroy.call( this );\n\t},\n\n\t_setOption: function( key, value ) {\n\t\t$.Widget.prototype._setOption.apply( this, arguments );\n\t\tif ( key === \"disabled\" ) {\n\t\t\tif ( value ) {\n\t\t\t\tthis.element.propAttr( \"disabled\", true );\n\t\t\t} else {\n\t\t\t\tthis.element.propAttr( \"disabled\", false );\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tthis._resetButton();\n\t},\n\n\trefresh: function() {\n\t\tvar isDisabled = this.element.is( \":disabled\" );\n\t\tif ( isDisabled !== this.options.disabled ) {\n\t\t\tthis._setOption( \"disabled\", isDisabled );\n\t\t}\n\t\tif ( this.type === \"radio\" ) {\n\t\t\tradioGroup( this.element[0] ).each(function() {\n\t\t\t\tif ( $( this ).is( \":checked\" ) ) {\n\t\t\t\t\t$( this ).button( \"widget\" )\n\t\t\t\t\t\t.addClass( \"ui-state-active\" )\n\t\t\t\t\t\t.attr( \"aria-pressed\", \"true\" );\n\t\t\t\t} else {\n\t\t\t\t\t$( this ).button( \"widget\" )\n\t\t\t\t\t\t.removeClass( \"ui-state-active\" )\n\t\t\t\t\t\t.attr( \"aria-pressed\", \"false\" );\n\t\t\t\t}\n\t\t\t});\n\t\t} else if ( this.type === \"checkbox\" ) {\n\t\t\tif ( this.element.is( \":checked\" ) ) {\n\t\t\t\tthis.buttonElement\n\t\t\t\t\t.addClass( \"ui-state-active\" )\n\t\t\t\t\t.attr( \"aria-pressed\", \"true\" );\n\t\t\t} else {\n\t\t\t\tthis.buttonElement\n\t\t\t\t\t.removeClass( \"ui-state-active\" )\n\t\t\t\t\t.attr( \"aria-pressed\", \"false\" );\n\t\t\t}\n\t\t}\n\t},\n\n\t_resetButton: function() {\n\t\tif ( this.type === \"input\" ) {\n\t\t\tif ( this.options.label ) {\n\t\t\t\tthis.element.val( this.options.label );\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tvar buttonElement = this.buttonElement.removeClass( typeClasses ),\n\t\t\tbuttonText = $( \"<span></span>\", this.element[0].ownerDocument )\n\t\t\t\t.addClass( \"ui-button-text\" )\n\t\t\t\t.html( this.options.label )\n\t\t\t\t.appendTo( buttonElement.empty() )\n\t\t\t\t.text(),\n\t\t\ticons = this.options.icons,\n\t\t\tmultipleIcons = icons.primary && icons.secondary,\n\t\t\tbuttonClasses = [];  \n\n\t\tif ( icons.primary || icons.secondary ) {\n\t\t\tif ( this.options.text ) {\n\t\t\t\tbuttonClasses.push( \"ui-button-text-icon\" + ( multipleIcons ? \"s\" : ( icons.primary ? \"-primary\" : \"-secondary\" ) ) );\n\t\t\t}\n\n\t\t\tif ( icons.primary ) {\n\t\t\t\tbuttonElement.prepend( \"<span class='ui-button-icon-primary ui-icon \" + icons.primary + \"'></span>\" );\n\t\t\t}\n\n\t\t\tif ( icons.secondary ) {\n\t\t\t\tbuttonElement.append( \"<span class='ui-button-icon-secondary ui-icon \" + icons.secondary + \"'></span>\" );\n\t\t\t}\n\n\t\t\tif ( !this.options.text ) {\n\t\t\t\tbuttonClasses.push( multipleIcons ? \"ui-button-icons-only\" : \"ui-button-icon-only\" );\n\n\t\t\t\tif ( !this.hasTitle ) {\n\t\t\t\t\tbuttonElement.attr( \"title\", buttonText );\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tbuttonClasses.push( \"ui-button-text-only\" );\n\t\t}\n\t\tbuttonElement.addClass( buttonClasses.join( \" \" ) );\n\t}\n});\n\n$.widget( \"ui.buttonset\", {\n\toptions: {\n\t\titems: \":button, :submit, :reset, :checkbox, :radio, a, :data(button)\"\n\t},\n\n\t_create: function() {\n\t\tthis.element.addClass( \"ui-buttonset\" );\n\t},\n\t\n\t_init: function() {\n\t\tthis.refresh();\n\t},\n\n\t_setOption: function( key, value ) {\n\t\tif ( key === \"disabled\" ) {\n\t\t\tthis.buttons.button( \"option\", key, value );\n\t\t}\n\n\t\t$.Widget.prototype._setOption.apply( this, arguments );\n\t},\n\t\n\trefresh: function() {\n\t\tvar rtl = this.element.css( \"direction\" ) === \"rtl\";\n\t\t\n\t\tthis.buttons = this.element.find( this.options.items )\n\t\t\t.filter( \":ui-button\" )\n\t\t\t\t.button( \"refresh\" )\n\t\t\t.end()\n\t\t\t.not( \":ui-button\" )\n\t\t\t\t.button()\n\t\t\t.end()\n\t\t\t.map(function() {\n\t\t\t\treturn $( this ).button( \"widget\" )[ 0 ];\n\t\t\t})\n\t\t\t\t.removeClass( \"ui-corner-all ui-corner-left ui-corner-right\" )\n\t\t\t\t.filter( \":first\" )\n\t\t\t\t\t.addClass( rtl ? \"ui-corner-right\" : \"ui-corner-left\" )\n\t\t\t\t.end()\n\t\t\t\t.filter( \":last\" )\n\t\t\t\t\t.addClass( rtl ? \"ui-corner-left\" : \"ui-corner-right\" )\n\t\t\t\t.end()\n\t\t\t.end();\n\t},\n\n\tdestroy: function() {\n\t\tthis.element.removeClass( \"ui-buttonset\" );\n\t\tthis.buttons\n\t\t\t.map(function() {\n\t\t\t\treturn $( this ).button( \"widget\" )[ 0 ];\n\t\t\t})\n\t\t\t\t.removeClass( \"ui-corner-left ui-corner-right\" )\n\t\t\t.end()\n\t\t\t.button( \"destroy\" );\n\n\t\t$.Widget.prototype.destroy.call( this );\n\t}\n});\n\n}( jQuery ) );\n\n(function( $, undefined ) {\n\n$.extend($.ui, { datepicker: { version: \"1.8.20\" } });\n\nvar PROP_NAME = 'datepicker';\nvar dpuuid = new Date().getTime();\nvar instActive;\n\n/* Date picker manager.\n   Use the singleton instance of this class, $.datepicker, to interact with the date picker.\n   Settings for (groups of) date pickers are maintained in an instance object,\n   allowing multiple different settings on the same page. */\n\nfunction Datepicker() {\n\tthis.debug = false; // Change this to true to start debugging\n\tthis._curInst = null; // The current instance in use\n\tthis._keyEvent = false; // If the last event was a key event\n\tthis._disabledInputs = []; // List of date picker inputs that have been disabled\n\tthis._datepickerShowing = false; // True if the popup picker is showing , false if not\n\tthis._inDialog = false; // True if showing within a \"dialog\", false if not\n\tthis._mainDivId = 'ui-datepicker-div'; // The ID of the main datepicker division\n\tthis._inlineClass = 'ui-datepicker-inline'; // The name of the inline marker class\n\tthis._appendClass = 'ui-datepicker-append'; // The name of the append marker class\n\tthis._triggerClass = 'ui-datepicker-trigger'; // The name of the trigger marker class\n\tthis._dialogClass = 'ui-datepicker-dialog'; // The name of the dialog marker class\n\tthis._disableClass = 'ui-datepicker-disabled'; // The name of the disabled covering marker class\n\tthis._unselectableClass = 'ui-datepicker-unselectable'; // The name of the unselectable cell marker class\n\tthis._currentClass = 'ui-datepicker-current-day'; // The name of the current day marker class\n\tthis._dayOverClass = 'ui-datepicker-days-cell-over'; // The name of the day hover marker class\n\tthis.regional = []; // Available regional settings, indexed by language code\n\tthis.regional[''] = { // Default regional settings\n\t\tcloseText: 'Done', // Display text for close link\n\t\tprevText: 'Prev', // Display text for previous month link\n\t\tnextText: 'Next', // Display text for next month link\n\t\tcurrentText: 'Today', // Display text for current month link\n\t\tmonthNames: ['January','February','March','April','May','June',\n\t\t\t'July','August','September','October','November','December'], // Names of months for drop-down and formatting\n\t\tmonthNamesShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'], // For formatting\n\t\tdayNames: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'], // For formatting\n\t\tdayNamesShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'], // For formatting\n\t\tdayNamesMin: ['Su','Mo','Tu','We','Th','Fr','Sa'], // Column headings for days starting at Sunday\n\t\tweekHeader: 'Wk', // Column header for week of the year\n\t\tdateFormat: 'mm/dd/yy', // See format options on parseDate\n\t\tfirstDay: 0, // The first day of the week, Sun = 0, Mon = 1, ...\n\t\tisRTL: false, // True if right-to-left language, false if left-to-right\n\t\tshowMonthAfterYear: false, // True if the year select precedes month, false for month then year\n\t\tyearSuffix: '' // Additional text to append to the year in the month headers\n\t};\n\tthis._defaults = { // Global defaults for all the date picker instances\n\t\tshowOn: 'focus', // 'focus' for popup on focus,\n\t\t\t// 'button' for trigger button, or 'both' for either\n\t\tshowAnim: 'fadeIn', // Name of jQuery animation for popup\n\t\tshowOptions: {}, // Options for enhanced animations\n\t\tdefaultDate: null, // Used when field is blank: actual date,\n\t\t\t// +/-number for offset from today, null for today\n\t\tappendText: '', // Display text following the input box, e.g. showing the format\n\t\tbuttonText: '...', // Text for trigger button\n\t\tbuttonImage: '', // URL for trigger button image\n\t\tbuttonImageOnly: false, // True if the image appears alone, false if it appears on a button\n\t\thideIfNoPrevNext: false, // True to hide next/previous month links\n\t\t\t// if not applicable, false to just disable them\n\t\tnavigationAsDateFormat: false, // True if date formatting applied to prev/today/next links\n\t\tgotoCurrent: false, // True if today link goes back to current selection instead\n\t\tchangeMonth: false, // True if month can be selected directly, false if only prev/next\n\t\tchangeYear: false, // True if year can be selected directly, false if only prev/next\n\t\tyearRange: 'c-10:c+10', // Range of years to display in drop-down,\n\t\t\t// either relative to today's year (-nn:+nn), relative to currently displayed year\n\t\t\t// (c-nn:c+nn), absolute (nnnn:nnnn), or a combination of the above (nnnn:-n)\n\t\tshowOtherMonths: false, // True to show dates in other months, false to leave blank\n\t\tselectOtherMonths: false, // True to allow selection of dates in other months, false for unselectable\n\t\tshowWeek: false, // True to show week of the year, false to not show it\n\t\tcalculateWeek: this.iso8601Week, // How to calculate the week of the year,\n\t\t\t// takes a Date and returns the number of the week for it\n\t\tshortYearCutoff: '+10', // Short year values < this are in the current century,\n\t\t\t// > this are in the previous century,\n\t\t\t// string value starting with '+' for current year + value\n\t\tminDate: null, // The earliest selectable date, or null for no limit\n\t\tmaxDate: null, // The latest selectable date, or null for no limit\n\t\tduration: 'fast', // Duration of display/closure\n\t\tbeforeShowDay: null, // Function that takes a date and returns an array with\n\t\t\t// [0] = true if selectable, false if not, [1] = custom CSS class name(s) or '',\n\t\t\t// [2] = cell title (optional), e.g. $.datepicker.noWeekends\n\t\tbeforeShow: null, // Function that takes an input field and\n\t\t\t// returns a set of custom settings for the date picker\n\t\tonSelect: null, // Define a callback function when a date is selected\n\t\tonChangeMonthYear: null, // Define a callback function when the month or year is changed\n\t\tonClose: null, // Define a callback function when the datepicker is closed\n\t\tnumberOfMonths: 1, // Number of months to show at a time\n\t\tshowCurrentAtPos: 0, // The position in multipe months at which to show the current month (starting at 0)\n\t\tstepMonths: 1, // Number of months to step back/forward\n\t\tstepBigMonths: 12, // Number of months to step back/forward for the big links\n\t\taltField: '', // Selector for an alternate field to store selected dates into\n\t\taltFormat: '', // The date format to use for the alternate field\n\t\tconstrainInput: true, // The input is constrained by the current date format\n\t\tshowButtonPanel: false, // True to show button panel, false to not show it\n\t\tautoSize: false, // True to size the input for the date format, false to leave as is\n\t\tdisabled: false // The initial disabled state\n\t};\n\t$.extend(this._defaults, this.regional['']);\n\tthis.dpDiv = bindHover($('<div id=\"' + this._mainDivId + '\" class=\"ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all\"></div>'));\n}\n\n$.extend(Datepicker.prototype, {\n\t/* Class name added to elements to indicate already configured with a date picker. */\n\tmarkerClassName: 'hasDatepicker',\n\t\n\t//Keep track of the maximum number of rows displayed (see #7043)\n\tmaxRows: 4,\n\n\t/* Debug logging (if enabled). */\n\tlog: function () {\n\t\tif (this.debug)\n\t\t\tconsole.log.apply('', arguments);\n\t},\n\t\n\t// TODO rename to \"widget\" when switching to widget factory\n\t_widgetDatepicker: function() {\n\t\treturn this.dpDiv;\n\t},\n\n\t/* Override the default settings for all instances of the date picker.\n\t   @param  settings  object - the new settings to use as defaults (anonymous object)\n\t   @return the manager object */\n\tsetDefaults: function(settings) {\n\t\textendRemove(this._defaults, settings || {});\n\t\treturn this;\n\t},\n\n\t/* Attach the date picker to a jQuery selection.\n\t   @param  target    element - the target input field or division or span\n\t   @param  settings  object - the new settings to use for this date picker instance (anonymous) */\n\t_attachDatepicker: function(target, settings) {\n\t\t// check for settings on the control itself - in namespace 'date:'\n\t\tvar inlineSettings = null;\n\t\tfor (var attrName in this._defaults) {\n\t\t\tvar attrValue = target.getAttribute('date:' + attrName);\n\t\t\tif (attrValue) {\n\t\t\t\tinlineSettings = inlineSettings || {};\n\t\t\t\ttry {\n\t\t\t\t\tinlineSettings[attrName] = eval(attrValue);\n\t\t\t\t} catch (err) {\n\t\t\t\t\tinlineSettings[attrName] = attrValue;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tvar nodeName = target.nodeName.toLowerCase();\n\t\tvar inline = (nodeName == 'div' || nodeName == 'span');\n\t\tif (!target.id) {\n\t\t\tthis.uuid += 1;\n\t\t\ttarget.id = 'dp' + this.uuid;\n\t\t}\n\t\tvar inst = this._newInst($(target), inline);\n\t\tinst.settings = $.extend({}, settings || {}, inlineSettings || {});\n\t\tif (nodeName == 'input') {\n\t\t\tthis._connectDatepicker(target, inst);\n\t\t} else if (inline) {\n\t\t\tthis._inlineDatepicker(target, inst);\n\t\t}\n\t},\n\n\t/* Create a new instance object. */\n\t_newInst: function(target, inline) {\n\t\tvar id = target[0].id.replace(/([^A-Za-z0-9_-])/g, '\\\\\\\\$1'); // escape jQuery meta chars\n\t\treturn {id: id, input: target, // associated target\n\t\t\tselectedDay: 0, selectedMonth: 0, selectedYear: 0, // current selection\n\t\t\tdrawMonth: 0, drawYear: 0, // month being drawn\n\t\t\tinline: inline, // is datepicker inline or not\n\t\t\tdpDiv: (!inline ? this.dpDiv : // presentation div\n\t\t\tbindHover($('<div class=\"' + this._inlineClass + ' ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all\"></div>')))};\n\t},\n\n\t/* Attach the date picker to an input field. */\n\t_connectDatepicker: function(target, inst) {\n\t\tvar input = $(target);\n\t\tinst.append = $([]);\n\t\tinst.trigger = $([]);\n\t\tif (input.hasClass(this.markerClassName))\n\t\t\treturn;\n\t\tthis._attachments(input, inst);\n\t\tinput.addClass(this.markerClassName).keydown(this._doKeyDown).\n\t\t\tkeypress(this._doKeyPress).keyup(this._doKeyUp).\n\t\t\tbind(\"setData.datepicker\", function(event, key, value) {\n\t\t\t\tinst.settings[key] = value;\n\t\t\t}).bind(\"getData.datepicker\", function(event, key) {\n\t\t\t\treturn this._get(inst, key);\n\t\t\t});\n\t\tthis._autoSize(inst);\n\t\t$.data(target, PROP_NAME, inst);\n\t\t//If disabled option is true, disable the datepicker once it has been attached to the input (see ticket #5665)\n\t\tif( inst.settings.disabled ) {\n\t\t\tthis._disableDatepicker( target );\n\t\t}\n\t},\n\n\t/* Make attachments based on settings. */\n\t_attachments: function(input, inst) {\n\t\tvar appendText = this._get(inst, 'appendText');\n\t\tvar isRTL = this._get(inst, 'isRTL');\n\t\tif (inst.append)\n\t\t\tinst.append.remove();\n\t\tif (appendText) {\n\t\t\tinst.append = $('<span class=\"' + this._appendClass + '\">' + appendText + '</span>');\n\t\t\tinput[isRTL ? 'before' : 'after'](inst.append);\n\t\t}\n\t\tinput.unbind('focus', this._showDatepicker);\n\t\tif (inst.trigger)\n\t\t\tinst.trigger.remove();\n\t\tvar showOn = this._get(inst, 'showOn');\n\t\tif (showOn == 'focus' || showOn == 'both') // pop-up date picker when in the marked field\n\t\t\tinput.focus(this._showDatepicker);\n\t\tif (showOn == 'button' || showOn == 'both') { // pop-up date picker when button clicked\n\t\t\tvar buttonText = this._get(inst, 'buttonText');\n\t\t\tvar buttonImage = this._get(inst, 'buttonImage');\n\t\t\tinst.trigger = $(this._get(inst, 'buttonImageOnly') ?\n\t\t\t\t$('<img/>').addClass(this._triggerClass).\n\t\t\t\t\tattr({ src: buttonImage, alt: buttonText, title: buttonText }) :\n\t\t\t\t$('<button type=\"button\"></button>').addClass(this._triggerClass).\n\t\t\t\t\thtml(buttonImage == '' ? buttonText : $('<img/>').attr(\n\t\t\t\t\t{ src:buttonImage, alt:buttonText, title:buttonText })));\n\t\t\tinput[isRTL ? 'before' : 'after'](inst.trigger);\n\t\t\tinst.trigger.click(function() {\n\t\t\t\tif ($.datepicker._datepickerShowing && $.datepicker._lastInput == input[0])\n\t\t\t\t\t$.datepicker._hideDatepicker();\n\t\t\t\telse if ($.datepicker._datepickerShowing && $.datepicker._lastInput != input[0]) {\n\t\t\t\t\t$.datepicker._hideDatepicker(); \n\t\t\t\t\t$.datepicker._showDatepicker(input[0]);\n\t\t\t\t} else\n\t\t\t\t\t$.datepicker._showDatepicker(input[0]);\n\t\t\t\treturn false;\n\t\t\t});\n\t\t}\n\t},\n\n\t/* Apply the maximum length for the date format. */\n\t_autoSize: function(inst) {\n\t\tif (this._get(inst, 'autoSize') && !inst.inline) {\n\t\t\tvar date = new Date(2009, 12 - 1, 20); // Ensure double digits\n\t\t\tvar dateFormat = this._get(inst, 'dateFormat');\n\t\t\tif (dateFormat.match(/[DM]/)) {\n\t\t\t\tvar findMax = function(names) {\n\t\t\t\t\tvar max = 0;\n\t\t\t\t\tvar maxI = 0;\n\t\t\t\t\tfor (var i = 0; i < names.length; i++) {\n\t\t\t\t\t\tif (names[i].length > max) {\n\t\t\t\t\t\t\tmax = names[i].length;\n\t\t\t\t\t\t\tmaxI = i;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn maxI;\n\t\t\t\t};\n\t\t\t\tdate.setMonth(findMax(this._get(inst, (dateFormat.match(/MM/) ?\n\t\t\t\t\t'monthNames' : 'monthNamesShort'))));\n\t\t\t\tdate.setDate(findMax(this._get(inst, (dateFormat.match(/DD/) ?\n\t\t\t\t\t'dayNames' : 'dayNamesShort'))) + 20 - date.getDay());\n\t\t\t}\n\t\t\tinst.input.attr('size', this._formatDate(inst, date).length);\n\t\t}\n\t},\n\n\t/* Attach an inline date picker to a div. */\n\t_inlineDatepicker: function(target, inst) {\n\t\tvar divSpan = $(target);\n\t\tif (divSpan.hasClass(this.markerClassName))\n\t\t\treturn;\n\t\tdivSpan.addClass(this.markerClassName).append(inst.dpDiv).\n\t\t\tbind(\"setData.datepicker\", function(event, key, value){\n\t\t\t\tinst.settings[key] = value;\n\t\t\t}).bind(\"getData.datepicker\", function(event, key){\n\t\t\t\treturn this._get(inst, key);\n\t\t\t});\n\t\t$.data(target, PROP_NAME, inst);\n\t\tthis._setDate(inst, this._getDefaultDate(inst), true);\n\t\tthis._updateDatepicker(inst);\n\t\tthis._updateAlternate(inst);\n\t\t//If disabled option is true, disable the datepicker before showing it (see ticket #5665)\n\t\tif( inst.settings.disabled ) {\n\t\t\tthis._disableDatepicker( target );\n\t\t}\n\t\t// Set display:block in place of inst.dpDiv.show() which won't work on disconnected elements\n\t\t// http://bugs.jqueryui.com/ticket/7552 - A Datepicker created on a detached div has zero height\n\t\tinst.dpDiv.css( \"display\", \"block\" );\n\t},\n\n\t/* Pop-up the date picker in a \"dialog\" box.\n\t   @param  input     element - ignored\n\t   @param  date      string or Date - the initial date to display\n\t   @param  onSelect  function - the function to call when a date is selected\n\t   @param  settings  object - update the dialog date picker instance's settings (anonymous object)\n\t   @param  pos       int[2] - coordinates for the dialog's position within the screen or\n\t                     event - with x/y coordinates or\n\t                     leave empty for default (screen centre)\n\t   @return the manager object */\n\t_dialogDatepicker: function(input, date, onSelect, settings, pos) {\n\t\tvar inst = this._dialogInst; // internal instance\n\t\tif (!inst) {\n\t\t\tthis.uuid += 1;\n\t\t\tvar id = 'dp' + this.uuid;\n\t\t\tthis._dialogInput = $('<input type=\"text\" id=\"' + id +\n\t\t\t\t'\" style=\"position: absolute; top: -100px; width: 0px; z-index: -10;\"/>');\n\t\t\tthis._dialogInput.keydown(this._doKeyDown);\n\t\t\t$('body').append(this._dialogInput);\n\t\t\tinst = this._dialogInst = this._newInst(this._dialogInput, false);\n\t\t\tinst.settings = {};\n\t\t\t$.data(this._dialogInput[0], PROP_NAME, inst);\n\t\t}\n\t\textendRemove(inst.settings, settings || {});\n\t\tdate = (date && date.constructor == Date ? this._formatDate(inst, date) : date);\n\t\tthis._dialogInput.val(date);\n\n\t\tthis._pos = (pos ? (pos.length ? pos : [pos.pageX, pos.pageY]) : null);\n\t\tif (!this._pos) {\n\t\t\tvar browserWidth = document.documentElement.clientWidth;\n\t\t\tvar browserHeight = document.documentElement.clientHeight;\n\t\t\tvar scrollX = document.documentElement.scrollLeft || document.body.scrollLeft;\n\t\t\tvar scrollY = document.documentElement.scrollTop || document.body.scrollTop;\n\t\t\tthis._pos = // should use actual width/height below\n\t\t\t\t[(browserWidth / 2) - 100 + scrollX, (browserHeight / 2) - 150 + scrollY];\n\t\t}\n\n\t\t// move input on screen for focus, but hidden behind dialog\n\t\tthis._dialogInput.css('left', (this._pos[0] + 20) + 'px').css('top', this._pos[1] + 'px');\n\t\tinst.settings.onSelect = onSelect;\n\t\tthis._inDialog = true;\n\t\tthis.dpDiv.addClass(this._dialogClass);\n\t\tthis._showDatepicker(this._dialogInput[0]);\n\t\tif ($.blockUI)\n\t\t\t$.blockUI(this.dpDiv);\n\t\t$.data(this._dialogInput[0], PROP_NAME, inst);\n\t\treturn this;\n\t},\n\n\t/* Detach a datepicker from its control.\n\t   @param  target    element - the target input field or division or span */\n\t_destroyDatepicker: function(target) {\n\t\tvar $target = $(target);\n\t\tvar inst = $.data(target, PROP_NAME);\n\t\tif (!$target.hasClass(this.markerClassName)) {\n\t\t\treturn;\n\t\t}\n\t\tvar nodeName = target.nodeName.toLowerCase();\n\t\t$.removeData(target, PROP_NAME);\n\t\tif (nodeName == 'input') {\n\t\t\tinst.append.remove();\n\t\t\tinst.trigger.remove();\n\t\t\t$target.removeClass(this.markerClassName).\n\t\t\t\tunbind('focus', this._showDatepicker).\n\t\t\t\tunbind('keydown', this._doKeyDown).\n\t\t\t\tunbind('keypress', this._doKeyPress).\n\t\t\t\tunbind('keyup', this._doKeyUp);\n\t\t} else if (nodeName == 'div' || nodeName == 'span')\n\t\t\t$target.removeClass(this.markerClassName).empty();\n\t},\n\n\t/* Enable the date picker to a jQuery selection.\n\t   @param  target    element - the target input field or division or span */\n\t_enableDatepicker: function(target) {\n\t\tvar $target = $(target);\n\t\tvar inst = $.data(target, PROP_NAME);\n\t\tif (!$target.hasClass(this.markerClassName)) {\n\t\t\treturn;\n\t\t}\n\t\tvar nodeName = target.nodeName.toLowerCase();\n\t\tif (nodeName == 'input') {\n\t\t\ttarget.disabled = false;\n\t\t\tinst.trigger.filter('button').\n\t\t\t\teach(function() { this.disabled = false; }).end().\n\t\t\t\tfilter('img').css({opacity: '1.0', cursor: ''});\n\t\t}\n\t\telse if (nodeName == 'div' || nodeName == 'span') {\n\t\t\tvar inline = $target.children('.' + this._inlineClass);\n\t\t\tinline.children().removeClass('ui-state-disabled');\n\t\t\tinline.find(\"select.ui-datepicker-month, select.ui-datepicker-year\").\n\t\t\t\tremoveAttr(\"disabled\");\n\t\t}\n\t\tthis._disabledInputs = $.map(this._disabledInputs,\n\t\t\tfunction(value) { return (value == target ? null : value); }); // delete entry\n\t},\n\n\t/* Disable the date picker to a jQuery selection.\n\t   @param  target    element - the target input field or division or span */\n\t_disableDatepicker: function(target) {\n\t\tvar $target = $(target);\n\t\tvar inst = $.data(target, PROP_NAME);\n\t\tif (!$target.hasClass(this.markerClassName)) {\n\t\t\treturn;\n\t\t}\n\t\tvar nodeName = target.nodeName.toLowerCase();\n\t\tif (nodeName == 'input') {\n\t\t\ttarget.disabled = true;\n\t\t\tinst.trigger.filter('button').\n\t\t\t\teach(function() { this.disabled = true; }).end().\n\t\t\t\tfilter('img').css({opacity: '0.5', cursor: 'default'});\n\t\t}\n\t\telse if (nodeName == 'div' || nodeName == 'span') {\n\t\t\tvar inline = $target.children('.' + this._inlineClass);\n\t\t\tinline.children().addClass('ui-state-disabled');\n\t\t\tinline.find(\"select.ui-datepicker-month, select.ui-datepicker-year\").\n\t\t\t\tattr(\"disabled\", \"disabled\");\n\t\t}\n\t\tthis._disabledInputs = $.map(this._disabledInputs,\n\t\t\tfunction(value) { return (value == target ? null : value); }); // delete entry\n\t\tthis._disabledInputs[this._disabledInputs.length] = target;\n\t},\n\n\t/* Is the first field in a jQuery collection disabled as a datepicker?\n\t   @param  target    element - the target input field or division or span\n\t   @return boolean - true if disabled, false if enabled */\n\t_isDisabledDatepicker: function(target) {\n\t\tif (!target) {\n\t\t\treturn false;\n\t\t}\n\t\tfor (var i = 0; i < this._disabledInputs.length; i++) {\n\t\t\tif (this._disabledInputs[i] == target)\n\t\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t},\n\n\t/* Retrieve the instance data for the target control.\n\t   @param  target  element - the target input field or division or span\n\t   @return  object - the associated instance data\n\t   @throws  error if a jQuery problem getting data */\n\t_getInst: function(target) {\n\t\ttry {\n\t\t\treturn $.data(target, PROP_NAME);\n\t\t}\n\t\tcatch (err) {\n\t\t\tthrow 'Missing instance data for this datepicker';\n\t\t}\n\t},\n\n\t/* Update or retrieve the settings for a date picker attached to an input field or division.\n\t   @param  target  element - the target input field or division or span\n\t   @param  name    object - the new settings to update or\n\t                   string - the name of the setting to change or retrieve,\n\t                   when retrieving also 'all' for all instance settings or\n\t                   'defaults' for all global defaults\n\t   @param  value   any - the new value for the setting\n\t                   (omit if above is an object or to retrieve a value) */\n\t_optionDatepicker: function(target, name, value) {\n\t\tvar inst = this._getInst(target);\n\t\tif (arguments.length == 2 && typeof name == 'string') {\n\t\t\treturn (name == 'defaults' ? $.extend({}, $.datepicker._defaults) :\n\t\t\t\t(inst ? (name == 'all' ? $.extend({}, inst.settings) :\n\t\t\t\tthis._get(inst, name)) : null));\n\t\t}\n\t\tvar settings = name || {};\n\t\tif (typeof name == 'string') {\n\t\t\tsettings = {};\n\t\t\tsettings[name] = value;\n\t\t}\n\t\tif (inst) {\n\t\t\tif (this._curInst == inst) {\n\t\t\t\tthis._hideDatepicker();\n\t\t\t}\n\t\t\tvar date = this._getDateDatepicker(target, true);\n\t\t\tvar minDate = this._getMinMaxDate(inst, 'min');\n\t\t\tvar maxDate = this._getMinMaxDate(inst, 'max');\n\t\t\textendRemove(inst.settings, settings);\n\t\t\t// reformat the old minDate/maxDate values if dateFormat changes and a new minDate/maxDate isn't provided\n\t\t\tif (minDate !== null && settings['dateFormat'] !== undefined && settings['minDate'] === undefined)\n\t\t\t\tinst.settings.minDate = this._formatDate(inst, minDate);\n\t\t\tif (maxDate !== null && settings['dateFormat'] !== undefined && settings['maxDate'] === undefined)\n\t\t\t\tinst.settings.maxDate = this._formatDate(inst, maxDate);\n\t\t\tthis._attachments($(target), inst);\n\t\t\tthis._autoSize(inst);\n\t\t\tthis._setDate(inst, date);\n\t\t\tthis._updateAlternate(inst);\n\t\t\tthis._updateDatepicker(inst);\n\t\t}\n\t},\n\n\t// change method deprecated\n\t_changeDatepicker: function(target, name, value) {\n\t\tthis._optionDatepicker(target, name, value);\n\t},\n\n\t/* Redraw the date picker attached to an input field or division.\n\t   @param  target  element - the target input field or division or span */\n\t_refreshDatepicker: function(target) {\n\t\tvar inst = this._getInst(target);\n\t\tif (inst) {\n\t\t\tthis._updateDatepicker(inst);\n\t\t}\n\t},\n\n\t/* Set the dates for a jQuery selection.\n\t   @param  target   element - the target input field or division or span\n\t   @param  date     Date - the new date */\n\t_setDateDatepicker: function(target, date) {\n\t\tvar inst = this._getInst(target);\n\t\tif (inst) {\n\t\t\tthis._setDate(inst, date);\n\t\t\tthis._updateDatepicker(inst);\n\t\t\tthis._updateAlternate(inst);\n\t\t}\n\t},\n\n\t/* Get the date(s) for the first entry in a jQuery selection.\n\t   @param  target     element - the target input field or division or span\n\t   @param  noDefault  boolean - true if no default date is to be used\n\t   @return Date - the current date */\n\t_getDateDatepicker: function(target, noDefault) {\n\t\tvar inst = this._getInst(target);\n\t\tif (inst && !inst.inline)\n\t\t\tthis._setDateFromField(inst, noDefault);\n\t\treturn (inst ? this._getDate(inst) : null);\n\t},\n\n\t/* Handle keystrokes. */\n\t_doKeyDown: function(event) {\n\t\tvar inst = $.datepicker._getInst(event.target);\n\t\tvar handled = true;\n\t\tvar isRTL = inst.dpDiv.is('.ui-datepicker-rtl');\n\t\tinst._keyEvent = true;\n\t\tif ($.datepicker._datepickerShowing)\n\t\t\tswitch (event.keyCode) {\n\t\t\t\tcase 9: $.datepicker._hideDatepicker();\n\t\t\t\t\t\thandled = false;\n\t\t\t\t\t\tbreak; // hide on tab out\n\t\t\t\tcase 13: var sel = $('td.' + $.datepicker._dayOverClass + ':not(.' + \n\t\t\t\t\t\t\t\t\t$.datepicker._currentClass + ')', inst.dpDiv);\n\t\t\t\t\t\tif (sel[0])\n\t\t\t\t\t\t\t$.datepicker._selectDay(event.target, inst.selectedMonth, inst.selectedYear, sel[0]);\n\t\t\t\t\t\t\tvar onSelect = $.datepicker._get(inst, 'onSelect');\n\t\t\t\t\t\t\tif (onSelect) {\n\t\t\t\t\t\t\t\tvar dateStr = $.datepicker._formatDate(inst);\n\n\t\t\t\t\t\t\t\t// trigger custom callback\n\t\t\t\t\t\t\t\tonSelect.apply((inst.input ? inst.input[0] : null), [dateStr, inst]);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t$.datepicker._hideDatepicker();\n\t\t\t\t\t\treturn false; // don't submit the form\n\t\t\t\t\t\tbreak; // select the value on enter\n\t\t\t\tcase 27: $.datepicker._hideDatepicker();\n\t\t\t\t\t\tbreak; // hide on escape\n\t\t\t\tcase 33: $.datepicker._adjustDate(event.target, (event.ctrlKey ?\n\t\t\t\t\t\t\t-$.datepicker._get(inst, 'stepBigMonths') :\n\t\t\t\t\t\t\t-$.datepicker._get(inst, 'stepMonths')), 'M');\n\t\t\t\t\t\tbreak; // previous month/year on page up/+ ctrl\n\t\t\t\tcase 34: $.datepicker._adjustDate(event.target, (event.ctrlKey ?\n\t\t\t\t\t\t\t+$.datepicker._get(inst, 'stepBigMonths') :\n\t\t\t\t\t\t\t+$.datepicker._get(inst, 'stepMonths')), 'M');\n\t\t\t\t\t\tbreak; // next month/year on page down/+ ctrl\n\t\t\t\tcase 35: if (event.ctrlKey || event.metaKey) $.datepicker._clearDate(event.target);\n\t\t\t\t\t\thandled = event.ctrlKey || event.metaKey;\n\t\t\t\t\t\tbreak; // clear on ctrl or command +end\n\t\t\t\tcase 36: if (event.ctrlKey || event.metaKey) $.datepicker._gotoToday(event.target);\n\t\t\t\t\t\thandled = event.ctrlKey || event.metaKey;\n\t\t\t\t\t\tbreak; // current on ctrl or command +home\n\t\t\t\tcase 37: if (event.ctrlKey || event.metaKey) $.datepicker._adjustDate(event.target, (isRTL ? +1 : -1), 'D');\n\t\t\t\t\t\thandled = event.ctrlKey || event.metaKey;\n\t\t\t\t\t\t// -1 day on ctrl or command +left\n\t\t\t\t\t\tif (event.originalEvent.altKey) $.datepicker._adjustDate(event.target, (event.ctrlKey ?\n\t\t\t\t\t\t\t\t\t-$.datepicker._get(inst, 'stepBigMonths') :\n\t\t\t\t\t\t\t\t\t-$.datepicker._get(inst, 'stepMonths')), 'M');\n\t\t\t\t\t\t// next month/year on alt +left on Mac\n\t\t\t\t\t\tbreak;\n\t\t\t\tcase 38: if (event.ctrlKey || event.metaKey) $.datepicker._adjustDate(event.target, -7, 'D');\n\t\t\t\t\t\thandled = event.ctrlKey || event.metaKey;\n\t\t\t\t\t\tbreak; // -1 week on ctrl or command +up\n\t\t\t\tcase 39: if (event.ctrlKey || event.metaKey) $.datepicker._adjustDate(event.target, (isRTL ? -1 : +1), 'D');\n\t\t\t\t\t\thandled = event.ctrlKey || event.metaKey;\n\t\t\t\t\t\t// +1 day on ctrl or command +right\n\t\t\t\t\t\tif (event.originalEvent.altKey) $.datepicker._adjustDate(event.target, (event.ctrlKey ?\n\t\t\t\t\t\t\t\t\t+$.datepicker._get(inst, 'stepBigMonths') :\n\t\t\t\t\t\t\t\t\t+$.datepicker._get(inst, 'stepMonths')), 'M');\n\t\t\t\t\t\t// next month/year on alt +right\n\t\t\t\t\t\tbreak;\n\t\t\t\tcase 40: if (event.ctrlKey || event.metaKey) $.datepicker._adjustDate(event.target, +7, 'D');\n\t\t\t\t\t\thandled = event.ctrlKey || event.metaKey;\n\t\t\t\t\t\tbreak; // +1 week on ctrl or command +down\n\t\t\t\tdefault: handled = false;\n\t\t\t}\n\t\telse if (event.keyCode == 36 && event.ctrlKey) // display the date picker on ctrl+home\n\t\t\t$.datepicker._showDatepicker(this);\n\t\telse {\n\t\t\thandled = false;\n\t\t}\n\t\tif (handled) {\n\t\t\tevent.preventDefault();\n\t\t\tevent.stopPropagation();\n\t\t}\n\t},\n\n\t/* Filter entered characters - based on date format. */\n\t_doKeyPress: function(event) {\n\t\tvar inst = $.datepicker._getInst(event.target);\n\t\tif ($.datepicker._get(inst, 'constrainInput')) {\n\t\t\tvar chars = $.datepicker._possibleChars($.datepicker._get(inst, 'dateFormat'));\n\t\t\tvar chr = String.fromCharCode(event.charCode == undefined ? event.keyCode : event.charCode);\n\t\t\treturn event.ctrlKey || event.metaKey || (chr < ' ' || !chars || chars.indexOf(chr) > -1);\n\t\t}\n\t},\n\n\t/* Synchronise manual entry and field/alternate field. */\n\t_doKeyUp: function(event) {\n\t\tvar inst = $.datepicker._getInst(event.target);\n\t\tif (inst.input.val() != inst.lastVal) {\n\t\t\ttry {\n\t\t\t\tvar date = $.datepicker.parseDate($.datepicker._get(inst, 'dateFormat'),\n\t\t\t\t\t(inst.input ? inst.input.val() : null),\n\t\t\t\t\t$.datepicker._getFormatConfig(inst));\n\t\t\t\tif (date) { // only if valid\n\t\t\t\t\t$.datepicker._setDateFromField(inst);\n\t\t\t\t\t$.datepicker._updateAlternate(inst);\n\t\t\t\t\t$.datepicker._updateDatepicker(inst);\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (err) {\n\t\t\t\t$.datepicker.log(err);\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t},\n\n\t/* Pop-up the date picker for a given input field.\n       If false returned from beforeShow event handler do not show. \n\t   @param  input  element - the input field attached to the date picker or\n\t                  event - if triggered by focus */\n\t_showDatepicker: function(input) {\n\t\tinput = input.target || input;\n\t\tif (input.nodeName.toLowerCase() != 'input') // find from button/image trigger\n\t\t\tinput = $('input', input.parentNode)[0];\n\t\tif ($.datepicker._isDisabledDatepicker(input) || $.datepicker._lastInput == input) // already here\n\t\t\treturn;\n\t\tvar inst = $.datepicker._getInst(input);\n\t\tif ($.datepicker._curInst && $.datepicker._curInst != inst) {\n\t\t\t$.datepicker._curInst.dpDiv.stop(true, true);\n\t\t\tif ( inst && $.datepicker._datepickerShowing ) {\n\t\t\t\t$.datepicker._hideDatepicker( $.datepicker._curInst.input[0] );\n\t\t\t}\n\t\t}\n\t\tvar beforeShow = $.datepicker._get(inst, 'beforeShow');\n\t\tvar beforeShowSettings = beforeShow ? beforeShow.apply(input, [input, inst]) : {};\n\t\tif(beforeShowSettings === false){\n            //false\n\t\t\treturn;\n\t\t}\n\t\textendRemove(inst.settings, beforeShowSettings);\n\t\tinst.lastVal = null;\n\t\t$.datepicker._lastInput = input;\n\t\t$.datepicker._setDateFromField(inst);\n\t\tif ($.datepicker._inDialog) // hide cursor\n\t\t\tinput.value = '';\n\t\tif (!$.datepicker._pos) { // position below input\n\t\t\t$.datepicker._pos = $.datepicker._findPos(input);\n\t\t\t$.datepicker._pos[1] += input.offsetHeight; // add the height\n\t\t}\n\t\tvar isFixed = false;\n\t\t$(input).parents().each(function() {\n\t\t\tisFixed |= $(this).css('position') == 'fixed';\n\t\t\treturn !isFixed;\n\t\t});\n\t\tif (isFixed && $.browser.opera) { // correction for Opera when fixed and scrolled\n\t\t\t$.datepicker._pos[0] -= document.documentElement.scrollLeft;\n\t\t\t$.datepicker._pos[1] -= document.documentElement.scrollTop;\n\t\t}\n\t\tvar offset = {left: $.datepicker._pos[0], top: $.datepicker._pos[1]};\n\t\t$.datepicker._pos = null;\n\t\t//to avoid flashes on Firefox\n\t\tinst.dpDiv.empty();\n\t\t// determine sizing offscreen\n\t\tinst.dpDiv.css({position: 'absolute', display: 'block', top: '-1000px'});\n\t\t$.datepicker._updateDatepicker(inst);\n\t\t// fix width for dynamic number of date pickers\n\t\t// and adjust position before showing\n\t\toffset = $.datepicker._checkOffset(inst, offset, isFixed);\n\t\tinst.dpDiv.css({position: ($.datepicker._inDialog && $.blockUI ?\n\t\t\t'static' : (isFixed ? 'fixed' : 'absolute')), display: 'none',\n\t\t\tleft: offset.left + 'px', top: offset.top + 'px'});\n\t\tif (!inst.inline) {\n\t\t\tvar showAnim = $.datepicker._get(inst, 'showAnim');\n\t\t\tvar duration = $.datepicker._get(inst, 'duration');\n\t\t\tvar postProcess = function() {\n\t\t\t\tvar cover = inst.dpDiv.find('iframe.ui-datepicker-cover'); // IE6- only\n\t\t\t\tif( !! cover.length ){\n\t\t\t\t\tvar borders = $.datepicker._getBorders(inst.dpDiv);\n\t\t\t\t\tcover.css({left: -borders[0], top: -borders[1],\n\t\t\t\t\t\twidth: inst.dpDiv.outerWidth(), height: inst.dpDiv.outerHeight()});\n\t\t\t\t}\n\t\t\t};\n\t\t\tinst.dpDiv.zIndex($(input).zIndex()+1);\n\t\t\t$.datepicker._datepickerShowing = true;\n\t\t\tif ($.effects && $.effects[showAnim])\n\t\t\t\tinst.dpDiv.show(showAnim, $.datepicker._get(inst, 'showOptions'), duration, postProcess);\n\t\t\telse\n\t\t\t\tinst.dpDiv[showAnim || 'show']((showAnim ? duration : null), postProcess);\n\t\t\tif (!showAnim || !duration)\n\t\t\t\tpostProcess();\n\t\t\tif (inst.input.is(':visible') && !inst.input.is(':disabled'))\n\t\t\t\tinst.input.focus();\n\t\t\t$.datepicker._curInst = inst;\n\t\t}\n\t},\n\n\t/* Generate the date picker content. */\n\t_updateDatepicker: function(inst) {\n\t\tvar self = this;\n\t\tself.maxRows = 4; //Reset the max number of rows being displayed (see #7043)\n\t\tvar borders = $.datepicker._getBorders(inst.dpDiv);\n\t\tinstActive = inst; // for delegate hover events\n\t\tinst.dpDiv.empty().append(this._generateHTML(inst));\n\t\tvar cover = inst.dpDiv.find('iframe.ui-datepicker-cover'); // IE6- only\n\t\tif( !!cover.length ){ //avoid call to outerXXXX() when not in IE6\n\t\t\tcover.css({left: -borders[0], top: -borders[1], width: inst.dpDiv.outerWidth(), height: inst.dpDiv.outerHeight()})\n\t\t}\n\t\tinst.dpDiv.find('.' + this._dayOverClass + ' a').mouseover();\n\t\tvar numMonths = this._getNumberOfMonths(inst);\n\t\tvar cols = numMonths[1];\n\t\tvar width = 17;\n\t\tinst.dpDiv.removeClass('ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4').width('');\n\t\tif (cols > 1)\n\t\t\tinst.dpDiv.addClass('ui-datepicker-multi-' + cols).css('width', (width * cols) + 'em');\n\t\tinst.dpDiv[(numMonths[0] != 1 || numMonths[1] != 1 ? 'add' : 'remove') +\n\t\t\t'Class']('ui-datepicker-multi');\n\t\tinst.dpDiv[(this._get(inst, 'isRTL') ? 'add' : 'remove') +\n\t\t\t'Class']('ui-datepicker-rtl');\n\t\tif (inst == $.datepicker._curInst && $.datepicker._datepickerShowing && inst.input &&\n\t\t\t\t// #6694 - don't focus the input if it's already focused\n\t\t\t\t// this breaks the change event in IE\n\t\t\t\tinst.input.is(':visible') && !inst.input.is(':disabled') && inst.input[0] != document.activeElement)\n\t\t\tinst.input.focus();\n\t\t// deffered render of the years select (to avoid flashes on Firefox) \n\t\tif( inst.yearshtml ){\n\t\t\tvar origyearshtml = inst.yearshtml;\n\t\t\tsetTimeout(function(){\n\t\t\t\t//assure that inst.yearshtml didn't change.\n\t\t\t\tif( origyearshtml === inst.yearshtml && inst.yearshtml ){\n\t\t\t\t\tinst.dpDiv.find('select.ui-datepicker-year:first').replaceWith(inst.yearshtml);\n\t\t\t\t}\n\t\t\t\torigyearshtml = inst.yearshtml = null;\n\t\t\t}, 0);\n\t\t}\n\t},\n\n\t/* Retrieve the size of left and top borders for an element.\n\t   @param  elem  (jQuery object) the element of interest\n\t   @return  (number[2]) the left and top borders */\n\t_getBorders: function(elem) {\n\t\tvar convert = function(value) {\n\t\t\treturn {thin: 1, medium: 2, thick: 3}[value] || value;\n\t\t};\n\t\treturn [parseFloat(convert(elem.css('border-left-width'))),\n\t\t\tparseFloat(convert(elem.css('border-top-width')))];\n\t},\n\n\t/* Check positioning to remain on screen. */\n\t_checkOffset: function(inst, offset, isFixed) {\n\t\tvar dpWidth = inst.dpDiv.outerWidth();\n\t\tvar dpHeight = inst.dpDiv.outerHeight();\n\t\tvar inputWidth = inst.input ? inst.input.outerWidth() : 0;\n\t\tvar inputHeight = inst.input ? inst.input.outerHeight() : 0;\n\t\tvar viewWidth = document.documentElement.clientWidth + $(document).scrollLeft();\n\t\tvar viewHeight = document.documentElement.clientHeight + $(document).scrollTop();\n\n\t\toffset.left -= (this._get(inst, 'isRTL') ? (dpWidth - inputWidth) : 0);\n\t\toffset.left -= (isFixed && offset.left == inst.input.offset().left) ? $(document).scrollLeft() : 0;\n\t\toffset.top -= (isFixed && offset.top == (inst.input.offset().top + inputHeight)) ? $(document).scrollTop() : 0;\n\n\t\t// now check if datepicker is showing outside window viewport - move to a better place if so.\n\t\toffset.left -= Math.min(offset.left, (offset.left + dpWidth > viewWidth && viewWidth > dpWidth) ?\n\t\t\tMath.abs(offset.left + dpWidth - viewWidth) : 0);\n\t\toffset.top -= Math.min(offset.top, (offset.top + dpHeight > viewHeight && viewHeight > dpHeight) ?\n\t\t\tMath.abs(dpHeight + inputHeight) : 0);\n\n\t\treturn offset;\n\t},\n\n\t/* Find an object's position on the screen. */\n\t_findPos: function(obj) {\n\t\tvar inst = this._getInst(obj);\n\t\tvar isRTL = this._get(inst, 'isRTL');\n        while (obj && (obj.type == 'hidden' || obj.nodeType != 1 || $.expr.filters.hidden(obj))) {\n            obj = obj[isRTL ? 'previousSibling' : 'nextSibling'];\n        }\n        var position = $(obj).offset();\n\t    return [position.left, position.top];\n\t},\n\n\t/* Hide the date picker from view.\n\t   @param  input  element - the input field attached to the date picker */\n\t_hideDatepicker: function(input) {\n\t\tvar inst = this._curInst;\n\t\tif (!inst || (input && inst != $.data(input, PROP_NAME)))\n\t\t\treturn;\n\t\tif (this._datepickerShowing) {\n\t\t\tvar showAnim = this._get(inst, 'showAnim');\n\t\t\tvar duration = this._get(inst, 'duration');\n\t\t\tvar postProcess = function() {\n\t\t\t\t$.datepicker._tidyDialog(inst);\n\t\t\t};\n\t\t\tif ($.effects && $.effects[showAnim])\n\t\t\t\tinst.dpDiv.hide(showAnim, $.datepicker._get(inst, 'showOptions'), duration, postProcess);\n\t\t\telse\n\t\t\t\tinst.dpDiv[(showAnim == 'slideDown' ? 'slideUp' :\n\t\t\t\t\t(showAnim == 'fadeIn' ? 'fadeOut' : 'hide'))]((showAnim ? duration : null), postProcess);\n\t\t\tif (!showAnim)\n\t\t\t\tpostProcess();\n\t\t\tthis._datepickerShowing = false;\n\t\t\tvar onClose = this._get(inst, 'onClose');\n\t\t\tif (onClose)\n\t\t\t\tonClose.apply((inst.input ? inst.input[0] : null),\n\t\t\t\t\t[(inst.input ? inst.input.val() : ''), inst]);\n\t\t\tthis._lastInput = null;\n\t\t\tif (this._inDialog) {\n\t\t\t\tthis._dialogInput.css({ position: 'absolute', left: '0', top: '-100px' });\n\t\t\t\tif ($.blockUI) {\n\t\t\t\t\t$.unblockUI();\n\t\t\t\t\t$('body').append(this.dpDiv);\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis._inDialog = false;\n\t\t}\n\t},\n\n\t/* Tidy up after a dialog display. */\n\t_tidyDialog: function(inst) {\n\t\tinst.dpDiv.removeClass(this._dialogClass).unbind('.ui-datepicker-calendar');\n\t},\n\n\t/* Close date picker if clicked elsewhere. */\n\t_checkExternalClick: function(event) {\n\t\tif (!$.datepicker._curInst)\n\t\t\treturn;\n\n\t\tvar $target = $(event.target),\n\t\t\tinst = $.datepicker._getInst($target[0]);\n\n\t\tif ( ( ( $target[0].id != $.datepicker._mainDivId &&\n\t\t\t\t$target.parents('#' + $.datepicker._mainDivId).length == 0 &&\n\t\t\t\t!$target.hasClass($.datepicker.markerClassName) &&\n\t\t\t\t!$target.closest(\".\" + $.datepicker._triggerClass).length &&\n\t\t\t\t$.datepicker._datepickerShowing && !($.datepicker._inDialog && $.blockUI) ) ) ||\n\t\t\t( $target.hasClass($.datepicker.markerClassName) && $.datepicker._curInst != inst ) )\n\t\t\t$.datepicker._hideDatepicker();\n\t},\n\n\t/* Adjust one of the date sub-fields. */\n\t_adjustDate: function(id, offset, period) {\n\t\tvar target = $(id);\n\t\tvar inst = this._getInst(target[0]);\n\t\tif (this._isDisabledDatepicker(target[0])) {\n\t\t\treturn;\n\t\t}\n\t\tthis._adjustInstDate(inst, offset +\n\t\t\t(period == 'M' ? this._get(inst, 'showCurrentAtPos') : 0), // undo positioning\n\t\t\tperiod);\n\t\tthis._updateDatepicker(inst);\n\t},\n\n\t/* Action for current link. */\n\t_gotoToday: function(id) {\n\t\tvar target = $(id);\n\t\tvar inst = this._getInst(target[0]);\n\t\tif (this._get(inst, 'gotoCurrent') && inst.currentDay) {\n\t\t\tinst.selectedDay = inst.currentDay;\n\t\t\tinst.drawMonth = inst.selectedMonth = inst.currentMonth;\n\t\t\tinst.drawYear = inst.selectedYear = inst.currentYear;\n\t\t}\n\t\telse {\n\t\t\tvar date = new Date();\n\t\t\tinst.selectedDay = date.getDate();\n\t\t\tinst.drawMonth = inst.selectedMonth = date.getMonth();\n\t\t\tinst.drawYear = inst.selectedYear = date.getFullYear();\n\t\t}\n\t\tthis._notifyChange(inst);\n\t\tthis._adjustDate(target);\n\t},\n\n\t/* Action for selecting a new month/year. */\n\t_selectMonthYear: function(id, select, period) {\n\t\tvar target = $(id);\n\t\tvar inst = this._getInst(target[0]);\n\t\tinst['selected' + (period == 'M' ? 'Month' : 'Year')] =\n\t\tinst['draw' + (period == 'M' ? 'Month' : 'Year')] =\n\t\t\tparseInt(select.options[select.selectedIndex].value,10);\n\t\tthis._notifyChange(inst);\n\t\tthis._adjustDate(target);\n\t},\n\n\t/* Action for selecting a day. */\n\t_selectDay: function(id, month, year, td) {\n\t\tvar target = $(id);\n\t\tif ($(td).hasClass(this._unselectableClass) || this._isDisabledDatepicker(target[0])) {\n\t\t\treturn;\n\t\t}\n\t\tvar inst = this._getInst(target[0]);\n\t\tinst.selectedDay = inst.currentDay = $('a', td).html();\n\t\tinst.selectedMonth = inst.currentMonth = month;\n\t\tinst.selectedYear = inst.currentYear = year;\n\t\tthis._selectDate(id, this._formatDate(inst,\n\t\t\tinst.currentDay, inst.currentMonth, inst.currentYear));\n\t},\n\n\t/* Erase the input field and hide the date picker. */\n\t_clearDate: function(id) {\n\t\tvar target = $(id);\n\t\tvar inst = this._getInst(target[0]);\n\t\tthis._selectDate(target, '');\n\t},\n\n\t/* Update the input field with the selected date. */\n\t_selectDate: function(id, dateStr) {\n\t\tvar target = $(id);\n\t\tvar inst = this._getInst(target[0]);\n\t\tdateStr = (dateStr != null ? dateStr : this._formatDate(inst));\n\t\tif (inst.input)\n\t\t\tinst.input.val(dateStr);\n\t\tthis._updateAlternate(inst);\n\t\tvar onSelect = this._get(inst, 'onSelect');\n\t\tif (onSelect)\n\t\t\tonSelect.apply((inst.input ? inst.input[0] : null), [dateStr, inst]);  // trigger custom callback\n\t\telse if (inst.input)\n\t\t\tinst.input.trigger('change'); // fire the change event\n\t\tif (inst.inline)\n\t\t\tthis._updateDatepicker(inst);\n\t\telse {\n\t\t\tthis._hideDatepicker();\n\t\t\tthis._lastInput = inst.input[0];\n\t\t\tif (typeof(inst.input[0]) != 'object')\n\t\t\t\tinst.input.focus(); // restore focus\n\t\t\tthis._lastInput = null;\n\t\t}\n\t},\n\n\t/* Update any alternate field to synchronise with the main field. */\n\t_updateAlternate: function(inst) {\n\t\tvar altField = this._get(inst, 'altField');\n\t\tif (altField) { // update alternate field too\n\t\t\tvar altFormat = this._get(inst, 'altFormat') || this._get(inst, 'dateFormat');\n\t\t\tvar date = this._getDate(inst);\n\t\t\tvar dateStr = this.formatDate(altFormat, date, this._getFormatConfig(inst));\n\t\t\t$(altField).each(function() { $(this).val(dateStr); });\n\t\t}\n\t},\n\n\t/* Set as beforeShowDay function to prevent selection of weekends.\n\t   @param  date  Date - the date to customise\n\t   @return [boolean, string] - is this date selectable?, what is its CSS class? */\n\tnoWeekends: function(date) {\n\t\tvar day = date.getDay();\n\t\treturn [(day > 0 && day < 6), ''];\n\t},\n\n\t/* Set as calculateWeek to determine the week of the year based on the ISO 8601 definition.\n\t   @param  date  Date - the date to get the week for\n\t   @return  number - the number of the week within the year that contains this date */\n\tiso8601Week: function(date) {\n\t\tvar checkDate = new Date(date.getTime());\n\t\t// Find Thursday of this week starting on Monday\n\t\tcheckDate.setDate(checkDate.getDate() + 4 - (checkDate.getDay() || 7));\n\t\tvar time = checkDate.getTime();\n\t\tcheckDate.setMonth(0); // Compare with Jan 1\n\t\tcheckDate.setDate(1);\n\t\treturn Math.floor(Math.round((time - checkDate) / 86400000) / 7) + 1;\n\t},\n\n\t/* Parse a string value into a date object.\n\t   See formatDate below for the possible formats.\n\n\t   @param  format    string - the expected format of the date\n\t   @param  value     string - the date in the above format\n\t   @param  settings  Object - attributes include:\n\t                     shortYearCutoff  number - the cutoff year for determining the century (optional)\n\t                     dayNamesShort    string[7] - abbreviated names of the days from Sunday (optional)\n\t                     dayNames         string[7] - names of the days from Sunday (optional)\n\t                     monthNamesShort  string[12] - abbreviated names of the months (optional)\n\t                     monthNames       string[12] - names of the months (optional)\n\t   @return  Date - the extracted date value or null if value is blank */\n\tparseDate: function (format, value, settings) {\n\t\tif (format == null || value == null)\n\t\t\tthrow 'Invalid arguments';\n\t\tvalue = (typeof value == 'object' ? value.toString() : value + '');\n\t\tif (value == '')\n\t\t\treturn null;\n\t\tvar shortYearCutoff = (settings ? settings.shortYearCutoff : null) || this._defaults.shortYearCutoff;\n\t\tshortYearCutoff = (typeof shortYearCutoff != 'string' ? shortYearCutoff :\n\t\t\t\tnew Date().getFullYear() % 100 + parseInt(shortYearCutoff, 10));\n\t\tvar dayNamesShort = (settings ? settings.dayNamesShort : null) || this._defaults.dayNamesShort;\n\t\tvar dayNames = (settings ? settings.dayNames : null) || this._defaults.dayNames;\n\t\tvar monthNamesShort = (settings ? settings.monthNamesShort : null) || this._defaults.monthNamesShort;\n\t\tvar monthNames = (settings ? settings.monthNames : null) || this._defaults.monthNames;\n\t\tvar year = -1;\n\t\tvar month = -1;\n\t\tvar day = -1;\n\t\tvar doy = -1;\n\t\tvar literal = false;\n\t\t// Check whether a format character is doubled\n\t\tvar lookAhead = function(match) {\n\t\t\tvar matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) == match);\n\t\t\tif (matches)\n\t\t\t\tiFormat++;\n\t\t\treturn matches;\n\t\t};\n\t\t// Extract a number from the string value\n\t\tvar getNumber = function(match) {\n\t\t\tvar isDoubled = lookAhead(match);\n\t\t\tvar size = (match == '@' ? 14 : (match == '!' ? 20 :\n\t\t\t\t(match == 'y' && isDoubled ? 4 : (match == 'o' ? 3 : 2))));\n\t\t\tvar digits = new RegExp('^\\\\d{1,' + size + '}');\n\t\t\tvar num = value.substring(iValue).match(digits);\n\t\t\tif (!num)\n\t\t\t\tthrow 'Missing number at position ' + iValue;\n\t\t\tiValue += num[0].length;\n\t\t\treturn parseInt(num[0], 10);\n\t\t};\n\t\t// Extract a name from the string value and convert to an index\n\t\tvar getName = function(match, shortNames, longNames) {\n\t\t\tvar names = $.map(lookAhead(match) ? longNames : shortNames, function (v, k) {\n\t\t\t\treturn [ [k, v] ];\n\t\t\t}).sort(function (a, b) {\n\t\t\t\treturn -(a[1].length - b[1].length);\n\t\t\t});\n\t\t\tvar index = -1;\n\t\t\t$.each(names, function (i, pair) {\n\t\t\t\tvar name = pair[1];\n\t\t\t\tif (value.substr(iValue, name.length).toLowerCase() == name.toLowerCase()) {\n\t\t\t\t\tindex = pair[0];\n\t\t\t\t\tiValue += name.length;\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t});\n\t\t\tif (index != -1)\n\t\t\t\treturn index + 1;\n\t\t\telse\n\t\t\t\tthrow 'Unknown name at position ' + iValue;\n\t\t};\n\t\t// Confirm that a literal character matches the string value\n\t\tvar checkLiteral = function() {\n\t\t\tif (value.charAt(iValue) != format.charAt(iFormat))\n\t\t\t\tthrow 'Unexpected literal at position ' + iValue;\n\t\t\tiValue++;\n\t\t};\n\t\tvar iValue = 0;\n\t\tfor (var iFormat = 0; iFormat < format.length; iFormat++) {\n\t\t\tif (literal)\n\t\t\t\tif (format.charAt(iFormat) == \"'\" && !lookAhead(\"'\"))\n\t\t\t\t\tliteral = false;\n\t\t\t\telse\n\t\t\t\t\tcheckLiteral();\n\t\t\telse\n\t\t\t\tswitch (format.charAt(iFormat)) {\n\t\t\t\t\tcase 'd':\n\t\t\t\t\t\tday = getNumber('d');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'D':\n\t\t\t\t\t\tgetName('D', dayNamesShort, dayNames);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'o':\n\t\t\t\t\t\tdoy = getNumber('o');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'm':\n\t\t\t\t\t\tmonth = getNumber('m');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'M':\n\t\t\t\t\t\tmonth = getName('M', monthNamesShort, monthNames);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'y':\n\t\t\t\t\t\tyear = getNumber('y');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase '@':\n\t\t\t\t\t\tvar date = new Date(getNumber('@'));\n\t\t\t\t\t\tyear = date.getFullYear();\n\t\t\t\t\t\tmonth = date.getMonth() + 1;\n\t\t\t\t\t\tday = date.getDate();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase '!':\n\t\t\t\t\t\tvar date = new Date((getNumber('!') - this._ticksTo1970) / 10000);\n\t\t\t\t\t\tyear = date.getFullYear();\n\t\t\t\t\t\tmonth = date.getMonth() + 1;\n\t\t\t\t\t\tday = date.getDate();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"'\":\n\t\t\t\t\t\tif (lookAhead(\"'\"))\n\t\t\t\t\t\t\tcheckLiteral();\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tliteral = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tcheckLiteral();\n\t\t\t\t}\n\t\t}\n\t\tif (iValue < value.length){\n\t\t\tthrow \"Extra/unparsed characters found in date: \" + value.substring(iValue);\n\t\t}\n\t\tif (year == -1)\n\t\t\tyear = new Date().getFullYear();\n\t\telse if (year < 100)\n\t\t\tyear += new Date().getFullYear() - new Date().getFullYear() % 100 +\n\t\t\t\t(year <= shortYearCutoff ? 0 : -100);\n\t\tif (doy > -1) {\n\t\t\tmonth = 1;\n\t\t\tday = doy;\n\t\t\tdo {\n\t\t\t\tvar dim = this._getDaysInMonth(year, month - 1);\n\t\t\t\tif (day <= dim)\n\t\t\t\t\tbreak;\n\t\t\t\tmonth++;\n\t\t\t\tday -= dim;\n\t\t\t} while (true);\n\t\t}\n\t\tvar date = this._daylightSavingAdjust(new Date(year, month - 1, day));\n\t\tif (date.getFullYear() != year || date.getMonth() + 1 != month || date.getDate() != day)\n\t\t\tthrow 'Invalid date'; // E.g. 31/02/00\n\t\treturn date;\n\t},\n\n\t/* Standard date formats. */\n\tATOM: 'yy-mm-dd', // RFC 3339 (ISO 8601)\n\tCOOKIE: 'D, dd M yy',\n\tISO_8601: 'yy-mm-dd',\n\tRFC_822: 'D, d M y',\n\tRFC_850: 'DD, dd-M-y',\n\tRFC_1036: 'D, d M y',\n\tRFC_1123: 'D, d M yy',\n\tRFC_2822: 'D, d M yy',\n\tRSS: 'D, d M y', // RFC 822\n\tTICKS: '!',\n\tTIMESTAMP: '@',\n\tW3C: 'yy-mm-dd', // ISO 8601\n\n\t_ticksTo1970: (((1970 - 1) * 365 + Math.floor(1970 / 4) - Math.floor(1970 / 100) +\n\t\tMath.floor(1970 / 400)) * 24 * 60 * 60 * 10000000),\n\n\t/* Format a date object into a string value.\n\t   The format can be combinations of the following:\n\t   d  - day of month (no leading zero)\n\t   dd - day of month (two digit)\n\t   o  - day of year (no leading zeros)\n\t   oo - day of year (three digit)\n\t   D  - day name short\n\t   DD - day name long\n\t   m  - month of year (no leading zero)\n\t   mm - month of year (two digit)\n\t   M  - month name short\n\t   MM - month name long\n\t   y  - year (two digit)\n\t   yy - year (four digit)\n\t   @ - Unix timestamp (ms since 01/01/1970)\n\t   ! - Windows ticks (100ns since 01/01/0001)\n\t   '...' - literal text\n\t   '' - single quote\n\n\t   @param  format    string - the desired format of the date\n\t   @param  date      Date - the date value to format\n\t   @param  settings  Object - attributes include:\n\t                     dayNamesShort    string[7] - abbreviated names of the days from Sunday (optional)\n\t                     dayNames         string[7] - names of the days from Sunday (optional)\n\t                     monthNamesShort  string[12] - abbreviated names of the months (optional)\n\t                     monthNames       string[12] - names of the months (optional)\n\t   @return  string - the date in the above format */\n\tformatDate: function (format, date, settings) {\n\t\tif (!date)\n\t\t\treturn '';\n\t\tvar dayNamesShort = (settings ? settings.dayNamesShort : null) || this._defaults.dayNamesShort;\n\t\tvar dayNames = (settings ? settings.dayNames : null) || this._defaults.dayNames;\n\t\tvar monthNamesShort = (settings ? settings.monthNamesShort : null) || this._defaults.monthNamesShort;\n\t\tvar monthNames = (settings ? settings.monthNames : null) || this._defaults.monthNames;\n\t\t// Check whether a format character is doubled\n\t\tvar lookAhead = function(match) {\n\t\t\tvar matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) == match);\n\t\t\tif (matches)\n\t\t\t\tiFormat++;\n\t\t\treturn matches;\n\t\t};\n\t\t// Format a number, with leading zero if necessary\n\t\tvar formatNumber = function(match, value, len) {\n\t\t\tvar num = '' + value;\n\t\t\tif (lookAhead(match))\n\t\t\t\twhile (num.length < len)\n\t\t\t\t\tnum = '0' + num;\n\t\t\treturn num;\n\t\t};\n\t\t// Format a name, short or long as requested\n\t\tvar formatName = function(match, value, shortNames, longNames) {\n\t\t\treturn (lookAhead(match) ? longNames[value] : shortNames[value]);\n\t\t};\n\t\tvar output = '';\n\t\tvar literal = false;\n\t\tif (date)\n\t\t\tfor (var iFormat = 0; iFormat < format.length; iFormat++) {\n\t\t\t\tif (literal)\n\t\t\t\t\tif (format.charAt(iFormat) == \"'\" && !lookAhead(\"'\"))\n\t\t\t\t\t\tliteral = false;\n\t\t\t\t\telse\n\t\t\t\t\t\toutput += format.charAt(iFormat);\n\t\t\t\telse\n\t\t\t\t\tswitch (format.charAt(iFormat)) {\n\t\t\t\t\t\tcase 'd':\n\t\t\t\t\t\t\toutput += formatNumber('d', date.getDate(), 2);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'D':\n\t\t\t\t\t\t\toutput += formatName('D', date.getDay(), dayNamesShort, dayNames);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'o':\n\t\t\t\t\t\t\toutput += formatNumber('o',\n\t\t\t\t\t\t\t\tMath.round((new Date(date.getFullYear(), date.getMonth(), date.getDate()).getTime() - new Date(date.getFullYear(), 0, 0).getTime()) / 86400000), 3);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'm':\n\t\t\t\t\t\t\toutput += formatNumber('m', date.getMonth() + 1, 2);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'M':\n\t\t\t\t\t\t\toutput += formatName('M', date.getMonth(), monthNamesShort, monthNames);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'y':\n\t\t\t\t\t\t\toutput += (lookAhead('y') ? date.getFullYear() :\n\t\t\t\t\t\t\t\t(date.getYear() % 100 < 10 ? '0' : '') + date.getYear() % 100);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase '@':\n\t\t\t\t\t\t\toutput += date.getTime();\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase '!':\n\t\t\t\t\t\t\toutput += date.getTime() * 10000 + this._ticksTo1970;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"'\":\n\t\t\t\t\t\t\tif (lookAhead(\"'\"))\n\t\t\t\t\t\t\t\toutput += \"'\";\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\tliteral = true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\toutput += format.charAt(iFormat);\n\t\t\t\t\t}\n\t\t\t}\n\t\treturn output;\n\t},\n\n\t/* Extract all possible characters from the date format. */\n\t_possibleChars: function (format) {\n\t\tvar chars = '';\n\t\tvar literal = false;\n\t\t// Check whether a format character is doubled\n\t\tvar lookAhead = function(match) {\n\t\t\tvar matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) == match);\n\t\t\tif (matches)\n\t\t\t\tiFormat++;\n\t\t\treturn matches;\n\t\t};\n\t\tfor (var iFormat = 0; iFormat < format.length; iFormat++)\n\t\t\tif (literal)\n\t\t\t\tif (format.charAt(iFormat) == \"'\" && !lookAhead(\"'\"))\n\t\t\t\t\tliteral = false;\n\t\t\t\telse\n\t\t\t\t\tchars += format.charAt(iFormat);\n\t\t\telse\n\t\t\t\tswitch (format.charAt(iFormat)) {\n\t\t\t\t\tcase 'd': case 'm': case 'y': case '@':\n\t\t\t\t\t\tchars += '0123456789';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'D': case 'M':\n\t\t\t\t\t\treturn null; // Accept anything\n\t\t\t\t\tcase \"'\":\n\t\t\t\t\t\tif (lookAhead(\"'\"))\n\t\t\t\t\t\t\tchars += \"'\";\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tliteral = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tchars += format.charAt(iFormat);\n\t\t\t\t}\n\t\treturn chars;\n\t},\n\n\t/* Get a setting value, defaulting if necessary. */\n\t_get: function(inst, name) {\n\t\treturn inst.settings[name] !== undefined ?\n\t\t\tinst.settings[name] : this._defaults[name];\n\t},\n\n\t/* Parse existing date and initialise date picker. */\n\t_setDateFromField: function(inst, noDefault) {\n\t\tif (inst.input.val() == inst.lastVal) {\n\t\t\treturn;\n\t\t}\n\t\tvar dateFormat = this._get(inst, 'dateFormat');\n\t\tvar dates = inst.lastVal = inst.input ? inst.input.val() : null;\n\t\tvar date, defaultDate;\n\t\tdate = defaultDate = this._getDefaultDate(inst);\n\t\tvar settings = this._getFormatConfig(inst);\n\t\ttry {\n\t\t\tdate = this.parseDate(dateFormat, dates, settings) || defaultDate;\n\t\t} catch (event) {\n\t\t\tthis.log(event);\n\t\t\tdates = (noDefault ? '' : dates);\n\t\t}\n\t\tinst.selectedDay = date.getDate();\n\t\tinst.drawMonth = inst.selectedMonth = date.getMonth();\n\t\tinst.drawYear = inst.selectedYear = date.getFullYear();\n\t\tinst.currentDay = (dates ? date.getDate() : 0);\n\t\tinst.currentMonth = (dates ? date.getMonth() : 0);\n\t\tinst.currentYear = (dates ? date.getFullYear() : 0);\n\t\tthis._adjustInstDate(inst);\n\t},\n\n\t/* Retrieve the default date shown on opening. */\n\t_getDefaultDate: function(inst) {\n\t\treturn this._restrictMinMax(inst,\n\t\t\tthis._determineDate(inst, this._get(inst, 'defaultDate'), new Date()));\n\t},\n\n\t/* A date may be specified as an exact value or a relative one. */\n\t_determineDate: function(inst, date, defaultDate) {\n\t\tvar offsetNumeric = function(offset) {\n\t\t\tvar date = new Date();\n\t\t\tdate.setDate(date.getDate() + offset);\n\t\t\treturn date;\n\t\t};\n\t\tvar offsetString = function(offset) {\n\t\t\ttry {\n\t\t\t\treturn $.datepicker.parseDate($.datepicker._get(inst, 'dateFormat'),\n\t\t\t\t\toffset, $.datepicker._getFormatConfig(inst));\n\t\t\t}\n\t\t\tcatch (e) {\n\t\t\t\t// Ignore\n\t\t\t}\n\t\t\tvar date = (offset.toLowerCase().match(/^c/) ?\n\t\t\t\t$.datepicker._getDate(inst) : null) || new Date();\n\t\t\tvar year = date.getFullYear();\n\t\t\tvar month = date.getMonth();\n\t\t\tvar day = date.getDate();\n\t\t\tvar pattern = /([+-]?[0-9]+)\\s*(d|D|w|W|m|M|y|Y)?/g;\n\t\t\tvar matches = pattern.exec(offset);\n\t\t\twhile (matches) {\n\t\t\t\tswitch (matches[2] || 'd') {\n\t\t\t\t\tcase 'd' : case 'D' :\n\t\t\t\t\t\tday += parseInt(matches[1],10); break;\n\t\t\t\t\tcase 'w' : case 'W' :\n\t\t\t\t\t\tday += parseInt(matches[1],10) * 7; break;\n\t\t\t\t\tcase 'm' : case 'M' :\n\t\t\t\t\t\tmonth += parseInt(matches[1],10);\n\t\t\t\t\t\tday = Math.min(day, $.datepicker._getDaysInMonth(year, month));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'y': case 'Y' :\n\t\t\t\t\t\tyear += parseInt(matches[1],10);\n\t\t\t\t\t\tday = Math.min(day, $.datepicker._getDaysInMonth(year, month));\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tmatches = pattern.exec(offset);\n\t\t\t}\n\t\t\treturn new Date(year, month, day);\n\t\t};\n\t\tvar newDate = (date == null || date === '' ? defaultDate : (typeof date == 'string' ? offsetString(date) :\n\t\t\t(typeof date == 'number' ? (isNaN(date) ? defaultDate : offsetNumeric(date)) : new Date(date.getTime()))));\n\t\tnewDate = (newDate && newDate.toString() == 'Invalid Date' ? defaultDate : newDate);\n\t\tif (newDate) {\n\t\t\tnewDate.setHours(0);\n\t\t\tnewDate.setMinutes(0);\n\t\t\tnewDate.setSeconds(0);\n\t\t\tnewDate.setMilliseconds(0);\n\t\t}\n\t\treturn this._daylightSavingAdjust(newDate);\n\t},\n\n\t/* Handle switch to/from daylight saving.\n\t   Hours may be non-zero on daylight saving cut-over:\n\t   > 12 when midnight changeover, but then cannot generate\n\t   midnight datetime, so jump to 1AM, otherwise reset.\n\t   @param  date  (Date) the date to check\n\t   @return  (Date) the corrected date */\n\t_daylightSavingAdjust: function(date) {\n\t\tif (!date) return null;\n\t\tdate.setHours(date.getHours() > 12 ? date.getHours() + 2 : 0);\n\t\treturn date;\n\t},\n\n\t/* Set the date(s) directly. */\n\t_setDate: function(inst, date, noChange) {\n\t\tvar clear = !date;\n\t\tvar origMonth = inst.selectedMonth;\n\t\tvar origYear = inst.selectedYear;\n\t\tvar newDate = this._restrictMinMax(inst, this._determineDate(inst, date, new Date()));\n\t\tinst.selectedDay = inst.currentDay = newDate.getDate();\n\t\tinst.drawMonth = inst.selectedMonth = inst.currentMonth = newDate.getMonth();\n\t\tinst.drawYear = inst.selectedYear = inst.currentYear = newDate.getFullYear();\n\t\tif ((origMonth != inst.selectedMonth || origYear != inst.selectedYear) && !noChange)\n\t\t\tthis._notifyChange(inst);\n\t\tthis._adjustInstDate(inst);\n\t\tif (inst.input) {\n\t\t\tinst.input.val(clear ? '' : this._formatDate(inst));\n\t\t}\n\t},\n\n\t/* Retrieve the date(s) directly. */\n\t_getDate: function(inst) {\n\t\tvar startDate = (!inst.currentYear || (inst.input && inst.input.val() == '') ? null :\n\t\t\tthis._daylightSavingAdjust(new Date(\n\t\t\tinst.currentYear, inst.currentMonth, inst.currentDay)));\n\t\t\treturn startDate;\n\t},\n\n\t/* Generate the HTML for the current state of the date picker. */\n\t_generateHTML: function(inst) {\n\t\tvar today = new Date();\n\t\ttoday = this._daylightSavingAdjust(\n\t\t\tnew Date(today.getFullYear(), today.getMonth(), today.getDate())); // clear time\n\t\tvar isRTL = this._get(inst, 'isRTL');\n\t\tvar showButtonPanel = this._get(inst, 'showButtonPanel');\n\t\tvar hideIfNoPrevNext = this._get(inst, 'hideIfNoPrevNext');\n\t\tvar navigationAsDateFormat = this._get(inst, 'navigationAsDateFormat');\n\t\tvar numMonths = this._getNumberOfMonths(inst);\n\t\tvar showCurrentAtPos = this._get(inst, 'showCurrentAtPos');\n\t\tvar stepMonths = this._get(inst, 'stepMonths');\n\t\tvar isMultiMonth = (numMonths[0] != 1 || numMonths[1] != 1);\n\t\tvar currentDate = this._daylightSavingAdjust((!inst.currentDay ? new Date(9999, 9, 9) :\n\t\t\tnew Date(inst.currentYear, inst.currentMonth, inst.currentDay)));\n\t\tvar minDate = this._getMinMaxDate(inst, 'min');\n\t\tvar maxDate = this._getMinMaxDate(inst, 'max');\n\t\tvar drawMonth = inst.drawMonth - showCurrentAtPos;\n\t\tvar drawYear = inst.drawYear;\n\t\tif (drawMonth < 0) {\n\t\t\tdrawMonth += 12;\n\t\t\tdrawYear--;\n\t\t}\n\t\tif (maxDate) {\n\t\t\tvar maxDraw = this._daylightSavingAdjust(new Date(maxDate.getFullYear(),\n\t\t\t\tmaxDate.getMonth() - (numMonths[0] * numMonths[1]) + 1, maxDate.getDate()));\n\t\t\tmaxDraw = (minDate && maxDraw < minDate ? minDate : maxDraw);\n\t\t\twhile (this._daylightSavingAdjust(new Date(drawYear, drawMonth, 1)) > maxDraw) {\n\t\t\t\tdrawMonth--;\n\t\t\t\tif (drawMonth < 0) {\n\t\t\t\t\tdrawMonth = 11;\n\t\t\t\t\tdrawYear--;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tinst.drawMonth = drawMonth;\n\t\tinst.drawYear = drawYear;\n\t\tvar prevText = this._get(inst, 'prevText');\n\t\tprevText = (!navigationAsDateFormat ? prevText : this.formatDate(prevText,\n\t\t\tthis._daylightSavingAdjust(new Date(drawYear, drawMonth - stepMonths, 1)),\n\t\t\tthis._getFormatConfig(inst)));\n\t\tvar prev = (this._canAdjustMonth(inst, -1, drawYear, drawMonth) ?\n\t\t\t'<a class=\"ui-datepicker-prev ui-corner-all\" onclick=\"DP_jQuery_' + dpuuid +\n\t\t\t'.datepicker._adjustDate(\\'#' + inst.id + '\\', -' + stepMonths + ', \\'M\\');\"' +\n\t\t\t' title=\"' + prevText + '\"><span class=\"ui-icon ui-icon-circle-triangle-' + ( isRTL ? 'e' : 'w') + '\">' + prevText + '</span></a>' :\n\t\t\t(hideIfNoPrevNext ? '' : '<a class=\"ui-datepicker-prev ui-corner-all ui-state-disabled\" title=\"'+ prevText +'\"><span class=\"ui-icon ui-icon-circle-triangle-' + ( isRTL ? 'e' : 'w') + '\">' + prevText + '</span></a>'));\n\t\tvar nextText = this._get(inst, 'nextText');\n\t\tnextText = (!navigationAsDateFormat ? nextText : this.formatDate(nextText,\n\t\t\tthis._daylightSavingAdjust(new Date(drawYear, drawMonth + stepMonths, 1)),\n\t\t\tthis._getFormatConfig(inst)));\n\t\tvar next = (this._canAdjustMonth(inst, +1, drawYear, drawMonth) ?\n\t\t\t'<a class=\"ui-datepicker-next ui-corner-all\" onclick=\"DP_jQuery_' + dpuuid +\n\t\t\t'.datepicker._adjustDate(\\'#' + inst.id + '\\', +' + stepMonths + ', \\'M\\');\"' +\n\t\t\t' title=\"' + nextText + '\"><span class=\"ui-icon ui-icon-circle-triangle-' + ( isRTL ? 'w' : 'e') + '\">' + nextText + '</span></a>' :\n\t\t\t(hideIfNoPrevNext ? '' : '<a class=\"ui-datepicker-next ui-corner-all ui-state-disabled\" title=\"'+ nextText + '\"><span class=\"ui-icon ui-icon-circle-triangle-' + ( isRTL ? 'w' : 'e') + '\">' + nextText + '</span></a>'));\n\t\tvar currentText = this._get(inst, 'currentText');\n\t\tvar gotoDate = (this._get(inst, 'gotoCurrent') && inst.currentDay ? currentDate : today);\n\t\tcurrentText = (!navigationAsDateFormat ? currentText :\n\t\t\tthis.formatDate(currentText, gotoDate, this._getFormatConfig(inst)));\n\t\tvar controls = (!inst.inline ? '<button type=\"button\" class=\"ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all\" onclick=\"DP_jQuery_' + dpuuid +\n\t\t\t'.datepicker._hideDatepicker();\">' + this._get(inst, 'closeText') + '</button>' : '');\n\t\tvar buttonPanel = (showButtonPanel) ? '<div class=\"ui-datepicker-buttonpane ui-widget-content\">' + (isRTL ? controls : '') +\n\t\t\t(this._isInRange(inst, gotoDate) ? '<button type=\"button\" class=\"ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all\" onclick=\"DP_jQuery_' + dpuuid +\n\t\t\t'.datepicker._gotoToday(\\'#' + inst.id + '\\');\"' +\n\t\t\t'>' + currentText + '</button>' : '') + (isRTL ? '' : controls) + '</div>' : '';\n\t\tvar firstDay = parseInt(this._get(inst, 'firstDay'),10);\n\t\tfirstDay = (isNaN(firstDay) ? 0 : firstDay);\n\t\tvar showWeek = this._get(inst, 'showWeek');\n\t\tvar dayNames = this._get(inst, 'dayNames');\n\t\tvar dayNamesShort = this._get(inst, 'dayNamesShort');\n\t\tvar dayNamesMin = this._get(inst, 'dayNamesMin');\n\t\tvar monthNames = this._get(inst, 'monthNames');\n\t\tvar monthNamesShort = this._get(inst, 'monthNamesShort');\n\t\tvar beforeShowDay = this._get(inst, 'beforeShowDay');\n\t\tvar showOtherMonths = this._get(inst, 'showOtherMonths');\n\t\tvar selectOtherMonths = this._get(inst, 'selectOtherMonths');\n\t\tvar calculateWeek = this._get(inst, 'calculateWeek') || this.iso8601Week;\n\t\tvar defaultDate = this._getDefaultDate(inst);\n\t\tvar html = '';\n\t\tfor (var row = 0; row < numMonths[0]; row++) {\n\t\t\tvar group = '';\n\t\t\tthis.maxRows = 4;\n\t\t\tfor (var col = 0; col < numMonths[1]; col++) {\n\t\t\t\tvar selectedDate = this._daylightSavingAdjust(new Date(drawYear, drawMonth, inst.selectedDay));\n\t\t\t\tvar cornerClass = ' ui-corner-all';\n\t\t\t\tvar calender = '';\n\t\t\t\tif (isMultiMonth) {\n\t\t\t\t\tcalender += '<div class=\"ui-datepicker-group';\n\t\t\t\t\tif (numMonths[1] > 1)\n\t\t\t\t\t\tswitch (col) {\n\t\t\t\t\t\t\tcase 0: calender += ' ui-datepicker-group-first';\n\t\t\t\t\t\t\t\tcornerClass = ' ui-corner-' + (isRTL ? 'right' : 'left'); break;\n\t\t\t\t\t\t\tcase numMonths[1]-1: calender += ' ui-datepicker-group-last';\n\t\t\t\t\t\t\t\tcornerClass = ' ui-corner-' + (isRTL ? 'left' : 'right'); break;\n\t\t\t\t\t\t\tdefault: calender += ' ui-datepicker-group-middle'; cornerClass = ''; break;\n\t\t\t\t\t\t}\n\t\t\t\t\tcalender += '\">';\n\t\t\t\t}\n\t\t\t\tcalender += '<div class=\"ui-datepicker-header ui-widget-header ui-helper-clearfix' + cornerClass + '\">' +\n\t\t\t\t\t(/all|left/.test(cornerClass) && row == 0 ? (isRTL ? next : prev) : '') +\n\t\t\t\t\t(/all|right/.test(cornerClass) && row == 0 ? (isRTL ? prev : next) : '') +\n\t\t\t\t\tthis._generateMonthYearHeader(inst, drawMonth, drawYear, minDate, maxDate,\n\t\t\t\t\trow > 0 || col > 0, monthNames, monthNamesShort) + // draw month headers\n\t\t\t\t\t'</div><table class=\"ui-datepicker-calendar\"><thead>' +\n\t\t\t\t\t'<tr>';\n\t\t\t\tvar thead = (showWeek ? '<th class=\"ui-datepicker-week-col\">' + this._get(inst, 'weekHeader') + '</th>' : '');\n\t\t\t\tfor (var dow = 0; dow < 7; dow++) { // days of the week\n\t\t\t\t\tvar day = (dow + firstDay) % 7;\n\t\t\t\t\tthead += '<th' + ((dow + firstDay + 6) % 7 >= 5 ? ' class=\"ui-datepicker-week-end\"' : '') + '>' +\n\t\t\t\t\t\t'<span title=\"' + dayNames[day] + '\">' + dayNamesMin[day] + '</span></th>';\n\t\t\t\t}\n\t\t\t\tcalender += thead + '</tr></thead><tbody>';\n\t\t\t\tvar daysInMonth = this._getDaysInMonth(drawYear, drawMonth);\n\t\t\t\tif (drawYear == inst.selectedYear && drawMonth == inst.selectedMonth)\n\t\t\t\t\tinst.selectedDay = Math.min(inst.selectedDay, daysInMonth);\n\t\t\t\tvar leadDays = (this._getFirstDayOfMonth(drawYear, drawMonth) - firstDay + 7) % 7;\n\t\t\t\tvar curRows = Math.ceil((leadDays + daysInMonth) / 7); // calculate the number of rows to generate\n\t\t\t\tvar numRows = (isMultiMonth ? this.maxRows > curRows ? this.maxRows : curRows : curRows); //If multiple months, use the higher number of rows (see #7043)\n\t\t\t\tthis.maxRows = numRows;\n\t\t\t\tvar printDate = this._daylightSavingAdjust(new Date(drawYear, drawMonth, 1 - leadDays));\n\t\t\t\tfor (var dRow = 0; dRow < numRows; dRow++) { // create date picker rows\n\t\t\t\t\tcalender += '<tr>';\n\t\t\t\t\tvar tbody = (!showWeek ? '' : '<td class=\"ui-datepicker-week-col\">' +\n\t\t\t\t\t\tthis._get(inst, 'calculateWeek')(printDate) + '</td>');\n\t\t\t\t\tfor (var dow = 0; dow < 7; dow++) { // create date picker days\n\t\t\t\t\t\tvar daySettings = (beforeShowDay ?\n\t\t\t\t\t\t\tbeforeShowDay.apply((inst.input ? inst.input[0] : null), [printDate]) : [true, '']);\n\t\t\t\t\t\tvar otherMonth = (printDate.getMonth() != drawMonth);\n\t\t\t\t\t\tvar unselectable = (otherMonth && !selectOtherMonths) || !daySettings[0] ||\n\t\t\t\t\t\t\t(minDate && printDate < minDate) || (maxDate && printDate > maxDate);\n\t\t\t\t\t\ttbody += '<td class=\"' +\n\t\t\t\t\t\t\t((dow + firstDay + 6) % 7 >= 5 ? ' ui-datepicker-week-end' : '') + // highlight weekends\n\t\t\t\t\t\t\t(otherMonth ? ' ui-datepicker-other-month' : '') + // highlight days from other months\n\t\t\t\t\t\t\t((printDate.getTime() == selectedDate.getTime() && drawMonth == inst.selectedMonth && inst._keyEvent) || // user pressed key\n\t\t\t\t\t\t\t(defaultDate.getTime() == printDate.getTime() && defaultDate.getTime() == selectedDate.getTime()) ?\n\t\t\t\t\t\t\t// or defaultDate is current printedDate and defaultDate is selectedDate\n\t\t\t\t\t\t\t' ' + this._dayOverClass : '') + // highlight selected day\n\t\t\t\t\t\t\t(unselectable ? ' ' + this._unselectableClass + ' ui-state-disabled': '') +  // highlight unselectable days\n\t\t\t\t\t\t\t(otherMonth && !showOtherMonths ? '' : ' ' + daySettings[1] + // highlight custom dates\n\t\t\t\t\t\t\t(printDate.getTime() == currentDate.getTime() ? ' ' + this._currentClass : '') + // highlight selected day\n\t\t\t\t\t\t\t(printDate.getTime() == today.getTime() ? ' ui-datepicker-today' : '')) + '\"' + // highlight today (if different)\n\t\t\t\t\t\t\t((!otherMonth || showOtherMonths) && daySettings[2] ? ' title=\"' + daySettings[2] + '\"' : '') + // cell title\n\t\t\t\t\t\t\t(unselectable ? '' : ' onclick=\"DP_jQuery_' + dpuuid + '.datepicker._selectDay(\\'#' +\n\t\t\t\t\t\t\tinst.id + '\\',' + printDate.getMonth() + ',' + printDate.getFullYear() + ', this);return false;\"') + '>' + // actions\n\t\t\t\t\t\t\t(otherMonth && !showOtherMonths ? '&#xa0;' : // display for other months\n\t\t\t\t\t\t\t(unselectable ? '<span class=\"ui-state-default\">' + printDate.getDate() + '</span>' : '<a class=\"ui-state-default' +\n\t\t\t\t\t\t\t(printDate.getTime() == today.getTime() ? ' ui-state-highlight' : '') +\n\t\t\t\t\t\t\t(printDate.getTime() == currentDate.getTime() ? ' ui-state-active' : '') + // highlight selected day\n\t\t\t\t\t\t\t(otherMonth ? ' ui-priority-secondary' : '') + // distinguish dates from other months\n\t\t\t\t\t\t\t'\" href=\"#\">' + printDate.getDate() + '</a>')) + '</td>'; // display selectable date\n\t\t\t\t\t\tprintDate.setDate(printDate.getDate() + 1);\n\t\t\t\t\t\tprintDate = this._daylightSavingAdjust(printDate);\n\t\t\t\t\t}\n\t\t\t\t\tcalender += tbody + '</tr>';\n\t\t\t\t}\n\t\t\t\tdrawMonth++;\n\t\t\t\tif (drawMonth > 11) {\n\t\t\t\t\tdrawMonth = 0;\n\t\t\t\t\tdrawYear++;\n\t\t\t\t}\n\t\t\t\tcalender += '</tbody></table>' + (isMultiMonth ? '</div>' + \n\t\t\t\t\t\t\t((numMonths[0] > 0 && col == numMonths[1]-1) ? '<div class=\"ui-datepicker-row-break\"></div>' : '') : '');\n\t\t\t\tgroup += calender;\n\t\t\t}\n\t\t\thtml += group;\n\t\t}\n\t\thtml += buttonPanel + ($.browser.msie && parseInt($.browser.version,10) < 7 && !inst.inline ?\n\t\t\t'<iframe src=\"javascript:false;\" class=\"ui-datepicker-cover\" frameborder=\"0\"></iframe>' : '');\n\t\tinst._keyEvent = false;\n\t\treturn html;\n\t},\n\n\t/* Generate the month and year header. */\n\t_generateMonthYearHeader: function(inst, drawMonth, drawYear, minDate, maxDate,\n\t\t\tsecondary, monthNames, monthNamesShort) {\n\t\tvar changeMonth = this._get(inst, 'changeMonth');\n\t\tvar changeYear = this._get(inst, 'changeYear');\n\t\tvar showMonthAfterYear = this._get(inst, 'showMonthAfterYear');\n\t\tvar html = '<div class=\"ui-datepicker-title\">';\n\t\tvar monthHtml = '';\n\t\t// month selection\n\t\tif (secondary || !changeMonth)\n\t\t\tmonthHtml += '<span class=\"ui-datepicker-month\">' + monthNames[drawMonth] + '</span>';\n\t\telse {\n\t\t\tvar inMinYear = (minDate && minDate.getFullYear() == drawYear);\n\t\t\tvar inMaxYear = (maxDate && maxDate.getFullYear() == drawYear);\n\t\t\tmonthHtml += '<select class=\"ui-datepicker-month\" ' +\n\t\t\t\t'onchange=\"DP_jQuery_' + dpuuid + '.datepicker._selectMonthYear(\\'#' + inst.id + '\\', this, \\'M\\');\" ' +\n\t\t\t \t'>';\n\t\t\tfor (var month = 0; month < 12; month++) {\n\t\t\t\tif ((!inMinYear || month >= minDate.getMonth()) &&\n\t\t\t\t\t\t(!inMaxYear || month <= maxDate.getMonth()))\n\t\t\t\t\tmonthHtml += '<option value=\"' + month + '\"' +\n\t\t\t\t\t\t(month == drawMonth ? ' selected=\"selected\"' : '') +\n\t\t\t\t\t\t'>' + monthNamesShort[month] + '</option>';\n\t\t\t}\n\t\t\tmonthHtml += '</select>';\n\t\t}\n\t\tif (!showMonthAfterYear)\n\t\t\thtml += monthHtml + (secondary || !(changeMonth && changeYear) ? '&#xa0;' : '');\n\t\t// year selection\n\t\tif ( !inst.yearshtml ) {\n\t\t\tinst.yearshtml = '';\n\t\t\tif (secondary || !changeYear)\n\t\t\t\thtml += '<span class=\"ui-datepicker-year\">' + drawYear + '</span>';\n\t\t\telse {\n\t\t\t\t// determine range of years to display\n\t\t\t\tvar years = this._get(inst, 'yearRange').split(':');\n\t\t\t\tvar thisYear = new Date().getFullYear();\n\t\t\t\tvar determineYear = function(value) {\n\t\t\t\t\tvar year = (value.match(/c[+-].*/) ? drawYear + parseInt(value.substring(1), 10) :\n\t\t\t\t\t\t(value.match(/[+-].*/) ? thisYear + parseInt(value, 10) :\n\t\t\t\t\t\tparseInt(value, 10)));\n\t\t\t\t\treturn (isNaN(year) ? thisYear : year);\n\t\t\t\t};\n\t\t\t\tvar year = determineYear(years[0]);\n\t\t\t\tvar endYear = Math.max(year, determineYear(years[1] || ''));\n\t\t\t\tyear = (minDate ? Math.max(year, minDate.getFullYear()) : year);\n\t\t\t\tendYear = (maxDate ? Math.min(endYear, maxDate.getFullYear()) : endYear);\n\t\t\t\tinst.yearshtml += '<select class=\"ui-datepicker-year\" ' +\n\t\t\t\t\t'onchange=\"DP_jQuery_' + dpuuid + '.datepicker._selectMonthYear(\\'#' + inst.id + '\\', this, \\'Y\\');\" ' +\n\t\t\t\t\t'>';\n\t\t\t\tfor (; year <= endYear; year++) {\n\t\t\t\t\tinst.yearshtml += '<option value=\"' + year + '\"' +\n\t\t\t\t\t\t(year == drawYear ? ' selected=\"selected\"' : '') +\n\t\t\t\t\t\t'>' + year + '</option>';\n\t\t\t\t}\n\t\t\t\tinst.yearshtml += '</select>';\n\t\t\t\t\n\t\t\t\thtml += inst.yearshtml;\n\t\t\t\tinst.yearshtml = null;\n\t\t\t}\n\t\t}\n\t\thtml += this._get(inst, 'yearSuffix');\n\t\tif (showMonthAfterYear)\n\t\t\thtml += (secondary || !(changeMonth && changeYear) ? '&#xa0;' : '') + monthHtml;\n\t\thtml += '</div>'; // Close datepicker_header\n\t\treturn html;\n\t},\n\n\t/* Adjust one of the date sub-fields. */\n\t_adjustInstDate: function(inst, offset, period) {\n\t\tvar year = inst.drawYear + (period == 'Y' ? offset : 0);\n\t\tvar month = inst.drawMonth + (period == 'M' ? offset : 0);\n\t\tvar day = Math.min(inst.selectedDay, this._getDaysInMonth(year, month)) +\n\t\t\t(period == 'D' ? offset : 0);\n\t\tvar date = this._restrictMinMax(inst,\n\t\t\tthis._daylightSavingAdjust(new Date(year, month, day)));\n\t\tinst.selectedDay = date.getDate();\n\t\tinst.drawMonth = inst.selectedMonth = date.getMonth();\n\t\tinst.drawYear = inst.selectedYear = date.getFullYear();\n\t\tif (period == 'M' || period == 'Y')\n\t\t\tthis._notifyChange(inst);\n\t},\n\n\t/* Ensure a date is within any min/max bounds. */\n\t_restrictMinMax: function(inst, date) {\n\t\tvar minDate = this._getMinMaxDate(inst, 'min');\n\t\tvar maxDate = this._getMinMaxDate(inst, 'max');\n\t\tvar newDate = (minDate && date < minDate ? minDate : date);\n\t\tnewDate = (maxDate && newDate > maxDate ? maxDate : newDate);\n\t\treturn newDate;\n\t},\n\n\t/* Notify change of month/year. */\n\t_notifyChange: function(inst) {\n\t\tvar onChange = this._get(inst, 'onChangeMonthYear');\n\t\tif (onChange)\n\t\t\tonChange.apply((inst.input ? inst.input[0] : null),\n\t\t\t\t[inst.selectedYear, inst.selectedMonth + 1, inst]);\n\t},\n\n\t/* Determine the number of months to show. */\n\t_getNumberOfMonths: function(inst) {\n\t\tvar numMonths = this._get(inst, 'numberOfMonths');\n\t\treturn (numMonths == null ? [1, 1] : (typeof numMonths == 'number' ? [1, numMonths] : numMonths));\n\t},\n\n\t/* Determine the current maximum date - ensure no time components are set. */\n\t_getMinMaxDate: function(inst, minMax) {\n\t\treturn this._determineDate(inst, this._get(inst, minMax + 'Date'), null);\n\t},\n\n\t/* Find the number of days in a given month. */\n\t_getDaysInMonth: function(year, month) {\n\t\treturn 32 - this._daylightSavingAdjust(new Date(year, month, 32)).getDate();\n\t},\n\n\t/* Find the day of the week of the first of a month. */\n\t_getFirstDayOfMonth: function(year, month) {\n\t\treturn new Date(year, month, 1).getDay();\n\t},\n\n\t/* Determines if we should allow a \"next/prev\" month display change. */\n\t_canAdjustMonth: function(inst, offset, curYear, curMonth) {\n\t\tvar numMonths = this._getNumberOfMonths(inst);\n\t\tvar date = this._daylightSavingAdjust(new Date(curYear,\n\t\t\tcurMonth + (offset < 0 ? offset : numMonths[0] * numMonths[1]), 1));\n\t\tif (offset < 0)\n\t\t\tdate.setDate(this._getDaysInMonth(date.getFullYear(), date.getMonth()));\n\t\treturn this._isInRange(inst, date);\n\t},\n\n\t/* Is the given date in the accepted range? */\n\t_isInRange: function(inst, date) {\n\t\tvar minDate = this._getMinMaxDate(inst, 'min');\n\t\tvar maxDate = this._getMinMaxDate(inst, 'max');\n\t\treturn ((!minDate || date.getTime() >= minDate.getTime()) &&\n\t\t\t(!maxDate || date.getTime() <= maxDate.getTime()));\n\t},\n\n\t/* Provide the configuration settings for formatting/parsing. */\n\t_getFormatConfig: function(inst) {\n\t\tvar shortYearCutoff = this._get(inst, 'shortYearCutoff');\n\t\tshortYearCutoff = (typeof shortYearCutoff != 'string' ? shortYearCutoff :\n\t\t\tnew Date().getFullYear() % 100 + parseInt(shortYearCutoff, 10));\n\t\treturn {shortYearCutoff: shortYearCutoff,\n\t\t\tdayNamesShort: this._get(inst, 'dayNamesShort'), dayNames: this._get(inst, 'dayNames'),\n\t\t\tmonthNamesShort: this._get(inst, 'monthNamesShort'), monthNames: this._get(inst, 'monthNames')};\n\t},\n\n\t/* Format the given date for display. */\n\t_formatDate: function(inst, day, month, year) {\n\t\tif (!day) {\n\t\t\tinst.currentDay = inst.selectedDay;\n\t\t\tinst.currentMonth = inst.selectedMonth;\n\t\t\tinst.currentYear = inst.selectedYear;\n\t\t}\n\t\tvar date = (day ? (typeof day == 'object' ? day :\n\t\t\tthis._daylightSavingAdjust(new Date(year, month, day))) :\n\t\t\tthis._daylightSavingAdjust(new Date(inst.currentYear, inst.currentMonth, inst.currentDay)));\n\t\treturn this.formatDate(this._get(inst, 'dateFormat'), date, this._getFormatConfig(inst));\n\t}\n});\n\n/*\n * Bind hover events for datepicker elements.\n * Done via delegate so the binding only occurs once in the lifetime of the parent div.\n * Global instActive, set by _updateDatepicker allows the handlers to find their way back to the active picker.\n */ \nfunction bindHover(dpDiv) {\n\tvar selector = 'button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a';\n\treturn dpDiv.bind('mouseout', function(event) {\n\t\t\tvar elem = $( event.target ).closest( selector );\n\t\t\tif ( !elem.length ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\telem.removeClass( \"ui-state-hover ui-datepicker-prev-hover ui-datepicker-next-hover\" );\n\t\t})\n\t\t.bind('mouseover', function(event) {\n\t\t\tvar elem = $( event.target ).closest( selector );\n\t\t\tif ($.datepicker._isDisabledDatepicker( instActive.inline ? dpDiv.parent()[0] : instActive.input[0]) ||\n\t\t\t\t\t!elem.length ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\telem.parents('.ui-datepicker-calendar').find('a').removeClass('ui-state-hover');\n\t\t\telem.addClass('ui-state-hover');\n\t\t\tif (elem.hasClass('ui-datepicker-prev')) elem.addClass('ui-datepicker-prev-hover');\n\t\t\tif (elem.hasClass('ui-datepicker-next')) elem.addClass('ui-datepicker-next-hover');\n\t\t});\n}\n\n/* jQuery extend now ignores nulls! */\nfunction extendRemove(target, props) {\n\t$.extend(target, props);\n\tfor (var name in props)\n\t\tif (props[name] == null || props[name] == undefined)\n\t\t\ttarget[name] = props[name];\n\treturn target;\n};\n\n/* Determine whether an object is an array. */\nfunction isArray(a) {\n\treturn (a && (($.browser.safari && typeof a == 'object' && a.length) ||\n\t\t(a.constructor && a.constructor.toString().match(/\\Array\\(\\)/))));\n};\n\n/* Invoke the datepicker functionality.\n   @param  options  string - a command, optionally followed by additional parameters or\n                    Object - settings for attaching new datepicker functionality\n   @return  jQuery object */\n$.fn.datepicker = function(options){\n\t\n\t/* Verify an empty collection wasn't passed - Fixes #6976 */\n\tif ( !this.length ) {\n\t\treturn this;\n\t}\n\t\n\t/* Initialise the date picker. */\n\tif (!$.datepicker.initialized) {\n\t\t$(document).mousedown($.datepicker._checkExternalClick).\n\t\t\tfind('body').append($.datepicker.dpDiv);\n\t\t$.datepicker.initialized = true;\n\t}\n\n\tvar otherArgs = Array.prototype.slice.call(arguments, 1);\n\tif (typeof options == 'string' && (options == 'isDisabled' || options == 'getDate' || options == 'widget'))\n\t\treturn $.datepicker['_' + options + 'Datepicker'].\n\t\t\tapply($.datepicker, [this[0]].concat(otherArgs));\n\tif (options == 'option' && arguments.length == 2 && typeof arguments[1] == 'string')\n\t\treturn $.datepicker['_' + options + 'Datepicker'].\n\t\t\tapply($.datepicker, [this[0]].concat(otherArgs));\n\treturn this.each(function() {\n\t\ttypeof options == 'string' ?\n\t\t\t$.datepicker['_' + options + 'Datepicker'].\n\t\t\t\tapply($.datepicker, [this].concat(otherArgs)) :\n\t\t\t$.datepicker._attachDatepicker(this, options);\n\t});\n};\n\n$.datepicker = new Datepicker(); // singleton instance\n$.datepicker.initialized = false;\n$.datepicker.uuid = new Date().getTime();\n$.datepicker.version = \"1.8.20\";\n\n// Workaround for #4055\n// Add another global to avoid noConflict issues with inline event handlers\nwindow['DP_jQuery_' + dpuuid] = $;\n\n})(jQuery);\n\n(function( $, undefined ) {\n\nvar uiDialogClasses =\n\t\t'ui-dialog ' +\n\t\t'ui-widget ' +\n\t\t'ui-widget-content ' +\n\t\t'ui-corner-all ',\n\tsizeRelatedOptions = {\n\t\tbuttons: true,\n\t\theight: true,\n\t\tmaxHeight: true,\n\t\tmaxWidth: true,\n\t\tminHeight: true,\n\t\tminWidth: true,\n\t\twidth: true\n\t},\n\tresizableRelatedOptions = {\n\t\tmaxHeight: true,\n\t\tmaxWidth: true,\n\t\tminHeight: true,\n\t\tminWidth: true\n\t},\n\t// support for jQuery 1.3.2 - handle common attrFn methods for dialog\n\tattrFn = $.attrFn || {\n\t\tval: true,\n\t\tcss: true,\n\t\thtml: true,\n\t\ttext: true,\n\t\tdata: true,\n\t\twidth: true,\n\t\theight: true,\n\t\toffset: true,\n\t\tclick: true\n\t};\n\n$.widget(\"ui.dialog\", {\n\toptions: {\n\t\tautoOpen: true,\n\t\tbuttons: {},\n\t\tcloseOnEscape: true,\n\t\tcloseText: 'close',\n\t\tdialogClass: '',\n\t\tdraggable: true,\n\t\thide: null,\n\t\theight: 'auto',\n\t\tmaxHeight: false,\n\t\tmaxWidth: false,\n\t\tminHeight: 150,\n\t\tminWidth: 150,\n\t\tmodal: false,\n\t\tposition: {\n\t\t\tmy: 'center',\n\t\t\tat: 'center',\n\t\t\tcollision: 'fit',\n\t\t\t// ensure that the titlebar is never outside the document\n\t\t\tusing: function(pos) {\n\t\t\t\tvar topOffset = $(this).css(pos).offset().top;\n\t\t\t\tif (topOffset < 0) {\n\t\t\t\t\t$(this).css('top', pos.top - topOffset);\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tresizable: true,\n\t\tshow: null,\n\t\tstack: true,\n\t\ttitle: '',\n\t\twidth: 300,\n\t\tzIndex: 1000\n\t},\n\n\t_create: function() {\n\t\tthis.originalTitle = this.element.attr('title');\n\t\t// #5742 - .attr() might return a DOMElement\n\t\tif ( typeof this.originalTitle !== \"string\" ) {\n\t\t\tthis.originalTitle = \"\";\n\t\t}\n\n\t\tthis.options.title = this.options.title || this.originalTitle;\n\t\tvar self = this,\n\t\t\toptions = self.options,\n\n\t\t\ttitle = options.title || '&#160;',\n\t\t\ttitleId = $.ui.dialog.getTitleId(self.element),\n\n\t\t\tuiDialog = (self.uiDialog = $('<div></div>'))\n\t\t\t\t.appendTo(document.body)\n\t\t\t\t.hide()\n\t\t\t\t.addClass(uiDialogClasses + options.dialogClass)\n\t\t\t\t.css({\n\t\t\t\t\tzIndex: options.zIndex\n\t\t\t\t})\n\t\t\t\t// setting tabIndex makes the div focusable\n\t\t\t\t// setting outline to 0 prevents a border on focus in Mozilla\n\t\t\t\t.attr('tabIndex', -1).css('outline', 0).keydown(function(event) {\n\t\t\t\t\tif (options.closeOnEscape && !event.isDefaultPrevented() && event.keyCode &&\n\t\t\t\t\t\tevent.keyCode === $.ui.keyCode.ESCAPE) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tself.close(event);\n\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\t.attr({\n\t\t\t\t\trole: 'dialog',\n\t\t\t\t\t'aria-labelledby': titleId\n\t\t\t\t})\n\t\t\t\t.mousedown(function(event) {\n\t\t\t\t\tself.moveToTop(false, event);\n\t\t\t\t}),\n\n\t\t\tuiDialogContent = self.element\n\t\t\t\t.show()\n\t\t\t\t.removeAttr('title')\n\t\t\t\t.addClass(\n\t\t\t\t\t'ui-dialog-content ' +\n\t\t\t\t\t'ui-widget-content')\n\t\t\t\t.appendTo(uiDialog),\n\n\t\t\tuiDialogTitlebar = (self.uiDialogTitlebar = $('<div></div>'))\n\t\t\t\t.addClass(\n\t\t\t\t\t'ui-dialog-titlebar ' +\n\t\t\t\t\t'ui-widget-header ' +\n\t\t\t\t\t'ui-corner-all ' +\n\t\t\t\t\t'ui-helper-clearfix'\n\t\t\t\t)\n\t\t\t\t.prependTo(uiDialog),\n\n\t\t\tuiDialogTitlebarClose = $('<a href=\"#\"></a>')\n\t\t\t\t.addClass(\n\t\t\t\t\t'ui-dialog-titlebar-close ' +\n\t\t\t\t\t'ui-corner-all'\n\t\t\t\t)\n\t\t\t\t.attr('role', 'button')\n\t\t\t\t.hover(\n\t\t\t\t\tfunction() {\n\t\t\t\t\t\tuiDialogTitlebarClose.addClass('ui-state-hover');\n\t\t\t\t\t},\n\t\t\t\t\tfunction() {\n\t\t\t\t\t\tuiDialogTitlebarClose.removeClass('ui-state-hover');\n\t\t\t\t\t}\n\t\t\t\t)\n\t\t\t\t.focus(function() {\n\t\t\t\t\tuiDialogTitlebarClose.addClass('ui-state-focus');\n\t\t\t\t})\n\t\t\t\t.blur(function() {\n\t\t\t\t\tuiDialogTitlebarClose.removeClass('ui-state-focus');\n\t\t\t\t})\n\t\t\t\t.click(function(event) {\n\t\t\t\t\tself.close(event);\n\t\t\t\t\treturn false;\n\t\t\t\t})\n\t\t\t\t.appendTo(uiDialogTitlebar),\n\n\t\t\tuiDialogTitlebarCloseText = (self.uiDialogTitlebarCloseText = $('<span></span>'))\n\t\t\t\t.addClass(\n\t\t\t\t\t'ui-icon ' +\n\t\t\t\t\t'ui-icon-closethick'\n\t\t\t\t)\n\t\t\t\t.text(options.closeText)\n\t\t\t\t.appendTo(uiDialogTitlebarClose),\n\n\t\t\tuiDialogTitle = $('<span></span>')\n\t\t\t\t.addClass('ui-dialog-title')\n\t\t\t\t.attr('id', titleId)\n\t\t\t\t.html(title)\n\t\t\t\t.prependTo(uiDialogTitlebar);\n\n\t\t//handling of deprecated beforeclose (vs beforeClose) option\n\t\t//Ticket #4669 http://dev.jqueryui.com/ticket/4669\n\t\t//TODO: remove in 1.9pre\n\t\tif ($.isFunction(options.beforeclose) && !$.isFunction(options.beforeClose)) {\n\t\t\toptions.beforeClose = options.beforeclose;\n\t\t}\n\n\t\tuiDialogTitlebar.find(\"*\").add(uiDialogTitlebar).disableSelection();\n\n\t\tif (options.draggable && $.fn.draggable) {\n\t\t\tself._makeDraggable();\n\t\t}\n\t\tif (options.resizable && $.fn.resizable) {\n\t\t\tself._makeResizable();\n\t\t}\n\n\t\tself._createButtons(options.buttons);\n\t\tself._isOpen = false;\n\n\t\tif ($.fn.bgiframe) {\n\t\t\tuiDialog.bgiframe();\n\t\t}\n\t},\n\n\t_init: function() {\n\t\tif ( this.options.autoOpen ) {\n\t\t\tthis.open();\n\t\t}\n\t},\n\n\tdestroy: function() {\n\t\tvar self = this;\n\t\t\n\t\tif (self.overlay) {\n\t\t\tself.overlay.destroy();\n\t\t}\n\t\tself.uiDialog.hide();\n\t\tself.element\n\t\t\t.unbind('.dialog')\n\t\t\t.removeData('dialog')\n\t\t\t.removeClass('ui-dialog-content ui-widget-content')\n\t\t\t.hide().appendTo('body');\n\t\tself.uiDialog.remove();\n\n\t\tif (self.originalTitle) {\n\t\t\tself.element.attr('title', self.originalTitle);\n\t\t}\n\n\t\treturn self;\n\t},\n\n\twidget: function() {\n\t\treturn this.uiDialog;\n\t},\n\n\tclose: function(event) {\n\t\tvar self = this,\n\t\t\tmaxZ, thisZ;\n\t\t\n\t\tif (false === self._trigger('beforeClose', event)) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (self.overlay) {\n\t\t\tself.overlay.destroy();\n\t\t}\n\t\tself.uiDialog.unbind('keypress.ui-dialog');\n\n\t\tself._isOpen = false;\n\n\t\tif (self.options.hide) {\n\t\t\tself.uiDialog.hide(self.options.hide, function() {\n\t\t\t\tself._trigger('close', event);\n\t\t\t});\n\t\t} else {\n\t\t\tself.uiDialog.hide();\n\t\t\tself._trigger('close', event);\n\t\t}\n\n\t\t$.ui.dialog.overlay.resize();\n\n\t\t// adjust the maxZ to allow other modal dialogs to continue to work (see #4309)\n\t\tif (self.options.modal) {\n\t\t\tmaxZ = 0;\n\t\t\t$('.ui-dialog').each(function() {\n\t\t\t\tif (this !== self.uiDialog[0]) {\n\t\t\t\t\tthisZ = $(this).css('z-index');\n\t\t\t\t\tif(!isNaN(thisZ)) {\n\t\t\t\t\t\tmaxZ = Math.max(maxZ, thisZ);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t\t$.ui.dialog.maxZ = maxZ;\n\t\t}\n\n\t\treturn self;\n\t},\n\n\tisOpen: function() {\n\t\treturn this._isOpen;\n\t},\n\n\t// the force parameter allows us to move modal dialogs to their correct\n\t// position on open\n\tmoveToTop: function(force, event) {\n\t\tvar self = this,\n\t\t\toptions = self.options,\n\t\t\tsaveScroll;\n\n\t\tif ((options.modal && !force) ||\n\t\t\t(!options.stack && !options.modal)) {\n\t\t\treturn self._trigger('focus', event);\n\t\t}\n\n\t\tif (options.zIndex > $.ui.dialog.maxZ) {\n\t\t\t$.ui.dialog.maxZ = options.zIndex;\n\t\t}\n\t\tif (self.overlay) {\n\t\t\t$.ui.dialog.maxZ += 1;\n\t\t\tself.overlay.$el.css('z-index', $.ui.dialog.overlay.maxZ = $.ui.dialog.maxZ);\n\t\t}\n\n\t\t//Save and then restore scroll since Opera 9.5+ resets when parent z-Index is changed.\n\t\t//  http://ui.jquery.com/bugs/ticket/3193\n\t\tsaveScroll = { scrollTop: self.element.scrollTop(), scrollLeft: self.element.scrollLeft() };\n\t\t$.ui.dialog.maxZ += 1;\n\t\tself.uiDialog.css('z-index', $.ui.dialog.maxZ);\n\t\tself.element.attr(saveScroll);\n\t\tself._trigger('focus', event);\n\n\t\treturn self;\n\t},\n\n\topen: function() {\n\t\tif (this._isOpen) { return; }\n\n\t\tvar self = this,\n\t\t\toptions = self.options,\n\t\t\tuiDialog = self.uiDialog;\n\n\t\tself.overlay = options.modal ? new $.ui.dialog.overlay(self) : null;\n\t\tself._size();\n\t\tself._position(options.position);\n\t\tuiDialog.show(options.show);\n\t\tself.moveToTop(true);\n\n\t\t// prevent tabbing out of modal dialogs\n\t\tif ( options.modal ) {\n\t\t\tuiDialog.bind( \"keydown.ui-dialog\", function( event ) {\n\t\t\t\tif ( event.keyCode !== $.ui.keyCode.TAB ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tvar tabbables = $(':tabbable', this),\n\t\t\t\t\tfirst = tabbables.filter(':first'),\n\t\t\t\t\tlast  = tabbables.filter(':last');\n\n\t\t\t\tif (event.target === last[0] && !event.shiftKey) {\n\t\t\t\t\tfirst.focus(1);\n\t\t\t\t\treturn false;\n\t\t\t\t} else if (event.target === first[0] && event.shiftKey) {\n\t\t\t\t\tlast.focus(1);\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\t// set focus to the first tabbable element in the content area or the first button\n\t\t// if there are no tabbable elements, set focus on the dialog itself\n\t\t$(self.element.find(':tabbable').get().concat(\n\t\t\tuiDialog.find('.ui-dialog-buttonpane :tabbable').get().concat(\n\t\t\t\tuiDialog.get()))).eq(0).focus();\n\n\t\tself._isOpen = true;\n\t\tself._trigger('open');\n\n\t\treturn self;\n\t},\n\n\t_createButtons: function(buttons) {\n\t\tvar self = this,\n\t\t\thasButtons = false,\n\t\t\tuiDialogButtonPane = $('<div></div>')\n\t\t\t\t.addClass(\n\t\t\t\t\t'ui-dialog-buttonpane ' +\n\t\t\t\t\t'ui-widget-content ' +\n\t\t\t\t\t'ui-helper-clearfix'\n\t\t\t\t),\n\t\t\tuiButtonSet = $( \"<div></div>\" )\n\t\t\t\t.addClass( \"ui-dialog-buttonset\" )\n\t\t\t\t.appendTo( uiDialogButtonPane );\n\n\t\t// if we already have a button pane, remove it\n\t\tself.uiDialog.find('.ui-dialog-buttonpane').remove();\n\n\t\tif (typeof buttons === 'object' && buttons !== null) {\n\t\t\t$.each(buttons, function() {\n\t\t\t\treturn !(hasButtons = true);\n\t\t\t});\n\t\t}\n\t\tif (hasButtons) {\n\t\t\t$.each(buttons, function(name, props) {\n\t\t\t\tprops = $.isFunction( props ) ?\n\t\t\t\t\t{ click: props, text: name } :\n\t\t\t\t\tprops;\n\t\t\t\tvar button = $('<button type=\"button\"></button>')\n\t\t\t\t\t.click(function() {\n\t\t\t\t\t\tprops.click.apply(self.element[0], arguments);\n\t\t\t\t\t})\n\t\t\t\t\t.appendTo(uiButtonSet);\n\t\t\t\t// can't use .attr( props, true ) with jQuery 1.3.2.\n\t\t\t\t$.each( props, function( key, value ) {\n\t\t\t\t\tif ( key === \"click\" ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tif ( key in attrFn ) {\n\t\t\t\t\t\tbutton[ key ]( value );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tbutton.attr( key, value );\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tif ($.fn.button) {\n\t\t\t\t\tbutton.button();\n\t\t\t\t}\n\t\t\t});\n\t\t\tuiDialogButtonPane.appendTo(self.uiDialog);\n\t\t}\n\t},\n\n\t_makeDraggable: function() {\n\t\tvar self = this,\n\t\t\toptions = self.options,\n\t\t\tdoc = $(document),\n\t\t\theightBeforeDrag;\n\n\t\tfunction filteredUi(ui) {\n\t\t\treturn {\n\t\t\t\tposition: ui.position,\n\t\t\t\toffset: ui.offset\n\t\t\t};\n\t\t}\n\n\t\tself.uiDialog.draggable({\n\t\t\tcancel: '.ui-dialog-content, .ui-dialog-titlebar-close',\n\t\t\thandle: '.ui-dialog-titlebar',\n\t\t\tcontainment: 'document',\n\t\t\tstart: function(event, ui) {\n\t\t\t\theightBeforeDrag = options.height === \"auto\" ? \"auto\" : $(this).height();\n\t\t\t\t$(this).height($(this).height()).addClass(\"ui-dialog-dragging\");\n\t\t\t\tself._trigger('dragStart', event, filteredUi(ui));\n\t\t\t},\n\t\t\tdrag: function(event, ui) {\n\t\t\t\tself._trigger('drag', event, filteredUi(ui));\n\t\t\t},\n\t\t\tstop: function(event, ui) {\n\t\t\t\toptions.position = [ui.position.left - doc.scrollLeft(),\n\t\t\t\t\tui.position.top - doc.scrollTop()];\n\t\t\t\t$(this).removeClass(\"ui-dialog-dragging\").height(heightBeforeDrag);\n\t\t\t\tself._trigger('dragStop', event, filteredUi(ui));\n\t\t\t\t$.ui.dialog.overlay.resize();\n\t\t\t}\n\t\t});\n\t},\n\n\t_makeResizable: function(handles) {\n\t\thandles = (handles === undefined ? this.options.resizable : handles);\n\t\tvar self = this,\n\t\t\toptions = self.options,\n\t\t\t// .ui-resizable has position: relative defined in the stylesheet\n\t\t\t// but dialogs have to use absolute or fixed positioning\n\t\t\tposition = self.uiDialog.css('position'),\n\t\t\tresizeHandles = (typeof handles === 'string' ?\n\t\t\t\thandles\t:\n\t\t\t\t'n,e,s,w,se,sw,ne,nw'\n\t\t\t);\n\n\t\tfunction filteredUi(ui) {\n\t\t\treturn {\n\t\t\t\toriginalPosition: ui.originalPosition,\n\t\t\t\toriginalSize: ui.originalSize,\n\t\t\t\tposition: ui.position,\n\t\t\t\tsize: ui.size\n\t\t\t};\n\t\t}\n\n\t\tself.uiDialog.resizable({\n\t\t\tcancel: '.ui-dialog-content',\n\t\t\tcontainment: 'document',\n\t\t\talsoResize: self.element,\n\t\t\tmaxWidth: options.maxWidth,\n\t\t\tmaxHeight: options.maxHeight,\n\t\t\tminWidth: options.minWidth,\n\t\t\tminHeight: self._minHeight(),\n\t\t\thandles: resizeHandles,\n\t\t\tstart: function(event, ui) {\n\t\t\t\t$(this).addClass(\"ui-dialog-resizing\");\n\t\t\t\tself._trigger('resizeStart', event, filteredUi(ui));\n\t\t\t},\n\t\t\tresize: function(event, ui) {\n\t\t\t\tself._trigger('resize', event, filteredUi(ui));\n\t\t\t},\n\t\t\tstop: function(event, ui) {\n\t\t\t\t$(this).removeClass(\"ui-dialog-resizing\");\n\t\t\t\toptions.height = $(this).height();\n\t\t\t\toptions.width = $(this).width();\n\t\t\t\tself._trigger('resizeStop', event, filteredUi(ui));\n\t\t\t\t$.ui.dialog.overlay.resize();\n\t\t\t}\n\t\t})\n\t\t.css('position', position)\n\t\t.find('.ui-resizable-se').addClass('ui-icon ui-icon-grip-diagonal-se');\n\t},\n\n\t_minHeight: function() {\n\t\tvar options = this.options;\n\n\t\tif (options.height === 'auto') {\n\t\t\treturn options.minHeight;\n\t\t} else {\n\t\t\treturn Math.min(options.minHeight, options.height);\n\t\t}\n\t},\n\n\t_position: function(position) {\n\t\tvar myAt = [],\n\t\t\toffset = [0, 0],\n\t\t\tisVisible;\n\n\t\tif (position) {\n\t\t\t// deep extending converts arrays to objects in jQuery <= 1.3.2 :-(\n\t//\t\tif (typeof position == 'string' || $.isArray(position)) {\n\t//\t\t\tmyAt = $.isArray(position) ? position : position.split(' ');\n\n\t\t\tif (typeof position === 'string' || (typeof position === 'object' && '0' in position)) {\n\t\t\t\tmyAt = position.split ? position.split(' ') : [position[0], position[1]];\n\t\t\t\tif (myAt.length === 1) {\n\t\t\t\t\tmyAt[1] = myAt[0];\n\t\t\t\t}\n\n\t\t\t\t$.each(['left', 'top'], function(i, offsetPosition) {\n\t\t\t\t\tif (+myAt[i] === myAt[i]) {\n\t\t\t\t\t\toffset[i] = myAt[i];\n\t\t\t\t\t\tmyAt[i] = offsetPosition;\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\tposition = {\n\t\t\t\t\tmy: myAt.join(\" \"),\n\t\t\t\t\tat: myAt.join(\" \"),\n\t\t\t\t\toffset: offset.join(\" \")\n\t\t\t\t};\n\t\t\t} \n\n\t\t\tposition = $.extend({}, $.ui.dialog.prototype.options.position, position);\n\t\t} else {\n\t\t\tposition = $.ui.dialog.prototype.options.position;\n\t\t}\n\n\t\t// need to show the dialog to get the actual offset in the position plugin\n\t\tisVisible = this.uiDialog.is(':visible');\n\t\tif (!isVisible) {\n\t\t\tthis.uiDialog.show();\n\t\t}\n\t\tthis.uiDialog\n\t\t\t// workaround for jQuery bug #5781 http://dev.jquery.com/ticket/5781\n\t\t\t.css({ top: 0, left: 0 })\n\t\t\t.position($.extend({ of: window }, position));\n\t\tif (!isVisible) {\n\t\t\tthis.uiDialog.hide();\n\t\t}\n\t},\n\n\t_setOptions: function( options ) {\n\t\tvar self = this,\n\t\t\tresizableOptions = {},\n\t\t\tresize = false;\n\n\t\t$.each( options, function( key, value ) {\n\t\t\tself._setOption( key, value );\n\t\t\t\n\t\t\tif ( key in sizeRelatedOptions ) {\n\t\t\t\tresize = true;\n\t\t\t}\n\t\t\tif ( key in resizableRelatedOptions ) {\n\t\t\t\tresizableOptions[ key ] = value;\n\t\t\t}\n\t\t});\n\n\t\tif ( resize ) {\n\t\t\tthis._size();\n\t\t}\n\t\tif ( this.uiDialog.is( \":data(resizable)\" ) ) {\n\t\t\tthis.uiDialog.resizable( \"option\", resizableOptions );\n\t\t}\n\t},\n\n\t_setOption: function(key, value){\n\t\tvar self = this,\n\t\t\tuiDialog = self.uiDialog;\n\n\t\tswitch (key) {\n\t\t\t//handling of deprecated beforeclose (vs beforeClose) option\n\t\t\t//Ticket #4669 http://dev.jqueryui.com/ticket/4669\n\t\t\t//TODO: remove in 1.9pre\n\t\t\tcase \"beforeclose\":\n\t\t\t\tkey = \"beforeClose\";\n\t\t\t\tbreak;\n\t\t\tcase \"buttons\":\n\t\t\t\tself._createButtons(value);\n\t\t\t\tbreak;\n\t\t\tcase \"closeText\":\n\t\t\t\t// ensure that we always pass a string\n\t\t\t\tself.uiDialogTitlebarCloseText.text(\"\" + value);\n\t\t\t\tbreak;\n\t\t\tcase \"dialogClass\":\n\t\t\t\tuiDialog\n\t\t\t\t\t.removeClass(self.options.dialogClass)\n\t\t\t\t\t.addClass(uiDialogClasses + value);\n\t\t\t\tbreak;\n\t\t\tcase \"disabled\":\n\t\t\t\tif (value) {\n\t\t\t\t\tuiDialog.addClass('ui-dialog-disabled');\n\t\t\t\t} else {\n\t\t\t\t\tuiDialog.removeClass('ui-dialog-disabled');\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase \"draggable\":\n\t\t\t\tvar isDraggable = uiDialog.is( \":data(draggable)\" );\n\t\t\t\tif ( isDraggable && !value ) {\n\t\t\t\t\tuiDialog.draggable( \"destroy\" );\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ( !isDraggable && value ) {\n\t\t\t\t\tself._makeDraggable();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase \"position\":\n\t\t\t\tself._position(value);\n\t\t\t\tbreak;\n\t\t\tcase \"resizable\":\n\t\t\t\t// currently resizable, becoming non-resizable\n\t\t\t\tvar isResizable = uiDialog.is( \":data(resizable)\" );\n\t\t\t\tif (isResizable && !value) {\n\t\t\t\t\tuiDialog.resizable('destroy');\n\t\t\t\t}\n\n\t\t\t\t// currently resizable, changing handles\n\t\t\t\tif (isResizable && typeof value === 'string') {\n\t\t\t\t\tuiDialog.resizable('option', 'handles', value);\n\t\t\t\t}\n\n\t\t\t\t// currently non-resizable, becoming resizable\n\t\t\t\tif (!isResizable && value !== false) {\n\t\t\t\t\tself._makeResizable(value);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase \"title\":\n\t\t\t\t// convert whatever was passed in o a string, for html() to not throw up\n\t\t\t\t$(\".ui-dialog-title\", self.uiDialogTitlebar).html(\"\" + (value || '&#160;'));\n\t\t\t\tbreak;\n\t\t}\n\n\t\t$.Widget.prototype._setOption.apply(self, arguments);\n\t},\n\n\t_size: function() {\n\t\t/* If the user has resized the dialog, the .ui-dialog and .ui-dialog-content\n\t\t * divs will both have width and height set, so we need to reset them\n\t\t */\n\t\tvar options = this.options,\n\t\t\tnonContentHeight,\n\t\t\tminContentHeight,\n\t\t\tisVisible = this.uiDialog.is( \":visible\" );\n\n\t\t// reset content sizing\n\t\tthis.element.show().css({\n\t\t\twidth: 'auto',\n\t\t\tminHeight: 0,\n\t\t\theight: 0\n\t\t});\n\n\t\tif (options.minWidth > options.width) {\n\t\t\toptions.width = options.minWidth;\n\t\t}\n\n\t\t// reset wrapper sizing\n\t\t// determine the height of all the non-content elements\n\t\tnonContentHeight = this.uiDialog.css({\n\t\t\t\theight: 'auto',\n\t\t\t\twidth: options.width\n\t\t\t})\n\t\t\t.height();\n\t\tminContentHeight = Math.max( 0, options.minHeight - nonContentHeight );\n\t\t\n\t\tif ( options.height === \"auto\" ) {\n\t\t\t// only needed for IE6 support\n\t\t\tif ( $.support.minHeight ) {\n\t\t\t\tthis.element.css({\n\t\t\t\t\tminHeight: minContentHeight,\n\t\t\t\t\theight: \"auto\"\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tthis.uiDialog.show();\n\t\t\t\tvar autoHeight = this.element.css( \"height\", \"auto\" ).height();\n\t\t\t\tif ( !isVisible ) {\n\t\t\t\t\tthis.uiDialog.hide();\n\t\t\t\t}\n\t\t\t\tthis.element.height( Math.max( autoHeight, minContentHeight ) );\n\t\t\t}\n\t\t} else {\n\t\t\tthis.element.height( Math.max( options.height - nonContentHeight, 0 ) );\n\t\t}\n\n\t\tif (this.uiDialog.is(':data(resizable)')) {\n\t\t\tthis.uiDialog.resizable('option', 'minHeight', this._minHeight());\n\t\t}\n\t}\n});\n\n$.extend($.ui.dialog, {\n\tversion: \"1.8.20\",\n\n\tuuid: 0,\n\tmaxZ: 0,\n\n\tgetTitleId: function($el) {\n\t\tvar id = $el.attr('id');\n\t\tif (!id) {\n\t\t\tthis.uuid += 1;\n\t\t\tid = this.uuid;\n\t\t}\n\t\treturn 'ui-dialog-title-' + id;\n\t},\n\n\toverlay: function(dialog) {\n\t\tthis.$el = $.ui.dialog.overlay.create(dialog);\n\t}\n});\n\n$.extend($.ui.dialog.overlay, {\n\tinstances: [],\n\t// reuse old instances due to IE memory leak with alpha transparency (see #5185)\n\toldInstances: [],\n\tmaxZ: 0,\n\tevents: $.map('focus,mousedown,mouseup,keydown,keypress,click'.split(','),\n\t\tfunction(event) { return event + '.dialog-overlay'; }).join(' '),\n\tcreate: function(dialog) {\n\t\tif (this.instances.length === 0) {\n\t\t\t// prevent use of anchors and inputs\n\t\t\t// we use a setTimeout in case the overlay is created from an\n\t\t\t// event that we're going to be cancelling (see #2804)\n\t\t\tsetTimeout(function() {\n\t\t\t\t// handle $(el).dialog().dialog('close') (see #4065)\n\t\t\t\tif ($.ui.dialog.overlay.instances.length) {\n\t\t\t\t\t$(document).bind($.ui.dialog.overlay.events, function(event) {\n\t\t\t\t\t\t// stop events if the z-index of the target is < the z-index of the overlay\n\t\t\t\t\t\t// we cannot return true when we don't want to cancel the event (#3523)\n\t\t\t\t\t\tif ($(event.target).zIndex() < $.ui.dialog.overlay.maxZ) {\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}, 1);\n\n\t\t\t// allow closing by pressing the escape key\n\t\t\t$(document).bind('keydown.dialog-overlay', function(event) {\n\t\t\t\tif (dialog.options.closeOnEscape && !event.isDefaultPrevented() && event.keyCode &&\n\t\t\t\t\tevent.keyCode === $.ui.keyCode.ESCAPE) {\n\t\t\t\t\t\n\t\t\t\t\tdialog.close(event);\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t// handle window resize\n\t\t\t$(window).bind('resize.dialog-overlay', $.ui.dialog.overlay.resize);\n\t\t}\n\n\t\tvar $el = (this.oldInstances.pop() || $('<div></div>').addClass('ui-widget-overlay'))\n\t\t\t.appendTo(document.body)\n\t\t\t.css({\n\t\t\t\twidth: this.width(),\n\t\t\t\theight: this.height()\n\t\t\t});\n\n\t\tif ($.fn.bgiframe) {\n\t\t\t$el.bgiframe();\n\t\t}\n\n\t\tthis.instances.push($el);\n\t\treturn $el;\n\t},\n\n\tdestroy: function($el) {\n\t\tvar indexOf = $.inArray($el, this.instances);\n\t\tif (indexOf != -1){\n\t\t\tthis.oldInstances.push(this.instances.splice(indexOf, 1)[0]);\n\t\t}\n\n\t\tif (this.instances.length === 0) {\n\t\t\t$([document, window]).unbind('.dialog-overlay');\n\t\t}\n\n\t\t$el.remove();\n\t\t\n\t\t// adjust the maxZ to allow other modal dialogs to continue to work (see #4309)\n\t\tvar maxZ = 0;\n\t\t$.each(this.instances, function() {\n\t\t\tmaxZ = Math.max(maxZ, this.css('z-index'));\n\t\t});\n\t\tthis.maxZ = maxZ;\n\t},\n\n\theight: function() {\n\t\tvar scrollHeight,\n\t\t\toffsetHeight;\n\t\t// handle IE 6\n\t\tif ($.browser.msie && $.browser.version < 7) {\n\t\t\tscrollHeight = Math.max(\n\t\t\t\tdocument.documentElement.scrollHeight,\n\t\t\t\tdocument.body.scrollHeight\n\t\t\t);\n\t\t\toffsetHeight = Math.max(\n\t\t\t\tdocument.documentElement.offsetHeight,\n\t\t\t\tdocument.body.offsetHeight\n\t\t\t);\n\n\t\t\tif (scrollHeight < offsetHeight) {\n\t\t\t\treturn $(window).height() + 'px';\n\t\t\t} else {\n\t\t\t\treturn scrollHeight + 'px';\n\t\t\t}\n\t\t// handle \"good\" browsers\n\t\t} else {\n\t\t\treturn $(document).height() + 'px';\n\t\t}\n\t},\n\n\twidth: function() {\n\t\tvar scrollWidth,\n\t\t\toffsetWidth;\n\t\t// handle IE\n\t\tif ( $.browser.msie ) {\n\t\t\tscrollWidth = Math.max(\n\t\t\t\tdocument.documentElement.scrollWidth,\n\t\t\t\tdocument.body.scrollWidth\n\t\t\t);\n\t\t\toffsetWidth = Math.max(\n\t\t\t\tdocument.documentElement.offsetWidth,\n\t\t\t\tdocument.body.offsetWidth\n\t\t\t);\n\n\t\t\tif (scrollWidth < offsetWidth) {\n\t\t\t\treturn $(window).width() + 'px';\n\t\t\t} else {\n\t\t\t\treturn scrollWidth + 'px';\n\t\t\t}\n\t\t// handle \"good\" browsers\n\t\t} else {\n\t\t\treturn $(document).width() + 'px';\n\t\t}\n\t},\n\n\tresize: function() {\n\t\t/* If the dialog is draggable and the user drags it past the\n\t\t * right edge of the window, the document becomes wider so we\n\t\t * need to stretch the overlay. If the user then drags the\n\t\t * dialog back to the left, the document will become narrower,\n\t\t * so we need to shrink the overlay to the appropriate size.\n\t\t * This is handled by shrinking the overlay before setting it\n\t\t * to the full document size.\n\t\t */\n\t\tvar $overlays = $([]);\n\t\t$.each($.ui.dialog.overlay.instances, function() {\n\t\t\t$overlays = $overlays.add(this);\n\t\t});\n\n\t\t$overlays.css({\n\t\t\twidth: 0,\n\t\t\theight: 0\n\t\t}).css({\n\t\t\twidth: $.ui.dialog.overlay.width(),\n\t\t\theight: $.ui.dialog.overlay.height()\n\t\t});\n\t}\n});\n\n$.extend($.ui.dialog.overlay.prototype, {\n\tdestroy: function() {\n\t\t$.ui.dialog.overlay.destroy(this.$el);\n\t}\n});\n\n}(jQuery));\n\n(function( $, undefined ) {\n\n$.ui = $.ui || {};\n\nvar horizontalPositions = /left|center|right/,\n\tverticalPositions = /top|center|bottom/,\n\tcenter = \"center\",\n\tsupport = {},\n\t_position = $.fn.position,\n\t_offset = $.fn.offset;\n\n$.fn.position = function( options ) {\n\tif ( !options || !options.of ) {\n\t\treturn _position.apply( this, arguments );\n\t}\n\n\t// make a copy, we don't want to modify arguments\n\toptions = $.extend( {}, options );\n\n\tvar target = $( options.of ),\n\t\ttargetElem = target[0],\n\t\tcollision = ( options.collision || \"flip\" ).split( \" \" ),\n\t\toffset = options.offset ? options.offset.split( \" \" ) : [ 0, 0 ],\n\t\ttargetWidth,\n\t\ttargetHeight,\n\t\tbasePosition;\n\n\tif ( targetElem.nodeType === 9 ) {\n\t\ttargetWidth = target.width();\n\t\ttargetHeight = target.height();\n\t\tbasePosition = { top: 0, left: 0 };\n\t// TODO: use $.isWindow() in 1.9\n\t} else if ( targetElem.setTimeout ) {\n\t\ttargetWidth = target.width();\n\t\ttargetHeight = target.height();\n\t\tbasePosition = { top: target.scrollTop(), left: target.scrollLeft() };\n\t} else if ( targetElem.preventDefault ) {\n\t\t// force left top to allow flipping\n\t\toptions.at = \"left top\";\n\t\ttargetWidth = targetHeight = 0;\n\t\tbasePosition = { top: options.of.pageY, left: options.of.pageX };\n\t} else {\n\t\ttargetWidth = target.outerWidth();\n\t\ttargetHeight = target.outerHeight();\n\t\tbasePosition = target.offset();\n\t}\n\n\t// force my and at to have valid horizontal and veritcal positions\n\t// if a value is missing or invalid, it will be converted to center \n\t$.each( [ \"my\", \"at\" ], function() {\n\t\tvar pos = ( options[this] || \"\" ).split( \" \" );\n\t\tif ( pos.length === 1) {\n\t\t\tpos = horizontalPositions.test( pos[0] ) ?\n\t\t\t\tpos.concat( [center] ) :\n\t\t\t\tverticalPositions.test( pos[0] ) ?\n\t\t\t\t\t[ center ].concat( pos ) :\n\t\t\t\t\t[ center, center ];\n\t\t}\n\t\tpos[ 0 ] = horizontalPositions.test( pos[0] ) ? pos[ 0 ] : center;\n\t\tpos[ 1 ] = verticalPositions.test( pos[1] ) ? pos[ 1 ] : center;\n\t\toptions[ this ] = pos;\n\t});\n\n\t// normalize collision option\n\tif ( collision.length === 1 ) {\n\t\tcollision[ 1 ] = collision[ 0 ];\n\t}\n\n\t// normalize offset option\n\toffset[ 0 ] = parseInt( offset[0], 10 ) || 0;\n\tif ( offset.length === 1 ) {\n\t\toffset[ 1 ] = offset[ 0 ];\n\t}\n\toffset[ 1 ] = parseInt( offset[1], 10 ) || 0;\n\n\tif ( options.at[0] === \"right\" ) {\n\t\tbasePosition.left += targetWidth;\n\t} else if ( options.at[0] === center ) {\n\t\tbasePosition.left += targetWidth / 2;\n\t}\n\n\tif ( options.at[1] === \"bottom\" ) {\n\t\tbasePosition.top += targetHeight;\n\t} else if ( options.at[1] === center ) {\n\t\tbasePosition.top += targetHeight / 2;\n\t}\n\n\tbasePosition.left += offset[ 0 ];\n\tbasePosition.top += offset[ 1 ];\n\n\treturn this.each(function() {\n\t\tvar elem = $( this ),\n\t\t\telemWidth = elem.outerWidth(),\n\t\t\telemHeight = elem.outerHeight(),\n\t\t\tmarginLeft = parseInt( $.curCSS( this, \"marginLeft\", true ) ) || 0,\n\t\t\tmarginTop = parseInt( $.curCSS( this, \"marginTop\", true ) ) || 0,\n\t\t\tcollisionWidth = elemWidth + marginLeft +\n\t\t\t\t( parseInt( $.curCSS( this, \"marginRight\", true ) ) || 0 ),\n\t\t\tcollisionHeight = elemHeight + marginTop +\n\t\t\t\t( parseInt( $.curCSS( this, \"marginBottom\", true ) ) || 0 ),\n\t\t\tposition = $.extend( {}, basePosition ),\n\t\t\tcollisionPosition;\n\n\t\tif ( options.my[0] === \"right\" ) {\n\t\t\tposition.left -= elemWidth;\n\t\t} else if ( options.my[0] === center ) {\n\t\t\tposition.left -= elemWidth / 2;\n\t\t}\n\n\t\tif ( options.my[1] === \"bottom\" ) {\n\t\t\tposition.top -= elemHeight;\n\t\t} else if ( options.my[1] === center ) {\n\t\t\tposition.top -= elemHeight / 2;\n\t\t}\n\n\t\t// prevent fractions if jQuery version doesn't support them (see #5280)\n\t\tif ( !support.fractions ) {\n\t\t\tposition.left = Math.round( position.left );\n\t\t\tposition.top = Math.round( position.top );\n\t\t}\n\n\t\tcollisionPosition = {\n\t\t\tleft: position.left - marginLeft,\n\t\t\ttop: position.top - marginTop\n\t\t};\n\n\t\t$.each( [ \"left\", \"top\" ], function( i, dir ) {\n\t\t\tif ( $.ui.position[ collision[i] ] ) {\n\t\t\t\t$.ui.position[ collision[i] ][ dir ]( position, {\n\t\t\t\t\ttargetWidth: targetWidth,\n\t\t\t\t\ttargetHeight: targetHeight,\n\t\t\t\t\telemWidth: elemWidth,\n\t\t\t\t\telemHeight: elemHeight,\n\t\t\t\t\tcollisionPosition: collisionPosition,\n\t\t\t\t\tcollisionWidth: collisionWidth,\n\t\t\t\t\tcollisionHeight: collisionHeight,\n\t\t\t\t\toffset: offset,\n\t\t\t\t\tmy: options.my,\n\t\t\t\t\tat: options.at\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\n\t\tif ( $.fn.bgiframe ) {\n\t\t\telem.bgiframe();\n\t\t}\n\t\telem.offset( $.extend( position, { using: options.using } ) );\n\t});\n};\n\n$.ui.position = {\n\tfit: {\n\t\tleft: function( position, data ) {\n\t\t\tvar win = $( window ),\n\t\t\t\tover = data.collisionPosition.left + data.collisionWidth - win.width() - win.scrollLeft();\n\t\t\tposition.left = over > 0 ? position.left - over : Math.max( position.left - data.collisionPosition.left, position.left );\n\t\t},\n\t\ttop: function( position, data ) {\n\t\t\tvar win = $( window ),\n\t\t\t\tover = data.collisionPosition.top + data.collisionHeight - win.height() - win.scrollTop();\n\t\t\tposition.top = over > 0 ? position.top - over : Math.max( position.top - data.collisionPosition.top, position.top );\n\t\t}\n\t},\n\n\tflip: {\n\t\tleft: function( position, data ) {\n\t\t\tif ( data.at[0] === center ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tvar win = $( window ),\n\t\t\t\tover = data.collisionPosition.left + data.collisionWidth - win.width() - win.scrollLeft(),\n\t\t\t\tmyOffset = data.my[ 0 ] === \"left\" ?\n\t\t\t\t\t-data.elemWidth :\n\t\t\t\t\tdata.my[ 0 ] === \"right\" ?\n\t\t\t\t\t\tdata.elemWidth :\n\t\t\t\t\t\t0,\n\t\t\t\tatOffset = data.at[ 0 ] === \"left\" ?\n\t\t\t\t\tdata.targetWidth :\n\t\t\t\t\t-data.targetWidth,\n\t\t\t\toffset = -2 * data.offset[ 0 ];\n\t\t\tposition.left += data.collisionPosition.left < 0 ?\n\t\t\t\tmyOffset + atOffset + offset :\n\t\t\t\tover > 0 ?\n\t\t\t\t\tmyOffset + atOffset + offset :\n\t\t\t\t\t0;\n\t\t},\n\t\ttop: function( position, data ) {\n\t\t\tif ( data.at[1] === center ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tvar win = $( window ),\n\t\t\t\tover = data.collisionPosition.top + data.collisionHeight - win.height() - win.scrollTop(),\n\t\t\t\tmyOffset = data.my[ 1 ] === \"top\" ?\n\t\t\t\t\t-data.elemHeight :\n\t\t\t\t\tdata.my[ 1 ] === \"bottom\" ?\n\t\t\t\t\t\tdata.elemHeight :\n\t\t\t\t\t\t0,\n\t\t\t\tatOffset = data.at[ 1 ] === \"top\" ?\n\t\t\t\t\tdata.targetHeight :\n\t\t\t\t\t-data.targetHeight,\n\t\t\t\toffset = -2 * data.offset[ 1 ];\n\t\t\tposition.top += data.collisionPosition.top < 0 ?\n\t\t\t\tmyOffset + atOffset + offset :\n\t\t\t\tover > 0 ?\n\t\t\t\t\tmyOffset + atOffset + offset :\n\t\t\t\t\t0;\n\t\t}\n\t}\n};\n\n// offset setter from jQuery 1.4\nif ( !$.offset.setOffset ) {\n\t$.offset.setOffset = function( elem, options ) {\n\t\t// set position first, in-case top/left are set even on static elem\n\t\tif ( /static/.test( $.curCSS( elem, \"position\" ) ) ) {\n\t\t\telem.style.position = \"relative\";\n\t\t}\n\t\tvar curElem   = $( elem ),\n\t\t\tcurOffset = curElem.offset(),\n\t\t\tcurTop    = parseInt( $.curCSS( elem, \"top\",  true ), 10 ) || 0,\n\t\t\tcurLeft   = parseInt( $.curCSS( elem, \"left\", true ), 10)  || 0,\n\t\t\tprops     = {\n\t\t\t\ttop:  (options.top  - curOffset.top)  + curTop,\n\t\t\t\tleft: (options.left - curOffset.left) + curLeft\n\t\t\t};\n\t\t\n\t\tif ( 'using' in options ) {\n\t\t\toptions.using.call( elem, props );\n\t\t} else {\n\t\t\tcurElem.css( props );\n\t\t}\n\t};\n\n\t$.fn.offset = function( options ) {\n\t\tvar elem = this[ 0 ];\n\t\tif ( !elem || !elem.ownerDocument ) { return null; }\n\t\tif ( options ) { \n\t\t\treturn this.each(function() {\n\t\t\t\t$.offset.setOffset( this, options );\n\t\t\t});\n\t\t}\n\t\treturn _offset.call( this );\n\t};\n}\n\n// fraction support test (older versions of jQuery don't support fractions)\n(function () {\n\tvar body = document.getElementsByTagName( \"body\" )[ 0 ], \n\t\tdiv = document.createElement( \"div\" ),\n\t\ttestElement, testElementParent, testElementStyle, offset, offsetTotal;\n\n\t//Create a \"fake body\" for testing based on method used in jQuery.support\n\ttestElement = document.createElement( body ? \"div\" : \"body\" );\n\ttestElementStyle = {\n\t\tvisibility: \"hidden\",\n\t\twidth: 0,\n\t\theight: 0,\n\t\tborder: 0,\n\t\tmargin: 0,\n\t\tbackground: \"none\"\n\t};\n\tif ( body ) {\n\t\t$.extend( testElementStyle, {\n\t\t\tposition: \"absolute\",\n\t\t\tleft: \"-1000px\",\n\t\t\ttop: \"-1000px\"\n\t\t});\n\t}\n\tfor ( var i in testElementStyle ) {\n\t\ttestElement.style[ i ] = testElementStyle[ i ];\n\t}\n\ttestElement.appendChild( div );\n\ttestElementParent = body || document.documentElement;\n\ttestElementParent.insertBefore( testElement, testElementParent.firstChild );\n\n\tdiv.style.cssText = \"position: absolute; left: 10.7432222px; top: 10.432325px; height: 30px; width: 201px;\";\n\n\toffset = $( div ).offset( function( _, offset ) {\n\t\treturn offset;\n\t}).offset();\n\n\ttestElement.innerHTML = \"\";\n\ttestElementParent.removeChild( testElement );\n\n\toffsetTotal = offset.top + offset.left + ( body ? 2000 : 0 );\n\tsupport.fractions = offsetTotal > 21 && offsetTotal < 22;\n})();\n\n}( jQuery ));\n\n(function( $, undefined ) {\n\n$.widget( \"ui.progressbar\", {\n\toptions: {\n\t\tvalue: 0,\n\t\tmax: 100\n\t},\n\n\tmin: 0,\n\n\t_create: function() {\n\t\tthis.element\n\t\t\t.addClass( \"ui-progressbar ui-widget ui-widget-content ui-corner-all\" )\n\t\t\t.attr({\n\t\t\t\trole: \"progressbar\",\n\t\t\t\t\"aria-valuemin\": this.min,\n\t\t\t\t\"aria-valuemax\": this.options.max,\n\t\t\t\t\"aria-valuenow\": this._value()\n\t\t\t});\n\n\t\tthis.valueDiv = $( \"<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>\" )\n\t\t\t.appendTo( this.element );\n\n\t\tthis.oldValue = this._value();\n\t\tthis._refreshValue();\n\t},\n\n\tdestroy: function() {\n\t\tthis.element\n\t\t\t.removeClass( \"ui-progressbar ui-widget ui-widget-content ui-corner-all\" )\n\t\t\t.removeAttr( \"role\" )\n\t\t\t.removeAttr( \"aria-valuemin\" )\n\t\t\t.removeAttr( \"aria-valuemax\" )\n\t\t\t.removeAttr( \"aria-valuenow\" );\n\n\t\tthis.valueDiv.remove();\n\n\t\t$.Widget.prototype.destroy.apply( this, arguments );\n\t},\n\n\tvalue: function( newValue ) {\n\t\tif ( newValue === undefined ) {\n\t\t\treturn this._value();\n\t\t}\n\n\t\tthis._setOption( \"value\", newValue );\n\t\treturn this;\n\t},\n\n\t_setOption: function( key, value ) {\n\t\tif ( key === \"value\" ) {\n\t\t\tthis.options.value = value;\n\t\t\tthis._refreshValue();\n\t\t\tif ( this._value() === this.options.max ) {\n\t\t\t\tthis._trigger( \"complete\" );\n\t\t\t}\n\t\t}\n\n\t\t$.Widget.prototype._setOption.apply( this, arguments );\n\t},\n\n\t_value: function() {\n\t\tvar val = this.options.value;\n\t\t// normalize invalid value\n\t\tif ( typeof val !== \"number\" ) {\n\t\t\tval = 0;\n\t\t}\n\t\treturn Math.min( this.options.max, Math.max( this.min, val ) );\n\t},\n\n\t_percentage: function() {\n\t\treturn 100 * this._value() / this.options.max;\n\t},\n\n\t_refreshValue: function() {\n\t\tvar value = this.value();\n\t\tvar percentage = this._percentage();\n\n\t\tif ( this.oldValue !== value ) {\n\t\t\tthis.oldValue = value;\n\t\t\tthis._trigger( \"change\" );\n\t\t}\n\n\t\tthis.valueDiv\n\t\t\t.toggle( value > this.min )\n\t\t\t.toggleClass( \"ui-corner-right\", value === this.options.max )\n\t\t\t.width( percentage.toFixed(0) + \"%\" );\n\t\tthis.element.attr( \"aria-valuenow\", value );\n\t}\n});\n\n$.extend( $.ui.progressbar, {\n\tversion: \"1.8.20\"\n});\n\n})( jQuery );\n\n(function( $, undefined ) {\n\n// number of pages in a slider\n// (how many times can you page up/down to go through the whole range)\nvar numPages = 5;\n\n$.widget( \"ui.slider\", $.ui.mouse, {\n\n\twidgetEventPrefix: \"slide\",\n\n\toptions: {\n\t\tanimate: false,\n\t\tdistance: 0,\n\t\tmax: 100,\n\t\tmin: 0,\n\t\torientation: \"horizontal\",\n\t\trange: false,\n\t\tstep: 1,\n\t\tvalue: 0,\n\t\tvalues: null\n\t},\n\n\t_create: function() {\n\t\tvar self = this,\n\t\t\to = this.options,\n\t\t\texistingHandles = this.element.find( \".ui-slider-handle\" ).addClass( \"ui-state-default ui-corner-all\" ),\n\t\t\thandle = \"<a class='ui-slider-handle ui-state-default ui-corner-all' href='#'></a>\",\n\t\t\thandleCount = ( o.values && o.values.length ) || 1,\n\t\t\thandles = [];\n\n\t\tthis._keySliding = false;\n\t\tthis._mouseSliding = false;\n\t\tthis._animateOff = true;\n\t\tthis._handleIndex = null;\n\t\tthis._detectOrientation();\n\t\tthis._mouseInit();\n\n\t\tthis.element\n\t\t\t.addClass( \"ui-slider\" +\n\t\t\t\t\" ui-slider-\" + this.orientation +\n\t\t\t\t\" ui-widget\" +\n\t\t\t\t\" ui-widget-content\" +\n\t\t\t\t\" ui-corner-all\" +\n\t\t\t\t( o.disabled ? \" ui-slider-disabled ui-disabled\" : \"\" ) );\n\n\t\tthis.range = $([]);\n\n\t\tif ( o.range ) {\n\t\t\tif ( o.range === true ) {\n\t\t\t\tif ( !o.values ) {\n\t\t\t\t\to.values = [ this._valueMin(), this._valueMin() ];\n\t\t\t\t}\n\t\t\t\tif ( o.values.length && o.values.length !== 2 ) {\n\t\t\t\t\to.values = [ o.values[0], o.values[0] ];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.range = $( \"<div></div>\" )\n\t\t\t\t.appendTo( this.element )\n\t\t\t\t.addClass( \"ui-slider-range\" +\n\t\t\t\t// note: this isn't the most fittingly semantic framework class for this element,\n\t\t\t\t// but worked best visually with a variety of themes\n\t\t\t\t\" ui-widget-header\" + \n\t\t\t\t( ( o.range === \"min\" || o.range === \"max\" ) ? \" ui-slider-range-\" + o.range : \"\" ) );\n\t\t}\n\n\t\tfor ( var i = existingHandles.length; i < handleCount; i += 1 ) {\n\t\t\thandles.push( handle );\n\t\t}\n\n\t\tthis.handles = existingHandles.add( $( handles.join( \"\" ) ).appendTo( self.element ) );\n\n\t\tthis.handle = this.handles.eq( 0 );\n\n\t\tthis.handles.add( this.range ).filter( \"a\" )\n\t\t\t.click(function( event ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t})\n\t\t\t.hover(function() {\n\t\t\t\tif ( !o.disabled ) {\n\t\t\t\t\t$( this ).addClass( \"ui-state-hover\" );\n\t\t\t\t}\n\t\t\t}, function() {\n\t\t\t\t$( this ).removeClass( \"ui-state-hover\" );\n\t\t\t})\n\t\t\t.focus(function() {\n\t\t\t\tif ( !o.disabled ) {\n\t\t\t\t\t$( \".ui-slider .ui-state-focus\" ).removeClass( \"ui-state-focus\" );\n\t\t\t\t\t$( this ).addClass( \"ui-state-focus\" );\n\t\t\t\t} else {\n\t\t\t\t\t$( this ).blur();\n\t\t\t\t}\n\t\t\t})\n\t\t\t.blur(function() {\n\t\t\t\t$( this ).removeClass( \"ui-state-focus\" );\n\t\t\t});\n\n\t\tthis.handles.each(function( i ) {\n\t\t\t$( this ).data( \"index.ui-slider-handle\", i );\n\t\t});\n\n\t\tthis.handles\n\t\t\t.keydown(function( event ) {\n\t\t\t\tvar index = $( this ).data( \"index.ui-slider-handle\" ),\n\t\t\t\t\tallowed,\n\t\t\t\t\tcurVal,\n\t\t\t\t\tnewVal,\n\t\t\t\t\tstep;\n\t\n\t\t\t\tif ( self.options.disabled ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\n\t\t\t\tswitch ( event.keyCode ) {\n\t\t\t\t\tcase $.ui.keyCode.HOME:\n\t\t\t\t\tcase $.ui.keyCode.END:\n\t\t\t\t\tcase $.ui.keyCode.PAGE_UP:\n\t\t\t\t\tcase $.ui.keyCode.PAGE_DOWN:\n\t\t\t\t\tcase $.ui.keyCode.UP:\n\t\t\t\t\tcase $.ui.keyCode.RIGHT:\n\t\t\t\t\tcase $.ui.keyCode.DOWN:\n\t\t\t\t\tcase $.ui.keyCode.LEFT:\n\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\tif ( !self._keySliding ) {\n\t\t\t\t\t\t\tself._keySliding = true;\n\t\t\t\t\t\t\t$( this ).addClass( \"ui-state-active\" );\n\t\t\t\t\t\t\tallowed = self._start( event, index );\n\t\t\t\t\t\t\tif ( allowed === false ) {\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\n\t\t\t\tstep = self.options.step;\n\t\t\t\tif ( self.options.values && self.options.values.length ) {\n\t\t\t\t\tcurVal = newVal = self.values( index );\n\t\t\t\t} else {\n\t\t\t\t\tcurVal = newVal = self.value();\n\t\t\t\t}\n\t\n\t\t\t\tswitch ( event.keyCode ) {\n\t\t\t\t\tcase $.ui.keyCode.HOME:\n\t\t\t\t\t\tnewVal = self._valueMin();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase $.ui.keyCode.END:\n\t\t\t\t\t\tnewVal = self._valueMax();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase $.ui.keyCode.PAGE_UP:\n\t\t\t\t\t\tnewVal = self._trimAlignValue( curVal + ( (self._valueMax() - self._valueMin()) / numPages ) );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase $.ui.keyCode.PAGE_DOWN:\n\t\t\t\t\t\tnewVal = self._trimAlignValue( curVal - ( (self._valueMax() - self._valueMin()) / numPages ) );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase $.ui.keyCode.UP:\n\t\t\t\t\tcase $.ui.keyCode.RIGHT:\n\t\t\t\t\t\tif ( curVal === self._valueMax() ) {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tnewVal = self._trimAlignValue( curVal + step );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase $.ui.keyCode.DOWN:\n\t\t\t\t\tcase $.ui.keyCode.LEFT:\n\t\t\t\t\t\tif ( curVal === self._valueMin() ) {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tnewVal = self._trimAlignValue( curVal - step );\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\n\t\t\t\tself._slide( event, index, newVal );\n\t\t\t})\n\t\t\t.keyup(function( event ) {\n\t\t\t\tvar index = $( this ).data( \"index.ui-slider-handle\" );\n\t\n\t\t\t\tif ( self._keySliding ) {\n\t\t\t\t\tself._keySliding = false;\n\t\t\t\t\tself._stop( event, index );\n\t\t\t\t\tself._change( event, index );\n\t\t\t\t\t$( this ).removeClass( \"ui-state-active\" );\n\t\t\t\t}\n\t\n\t\t\t});\n\n\t\tthis._refreshValue();\n\n\t\tthis._animateOff = false;\n\t},\n\n\tdestroy: function() {\n\t\tthis.handles.remove();\n\t\tthis.range.remove();\n\n\t\tthis.element\n\t\t\t.removeClass( \"ui-slider\" +\n\t\t\t\t\" ui-slider-horizontal\" +\n\t\t\t\t\" ui-slider-vertical\" +\n\t\t\t\t\" ui-slider-disabled\" +\n\t\t\t\t\" ui-widget\" +\n\t\t\t\t\" ui-widget-content\" +\n\t\t\t\t\" ui-corner-all\" )\n\t\t\t.removeData( \"slider\" )\n\t\t\t.unbind( \".slider\" );\n\n\t\tthis._mouseDestroy();\n\n\t\treturn this;\n\t},\n\n\t_mouseCapture: function( event ) {\n\t\tvar o = this.options,\n\t\t\tposition,\n\t\t\tnormValue,\n\t\t\tdistance,\n\t\t\tclosestHandle,\n\t\t\tself,\n\t\t\tindex,\n\t\t\tallowed,\n\t\t\toffset,\n\t\t\tmouseOverHandle;\n\n\t\tif ( o.disabled ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tthis.elementSize = {\n\t\t\twidth: this.element.outerWidth(),\n\t\t\theight: this.element.outerHeight()\n\t\t};\n\t\tthis.elementOffset = this.element.offset();\n\n\t\tposition = { x: event.pageX, y: event.pageY };\n\t\tnormValue = this._normValueFromMouse( position );\n\t\tdistance = this._valueMax() - this._valueMin() + 1;\n\t\tself = this;\n\t\tthis.handles.each(function( i ) {\n\t\t\tvar thisDistance = Math.abs( normValue - self.values(i) );\n\t\t\tif ( distance > thisDistance ) {\n\t\t\t\tdistance = thisDistance;\n\t\t\t\tclosestHandle = $( this );\n\t\t\t\tindex = i;\n\t\t\t}\n\t\t});\n\n\t\t// workaround for bug #3736 (if both handles of a range are at 0,\n\t\t// the first is always used as the one with least distance,\n\t\t// and moving it is obviously prevented by preventing negative ranges)\n\t\tif( o.range === true && this.values(1) === o.min ) {\n\t\t\tindex += 1;\n\t\t\tclosestHandle = $( this.handles[index] );\n\t\t}\n\n\t\tallowed = this._start( event, index );\n\t\tif ( allowed === false ) {\n\t\t\treturn false;\n\t\t}\n\t\tthis._mouseSliding = true;\n\n\t\tself._handleIndex = index;\n\n\t\tclosestHandle\n\t\t\t.addClass( \"ui-state-active\" )\n\t\t\t.focus();\n\t\t\n\t\toffset = closestHandle.offset();\n\t\tmouseOverHandle = !$( event.target ).parents().andSelf().is( \".ui-slider-handle\" );\n\t\tthis._clickOffset = mouseOverHandle ? { left: 0, top: 0 } : {\n\t\t\tleft: event.pageX - offset.left - ( closestHandle.width() / 2 ),\n\t\t\ttop: event.pageY - offset.top -\n\t\t\t\t( closestHandle.height() / 2 ) -\n\t\t\t\t( parseInt( closestHandle.css(\"borderTopWidth\"), 10 ) || 0 ) -\n\t\t\t\t( parseInt( closestHandle.css(\"borderBottomWidth\"), 10 ) || 0) +\n\t\t\t\t( parseInt( closestHandle.css(\"marginTop\"), 10 ) || 0)\n\t\t};\n\n\t\tif ( !this.handles.hasClass( \"ui-state-hover\" ) ) {\n\t\t\tthis._slide( event, index, normValue );\n\t\t}\n\t\tthis._animateOff = true;\n\t\treturn true;\n\t},\n\n\t_mouseStart: function( event ) {\n\t\treturn true;\n\t},\n\n\t_mouseDrag: function( event ) {\n\t\tvar position = { x: event.pageX, y: event.pageY },\n\t\t\tnormValue = this._normValueFromMouse( position );\n\t\t\n\t\tthis._slide( event, this._handleIndex, normValue );\n\n\t\treturn false;\n\t},\n\n\t_mouseStop: function( event ) {\n\t\tthis.handles.removeClass( \"ui-state-active\" );\n\t\tthis._mouseSliding = false;\n\n\t\tthis._stop( event, this._handleIndex );\n\t\tthis._change( event, this._handleIndex );\n\n\t\tthis._handleIndex = null;\n\t\tthis._clickOffset = null;\n\t\tthis._animateOff = false;\n\n\t\treturn false;\n\t},\n\t\n\t_detectOrientation: function() {\n\t\tthis.orientation = ( this.options.orientation === \"vertical\" ) ? \"vertical\" : \"horizontal\";\n\t},\n\n\t_normValueFromMouse: function( position ) {\n\t\tvar pixelTotal,\n\t\t\tpixelMouse,\n\t\t\tpercentMouse,\n\t\t\tvalueTotal,\n\t\t\tvalueMouse;\n\n\t\tif ( this.orientation === \"horizontal\" ) {\n\t\t\tpixelTotal = this.elementSize.width;\n\t\t\tpixelMouse = position.x - this.elementOffset.left - ( this._clickOffset ? this._clickOffset.left : 0 );\n\t\t} else {\n\t\t\tpixelTotal = this.elementSize.height;\n\t\t\tpixelMouse = position.y - this.elementOffset.top - ( this._clickOffset ? this._clickOffset.top : 0 );\n\t\t}\n\n\t\tpercentMouse = ( pixelMouse / pixelTotal );\n\t\tif ( percentMouse > 1 ) {\n\t\t\tpercentMouse = 1;\n\t\t}\n\t\tif ( percentMouse < 0 ) {\n\t\t\tpercentMouse = 0;\n\t\t}\n\t\tif ( this.orientation === \"vertical\" ) {\n\t\t\tpercentMouse = 1 - percentMouse;\n\t\t}\n\n\t\tvalueTotal = this._valueMax() - this._valueMin();\n\t\tvalueMouse = this._valueMin() + percentMouse * valueTotal;\n\n\t\treturn this._trimAlignValue( valueMouse );\n\t},\n\n\t_start: function( event, index ) {\n\t\tvar uiHash = {\n\t\t\thandle: this.handles[ index ],\n\t\t\tvalue: this.value()\n\t\t};\n\t\tif ( this.options.values && this.options.values.length ) {\n\t\t\tuiHash.value = this.values( index );\n\t\t\tuiHash.values = this.values();\n\t\t}\n\t\treturn this._trigger( \"start\", event, uiHash );\n\t},\n\n\t_slide: function( event, index, newVal ) {\n\t\tvar otherVal,\n\t\t\tnewValues,\n\t\t\tallowed;\n\n\t\tif ( this.options.values && this.options.values.length ) {\n\t\t\totherVal = this.values( index ? 0 : 1 );\n\n\t\t\tif ( ( this.options.values.length === 2 && this.options.range === true ) && \n\t\t\t\t\t( ( index === 0 && newVal > otherVal) || ( index === 1 && newVal < otherVal ) )\n\t\t\t\t) {\n\t\t\t\tnewVal = otherVal;\n\t\t\t}\n\n\t\t\tif ( newVal !== this.values( index ) ) {\n\t\t\t\tnewValues = this.values();\n\t\t\t\tnewValues[ index ] = newVal;\n\t\t\t\t// A slide can be canceled by returning false from the slide callback\n\t\t\t\tallowed = this._trigger( \"slide\", event, {\n\t\t\t\t\thandle: this.handles[ index ],\n\t\t\t\t\tvalue: newVal,\n\t\t\t\t\tvalues: newValues\n\t\t\t\t} );\n\t\t\t\totherVal = this.values( index ? 0 : 1 );\n\t\t\t\tif ( allowed !== false ) {\n\t\t\t\t\tthis.values( index, newVal, true );\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tif ( newVal !== this.value() ) {\n\t\t\t\t// A slide can be canceled by returning false from the slide callback\n\t\t\t\tallowed = this._trigger( \"slide\", event, {\n\t\t\t\t\thandle: this.handles[ index ],\n\t\t\t\t\tvalue: newVal\n\t\t\t\t} );\n\t\t\t\tif ( allowed !== false ) {\n\t\t\t\t\tthis.value( newVal );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\n\t_stop: function( event, index ) {\n\t\tvar uiHash = {\n\t\t\thandle: this.handles[ index ],\n\t\t\tvalue: this.value()\n\t\t};\n\t\tif ( this.options.values && this.options.values.length ) {\n\t\t\tuiHash.value = this.values( index );\n\t\t\tuiHash.values = this.values();\n\t\t}\n\n\t\tthis._trigger( \"stop\", event, uiHash );\n\t},\n\n\t_change: function( event, index ) {\n\t\tif ( !this._keySliding && !this._mouseSliding ) {\n\t\t\tvar uiHash = {\n\t\t\t\thandle: this.handles[ index ],\n\t\t\t\tvalue: this.value()\n\t\t\t};\n\t\t\tif ( this.options.values && this.options.values.length ) {\n\t\t\t\tuiHash.value = this.values( index );\n\t\t\t\tuiHash.values = this.values();\n\t\t\t}\n\n\t\t\tthis._trigger( \"change\", event, uiHash );\n\t\t}\n\t},\n\n\tvalue: function( newValue ) {\n\t\tif ( arguments.length ) {\n\t\t\tthis.options.value = this._trimAlignValue( newValue );\n\t\t\tthis._refreshValue();\n\t\t\tthis._change( null, 0 );\n\t\t\treturn;\n\t\t}\n\n\t\treturn this._value();\n\t},\n\n\tvalues: function( index, newValue ) {\n\t\tvar vals,\n\t\t\tnewValues,\n\t\t\ti;\n\n\t\tif ( arguments.length > 1 ) {\n\t\t\tthis.options.values[ index ] = this._trimAlignValue( newValue );\n\t\t\tthis._refreshValue();\n\t\t\tthis._change( null, index );\n\t\t\treturn;\n\t\t}\n\n\t\tif ( arguments.length ) {\n\t\t\tif ( $.isArray( arguments[ 0 ] ) ) {\n\t\t\t\tvals = this.options.values;\n\t\t\t\tnewValues = arguments[ 0 ];\n\t\t\t\tfor ( i = 0; i < vals.length; i += 1 ) {\n\t\t\t\t\tvals[ i ] = this._trimAlignValue( newValues[ i ] );\n\t\t\t\t\tthis._change( null, i );\n\t\t\t\t}\n\t\t\t\tthis._refreshValue();\n\t\t\t} else {\n\t\t\t\tif ( this.options.values && this.options.values.length ) {\n\t\t\t\t\treturn this._values( index );\n\t\t\t\t} else {\n\t\t\t\t\treturn this.value();\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\treturn this._values();\n\t\t}\n\t},\n\n\t_setOption: function( key, value ) {\n\t\tvar i,\n\t\t\tvalsLength = 0;\n\n\t\tif ( $.isArray( this.options.values ) ) {\n\t\t\tvalsLength = this.options.values.length;\n\t\t}\n\n\t\t$.Widget.prototype._setOption.apply( this, arguments );\n\n\t\tswitch ( key ) {\n\t\t\tcase \"disabled\":\n\t\t\t\tif ( value ) {\n\t\t\t\t\tthis.handles.filter( \".ui-state-focus\" ).blur();\n\t\t\t\t\tthis.handles.removeClass( \"ui-state-hover\" );\n\t\t\t\t\tthis.handles.propAttr( \"disabled\", true );\n\t\t\t\t\tthis.element.addClass( \"ui-disabled\" );\n\t\t\t\t} else {\n\t\t\t\t\tthis.handles.propAttr( \"disabled\", false );\n\t\t\t\t\tthis.element.removeClass( \"ui-disabled\" );\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase \"orientation\":\n\t\t\t\tthis._detectOrientation();\n\t\t\t\tthis.element\n\t\t\t\t\t.removeClass( \"ui-slider-horizontal ui-slider-vertical\" )\n\t\t\t\t\t.addClass( \"ui-slider-\" + this.orientation );\n\t\t\t\tthis._refreshValue();\n\t\t\t\tbreak;\n\t\t\tcase \"value\":\n\t\t\t\tthis._animateOff = true;\n\t\t\t\tthis._refreshValue();\n\t\t\t\tthis._change( null, 0 );\n\t\t\t\tthis._animateOff = false;\n\t\t\t\tbreak;\n\t\t\tcase \"values\":\n\t\t\t\tthis._animateOff = true;\n\t\t\t\tthis._refreshValue();\n\t\t\t\tfor ( i = 0; i < valsLength; i += 1 ) {\n\t\t\t\t\tthis._change( null, i );\n\t\t\t\t}\n\t\t\t\tthis._animateOff = false;\n\t\t\t\tbreak;\n\t\t}\n\t},\n\n\t//internal value getter\n\t// _value() returns value trimmed by min and max, aligned by step\n\t_value: function() {\n\t\tvar val = this.options.value;\n\t\tval = this._trimAlignValue( val );\n\n\t\treturn val;\n\t},\n\n\t//internal values getter\n\t// _values() returns array of values trimmed by min and max, aligned by step\n\t// _values( index ) returns single value trimmed by min and max, aligned by step\n\t_values: function( index ) {\n\t\tvar val,\n\t\t\tvals,\n\t\t\ti;\n\n\t\tif ( arguments.length ) {\n\t\t\tval = this.options.values[ index ];\n\t\t\tval = this._trimAlignValue( val );\n\n\t\t\treturn val;\n\t\t} else {\n\t\t\t// .slice() creates a copy of the array\n\t\t\t// this copy gets trimmed by min and max and then returned\n\t\t\tvals = this.options.values.slice();\n\t\t\tfor ( i = 0; i < vals.length; i+= 1) {\n\t\t\t\tvals[ i ] = this._trimAlignValue( vals[ i ] );\n\t\t\t}\n\n\t\t\treturn vals;\n\t\t}\n\t},\n\t\n\t// returns the step-aligned value that val is closest to, between (inclusive) min and max\n\t_trimAlignValue: function( val ) {\n\t\tif ( val <= this._valueMin() ) {\n\t\t\treturn this._valueMin();\n\t\t}\n\t\tif ( val >= this._valueMax() ) {\n\t\t\treturn this._valueMax();\n\t\t}\n\t\tvar step = ( this.options.step > 0 ) ? this.options.step : 1,\n\t\t\tvalModStep = (val - this._valueMin()) % step,\n\t\t\talignValue = val - valModStep;\n\n\t\tif ( Math.abs(valModStep) * 2 >= step ) {\n\t\t\talignValue += ( valModStep > 0 ) ? step : ( -step );\n\t\t}\n\n\t\t// Since JavaScript has problems with large floats, round\n\t\t// the final value to 5 digits after the decimal point (see #4124)\n\t\treturn parseFloat( alignValue.toFixed(5) );\n\t},\n\n\t_valueMin: function() {\n\t\treturn this.options.min;\n\t},\n\n\t_valueMax: function() {\n\t\treturn this.options.max;\n\t},\n\t\n\t_refreshValue: function() {\n\t\tvar oRange = this.options.range,\n\t\t\to = this.options,\n\t\t\tself = this,\n\t\t\tanimate = ( !this._animateOff ) ? o.animate : false,\n\t\t\tvalPercent,\n\t\t\t_set = {},\n\t\t\tlastValPercent,\n\t\t\tvalue,\n\t\t\tvalueMin,\n\t\t\tvalueMax;\n\n\t\tif ( this.options.values && this.options.values.length ) {\n\t\t\tthis.handles.each(function( i, j ) {\n\t\t\t\tvalPercent = ( self.values(i) - self._valueMin() ) / ( self._valueMax() - self._valueMin() ) * 100;\n\t\t\t\t_set[ self.orientation === \"horizontal\" ? \"left\" : \"bottom\" ] = valPercent + \"%\";\n\t\t\t\t$( this ).stop( 1, 1 )[ animate ? \"animate\" : \"css\" ]( _set, o.animate );\n\t\t\t\tif ( self.options.range === true ) {\n\t\t\t\t\tif ( self.orientation === \"horizontal\" ) {\n\t\t\t\t\t\tif ( i === 0 ) {\n\t\t\t\t\t\t\tself.range.stop( 1, 1 )[ animate ? \"animate\" : \"css\" ]( { left: valPercent + \"%\" }, o.animate );\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ( i === 1 ) {\n\t\t\t\t\t\t\tself.range[ animate ? \"animate\" : \"css\" ]( { width: ( valPercent - lastValPercent ) + \"%\" }, { queue: false, duration: o.animate } );\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif ( i === 0 ) {\n\t\t\t\t\t\t\tself.range.stop( 1, 1 )[ animate ? \"animate\" : \"css\" ]( { bottom: ( valPercent ) + \"%\" }, o.animate );\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ( i === 1 ) {\n\t\t\t\t\t\t\tself.range[ animate ? \"animate\" : \"css\" ]( { height: ( valPercent - lastValPercent ) + \"%\" }, { queue: false, duration: o.animate } );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tlastValPercent = valPercent;\n\t\t\t});\n\t\t} else {\n\t\t\tvalue = this.value();\n\t\t\tvalueMin = this._valueMin();\n\t\t\tvalueMax = this._valueMax();\n\t\t\tvalPercent = ( valueMax !== valueMin ) ?\n\t\t\t\t\t( value - valueMin ) / ( valueMax - valueMin ) * 100 :\n\t\t\t\t\t0;\n\t\t\t_set[ self.orientation === \"horizontal\" ? \"left\" : \"bottom\" ] = valPercent + \"%\";\n\t\t\tthis.handle.stop( 1, 1 )[ animate ? \"animate\" : \"css\" ]( _set, o.animate );\n\n\t\t\tif ( oRange === \"min\" && this.orientation === \"horizontal\" ) {\n\t\t\t\tthis.range.stop( 1, 1 )[ animate ? \"animate\" : \"css\" ]( { width: valPercent + \"%\" }, o.animate );\n\t\t\t}\n\t\t\tif ( oRange === \"max\" && this.orientation === \"horizontal\" ) {\n\t\t\t\tthis.range[ animate ? \"animate\" : \"css\" ]( { width: ( 100 - valPercent ) + \"%\" }, { queue: false, duration: o.animate } );\n\t\t\t}\n\t\t\tif ( oRange === \"min\" && this.orientation === \"vertical\" ) {\n\t\t\t\tthis.range.stop( 1, 1 )[ animate ? \"animate\" : \"css\" ]( { height: valPercent + \"%\" }, o.animate );\n\t\t\t}\n\t\t\tif ( oRange === \"max\" && this.orientation === \"vertical\" ) {\n\t\t\t\tthis.range[ animate ? \"animate\" : \"css\" ]( { height: ( 100 - valPercent ) + \"%\" }, { queue: false, duration: o.animate } );\n\t\t\t}\n\t\t}\n\t}\n\n});\n\n$.extend( $.ui.slider, {\n\tversion: \"1.8.20\"\n});\n\n}(jQuery));\n\n(function( $, undefined ) {\n\nvar tabId = 0,\n\tlistId = 0;\n\nfunction getNextTabId() {\n\treturn ++tabId;\n}\n\nfunction getNextListId() {\n\treturn ++listId;\n}\n\n$.widget( \"ui.tabs\", {\n\toptions: {\n\t\tadd: null,\n\t\tajaxOptions: null,\n\t\tcache: false,\n\t\tcookie: null, // e.g. { expires: 7, path: '/', domain: 'jquery.com', secure: true }\n\t\tcollapsible: false,\n\t\tdisable: null,\n\t\tdisabled: [],\n\t\tenable: null,\n\t\tevent: \"click\",\n\t\tfx: null, // e.g. { height: 'toggle', opacity: 'toggle', duration: 200 }\n\t\tidPrefix: \"ui-tabs-\",\n\t\tload: null,\n\t\tpanelTemplate: \"<div></div>\",\n\t\tremove: null,\n\t\tselect: null,\n\t\tshow: null,\n\t\tspinner: \"<em>Loading&#8230;</em>\",\n\t\ttabTemplate: \"<li><a href='#{href}'><span>#{label}</span></a></li>\"\n\t},\n\n\t_create: function() {\n\t\tthis._tabify( true );\n\t},\n\n\t_setOption: function( key, value ) {\n\t\tif ( key == \"selected\" ) {\n\t\t\tif (this.options.collapsible && value == this.options.selected ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis.select( value );\n\t\t} else {\n\t\t\tthis.options[ key ] = value;\n\t\t\tthis._tabify();\n\t\t}\n\t},\n\n\t_tabId: function( a ) {\n\t\treturn a.title && a.title.replace( /\\s/g, \"_\" ).replace( /[^\\w\\u00c0-\\uFFFF-]/g, \"\" ) ||\n\t\t\tthis.options.idPrefix + getNextTabId();\n\t},\n\n\t_sanitizeSelector: function( hash ) {\n\t\t// we need this because an id may contain a \":\"\n\t\treturn hash.replace( /:/g, \"\\\\:\" );\n\t},\n\n\t_cookie: function() {\n\t\tvar cookie = this.cookie ||\n\t\t\t( this.cookie = this.options.cookie.name || \"ui-tabs-\" + getNextListId() );\n\t\treturn $.cookie.apply( null, [ cookie ].concat( $.makeArray( arguments ) ) );\n\t},\n\n\t_ui: function( tab, panel ) {\n\t\treturn {\n\t\t\ttab: tab,\n\t\t\tpanel: panel,\n\t\t\tindex: this.anchors.index( tab )\n\t\t};\n\t},\n\n\t_cleanup: function() {\n\t\t// restore all former loading tabs labels\n\t\tthis.lis.filter( \".ui-state-processing\" )\n\t\t\t.removeClass( \"ui-state-processing\" )\n\t\t\t.find( \"span:data(label.tabs)\" )\n\t\t\t\t.each(function() {\n\t\t\t\t\tvar el = $( this );\n\t\t\t\t\tel.html( el.data( \"label.tabs\" ) ).removeData( \"label.tabs\" );\n\t\t\t\t});\n\t},\n\n\t_tabify: function( init ) {\n\t\tvar self = this,\n\t\t\to = this.options,\n\t\t\tfragmentId = /^#.+/; // Safari 2 reports '#' for an empty hash\n\n\t\tthis.list = this.element.find( \"ol,ul\" ).eq( 0 );\n\t\tthis.lis = $( \" > li:has(a[href])\", this.list );\n\t\tthis.anchors = this.lis.map(function() {\n\t\t\treturn $( \"a\", this )[ 0 ];\n\t\t});\n\t\tthis.panels = $( [] );\n\n\t\tthis.anchors.each(function( i, a ) {\n\t\t\tvar href = $( a ).attr( \"href\" );\n\t\t\t// For dynamically created HTML that contains a hash as href IE < 8 expands\n\t\t\t// such href to the full page url with hash and then misinterprets tab as ajax.\n\t\t\t// Same consideration applies for an added tab with a fragment identifier\n\t\t\t// since a[href=#fragment-identifier] does unexpectedly not match.\n\t\t\t// Thus normalize href attribute...\n\t\t\tvar hrefBase = href.split( \"#\" )[ 0 ],\n\t\t\t\tbaseEl;\n\t\t\tif ( hrefBase && ( hrefBase === location.toString().split( \"#\" )[ 0 ] ||\n\t\t\t\t\t( baseEl = $( \"base\" )[ 0 ]) && hrefBase === baseEl.href ) ) {\n\t\t\t\thref = a.hash;\n\t\t\t\ta.href = href;\n\t\t\t}\n\n\t\t\t// inline tab\n\t\t\tif ( fragmentId.test( href ) ) {\n\t\t\t\tself.panels = self.panels.add( self.element.find( self._sanitizeSelector( href ) ) );\n\t\t\t// remote tab\n\t\t\t// prevent loading the page itself if href is just \"#\"\n\t\t\t} else if ( href && href !== \"#\" ) {\n\t\t\t\t// required for restore on destroy\n\t\t\t\t$.data( a, \"href.tabs\", href );\n\n\t\t\t\t// TODO until #3808 is fixed strip fragment identifier from url\n\t\t\t\t// (IE fails to load from such url)\n\t\t\t\t$.data( a, \"load.tabs\", href.replace( /#.*$/, \"\" ) );\n\n\t\t\t\tvar id = self._tabId( a );\n\t\t\t\ta.href = \"#\" + id;\n\t\t\t\tvar $panel = self.element.find( \"#\" + id );\n\t\t\t\tif ( !$panel.length ) {\n\t\t\t\t\t$panel = $( o.panelTemplate )\n\t\t\t\t\t\t.attr( \"id\", id )\n\t\t\t\t\t\t.addClass( \"ui-tabs-panel ui-widget-content ui-corner-bottom\" )\n\t\t\t\t\t\t.insertAfter( self.panels[ i - 1 ] || self.list );\n\t\t\t\t\t$panel.data( \"destroy.tabs\", true );\n\t\t\t\t}\n\t\t\t\tself.panels = self.panels.add( $panel );\n\t\t\t// invalid tab href\n\t\t\t} else {\n\t\t\t\to.disabled.push( i );\n\t\t\t}\n\t\t});\n\n\t\t// initialization from scratch\n\t\tif ( init ) {\n\t\t\t// attach necessary classes for styling\n\t\t\tthis.element.addClass( \"ui-tabs ui-widget ui-widget-content ui-corner-all\" );\n\t\t\tthis.list.addClass( \"ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all\" );\n\t\t\tthis.lis.addClass( \"ui-state-default ui-corner-top\" );\n\t\t\tthis.panels.addClass( \"ui-tabs-panel ui-widget-content ui-corner-bottom\" );\n\n\t\t\t// Selected tab\n\t\t\t// use \"selected\" option or try to retrieve:\n\t\t\t// 1. from fragment identifier in url\n\t\t\t// 2. from cookie\n\t\t\t// 3. from selected class attribute on <li>\n\t\t\tif ( o.selected === undefined ) {\n\t\t\t\tif ( location.hash ) {\n\t\t\t\t\tthis.anchors.each(function( i, a ) {\n\t\t\t\t\t\tif ( a.hash == location.hash ) {\n\t\t\t\t\t\t\to.selected = i;\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tif ( typeof o.selected !== \"number\" && o.cookie ) {\n\t\t\t\t\to.selected = parseInt( self._cookie(), 10 );\n\t\t\t\t}\n\t\t\t\tif ( typeof o.selected !== \"number\" && this.lis.filter( \".ui-tabs-selected\" ).length ) {\n\t\t\t\t\to.selected = this.lis.index( this.lis.filter( \".ui-tabs-selected\" ) );\n\t\t\t\t}\n\t\t\t\to.selected = o.selected || ( this.lis.length ? 0 : -1 );\n\t\t\t} else if ( o.selected === null ) { // usage of null is deprecated, TODO remove in next release\n\t\t\t\to.selected = -1;\n\t\t\t}\n\n\t\t\t// sanity check - default to first tab...\n\t\t\to.selected = ( ( o.selected >= 0 && this.anchors[ o.selected ] ) || o.selected < 0 )\n\t\t\t\t? o.selected\n\t\t\t\t: 0;\n\n\t\t\t// Take disabling tabs via class attribute from HTML\n\t\t\t// into account and update option properly.\n\t\t\t// A selected tab cannot become disabled.\n\t\t\to.disabled = $.unique( o.disabled.concat(\n\t\t\t\t$.map( this.lis.filter( \".ui-state-disabled\" ), function( n, i ) {\n\t\t\t\t\treturn self.lis.index( n );\n\t\t\t\t})\n\t\t\t) ).sort();\n\n\t\t\tif ( $.inArray( o.selected, o.disabled ) != -1 ) {\n\t\t\t\to.disabled.splice( $.inArray( o.selected, o.disabled ), 1 );\n\t\t\t}\n\n\t\t\t// highlight selected tab\n\t\t\tthis.panels.addClass( \"ui-tabs-hide\" );\n\t\t\tthis.lis.removeClass( \"ui-tabs-selected ui-state-active\" );\n\t\t\t// check for length avoids error when initializing empty list\n\t\t\tif ( o.selected >= 0 && this.anchors.length ) {\n\t\t\t\tself.element.find( self._sanitizeSelector( self.anchors[ o.selected ].hash ) ).removeClass( \"ui-tabs-hide\" );\n\t\t\t\tthis.lis.eq( o.selected ).addClass( \"ui-tabs-selected ui-state-active\" );\n\n\t\t\t\t// seems to be expected behavior that the show callback is fired\n\t\t\t\tself.element.queue( \"tabs\", function() {\n\t\t\t\t\tself._trigger( \"show\", null,\n\t\t\t\t\t\tself._ui( self.anchors[ o.selected ], self.element.find( self._sanitizeSelector( self.anchors[ o.selected ].hash ) )[ 0 ] ) );\n\t\t\t\t});\n\n\t\t\t\tthis.load( o.selected );\n\t\t\t}\n\n\t\t\t// clean up to avoid memory leaks in certain versions of IE 6\n\t\t\t// TODO: namespace this event\n\t\t\t$( window ).bind( \"unload\", function() {\n\t\t\t\tself.lis.add( self.anchors ).unbind( \".tabs\" );\n\t\t\t\tself.lis = self.anchors = self.panels = null;\n\t\t\t});\n\t\t// update selected after add/remove\n\t\t} else {\n\t\t\to.selected = this.lis.index( this.lis.filter( \".ui-tabs-selected\" ) );\n\t\t}\n\n\t\t// update collapsible\n\t\t// TODO: use .toggleClass()\n\t\tthis.element[ o.collapsible ? \"addClass\" : \"removeClass\" ]( \"ui-tabs-collapsible\" );\n\n\t\t// set or update cookie after init and add/remove respectively\n\t\tif ( o.cookie ) {\n\t\t\tthis._cookie( o.selected, o.cookie );\n\t\t}\n\n\t\t// disable tabs\n\t\tfor ( var i = 0, li; ( li = this.lis[ i ] ); i++ ) {\n\t\t\t$( li )[ $.inArray( i, o.disabled ) != -1 &&\n\t\t\t\t// TODO: use .toggleClass()\n\t\t\t\t!$( li ).hasClass( \"ui-tabs-selected\" ) ? \"addClass\" : \"removeClass\" ]( \"ui-state-disabled\" );\n\t\t}\n\n\t\t// reset cache if switching from cached to not cached\n\t\tif ( o.cache === false ) {\n\t\t\tthis.anchors.removeData( \"cache.tabs\" );\n\t\t}\n\n\t\t// remove all handlers before, tabify may run on existing tabs after add or option change\n\t\tthis.lis.add( this.anchors ).unbind( \".tabs\" );\n\n\t\tif ( o.event !== \"mouseover\" ) {\n\t\t\tvar addState = function( state, el ) {\n\t\t\t\tif ( el.is( \":not(.ui-state-disabled)\" ) ) {\n\t\t\t\t\tel.addClass( \"ui-state-\" + state );\n\t\t\t\t}\n\t\t\t};\n\t\t\tvar removeState = function( state, el ) {\n\t\t\t\tel.removeClass( \"ui-state-\" + state );\n\t\t\t};\n\t\t\tthis.lis.bind( \"mouseover.tabs\" , function() {\n\t\t\t\taddState( \"hover\", $( this ) );\n\t\t\t});\n\t\t\tthis.lis.bind( \"mouseout.tabs\", function() {\n\t\t\t\tremoveState( \"hover\", $( this ) );\n\t\t\t});\n\t\t\tthis.anchors.bind( \"focus.tabs\", function() {\n\t\t\t\taddState( \"focus\", $( this ).closest( \"li\" ) );\n\t\t\t});\n\t\t\tthis.anchors.bind( \"blur.tabs\", function() {\n\t\t\t\tremoveState( \"focus\", $( this ).closest( \"li\" ) );\n\t\t\t});\n\t\t}\n\n\t\t// set up animations\n\t\tvar hideFx, showFx;\n\t\tif ( o.fx ) {\n\t\t\tif ( $.isArray( o.fx ) ) {\n\t\t\t\thideFx = o.fx[ 0 ];\n\t\t\t\tshowFx = o.fx[ 1 ];\n\t\t\t} else {\n\t\t\t\thideFx = showFx = o.fx;\n\t\t\t}\n\t\t}\n\n\t\t// Reset certain styles left over from animation\n\t\t// and prevent IE's ClearType bug...\n\t\tfunction resetStyle( $el, fx ) {\n\t\t\t$el.css( \"display\", \"\" );\n\t\t\tif ( !$.support.opacity && fx.opacity ) {\n\t\t\t\t$el[ 0 ].style.removeAttribute( \"filter\" );\n\t\t\t}\n\t\t}\n\n\t\t// Show a tab...\n\t\tvar showTab = showFx\n\t\t\t? function( clicked, $show ) {\n\t\t\t\t$( clicked ).closest( \"li\" ).addClass( \"ui-tabs-selected ui-state-active\" );\n\t\t\t\t$show.hide().removeClass( \"ui-tabs-hide\" ) // avoid flicker that way\n\t\t\t\t\t.animate( showFx, showFx.duration || \"normal\", function() {\n\t\t\t\t\t\tresetStyle( $show, showFx );\n\t\t\t\t\t\tself._trigger( \"show\", null, self._ui( clicked, $show[ 0 ] ) );\n\t\t\t\t\t});\n\t\t\t}\n\t\t\t: function( clicked, $show ) {\n\t\t\t\t$( clicked ).closest( \"li\" ).addClass( \"ui-tabs-selected ui-state-active\" );\n\t\t\t\t$show.removeClass( \"ui-tabs-hide\" );\n\t\t\t\tself._trigger( \"show\", null, self._ui( clicked, $show[ 0 ] ) );\n\t\t\t};\n\n\t\t// Hide a tab, $show is optional...\n\t\tvar hideTab = hideFx\n\t\t\t? function( clicked, $hide ) {\n\t\t\t\t$hide.animate( hideFx, hideFx.duration || \"normal\", function() {\n\t\t\t\t\tself.lis.removeClass( \"ui-tabs-selected ui-state-active\" );\n\t\t\t\t\t$hide.addClass( \"ui-tabs-hide\" );\n\t\t\t\t\tresetStyle( $hide, hideFx );\n\t\t\t\t\tself.element.dequeue( \"tabs\" );\n\t\t\t\t});\n\t\t\t}\n\t\t\t: function( clicked, $hide, $show ) {\n\t\t\t\tself.lis.removeClass( \"ui-tabs-selected ui-state-active\" );\n\t\t\t\t$hide.addClass( \"ui-tabs-hide\" );\n\t\t\t\tself.element.dequeue( \"tabs\" );\n\t\t\t};\n\n\t\t// attach tab event handler, unbind to avoid duplicates from former tabifying...\n\t\tthis.anchors.bind( o.event + \".tabs\", function() {\n\t\t\tvar el = this,\n\t\t\t\t$li = $(el).closest( \"li\" ),\n\t\t\t\t$hide = self.panels.filter( \":not(.ui-tabs-hide)\" ),\n\t\t\t\t$show = self.element.find( self._sanitizeSelector( el.hash ) );\n\n\t\t\t// If tab is already selected and not collapsible or tab disabled or\n\t\t\t// or is already loading or click callback returns false stop here.\n\t\t\t// Check if click handler returns false last so that it is not executed\n\t\t\t// for a disabled or loading tab!\n\t\t\tif ( ( $li.hasClass( \"ui-tabs-selected\" ) && !o.collapsible) ||\n\t\t\t\t$li.hasClass( \"ui-state-disabled\" ) ||\n\t\t\t\t$li.hasClass( \"ui-state-processing\" ) ||\n\t\t\t\tself.panels.filter( \":animated\" ).length ||\n\t\t\t\tself._trigger( \"select\", null, self._ui( this, $show[ 0 ] ) ) === false ) {\n\t\t\t\tthis.blur();\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\to.selected = self.anchors.index( this );\n\n\t\t\tself.abort();\n\n\t\t\t// if tab may be closed\n\t\t\tif ( o.collapsible ) {\n\t\t\t\tif ( $li.hasClass( \"ui-tabs-selected\" ) ) {\n\t\t\t\t\to.selected = -1;\n\n\t\t\t\t\tif ( o.cookie ) {\n\t\t\t\t\t\tself._cookie( o.selected, o.cookie );\n\t\t\t\t\t}\n\n\t\t\t\t\tself.element.queue( \"tabs\", function() {\n\t\t\t\t\t\thideTab( el, $hide );\n\t\t\t\t\t}).dequeue( \"tabs\" );\n\n\t\t\t\t\tthis.blur();\n\t\t\t\t\treturn false;\n\t\t\t\t} else if ( !$hide.length ) {\n\t\t\t\t\tif ( o.cookie ) {\n\t\t\t\t\t\tself._cookie( o.selected, o.cookie );\n\t\t\t\t\t}\n\n\t\t\t\t\tself.element.queue( \"tabs\", function() {\n\t\t\t\t\t\tshowTab( el, $show );\n\t\t\t\t\t});\n\n\t\t\t\t\t// TODO make passing in node possible, see also http://dev.jqueryui.com/ticket/3171\n\t\t\t\t\tself.load( self.anchors.index( this ) );\n\n\t\t\t\t\tthis.blur();\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( o.cookie ) {\n\t\t\t\tself._cookie( o.selected, o.cookie );\n\t\t\t}\n\n\t\t\t// show new tab\n\t\t\tif ( $show.length ) {\n\t\t\t\tif ( $hide.length ) {\n\t\t\t\t\tself.element.queue( \"tabs\", function() {\n\t\t\t\t\t\thideTab( el, $hide );\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tself.element.queue( \"tabs\", function() {\n\t\t\t\t\tshowTab( el, $show );\n\t\t\t\t});\n\n\t\t\t\tself.load( self.anchors.index( this ) );\n\t\t\t} else {\n\t\t\t\tthrow \"jQuery UI Tabs: Mismatching fragment identifier.\";\n\t\t\t}\n\n\t\t\t// Prevent IE from keeping other link focussed when using the back button\n\t\t\t// and remove dotted border from clicked link. This is controlled via CSS\n\t\t\t// in modern browsers; blur() removes focus from address bar in Firefox\n\t\t\t// which can become a usability and annoying problem with tabs('rotate').\n\t\t\tif ( $.browser.msie ) {\n\t\t\t\tthis.blur();\n\t\t\t}\n\t\t});\n\n\t\t// disable click in any case\n\t\tthis.anchors.bind( \"click.tabs\", function(){\n\t\t\treturn false;\n\t\t});\n\t},\n\n    _getIndex: function( index ) {\n\t\t// meta-function to give users option to provide a href string instead of a numerical index.\n\t\t// also sanitizes numerical indexes to valid values.\n\t\tif ( typeof index == \"string\" ) {\n\t\t\tindex = this.anchors.index( this.anchors.filter( \"[href$='\" + index + \"']\" ) );\n\t\t}\n\n\t\treturn index;\n\t},\n\n\tdestroy: function() {\n\t\tvar o = this.options;\n\n\t\tthis.abort();\n\n\t\tthis.element\n\t\t\t.unbind( \".tabs\" )\n\t\t\t.removeClass( \"ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible\" )\n\t\t\t.removeData( \"tabs\" );\n\n\t\tthis.list.removeClass( \"ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all\" );\n\n\t\tthis.anchors.each(function() {\n\t\t\tvar href = $.data( this, \"href.tabs\" );\n\t\t\tif ( href ) {\n\t\t\t\tthis.href = href;\n\t\t\t}\n\t\t\tvar $this = $( this ).unbind( \".tabs\" );\n\t\t\t$.each( [ \"href\", \"load\", \"cache\" ], function( i, prefix ) {\n\t\t\t\t$this.removeData( prefix + \".tabs\" );\n\t\t\t});\n\t\t});\n\n\t\tthis.lis.unbind( \".tabs\" ).add( this.panels ).each(function() {\n\t\t\tif ( $.data( this, \"destroy.tabs\" ) ) {\n\t\t\t\t$( this ).remove();\n\t\t\t} else {\n\t\t\t\t$( this ).removeClass([\n\t\t\t\t\t\"ui-state-default\",\n\t\t\t\t\t\"ui-corner-top\",\n\t\t\t\t\t\"ui-tabs-selected\",\n\t\t\t\t\t\"ui-state-active\",\n\t\t\t\t\t\"ui-state-hover\",\n\t\t\t\t\t\"ui-state-focus\",\n\t\t\t\t\t\"ui-state-disabled\",\n\t\t\t\t\t\"ui-tabs-panel\",\n\t\t\t\t\t\"ui-widget-content\",\n\t\t\t\t\t\"ui-corner-bottom\",\n\t\t\t\t\t\"ui-tabs-hide\"\n\t\t\t\t].join( \" \" ) );\n\t\t\t}\n\t\t});\n\n\t\tif ( o.cookie ) {\n\t\t\tthis._cookie( null, o.cookie );\n\t\t}\n\n\t\treturn this;\n\t},\n\n\tadd: function( url, label, index ) {\n\t\tif ( index === undefined ) {\n\t\t\tindex = this.anchors.length;\n\t\t}\n\n\t\tvar self = this,\n\t\t\to = this.options,\n\t\t\t$li = $( o.tabTemplate.replace( /#\\{href\\}/g, url ).replace( /#\\{label\\}/g, label ) ),\n\t\t\tid = !url.indexOf( \"#\" ) ? url.replace( \"#\", \"\" ) : this._tabId( $( \"a\", $li )[ 0 ] );\n\n\t\t$li.addClass( \"ui-state-default ui-corner-top\" ).data( \"destroy.tabs\", true );\n\n\t\t// try to find an existing element before creating a new one\n\t\tvar $panel = self.element.find( \"#\" + id );\n\t\tif ( !$panel.length ) {\n\t\t\t$panel = $( o.panelTemplate )\n\t\t\t\t.attr( \"id\", id )\n\t\t\t\t.data( \"destroy.tabs\", true );\n\t\t}\n\t\t$panel.addClass( \"ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide\" );\n\n\t\tif ( index >= this.lis.length ) {\n\t\t\t$li.appendTo( this.list );\n\t\t\t$panel.appendTo( this.list[ 0 ].parentNode );\n\t\t} else {\n\t\t\t$li.insertBefore( this.lis[ index ] );\n\t\t\t$panel.insertBefore( this.panels[ index ] );\n\t\t}\n\n\t\to.disabled = $.map( o.disabled, function( n, i ) {\n\t\t\treturn n >= index ? ++n : n;\n\t\t});\n\n\t\tthis._tabify();\n\n\t\tif ( this.anchors.length == 1 ) {\n\t\t\to.selected = 0;\n\t\t\t$li.addClass( \"ui-tabs-selected ui-state-active\" );\n\t\t\t$panel.removeClass( \"ui-tabs-hide\" );\n\t\t\tthis.element.queue( \"tabs\", function() {\n\t\t\t\tself._trigger( \"show\", null, self._ui( self.anchors[ 0 ], self.panels[ 0 ] ) );\n\t\t\t});\n\n\t\t\tthis.load( 0 );\n\t\t}\n\n\t\tthis._trigger( \"add\", null, this._ui( this.anchors[ index ], this.panels[ index ] ) );\n\t\treturn this;\n\t},\n\n\tremove: function( index ) {\n\t\tindex = this._getIndex( index );\n\t\tvar o = this.options,\n\t\t\t$li = this.lis.eq( index ).remove(),\n\t\t\t$panel = this.panels.eq( index ).remove();\n\n\t\t// If selected tab was removed focus tab to the right or\n\t\t// in case the last tab was removed the tab to the left.\n\t\tif ( $li.hasClass( \"ui-tabs-selected\" ) && this.anchors.length > 1) {\n\t\t\tthis.select( index + ( index + 1 < this.anchors.length ? 1 : -1 ) );\n\t\t}\n\n\t\to.disabled = $.map(\n\t\t\t$.grep( o.disabled, function(n, i) {\n\t\t\t\treturn n != index;\n\t\t\t}),\n\t\t\tfunction( n, i ) {\n\t\t\t\treturn n >= index ? --n : n;\n\t\t\t});\n\n\t\tthis._tabify();\n\n\t\tthis._trigger( \"remove\", null, this._ui( $li.find( \"a\" )[ 0 ], $panel[ 0 ] ) );\n\t\treturn this;\n\t},\n\n\tenable: function( index ) {\n\t\tindex = this._getIndex( index );\n\t\tvar o = this.options;\n\t\tif ( $.inArray( index, o.disabled ) == -1 ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.lis.eq( index ).removeClass( \"ui-state-disabled\" );\n\t\to.disabled = $.grep( o.disabled, function( n, i ) {\n\t\t\treturn n != index;\n\t\t});\n\n\t\tthis._trigger( \"enable\", null, this._ui( this.anchors[ index ], this.panels[ index ] ) );\n\t\treturn this;\n\t},\n\n\tdisable: function( index ) {\n\t\tindex = this._getIndex( index );\n\t\tvar self = this, o = this.options;\n\t\t// cannot disable already selected tab\n\t\tif ( index != o.selected ) {\n\t\t\tthis.lis.eq( index ).addClass( \"ui-state-disabled\" );\n\n\t\t\to.disabled.push( index );\n\t\t\to.disabled.sort();\n\n\t\t\tthis._trigger( \"disable\", null, this._ui( this.anchors[ index ], this.panels[ index ] ) );\n\t\t}\n\n\t\treturn this;\n\t},\n\n\tselect: function( index ) {\n\t\tindex = this._getIndex( index );\n\t\tif ( index == -1 ) {\n\t\t\tif ( this.options.collapsible && this.options.selected != -1 ) {\n\t\t\t\tindex = this.options.selected;\n\t\t\t} else {\n\t\t\t\treturn this;\n\t\t\t}\n\t\t}\n\t\tthis.anchors.eq( index ).trigger( this.options.event + \".tabs\" );\n\t\treturn this;\n\t},\n\n\tload: function( index ) {\n\t\tindex = this._getIndex( index );\n\t\tvar self = this,\n\t\t\to = this.options,\n\t\t\ta = this.anchors.eq( index )[ 0 ],\n\t\t\turl = $.data( a, \"load.tabs\" );\n\n\t\tthis.abort();\n\n\t\t// not remote or from cache\n\t\tif ( !url || this.element.queue( \"tabs\" ).length !== 0 && $.data( a, \"cache.tabs\" ) ) {\n\t\t\tthis.element.dequeue( \"tabs\" );\n\t\t\treturn;\n\t\t}\n\n\t\t// load remote from here on\n\t\tthis.lis.eq( index ).addClass( \"ui-state-processing\" );\n\n\t\tif ( o.spinner ) {\n\t\t\tvar span = $( \"span\", a );\n\t\t\tspan.data( \"label.tabs\", span.html() ).html( o.spinner );\n\t\t}\n\n\t\tthis.xhr = $.ajax( $.extend( {}, o.ajaxOptions, {\n\t\t\turl: url,\n\t\t\tsuccess: function( r, s ) {\n\t\t\t\tself.element.find( self._sanitizeSelector( a.hash ) ).html( r );\n\n\t\t\t\t// take care of tab labels\n\t\t\t\tself._cleanup();\n\n\t\t\t\tif ( o.cache ) {\n\t\t\t\t\t$.data( a, \"cache.tabs\", true );\n\t\t\t\t}\n\n\t\t\t\tself._trigger( \"load\", null, self._ui( self.anchors[ index ], self.panels[ index ] ) );\n\t\t\t\ttry {\n\t\t\t\t\to.ajaxOptions.success( r, s );\n\t\t\t\t}\n\t\t\t\tcatch ( e ) {}\n\t\t\t},\n\t\t\terror: function( xhr, s, e ) {\n\t\t\t\t// take care of tab labels\n\t\t\t\tself._cleanup();\n\n\t\t\t\tself._trigger( \"load\", null, self._ui( self.anchors[ index ], self.panels[ index ] ) );\n\t\t\t\ttry {\n\t\t\t\t\t// Passing index avoid a race condition when this method is\n\t\t\t\t\t// called after the user has selected another tab.\n\t\t\t\t\t// Pass the anchor that initiated this request allows\n\t\t\t\t\t// loadError to manipulate the tab content panel via $(a.hash)\n\t\t\t\t\to.ajaxOptions.error( xhr, s, index, a );\n\t\t\t\t}\n\t\t\t\tcatch ( e ) {}\n\t\t\t}\n\t\t} ) );\n\n\t\t// last, so that load event is fired before show...\n\t\tself.element.dequeue( \"tabs\" );\n\n\t\treturn this;\n\t},\n\n\tabort: function() {\n\t\t// stop possibly running animations\n\t\tthis.element.queue( [] );\n\t\tthis.panels.stop( false, true );\n\n\t\t// \"tabs\" queue must not contain more than two elements,\n\t\t// which are the callbacks for the latest clicked tab...\n\t\tthis.element.queue( \"tabs\", this.element.queue( \"tabs\" ).splice( -2, 2 ) );\n\n\t\t// terminate pending requests from other tabs\n\t\tif ( this.xhr ) {\n\t\t\tthis.xhr.abort();\n\t\t\tdelete this.xhr;\n\t\t}\n\n\t\t// take care of tab labels\n\t\tthis._cleanup();\n\t\treturn this;\n\t},\n\n\turl: function( index, url ) {\n\t\tthis.anchors.eq( index ).removeData( \"cache.tabs\" ).data( \"load.tabs\", url );\n\t\treturn this;\n\t},\n\n\tlength: function() {\n\t\treturn this.anchors.length;\n\t}\n});\n\n$.extend( $.ui.tabs, {\n\tversion: \"1.8.20\"\n});\n\n/*\n * Tabs Extensions\n */\n\n/*\n * Rotate\n */\n$.extend( $.ui.tabs.prototype, {\n\trotation: null,\n\trotate: function( ms, continuing ) {\n\t\tvar self = this,\n\t\t\to = this.options;\n\n\t\tvar rotate = self._rotate || ( self._rotate = function( e ) {\n\t\t\tclearTimeout( self.rotation );\n\t\t\tself.rotation = setTimeout(function() {\n\t\t\t\tvar t = o.selected;\n\t\t\t\tself.select( ++t < self.anchors.length ? t : 0 );\n\t\t\t}, ms );\n\t\t\t\n\t\t\tif ( e ) {\n\t\t\t\te.stopPropagation();\n\t\t\t}\n\t\t});\n\n\t\tvar stop = self._unrotate || ( self._unrotate = !continuing\n\t\t\t? function(e) {\n\t\t\t\tif (e.clientX) { // in case of a true click\n\t\t\t\t\tself.rotate(null);\n\t\t\t\t}\n\t\t\t}\n\t\t\t: function( e ) {\n\t\t\t\trotate();\n\t\t\t});\n\n\t\t// start rotation\n\t\tif ( ms ) {\n\t\t\tthis.element.bind( \"tabsshow\", rotate );\n\t\t\tthis.anchors.bind( o.event + \".tabs\", stop );\n\t\t\trotate();\n\t\t// stop rotation\n\t\t} else {\n\t\t\tclearTimeout( self.rotation );\n\t\t\tthis.element.unbind( \"tabsshow\", rotate );\n\t\t\tthis.anchors.unbind( o.event + \".tabs\", stop );\n\t\t\tdelete this._rotate;\n\t\t\tdelete this._unrotate;\n\t\t}\n\n\t\treturn this;\n\t}\n});\n\n})( jQuery );\n"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/DDDPPP.Chap20.CommandHandler.Presentation/Scripts/jquery.unobtrusive-ajax.js",
    "content": "﻿/// <reference path=\"jquery-1.7.1.js\" />\n\n/*!\n** Unobtrusive Ajax support library for jQuery\n** Copyright (C) Microsoft Corporation. All rights reserved.\n*/\n\n/*jslint white: true, browser: true, onevar: true, undef: true, nomen: true, eqeqeq: true, plusplus: true, bitwise: true, regexp: true, newcap: true, immed: true, strict: false */\n/*global window: false, jQuery: false */\n\n(function ($) {\n    var data_click = \"unobtrusiveAjaxClick\",\n        data_validation = \"unobtrusiveValidation\";\n\n    function getFunction(code, argNames) {\n        var fn = window, parts = (code || \"\").split(\".\");\n        while (fn && parts.length) {\n            fn = fn[parts.shift()];\n        }\n        if (typeof (fn) === \"function\") {\n            return fn;\n        }\n        argNames.push(code);\n        return Function.constructor.apply(null, argNames);\n    }\n\n    function isMethodProxySafe(method) {\n        return method === \"GET\" || method === \"POST\";\n    }\n\n    function asyncOnBeforeSend(xhr, method) {\n        if (!isMethodProxySafe(method)) {\n            xhr.setRequestHeader(\"X-HTTP-Method-Override\", method);\n        }\n    }\n\n    function asyncOnSuccess(element, data, contentType) {\n        var mode;\n\n        if (contentType.indexOf(\"application/x-javascript\") !== -1) {  // jQuery already executes JavaScript for us\n            return;\n        }\n\n        mode = (element.getAttribute(\"data-ajax-mode\") || \"\").toUpperCase();\n        $(element.getAttribute(\"data-ajax-update\")).each(function (i, update) {\n            var top;\n\n            switch (mode) {\n            case \"BEFORE\":\n                top = update.firstChild;\n                $(\"<div />\").html(data).contents().each(function () {\n                    update.insertBefore(this, top);\n                });\n                break;\n            case \"AFTER\":\n                $(\"<div />\").html(data).contents().each(function () {\n                    update.appendChild(this);\n                });\n                break;\n            default:\n                $(update).html(data);\n                break;\n            }\n        });\n    }\n\n    function asyncRequest(element, options) {\n        var confirm, loading, method, duration;\n\n        confirm = element.getAttribute(\"data-ajax-confirm\");\n        if (confirm && !window.confirm(confirm)) {\n            return;\n        }\n\n        loading = $(element.getAttribute(\"data-ajax-loading\"));\n        duration = element.getAttribute(\"data-ajax-loading-duration\") || 0;\n\n        $.extend(options, {\n            type: element.getAttribute(\"data-ajax-method\") || undefined,\n            url: element.getAttribute(\"data-ajax-url\") || undefined,\n            beforeSend: function (xhr) {\n                var result;\n                asyncOnBeforeSend(xhr, method);\n                result = getFunction(element.getAttribute(\"data-ajax-begin\"), [\"xhr\"]).apply(this, arguments);\n                if (result !== false) {\n                    loading.show(duration);\n                }\n                return result;\n            },\n            complete: function () {\n                loading.hide(duration);\n                getFunction(element.getAttribute(\"data-ajax-complete\"), [\"xhr\", \"status\"]).apply(this, arguments);\n            },\n            success: function (data, status, xhr) {\n                asyncOnSuccess(element, data, xhr.getResponseHeader(\"Content-Type\") || \"text/html\");\n                getFunction(element.getAttribute(\"data-ajax-success\"), [\"data\", \"status\", \"xhr\"]).apply(this, arguments);\n            },\n            error: getFunction(element.getAttribute(\"data-ajax-failure\"), [\"xhr\", \"status\", \"error\"])\n        });\n\n        options.data.push({ name: \"X-Requested-With\", value: \"XMLHttpRequest\" });\n\n        method = options.type.toUpperCase();\n        if (!isMethodProxySafe(method)) {\n            options.type = \"POST\";\n            options.data.push({ name: \"X-HTTP-Method-Override\", value: method });\n        }\n\n        $.ajax(options);\n    }\n\n    function validate(form) {\n        var validationInfo = $(form).data(data_validation);\n        return !validationInfo || !validationInfo.validate || validationInfo.validate();\n    }\n\n    $(\"a[data-ajax=true]\").live(\"click\", function (evt) {\n        evt.preventDefault();\n        asyncRequest(this, {\n            url: this.href,\n            type: \"GET\",\n            data: []\n        });\n    });\n\n    $(\"form[data-ajax=true] input[type=image]\").live(\"click\", function (evt) {\n        var name = evt.target.name,\n            $target = $(evt.target),\n            form = $target.parents(\"form\")[0],\n            offset = $target.offset();\n\n        $(form).data(data_click, [\n            { name: name + \".x\", value: Math.round(evt.pageX - offset.left) },\n            { name: name + \".y\", value: Math.round(evt.pageY - offset.top) }\n        ]);\n\n        setTimeout(function () {\n            $(form).removeData(data_click);\n        }, 0);\n    });\n\n    $(\"form[data-ajax=true] :submit\").live(\"click\", function (evt) {\n        var name = evt.target.name,\n            form = $(evt.target).parents(\"form\")[0];\n\n        $(form).data(data_click, name ? [{ name: name, value: evt.target.value }] : []);\n\n        setTimeout(function () {\n            $(form).removeData(data_click);\n        }, 0);\n    });\n\n    $(\"form[data-ajax=true]\").live(\"submit\", function (evt) {\n        var clickInfo = $(this).data(data_click) || [];\n        evt.preventDefault();\n        if (!validate(this)) {\n            return;\n        }\n        asyncRequest(this, {\n            url: this.action,\n            type: this.method || \"GET\",\n            data: clickInfo.concat($(this).serializeArray())\n        });\n    });\n}(jQuery));"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/DDDPPP.Chap20.CommandHandler.Presentation/Scripts/jquery.validate-vsdoc.js",
    "content": "/*\n* This file has been commented to support Visual Studio Intellisense.\n* You should not use this file at runtime inside the browser--it is only\n* intended to be used only for design-time IntelliSense.  Please use the\n* standard jQuery library for all production use.\n*\n* Comment version: 1.8\n*/\n\n/*\n* Note: While Microsoft is not the author of this file, Microsoft is\n* offering you a license subject to the terms of the Microsoft Software\n* License Terms for Microsoft ASP.NET Model View Controller 3.\n* Microsoft reserves all other rights. The notices below are provided\n* for informational purposes only and are not the license terms under\n* which Microsoft distributed this file.\n*\n* jQuery validation plugin 1.8.0\n*\n* http://bassistance.de/jquery-plugins/jquery-plugin-validation/\n* http://docs.jquery.com/Plugins/Validation\n*\n* Copyright (c) 2006 - 2011 Jörn Zaefferer\n*\n*/\n\n(function($) {\n\n$.extend($.fn, {\n\t// http://docs.jquery.com/Plugins/Validation/validate\n\tvalidate: function( options ) {\n\t\t/// <summary>\n\t\t/// Validates the selected form. This method sets up event handlers for submit, focus,\n\t\t/// keyup, blur and click to trigger validation of the entire form or individual\n\t\t/// elements. Each one can be disabled, see the onxxx options (onsubmit, onfocusout,\n\t\t/// onkeyup, onclick). focusInvalid focuses elements when submitting a invalid form.\n\t\t/// </summary>\n\t\t/// <param name=\"options\" type=\"Object\">\n\t\t/// A set of key/value pairs that configure the validate. All options are optional.\n\t\t/// </param>\n\n\t\t// if nothing is selected, return nothing; can't chain anyway\n\t\tif (!this.length) {\n\t\t\toptions && options.debug && window.console && console.warn( \"nothing selected, can't validate, returning nothing\" );\n\t\t\treturn;\n\t\t}\n\n\t\t// check if a validator for this form was already created\n\t\tvar validator = $.data(this[0], 'validator');\n\t\tif ( validator ) {\n\t\t\treturn validator;\n\t\t}\n\t\t\n\t\tvalidator = new $.validator( options, this[0] );\n\t\t$.data(this[0], 'validator', validator); \n\t\t\n\t\tif ( validator.settings.onsubmit ) {\n\t\t\n\t\t\t// allow suppresing validation by adding a cancel class to the submit button\n\t\t\tthis.find(\"input, button\").filter(\".cancel\").click(function() {\n\t\t\t\tvalidator.cancelSubmit = true;\n\t\t\t});\n\t\t\t\n\t\t\t// when a submitHandler is used, capture the submitting button\n\t\t\tif (validator.settings.submitHandler) {\n\t\t\t\tthis.find(\"input, button\").filter(\":submit\").click(function() {\n\t\t\t\t\tvalidator.submitButton = this;\n\t\t\t\t});\n\t\t\t}\n\t\t\n\t\t\t// validate the form on submit\n\t\t\tthis.submit( function( event ) {\n\t\t\t\tif ( validator.settings.debug )\n\t\t\t\t\t// prevent form submit to be able to see console output\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\n\t\t\t\tfunction handle() {\n\t\t\t\t\tif ( validator.settings.submitHandler ) {\n\t\t\t\t\t\tif (validator.submitButton) {\n\t\t\t\t\t\t\t// insert a hidden input as a replacement for the missing submit button\n\t\t\t\t\t\t\tvar hidden = $(\"<input type='hidden'/>\").attr(\"name\", validator.submitButton.name).val(validator.submitButton.value).appendTo(validator.currentForm);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tvalidator.settings.submitHandler.call( validator, validator.currentForm );\n\t\t\t\t\t\tif (validator.submitButton) {\n\t\t\t\t\t\t\t// and clean up afterwards; thanks to no-block-scope, hidden can be referenced\n\t\t\t\t\t\t\thidden.remove();\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t// prevent submit for invalid forms or custom submit handlers\n\t\t\t\tif ( validator.cancelSubmit ) {\n\t\t\t\t\tvalidator.cancelSubmit = false;\n\t\t\t\t\treturn handle();\n\t\t\t\t}\n\t\t\t\tif ( validator.form() ) {\n\t\t\t\t\tif ( validator.pendingRequest ) {\n\t\t\t\t\t\tvalidator.formSubmitted = true;\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\treturn handle();\n\t\t\t\t} else {\n\t\t\t\t\tvalidator.focusInvalid();\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\t\n\t\treturn validator;\n\t},\n\t// http://docs.jquery.com/Plugins/Validation/valid\n\tvalid: function() {\n\t\t/// <summary>\n\t\t/// Checks if the selected form is valid or if all selected elements are valid.\n\t\t/// validate() needs to be called on the form before checking it using this method.\n\t\t/// </summary>\n\t\t/// <returns type=\"Boolean\" />\n\n        if ( $(this[0]).is('form')) {\n            return this.validate().form();\n        } else {\n            var valid = true;\n            var validator = $(this[0].form).validate();\n            this.each(function() {\n\t\t\t\tvalid &= validator.element(this);\n            });\n            return valid;\n        }\n    },\n\t// attributes: space seperated list of attributes to retrieve and remove\n\tremoveAttrs: function(attributes) {\n\t\t/// <summary>\n\t\t/// Remove the specified attributes from the first matched element and return them.\n\t\t/// </summary>\n\t\t/// <param name=\"attributes\" type=\"String\">\n\t\t/// A space-seperated list of attribute names to remove.\n\t\t/// </param>\n\n\t\tvar result = {},\n\t\t\t$element = this;\n\t\t$.each(attributes.split(/\\s/), function(index, value) {\n\t\t\tresult[value] = $element.attr(value);\n\t\t\t$element.removeAttr(value);\n\t\t});\n\t\treturn result;\n\t},\n\t// http://docs.jquery.com/Plugins/Validation/rules\n\trules: function(command, argument) {\n\t\t/// <summary>\n\t\t/// Return the validations rules for the first selected element.\n\t\t/// </summary>\n\t\t/// <param name=\"command\" type=\"String\">\n\t\t/// Can be either \"add\" or \"remove\".\n\t\t/// </param>\n\t\t/// <param name=\"argument\" type=\"\">\n\t\t/// A list of rules to add or remove.\n\t\t/// </param>\n\n\t\tvar element = this[0];\n\t\t\n\t\tif (command) {\n\t\t\tvar settings = $.data(element.form, 'validator').settings;\n\t\t\tvar staticRules = settings.rules;\n\t\t\tvar existingRules = $.validator.staticRules(element);\n\t\t\tswitch(command) {\n\t\t\tcase \"add\":\n\t\t\t\t$.extend(existingRules, $.validator.normalizeRule(argument));\n\t\t\t\tstaticRules[element.name] = existingRules;\n\t\t\t\tif (argument.messages)\n\t\t\t\t\tsettings.messages[element.name] = $.extend( settings.messages[element.name], argument.messages );\n\t\t\t\tbreak;\n\t\t\tcase \"remove\":\n\t\t\t\tif (!argument) {\n\t\t\t\t\tdelete staticRules[element.name];\n\t\t\t\t\treturn existingRules;\n\t\t\t\t}\n\t\t\t\tvar filtered = {};\n\t\t\t\t$.each(argument.split(/\\s/), function(index, method) {\n\t\t\t\t\tfiltered[method] = existingRules[method];\n\t\t\t\t\tdelete existingRules[method];\n\t\t\t\t});\n\t\t\t\treturn filtered;\n\t\t\t}\n\t\t}\n\t\t\n\t\tvar data = $.validator.normalizeRules(\n\t\t$.extend(\n\t\t\t{},\n\t\t\t$.validator.metadataRules(element),\n\t\t\t$.validator.classRules(element),\n\t\t\t$.validator.attributeRules(element),\n\t\t\t$.validator.staticRules(element)\n\t\t), element);\n\t\t\n\t\t// make sure required is at front\n\t\tif (data.required) {\n\t\t\tvar param = data.required;\n\t\t\tdelete data.required;\n\t\t\tdata = $.extend({required: param}, data);\n\t\t}\n\t\t\n\t\treturn data;\n\t}\n});\n\n// Custom selectors\n$.extend($.expr[\":\"], {\n\t// http://docs.jquery.com/Plugins/Validation/blank\n\tblank: function(a) {return !$.trim(\"\" + a.value);},\n\t// http://docs.jquery.com/Plugins/Validation/filled\n\tfilled: function(a) {return !!$.trim(\"\" + a.value);},\n\t// http://docs.jquery.com/Plugins/Validation/unchecked\n\tunchecked: function(a) {return !a.checked;}\n});\n\n// constructor for validator\n$.validator = function( options, form ) {\n\tthis.settings = $.extend( true, {}, $.validator.defaults, options );\n\tthis.currentForm = form;\n\tthis.init();\n};\n\n$.validator.format = function(source, params) {\n\t/// <summary>\n\t/// Replaces {n} placeholders with arguments.\n\t/// One or more arguments can be passed, in addition to the string template itself, to insert\n\t/// into the string.\n\t/// </summary>\n\t/// <param name=\"source\" type=\"String\">\n\t/// The string to format.\n\t/// </param>\n\t/// <param name=\"params\" type=\"String\">\n\t/// The first argument to insert, or an array of Strings to insert\n\t/// </param>\n\t/// <returns type=\"String\" />\n\n\tif ( arguments.length == 1 ) \n\t\treturn function() {\n\t\t\tvar args = $.makeArray(arguments);\n\t\t\targs.unshift(source);\n\t\t\treturn $.validator.format.apply( this, args );\n\t\t};\n\tif ( arguments.length > 2 && params.constructor != Array  ) {\n\t\tparams = $.makeArray(arguments).slice(1);\n\t}\n\tif ( params.constructor != Array ) {\n\t\tparams = [ params ];\n\t}\n\t$.each(params, function(i, n) {\n\t\tsource = source.replace(new RegExp(\"\\\\{\" + i + \"\\\\}\", \"g\"), n);\n\t});\n\treturn source;\n};\n\n$.extend($.validator, {\n\t\n\tdefaults: {\n\t\tmessages: {},\n\t\tgroups: {},\n\t\trules: {},\n\t\terrorClass: \"error\",\n\t\tvalidClass: \"valid\",\n\t\terrorElement: \"label\",\n\t\tfocusInvalid: true,\n\t\terrorContainer: $( [] ),\n\t\terrorLabelContainer: $( [] ),\n\t\tonsubmit: true,\n\t\tignore: [],\n\t\tignoreTitle: false,\n\t\tonfocusin: function(element) {\n\t\t\tthis.lastActive = element;\n\t\t\t\t\n\t\t\t// hide error label and remove error class on focus if enabled\n\t\t\tif ( this.settings.focusCleanup && !this.blockFocusCleanup ) {\n\t\t\t\tthis.settings.unhighlight && this.settings.unhighlight.call( this, element, this.settings.errorClass, this.settings.validClass );\n\t\t\t\tthis.addWrapper(this.errorsFor(element)).hide();\n\t\t\t}\n\t\t},\n\t\tonfocusout: function(element) {\n\t\t\tif ( !this.checkable(element) && (element.name in this.submitted || !this.optional(element)) ) {\n\t\t\t\tthis.element(element);\n\t\t\t}\n\t\t},\n\t\tonkeyup: function(element) {\n\t\t\tif ( element.name in this.submitted || element == this.lastElement ) {\n\t\t\t\tthis.element(element);\n\t\t\t}\n\t\t},\n\t\tonclick: function(element) {\n\t\t\t// click on selects, radiobuttons and checkboxes\n\t\t\tif ( element.name in this.submitted )\n\t\t\t\tthis.element(element);\n\t\t\t// or option elements, check parent select in that case\n\t\t\telse if (element.parentNode.name in this.submitted)\n\t\t\t\tthis.element(element.parentNode);\n\t\t},\n\t\thighlight: function( element, errorClass, validClass ) {\n\t\t\t$(element).addClass(errorClass).removeClass(validClass);\n\t\t},\n\t\tunhighlight: function( element, errorClass, validClass ) {\n\t\t\t$(element).removeClass(errorClass).addClass(validClass);\n\t\t}\n\t},\n\n\t// http://docs.jquery.com/Plugins/Validation/Validator/setDefaults\n\tsetDefaults: function(settings) {\n\t\t/// <summary>\n\t\t/// Modify default settings for validation.\n\t\t/// Accepts everything that Plugins/Validation/validate accepts.\n\t\t/// </summary>\n\t\t/// <param name=\"settings\" type=\"Options\">\n\t\t/// Options to set as default.\n\t\t/// </param>\n\n\t\t$.extend( $.validator.defaults, settings );\n\t},\n\n\tmessages: {\n\t\trequired: \"This field is required.\",\n\t\tremote: \"Please fix this field.\",\n\t\temail: \"Please enter a valid email address.\",\n\t\turl: \"Please enter a valid URL.\",\n\t\tdate: \"Please enter a valid date.\",\n\t\tdateISO: \"Please enter a valid date (ISO).\",\n\t\tnumber: \"Please enter a valid number.\",\n\t\tdigits: \"Please enter only digits.\",\n\t\tcreditcard: \"Please enter a valid credit card number.\",\n\t\tequalTo: \"Please enter the same value again.\",\n\t\taccept: \"Please enter a value with a valid extension.\",\n\t\tmaxlength: $.validator.format(\"Please enter no more than {0} characters.\"),\n\t\tminlength: $.validator.format(\"Please enter at least {0} characters.\"),\n\t\trangelength: $.validator.format(\"Please enter a value between {0} and {1} characters long.\"),\n\t\trange: $.validator.format(\"Please enter a value between {0} and {1}.\"),\n\t\tmax: $.validator.format(\"Please enter a value less than or equal to {0}.\"),\n\t\tmin: $.validator.format(\"Please enter a value greater than or equal to {0}.\")\n\t},\n\t\n\tautoCreateRanges: false,\n\t\n\tprototype: {\n\t\t\n\t\tinit: function() {\n\t\t\tthis.labelContainer = $(this.settings.errorLabelContainer);\n\t\t\tthis.errorContext = this.labelContainer.length && this.labelContainer || $(this.currentForm);\n\t\t\tthis.containers = $(this.settings.errorContainer).add( this.settings.errorLabelContainer );\n\t\t\tthis.submitted = {};\n\t\t\tthis.valueCache = {};\n\t\t\tthis.pendingRequest = 0;\n\t\t\tthis.pending = {};\n\t\t\tthis.invalid = {};\n\t\t\tthis.reset();\n\t\t\t\n\t\t\tvar groups = (this.groups = {});\n\t\t\t$.each(this.settings.groups, function(key, value) {\n\t\t\t\t$.each(value.split(/\\s/), function(index, name) {\n\t\t\t\t\tgroups[name] = key;\n\t\t\t\t});\n\t\t\t});\n\t\t\tvar rules = this.settings.rules;\n\t\t\t$.each(rules, function(key, value) {\n\t\t\t\trules[key] = $.validator.normalizeRule(value);\n\t\t\t});\n\t\t\t\n\t\t\tfunction delegate(event) {\n\t\t\t\tvar validator = $.data(this[0].form, \"validator\"),\n\t\t\t\t\teventType = \"on\" + event.type.replace(/^validate/, \"\");\n\t\t\t\tvalidator.settings[eventType] && validator.settings[eventType].call(validator, this[0] );\n\t\t\t}\n\t\t\t$(this.currentForm)\n\t\t\t\t.validateDelegate(\":text, :password, :file, select, textarea\", \"focusin focusout keyup\", delegate)\n\t\t\t\t.validateDelegate(\":radio, :checkbox, select, option\", \"click\", delegate);\n\n\t\t\tif (this.settings.invalidHandler)\n\t\t\t\t$(this.currentForm).bind(\"invalid-form.validate\", this.settings.invalidHandler);\n\t\t},\n\n\t\t// http://docs.jquery.com/Plugins/Validation/Validator/form\n\t\tform: function() {\n\t\t\t/// <summary>\n\t\t\t/// Validates the form, returns true if it is valid, false otherwise.\n\t\t\t/// This behaves as a normal submit event, but returns the result.\n\t\t\t/// </summary>\n\t\t\t/// <returns type=\"Boolean\" />\n\n\t\t\tthis.checkForm();\n\t\t\t$.extend(this.submitted, this.errorMap);\n\t\t\tthis.invalid = $.extend({}, this.errorMap);\n\t\t\tif (!this.valid())\n\t\t\t\t$(this.currentForm).triggerHandler(\"invalid-form\", [this]);\n\t\t\tthis.showErrors();\n\t\t\treturn this.valid();\n\t\t},\n\t\t\n\t\tcheckForm: function() {\n\t\t\tthis.prepareForm();\n\t\t\tfor ( var i = 0, elements = (this.currentElements = this.elements()); elements[i]; i++ ) {\n\t\t\t\tthis.check( elements[i] );\n\t\t\t}\n\t\t\treturn this.valid(); \n\t\t},\n\t\t\n\t\t// http://docs.jquery.com/Plugins/Validation/Validator/element\n\t\telement: function( element ) {\n\t\t\t/// <summary>\n\t\t\t/// Validates a single element, returns true if it is valid, false otherwise.\n\t\t\t/// This behaves as validation on blur or keyup, but returns the result.\n\t\t\t/// </summary>\n\t\t\t/// <param name=\"element\" type=\"Selector\">\n\t\t\t/// An element to validate, must be inside the validated form.\n\t\t\t/// </param>\n\t\t\t/// <returns type=\"Boolean\" />\n\n\t\t\telement = this.clean( element );\n\t\t\tthis.lastElement = element;\n\t\t\tthis.prepareElement( element );\n\t\t\tthis.currentElements = $(element);\n\t\t\tvar result = this.check( element );\n\t\t\tif ( result ) {\n\t\t\t\tdelete this.invalid[element.name];\n\t\t\t} else {\n\t\t\t\tthis.invalid[element.name] = true;\n\t\t\t}\n\t\t\tif ( !this.numberOfInvalids() ) {\n\t\t\t\t// Hide error containers on last error\n\t\t\t\tthis.toHide = this.toHide.add( this.containers );\n\t\t\t}\n\t\t\tthis.showErrors();\n\t\t\treturn result;\n\t\t},\n\n\t\t// http://docs.jquery.com/Plugins/Validation/Validator/showErrors\n\t\tshowErrors: function(errors) {\n\t\t\t/// <summary>\n\t\t\t/// Show the specified messages.\n\t\t\t/// Keys have to refer to the names of elements, values are displayed for those elements, using the configured error placement.\n\t\t\t/// </summary>\n\t\t\t/// <param name=\"errors\" type=\"Object\">\n\t\t\t/// One or more key/value pairs of input names and messages.\n\t\t\t/// </param>\n\n\t\t\tif(errors) {\n\t\t\t\t// add items to error list and map\n\t\t\t\t$.extend( this.errorMap, errors );\n\t\t\t\tthis.errorList = [];\n\t\t\t\tfor ( var name in errors ) {\n\t\t\t\t\tthis.errorList.push({\n\t\t\t\t\t\tmessage: errors[name],\n\t\t\t\t\t\telement: this.findByName(name)[0]\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\t// remove items from success list\n\t\t\t\tthis.successList = $.grep( this.successList, function(element) {\n\t\t\t\t\treturn !(element.name in errors);\n\t\t\t\t});\n\t\t\t}\n\t\t\tthis.settings.showErrors\n\t\t\t\t? this.settings.showErrors.call( this, this.errorMap, this.errorList )\n\t\t\t\t: this.defaultShowErrors();\n\t\t},\n\t\t\n\t\t// http://docs.jquery.com/Plugins/Validation/Validator/resetForm\n\t\tresetForm: function() {\n\t\t\t/// <summary>\n\t\t\t/// Resets the controlled form.\n\t\t\t/// Resets input fields to their original value (requires form plugin), removes classes\n\t\t\t/// indicating invalid elements and hides error messages.\n\t\t\t/// </summary>\n\n\t\t\tif ( $.fn.resetForm )\n\t\t\t\t$( this.currentForm ).resetForm();\n\t\t\tthis.submitted = {};\n\t\t\tthis.prepareForm();\n\t\t\tthis.hideErrors();\n\t\t\tthis.elements().removeClass( this.settings.errorClass );\n\t\t},\n\t\t\n\t\tnumberOfInvalids: function() {\n\t\t\t/// <summary>\n\t\t\t/// Returns the number of invalid fields.\n\t\t\t/// This depends on the internal validator state. It covers all fields only after\n\t\t\t/// validating the complete form (on submit or via $(\"form\").valid()). After validating\n\t\t\t/// a single element, only that element is counted. Most useful in combination with the\n\t\t\t/// invalidHandler-option.\n\t\t\t/// </summary>\n\t\t\t/// <returns type=\"Number\" />\n\n\t\t\treturn this.objectLength(this.invalid);\n\t\t},\n\t\t\n\t\tobjectLength: function( obj ) {\n\t\t\tvar count = 0;\n\t\t\tfor ( var i in obj )\n\t\t\t\tcount++;\n\t\t\treturn count;\n\t\t},\n\t\t\n\t\thideErrors: function() {\n\t\t\tthis.addWrapper( this.toHide ).hide();\n\t\t},\n\t\t\n\t\tvalid: function() {\n\t\t\treturn this.size() == 0;\n\t\t},\n\t\t\n\t\tsize: function() {\n\t\t\treturn this.errorList.length;\n\t\t},\n\t\t\n\t\tfocusInvalid: function() {\n\t\t\tif( this.settings.focusInvalid ) {\n\t\t\t\ttry {\n\t\t\t\t\t$(this.findLastActive() || this.errorList.length && this.errorList[0].element || [])\n\t\t\t\t\t.filter(\":visible\")\n\t\t\t\t\t.focus()\n\t\t\t\t\t// manually trigger focusin event; without it, focusin handler isn't called, findLastActive won't have anything to find\n\t\t\t\t\t.trigger(\"focusin\");\n\t\t\t\t} catch(e) {\n\t\t\t\t\t// ignore IE throwing errors when focusing hidden elements\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\n\t\tfindLastActive: function() {\n\t\t\tvar lastActive = this.lastActive;\n\t\t\treturn lastActive && $.grep(this.errorList, function(n) {\n\t\t\t\treturn n.element.name == lastActive.name;\n\t\t\t}).length == 1 && lastActive;\n\t\t},\n\t\t\n\t\telements: function() {\n\t\t\tvar validator = this,\n\t\t\t\trulesCache = {};\n\t\t\t\n\t\t\t// select all valid inputs inside the form (no submit or reset buttons)\n\t\t\t// workaround $Query([]).add until http://dev.jquery.com/ticket/2114 is solved\n\t\t\treturn $([]).add(this.currentForm.elements)\n\t\t\t.filter(\":input\")\n\t\t\t.not(\":submit, :reset, :image, [disabled]\")\n\t\t\t.not( this.settings.ignore )\n\t\t\t.filter(function() {\n\t\t\t\t!this.name && validator.settings.debug && window.console && console.error( \"%o has no name assigned\", this);\n\t\t\t\n\t\t\t\t// select only the first element for each name, and only those with rules specified\n\t\t\t\tif ( this.name in rulesCache || !validator.objectLength($(this).rules()) )\n\t\t\t\t\treturn false;\n\t\t\t\t\n\t\t\t\trulesCache[this.name] = true;\n\t\t\t\treturn true;\n\t\t\t});\n\t\t},\n\t\t\n\t\tclean: function( selector ) {\n\t\t\treturn $( selector )[0];\n\t\t},\n\t\t\n\t\terrors: function() {\n\t\t\treturn $( this.settings.errorElement + \".\" + this.settings.errorClass, this.errorContext );\n\t\t},\n\t\t\n\t\treset: function() {\n\t\t\tthis.successList = [];\n\t\t\tthis.errorList = [];\n\t\t\tthis.errorMap = {};\n\t\t\tthis.toShow = $([]);\n\t\t\tthis.toHide = $([]);\n\t\t\tthis.currentElements = $([]);\n\t\t},\n\t\t\n\t\tprepareForm: function() {\n\t\t\tthis.reset();\n\t\t\tthis.toHide = this.errors().add( this.containers );\n\t\t},\n\t\t\n\t\tprepareElement: function( element ) {\n\t\t\tthis.reset();\n\t\t\tthis.toHide = this.errorsFor(element);\n\t\t},\n\t\n\t\tcheck: function( element ) {\n\t\t\telement = this.clean( element );\n\t\t\t\n\t\t\t// if radio/checkbox, validate first element in group instead\n\t\t\tif (this.checkable(element)) {\n\t\t\t    element = this.findByName(element.name).not(this.settings.ignore)[0];\n\t\t\t}\n\t\t\t\n\t\t\tvar rules = $(element).rules();\n\t\t\tvar dependencyMismatch = false;\n\t\t\tfor (var method in rules) {\n\t\t\t\tvar rule = { method: method, parameters: rules[method] };\n\t\t\t\ttry {\n\t\t\t\t\tvar result = $.validator.methods[method].call( this, element.value.replace(/\\r/g, \"\"), element, rule.parameters );\n\t\t\t\t\t\n\t\t\t\t\t// if a method indicates that the field is optional and therefore valid,\n\t\t\t\t\t// don't mark it as valid when there are no other rules\n\t\t\t\t\tif ( result == \"dependency-mismatch\" ) {\n\t\t\t\t\t\tdependencyMismatch = true;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tdependencyMismatch = false;\n\t\t\t\t\t\n\t\t\t\t\tif ( result == \"pending\" ) {\n\t\t\t\t\t\tthis.toHide = this.toHide.not( this.errorsFor(element) );\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif( !result ) {\n\t\t\t\t\t\tthis.formatAndAdd( element, rule );\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t} catch(e) {\n\t\t\t\t\tthis.settings.debug && window.console && console.log(\"exception occured when checking element \" + element.id\n\t\t\t\t\t\t + \", check the '\" + rule.method + \"' method\", e);\n\t\t\t\t\tthrow e;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (dependencyMismatch)\n\t\t\t\treturn;\n\t\t\tif ( this.objectLength(rules) )\n\t\t\t\tthis.successList.push(element);\n\t\t\treturn true;\n\t\t},\n\t\t\n\t\t// return the custom message for the given element and validation method\n\t\t// specified in the element's \"messages\" metadata\n\t\tcustomMetaMessage: function(element, method) {\n\t\t\tif (!$.metadata)\n\t\t\t\treturn;\n\t\t\t\n\t\t\tvar meta = this.settings.meta\n\t\t\t\t? $(element).metadata()[this.settings.meta]\n\t\t\t\t: $(element).metadata();\n\t\t\t\n\t\t\treturn meta && meta.messages && meta.messages[method];\n\t\t},\n\t\t\n\t\t// return the custom message for the given element name and validation method\n\t\tcustomMessage: function( name, method ) {\n\t\t\tvar m = this.settings.messages[name];\n\t\t\treturn m && (m.constructor == String\n\t\t\t\t? m\n\t\t\t\t: m[method]);\n\t\t},\n\t\t\n\t\t// return the first defined argument, allowing empty strings\n\t\tfindDefined: function() {\n\t\t\tfor(var i = 0; i < arguments.length; i++) {\n\t\t\t\tif (arguments[i] !== undefined)\n\t\t\t\t\treturn arguments[i];\n\t\t\t}\n\t\t\treturn undefined;\n\t\t},\n\t\t\n\t\tdefaultMessage: function( element, method) {\n\t\t\treturn this.findDefined(\n\t\t\t\tthis.customMessage( element.name, method ),\n\t\t\t\tthis.customMetaMessage( element, method ),\n\t\t\t\t// title is never undefined, so handle empty string as undefined\n\t\t\t\t!this.settings.ignoreTitle && element.title || undefined,\n\t\t\t\t$.validator.messages[method],\n\t\t\t\t\"<strong>Warning: No message defined for \" + element.name + \"</strong>\"\n\t\t\t);\n\t\t},\n\t\t\n\t\tformatAndAdd: function( element, rule ) {\n\t\t\tvar message = this.defaultMessage( element, rule.method ),\n\t\t\t\ttheregex = /\\$?\\{(\\d+)\\}/g;\n\t\t\tif ( typeof message == \"function\" ) {\n\t\t\t\tmessage = message.call(this, rule.parameters, element);\n\t\t\t} else if (theregex.test(message)) {\n\t\t\t\tmessage = jQuery.format(message.replace(theregex, '{$1}'), rule.parameters);\n\t\t\t}\t\t\t\n\t\t\tthis.errorList.push({\n\t\t\t\tmessage: message,\n\t\t\t\telement: element\n\t\t\t});\n\t\t\t\n\t\t\tthis.errorMap[element.name] = message;\n\t\t\tthis.submitted[element.name] = message;\n\t\t},\n\t\t\n\t\taddWrapper: function(toToggle) {\n\t\t\tif ( this.settings.wrapper )\n\t\t\t\ttoToggle = toToggle.add( toToggle.parent( this.settings.wrapper ) );\n\t\t\treturn toToggle;\n\t\t},\n\t\t\n\t\tdefaultShowErrors: function() {\n\t\t\tfor ( var i = 0; this.errorList[i]; i++ ) {\n\t\t\t\tvar error = this.errorList[i];\n\t\t\t\tthis.settings.highlight && this.settings.highlight.call( this, error.element, this.settings.errorClass, this.settings.validClass );\n\t\t\t\tthis.showLabel( error.element, error.message );\n\t\t\t}\n\t\t\tif( this.errorList.length ) {\n\t\t\t\tthis.toShow = this.toShow.add( this.containers );\n\t\t\t}\n\t\t\tif (this.settings.success) {\n\t\t\t\tfor ( var i = 0; this.successList[i]; i++ ) {\n\t\t\t\t\tthis.showLabel( this.successList[i] );\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (this.settings.unhighlight) {\n\t\t\t\tfor ( var i = 0, elements = this.validElements(); elements[i]; i++ ) {\n\t\t\t\t\tthis.settings.unhighlight.call( this, elements[i], this.settings.errorClass, this.settings.validClass );\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.toHide = this.toHide.not( this.toShow );\n\t\t\tthis.hideErrors();\n\t\t\tthis.addWrapper( this.toShow ).show();\n\t\t},\n\t\t\n\t\tvalidElements: function() {\n\t\t\treturn this.currentElements.not(this.invalidElements());\n\t\t},\n\t\t\n\t\tinvalidElements: function() {\n\t\t\treturn $(this.errorList).map(function() {\n\t\t\t\treturn this.element;\n\t\t\t});\n\t\t},\n\t\t\n\t\tshowLabel: function(element, message) {\n\t\t\tvar label = this.errorsFor( element );\n\t\t\tif ( label.length ) {\n\t\t\t\t// refresh error/success class\n\t\t\t\tlabel.removeClass().addClass( this.settings.errorClass );\n\t\t\t\n\t\t\t\t// check if we have a generated label, replace the message then\n\t\t\t\tlabel.attr(\"generated\") && label.html(message);\n\t\t\t} else {\n\t\t\t\t// create label\n\t\t\t\tlabel = $(\"<\" + this.settings.errorElement + \"/>\")\n\t\t\t\t\t.attr({\"for\":  this.idOrName(element), generated: true})\n\t\t\t\t\t.addClass(this.settings.errorClass)\n\t\t\t\t\t.html(message || \"\");\n\t\t\t\tif ( this.settings.wrapper ) {\n\t\t\t\t\t// make sure the element is visible, even in IE\n\t\t\t\t\t// actually showing the wrapped element is handled elsewhere\n\t\t\t\t\tlabel = label.hide().show().wrap(\"<\" + this.settings.wrapper + \"/>\").parent();\n\t\t\t\t}\n\t\t\t\tif ( !this.labelContainer.append(label).length )\n\t\t\t\t\tthis.settings.errorPlacement\n\t\t\t\t\t\t? this.settings.errorPlacement(label, $(element) )\n\t\t\t\t\t\t: label.insertAfter(element);\n\t\t\t}\n\t\t\tif ( !message && this.settings.success ) {\n\t\t\t\tlabel.text(\"\");\n\t\t\t\ttypeof this.settings.success == \"string\"\n\t\t\t\t\t? label.addClass( this.settings.success )\n\t\t\t\t\t: this.settings.success( label );\n\t\t\t}\n\t\t\tthis.toShow = this.toShow.add(label);\n\t\t},\n\t\t\n\t\terrorsFor: function(element) {\n\t\t\tvar name = this.idOrName(element);\n    \t\treturn this.errors().filter(function() {\n\t\t\t\treturn $(this).attr('for') == name;\n\t\t\t});\n\t\t},\n\t\t\n\t\tidOrName: function(element) {\n\t\t\treturn this.groups[element.name] || (this.checkable(element) ? element.name : element.id || element.name);\n\t\t},\n\n\t\tcheckable: function( element ) {\n\t\t\treturn /radio|checkbox/i.test(element.type);\n\t\t},\n\t\t\n\t\tfindByName: function( name ) {\n\t\t\t// select by name and filter by form for performance over form.find(\"[name=...]\")\n\t\t\tvar form = this.currentForm;\n\t\t\treturn $(document.getElementsByName(name)).map(function(index, element) {\n\t\t\t\treturn element.form == form && element.name == name && element  || null;\n\t\t\t});\n\t\t},\n\t\t\n\t\tgetLength: function(value, element) {\n\t\t\tswitch( element.nodeName.toLowerCase() ) {\n\t\t\tcase 'select':\n\t\t\t\treturn $(\"option:selected\", element).length;\n\t\t\tcase 'input':\n\t\t\t\tif( this.checkable( element) )\n\t\t\t\t\treturn this.findByName(element.name).filter(':checked').length;\n\t\t\t}\n\t\t\treturn value.length;\n\t\t},\n\t\n\t\tdepend: function(param, element) {\n\t\t\treturn this.dependTypes[typeof param]\n\t\t\t\t? this.dependTypes[typeof param](param, element)\n\t\t\t\t: true;\n\t\t},\n\t\n\t\tdependTypes: {\n\t\t\t\"boolean\": function(param, element) {\n\t\t\t\treturn param;\n\t\t\t},\n\t\t\t\"string\": function(param, element) {\n\t\t\t\treturn !!$(param, element.form).length;\n\t\t\t},\n\t\t\t\"function\": function(param, element) {\n\t\t\t\treturn param(element);\n\t\t\t}\n\t\t},\n\t\t\n\t\toptional: function(element) {\n\t\t\treturn !$.validator.methods.required.call(this, $.trim(element.value), element) && \"dependency-mismatch\";\n\t\t},\n\t\t\n\t\tstartRequest: function(element) {\n\t\t\tif (!this.pending[element.name]) {\n\t\t\t\tthis.pendingRequest++;\n\t\t\t\tthis.pending[element.name] = true;\n\t\t\t}\n\t\t},\n\t\t\n\t\tstopRequest: function(element, valid) {\n\t\t\tthis.pendingRequest--;\n\t\t\t// sometimes synchronization fails, make sure pendingRequest is never < 0\n\t\t\tif (this.pendingRequest < 0)\n\t\t\t\tthis.pendingRequest = 0;\n\t\t\tdelete this.pending[element.name];\n\t\t\tif ( valid && this.pendingRequest == 0 && this.formSubmitted && this.form() ) {\n\t\t\t\t$(this.currentForm).submit();\n\t\t\t\tthis.formSubmitted = false;\n\t\t\t} else if (!valid && this.pendingRequest == 0 && this.formSubmitted) {\n\t\t\t\t$(this.currentForm).triggerHandler(\"invalid-form\", [this]);\n\t\t\t\tthis.formSubmitted = false;\n\t\t\t}\n\t\t},\n\t\t\n\t\tpreviousValue: function(element) {\n\t\t\treturn $.data(element, \"previousValue\") || $.data(element, \"previousValue\", {\n\t\t\t\told: null,\n\t\t\t\tvalid: true,\n\t\t\t\tmessage: this.defaultMessage( element, \"remote\" )\n\t\t\t});\n\t\t}\n\t\t\n\t},\n\t\n\tclassRuleSettings: {\n\t\trequired: {required: true},\n\t\temail: {email: true},\n\t\turl: {url: true},\n\t\tdate: {date: true},\n\t\tdateISO: {dateISO: true},\n\t\tdateDE: {dateDE: true},\n\t\tnumber: {number: true},\n\t\tnumberDE: {numberDE: true},\n\t\tdigits: {digits: true},\n\t\tcreditcard: {creditcard: true}\n\t},\n\t\n\taddClassRules: function(className, rules) {\n\t\t/// <summary>\n\t\t/// Add a compound class method - useful to refactor common combinations of rules into a single\n\t\t/// class.\n\t\t/// </summary>\n\t\t/// <param name=\"name\" type=\"String\">\n\t\t/// The name of the class rule to add\n\t\t/// </param>\n\t\t/// <param name=\"rules\" type=\"Options\">\n\t\t/// The compound rules\n\t\t/// </param>\n\n\t\tclassName.constructor == String ?\n\t\t\tthis.classRuleSettings[className] = rules :\n\t\t\t$.extend(this.classRuleSettings, className);\n\t},\n\t\n\tclassRules: function(element) {\n\t\tvar rules = {};\n\t\tvar classes = $(element).attr('class');\n\t\tclasses && $.each(classes.split(' '), function() {\n\t\t\tif (this in $.validator.classRuleSettings) {\n\t\t\t\t$.extend(rules, $.validator.classRuleSettings[this]);\n\t\t\t}\n\t\t});\n\t\treturn rules;\n\t},\n\t\n\tattributeRules: function(element) {\n\t\tvar rules = {};\n\t\tvar $element = $(element);\n\n\t\tfor (var method in $.validator.methods) {\n\t\t\tvar value = $element.attr(method);\n\t\t\tif (value) {\n\t\t\t\trules[method] = value;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// maxlength may be returned as -1, 2147483647 (IE) and 524288 (safari) for text inputs\n\t\tif (rules.maxlength && /-1|2147483647|524288/.test(rules.maxlength)) {\n\t\t\tdelete rules.maxlength;\n\t\t}\n\t\t\n\t\treturn rules;\n\t},\n\t\n\tmetadataRules: function(element) {\n\t\tif (!$.metadata) return {};\n\t\t\n\t\tvar meta = $.data(element.form, 'validator').settings.meta;\n\t\treturn meta ?\n\t\t\t$(element).metadata()[meta] :\n\t\t\t$(element).metadata();\n\t},\n\t\n\tstaticRules: function(element) {\n\t\tvar rules = {};\n\t\tvar validator = $.data(element.form, 'validator');\n\t\tif (validator.settings.rules) {\n\t\t\trules = $.validator.normalizeRule(validator.settings.rules[element.name]) || {};\n\t\t}\n\t\treturn rules;\n\t},\n\t\n\tnormalizeRules: function(rules, element) {\n\t\t// handle dependency check\n\t\t$.each(rules, function(prop, val) {\n\t\t\t// ignore rule when param is explicitly false, eg. required:false\n\t\t\tif (val === false) {\n\t\t\t\tdelete rules[prop];\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (val.param || val.depends) {\n\t\t\t\tvar keepRule = true;\n\t\t\t\tswitch (typeof val.depends) {\n\t\t\t\t\tcase \"string\":\n\t\t\t\t\t\tkeepRule = !!$(val.depends, element.form).length;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"function\":\n\t\t\t\t\t\tkeepRule = val.depends.call(element, element);\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif (keepRule) {\n\t\t\t\t\trules[prop] = val.param !== undefined ? val.param : true;\n\t\t\t\t} else {\n\t\t\t\t\tdelete rules[prop];\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\t// evaluate parameters\n\t\t$.each(rules, function(rule, parameter) {\n\t\t\trules[rule] = $.isFunction(parameter) ? parameter(element) : parameter;\n\t\t});\n\t\t\n\t\t// clean number parameters\n\t\t$.each(['minlength', 'maxlength', 'min', 'max'], function() {\n\t\t\tif (rules[this]) {\n\t\t\t\trules[this] = Number(rules[this]);\n\t\t\t}\n\t\t});\n\t\t$.each(['rangelength', 'range'], function() {\n\t\t\tif (rules[this]) {\n\t\t\t\trules[this] = [Number(rules[this][0]), Number(rules[this][1])];\n\t\t\t}\n\t\t});\n\t\t\n\t\tif ($.validator.autoCreateRanges) {\n\t\t\t// auto-create ranges\n\t\t\tif (rules.min && rules.max) {\n\t\t\t\trules.range = [rules.min, rules.max];\n\t\t\t\tdelete rules.min;\n\t\t\t\tdelete rules.max;\n\t\t\t}\n\t\t\tif (rules.minlength && rules.maxlength) {\n\t\t\t\trules.rangelength = [rules.minlength, rules.maxlength];\n\t\t\t\tdelete rules.minlength;\n\t\t\t\tdelete rules.maxlength;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// To support custom messages in metadata ignore rule methods titled \"messages\"\n\t\tif (rules.messages) {\n\t\t\tdelete rules.messages;\n\t\t}\n\t\t\n\t\treturn rules;\n\t},\n\t\n\t// Converts a simple string to a {string: true} rule, e.g., \"required\" to {required:true}\n\tnormalizeRule: function(data) {\n\t\tif( typeof data == \"string\" ) {\n\t\t\tvar transformed = {};\n\t\t\t$.each(data.split(/\\s/), function() {\n\t\t\t\ttransformed[this] = true;\n\t\t\t});\n\t\t\tdata = transformed;\n\t\t}\n\t\treturn data;\n\t},\n\t\n\t// http://docs.jquery.com/Plugins/Validation/Validator/addMethod\n\taddMethod: function(name, method, message) {\n\t\t/// <summary>\n\t\t/// Add a custom validation method. It must consist of a name (must be a legal javascript \n\t\t/// identifier), a javascript based function and a default string message.\n\t\t/// </summary>\n\t\t/// <param name=\"name\" type=\"String\">\n\t\t/// The name of the method, used to identify and referencing it, must be a valid javascript\n\t\t/// identifier\n\t\t/// </param>\n\t\t/// <param name=\"method\" type=\"Function\">\n\t\t/// The actual method implementation, returning true if an element is valid\n\t\t/// </param>\n\t\t/// <param name=\"message\" type=\"String\" optional=\"true\">\n\t\t/// (Optional) The default message to display for this method. Can be a function created by \n\t\t/// jQuery.validator.format(value). When undefined, an already existing message is used \n\t\t/// (handy for localization), otherwise the field-specific messages have to be defined.\n\t\t/// </param>\n\n\t\t$.validator.methods[name] = method;\n\t\t$.validator.messages[name] = message != undefined ? message : $.validator.messages[name];\n\t\tif (method.length < 3) {\n\t\t\t$.validator.addClassRules(name, $.validator.normalizeRule(name));\n\t\t}\n\t},\n\n\tmethods: {\n\n\t\t// http://docs.jquery.com/Plugins/Validation/Methods/required\n\t\trequired: function(value, element, param) {\n\t\t\t// check if dependency is met\n\t\t\tif ( !this.depend(param, element) )\n\t\t\t\treturn \"dependency-mismatch\";\n\t\t\tswitch( element.nodeName.toLowerCase() ) {\n\t\t\tcase 'select':\n\t\t\t\t// could be an array for select-multiple or a string, both are fine this way\n\t\t\t\tvar val = $(element).val();\n\t\t\t\treturn val && val.length > 0;\n\t\t\tcase 'input':\n\t\t\t\tif ( this.checkable(element) )\n\t\t\t\t\treturn this.getLength(value, element) > 0;\n\t\t\tdefault:\n\t\t\t\treturn $.trim(value).length > 0;\n\t\t\t}\n\t\t},\n\t\t\n\t\t// http://docs.jquery.com/Plugins/Validation/Methods/remote\n\t\tremote: function(value, element, param) {\n\t\t\tif ( this.optional(element) )\n\t\t\t\treturn \"dependency-mismatch\";\n\t\t\t\n\t\t\tvar previous = this.previousValue(element);\n\t\t\tif (!this.settings.messages[element.name] )\n\t\t\t\tthis.settings.messages[element.name] = {};\n\t\t\tprevious.originalMessage = this.settings.messages[element.name].remote;\n\t\t\tthis.settings.messages[element.name].remote = previous.message;\n\t\t\t\n\t\t\tparam = typeof param == \"string\" && {url:param} || param; \n\t\t\t\n\t\t\tif ( this.pending[element.name] ) {\n\t\t\t\treturn \"pending\";\n\t\t\t}\n\t\t\tif ( previous.old === value ) {\n\t\t\t\treturn previous.valid;\n\t\t\t}\n\n\t\t\tprevious.old = value;\n\t\t\tvar validator = this;\n\t\t\tthis.startRequest(element);\n\t\t\tvar data = {};\n\t\t\tdata[element.name] = value;\n\t\t\t$.ajax($.extend(true, {\n\t\t\t\turl: param,\n\t\t\t\tmode: \"abort\",\n\t\t\t\tport: \"validate\" + element.name,\n\t\t\t\tdataType: \"json\",\n\t\t\t\tdata: data,\n\t\t\t\tsuccess: function(response) {\n\t\t\t\t\tvalidator.settings.messages[element.name].remote = previous.originalMessage;\n\t\t\t\t\tvar valid = response === true;\n\t\t\t\t\tif ( valid ) {\n\t\t\t\t\t\tvar submitted = validator.formSubmitted;\n\t\t\t\t\t\tvalidator.prepareElement(element);\n\t\t\t\t\t\tvalidator.formSubmitted = submitted;\n\t\t\t\t\t\tvalidator.successList.push(element);\n\t\t\t\t\t\tvalidator.showErrors();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvar errors = {};\n\t\t\t\t\t\tvar message = response || validator.defaultMessage(element, \"remote\");\n\t\t\t\t\t\terrors[element.name] = previous.message = $.isFunction(message) ? message(value) : message;\n\t\t\t\t\t\tvalidator.showErrors(errors);\n\t\t\t\t\t}\n\t\t\t\t\tprevious.valid = valid;\n\t\t\t\t\tvalidator.stopRequest(element, valid);\n\t\t\t\t}\n\t\t\t}, param));\n\t\t\treturn \"pending\";\n\t\t},\n\n\t\t// http://docs.jquery.com/Plugins/Validation/Methods/minlength\n\t\tminlength: function(value, element, param) {\n\t\t\treturn this.optional(element) || this.getLength($.trim(value), element) >= param;\n\t\t},\n\t\t\n\t\t// http://docs.jquery.com/Plugins/Validation/Methods/maxlength\n\t\tmaxlength: function(value, element, param) {\n\t\t\treturn this.optional(element) || this.getLength($.trim(value), element) <= param;\n\t\t},\n\t\t\n\t\t// http://docs.jquery.com/Plugins/Validation/Methods/rangelength\n\t\trangelength: function(value, element, param) {\n\t\t\tvar length = this.getLength($.trim(value), element);\n\t\t\treturn this.optional(element) || ( length >= param[0] && length <= param[1] );\n\t\t},\n\t\t\n\t\t// http://docs.jquery.com/Plugins/Validation/Methods/min\n\t\tmin: function( value, element, param ) {\n\t\t\treturn this.optional(element) || value >= param;\n\t\t},\n\t\t\n\t\t// http://docs.jquery.com/Plugins/Validation/Methods/max\n\t\tmax: function( value, element, param ) {\n\t\t\treturn this.optional(element) || value <= param;\n\t\t},\n\t\t\n\t\t// http://docs.jquery.com/Plugins/Validation/Methods/range\n\t\trange: function( value, element, param ) {\n\t\t\treturn this.optional(element) || ( value >= param[0] && value <= param[1] );\n\t\t},\n\t\t\n\t\t// http://docs.jquery.com/Plugins/Validation/Methods/email\n\t\temail: function(value, element) {\n\t\t\t// contributed by Scott Gonzalez: http://projects.scottsplayground.com/email_address_validation/\n\t\t\treturn this.optional(element) || /^((([a-z]|\\d|[!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])+(\\.([a-z]|\\d|[!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])+)*)|((\\x22)((((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(([\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x7f]|\\x21|[\\x23-\\x5b]|[\\x5d-\\x7e]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(\\\\([\\x01-\\x09\\x0b\\x0c\\x0d-\\x7f]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]))))*(((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(\\x22)))@((([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))\\.)+(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))\\.?$/i.test(value);\n\t\t},\n\t\n\t\t// http://docs.jquery.com/Plugins/Validation/Methods/url\n\t\turl: function(value, element) {\n\t\t\t// contributed by Scott Gonzalez: http://projects.scottsplayground.com/iri/\n\t\t\treturn this.optional(element) || /^(https?|ftp):\\/\\/(((([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&'\\(\\)\\*\\+,;=]|:)*@)?(((\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5]))|((([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))\\.)+(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))\\.?)(:\\d*)?)(\\/((([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&'\\(\\)\\*\\+,;=]|:|@)+(\\/(([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&'\\(\\)\\*\\+,;=]|:|@)*)*)?)?(\\?((([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&'\\(\\)\\*\\+,;=]|:|@)|[\\uE000-\\uF8FF]|\\/|\\?)*)?(\\#((([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&'\\(\\)\\*\\+,;=]|:|@)|\\/|\\?)*)?$/i.test(value);\n\t\t},\n        \n\t\t// http://docs.jquery.com/Plugins/Validation/Methods/date\n\t\tdate: function(value, element) {\n\t\t\treturn this.optional(element) || !/Invalid|NaN/.test(new Date(value));\n\t\t},\n\t\n\t\t// http://docs.jquery.com/Plugins/Validation/Methods/dateISO\n\t\tdateISO: function(value, element) {\n\t\t\treturn this.optional(element) || /^\\d{4}[\\/-]\\d{1,2}[\\/-]\\d{1,2}$/.test(value);\n\t\t},\n\t\n\t\t// http://docs.jquery.com/Plugins/Validation/Methods/number\n\t\tnumber: function(value, element) {\n\t\t\treturn this.optional(element) || /^-?(?:\\d+|\\d{1,3}(?:,\\d{3})+)(?:\\.\\d+)?$/.test(value);\n\t\t},\n\t\n\t\t// http://docs.jquery.com/Plugins/Validation/Methods/digits\n\t\tdigits: function(value, element) {\n\t\t\treturn this.optional(element) || /^\\d+$/.test(value);\n\t\t},\n\t\t\n\t\t// http://docs.jquery.com/Plugins/Validation/Methods/creditcard\n\t\t// based on http://en.wikipedia.org/wiki/Luhn\n\t\tcreditcard: function(value, element) {\n\t\t\tif ( this.optional(element) )\n\t\t\t\treturn \"dependency-mismatch\";\n\t\t\t// accept only digits and dashes\n\t\t\tif (/[^0-9-]+/.test(value))\n\t\t\t\treturn false;\n\t\t\tvar nCheck = 0,\n\t\t\t\tnDigit = 0,\n\t\t\t\tbEven = false;\n\n\t\t\tvalue = value.replace(/\\D/g, \"\");\n\n\t\t\tfor (var n = value.length - 1; n >= 0; n--) {\n\t\t\t\tvar cDigit = value.charAt(n);\n\t\t\t\tvar nDigit = parseInt(cDigit, 10);\n\t\t\t\tif (bEven) {\n\t\t\t\t\tif ((nDigit *= 2) > 9)\n\t\t\t\t\t\tnDigit -= 9;\n\t\t\t\t}\n\t\t\t\tnCheck += nDigit;\n\t\t\t\tbEven = !bEven;\n\t\t\t}\n\n\t\t\treturn (nCheck % 10) == 0;\n\t\t},\n\t\t\n\t\t// http://docs.jquery.com/Plugins/Validation/Methods/accept\n\t\taccept: function(value, element, param) {\n\t\t\tparam = typeof param == \"string\" ? param.replace(/,/g, '|') : \"png|jpe?g|gif\";\n\t\t\treturn this.optional(element) || value.match(new RegExp(\".(\" + param + \")$\", \"i\")); \n\t\t},\n\t\t\n\t\t// http://docs.jquery.com/Plugins/Validation/Methods/equalTo\n\t\tequalTo: function(value, element, param) {\n\t\t\t// bind to the blur event of the target in order to revalidate whenever the target field is updated\n\t\t\t// TODO find a way to bind the event just once, avoiding the unbind-rebind overhead\n\t\t\tvar target = $(param).unbind(\".validate-equalTo\").bind(\"blur.validate-equalTo\", function() {\n\t\t\t\t$(element).valid();\n\t\t\t});\n\t\t\treturn value == target.val();\n\t\t}\n\t\t\n\t}\n\t\n});\n\n// deprecated, use $.validator.format instead\n$.format = $.validator.format;\n\n})(jQuery);\n\n// ajax mode: abort\n// usage: $.ajax({ mode: \"abort\"[, port: \"uniqueport\"]});\n// if mode:\"abort\" is used, the previous request on that port (port can be undefined) is aborted via XMLHttpRequest.abort() \n;(function($) {\n\tvar pendingRequests = {};\n\t\t// Use a prefilter if available (1.5+)\n\tif ( $.ajaxPrefilter ) {\n\t\t$.ajaxPrefilter(function(settings, _, xhr) {\n\t\t    var port = settings.port;\n\t\t    if (settings.mode == \"abort\") {\n\t\t\t    if ( pendingRequests[port] ) {\n\t\t\t\t    pendingRequests[port].abort();\n\t\t\t    }\t\t\t\tpendingRequests[port] = xhr;\n\t\t    }\n\t    });\n\t} else {\n\t\t// Proxy ajax\n\t\tvar ajax = $.ajax;\n\t\t$.ajax = function(settings) {\n\t\t\tvar mode = ( \"mode\" in settings ? settings : $.ajaxSettings ).mode,\n\t\t\t\tport = ( \"port\" in settings ? settings : $.ajaxSettings ).port;\n\t\t\tif (mode == \"abort\") {\n\t\t\t\tif ( pendingRequests[port] ) {\n\t\t\t\t\tpendingRequests[port].abort();\n\t\t\t\t}\n\n\t\t\t    return (pendingRequests[port] = ajax.apply(this, arguments));\n\t\t    }\n\t\t    return ajax.apply(this, arguments);\n\t    };\n    }\n})(jQuery);\n\n// provides cross-browser focusin and focusout events\n// IE has native support, in other browsers, use event caputuring (neither bubbles)\n\n// provides delegate(type: String, delegate: Selector, handler: Callback) plugin for easier event delegation\n// handler is only called when $(event.target).is(delegate), in the scope of the jquery-object for event.target \n;(function($) {\n\t// only implement if not provided by jQuery core (since 1.4)\n\t// TODO verify if jQuery 1.4's implementation is compatible with older jQuery special-event APIs\n\tif (!jQuery.event.special.focusin && !jQuery.event.special.focusout && document.addEventListener) {\n\t\t$.each({\n\t\t\tfocus: 'focusin',\n\t\t\tblur: 'focusout'\t\n\t\t}, function( original, fix ){\n\t\t\t$.event.special[fix] = {\n\t\t\t\tsetup:function() {\n\t\t\t\t\tthis.addEventListener( original, handler, true );\n\t\t\t\t},\n\t\t\t\tteardown:function() {\n\t\t\t\t\tthis.removeEventListener( original, handler, true );\n\t\t\t\t},\n\t\t\t\thandler: function(e) {\n\t\t\t\t\targuments[0] = $.event.fix(e);\n\t\t\t\t\targuments[0].type = fix;\n\t\t\t\t\treturn $.event.handle.apply(this, arguments);\n\t\t\t\t}\n\t\t\t};\n\t\t\tfunction handler(e) {\n\t\t\t\te = $.event.fix(e);\n\t\t\t\te.type = fix;\n\t\t\t\treturn $.event.handle.call(this, e);\n\t\t\t}\n\t\t});\n\t};\n\t$.extend($.fn, {\n\t\tvalidateDelegate: function(delegate, type, handler) {\n\t\t\treturn this.bind(type, function(event) {\n\t\t\t\tvar target = $(event.target);\n\t\t\t\tif (target.is(delegate)) {\n\t\t\t\t\treturn handler.apply(target, arguments);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t});\n})(jQuery);\n"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/DDDPPP.Chap20.CommandHandler.Presentation/Scripts/jquery.validate.js",
    "content": "/**\n * jQuery Validation Plugin 1.9.0\n *\n * http://bassistance.de/jquery-plugins/jquery-plugin-validation/\n * http://docs.jquery.com/Plugins/Validation\n *\n * Copyright (c) 2006 - 2011 Jörn Zaefferer\n *\n * Licensed under MIT: http://www.opensource.org/licenses/mit-license.php\n */\n\n(function($) {\n\n$.extend($.fn, {\n\t// http://docs.jquery.com/Plugins/Validation/validate\n\tvalidate: function( options ) {\n\n\t\t// if nothing is selected, return nothing; can't chain anyway\n\t\tif (!this.length) {\n\t\t\toptions && options.debug && window.console && console.warn( \"nothing selected, can't validate, returning nothing\" );\n\t\t\treturn;\n\t\t}\n\n\t\t// check if a validator for this form was already created\n\t\tvar validator = $.data(this[0], 'validator');\n\t\tif ( validator ) {\n\t\t\treturn validator;\n\t\t}\n\n\t\t// Add novalidate tag if HTML5.\n\t\tthis.attr('novalidate', 'novalidate');\n\n\t\tvalidator = new $.validator( options, this[0] );\n\t\t$.data(this[0], 'validator', validator);\n\n\t\tif ( validator.settings.onsubmit ) {\n\n\t\t\tvar inputsAndButtons = this.find(\"input, button\");\n\n\t\t\t// allow suppresing validation by adding a cancel class to the submit button\n\t\t\tinputsAndButtons.filter(\".cancel\").click(function () {\n\t\t\t\tvalidator.cancelSubmit = true;\n\t\t\t});\n\n\t\t\t// when a submitHandler is used, capture the submitting button\n\t\t\tif (validator.settings.submitHandler) {\n\t\t\t\tinputsAndButtons.filter(\":submit\").click(function () {\n\t\t\t\t\tvalidator.submitButton = this;\n\t\t\t\t});\n\t\t\t}\n\n\t\t\t// validate the form on submit\n\t\t\tthis.submit( function( event ) {\n\t\t\t\tif ( validator.settings.debug )\n\t\t\t\t\t// prevent form submit to be able to see console output\n\t\t\t\t\tevent.preventDefault();\n\n\t\t\t\tfunction handle() {\n\t\t\t\t\tif ( validator.settings.submitHandler ) {\n\t\t\t\t\t\tif (validator.submitButton) {\n\t\t\t\t\t\t\t// insert a hidden input as a replacement for the missing submit button\n\t\t\t\t\t\t\tvar hidden = $(\"<input type='hidden'/>\").attr(\"name\", validator.submitButton.name).val(validator.submitButton.value).appendTo(validator.currentForm);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tvalidator.settings.submitHandler.call( validator, validator.currentForm );\n\t\t\t\t\t\tif (validator.submitButton) {\n\t\t\t\t\t\t\t// and clean up afterwards; thanks to no-block-scope, hidden can be referenced\n\t\t\t\t\t\t\thidden.remove();\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\t// prevent submit for invalid forms or custom submit handlers\n\t\t\t\tif ( validator.cancelSubmit ) {\n\t\t\t\t\tvalidator.cancelSubmit = false;\n\t\t\t\t\treturn handle();\n\t\t\t\t}\n\t\t\t\tif ( validator.form() ) {\n\t\t\t\t\tif ( validator.pendingRequest ) {\n\t\t\t\t\t\tvalidator.formSubmitted = true;\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\treturn handle();\n\t\t\t\t} else {\n\t\t\t\t\tvalidator.focusInvalid();\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\treturn validator;\n\t},\n\t// http://docs.jquery.com/Plugins/Validation/valid\n\tvalid: function() {\n        if ( $(this[0]).is('form')) {\n            return this.validate().form();\n        } else {\n            var valid = true;\n            var validator = $(this[0].form).validate();\n            this.each(function() {\n\t\t\t\tvalid &= validator.element(this);\n            });\n            return valid;\n        }\n    },\n\t// attributes: space seperated list of attributes to retrieve and remove\n\tremoveAttrs: function(attributes) {\n\t\tvar result = {},\n\t\t\t$element = this;\n\t\t$.each(attributes.split(/\\s/), function(index, value) {\n\t\t\tresult[value] = $element.attr(value);\n\t\t\t$element.removeAttr(value);\n\t\t});\n\t\treturn result;\n\t},\n\t// http://docs.jquery.com/Plugins/Validation/rules\n\trules: function(command, argument) {\n\t\tvar element = this[0];\n\n\t\tif (command) {\n\t\t\tvar settings = $.data(element.form, 'validator').settings;\n\t\t\tvar staticRules = settings.rules;\n\t\t\tvar existingRules = $.validator.staticRules(element);\n\t\t\tswitch(command) {\n\t\t\tcase \"add\":\n\t\t\t\t$.extend(existingRules, $.validator.normalizeRule(argument));\n\t\t\t\tstaticRules[element.name] = existingRules;\n\t\t\t\tif (argument.messages)\n\t\t\t\t\tsettings.messages[element.name] = $.extend( settings.messages[element.name], argument.messages );\n\t\t\t\tbreak;\n\t\t\tcase \"remove\":\n\t\t\t\tif (!argument) {\n\t\t\t\t\tdelete staticRules[element.name];\n\t\t\t\t\treturn existingRules;\n\t\t\t\t}\n\t\t\t\tvar filtered = {};\n\t\t\t\t$.each(argument.split(/\\s/), function(index, method) {\n\t\t\t\t\tfiltered[method] = existingRules[method];\n\t\t\t\t\tdelete existingRules[method];\n\t\t\t\t});\n\t\t\t\treturn filtered;\n\t\t\t}\n\t\t}\n\n\t\tvar data = $.validator.normalizeRules(\n\t\t$.extend(\n\t\t\t{},\n\t\t\t$.validator.metadataRules(element),\n\t\t\t$.validator.classRules(element),\n\t\t\t$.validator.attributeRules(element),\n\t\t\t$.validator.staticRules(element)\n\t\t), element);\n\n\t\t// make sure required is at front\n\t\tif (data.required) {\n\t\t\tvar param = data.required;\n\t\t\tdelete data.required;\n\t\t\tdata = $.extend({required: param}, data);\n\t\t}\n\n\t\treturn data;\n\t}\n});\n\n// Custom selectors\n$.extend($.expr[\":\"], {\n\t// http://docs.jquery.com/Plugins/Validation/blank\n\tblank: function(a) {return !$.trim(\"\" + a.value);},\n\t// http://docs.jquery.com/Plugins/Validation/filled\n\tfilled: function(a) {return !!$.trim(\"\" + a.value);},\n\t// http://docs.jquery.com/Plugins/Validation/unchecked\n\tunchecked: function(a) {return !a.checked;}\n});\n\n// constructor for validator\n$.validator = function( options, form ) {\n\tthis.settings = $.extend( true, {}, $.validator.defaults, options );\n\tthis.currentForm = form;\n\tthis.init();\n};\n\n$.validator.format = function(source, params) {\n\tif ( arguments.length == 1 )\n\t\treturn function() {\n\t\t\tvar args = $.makeArray(arguments);\n\t\t\targs.unshift(source);\n\t\t\treturn $.validator.format.apply( this, args );\n\t\t};\n\tif ( arguments.length > 2 && params.constructor != Array  ) {\n\t\tparams = $.makeArray(arguments).slice(1);\n\t}\n\tif ( params.constructor != Array ) {\n\t\tparams = [ params ];\n\t}\n\t$.each(params, function(i, n) {\n\t\tsource = source.replace(new RegExp(\"\\\\{\" + i + \"\\\\}\", \"g\"), n);\n\t});\n\treturn source;\n};\n\n$.extend($.validator, {\n\n\tdefaults: {\n\t\tmessages: {},\n\t\tgroups: {},\n\t\trules: {},\n\t\terrorClass: \"error\",\n\t\tvalidClass: \"valid\",\n\t\terrorElement: \"label\",\n\t\tfocusInvalid: true,\n\t\terrorContainer: $( [] ),\n\t\terrorLabelContainer: $( [] ),\n\t\tonsubmit: true,\n\t\tignore: \":hidden\",\n\t\tignoreTitle: false,\n\t\tonfocusin: function(element, event) {\n\t\t\tthis.lastActive = element;\n\n\t\t\t// hide error label and remove error class on focus if enabled\n\t\t\tif ( this.settings.focusCleanup && !this.blockFocusCleanup ) {\n\t\t\t\tthis.settings.unhighlight && this.settings.unhighlight.call( this, element, this.settings.errorClass, this.settings.validClass );\n\t\t\t\tthis.addWrapper(this.errorsFor(element)).hide();\n\t\t\t}\n\t\t},\n\t\tonfocusout: function(element, event) {\n\t\t\tif ( !this.checkable(element) && (element.name in this.submitted || !this.optional(element)) ) {\n\t\t\t\tthis.element(element);\n\t\t\t}\n\t\t},\n\t\tonkeyup: function(element, event) {\n\t\t\tif ( element.name in this.submitted || element == this.lastElement ) {\n\t\t\t\tthis.element(element);\n\t\t\t}\n\t\t},\n\t\tonclick: function(element, event) {\n\t\t\t// click on selects, radiobuttons and checkboxes\n\t\t\tif ( element.name in this.submitted )\n\t\t\t\tthis.element(element);\n\t\t\t// or option elements, check parent select in that case\n\t\t\telse if (element.parentNode.name in this.submitted)\n\t\t\t\tthis.element(element.parentNode);\n\t\t},\n\t\thighlight: function(element, errorClass, validClass) {\n\t\t\tif (element.type === 'radio') {\n\t\t\t\tthis.findByName(element.name).addClass(errorClass).removeClass(validClass);\n\t\t\t} else {\n\t\t\t\t$(element).addClass(errorClass).removeClass(validClass);\n\t\t\t}\n\t\t},\n\t\tunhighlight: function(element, errorClass, validClass) {\n\t\t\tif (element.type === 'radio') {\n\t\t\t\tthis.findByName(element.name).removeClass(errorClass).addClass(validClass);\n\t\t\t} else {\n\t\t\t\t$(element).removeClass(errorClass).addClass(validClass);\n\t\t\t}\n\t\t}\n\t},\n\n\t// http://docs.jquery.com/Plugins/Validation/Validator/setDefaults\n\tsetDefaults: function(settings) {\n\t\t$.extend( $.validator.defaults, settings );\n\t},\n\n\tmessages: {\n\t\trequired: \"This field is required.\",\n\t\tremote: \"Please fix this field.\",\n\t\temail: \"Please enter a valid email address.\",\n\t\turl: \"Please enter a valid URL.\",\n\t\tdate: \"Please enter a valid date.\",\n\t\tdateISO: \"Please enter a valid date (ISO).\",\n\t\tnumber: \"Please enter a valid number.\",\n\t\tdigits: \"Please enter only digits.\",\n\t\tcreditcard: \"Please enter a valid credit card number.\",\n\t\tequalTo: \"Please enter the same value again.\",\n\t\taccept: \"Please enter a value with a valid extension.\",\n\t\tmaxlength: $.validator.format(\"Please enter no more than {0} characters.\"),\n\t\tminlength: $.validator.format(\"Please enter at least {0} characters.\"),\n\t\trangelength: $.validator.format(\"Please enter a value between {0} and {1} characters long.\"),\n\t\trange: $.validator.format(\"Please enter a value between {0} and {1}.\"),\n\t\tmax: $.validator.format(\"Please enter a value less than or equal to {0}.\"),\n\t\tmin: $.validator.format(\"Please enter a value greater than or equal to {0}.\")\n\t},\n\n\tautoCreateRanges: false,\n\n\tprototype: {\n\n\t\tinit: function() {\n\t\t\tthis.labelContainer = $(this.settings.errorLabelContainer);\n\t\t\tthis.errorContext = this.labelContainer.length && this.labelContainer || $(this.currentForm);\n\t\t\tthis.containers = $(this.settings.errorContainer).add( this.settings.errorLabelContainer );\n\t\t\tthis.submitted = {};\n\t\t\tthis.valueCache = {};\n\t\t\tthis.pendingRequest = 0;\n\t\t\tthis.pending = {};\n\t\t\tthis.invalid = {};\n\t\t\tthis.reset();\n\n\t\t\tvar groups = (this.groups = {});\n\t\t\t$.each(this.settings.groups, function(key, value) {\n\t\t\t\t$.each(value.split(/\\s/), function(index, name) {\n\t\t\t\t\tgroups[name] = key;\n\t\t\t\t});\n\t\t\t});\n\t\t\tvar rules = this.settings.rules;\n\t\t\t$.each(rules, function(key, value) {\n\t\t\t\trules[key] = $.validator.normalizeRule(value);\n\t\t\t});\n\n\t\t\tfunction delegate(event) {\n\t\t\t\tvar validator = $.data(this[0].form, \"validator\"),\n\t\t\t\t\teventType = \"on\" + event.type.replace(/^validate/, \"\");\n\t\t\t\tvalidator.settings[eventType] && validator.settings[eventType].call(validator, this[0], event);\n\t\t\t}\n\t\t\t$(this.currentForm)\n\t\t\t       .validateDelegate(\"[type='text'], [type='password'], [type='file'], select, textarea, \" +\n\t\t\t\t\t\t\"[type='number'], [type='search'] ,[type='tel'], [type='url'], \" +\n\t\t\t\t\t\t\"[type='email'], [type='datetime'], [type='date'], [type='month'], \" +\n\t\t\t\t\t\t\"[type='week'], [type='time'], [type='datetime-local'], \" +\n\t\t\t\t\t\t\"[type='range'], [type='color'] \",\n\t\t\t\t\t\t\"focusin focusout keyup\", delegate)\n\t\t\t\t.validateDelegate(\"[type='radio'], [type='checkbox'], select, option\", \"click\", delegate);\n\n\t\t\tif (this.settings.invalidHandler)\n\t\t\t\t$(this.currentForm).bind(\"invalid-form.validate\", this.settings.invalidHandler);\n\t\t},\n\n\t\t// http://docs.jquery.com/Plugins/Validation/Validator/form\n\t\tform: function() {\n\t\t\tthis.checkForm();\n\t\t\t$.extend(this.submitted, this.errorMap);\n\t\t\tthis.invalid = $.extend({}, this.errorMap);\n\t\t\tif (!this.valid())\n\t\t\t\t$(this.currentForm).triggerHandler(\"invalid-form\", [this]);\n\t\t\tthis.showErrors();\n\t\t\treturn this.valid();\n\t\t},\n\n\t\tcheckForm: function() {\n\t\t\tthis.prepareForm();\n\t\t\tfor ( var i = 0, elements = (this.currentElements = this.elements()); elements[i]; i++ ) {\n\t\t\t\tthis.check( elements[i] );\n\t\t\t}\n\t\t\treturn this.valid();\n\t\t},\n\n\t\t// http://docs.jquery.com/Plugins/Validation/Validator/element\n\t\telement: function( element ) {\n\t\t\telement = this.validationTargetFor( this.clean( element ) );\n\t\t\tthis.lastElement = element;\n\t\t\tthis.prepareElement( element );\n\t\t\tthis.currentElements = $(element);\n\t\t\tvar result = this.check( element );\n\t\t\tif ( result ) {\n\t\t\t\tdelete this.invalid[element.name];\n\t\t\t} else {\n\t\t\t\tthis.invalid[element.name] = true;\n\t\t\t}\n\t\t\tif ( !this.numberOfInvalids() ) {\n\t\t\t\t// Hide error containers on last error\n\t\t\t\tthis.toHide = this.toHide.add( this.containers );\n\t\t\t}\n\t\t\tthis.showErrors();\n\t\t\treturn result;\n\t\t},\n\n\t\t// http://docs.jquery.com/Plugins/Validation/Validator/showErrors\n\t\tshowErrors: function(errors) {\n\t\t\tif(errors) {\n\t\t\t\t// add items to error list and map\n\t\t\t\t$.extend( this.errorMap, errors );\n\t\t\t\tthis.errorList = [];\n\t\t\t\tfor ( var name in errors ) {\n\t\t\t\t\tthis.errorList.push({\n\t\t\t\t\t\tmessage: errors[name],\n\t\t\t\t\t\telement: this.findByName(name)[0]\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\t// remove items from success list\n\t\t\t\tthis.successList = $.grep( this.successList, function(element) {\n\t\t\t\t\treturn !(element.name in errors);\n\t\t\t\t});\n\t\t\t}\n\t\t\tthis.settings.showErrors\n\t\t\t\t? this.settings.showErrors.call( this, this.errorMap, this.errorList )\n\t\t\t\t: this.defaultShowErrors();\n\t\t},\n\n\t\t// http://docs.jquery.com/Plugins/Validation/Validator/resetForm\n\t\tresetForm: function() {\n\t\t\tif ( $.fn.resetForm )\n\t\t\t\t$( this.currentForm ).resetForm();\n\t\t\tthis.submitted = {};\n\t\t\tthis.lastElement = null;\n\t\t\tthis.prepareForm();\n\t\t\tthis.hideErrors();\n\t\t\tthis.elements().removeClass( this.settings.errorClass );\n\t\t},\n\n\t\tnumberOfInvalids: function() {\n\t\t\treturn this.objectLength(this.invalid);\n\t\t},\n\n\t\tobjectLength: function( obj ) {\n\t\t\tvar count = 0;\n\t\t\tfor ( var i in obj )\n\t\t\t\tcount++;\n\t\t\treturn count;\n\t\t},\n\n\t\thideErrors: function() {\n\t\t\tthis.addWrapper( this.toHide ).hide();\n\t\t},\n\n\t\tvalid: function() {\n\t\t\treturn this.size() == 0;\n\t\t},\n\n\t\tsize: function() {\n\t\t\treturn this.errorList.length;\n\t\t},\n\n\t\tfocusInvalid: function() {\n\t\t\tif( this.settings.focusInvalid ) {\n\t\t\t\ttry {\n\t\t\t\t\t$(this.findLastActive() || this.errorList.length && this.errorList[0].element || [])\n\t\t\t\t\t.filter(\":visible\")\n\t\t\t\t\t.focus()\n\t\t\t\t\t// manually trigger focusin event; without it, focusin handler isn't called, findLastActive won't have anything to find\n\t\t\t\t\t.trigger(\"focusin\");\n\t\t\t\t} catch(e) {\n\t\t\t\t\t// ignore IE throwing errors when focusing hidden elements\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\tfindLastActive: function() {\n\t\t\tvar lastActive = this.lastActive;\n\t\t\treturn lastActive && $.grep(this.errorList, function(n) {\n\t\t\t\treturn n.element.name == lastActive.name;\n\t\t\t}).length == 1 && lastActive;\n\t\t},\n\n\t\telements: function() {\n\t\t\tvar validator = this,\n\t\t\t\trulesCache = {};\n\n\t\t\t// select all valid inputs inside the form (no submit or reset buttons)\n\t\t\treturn $(this.currentForm)\n\t\t\t.find(\"input, select, textarea\")\n\t\t\t.not(\":submit, :reset, :image, [disabled]\")\n\t\t\t.not( this.settings.ignore )\n\t\t\t.filter(function() {\n\t\t\t\t!this.name && validator.settings.debug && window.console && console.error( \"%o has no name assigned\", this);\n\n\t\t\t\t// select only the first element for each name, and only those with rules specified\n\t\t\t\tif ( this.name in rulesCache || !validator.objectLength($(this).rules()) )\n\t\t\t\t\treturn false;\n\n\t\t\t\trulesCache[this.name] = true;\n\t\t\t\treturn true;\n\t\t\t});\n\t\t},\n\n\t\tclean: function( selector ) {\n\t\t\treturn $( selector )[0];\n\t\t},\n\n\t\terrors: function() {\n\t\t\treturn $( this.settings.errorElement + \".\" + this.settings.errorClass, this.errorContext );\n\t\t},\n\n\t\treset: function() {\n\t\t\tthis.successList = [];\n\t\t\tthis.errorList = [];\n\t\t\tthis.errorMap = {};\n\t\t\tthis.toShow = $([]);\n\t\t\tthis.toHide = $([]);\n\t\t\tthis.currentElements = $([]);\n\t\t},\n\n\t\tprepareForm: function() {\n\t\t\tthis.reset();\n\t\t\tthis.toHide = this.errors().add( this.containers );\n\t\t},\n\n\t\tprepareElement: function( element ) {\n\t\t\tthis.reset();\n\t\t\tthis.toHide = this.errorsFor(element);\n\t\t},\n\n\t\tcheck: function( element ) {\n\t\t\telement = this.validationTargetFor( this.clean( element ) );\n\n\t\t\tvar rules = $(element).rules();\n\t\t\tvar dependencyMismatch = false;\n\t\t\tfor (var method in rules ) {\n\t\t\t\tvar rule = { method: method, parameters: rules[method] };\n\t\t\t\ttry {\n\t\t\t\t\tvar result = $.validator.methods[method].call( this, element.value.replace(/\\r/g, \"\"), element, rule.parameters );\n\n\t\t\t\t\t// if a method indicates that the field is optional and therefore valid,\n\t\t\t\t\t// don't mark it as valid when there are no other rules\n\t\t\t\t\tif ( result == \"dependency-mismatch\" ) {\n\t\t\t\t\t\tdependencyMismatch = true;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tdependencyMismatch = false;\n\n\t\t\t\t\tif ( result == \"pending\" ) {\n\t\t\t\t\t\tthis.toHide = this.toHide.not( this.errorsFor(element) );\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tif( !result ) {\n\t\t\t\t\t\tthis.formatAndAdd( element, rule );\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t} catch(e) {\n\t\t\t\t\tthis.settings.debug && window.console && console.log(\"exception occured when checking element \" + element.id\n\t\t\t\t\t\t + \", check the '\" + rule.method + \"' method\", e);\n\t\t\t\t\tthrow e;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (dependencyMismatch)\n\t\t\t\treturn;\n\t\t\tif ( this.objectLength(rules) )\n\t\t\t\tthis.successList.push(element);\n\t\t\treturn true;\n\t\t},\n\n\t\t// return the custom message for the given element and validation method\n\t\t// specified in the element's \"messages\" metadata\n\t\tcustomMetaMessage: function(element, method) {\n\t\t\tif (!$.metadata)\n\t\t\t\treturn;\n\n\t\t\tvar meta = this.settings.meta\n\t\t\t\t? $(element).metadata()[this.settings.meta]\n\t\t\t\t: $(element).metadata();\n\n\t\t\treturn meta && meta.messages && meta.messages[method];\n\t\t},\n\n\t\t// return the custom message for the given element name and validation method\n\t\tcustomMessage: function( name, method ) {\n\t\t\tvar m = this.settings.messages[name];\n\t\t\treturn m && (m.constructor == String\n\t\t\t\t? m\n\t\t\t\t: m[method]);\n\t\t},\n\n\t\t// return the first defined argument, allowing empty strings\n\t\tfindDefined: function() {\n\t\t\tfor(var i = 0; i < arguments.length; i++) {\n\t\t\t\tif (arguments[i] !== undefined)\n\t\t\t\t\treturn arguments[i];\n\t\t\t}\n\t\t\treturn undefined;\n\t\t},\n\n\t\tdefaultMessage: function( element, method) {\n\t\t\treturn this.findDefined(\n\t\t\t\tthis.customMessage( element.name, method ),\n\t\t\t\tthis.customMetaMessage( element, method ),\n\t\t\t\t// title is never undefined, so handle empty string as undefined\n\t\t\t\t!this.settings.ignoreTitle && element.title || undefined,\n\t\t\t\t$.validator.messages[method],\n\t\t\t\t\"<strong>Warning: No message defined for \" + element.name + \"</strong>\"\n\t\t\t);\n\t\t},\n\n\t\tformatAndAdd: function( element, rule ) {\n\t\t\tvar message = this.defaultMessage( element, rule.method ),\n\t\t\t\ttheregex = /\\$?\\{(\\d+)\\}/g;\n\t\t\tif ( typeof message == \"function\" ) {\n\t\t\t\tmessage = message.call(this, rule.parameters, element);\n\t\t\t} else if (theregex.test(message)) {\n\t\t\t\tmessage = jQuery.format(message.replace(theregex, '{$1}'), rule.parameters);\n\t\t\t}\n\t\t\tthis.errorList.push({\n\t\t\t\tmessage: message,\n\t\t\t\telement: element\n\t\t\t});\n\n\t\t\tthis.errorMap[element.name] = message;\n\t\t\tthis.submitted[element.name] = message;\n\t\t},\n\n\t\taddWrapper: function(toToggle) {\n\t\t\tif ( this.settings.wrapper )\n\t\t\t\ttoToggle = toToggle.add( toToggle.parent( this.settings.wrapper ) );\n\t\t\treturn toToggle;\n\t\t},\n\n\t\tdefaultShowErrors: function() {\n\t\t\tfor ( var i = 0; this.errorList[i]; i++ ) {\n\t\t\t\tvar error = this.errorList[i];\n\t\t\t\tthis.settings.highlight && this.settings.highlight.call( this, error.element, this.settings.errorClass, this.settings.validClass );\n\t\t\t\tthis.showLabel( error.element, error.message );\n\t\t\t}\n\t\t\tif( this.errorList.length ) {\n\t\t\t\tthis.toShow = this.toShow.add( this.containers );\n\t\t\t}\n\t\t\tif (this.settings.success) {\n\t\t\t\tfor ( var i = 0; this.successList[i]; i++ ) {\n\t\t\t\t\tthis.showLabel( this.successList[i] );\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (this.settings.unhighlight) {\n\t\t\t\tfor ( var i = 0, elements = this.validElements(); elements[i]; i++ ) {\n\t\t\t\t\tthis.settings.unhighlight.call( this, elements[i], this.settings.errorClass, this.settings.validClass );\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.toHide = this.toHide.not( this.toShow );\n\t\t\tthis.hideErrors();\n\t\t\tthis.addWrapper( this.toShow ).show();\n\t\t},\n\n\t\tvalidElements: function() {\n\t\t\treturn this.currentElements.not(this.invalidElements());\n\t\t},\n\n\t\tinvalidElements: function() {\n\t\t\treturn $(this.errorList).map(function() {\n\t\t\t\treturn this.element;\n\t\t\t});\n\t\t},\n\n\t\tshowLabel: function(element, message) {\n\t\t\tvar label = this.errorsFor( element );\n\t\t\tif ( label.length ) {\n\t\t\t\t// refresh error/success class\n\t\t\t\tlabel.removeClass( this.settings.validClass ).addClass( this.settings.errorClass );\n\n\t\t\t\t// check if we have a generated label, replace the message then\n\t\t\t\tlabel.attr(\"generated\") && label.html(message);\n\t\t\t} else {\n\t\t\t\t// create label\n\t\t\t\tlabel = $(\"<\" + this.settings.errorElement + \"/>\")\n\t\t\t\t\t.attr({\"for\":  this.idOrName(element), generated: true})\n\t\t\t\t\t.addClass(this.settings.errorClass)\n\t\t\t\t\t.html(message || \"\");\n\t\t\t\tif ( this.settings.wrapper ) {\n\t\t\t\t\t// make sure the element is visible, even in IE\n\t\t\t\t\t// actually showing the wrapped element is handled elsewhere\n\t\t\t\t\tlabel = label.hide().show().wrap(\"<\" + this.settings.wrapper + \"/>\").parent();\n\t\t\t\t}\n\t\t\t\tif ( !this.labelContainer.append(label).length )\n\t\t\t\t\tthis.settings.errorPlacement\n\t\t\t\t\t\t? this.settings.errorPlacement(label, $(element) )\n\t\t\t\t\t\t: label.insertAfter(element);\n\t\t\t}\n\t\t\tif ( !message && this.settings.success ) {\n\t\t\t\tlabel.text(\"\");\n\t\t\t\ttypeof this.settings.success == \"string\"\n\t\t\t\t\t? label.addClass( this.settings.success )\n\t\t\t\t\t: this.settings.success( label );\n\t\t\t}\n\t\t\tthis.toShow = this.toShow.add(label);\n\t\t},\n\n\t\terrorsFor: function(element) {\n\t\t\tvar name = this.idOrName(element);\n    \t\treturn this.errors().filter(function() {\n\t\t\t\treturn $(this).attr('for') == name;\n\t\t\t});\n\t\t},\n\n\t\tidOrName: function(element) {\n\t\t\treturn this.groups[element.name] || (this.checkable(element) ? element.name : element.id || element.name);\n\t\t},\n\n\t\tvalidationTargetFor: function(element) {\n\t\t\t// if radio/checkbox, validate first element in group instead\n\t\t\tif (this.checkable(element)) {\n\t\t\t\telement = this.findByName( element.name ).not(this.settings.ignore)[0];\n\t\t\t}\n\t\t\treturn element;\n\t\t},\n\n\t\tcheckable: function( element ) {\n\t\t\treturn /radio|checkbox/i.test(element.type);\n\t\t},\n\n\t\tfindByName: function( name ) {\n\t\t\t// select by name and filter by form for performance over form.find(\"[name=...]\")\n\t\t\tvar form = this.currentForm;\n\t\t\treturn $(document.getElementsByName(name)).map(function(index, element) {\n\t\t\t\treturn element.form == form && element.name == name && element  || null;\n\t\t\t});\n\t\t},\n\n\t\tgetLength: function(value, element) {\n\t\t\tswitch( element.nodeName.toLowerCase() ) {\n\t\t\tcase 'select':\n\t\t\t\treturn $(\"option:selected\", element).length;\n\t\t\tcase 'input':\n\t\t\t\tif( this.checkable( element) )\n\t\t\t\t\treturn this.findByName(element.name).filter(':checked').length;\n\t\t\t}\n\t\t\treturn value.length;\n\t\t},\n\n\t\tdepend: function(param, element) {\n\t\t\treturn this.dependTypes[typeof param]\n\t\t\t\t? this.dependTypes[typeof param](param, element)\n\t\t\t\t: true;\n\t\t},\n\n\t\tdependTypes: {\n\t\t\t\"boolean\": function(param, element) {\n\t\t\t\treturn param;\n\t\t\t},\n\t\t\t\"string\": function(param, element) {\n\t\t\t\treturn !!$(param, element.form).length;\n\t\t\t},\n\t\t\t\"function\": function(param, element) {\n\t\t\t\treturn param(element);\n\t\t\t}\n\t\t},\n\n\t\toptional: function(element) {\n\t\t\treturn !$.validator.methods.required.call(this, $.trim(element.value), element) && \"dependency-mismatch\";\n\t\t},\n\n\t\tstartRequest: function(element) {\n\t\t\tif (!this.pending[element.name]) {\n\t\t\t\tthis.pendingRequest++;\n\t\t\t\tthis.pending[element.name] = true;\n\t\t\t}\n\t\t},\n\n\t\tstopRequest: function(element, valid) {\n\t\t\tthis.pendingRequest--;\n\t\t\t// sometimes synchronization fails, make sure pendingRequest is never < 0\n\t\t\tif (this.pendingRequest < 0)\n\t\t\t\tthis.pendingRequest = 0;\n\t\t\tdelete this.pending[element.name];\n\t\t\tif ( valid && this.pendingRequest == 0 && this.formSubmitted && this.form() ) {\n\t\t\t\t$(this.currentForm).submit();\n\t\t\t\tthis.formSubmitted = false;\n\t\t\t} else if (!valid && this.pendingRequest == 0 && this.formSubmitted) {\n\t\t\t\t$(this.currentForm).triggerHandler(\"invalid-form\", [this]);\n\t\t\t\tthis.formSubmitted = false;\n\t\t\t}\n\t\t},\n\n\t\tpreviousValue: function(element) {\n\t\t\treturn $.data(element, \"previousValue\") || $.data(element, \"previousValue\", {\n\t\t\t\told: null,\n\t\t\t\tvalid: true,\n\t\t\t\tmessage: this.defaultMessage( element, \"remote\" )\n\t\t\t});\n\t\t}\n\n\t},\n\n\tclassRuleSettings: {\n\t\trequired: {required: true},\n\t\temail: {email: true},\n\t\turl: {url: true},\n\t\tdate: {date: true},\n\t\tdateISO: {dateISO: true},\n\t\tdateDE: {dateDE: true},\n\t\tnumber: {number: true},\n\t\tnumberDE: {numberDE: true},\n\t\tdigits: {digits: true},\n\t\tcreditcard: {creditcard: true}\n\t},\n\n\taddClassRules: function(className, rules) {\n\t\tclassName.constructor == String ?\n\t\t\tthis.classRuleSettings[className] = rules :\n\t\t\t$.extend(this.classRuleSettings, className);\n\t},\n\n\tclassRules: function(element) {\n\t\tvar rules = {};\n\t\tvar classes = $(element).attr('class');\n\t\tclasses && $.each(classes.split(' '), function() {\n\t\t\tif (this in $.validator.classRuleSettings) {\n\t\t\t\t$.extend(rules, $.validator.classRuleSettings[this]);\n\t\t\t}\n\t\t});\n\t\treturn rules;\n\t},\n\n\tattributeRules: function(element) {\n\t\tvar rules = {};\n\t\tvar $element = $(element);\n\n\t\tfor (var method in $.validator.methods) {\n\t\t\tvar value;\n\t\t\t// If .prop exists (jQuery >= 1.6), use it to get true/false for required\n\t\t\tif (method === 'required' && typeof $.fn.prop === 'function') {\n\t\t\t\tvalue = $element.prop(method);\n\t\t\t} else {\n\t\t\t\tvalue = $element.attr(method);\n\t\t\t}\n\t\t\tif (value) {\n\t\t\t\trules[method] = value;\n\t\t\t} else if ($element[0].getAttribute(\"type\") === method) {\n\t\t\t\trules[method] = true;\n\t\t\t}\n\t\t}\n\n\t\t// maxlength may be returned as -1, 2147483647 (IE) and 524288 (safari) for text inputs\n\t\tif (rules.maxlength && /-1|2147483647|524288/.test(rules.maxlength)) {\n\t\t\tdelete rules.maxlength;\n\t\t}\n\n\t\treturn rules;\n\t},\n\n\tmetadataRules: function(element) {\n\t\tif (!$.metadata) return {};\n\n\t\tvar meta = $.data(element.form, 'validator').settings.meta;\n\t\treturn meta ?\n\t\t\t$(element).metadata()[meta] :\n\t\t\t$(element).metadata();\n\t},\n\n\tstaticRules: function(element) {\n\t\tvar rules = {};\n\t\tvar validator = $.data(element.form, 'validator');\n\t\tif (validator.settings.rules) {\n\t\t\trules = $.validator.normalizeRule(validator.settings.rules[element.name]) || {};\n\t\t}\n\t\treturn rules;\n\t},\n\n\tnormalizeRules: function(rules, element) {\n\t\t// handle dependency check\n\t\t$.each(rules, function(prop, val) {\n\t\t\t// ignore rule when param is explicitly false, eg. required:false\n\t\t\tif (val === false) {\n\t\t\t\tdelete rules[prop];\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (val.param || val.depends) {\n\t\t\t\tvar keepRule = true;\n\t\t\t\tswitch (typeof val.depends) {\n\t\t\t\t\tcase \"string\":\n\t\t\t\t\t\tkeepRule = !!$(val.depends, element.form).length;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"function\":\n\t\t\t\t\t\tkeepRule = val.depends.call(element, element);\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif (keepRule) {\n\t\t\t\t\trules[prop] = val.param !== undefined ? val.param : true;\n\t\t\t\t} else {\n\t\t\t\t\tdelete rules[prop];\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\t// evaluate parameters\n\t\t$.each(rules, function(rule, parameter) {\n\t\t\trules[rule] = $.isFunction(parameter) ? parameter(element) : parameter;\n\t\t});\n\n\t\t// clean number parameters\n\t\t$.each(['minlength', 'maxlength', 'min', 'max'], function() {\n\t\t\tif (rules[this]) {\n\t\t\t\trules[this] = Number(rules[this]);\n\t\t\t}\n\t\t});\n\t\t$.each(['rangelength', 'range'], function() {\n\t\t\tif (rules[this]) {\n\t\t\t\trules[this] = [Number(rules[this][0]), Number(rules[this][1])];\n\t\t\t}\n\t\t});\n\n\t\tif ($.validator.autoCreateRanges) {\n\t\t\t// auto-create ranges\n\t\t\tif (rules.min && rules.max) {\n\t\t\t\trules.range = [rules.min, rules.max];\n\t\t\t\tdelete rules.min;\n\t\t\t\tdelete rules.max;\n\t\t\t}\n\t\t\tif (rules.minlength && rules.maxlength) {\n\t\t\t\trules.rangelength = [rules.minlength, rules.maxlength];\n\t\t\t\tdelete rules.minlength;\n\t\t\t\tdelete rules.maxlength;\n\t\t\t}\n\t\t}\n\n\t\t// To support custom messages in metadata ignore rule methods titled \"messages\"\n\t\tif (rules.messages) {\n\t\t\tdelete rules.messages;\n\t\t}\n\n\t\treturn rules;\n\t},\n\n\t// Converts a simple string to a {string: true} rule, e.g., \"required\" to {required:true}\n\tnormalizeRule: function(data) {\n\t\tif( typeof data == \"string\" ) {\n\t\t\tvar transformed = {};\n\t\t\t$.each(data.split(/\\s/), function() {\n\t\t\t\ttransformed[this] = true;\n\t\t\t});\n\t\t\tdata = transformed;\n\t\t}\n\t\treturn data;\n\t},\n\n\t// http://docs.jquery.com/Plugins/Validation/Validator/addMethod\n\taddMethod: function(name, method, message) {\n\t\t$.validator.methods[name] = method;\n\t\t$.validator.messages[name] = message != undefined ? message : $.validator.messages[name];\n\t\tif (method.length < 3) {\n\t\t\t$.validator.addClassRules(name, $.validator.normalizeRule(name));\n\t\t}\n\t},\n\n\tmethods: {\n\n\t\t// http://docs.jquery.com/Plugins/Validation/Methods/required\n\t\trequired: function(value, element, param) {\n\t\t\t// check if dependency is met\n\t\t\tif ( !this.depend(param, element) )\n\t\t\t\treturn \"dependency-mismatch\";\n\t\t\tswitch( element.nodeName.toLowerCase() ) {\n\t\t\tcase 'select':\n\t\t\t\t// could be an array for select-multiple or a string, both are fine this way\n\t\t\t\tvar val = $(element).val();\n\t\t\t\treturn val && val.length > 0;\n\t\t\tcase 'input':\n\t\t\t\tif ( this.checkable(element) )\n\t\t\t\t\treturn this.getLength(value, element) > 0;\n\t\t\tdefault:\n\t\t\t\treturn $.trim(value).length > 0;\n\t\t\t}\n\t\t},\n\n\t\t// http://docs.jquery.com/Plugins/Validation/Methods/remote\n\t\tremote: function(value, element, param) {\n\t\t\tif ( this.optional(element) )\n\t\t\t\treturn \"dependency-mismatch\";\n\n\t\t\tvar previous = this.previousValue(element);\n\t\t\tif (!this.settings.messages[element.name] )\n\t\t\t\tthis.settings.messages[element.name] = {};\n\t\t\tprevious.originalMessage = this.settings.messages[element.name].remote;\n\t\t\tthis.settings.messages[element.name].remote = previous.message;\n\n\t\t\tparam = typeof param == \"string\" && {url:param} || param;\n\n\t\t\tif ( this.pending[element.name] ) {\n\t\t\t\treturn \"pending\";\n\t\t\t}\n\t\t\tif ( previous.old === value ) {\n\t\t\t\treturn previous.valid;\n\t\t\t}\n\n\t\t\tprevious.old = value;\n\t\t\tvar validator = this;\n\t\t\tthis.startRequest(element);\n\t\t\tvar data = {};\n\t\t\tdata[element.name] = value;\n\t\t\t$.ajax($.extend(true, {\n\t\t\t\turl: param,\n\t\t\t\tmode: \"abort\",\n\t\t\t\tport: \"validate\" + element.name,\n\t\t\t\tdataType: \"json\",\n\t\t\t\tdata: data,\n\t\t\t\tsuccess: function(response) {\n\t\t\t\t\tvalidator.settings.messages[element.name].remote = previous.originalMessage;\n\t\t\t\t\tvar valid = response === true;\n\t\t\t\t\tif ( valid ) {\n\t\t\t\t\t\tvar submitted = validator.formSubmitted;\n\t\t\t\t\t\tvalidator.prepareElement(element);\n\t\t\t\t\t\tvalidator.formSubmitted = submitted;\n\t\t\t\t\t\tvalidator.successList.push(element);\n\t\t\t\t\t\tvalidator.showErrors();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvar errors = {};\n\t\t\t\t\t\tvar message = response || validator.defaultMessage( element, \"remote\" );\n\t\t\t\t\t\terrors[element.name] = previous.message = $.isFunction(message) ? message(value) : message;\n\t\t\t\t\t\tvalidator.showErrors(errors);\n\t\t\t\t\t}\n\t\t\t\t\tprevious.valid = valid;\n\t\t\t\t\tvalidator.stopRequest(element, valid);\n\t\t\t\t}\n\t\t\t}, param));\n\t\t\treturn \"pending\";\n\t\t},\n\n\t\t// http://docs.jquery.com/Plugins/Validation/Methods/minlength\n\t\tminlength: function(value, element, param) {\n\t\t\treturn this.optional(element) || this.getLength($.trim(value), element) >= param;\n\t\t},\n\n\t\t// http://docs.jquery.com/Plugins/Validation/Methods/maxlength\n\t\tmaxlength: function(value, element, param) {\n\t\t\treturn this.optional(element) || this.getLength($.trim(value), element) <= param;\n\t\t},\n\n\t\t// http://docs.jquery.com/Plugins/Validation/Methods/rangelength\n\t\trangelength: function(value, element, param) {\n\t\t\tvar length = this.getLength($.trim(value), element);\n\t\t\treturn this.optional(element) || ( length >= param[0] && length <= param[1] );\n\t\t},\n\n\t\t// http://docs.jquery.com/Plugins/Validation/Methods/min\n\t\tmin: function( value, element, param ) {\n\t\t\treturn this.optional(element) || value >= param;\n\t\t},\n\n\t\t// http://docs.jquery.com/Plugins/Validation/Methods/max\n\t\tmax: function( value, element, param ) {\n\t\t\treturn this.optional(element) || value <= param;\n\t\t},\n\n\t\t// http://docs.jquery.com/Plugins/Validation/Methods/range\n\t\trange: function( value, element, param ) {\n\t\t\treturn this.optional(element) || ( value >= param[0] && value <= param[1] );\n\t\t},\n\n\t\t// http://docs.jquery.com/Plugins/Validation/Methods/email\n\t\temail: function(value, element) {\n\t\t\t// contributed by Scott Gonzalez: http://projects.scottsplayground.com/email_address_validation/\n\t\t\treturn this.optional(element) || /^((([a-z]|\\d|[!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])+(\\.([a-z]|\\d|[!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])+)*)|((\\x22)((((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(([\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x7f]|\\x21|[\\x23-\\x5b]|[\\x5d-\\x7e]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(\\\\([\\x01-\\x09\\x0b\\x0c\\x0d-\\x7f]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]))))*(((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(\\x22)))@((([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))\\.)+(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))$/i.test(value);\n\t\t},\n\n\t\t// http://docs.jquery.com/Plugins/Validation/Methods/url\n\t\turl: function(value, element) {\n\t\t\t// contributed by Scott Gonzalez: http://projects.scottsplayground.com/iri/\n\t\t\treturn this.optional(element) || /^(https?|ftp):\\/\\/(((([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&'\\(\\)\\*\\+,;=]|:)*@)?(((\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5]))|((([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))\\.)+(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))\\.?)(:\\d*)?)(\\/((([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&'\\(\\)\\*\\+,;=]|:|@)+(\\/(([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&'\\(\\)\\*\\+,;=]|:|@)*)*)?)?(\\?((([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&'\\(\\)\\*\\+,;=]|:|@)|[\\uE000-\\uF8FF]|\\/|\\?)*)?(\\#((([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&'\\(\\)\\*\\+,;=]|:|@)|\\/|\\?)*)?$/i.test(value);\n\t\t},\n\n\t\t// http://docs.jquery.com/Plugins/Validation/Methods/date\n\t\tdate: function(value, element) {\n\t\t\treturn this.optional(element) || !/Invalid|NaN/.test(new Date(value));\n\t\t},\n\n\t\t// http://docs.jquery.com/Plugins/Validation/Methods/dateISO\n\t\tdateISO: function(value, element) {\n\t\t\treturn this.optional(element) || /^\\d{4}[\\/-]\\d{1,2}[\\/-]\\d{1,2}$/.test(value);\n\t\t},\n\n\t\t// http://docs.jquery.com/Plugins/Validation/Methods/number\n\t\tnumber: function(value, element) {\n\t\t\treturn this.optional(element) || /^-?(?:\\d+|\\d{1,3}(?:,\\d{3})+)(?:\\.\\d+)?$/.test(value);\n\t\t},\n\n\t\t// http://docs.jquery.com/Plugins/Validation/Methods/digits\n\t\tdigits: function(value, element) {\n\t\t\treturn this.optional(element) || /^\\d+$/.test(value);\n\t\t},\n\n\t\t// http://docs.jquery.com/Plugins/Validation/Methods/creditcard\n\t\t// based on http://en.wikipedia.org/wiki/Luhn\n\t\tcreditcard: function(value, element) {\n\t\t\tif ( this.optional(element) )\n\t\t\t\treturn \"dependency-mismatch\";\n\t\t\t// accept only spaces, digits and dashes\n\t\t\tif (/[^0-9 -]+/.test(value))\n\t\t\t\treturn false;\n\t\t\tvar nCheck = 0,\n\t\t\t\tnDigit = 0,\n\t\t\t\tbEven = false;\n\n\t\t\tvalue = value.replace(/\\D/g, \"\");\n\n\t\t\tfor (var n = value.length - 1; n >= 0; n--) {\n\t\t\t\tvar cDigit = value.charAt(n);\n\t\t\t\tvar nDigit = parseInt(cDigit, 10);\n\t\t\t\tif (bEven) {\n\t\t\t\t\tif ((nDigit *= 2) > 9)\n\t\t\t\t\t\tnDigit -= 9;\n\t\t\t\t}\n\t\t\t\tnCheck += nDigit;\n\t\t\t\tbEven = !bEven;\n\t\t\t}\n\n\t\t\treturn (nCheck % 10) == 0;\n\t\t},\n\n\t\t// http://docs.jquery.com/Plugins/Validation/Methods/accept\n\t\taccept: function(value, element, param) {\n\t\t\tparam = typeof param == \"string\" ? param.replace(/,/g, '|') : \"png|jpe?g|gif\";\n\t\t\treturn this.optional(element) || value.match(new RegExp(\".(\" + param + \")$\", \"i\"));\n\t\t},\n\n\t\t// http://docs.jquery.com/Plugins/Validation/Methods/equalTo\n\t\tequalTo: function(value, element, param) {\n\t\t\t// bind to the blur event of the target in order to revalidate whenever the target field is updated\n\t\t\t// TODO find a way to bind the event just once, avoiding the unbind-rebind overhead\n\t\t\tvar target = $(param).unbind(\".validate-equalTo\").bind(\"blur.validate-equalTo\", function() {\n\t\t\t\t$(element).valid();\n\t\t\t});\n\t\t\treturn value == target.val();\n\t\t}\n\n\t}\n\n});\n\n// deprecated, use $.validator.format instead\n$.format = $.validator.format;\n\n})(jQuery);\n\n// ajax mode: abort\n// usage: $.ajax({ mode: \"abort\"[, port: \"uniqueport\"]});\n// if mode:\"abort\" is used, the previous request on that port (port can be undefined) is aborted via XMLHttpRequest.abort()\n;(function($) {\n\tvar pendingRequests = {};\n\t// Use a prefilter if available (1.5+)\n\tif ( $.ajaxPrefilter ) {\n\t\t$.ajaxPrefilter(function(settings, _, xhr) {\n\t\t\tvar port = settings.port;\n\t\t\tif (settings.mode == \"abort\") {\n\t\t\t\tif ( pendingRequests[port] ) {\n\t\t\t\t\tpendingRequests[port].abort();\n\t\t\t\t}\n\t\t\t\tpendingRequests[port] = xhr;\n\t\t\t}\n\t\t});\n\t} else {\n\t\t// Proxy ajax\n\t\tvar ajax = $.ajax;\n\t\t$.ajax = function(settings) {\n\t\t\tvar mode = ( \"mode\" in settings ? settings : $.ajaxSettings ).mode,\n\t\t\t\tport = ( \"port\" in settings ? settings : $.ajaxSettings ).port;\n\t\t\tif (mode == \"abort\") {\n\t\t\t\tif ( pendingRequests[port] ) {\n\t\t\t\t\tpendingRequests[port].abort();\n\t\t\t\t}\n\t\t\t\treturn (pendingRequests[port] = ajax.apply(this, arguments));\n\t\t\t}\n\t\t\treturn ajax.apply(this, arguments);\n\t\t};\n\t}\n})(jQuery);\n\n// provides cross-browser focusin and focusout events\n// IE has native support, in other browsers, use event caputuring (neither bubbles)\n\n// provides delegate(type: String, delegate: Selector, handler: Callback) plugin for easier event delegation\n// handler is only called when $(event.target).is(delegate), in the scope of the jquery-object for event.target\n;(function($) {\n\t// only implement if not provided by jQuery core (since 1.4)\n\t// TODO verify if jQuery 1.4's implementation is compatible with older jQuery special-event APIs\n\tif (!jQuery.event.special.focusin && !jQuery.event.special.focusout && document.addEventListener) {\n\t\t$.each({\n\t\t\tfocus: 'focusin',\n\t\t\tblur: 'focusout'\n\t\t}, function( original, fix ){\n\t\t\t$.event.special[fix] = {\n\t\t\t\tsetup:function() {\n\t\t\t\t\tthis.addEventListener( original, handler, true );\n\t\t\t\t},\n\t\t\t\tteardown:function() {\n\t\t\t\t\tthis.removeEventListener( original, handler, true );\n\t\t\t\t},\n\t\t\t\thandler: function(e) {\n\t\t\t\t\targuments[0] = $.event.fix(e);\n\t\t\t\t\targuments[0].type = fix;\n\t\t\t\t\treturn $.event.handle.apply(this, arguments);\n\t\t\t\t}\n\t\t\t};\n\t\t\tfunction handler(e) {\n\t\t\t\te = $.event.fix(e);\n\t\t\t\te.type = fix;\n\t\t\t\treturn $.event.handle.call(this, e);\n\t\t\t}\n\t\t});\n\t};\n\t$.extend($.fn, {\n\t\tvalidateDelegate: function(delegate, type, handler) {\n\t\t\treturn this.bind(type, function(event) {\n\t\t\t\tvar target = $(event.target);\n\t\t\t\tif (target.is(delegate)) {\n\t\t\t\t\treturn handler.apply(target, arguments);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t});\n})(jQuery);\n"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/DDDPPP.Chap20.CommandHandler.Presentation/Scripts/jquery.validate.unobtrusive.js",
    "content": "﻿/// <reference path=\"jquery-1.7.1.js\" />\n/// <reference path=\"jquery.validate.js\" />\n\n/*!\n** Unobtrusive validation support library for jQuery and jQuery Validate\n** Copyright (C) Microsoft Corporation. All rights reserved.\n*/\n\n/*jslint white: true, browser: true, onevar: true, undef: true, nomen: true, eqeqeq: true, plusplus: true, bitwise: true, regexp: true, newcap: true, immed: true, strict: false */\n/*global document: false, jQuery: false */\n\n(function ($) {\n    var $jQval = $.validator,\n        adapters,\n        data_validation = \"unobtrusiveValidation\";\n\n    function setValidationValues(options, ruleName, value) {\n        options.rules[ruleName] = value;\n        if (options.message) {\n            options.messages[ruleName] = options.message;\n        }\n    }\n\n    function splitAndTrim(value) {\n        return value.replace(/^\\s+|\\s+$/g, \"\").split(/\\s*,\\s*/g);\n    }\n\n    function getModelPrefix(fieldName) {\n        return fieldName.substr(0, fieldName.lastIndexOf(\".\") + 1);\n    }\n\n    function appendModelPrefix(value, prefix) {\n        if (value.indexOf(\"*.\") === 0) {\n            value = value.replace(\"*.\", prefix);\n        }\n        return value;\n    }\n\n    function onError(error, inputElement) {  // 'this' is the form element\n        var container = $(this).find(\"[data-valmsg-for='\" + inputElement[0].name + \"']\"),\n            replace = $.parseJSON(container.attr(\"data-valmsg-replace\")) !== false;\n\n        container.removeClass(\"field-validation-valid\").addClass(\"field-validation-error\");\n        error.data(\"unobtrusiveContainer\", container);\n\n        if (replace) {\n            container.empty();\n            error.removeClass(\"input-validation-error\").appendTo(container);\n        }\n        else {\n            error.hide();\n        }\n    }\n\n    function onErrors(form, validator) {  // 'this' is the form element\n        var container = $(this).find(\"[data-valmsg-summary=true]\"),\n            list = container.find(\"ul\");\n\n        if (list && list.length && validator.errorList.length) {\n            list.empty();\n            container.addClass(\"validation-summary-errors\").removeClass(\"validation-summary-valid\");\n\n            $.each(validator.errorList, function () {\n                $(\"<li />\").html(this.message).appendTo(list);\n            });\n        }\n    }\n\n    function onSuccess(error) {  // 'this' is the form element\n        var container = error.data(\"unobtrusiveContainer\"),\n            replace = $.parseJSON(container.attr(\"data-valmsg-replace\"));\n\n        if (container) {\n            container.addClass(\"field-validation-valid\").removeClass(\"field-validation-error\");\n            error.removeData(\"unobtrusiveContainer\");\n\n            if (replace) {\n                container.empty();\n            }\n        }\n    }\n\n    function validationInfo(form) {\n        var $form = $(form),\n            result = $form.data(data_validation);\n\n        if (!result) {\n            result = {\n                options: {  // options structure passed to jQuery Validate's validate() method\n                    errorClass: \"input-validation-error\",\n                    errorElement: \"span\",\n                    errorPlacement: $.proxy(onError, form),\n                    invalidHandler: $.proxy(onErrors, form),\n                    messages: {},\n                    rules: {},\n                    success: $.proxy(onSuccess, form)\n                },\n                attachValidation: function () {\n                    $form.validate(this.options);\n                },\n                validate: function () {  // a validation function that is called by unobtrusive Ajax\n                    $form.validate();\n                    return $form.valid();\n                }\n            };\n            $form.data(data_validation, result);\n        }\n\n        return result;\n    }\n\n    $jQval.unobtrusive = {\n        adapters: [],\n\n        parseElement: function (element, skipAttach) {\n            /// <summary>\n            /// Parses a single HTML element for unobtrusive validation attributes.\n            /// </summary>\n            /// <param name=\"element\" domElement=\"true\">The HTML element to be parsed.</param>\n            /// <param name=\"skipAttach\" type=\"Boolean\">[Optional] true to skip attaching the\n            /// validation to the form. If parsing just this single element, you should specify true.\n            /// If parsing several elements, you should specify false, and manually attach the validation\n            /// to the form when you are finished. The default is false.</param>\n            var $element = $(element),\n                form = $element.parents(\"form\")[0],\n                valInfo, rules, messages;\n\n            if (!form) {  // Cannot do client-side validation without a form\n                return;\n            }\n\n            valInfo = validationInfo(form);\n            valInfo.options.rules[element.name] = rules = {};\n            valInfo.options.messages[element.name] = messages = {};\n\n            $.each(this.adapters, function () {\n                var prefix = \"data-val-\" + this.name,\n                    message = $element.attr(prefix),\n                    paramValues = {};\n\n                if (message !== undefined) {  // Compare against undefined, because an empty message is legal (and falsy)\n                    prefix += \"-\";\n\n                    $.each(this.params, function () {\n                        paramValues[this] = $element.attr(prefix + this);\n                    });\n\n                    this.adapt({\n                        element: element,\n                        form: form,\n                        message: message,\n                        params: paramValues,\n                        rules: rules,\n                        messages: messages\n                    });\n                }\n            });\n\n            jQuery.extend(rules, { \"__dummy__\": true });\n\n            if (!skipAttach) {\n                valInfo.attachValidation();\n            }\n        },\n\n        parse: function (selector) {\n            /// <summary>\n            /// Parses all the HTML elements in the specified selector. It looks for input elements decorated\n            /// with the [data-val=true] attribute value and enables validation according to the data-val-*\n            /// attribute values.\n            /// </summary>\n            /// <param name=\"selector\" type=\"String\">Any valid jQuery selector.</param>\n            $(selector).find(\":input[data-val=true]\").each(function () {\n                $jQval.unobtrusive.parseElement(this, true);\n            });\n\n            $(\"form\").each(function () {\n                var info = validationInfo(this);\n                if (info) {\n                    info.attachValidation();\n                }\n            });\n        }\n    };\n\n    adapters = $jQval.unobtrusive.adapters;\n\n    adapters.add = function (adapterName, params, fn) {\n        /// <summary>Adds a new adapter to convert unobtrusive HTML into a jQuery Validate validation.</summary>\n        /// <param name=\"adapterName\" type=\"String\">The name of the adapter to be added. This matches the name used\n        /// in the data-val-nnnn HTML attribute (where nnnn is the adapter name).</param>\n        /// <param name=\"params\" type=\"Array\" optional=\"true\">[Optional] An array of parameter names (strings) that will\n        /// be extracted from the data-val-nnnn-mmmm HTML attributes (where nnnn is the adapter name, and\n        /// mmmm is the parameter name).</param>\n        /// <param name=\"fn\" type=\"Function\">The function to call, which adapts the values from the HTML\n        /// attributes into jQuery Validate rules and/or messages.</param>\n        /// <returns type=\"jQuery.validator.unobtrusive.adapters\" />\n        if (!fn) {  // Called with no params, just a function\n            fn = params;\n            params = [];\n        }\n        this.push({ name: adapterName, params: params, adapt: fn });\n        return this;\n    };\n\n    adapters.addBool = function (adapterName, ruleName) {\n        /// <summary>Adds a new adapter to convert unobtrusive HTML into a jQuery Validate validation, where\n        /// the jQuery Validate validation rule has no parameter values.</summary>\n        /// <param name=\"adapterName\" type=\"String\">The name of the adapter to be added. This matches the name used\n        /// in the data-val-nnnn HTML attribute (where nnnn is the adapter name).</param>\n        /// <param name=\"ruleName\" type=\"String\" optional=\"true\">[Optional] The name of the jQuery Validate rule. If not provided, the value\n        /// of adapterName will be used instead.</param>\n        /// <returns type=\"jQuery.validator.unobtrusive.adapters\" />\n        return this.add(adapterName, function (options) {\n            setValidationValues(options, ruleName || adapterName, true);\n        });\n    };\n\n    adapters.addMinMax = function (adapterName, minRuleName, maxRuleName, minMaxRuleName, minAttribute, maxAttribute) {\n        /// <summary>Adds a new adapter to convert unobtrusive HTML into a jQuery Validate validation, where\n        /// the jQuery Validate validation has three potential rules (one for min-only, one for max-only, and\n        /// one for min-and-max). The HTML parameters are expected to be named -min and -max.</summary>\n        /// <param name=\"adapterName\" type=\"String\">The name of the adapter to be added. This matches the name used\n        /// in the data-val-nnnn HTML attribute (where nnnn is the adapter name).</param>\n        /// <param name=\"minRuleName\" type=\"String\">The name of the jQuery Validate rule to be used when you only\n        /// have a minimum value.</param>\n        /// <param name=\"maxRuleName\" type=\"String\">The name of the jQuery Validate rule to be used when you only\n        /// have a maximum value.</param>\n        /// <param name=\"minMaxRuleName\" type=\"String\">The name of the jQuery Validate rule to be used when you\n        /// have both a minimum and maximum value.</param>\n        /// <param name=\"minAttribute\" type=\"String\" optional=\"true\">[Optional] The name of the HTML attribute that\n        /// contains the minimum value. The default is \"min\".</param>\n        /// <param name=\"maxAttribute\" type=\"String\" optional=\"true\">[Optional] The name of the HTML attribute that\n        /// contains the maximum value. The default is \"max\".</param>\n        /// <returns type=\"jQuery.validator.unobtrusive.adapters\" />\n        return this.add(adapterName, [minAttribute || \"min\", maxAttribute || \"max\"], function (options) {\n            var min = options.params.min,\n                max = options.params.max;\n\n            if (min && max) {\n                setValidationValues(options, minMaxRuleName, [min, max]);\n            }\n            else if (min) {\n                setValidationValues(options, minRuleName, min);\n            }\n            else if (max) {\n                setValidationValues(options, maxRuleName, max);\n            }\n        });\n    };\n\n    adapters.addSingleVal = function (adapterName, attribute, ruleName) {\n        /// <summary>Adds a new adapter to convert unobtrusive HTML into a jQuery Validate validation, where\n        /// the jQuery Validate validation rule has a single value.</summary>\n        /// <param name=\"adapterName\" type=\"String\">The name of the adapter to be added. This matches the name used\n        /// in the data-val-nnnn HTML attribute(where nnnn is the adapter name).</param>\n        /// <param name=\"attribute\" type=\"String\">[Optional] The name of the HTML attribute that contains the value.\n        /// The default is \"val\".</param>\n        /// <param name=\"ruleName\" type=\"String\" optional=\"true\">[Optional] The name of the jQuery Validate rule. If not provided, the value\n        /// of adapterName will be used instead.</param>\n        /// <returns type=\"jQuery.validator.unobtrusive.adapters\" />\n        return this.add(adapterName, [attribute || \"val\"], function (options) {\n            setValidationValues(options, ruleName || adapterName, options.params[attribute]);\n        });\n    };\n\n    $jQval.addMethod(\"__dummy__\", function (value, element, params) {\n        return true;\n    });\n\n    $jQval.addMethod(\"regex\", function (value, element, params) {\n        var match;\n        if (this.optional(element)) {\n            return true;\n        }\n\n        match = new RegExp(params).exec(value);\n        return (match && (match.index === 0) && (match[0].length === value.length));\n    });\n\n    adapters.addSingleVal(\"accept\", \"exts\").addSingleVal(\"regex\", \"pattern\");\n    adapters.addBool(\"creditcard\").addBool(\"date\").addBool(\"digits\").addBool(\"email\").addBool(\"number\").addBool(\"url\");\n    adapters.addMinMax(\"length\", \"minlength\", \"maxlength\", \"rangelength\").addMinMax(\"range\", \"min\", \"max\", \"range\");\n    adapters.add(\"equalto\", [\"other\"], function (options) {\n        var prefix = getModelPrefix(options.element.name),\n            other = options.params.other,\n            fullOtherName = appendModelPrefix(other, prefix),\n            element = $(options.form).find(\":input[name=\" + fullOtherName + \"]\")[0];\n\n        setValidationValues(options, \"equalTo\", element);\n    });\n    adapters.add(\"required\", function (options) {\n        // jQuery Validate equates \"required\" with \"mandatory\" for checkbox elements\n        if (options.element.tagName.toUpperCase() !== \"INPUT\" || options.element.type.toUpperCase() !== \"CHECKBOX\") {\n            setValidationValues(options, \"required\", true);\n        }\n    });\n    adapters.add(\"remote\", [\"url\", \"type\", \"additionalfields\"], function (options) {\n        var value = {\n            url: options.params.url,\n            type: options.params.type || \"GET\",\n            data: {}\n        },\n            prefix = getModelPrefix(options.element.name);\n\n        $.each(splitAndTrim(options.params.additionalfields || options.element.name), function (i, fieldName) {\n            var paramName = appendModelPrefix(fieldName, prefix);\n            value.data[paramName] = function () {\n                return $(options.form).find(\":input[name='\" + paramName + \"']\").val();\n            };\n        });\n\n        setValidationValues(options, \"remote\", value);\n    });\n\n    $(function () {\n        $jQval.unobtrusive.parse(document);\n    });\n}(jQuery));"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/DDDPPP.Chap20.CommandHandler.Presentation/Scripts/modernizr-2.5.3.js",
    "content": "/*!\n * Modernizr v2.5.3\n * www.modernizr.com\n *\n * Copyright (c) Faruk Ates, Paul Irish, Alex Sexton\n * Available under the BSD and MIT licenses: www.modernizr.com/license/\n */\n\n/*\n * Modernizr tests which native CSS3 and HTML5 features are available in\n * the current UA and makes the results available to you in two ways:\n * as properties on a global Modernizr object, and as classes on the\n * <html> element. This information allows you to progressively enhance\n * your pages with a granular level of control over the experience.\n *\n * Modernizr has an optional (not included) conditional resource loader\n * called Modernizr.load(), based on Yepnope.js (yepnopejs.com).\n * To get a build that includes Modernizr.load(), as well as choosing\n * which tests to include, go to www.modernizr.com/download/\n *\n * Authors        Faruk Ates, Paul Irish, Alex Sexton\n * Contributors   Ryan Seddon, Ben Alman\n */\n\nwindow.Modernizr = (function( window, document, undefined ) {\n\n    var version = '2.5.3',\n\n    Modernizr = {},\n    \n    // option for enabling the HTML classes to be added\n    enableClasses = true,\n\n    docElement = document.documentElement,\n\n    /**\n     * Create our \"modernizr\" element that we do most feature tests on.\n     */\n    mod = 'modernizr',\n    modElem = document.createElement(mod),\n    mStyle = modElem.style,\n\n    /**\n     * Create the input element for various Web Forms feature tests.\n     */\n    inputElem = document.createElement('input'),\n\n    smile = ':)',\n\n    toString = {}.toString,\n\n    // List of property values to set for css tests. See ticket #21\n    prefixes = ' -webkit- -moz- -o- -ms- '.split(' '),\n\n    // Following spec is to expose vendor-specific style properties as:\n    //   elem.style.WebkitBorderRadius\n    // and the following would be incorrect:\n    //   elem.style.webkitBorderRadius\n\n    // Webkit ghosts their properties in lowercase but Opera & Moz do not.\n    // Microsoft uses a lowercase `ms` instead of the correct `Ms` in IE8+\n    //   erik.eae.net/archives/2008/03/10/21.48.10/\n\n    // More here: github.com/Modernizr/Modernizr/issues/issue/21\n    omPrefixes = 'Webkit Moz O ms',\n\n    cssomPrefixes = omPrefixes.split(' '),\n\n    domPrefixes = omPrefixes.toLowerCase().split(' '),\n\n    ns = {'svg': 'http://www.w3.org/2000/svg'},\n\n    tests = {},\n    inputs = {},\n    attrs = {},\n\n    classes = [],\n\n    slice = classes.slice,\n\n    featureName, // used in testing loop\n\n\n    // Inject element with style element and some CSS rules\n    injectElementWithStyles = function( rule, callback, nodes, testnames ) {\n\n      var style, ret, node,\n          div = document.createElement('div'),\n          // After page load injecting a fake body doesn't work so check if body exists\n          body = document.body, \n          // IE6 and 7 won't return offsetWidth or offsetHeight unless it's in the body element, so we fake it.\n          fakeBody = body ? body : document.createElement('body');\n\n      if ( parseInt(nodes, 10) ) {\n          // In order not to give false positives we create a node for each test\n          // This also allows the method to scale for unspecified uses\n          while ( nodes-- ) {\n              node = document.createElement('div');\n              node.id = testnames ? testnames[nodes] : mod + (nodes + 1);\n              div.appendChild(node);\n          }\n      }\n\n      // <style> elements in IE6-9 are considered 'NoScope' elements and therefore will be removed\n      // when injected with innerHTML. To get around this you need to prepend the 'NoScope' element\n      // with a 'scoped' element, in our case the soft-hyphen entity as it won't mess with our measurements.\n      // msdn.microsoft.com/en-us/library/ms533897%28VS.85%29.aspx\n      // Documents served as xml will throw if using &shy; so use xml friendly encoded version. See issue #277\n      style = ['&#173;','<style>', rule, '</style>'].join('');\n      div.id = mod;\n      // IE6 will false positive on some tests due to the style element inside the test div somehow interfering offsetHeight, so insert it into body or fakebody.\n      // Opera will act all quirky when injecting elements in documentElement when page is served as xml, needs fakebody too. #270\n      fakeBody.innerHTML += style;\n      fakeBody.appendChild(div);\n      if(!body){\n          //avoid crashing IE8, if background image is used\n          fakeBody.style.background = \"\";\n          docElement.appendChild(fakeBody);\n      }\n\n      ret = callback(div, rule);\n      // If this is done after page load we don't want to remove the body so check if body exists\n      !body ? fakeBody.parentNode.removeChild(fakeBody) : div.parentNode.removeChild(div);\n\n      return !!ret;\n\n    },\n\n\n    // adapted from matchMedia polyfill\n    // by Scott Jehl and Paul Irish\n    // gist.github.com/786768\n    testMediaQuery = function( mq ) {\n\n      var matchMedia = window.matchMedia || window.msMatchMedia;\n      if ( matchMedia ) {\n        return matchMedia(mq).matches;\n      }\n\n      var bool;\n\n      injectElementWithStyles('@media ' + mq + ' { #' + mod + ' { position: absolute; } }', function( node ) {\n        bool = (window.getComputedStyle ?\n                  getComputedStyle(node, null) :\n                  node.currentStyle)['position'] == 'absolute';\n      });\n\n      return bool;\n\n     },\n\n\n    /**\n      * isEventSupported determines if a given element supports the given event\n      * function from yura.thinkweb2.com/isEventSupported/\n      */\n    isEventSupported = (function() {\n\n      var TAGNAMES = {\n        'select': 'input', 'change': 'input',\n        'submit': 'form', 'reset': 'form',\n        'error': 'img', 'load': 'img', 'abort': 'img'\n      };\n\n      function isEventSupported( eventName, element ) {\n\n        element = element || document.createElement(TAGNAMES[eventName] || 'div');\n        eventName = 'on' + eventName;\n\n        // When using `setAttribute`, IE skips \"unload\", WebKit skips \"unload\" and \"resize\", whereas `in` \"catches\" those\n        var isSupported = eventName in element;\n\n        if ( !isSupported ) {\n          // If it has no `setAttribute` (i.e. doesn't implement Node interface), try generic element\n          if ( !element.setAttribute ) {\n            element = document.createElement('div');\n          }\n          if ( element.setAttribute && element.removeAttribute ) {\n            element.setAttribute(eventName, '');\n            isSupported = is(element[eventName], 'function');\n\n            // If property was created, \"remove it\" (by setting value to `undefined`)\n            if ( !is(element[eventName], 'undefined') ) {\n              element[eventName] = undefined;\n            }\n            element.removeAttribute(eventName);\n          }\n        }\n\n        element = null;\n        return isSupported;\n      }\n      return isEventSupported;\n    })();\n\n    // hasOwnProperty shim by kangax needed for Safari 2.0 support\n    var _hasOwnProperty = ({}).hasOwnProperty, hasOwnProperty;\n    if ( !is(_hasOwnProperty, 'undefined') && !is(_hasOwnProperty.call, 'undefined') ) {\n      hasOwnProperty = function (object, property) {\n        return _hasOwnProperty.call(object, property);\n      };\n    }\n    else {\n      hasOwnProperty = function (object, property) { /* yes, this can give false positives/negatives, but most of the time we don't care about those */\n        return ((property in object) && is(object.constructor.prototype[property], 'undefined'));\n      };\n    }\n\n    // Taken from ES5-shim https://github.com/kriskowal/es5-shim/blob/master/es5-shim.js\n    // ES-5 15.3.4.5\n    // http://es5.github.com/#x15.3.4.5\n\n    if (!Function.prototype.bind) {\n      \n      Function.prototype.bind = function bind(that) {\n        \n        var target = this;\n        \n        if (typeof target != \"function\") {\n            throw new TypeError();\n        }\n        \n        var args = slice.call(arguments, 1),\n            bound = function () {\n\n            if (this instanceof bound) {\n              \n              var F = function(){};\n              F.prototype = target.prototype;\n              var self = new F;\n\n              var result = target.apply(\n                  self,\n                  args.concat(slice.call(arguments))\n              );\n              if (Object(result) === result) {\n                  return result;\n              }\n              return self;\n\n            } else {\n              \n              return target.apply(\n                  that,\n                  args.concat(slice.call(arguments))\n              );\n\n            }\n\n        };\n        \n        return bound;\n      };\n    }\n\n    /**\n     * setCss applies given styles to the Modernizr DOM node.\n     */\n    function setCss( str ) {\n        mStyle.cssText = str;\n    }\n\n    /**\n     * setCssAll extrapolates all vendor-specific css strings.\n     */\n    function setCssAll( str1, str2 ) {\n        return setCss(prefixes.join(str1 + ';') + ( str2 || '' ));\n    }\n\n    /**\n     * is returns a boolean for if typeof obj is exactly type.\n     */\n    function is( obj, type ) {\n        return typeof obj === type;\n    }\n\n    /**\n     * contains returns a boolean for if substr is found within str.\n     */\n    function contains( str, substr ) {\n        return !!~('' + str).indexOf(substr);\n    }\n\n    /**\n     * testProps is a generic CSS / DOM property test; if a browser supports\n     *   a certain property, it won't return undefined for it.\n     *   A supported CSS property returns empty string when its not yet set.\n     */\n    function testProps( props, prefixed ) {\n        for ( var i in props ) {\n            if ( mStyle[ props[i] ] !== undefined ) {\n                return prefixed == 'pfx' ? props[i] : true;\n            }\n        }\n        return false;\n    }\n\n    /**\n     * testDOMProps is a generic DOM property test; if a browser supports\n     *   a certain property, it won't return undefined for it.\n     */\n    function testDOMProps( props, obj, elem ) {\n        for ( var i in props ) {\n            var item = obj[props[i]];\n            if ( item !== undefined) {\n\n                // return the property name as a string\n                if (elem === false) return props[i];\n\n                // let's bind a function\n                if (is(item, 'function')){\n                  // default to autobind unless override\n                  return item.bind(elem || obj);\n                }\n                \n                // return the unbound function or obj or value\n                return item;\n            }\n        }\n        return false;\n    }\n\n    /**\n     * testPropsAll tests a list of DOM properties we want to check against.\n     *   We specify literally ALL possible (known and/or likely) properties on\n     *   the element including the non-vendor prefixed one, for forward-\n     *   compatibility.\n     */\n    function testPropsAll( prop, prefixed, elem ) {\n\n        var ucProp  = prop.charAt(0).toUpperCase() + prop.substr(1),\n            props   = (prop + ' ' + cssomPrefixes.join(ucProp + ' ') + ucProp).split(' ');\n\n        // did they call .prefixed('boxSizing') or are we just testing a prop?\n        if(is(prefixed, \"string\") || is(prefixed, \"undefined\")) {\n          return testProps(props, prefixed);\n\n        // otherwise, they called .prefixed('requestAnimationFrame', window[, elem])\n        } else {\n          props = (prop + ' ' + (domPrefixes).join(ucProp + ' ') + ucProp).split(' ');\n          return testDOMProps(props, prefixed, elem);\n        }\n    }\n\n    /**\n     * testBundle tests a list of CSS features that require element and style injection.\n     *   By bundling them together we can reduce the need to touch the DOM multiple times.\n     */\n    /*>>testBundle*/\n    var testBundle = (function( styles, tests ) {\n        var style = styles.join(''),\n            len = tests.length;\n\n        injectElementWithStyles(style, function( node, rule ) {\n            var style = document.styleSheets[document.styleSheets.length - 1],\n                // IE8 will bork if you create a custom build that excludes both fontface and generatedcontent tests.\n                // So we check for cssRules and that there is a rule available\n                // More here: github.com/Modernizr/Modernizr/issues/288 & github.com/Modernizr/Modernizr/issues/293\n                cssText = style ? (style.cssRules && style.cssRules[0] ? style.cssRules[0].cssText : style.cssText || '') : '',\n                children = node.childNodes, hash = {};\n\n            while ( len-- ) {\n                hash[children[len].id] = children[len];\n            }\n\n             /*>>touch*/          Modernizr['touch'] = ('ontouchstart' in window) || window.DocumentTouch && document instanceof DocumentTouch || (hash['touch'] && hash['touch'].offsetTop) === 9; /*>>touch*/\n            /*>>csstransforms3d*/ Modernizr['csstransforms3d'] = (hash['csstransforms3d'] && hash['csstransforms3d'].offsetLeft) === 9 && hash['csstransforms3d'].offsetHeight === 3;          /*>>csstransforms3d*/\n            /*>>generatedcontent*/Modernizr['generatedcontent'] = (hash['generatedcontent'] && hash['generatedcontent'].offsetHeight) >= 1;       /*>>generatedcontent*/\n            /*>>fontface*/        Modernizr['fontface'] = /src/i.test(cssText) &&\n                                                                  cssText.indexOf(rule.split(' ')[0]) === 0;        /*>>fontface*/\n        }, len, tests);\n\n    })([\n        // Pass in styles to be injected into document\n        /*>>fontface*/        '@font-face {font-family:\"font\";src:url(\"https://\")}'         /*>>fontface*/\n        \n        /*>>touch*/           ,['@media (',prefixes.join('touch-enabled),('),mod,')',\n                                '{#touch{top:9px;position:absolute}}'].join('')           /*>>touch*/\n                                \n        /*>>csstransforms3d*/ ,['@media (',prefixes.join('transform-3d),('),mod,')',\n                                '{#csstransforms3d{left:9px;position:absolute;height:3px;}}'].join('')/*>>csstransforms3d*/\n                                \n        /*>>generatedcontent*/,['#generatedcontent:after{content:\"',smile,'\";visibility:hidden}'].join('')  /*>>generatedcontent*/\n    ],\n      [\n        /*>>fontface*/        'fontface'          /*>>fontface*/\n        /*>>touch*/           ,'touch'            /*>>touch*/\n        /*>>csstransforms3d*/ ,'csstransforms3d'  /*>>csstransforms3d*/\n        /*>>generatedcontent*/,'generatedcontent' /*>>generatedcontent*/\n        \n    ]);/*>>testBundle*/\n\n\n    /**\n     * Tests\n     * -----\n     */\n\n    // The *new* flexbox\n    // dev.w3.org/csswg/css3-flexbox\n\n    tests['flexbox'] = function() {\n      return testPropsAll('flexOrder');\n    };\n\n    // The *old* flexbox\n    // www.w3.org/TR/2009/WD-css3-flexbox-20090723/\n\n    tests['flexbox-legacy'] = function() {\n        return testPropsAll('boxDirection');\n    };\n\n    // On the S60 and BB Storm, getContext exists, but always returns undefined\n    // so we actually have to call getContext() to verify\n    // github.com/Modernizr/Modernizr/issues/issue/97/\n\n    tests['canvas'] = function() {\n        var elem = document.createElement('canvas');\n        return !!(elem.getContext && elem.getContext('2d'));\n    };\n\n    tests['canvastext'] = function() {\n        return !!(Modernizr['canvas'] && is(document.createElement('canvas').getContext('2d').fillText, 'function'));\n    };\n\n    // this test initiates a new webgl context. \n    // webk.it/70117 is tracking a legit feature detect proposal\n    \n    tests['webgl'] = function() {\n        try {\n            var canvas = document.createElement('canvas'),\n                ret;\n            ret = !!(window.WebGLRenderingContext && (canvas.getContext('experimental-webgl') || canvas.getContext('webgl')));\n            canvas = undefined;\n        } catch (e){\n            ret = false;\n        }\n        return ret;\n    };\n\n    /*\n     * The Modernizr.touch test only indicates if the browser supports\n     *    touch events, which does not necessarily reflect a touchscreen\n     *    device, as evidenced by tablets running Windows 7 or, alas,\n     *    the Palm Pre / WebOS (touch) phones.\n     *\n     * Additionally, Chrome (desktop) used to lie about its support on this,\n     *    but that has since been rectified: crbug.com/36415\n     *\n     * We also test for Firefox 4 Multitouch Support.\n     *\n     * For more info, see: modernizr.github.com/Modernizr/touch.html\n     */\n\n    tests['touch'] = function() {\n        return Modernizr['touch'];\n    };\n\n    /**\n     * geolocation tests for the new Geolocation API specification.\n     *   This test is a standards compliant-only test; for more complete\n     *   testing, including a Google Gears fallback, please see:\n     *   code.google.com/p/geo-location-javascript/\n     * or view a fallback solution using google's geo API:\n     *   gist.github.com/366184\n     */\n    tests['geolocation'] = function() {\n        return !!navigator.geolocation;\n    };\n\n    // Per 1.6:\n    // This used to be Modernizr.crosswindowmessaging but the longer\n    // name has been deprecated in favor of a shorter and property-matching one.\n    // The old API is still available in 1.6, but as of 2.0 will throw a warning,\n    // and in the first release thereafter disappear entirely.\n    tests['postmessage'] = function() {\n      return !!window.postMessage;\n    };\n\n\n    // Chrome incognito mode used to throw an exception when using openDatabase \n    // It doesn't anymore.\n    tests['websqldatabase'] = function() {\n      return !!window.openDatabase;\n    };\n\n    // Vendors had inconsistent prefixing with the experimental Indexed DB:\n    // - Webkit's implementation is accessible through webkitIndexedDB\n    // - Firefox shipped moz_indexedDB before FF4b9, but since then has been mozIndexedDB\n    // For speed, we don't test the legacy (and beta-only) indexedDB\n    tests['indexedDB'] = function() {\n      return !!testPropsAll(\"indexedDB\",window);\n    };\n\n    // documentMode logic from YUI to filter out IE8 Compat Mode\n    //   which false positives.\n    tests['hashchange'] = function() {\n      return isEventSupported('hashchange', window) && (document.documentMode === undefined || document.documentMode > 7);\n    };\n\n    // Per 1.6:\n    // This used to be Modernizr.historymanagement but the longer\n    // name has been deprecated in favor of a shorter and property-matching one.\n    // The old API is still available in 1.6, but as of 2.0 will throw a warning,\n    // and in the first release thereafter disappear entirely.\n    tests['history'] = function() {\n      return !!(window.history && history.pushState);\n    };\n\n    tests['draganddrop'] = function() {\n        var div = document.createElement('div');\n        return ('draggable' in div) || ('ondragstart' in div && 'ondrop' in div);\n    };\n\n    // FIXME: Once FF10 is sunsetted, we can drop prefixed MozWebSocket\n    // bugzil.la/695635\n    tests['websockets'] = function() {\n        for ( var i = -1, len = cssomPrefixes.length; ++i < len; ){\n          if ( window[cssomPrefixes[i] + 'WebSocket'] ){\n            return true;\n          }\n        }\n        return 'WebSocket' in window;\n    };\n\n\n    // css-tricks.com/rgba-browser-support/\n    tests['rgba'] = function() {\n        // Set an rgba() color and check the returned value\n\n        setCss('background-color:rgba(150,255,150,.5)');\n\n        return contains(mStyle.backgroundColor, 'rgba');\n    };\n\n    tests['hsla'] = function() {\n        // Same as rgba(), in fact, browsers re-map hsla() to rgba() internally,\n        //   except IE9 who retains it as hsla\n\n        setCss('background-color:hsla(120,40%,100%,.5)');\n\n        return contains(mStyle.backgroundColor, 'rgba') || contains(mStyle.backgroundColor, 'hsla');\n    };\n\n    tests['multiplebgs'] = function() {\n        // Setting multiple images AND a color on the background shorthand property\n        //  and then querying the style.background property value for the number of\n        //  occurrences of \"url(\" is a reliable method for detecting ACTUAL support for this!\n\n        setCss('background:url(https://),url(https://),red url(https://)');\n\n        // If the UA supports multiple backgrounds, there should be three occurrences\n        //   of the string \"url(\" in the return value for elemStyle.background\n\n        return /(url\\s*\\(.*?){3}/.test(mStyle.background);\n    };\n\n\n    // In testing support for a given CSS property, it's legit to test:\n    //    `elem.style[styleName] !== undefined`\n    // If the property is supported it will return an empty string,\n    // if unsupported it will return undefined.\n\n    // We'll take advantage of this quick test and skip setting a style\n    // on our modernizr element, but instead just testing undefined vs\n    // empty string.\n\n\n    tests['backgroundsize'] = function() {\n        return testPropsAll('backgroundSize');\n    };\n\n    tests['borderimage'] = function() {\n        return testPropsAll('borderImage');\n    };\n\n\n    // Super comprehensive table about all the unique implementations of\n    // border-radius: muddledramblings.com/table-of-css3-border-radius-compliance\n\n    tests['borderradius'] = function() {\n        return testPropsAll('borderRadius');\n    };\n\n    // WebOS unfortunately false positives on this test.\n    tests['boxshadow'] = function() {\n        return testPropsAll('boxShadow');\n    };\n\n    // FF3.0 will false positive on this test\n    tests['textshadow'] = function() {\n        return document.createElement('div').style.textShadow === '';\n    };\n\n\n    tests['opacity'] = function() {\n        // Browsers that actually have CSS Opacity implemented have done so\n        //  according to spec, which means their return values are within the\n        //  range of [0.0,1.0] - including the leading zero.\n\n        setCssAll('opacity:.55');\n\n        // The non-literal . in this regex is intentional:\n        //   German Chrome returns this value as 0,55\n        // github.com/Modernizr/Modernizr/issues/#issue/59/comment/516632\n        return /^0.55$/.test(mStyle.opacity);\n    };\n\n\n    // Note, Android < 4 will pass this test, but can only animate \n    //   a single property at a time\n    //   daneden.me/2011/12/putting-up-with-androids-bullshit/\n    tests['cssanimations'] = function() {\n        return testPropsAll('animationName');\n    };\n\n\n    tests['csscolumns'] = function() {\n        return testPropsAll('columnCount');\n    };\n\n\n    tests['cssgradients'] = function() {\n        /**\n         * For CSS Gradients syntax, please see:\n         * webkit.org/blog/175/introducing-css-gradients/\n         * developer.mozilla.org/en/CSS/-moz-linear-gradient\n         * developer.mozilla.org/en/CSS/-moz-radial-gradient\n         * dev.w3.org/csswg/css3-images/#gradients-\n         */\n\n        var str1 = 'background-image:',\n            str2 = 'gradient(linear,left top,right bottom,from(#9f9),to(white));',\n            str3 = 'linear-gradient(left top,#9f9, white);';\n\n        setCss(\n             // legacy webkit syntax (FIXME: remove when syntax not in use anymore)\n              (str1 + '-webkit- '.split(' ').join(str2 + str1) \n             // standard syntax             // trailing 'background-image:' \n              + prefixes.join(str3 + str1)).slice(0, -str1.length)\n        );\n\n        return contains(mStyle.backgroundImage, 'gradient');\n    };\n\n\n    tests['cssreflections'] = function() {\n        return testPropsAll('boxReflect');\n    };\n\n\n    tests['csstransforms'] = function() {\n        return !!testPropsAll('transform');\n    };\n\n\n    tests['csstransforms3d'] = function() {\n\n        var ret = !!testPropsAll('perspective');\n\n        // Webkit's 3D transforms are passed off to the browser's own graphics renderer.\n        //   It works fine in Safari on Leopard and Snow Leopard, but not in Chrome in\n        //   some conditions. As a result, Webkit typically recognizes the syntax but\n        //   will sometimes throw a false positive, thus we must do a more thorough check:\n        if ( ret && 'webkitPerspective' in docElement.style ) {\n\n          // Webkit allows this media query to succeed only if the feature is enabled.\n          // `@media (transform-3d),(-o-transform-3d),(-moz-transform-3d),(-ms-transform-3d),(-webkit-transform-3d),(modernizr){ ... }`\n          ret = Modernizr['csstransforms3d'];\n        }\n        return ret;\n    };\n\n\n    tests['csstransitions'] = function() {\n        return testPropsAll('transition');\n    };\n\n\n    /*>>fontface*/\n    // @font-face detection routine by Diego Perini\n    // javascript.nwbox.com/CSSSupport/\n\n    // false positives in WebOS: github.com/Modernizr/Modernizr/issues/342\n    tests['fontface'] = function() {\n        return Modernizr['fontface'];\n    };\n    /*>>fontface*/\n\n    // CSS generated content detection\n    tests['generatedcontent'] = function() {\n        return Modernizr['generatedcontent'];\n    };\n\n\n\n    // These tests evaluate support of the video/audio elements, as well as\n    // testing what types of content they support.\n    //\n    // We're using the Boolean constructor here, so that we can extend the value\n    // e.g.  Modernizr.video     // true\n    //       Modernizr.video.ogg // 'probably'\n    //\n    // Codec values from : github.com/NielsLeenheer/html5test/blob/9106a8/index.html#L845\n    //                     thx to NielsLeenheer and zcorpan\n\n    // Note: in some older browsers, \"no\" was a return value instead of empty string.\n    //   It was live in FF3.5.0 and 3.5.1, but fixed in 3.5.2\n    //   It was also live in Safari 4.0.0 - 4.0.4, but fixed in 4.0.5\n\n    tests['video'] = function() {\n        var elem = document.createElement('video'),\n            bool = false;\n            \n        // IE9 Running on Windows Server SKU can cause an exception to be thrown, bug #224\n        try {\n            if ( bool = !!elem.canPlayType ) {\n                bool      = new Boolean(bool);\n                bool.ogg  = elem.canPlayType('video/ogg; codecs=\"theora\"')      .replace(/^no$/,'');\n\n                bool.h264 = elem.canPlayType('video/mp4; codecs=\"avc1.42E01E\"') .replace(/^no$/,'');\n\n                bool.webm = elem.canPlayType('video/webm; codecs=\"vp8, vorbis\"').replace(/^no$/,'');\n            }\n            \n        } catch(e) { }\n        \n        return bool;\n    };\n\n    tests['audio'] = function() {\n        var elem = document.createElement('audio'),\n            bool = false;\n\n        try { \n            if ( bool = !!elem.canPlayType ) {\n                bool      = new Boolean(bool);\n                bool.ogg  = elem.canPlayType('audio/ogg; codecs=\"vorbis\"').replace(/^no$/,'');\n                bool.mp3  = elem.canPlayType('audio/mpeg;')               .replace(/^no$/,'');\n\n                // Mimetypes accepted:\n                //   developer.mozilla.org/En/Media_formats_supported_by_the_audio_and_video_elements\n                //   bit.ly/iphoneoscodecs\n                bool.wav  = elem.canPlayType('audio/wav; codecs=\"1\"')     .replace(/^no$/,'');\n                bool.m4a  = ( elem.canPlayType('audio/x-m4a;')            || \n                              elem.canPlayType('audio/aac;'))             .replace(/^no$/,'');\n            }\n        } catch(e) { }\n        \n        return bool;\n    };\n\n\n    // In FF4, if disabled, window.localStorage should === null.\n\n    // Normally, we could not test that directly and need to do a\n    //   `('localStorage' in window) && ` test first because otherwise Firefox will\n    //   throw bugzil.la/365772 if cookies are disabled\n\n    // Also in iOS5 Private Browsing mode, attepting to use localStorage.setItem\n    // will throw the exception:\n    //   QUOTA_EXCEEDED_ERRROR DOM Exception 22.\n    // Peculiarly, getItem and removeItem calls do not throw.\n\n    // Because we are forced to try/catch this, we'll go aggressive.\n\n    // Just FWIW: IE8 Compat mode supports these features completely:\n    //   www.quirksmode.org/dom/html5.html\n    // But IE8 doesn't support either with local files\n\n    tests['localstorage'] = function() {\n        try {\n            localStorage.setItem(mod, mod);\n            localStorage.removeItem(mod);\n            return true;\n        } catch(e) {\n            return false;\n        }\n    };\n\n    tests['sessionstorage'] = function() {\n        try {\n            sessionStorage.setItem(mod, mod);\n            sessionStorage.removeItem(mod);\n            return true;\n        } catch(e) {\n            return false;\n        }\n    };\n\n\n    tests['webworkers'] = function() {\n        return !!window.Worker;\n    };\n\n\n    tests['applicationcache'] = function() {\n        return !!window.applicationCache;\n    };\n\n\n    // Thanks to Erik Dahlstrom\n    tests['svg'] = function() {\n        return !!document.createElementNS && !!document.createElementNS(ns.svg, 'svg').createSVGRect;\n    };\n\n    // specifically for SVG inline in HTML, not within XHTML\n    // test page: paulirish.com/demo/inline-svg\n    tests['inlinesvg'] = function() {\n      var div = document.createElement('div');\n      div.innerHTML = '<svg/>';\n      return (div.firstChild && div.firstChild.namespaceURI) == ns.svg;\n    };\n\n    // SVG SMIL animation\n    tests['smil'] = function() {\n        return !!document.createElementNS && /SVGAnimate/.test(toString.call(document.createElementNS(ns.svg, 'animate')));\n    };\n\n    // This test is only for clip paths in SVG proper, not clip paths on HTML content\n    // demo: srufaculty.sru.edu/david.dailey/svg/newstuff/clipPath4.svg\n\n    // However read the comments to dig into applying SVG clippaths to HTML content here:\n    //   github.com/Modernizr/Modernizr/issues/213#issuecomment-1149491\n    tests['svgclippaths'] = function() {\n        return !!document.createElementNS && /SVGClipPath/.test(toString.call(document.createElementNS(ns.svg, 'clipPath')));\n    };\n\n    // input features and input types go directly onto the ret object, bypassing the tests loop.\n    // Hold this guy to execute in a moment.\n    function webforms() {\n        // Run through HTML5's new input attributes to see if the UA understands any.\n        // We're using f which is the <input> element created early on\n        // Mike Taylr has created a comprehensive resource for testing these attributes\n        //   when applied to all input types:\n        //   miketaylr.com/code/input-type-attr.html\n        // spec: www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary\n        \n        // Only input placeholder is tested while textarea's placeholder is not. \n        // Currently Safari 4 and Opera 11 have support only for the input placeholder\n        // Both tests are available in feature-detects/forms-placeholder.js\n        Modernizr['input'] = (function( props ) {\n            for ( var i = 0, len = props.length; i < len; i++ ) {\n                attrs[ props[i] ] = !!(props[i] in inputElem);\n            }\n            if (attrs.list){\n              // safari false positive's on datalist: webk.it/74252\n              // see also github.com/Modernizr/Modernizr/issues/146\n              attrs.list = !!(document.createElement('datalist') && window.HTMLDataListElement);\n            }\n            return attrs;\n        })('autocomplete autofocus list placeholder max min multiple pattern required step'.split(' '));\n\n        // Run through HTML5's new input types to see if the UA understands any.\n        //   This is put behind the tests runloop because it doesn't return a\n        //   true/false like all the other tests; instead, it returns an object\n        //   containing each input type with its corresponding true/false value\n\n        // Big thanks to @miketaylr for the html5 forms expertise. miketaylr.com/\n        Modernizr['inputtypes'] = (function(props) {\n\n            for ( var i = 0, bool, inputElemType, defaultView, len = props.length; i < len; i++ ) {\n\n                inputElem.setAttribute('type', inputElemType = props[i]);\n                bool = inputElem.type !== 'text';\n\n                // We first check to see if the type we give it sticks..\n                // If the type does, we feed it a textual value, which shouldn't be valid.\n                // If the value doesn't stick, we know there's input sanitization which infers a custom UI\n                if ( bool ) {\n\n                    inputElem.value         = smile;\n                    inputElem.style.cssText = 'position:absolute;visibility:hidden;';\n\n                    if ( /^range$/.test(inputElemType) && inputElem.style.WebkitAppearance !== undefined ) {\n\n                      docElement.appendChild(inputElem);\n                      defaultView = document.defaultView;\n\n                      // Safari 2-4 allows the smiley as a value, despite making a slider\n                      bool =  defaultView.getComputedStyle &&\n                              defaultView.getComputedStyle(inputElem, null).WebkitAppearance !== 'textfield' &&\n                              // Mobile android web browser has false positive, so must\n                              // check the height to see if the widget is actually there.\n                              (inputElem.offsetHeight !== 0);\n\n                      docElement.removeChild(inputElem);\n\n                    } else if ( /^(search|tel)$/.test(inputElemType) ){\n                      // Spec doesnt define any special parsing or detectable UI\n                      //   behaviors so we pass these through as true\n\n                      // Interestingly, opera fails the earlier test, so it doesn't\n                      //  even make it here.\n\n                    } else if ( /^(url|email)$/.test(inputElemType) ) {\n                      // Real url and email support comes with prebaked validation.\n                      bool = inputElem.checkValidity && inputElem.checkValidity() === false;\n\n                    } else if ( /^color$/.test(inputElemType) ) {\n                        // chuck into DOM and force reflow for Opera bug in 11.00\n                        // github.com/Modernizr/Modernizr/issues#issue/159\n                        docElement.appendChild(inputElem);\n                        docElement.offsetWidth;\n                        bool = inputElem.value != smile;\n                        docElement.removeChild(inputElem);\n\n                    } else {\n                      // If the upgraded input compontent rejects the :) text, we got a winner\n                      bool = inputElem.value != smile;\n                    }\n                }\n\n                inputs[ props[i] ] = !!bool;\n            }\n            return inputs;\n        })('search tel url email datetime date month week time datetime-local number range color'.split(' '));\n    }\n\n\n    // End of test definitions\n    // -----------------------\n\n\n\n    // Run through all tests and detect their support in the current UA.\n    // todo: hypothetically we could be doing an array of tests and use a basic loop here.\n    for ( var feature in tests ) {\n        if ( hasOwnProperty(tests, feature) ) {\n            // run the test, throw the return value into the Modernizr,\n            //   then based on that boolean, define an appropriate className\n            //   and push it into an array of classes we'll join later.\n            featureName  = feature.toLowerCase();\n            Modernizr[featureName] = tests[feature]();\n\n            classes.push((Modernizr[featureName] ? '' : 'no-') + featureName);\n        }\n    }\n\n    // input tests need to run.\n    Modernizr.input || webforms();\n\n\n    /**\n     * addTest allows the user to define their own feature tests\n     * the result will be added onto the Modernizr object,\n     * as well as an appropriate className set on the html element\n     *\n     * @param feature - String naming the feature\n     * @param test - Function returning true if feature is supported, false if not\n     */\n     Modernizr.addTest = function ( feature, test ) {\n       if ( typeof feature == 'object' ) {\n         for ( var key in feature ) {\n           if ( hasOwnProperty( feature, key ) ) {\n             Modernizr.addTest( key, feature[ key ] );\n           }\n         }\n       } else {\n\n         feature = feature.toLowerCase();\n\n         if ( Modernizr[feature] !== undefined ) {\n           // we're going to quit if you're trying to overwrite an existing test\n           // if we were to allow it, we'd do this:\n           //   var re = new RegExp(\"\\\\b(no-)?\" + feature + \"\\\\b\");\n           //   docElement.className = docElement.className.replace( re, '' );\n           // but, no rly, stuff 'em.\n           return Modernizr;\n         }\n\n         test = typeof test == 'function' ? test() : test;\n\n         docElement.className += ' ' + (test ? '' : 'no-') + feature;\n         Modernizr[feature] = test;\n\n       }\n\n       return Modernizr; // allow chaining.\n     };\n\n\n    // Reset modElem.cssText to nothing to reduce memory footprint.\n    setCss('');\n    modElem = inputElem = null;\n\n    //>>BEGIN IEPP\n    // Enable HTML 5 elements for styling in IE & add HTML5 css\n    /*! HTML5 Shiv v3.4 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed */\n    ;(function(window, document) {\n    \n      /** Preset options */\n      var options = window.html5 || {};\n    \n      /** Used to skip problem elements */\n      var reSkip = /^<|^(?:button|form|map|select|textarea)$/i;\n    \n      /** Detect whether the browser supports default html5 styles */\n      var supportsHtml5Styles;\n    \n      /** Detect whether the browser supports unknown elements */\n      var supportsUnknownElements;\n    \n      (function() {\n        var a = document.createElement('a');\n    \n        a.innerHTML = '<xyz></xyz>';\n    \n        //if the hidden property is implemented we can assume, that the browser supports HTML5 Styles\n        supportsHtml5Styles = ('hidden' in a);\n        supportsUnknownElements = a.childNodes.length == 1 || (function() {\n          // assign a false positive if unable to shiv\n          try {\n            (document.createElement)('a');\n          } catch(e) {\n            return true;\n          }\n          var frag = document.createDocumentFragment();\n          return (\n            typeof frag.cloneNode == 'undefined' ||\n            typeof frag.createDocumentFragment == 'undefined' ||\n            typeof frag.createElement == 'undefined'\n          );\n        }());\n    \n      }());\n    \n      /*--------------------------------------------------------------------------*/\n    \n      /**\n       * Creates a style sheet with the given CSS text and adds it to the document.\n       * @private\n       * @param {Document} ownerDocument The document.\n       * @param {String} cssText The CSS text.\n       * @returns {StyleSheet} The style element.\n       */\n      function addStyleSheet(ownerDocument, cssText) {\n        var p = ownerDocument.createElement('p'),\n            parent = ownerDocument.getElementsByTagName('head')[0] || ownerDocument.documentElement;\n    \n        p.innerHTML = 'x<style>' + cssText + '</style>';\n        return parent.insertBefore(p.lastChild, parent.firstChild);\n      }\n    \n      /**\n       * Returns the value of `html5.elements` as an array.\n       * @private\n       * @returns {Array} An array of shived element node names.\n       */\n      function getElements() {\n        var elements = html5.elements;\n        return typeof elements == 'string' ? elements.split(' ') : elements;\n      }\n    \n      /**\n       * Shivs the `createElement` and `createDocumentFragment` methods of the document.\n       * @private\n       * @param {Document|DocumentFragment} ownerDocument The document.\n       */\n      function shivMethods(ownerDocument) {\n        var cache = {},\n            docCreateElement = ownerDocument.createElement,\n            docCreateFragment = ownerDocument.createDocumentFragment,\n            frag = docCreateFragment();\n    \n        ownerDocument.createElement = function(nodeName) {\n          // Avoid adding some elements to fragments in IE < 9 because\n          // * Attributes like `name` or `type` cannot be set/changed once an element\n          //   is inserted into a document/fragment\n          // * Link elements with `src` attributes that are inaccessible, as with\n          //   a 403 response, will cause the tab/window to crash\n          // * Script elements appended to fragments will execute when their `src`\n          //   or `text` property is set\n          var node = (cache[nodeName] || (cache[nodeName] = docCreateElement(nodeName))).cloneNode();\n          return html5.shivMethods && node.canHaveChildren && !reSkip.test(nodeName) ? frag.appendChild(node) : node;\n        };\n    \n        ownerDocument.createDocumentFragment = Function('h,f', 'return function(){' +\n          'var n=f.cloneNode(),c=n.createElement;' +\n          'h.shivMethods&&(' +\n            // unroll the `createElement` calls\n            getElements().join().replace(/\\w+/g, function(nodeName) {\n              cache[nodeName] = docCreateElement(nodeName);\n              frag.createElement(nodeName);\n              return 'c(\"' + nodeName + '\")';\n            }) +\n          ');return n}'\n        )(html5, frag);\n      }\n    \n      /*--------------------------------------------------------------------------*/\n    \n      /**\n       * Shivs the given document.\n       * @memberOf html5\n       * @param {Document} ownerDocument The document to shiv.\n       * @returns {Document} The shived document.\n       */\n      function shivDocument(ownerDocument) {\n        var shived;\n        if (ownerDocument.documentShived) {\n          return ownerDocument;\n        }\n        if (html5.shivCSS && !supportsHtml5Styles) {\n          shived = !!addStyleSheet(ownerDocument,\n            // corrects block display not defined in IE6/7/8/9\n            'article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block}' +\n            // corrects audio display not defined in IE6/7/8/9\n            'audio{display:none}' +\n            // corrects canvas and video display not defined in IE6/7/8/9\n            'canvas,video{display:inline-block;*display:inline;*zoom:1}' +\n            // corrects 'hidden' attribute and audio[controls] display not present in IE7/8/9\n            '[hidden]{display:none}audio[controls]{display:inline-block;*display:inline;*zoom:1}' +\n            // adds styling not present in IE6/7/8/9\n            'mark{background:#FF0;color:#000}'\n          );\n        }\n        if (!supportsUnknownElements) {\n          shived = !shivMethods(ownerDocument);\n        }\n        if (shived) {\n          ownerDocument.documentShived = shived;\n        }\n        return ownerDocument;\n      }\n    \n      /*--------------------------------------------------------------------------*/\n    \n      /**\n       * The `html5` object is exposed so that more elements can be shived and\n       * existing shiving can be detected on iframes.\n       * @type Object\n       * @example\n       *\n       * // options can be changed before the script is included\n       * html5 = { 'elements': 'mark section', 'shivCSS': false, 'shivMethods': false };\n       */\n      var html5 = {\n    \n        /**\n         * An array or space separated string of node names of the elements to shiv.\n         * @memberOf html5\n         * @type Array|String\n         */\n        'elements': options.elements || 'abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video',\n    \n        /**\n         * A flag to indicate that the HTML5 style sheet should be inserted.\n         * @memberOf html5\n         * @type Boolean\n         */\n        'shivCSS': !(options.shivCSS === false),\n    \n        /**\n         * A flag to indicate that the document's `createElement` and `createDocumentFragment`\n         * methods should be overwritten.\n         * @memberOf html5\n         * @type Boolean\n         */\n        'shivMethods': !(options.shivMethods === false),\n    \n        /**\n         * A string to describe the type of `html5` object (\"default\" or \"default print\").\n         * @memberOf html5\n         * @type String\n         */\n        'type': 'default',\n    \n        // shivs the document according to the specified `html5` object options\n        'shivDocument': shivDocument\n      };\n    \n      /*--------------------------------------------------------------------------*/\n    \n      // expose html5\n      window.html5 = html5;\n    \n      // shiv the document\n      shivDocument(document);\n    \n    }(this, document));\n\n    //>>END IEPP\n\n    // Assign private properties to the return object with prefix\n    Modernizr._version      = version;\n\n    // expose these for the plugin API. Look in the source for how to join() them against your input\n    Modernizr._prefixes     = prefixes;\n    Modernizr._domPrefixes  = domPrefixes;\n    Modernizr._cssomPrefixes  = cssomPrefixes;\n    \n    // Modernizr.mq tests a given media query, live against the current state of the window\n    // A few important notes:\n    //   * If a browser does not support media queries at all (eg. oldIE) the mq() will always return false\n    //   * A max-width or orientation query will be evaluated against the current state, which may change later.\n    //   * You must specify values. Eg. If you are testing support for the min-width media query use: \n    //       Modernizr.mq('(min-width:0)')\n    // usage:\n    // Modernizr.mq('only screen and (max-width:768)')\n    Modernizr.mq            = testMediaQuery;   \n    \n    // Modernizr.hasEvent() detects support for a given event, with an optional element to test on\n    // Modernizr.hasEvent('gesturestart', elem)\n    Modernizr.hasEvent      = isEventSupported; \n\n    // Modernizr.testProp() investigates whether a given style property is recognized\n    // Note that the property names must be provided in the camelCase variant.\n    // Modernizr.testProp('pointerEvents')\n    Modernizr.testProp      = function(prop){\n        return testProps([prop]);\n    };        \n\n    // Modernizr.testAllProps() investigates whether a given style property,\n    //   or any of its vendor-prefixed variants, is recognized\n    // Note that the property names must be provided in the camelCase variant.\n    // Modernizr.testAllProps('boxSizing')    \n    Modernizr.testAllProps  = testPropsAll;     \n\n\n    \n    // Modernizr.testStyles() allows you to add custom styles to the document and test an element afterwards\n    // Modernizr.testStyles('#modernizr { position:absolute }', function(elem, rule){ ... })\n    Modernizr.testStyles    = injectElementWithStyles; \n\n\n    // Modernizr.prefixed() returns the prefixed or nonprefixed property name variant of your input\n    // Modernizr.prefixed('boxSizing') // 'MozBoxSizing'\n    \n    // Properties must be passed as dom-style camelcase, rather than `box-sizing` hypentated style.\n    // Return values will also be the camelCase variant, if you need to translate that to hypenated style use:\n    //\n    //     str.replace(/([A-Z])/g, function(str,m1){ return '-' + m1.toLowerCase(); }).replace(/^ms-/,'-ms-');\n    \n    // If you're trying to ascertain which transition end event to bind to, you might do something like...\n    // \n    //     var transEndEventNames = {\n    //       'WebkitTransition' : 'webkitTransitionEnd',\n    //       'MozTransition'    : 'transitionend',\n    //       'OTransition'      : 'oTransitionEnd',\n    //       'msTransition'     : 'MsTransitionEnd',\n    //       'transition'       : 'transitionend'\n    //     },\n    //     transEndEventName = transEndEventNames[ Modernizr.prefixed('transition') ];\n    \n    Modernizr.prefixed      = function(prop, obj, elem){\n      if(!obj) {\n        return testPropsAll(prop, 'pfx');\n      } else {\n        // Testing DOM property e.g. Modernizr.prefixed('requestAnimationFrame', window) // 'mozRequestAnimationFrame'\n        return testPropsAll(prop, obj, elem);\n      }\n    };\n\n\n\n    // Remove \"no-js\" class from <html> element, if it exists:\n    docElement.className = docElement.className.replace(/(^|\\s)no-js(\\s|$)/, '$1$2') +\n                            \n                            // Add the new classes to the <html> element.\n                            (enableClasses ? ' js ' + classes.join(' ') : '');\n\n    return Modernizr;\n\n})(this, this.document);\n"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/DDDPPP.Chap20.CommandHandler.Presentation/Views/Account/ChangePassword.aspx",
    "content": "﻿<%@ Page Language=\"C#\" MasterPageFile=\"~/Views/Shared/Site.Master\" Inherits=\"System.Web.Mvc.ViewPage<DDDPPP.Chap20.CommandHandler.Presentation.Models.ChangePasswordModel>\" %>\n\n<asp:Content ID=\"changePasswordTitle\" ContentPlaceHolderID=\"TitleContent\" runat=\"server\">\n    Change Password\n</asp:Content>\n\n<asp:Content ID=\"changePasswordContent\" ContentPlaceHolderID=\"MainContent\" runat=\"server\">\n    <h2>Change Password</h2>\n    <p>\n        Use the form below to change your password. \n    </p>\n    <p>\n        New passwords are required to be a minimum of <%: Membership.MinRequiredPasswordLength %> characters in length.\n    </p>\n\n    <script src=\"<%: Url.Content(\"~/Scripts/jquery.validate.min.js\") %>\" type=\"text/javascript\"></script>\n    <script src=\"<%: Url.Content(\"~/Scripts/jquery.validate.unobtrusive.min.js\") %>\" type=\"text/javascript\"></script>\n\n    <% using (Html.BeginForm()) { %>\n        <%: Html.ValidationSummary(true, \"Password change was unsuccessful. Please correct the errors and try again.\") %>\n        <div>\n            <fieldset>\n                <legend>Account Information</legend>\n                \n                <div class=\"editor-label\">\n                    <%: Html.LabelFor(m => m.OldPassword) %>\n                </div>\n                <div class=\"editor-field\">\n                    <%: Html.PasswordFor(m => m.OldPassword) %>\n                    <%: Html.ValidationMessageFor(m => m.OldPassword) %>\n                </div>\n                \n                <div class=\"editor-label\">\n                    <%: Html.LabelFor(m => m.NewPassword) %>\n                </div>\n                <div class=\"editor-field\">\n                    <%: Html.PasswordFor(m => m.NewPassword) %>\n                    <%: Html.ValidationMessageFor(m => m.NewPassword) %>\n                </div>\n                \n                <div class=\"editor-label\">\n                    <%: Html.LabelFor(m => m.ConfirmPassword) %>\n                </div>\n                <div class=\"editor-field\">\n                    <%: Html.PasswordFor(m => m.ConfirmPassword) %>\n                    <%: Html.ValidationMessageFor(m => m.ConfirmPassword) %>\n                </div>\n                \n                <p>\n                    <input type=\"submit\" value=\"Change Password\" />\n                </p>\n            </fieldset>\n        </div>\n    <% } %>\n</asp:Content>\n"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/DDDPPP.Chap20.CommandHandler.Presentation/Views/Account/ChangePasswordSuccess.aspx",
    "content": "﻿<%@ Page Language=\"C#\" MasterPageFile=\"~/Views/Shared/Site.Master\" Inherits=\"System.Web.Mvc.ViewPage\" %>\n\n<asp:Content ID=\"changePasswordTitle\" ContentPlaceHolderID=\"TitleContent\" runat=\"server\">\n    Change Password\n</asp:Content>\n\n<asp:Content ID=\"changePasswordSuccessContent\" ContentPlaceHolderID=\"MainContent\" runat=\"server\">\n    <h2>Change Password</h2>\n    <p>\n        Your password has been changed successfully.\n    </p>\n</asp:Content>\n"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/DDDPPP.Chap20.CommandHandler.Presentation/Views/Account/LogOn.aspx",
    "content": "﻿<%@ Page Language=\"C#\" MasterPageFile=\"~/Views/Shared/Site.Master\" Inherits=\"System.Web.Mvc.ViewPage<DDDPPP.Chap20.CommandHandler.Presentation.Models.LogOnModel>\" %>\n\n<asp:Content ID=\"loginTitle\" ContentPlaceHolderID=\"TitleContent\" runat=\"server\">\n    Log On\n</asp:Content>\n\n<asp:Content ID=\"loginContent\" ContentPlaceHolderID=\"MainContent\" runat=\"server\">\n    <h2>Log On</h2>\n    <p>\n        Please enter your user name and password. <%: Html.ActionLink(\"Register\", \"Register\") %> if you don't have an account.\n    </p>\n\n    <script src=\"<%: Url.Content(\"~/Scripts/jquery.validate.min.js\") %>\" type=\"text/javascript\"></script>\n    <script src=\"<%: Url.Content(\"~/Scripts/jquery.validate.unobtrusive.min.js\") %>\" type=\"text/javascript\"></script>\n\n    <% using (Html.BeginForm()) { %>\n        <%: Html.ValidationSummary(true, \"Login was unsuccessful. Please correct the errors and try again.\") %>\n        <div>\n            <fieldset>\n                <legend>Account Information</legend>\n                \n                <div class=\"editor-label\">\n                    <%: Html.LabelFor(m => m.UserName) %>\n                </div>\n                <div class=\"editor-field\">\n                    <%: Html.TextBoxFor(m => m.UserName) %>\n                    <%: Html.ValidationMessageFor(m => m.UserName) %>\n                </div>\n                \n                <div class=\"editor-label\">\n                    <%: Html.LabelFor(m => m.Password) %>\n                </div>\n                <div class=\"editor-field\">\n                    <%: Html.PasswordFor(m => m.Password) %>\n                    <%: Html.ValidationMessageFor(m => m.Password) %>\n                </div>\n                \n                <div class=\"editor-label\">\n                    <%: Html.CheckBoxFor(m => m.RememberMe) %>\n                    <%: Html.LabelFor(m => m.RememberMe) %>\n                </div>\n                \n                <p>\n                    <input type=\"submit\" value=\"Log On\" />\n                </p>\n            </fieldset>\n        </div>\n    <% } %>\n</asp:Content>\n"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/DDDPPP.Chap20.CommandHandler.Presentation/Views/Account/Register.aspx",
    "content": "﻿<%@ Page Language=\"C#\" MasterPageFile=\"~/Views/Shared/Site.Master\" Inherits=\"System.Web.Mvc.ViewPage<DDDPPP.Chap20.CommandHandler.Presentation.Models.RegisterModel>\" %>\n\n<asp:Content ID=\"registerTitle\" ContentPlaceHolderID=\"TitleContent\" runat=\"server\">\n    Register\n</asp:Content>\n\n<asp:Content ID=\"registerContent\" ContentPlaceHolderID=\"MainContent\" runat=\"server\">\n    <h2>Create a New Account</h2>\n    <p>\n        Use the form below to create a new account. \n    </p>\n    <p>\n        Passwords are required to be a minimum of <%: Membership.MinRequiredPasswordLength %> characters in length.\n    </p>\n\n    <script src=\"<%: Url.Content(\"~/Scripts/jquery.validate.min.js\") %>\" type=\"text/javascript\"></script>\n    <script src=\"<%: Url.Content(\"~/Scripts/jquery.validate.unobtrusive.min.js\") %>\" type=\"text/javascript\"></script>\n\n    <% using (Html.BeginForm()) { %>\n        <%: Html.ValidationSummary(true, \"Account creation was unsuccessful. Please correct the errors and try again.\") %>\n        <div>\n            <fieldset>\n                <legend>Account Information</legend>\n                \n                <div class=\"editor-label\">\n                    <%: Html.LabelFor(m => m.UserName) %>\n                </div>\n                <div class=\"editor-field\">\n                    <%: Html.TextBoxFor(m => m.UserName) %>\n                    <%: Html.ValidationMessageFor(m => m.UserName) %>\n                </div>\n                \n                <div class=\"editor-label\">\n                    <%: Html.LabelFor(m => m.Email) %>\n                </div>\n                <div class=\"editor-field\">\n                    <%: Html.TextBoxFor(m => m.Email) %>\n                    <%: Html.ValidationMessageFor(m => m.Email) %>\n                </div>\n                \n                <div class=\"editor-label\">\n                    <%: Html.LabelFor(m => m.Password) %>\n                </div>\n                <div class=\"editor-field\">\n                    <%: Html.PasswordFor(m => m.Password) %>\n                    <%: Html.ValidationMessageFor(m => m.Password) %>\n                </div>\n                \n                <div class=\"editor-label\">\n                    <%: Html.LabelFor(m => m.ConfirmPassword) %>\n                </div>\n                <div class=\"editor-field\">\n                    <%: Html.PasswordFor(m => m.ConfirmPassword) %>\n                    <%: Html.ValidationMessageFor(m => m.ConfirmPassword) %>\n                </div>\n                \n                <p>\n                    <input type=\"submit\" value=\"Register\" />\n                </p>\n            </fieldset>\n        </div>\n    <% } %>\n</asp:Content>\n"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/DDDPPP.Chap20.CommandHandler.Presentation/Views/Home/About.aspx",
    "content": "﻿<%@ Page Language=\"C#\" MasterPageFile=\"~/Views/Shared/Site.Master\" Inherits=\"System.Web.Mvc.ViewPage\" %>\n\n<asp:Content ID=\"aboutTitle\" ContentPlaceHolderID=\"TitleContent\" runat=\"server\">\n    About Us\n</asp:Content>\n\n<asp:Content ID=\"aboutContent\" ContentPlaceHolderID=\"MainContent\" runat=\"server\">\n    <h2>About</h2>\n    <p>\n        Put content here.\n    </p>\n</asp:Content>\n"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/DDDPPP.Chap20.CommandHandler.Presentation/Views/Home/Index.aspx",
    "content": "﻿<%@ Page Language=\"C#\" MasterPageFile=\"~/Views/Shared/Site.Master\" Inherits=\"System.Web.Mvc.ViewPage\" %>\n\n<asp:Content ID=\"Content1\" ContentPlaceHolderID=\"TitleContent\" runat=\"server\">\n    Home Page\n</asp:Content>\n\n<asp:Content ID=\"Content2\" ContentPlaceHolderID=\"MainContent\" runat=\"server\">\n    <h2><%: ViewBag.Message %></h2>\n    <p>\n        To learn more about ASP.NET MVC visit <a href=\"http://asp.net/mvc\" title=\"ASP.NET MVC Website\">http://asp.net/mvc</a>.\n    </p>\n</asp:Content>\n"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/DDDPPP.Chap20.CommandHandler.Presentation/Views/Shared/Error.aspx",
    "content": "﻿<%@ Page Language=\"C#\" MasterPageFile=\"~/Views/Shared/Site.Master\" Inherits=\"System.Web.Mvc.ViewPage<System.Web.Mvc.HandleErrorInfo>\" %>\n\n<asp:Content ID=\"errorTitle\" ContentPlaceHolderID=\"TitleContent\" runat=\"server\">\n    Error\n</asp:Content>\n\n<asp:Content ID=\"errorContent\" ContentPlaceHolderID=\"MainContent\" runat=\"server\">\n    <h2>\n        Sorry, an error occurred while processing your request.\n    </h2>\n</asp:Content>\n"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/DDDPPP.Chap20.CommandHandler.Presentation/Views/Shared/LogOnUserControl.ascx",
    "content": "﻿<%@ Control Language=\"C#\" Inherits=\"System.Web.Mvc.ViewUserControl\" %>\n<%\n    if (Request.IsAuthenticated) {\n%>\n        Welcome <strong><%: Page.User.Identity.Name %></strong>!\n        [ <%: Html.ActionLink(\"Log Off\", \"LogOff\", \"Account\") %> ]\n<%\n    }\n    else {\n%> \n        [ <%: Html.ActionLink(\"Log On\", \"LogOn\", \"Account\") %> ]\n<%\n    }\n%>\n"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/DDDPPP.Chap20.CommandHandler.Presentation/Views/Shared/Site.Master",
    "content": "﻿<%@ Master Language=\"C#\" Inherits=\"System.Web.Mvc.ViewMasterPage\" %>\n\n<!DOCTYPE html>\n<html>\n<head runat=\"server\">\n    <title><asp:ContentPlaceHolder ID=\"TitleContent\" runat=\"server\" /></title>\n    <link href=\"../../Content/Site.css\" rel=\"stylesheet\" type=\"text/css\" />\n    <script src=\"<%: Url.Content(\"~/Scripts/jquery-1.7.1.min.js\") %>\" type=\"text/javascript\"></script>\n</head>\n<body>\n    <div class=\"page\">\n        <div id=\"header\">\n            <div id=\"title\">\n                <h1>My MVC Application</h1>\n            </div>\n            <div id=\"logindisplay\">\n                <% Html.RenderPartial(\"LogOnUserControl\"); %>\n            </div> \n            <div id=\"menucontainer\">\n                <ul id=\"menu\">\n                    <li><%: Html.ActionLink(\"Home\", \"Index\", \"Home\")%></li>\n                    <li><%: Html.ActionLink(\"About\", \"About\", \"Home\")%></li>\n                </ul>\n            </div>\n        </div>\n        <div id=\"main\">\n            <asp:ContentPlaceHolder ID=\"MainContent\" runat=\"server\" />\n            <div id=\"footer\">\n            </div>\n        </div>\n    </div>\n</body>\n</html>\n"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/DDDPPP.Chap20.CommandHandler.Presentation/Views/Web.config",
    "content": "﻿<?xml version=\"1.0\"?>\n\n<configuration>\n  <configSections>\n    <sectionGroup name=\"system.web.webPages.razor\" type=\"System.Web.WebPages.Razor.Configuration.RazorWebSectionGroup, System.Web.WebPages.Razor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35\">\n      <section name=\"host\" type=\"System.Web.WebPages.Razor.Configuration.HostSection, System.Web.WebPages.Razor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35\" requirePermission=\"false\" />\n      <section name=\"pages\" type=\"System.Web.WebPages.Razor.Configuration.RazorPagesSection, System.Web.WebPages.Razor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35\" requirePermission=\"false\" />\n    </sectionGroup>\n  </configSections>\n\n  <system.web.webPages.razor>\n    <host factoryType=\"System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35\" />\n    <pages pageBaseType=\"System.Web.Mvc.WebViewPage\">\n      <namespaces>\n        <add namespace=\"System.Web.Mvc\" />\n        <add namespace=\"System.Web.Mvc.Ajax\" />\n        <add namespace=\"System.Web.Mvc.Html\" />\n        <add namespace=\"System.Web.Routing\" />\n      </namespaces>\n    </pages>\n  </system.web.webPages.razor>\n\n  <appSettings>\n    <add key=\"webpages:Enabled\" value=\"false\" />\n  </appSettings>\n\n  <system.web>\n    <httpHandlers>\n      <add path=\"*\" verb=\"*\" type=\"System.Web.HttpNotFoundHandler\"/>\n    </httpHandlers>\n\n    <!--\n        Enabling request validation in view pages would cause validation to occur\n        after the input has already been processed by the controller. By default\n        MVC performs request validation before a controller processes the input.\n        To change this behavior apply the ValidateInputAttribute to a\n        controller or action.\n    -->\n    <pages\n        validateRequest=\"false\"\n        pageParserFilterType=\"System.Web.Mvc.ViewTypeParserFilter, System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35\"\n        pageBaseType=\"System.Web.Mvc.ViewPage, System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35\"\n        userControlBaseType=\"System.Web.Mvc.ViewUserControl, System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35\">\n      <controls>\n        <add assembly=\"System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35\" namespace=\"System.Web.Mvc\" tagPrefix=\"mvc\" />\n      </controls>\n    </pages>\n  </system.web>\n\n  <system.webServer>\n    <validation validateIntegratedModeConfiguration=\"false\" />\n\n    <handlers>\n      <remove name=\"BlockViewHandler\"/>\n      <add name=\"BlockViewHandler\" path=\"*\" verb=\"*\" preCondition=\"integratedMode\" type=\"System.Web.HttpNotFoundHandler\" />\n    </handlers>\n  </system.webServer>\n</configuration>\n"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/DDDPPP.Chap20.CommandHandler.Presentation/Web.Debug.config",
    "content": "﻿<?xml version=\"1.0\"?>\n\n<!-- For more information on using web.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 -->\n\n<configuration xmlns:xdt=\"http://schemas.microsoft.com/XML-Document-Transform\">\n  <!--\n    In the example below, the \"SetAttributes\" transform will change the value of \n    \"connectionString\" to use \"ReleaseSQLServer\" only when the \"Match\" locator \n    finds an atrribute \"name\" that has a value of \"MyDB\".\n    \n    <connectionStrings>\n      <add name=\"MyDB\" \n        connectionString=\"Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True\" \n        xdt:Transform=\"SetAttributes\" xdt:Locator=\"Match(name)\"/>\n    </connectionStrings>\n  -->\n  <system.web>\n    <!--\n      In the example below, the \"Replace\" transform will replace the entire \n      <customErrors> section of your web.config file.\n      Note that because there is only one customErrors section under the \n      <system.web> node, there is no need to use the \"xdt:Locator\" attribute.\n      \n      <customErrors defaultRedirect=\"GenericError.htm\"\n        mode=\"RemoteOnly\" xdt:Transform=\"Replace\">\n        <error statusCode=\"500\" redirect=\"InternalError.htm\"/>\n      </customErrors>\n    -->\n  </system.web>\n</configuration>"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/DDDPPP.Chap20.CommandHandler.Presentation/Web.Release.config",
    "content": "﻿<?xml version=\"1.0\"?>\n\n<!-- For more information on using web.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 -->\n\n<configuration xmlns:xdt=\"http://schemas.microsoft.com/XML-Document-Transform\">\n  <!--\n    In the example below, the \"SetAttributes\" transform will change the value of \n    \"connectionString\" to use \"ReleaseSQLServer\" only when the \"Match\" locator \n    finds an atrribute \"name\" that has a value of \"MyDB\".\n    \n    <connectionStrings>\n      <add name=\"MyDB\" \n        connectionString=\"Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True\" \n        xdt:Transform=\"SetAttributes\" xdt:Locator=\"Match(name)\"/>\n    </connectionStrings>\n  -->\n  <system.web>\n    <compilation xdt:Transform=\"RemoveAttributes(debug)\" />\n    <!--\n      In the example below, the \"Replace\" transform will replace the entire \n      <customErrors> section of your web.config file.\n      Note that because there is only one customErrors section under the \n      <system.web> node, there is no need to use the \"xdt:Locator\" attribute.\n      \n      <customErrors defaultRedirect=\"GenericError.htm\"\n        mode=\"RemoteOnly\" xdt:Transform=\"Replace\">\n        <error statusCode=\"500\" redirect=\"InternalError.htm\"/>\n      </customErrors>\n    -->\n  </system.web>\n</configuration>"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/DDDPPP.Chap20.CommandHandler.Presentation/Web.config",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n  For more information on how to configure your ASP.NET application, please visit\n  http://go.microsoft.com/fwlink/?LinkId=152368\n  -->\n<configuration>\n  <configSections>\n    <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->\n    <section name=\"entityFramework\" type=\"System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\" requirePermission=\"false\" />\n  </configSections>\n  <appSettings>\n    <add key=\"webpages:Version\" value=\"1.0.0.0\" />\n    <add key=\"ClientValidationEnabled\" value=\"true\" />\n    <add key=\"UnobtrusiveJavaScriptEnabled\" value=\"true\" />\n  </appSettings>\n  <system.web>\n    <compilation debug=\"true\" targetFramework=\"4.5\" />\n    <authentication mode=\"Forms\">\n      <forms loginUrl=\"~/Account/LogOn\" timeout=\"2880\" />\n    </authentication>\n    <pages>\n      <namespaces>\n        <add namespace=\"System.Web.Helpers\" />\n        <add namespace=\"System.Web.Mvc\" />\n        <add namespace=\"System.Web.Mvc.Ajax\" />\n        <add namespace=\"System.Web.Mvc.Html\" />\n        <add namespace=\"System.Web.Routing\" />\n        <add namespace=\"System.Web.WebPages\" />\n      </namespaces>\n    </pages>\n    <httpRuntime targetFramework=\"4.5\" />\n    <profile defaultProvider=\"DefaultProfileProvider\">\n      <providers>\n        <add name=\"DefaultProfileProvider\" type=\"System.Web.Providers.DefaultProfileProvider, System.Web.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35\" connectionStringName=\"DefaultConnection\" applicationName=\"/\" />\n      </providers>\n    </profile>\n    <membership defaultProvider=\"DefaultMembershipProvider\">\n      <providers>\n        <add name=\"DefaultMembershipProvider\" type=\"System.Web.Providers.DefaultMembershipProvider, System.Web.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35\" connectionStringName=\"DefaultConnection\" enablePasswordRetrieval=\"false\" enablePasswordReset=\"true\" requiresQuestionAndAnswer=\"false\" requiresUniqueEmail=\"false\" maxInvalidPasswordAttempts=\"5\" minRequiredPasswordLength=\"6\" minRequiredNonalphanumericCharacters=\"0\" passwordAttemptWindow=\"10\" applicationName=\"/\" />\n      </providers>\n    </membership>\n    <roleManager defaultProvider=\"DefaultRoleProvider\">\n      <providers>\n        <add name=\"DefaultRoleProvider\" type=\"System.Web.Providers.DefaultRoleProvider, System.Web.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35\" connectionStringName=\"DefaultConnection\" applicationName=\"/\" />\n      </providers>\n    </roleManager>\n    <sessionState mode=\"InProc\" customProvider=\"DefaultSessionProvider\">\n      <providers>\n        <add name=\"DefaultSessionProvider\" type=\"System.Web.Providers.DefaultSessionStateProvider, System.Web.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35\" connectionStringName=\"DefaultConnection\" />\n      </providers>\n    </sessionState>\n  </system.web>\n  <system.webServer>\n    <validation validateIntegratedModeConfiguration=\"false\" />\n  </system.webServer>\n  <runtime>\n    <assemblyBinding xmlns=\"urn:schemas-microsoft-com:asm.v1\">\n      <dependentAssembly>\n        <assemblyIdentity name=\"System.Web.Mvc\" publicKeyToken=\"31bf3856ad364e35\" />\n        <bindingRedirect oldVersion=\"1.0.0.0-2.0.0.0\" newVersion=\"3.0.0.0\" />\n      </dependentAssembly>\n    </assemblyBinding>\n  </runtime>\n  <entityFramework>\n    <defaultConnectionFactory type=\"System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework\" />\n  </entityFramework>\n  <connectionStrings>\n    <add name=\"DefaultConnection\" providerName=\"System.Data.SqlClient\" connectionString=\"Data Source=(LocalDb)\\v11.0;Initial Catalog=aspnet-DDDPPP.Chap20.CommandHandler.Presentation-20140109171036;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\\aspnet-DDDPPP.Chap20.CommandHandler.Presentation-20140109171036.mdf\" />\n  </connectionStrings>\n</configuration>"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/DDDPPP.Chap20.CommandHandler.Presentation/packages.config",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<packages>\n  <package id=\"EntityFramework\" version=\"5.0.0\" targetFramework=\"net45\" />\n  <package id=\"jQuery\" version=\"1.7.1.1\" targetFramework=\"net45\" />\n  <package id=\"jQuery.UI.Combined\" version=\"1.8.20.1\" targetFramework=\"net45\" />\n  <package id=\"jQuery.Validation\" version=\"1.9.0.1\" targetFramework=\"net45\" />\n  <package id=\"Microsoft.AspNet.Mvc\" version=\"3.0.20105.1\" targetFramework=\"net45\" />\n  <package id=\"Microsoft.AspNet.Providers.Core\" version=\"1.1\" targetFramework=\"net45\" />\n  <package id=\"Microsoft.AspNet.Providers.LocalDB\" version=\"1.1\" targetFramework=\"net45\" />\n  <package id=\"Microsoft.AspNet.Razor\" version=\"1.0.20105.408\" targetFramework=\"net45\" />\n  <package id=\"Microsoft.AspNet.WebPages\" version=\"1.0.20105.408\" targetFramework=\"net45\" />\n  <package id=\"Microsoft.Web.Infrastructure\" version=\"1.0.0.0\" targetFramework=\"net45\" />\n  <package id=\"Modernizr\" version=\"2.5.3\" targetFramework=\"net45\" />\n</packages>"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/DDDPPP.Chap20.CommandHandler.sln",
    "content": "﻿\nMicrosoft Visual Studio Solution File, Format Version 12.00\n# Visual Studio 2012\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"DDDPPP.Chap20.CommandHandler.Application\", \"DDDPPP.Chap20.CommandHandler.Application\\DDDPPP.Chap20.CommandHandler.Application.csproj\", \"{52858090-3479-4015-984F-5AA049857F3F}\"\nEndProject\nProject(\"{2150E333-8FDC-42A3-9474-1A3956D46DE8}\") = \".nuget\", \".nuget\", \"{C0A1BA29-2AC9-4C3D-B3BF-CE1E466478C9}\"\n\tProjectSection(SolutionItems) = preProject\n\t\t.nuget\\NuGet.Config = .nuget\\NuGet.Config\n\t\t.nuget\\NuGet.exe = .nuget\\NuGet.exe\n\t\t.nuget\\NuGet.targets = .nuget\\NuGet.targets\n\tEndProjectSection\nEndProject\nGlobal\n\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\n\t\tDebug|Any CPU = Debug|Any CPU\n\t\tRelease|Any CPU = Release|Any CPU\n\tEndGlobalSection\n\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\n\t\t{52858090-3479-4015-984F-5AA049857F3F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{52858090-3479-4015-984F-5AA049857F3F}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{52858090-3479-4015-984F-5AA049857F3F}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{52858090-3479-4015-984F-5AA049857F3F}.Release|Any CPU.Build.0 = Release|Any CPU\n\tEndGlobalSection\n\tGlobalSection(SolutionProperties) = preSolution\n\t\tHideSolutionNode = FALSE\n\tEndGlobalSection\nEndGlobal\n"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/PPPDDD.ApplicationServices.Gambling/App_Start/RouteConfig.cs",
    "content": "﻿using System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Web;\r\nusing System.Web.Mvc;\r\nusing System.Web.Routing;\r\n\r\nnamespace PPPDDD.ApplicationServices.Gambling\r\n{\r\n    public class RouteConfig\r\n    {\r\n        public static void RegisterRoutes(RouteCollection routes)\r\n        {\r\n            routes.IgnoreRoute(\"{resource}.axd/{*pathInfo}\");\r\n\r\n            routes.MapRoute(\r\n                name: \"Default\",\r\n                url: \"{controller}/{action}/{id}\",\r\n                defaults: new { controller = \"Home\", action = \"Index\", id = UrlParameter.Optional }\r\n            );\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/PPPDDD.ApplicationServices.Gambling/ApplicationServices/1_validation/RecommendAFriendService.cs",
    "content": "﻿using System;\r\n\r\nnamespace PPPDDD.ApplicationServices.Gambling.ApplicationServices.ApplicationValidation\r\n{\r\n    public class RecommendAFriendService\r\n    {\r\n        public void RecommendAFriend(int referrerId, NewAccount friendsAccountDetails)\r\n        {\r\n            Validate(friendsAccountDetails);\r\n\r\n            // ...\r\n        }\r\n\r\n        // technical validation carried out at the application level\r\n        private void Validate(NewAccount account)\r\n        {\r\n            if (!account.Email.Contains(\"@\"))\r\n                throw new ValidationFailure(\"Not a valid email address\");\r\n\r\n            if (account.Email.Length >= 50)\r\n                throw new ValidationFailure(\"Email address must be less than 50 characters\");\r\n\r\n            if (account.Nickname.Length >= 25)\r\n                throw new ValidationFailure(\"Nickname must be less than 25 characters\");\r\n\r\n            if (String.IsNullOrWhiteSpace(account.Email))\r\n                throw new ValidationFailure(\"You must supply an email\");\r\n\r\n            if (String.IsNullOrWhiteSpace(account.Nickname))\r\n                throw new ValidationFailure(\"You must supply a Nickname\");\r\n        }\r\n    }\r\n\r\n    public class NewAccount\r\n    {\r\n        public string Email { get; set; }\r\n\r\n        public string Nickname { get; set; }\r\n\r\n        public int Age { get; set; }\r\n    }\r\n\r\n    public class ValidationFailure : Exception \r\n    {\r\n        public ValidationFailure(string message) : base(message) { }\r\n    }\r\n}\r\n"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/PPPDDD.ApplicationServices.Gambling/ApplicationServices/2_transaction/RecommendAFriendService.cs",
    "content": "﻿using Raven.Client;\r\nusing System;\r\n\r\nnamespace PPPDDD.ApplicationServices.Gambling.ApplicationServices.Transaction\r\n{\r\n    public class RecommendAFriendService\r\n    {\r\n        public void RecommendAFriend(int referrerId, NewAccount friendsAccountDetails)\r\n        {\r\n            Validate(friendsAccountDetails);\r\n            \r\n            // most technologies have similar transaction APIs\r\n            using (var transaction = new System.Transactions.TransactionScope())\r\n            {\r\n                try\r\n                {\r\n                    // ... interact with domain multiple times\r\n                    transaction.Complete();\r\n                }\r\n                catch\r\n                {\r\n                    // transaction will roll back if Complete() not called\r\n                }\r\n            }\r\n        }\r\n\r\n        // technical validation carried out at the application level\r\n        private void Validate(NewAccount account)\r\n        {\r\n            if (!account.Email.Contains(\"@\"))\r\n                throw new ValidationFailure(\"Not a valid email address\");\r\n\r\n            if (account.Email.Length >= 50)\r\n                throw new ValidationFailure(\"Email address must be less than 50 characters\");\r\n\r\n            if (account.Nickname.Length >= 25)\r\n                throw new ValidationFailure(\"Nickname must be less than 25 characters\");\r\n\r\n            if (String.IsNullOrWhiteSpace(account.Email))\r\n                throw new ValidationFailure(\"You must supply an email\");\r\n\r\n            if (String.IsNullOrWhiteSpace(account.Nickname))\r\n                throw new ValidationFailure(\"You must supply a Nickname\");\r\n        }\r\n    }\r\n\r\n    public class NewAccount\r\n    {\r\n        public string Email { get; set; }\r\n\r\n        public string Nickname { get; set; }\r\n\r\n        public int Age { get; set; }\r\n    }\r\n\r\n    public class ValidationFailure : Exception\r\n    {\r\n        public ValidationFailure(string message) : base(message) { }\r\n    }\r\n}\r\n"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/PPPDDD.ApplicationServices.Gambling/ApplicationServices/3_error_handling/RecommendAFriendService.cs",
    "content": "﻿using Raven.Client;\r\nusing System;\r\n\r\nnamespace PPPDDD.ApplicationServices.Gambling.ApplicationServices.ErrorHandling\r\n{\r\n    public class RecommendAFriendService\r\n    {\r\n        public void RecommendAFriend(int referrerId, NewAccount friendsAccountDetails)\r\n        {\r\n            Validate(friendsAccountDetails);\r\n\r\n            // most technologies have similar transaction APIs\r\n            using (var transaction = new System.Transactions.TransactionScope())\r\n            {\r\n                try\r\n                {\r\n                    // ... interact with domain multiple times\r\n                    transaction.Complete();\r\n                }\r\n                catch(ReferralRejectedDueToLongTermOutstandingBalance)\r\n                {\r\n                    throw new ApplicationError(\r\n                        \"Sorry, this referral cannot be completed. The referrer \" +\r\n                        \"currently has an outstanding balance. Please contact \" +\r\n                        \"Customer Services\"\r\n                    );\r\n                    // transaction will roll back if Complete() not called\r\n                }\r\n            }\r\n        }\r\n\r\n        // technical validation carried out at the application level\r\n        private void Validate(NewAccount account)\r\n        {\r\n            if (!account.Email.Contains(\"@\"))\r\n                throw new ValidationFailure(\"Not a valid email address\");\r\n\r\n            if (account.Email.Length >= 50)\r\n                throw new ValidationFailure(\"Email address must be less than 50 characters\");\r\n\r\n            if (account.Nickname.Length >= 25)\r\n                throw new ValidationFailure(\"Nickname must be less than 25 characters\");\r\n\r\n            if (String.IsNullOrWhiteSpace(account.Email))\r\n                throw new ValidationFailure(\"You must supply an email\");\r\n\r\n            if (String.IsNullOrWhiteSpace(account.Nickname))\r\n                throw new ValidationFailure(\"You must supply a Nickname\");\r\n        }\r\n    }\r\n\r\n    public class NewAccount\r\n    {\r\n        public string Email { get; set; }\r\n\r\n        public string Nickname { get; set; }\r\n\r\n        public int Age { get; set; }\r\n    }\r\n\r\n    public class ValidationFailure : Exception\r\n    {\r\n        public ValidationFailure(string message) : base(message) { }\r\n    }\r\n\r\n    public class ApplicationError : Exception\r\n    {\r\n        public ApplicationError(string message) : base(message) { }\r\n    }\r\n\r\n    public class ReferralRejectedDueToLongTermOutstandingBalance : Exception { }\r\n}\r\n"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/PPPDDD.ApplicationServices.Gambling/ApplicationServices/4_logging_metrics/RecommendAFriendService.cs",
    "content": "﻿using System;\nusing StatsdClient;\nusing Domain;\nusing log4net;\n\nnamespace PPPDDD.ApplicationServices.Gambling.ApplicationServices.LoggingAndMetrics\n{\n    public class RecommendAFriendService\n    {\n        private ILog logger = LogManager.GetLogger(typeof(RecommendAFriendService));\n        private ICustomerDirectory customerDirectory;\n        private IReferAFriendPolicy referAFriendPolicy;\n\n        public RecommendAFriendService(ICustomerDirectory customerDirectory, IReferAFriendPolicy referAFriendPolicy)\n        {\n            this.customerDirectory = customerDirectory;\n            this.referAFriendPolicy = referAFriendPolicy;\n        }\n\n        public void RecommendAFriend(int referrerId, NewAccount friendsAccountDetails)\n        {\n            Validate(friendsAccountDetails);\n\n            // most technologies have similar transaction APIs\n            using (var transaction = new System.Transactions.TransactionScope())\n            {\n                try\n                {\n                    // customerDirectory is a domain repository\n                    var referrer = customerDirectory.Find(referrerId);\n                    var friend = customerDirectory.Add(friendsAccountDetails);\n                    // referAFriend policy is a domain policy\n                    referAFriendPolicy.Apply(referrer, friend);\n\n                    transaction.Complete();\n                    \n                    // log here to keep to avoid cluttering domain\n                    logger.Debug(\"Successful friend recommendation\");\n                    StatsdClient.Metrics.Counter(\"friendReferrals\");\n                }\n                catch (ReferralRejectedDueToLongTermOutstandingBalance ex)\n                {\n                    logger.Error(ex);\n                    StatsdClient.Metrics.Counter(\"ReferralRejected\");\n                    throw new ApplicationError(\n                        \"Sorry, this referral cannot be completed. The referrer \" +\n                        \"currently has an outstanding balance. Please contact \" +\n                        \"customer support\"\n                    );\n                    // transaction will roll back if Complete() not called\n                }\n            }\n        }\n\n        // technical validation carried out at the application level\n        private void Validate(NewAccount account)\n        {\n            if (!account.Email.Contains(\"@\"))\n                throw new ValidationFailure(\"Not a valid email address\");\n\n            if (account.Email.Length >= 50)\n                throw new ValidationFailure(\"Email address must be less than 50 characters\");\n\n            if (account.Nickname.Length >= 25)\n                throw new ValidationFailure(\"Nickname must be less than 25 characters\");\n\n            if (String.IsNullOrWhiteSpace(account.Email))\n                throw new ValidationFailure(\"You must supply an email\");\n\n            if (String.IsNullOrWhiteSpace(account.Nickname))\n                throw new ValidationFailure(\"You must supply a Nickname\");\n        }\n    }\n\n    public class ValidationFailure : Exception\n    {\n        public ValidationFailure(string message) : base(message) { }\n    }\n\n    public class ApplicationError : Exception\n    {\n        public ApplicationError(string message) : base(message) { }\n    }\n\n    public class ReferralRejectedDueToLongTermOutstandingBalance : Exception { }\n}\n\n// just to exemplify that these classes belong to the domain\nnamespace Domain\n{\n    public class NewAccount\n    {\n        public string Email { get; set; }\n\n        public string Nickname { get; set; }\n\n        public int Age { get; set; }\n    }\n\n    public class Customer\n    {\n        public int Id { get; set; }\n    }\n\n    public interface ICustomerDirectory\n    {\n        Customer Find(int customerId);\n\n        Customer Add(NewAccount account);\n    }\n\n    public interface IReferAFriendPolicy\n    {\n        void Apply(Customer referrer, Customer friend);\n    }\n}"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/PPPDDD.ApplicationServices.Gambling/ApplicationServices/5_authentication/AdminRecommendAFriendService.cs",
    "content": "﻿using System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Web;\r\n\r\nnamespace PPPDDD.ApplicationServices.Gambling.ApplicationServices._5_authentication\r\n{\r\n    public class AdminRecommendAFriendService\r\n    {\r\n        private IAuthenticationService authentication;\r\n        private IAuthorizationService authorization;\r\n        \r\n        public AdminRecommendAFriendService(IAuthenticationService authentication,\r\n                                        IAuthorizationService authorization)\r\n        {\r\n            this.authentication = authentication;\r\n            this.authorization = authorization;\r\n        }\r\n    \r\n        public void ReferAFriend(int referrerId, int friendId)\r\n        {\r\n            if (!authentication.IsLoggedInUser())\r\n                throw new AuthenticationError();\r\n\r\n            if (!authorization.IsCurrentUserAdmin())\r\n                throw new AuthorizationError();\r\n\r\n            // look up customers\r\n\r\n            // apply referral policy\r\n        }\r\n    }\r\n\r\n    public interface IAuthenticationService\r\n    {\r\n        bool IsLoggedInUser();\r\n    }\r\n\r\n    public interface IAuthorizationService\r\n    {\r\n        bool IsCurrentUserAdmin();\r\n    }\r\n\r\n    public class AuthenticationError : Exception { }\r\n\r\n    public class AuthorizationError : Exception { }\r\n}"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/PPPDDD.ApplicationServices.Gambling/ApplicationServices/6_communication/RecommendAFriendService.cs",
    "content": "﻿using System;\r\nusing Domain;\r\nusing NServiceBus;\r\nusing PPPDDD.ApplicationServices.Gambling.Messages;\r\n\r\nnamespace PPPDDD.ApplicationServices.Gambling.ApplicationServices.communication\r\n{\r\n    public class RecommendAFriendService\r\n    {\r\n        private ICustomerDirectory customerDirectory;\r\n        private IReferAFriendPolicy referAFriendPolicy;\r\n        private IBus bus;\r\n\r\n        public RecommendAFriendService(ICustomerDirectory customerDirectory, IReferAFriendPolicy referAFriendPolicy,\r\n            IBus bus)\r\n        {\r\n            this.customerDirectory = customerDirectory;\r\n            this.referAFriendPolicy = referAFriendPolicy;\r\n            this.bus = bus;\r\n        }\r\n\r\n        public void RecommendAFriend(int referrerId, NewAccount friendsAccountDetails)\r\n        {\r\n            Validate(friendsAccountDetails);\r\n\r\n            using (var transaction = new System.Transactions.TransactionScope())\r\n            {\r\n                try\r\n                {\r\n                    var referrer = customerDirectory.Find(referrerId);\r\n                    var friend = customerDirectory.Add(friendsAccountDetails);\r\n                    referAFriendPolicy.Apply(referrer, friend);\r\n\r\n                    transaction.Complete();\r\n\r\n                    var msg = new CustomerRegisteredViaReferralPolicy\r\n                    {\r\n                        ReferrerId = referrerId,\r\n                        FriendId = friend.Id\r\n                    };\r\n                    bus.Publish(msg);\r\n\r\n                }\r\n                catch (ReferralRejectedDueToLongTermOutstandingBalance)\r\n                {\r\n                    var msg = new ReferralSignupRejected\r\n                    {\r\n                        ReferrerId = referrerId,\r\n                        FriendEmail = friendsAccountDetails.Email,\r\n                        Reason = \"Referrer has long term outstanding balance\"\r\n                    };\r\n                    bus.Publish(msg);\r\n                }\r\n            }\r\n        }\r\n\r\n        private void Validate(NewAccount account)\r\n        {\r\n            // ...\r\n        }\r\n    }\r\n\r\n    public class ReferralRejectedDueToLongTermOutstandingBalance : Exception { }\r\n}\r\n\r\n// keep messagees (external communication contract) in separate project (see chapter 12)\r\nnamespace PPPDDD.ApplicationServices.Gambling.Messages\r\n{\r\n    public class CustomerRegisteredViaReferralPolicy\r\n    {\r\n        public int ReferrerId { get; set; }\r\n\r\n        public int FriendId { get; set; }\r\n    }\r\n\r\n    public class ReferralSignupRejected\r\n    {\r\n        public int ReferrerId { get; set; }\r\n\r\n        public string FriendEmail { get; set; }\r\n\r\n        public string Reason { get; set; }\r\n    }\r\n}"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/PPPDDD.ApplicationServices.Gambling/ApplicationServices/AsyncAwait/RecommendAFriend.cs",
    "content": "﻿using System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Threading.Tasks;\r\nusing System.Web;\r\nusing AsyncAwaitDomain;\r\n\r\nnamespace PPPDDD.ApplicationServices.Gambling.ApplicationServices.AsyncAwait\r\n{\r\n    public class RecommendAFriendService\r\n    {\r\n        private ICustomerDirectory directory;\r\n        private IReferAFriendPolicy policy;\r\n\r\n        public RecommendAFriendService(ICustomerDirectory customerDirectory,\r\n                                   IReferAFriendPolicy policy)\r\n        {\r\n            this.directory = customerDirectory;\r\n            this.policy = policy;\r\n        }\r\n\r\n        public async void ReferAFriend(int referrerId, NewAccount friend)\r\n        {\r\n            // ...\r\n            var referrer = await directory.Find(referrerId);\r\n            var newAcct = await directory.Create(friend);\r\n            policy.Apply(referrer, newAcct);\r\n            // ...\r\n        }\r\n    }\r\n}\r\n\r\nnamespace AsyncAwaitDomain\r\n{\r\n    public interface ICustomerDirectory\r\n    {\r\n        Task<Customer> Find(int customerId);\r\n\r\n        Task<Customer> Create(NewAccount details);\r\n    }\r\n\r\n    public class NewAccount\r\n    {\r\n        public string Email { get; set; }\r\n\r\n        public string Nickname { get; set; }\r\n\r\n        public int Age { get; set; }\r\n    }\r\n\r\n    public class Customer\r\n    {\r\n        public int Id { get; set; }\r\n    }\r\n\r\n    public interface IReferAFriendPolicy\r\n    {\r\n        void Apply(Customer referrer, Customer friend);\r\n    }\r\n}"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/PPPDDD.ApplicationServices.Gambling/ApplicationServices/CommandProcessor/BloatedRecommendAFriendService.cs",
    "content": "﻿using System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Web;\r\n\r\nnamespace PPPDDD.ApplicationServices.Gambling.ApplicationServices.CommandProcessor\r\n{\r\n    public class BloatedRefcommendAFriendService\r\n    {\r\n        public void RecommendAFriend(int referrerId, NewAccount friend)\r\n        {\r\n            // ...\r\n        }\r\n\r\n        public void RecommendAFriendInDifferentCountry(int referrerId, NewAccount friend)\r\n        {\r\n            // ...\r\n        }\r\n\r\n        public void ReverseFriendReferral(int referrerId, int friendId)\r\n        {\r\n            // ...\r\n        }\r\n\r\n        public void ReferAFriendWithoutLoyaltyBonus(int referrerId, NewAccount friend)\r\n        {\r\n            // ...\r\n        }\r\n\r\n        // .... more methods like this\r\n    }\r\n}"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/PPPDDD.ApplicationServices.Gambling/ApplicationServices/CommandProcessor/RecommendAFriend.cs",
    "content": "﻿using System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Web;\r\n\r\nnamespace PPPDDD.ApplicationServices.Gambling.ApplicationServices.CommandProcessor\r\n{\r\n    // command expressing intent\r\n    public class RecommendAFriend\r\n    {\r\n        public int ReferrerId { get; set; }\r\n\r\n        public NewAccount Friend { get; set; }\r\n    }\r\n\r\n    public interface IRecommendAFriendProcessor\r\n    {\r\n        void Process(RecommendAFriend command);\r\n    }\r\n\r\n    public class NewAccount\r\n    {\r\n        public string Email { get; set; }\r\n\r\n        public string Nickname { get; set; }\r\n\r\n        public int Age { get; set; }\r\n    }\r\n}"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/PPPDDD.ApplicationServices.Gambling/ApplicationServices/CommandProcessorChained/RecommendAFriend.cs",
    "content": "﻿using System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Web;\r\n\r\nnamespace PPPDDD.ApplicationServices.Gambling.ApplicationServices.CommandProcessorChained\r\n{\r\n    public interface ICommandProcessor<T>\r\n    {\r\n        void Process(T command);\r\n    }\r\n\r\n    public class RecommendAFriend\r\n    {\r\n        public int ReferrerId { get; set; }\r\n    }\r\n\r\n    public class RecommendAFriendProcessor : ICommandProcessor<RecommendAFriend>\r\n    {\r\n        public void Process(RecommendAFriend command)\r\n        {\r\n            Console.WriteLine(\"Processing ReferAFriend command\");\r\n        }\r\n    }\r\n\r\n    public class LoggingProcessor<T> : ICommandProcessor<T>\r\n    {\r\n        private ICommandProcessor<T> nextLinkInChain;\r\n\r\n        public LoggingProcessor(ICommandProcessor<T> processor)\r\n        {\r\n            this.nextLinkInChain = processor;\r\n        }\r\n\r\n        public void Process(T command)\r\n        {\r\n            // log something before\r\n            nextLinkInChain.Process(command);\r\n            // log something after\r\n        }\r\n    }\r\n\r\n    public class TransactionProcessor<T> : ICommandProcessor<T>\r\n    {\r\n        private ICommandProcessor<T> nextLinkInChain;\r\n\r\n        public TransactionProcessor(ICommandProcessor<T> processor)\r\n        {\r\n            this.nextLinkInChain = processor;\r\n        }\r\n\r\n        public void Process(T command)\r\n        {\r\n            // start transaction\r\n            try\r\n            {\r\n                nextLinkInChain.Process(command);\r\n                // commit transaction\r\n            }\r\n            catch\r\n            {\r\n                // rollback transaction\r\n            }\r\n        }\r\n    }\r\n\r\n    public static class Bootstrap\r\n    {\r\n        public static ICommandProcessor<RecommendAFriend> ReferAFriendProcessor { get; set; }\r\n\r\n        public static void ConfigureApplication()\r\n        {\r\n            // create inner processor\r\n            var referAFriendProcessor = new RecommendAFriendProcessor();\r\n            // wrap inner processor with logging\r\n            var loggingProcessor = new LoggingProcessor<RecommendAFriend>(referAFriendProcessor);\r\n            // wrap logging processor (that wraps inner) with a transaction\r\n            var transactionProcessor = new TransactionProcessor<RecommendAFriend>(loggingProcessor);\r\n\r\n            ReferAFriendProcessor = transactionProcessor;\r\n\r\n            // alternatively you can use dependency injection\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/PPPDDD.ApplicationServices.Gambling/ApplicationServices/FrameworkHooks/ErrorFilter.cs",
    "content": "﻿using System;\r\nusing System.Web;\r\nusing System.Web.Mvc;\r\nusing System.Web.Routing;\r\n\r\nnamespace PPPDDD.ApplicationServices.Gambling.ApplicationServices.FrameworkHooks\r\n{\r\n    public class ErrorFilter : HandleErrorAttribute\r\n    {\r\n        public override void OnException(ExceptionContext filterContext)\r\n        {\r\n            if (filterContext.Exception.GetType() == typeof(ApplicationError))\r\n            {\r\n                // return specific message to user\r\n                var msg = filterContext.Exception.Message;\r\n                ErrorResponse(msg, filterContext);\r\n            }\r\n            else\r\n            {\r\n                // return generic message for security reasons\r\n                var msg = \"Sorry. Something really unexpected has occurred\";\r\n                ErrorResponse(msg, filterContext);\r\n            }\r\n        }\r\n\r\n        public void ErrorResponse(string msg, ExceptionContext ec)\r\n        {\r\n            var routeData = new RouteValueDictionary(new { message = msg });\r\n            var response = new RedirectToRouteResult(\"ErrorPage\", routeData);\r\n            ec.Result = response;\r\n            ec.ExceptionHandled = true;\r\n        }\r\n    }\r\n\r\n\r\n    public class ApplicationError : Exception { }\r\n}"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/PPPDDD.ApplicationServices.Gambling/ApplicationServices/FrameworkHooks/TransactionFilter.cs",
    "content": "﻿using System;\r\nusing System.Transactions;\r\nusing System.Web;\r\nusing System.Web.Mvc;\r\n\r\nnamespace PPPDDD.ApplicationServices.Gambling.ApplicationServices.FrameworkHooks\r\n{\r\n    public class TransactionFilter : ActionFilterAttribute, IActionFilter\r\n    {\r\n        // executes before controller\r\n        public override void OnResultExecuting(ResultExecutingContext filterContext)\r\n        {\r\n            // start a transaction\r\n            var t = new TransactionScope();\r\n            HttpContext.Current.Items[\"transaction\"] = t;\r\n            base.OnResultExecuting(filterContext);\r\n        }\r\n\r\n        // executes after controller\r\n        public override void OnActionExecuted(ActionExecutedContext filterContext)\r\n        {\r\n            // close the transaction created at start of this request\r\n            var t = (TransactionScope)HttpContext.Current.Items[\"transaction\"];\r\n            t.Complete();\r\n\r\n            base.OnActionExecuted(filterContext);\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/PPPDDD.ApplicationServices.Gambling/ApplicationServices/PublishSubscribe/RecommendAFriend.cs",
    "content": "﻿using System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Web;\r\nusing Domain;\r\n\r\nnamespace PPPDDD.ApplicationServices.Gambling.ApplicationServices.PublishSubscribe\r\n{\r\n    public class RecommendAFriendService\r\n    {\r\n        private IReferralPolicy policy;\r\n\r\n        public RecommendAFriendService(Domain.IReferralPolicy policy)\r\n        {\r\n            // subscribe to events on domain model\r\n            policy.ReferralAccepted += HandleReferralAccepted;\r\n            policy.ReferralRejected += HandleReferralRejected;\r\n\r\n            this.policy = policy;\r\n        }\r\n\r\n        private void HandleReferralAccepted(object sender, Domain.Referral e)\r\n        {\r\n            // send confirmation emails etc\r\n        }\r\n\r\n        private void HandleReferralRejected(object sender, Domain.Referral e)\r\n        {\r\n            // send rejection emails etc\r\n        }\r\n\r\n        public void ReferAFriend(int referrerId, NewAccount friend)\r\n        {\r\n            // validation, open transaction etc\r\n            var command = new RecommendAFriend\r\n            {\r\n                ReferrerId = referrerId,\r\n                Friend = friend\r\n            };\r\n            policy.Apply(command);\r\n            // close transaction - success and failure handled in handlers\r\n        }\r\n    }\r\n}\r\n\r\n// named appropriately after your domain and living in another project\r\nnamespace Domain\r\n{\r\n    public interface IReferralPolicy\r\n    {\r\n        event EventHandler<Referral> ReferralAccepted;\r\n\r\n        event EventHandler<Referral> ReferralRejected;\r\n\r\n        void Apply(RecommendAFriend command);\r\n    }\r\n\r\n    public class Referral\r\n    {\r\n        public int ReferrerId { get; set; }\r\n\r\n        public int FriendId { get; set; }\r\n    }\r\n\r\n    public class RecommendAFriend\r\n    {\r\n        public int ReferrerId { get; set; }\r\n\r\n        public NewAccount Friend { get; set; }\r\n    }\r\n}"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/PPPDDD.ApplicationServices.Gambling/ApplicationServices/PublishSubscribeAsync/ReferAFriend.cs",
    "content": "﻿using System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Web;\r\nusing Domain;\r\nusing System.Threading.Tasks;\r\n\r\nnamespace PPPDDD.ApplicationServices.Gambling.ApplicationServices.PublishSubscribeAsync\r\n{\r\n    public class RecommendAFriendService\r\n    {\r\n        private IReferralPolicy policy;\r\n\r\n        public RecommendAFriendService(Domain.IReferralPolicy policy)\r\n        {\r\n            // subscribe to events on domain model\r\n            policy.ReferralAccepted += HandleReferralAccepted;\r\n            policy.ReferralRejected += HandleReferralRejected;\r\n\r\n            this.policy = policy;\r\n        }\r\n\r\n        private void HandleReferralAccepted(object sender, Domain.Referral e)\r\n        {\r\n            // send confirmation emails etc\r\n        }\r\n\r\n        private void HandleReferralRejected(object sender, Domain.Referral e)\r\n        {\r\n            // send rejection emails etc\r\n        }\r\n\r\n        public void RecommendAFriend(int referrerId, NewAccount friend)\r\n        {\r\n            // validation, open transaction etc\r\n            var command = new RecommendAFriend\r\n            {\r\n                ReferrerId = referrerId,\r\n                Friend = friend\r\n            };\r\n            Task.Factory.StartNew(() => policy.Apply(command));\r\n            // close transaction - success and failure handled in handlers\r\n        }\r\n    }\r\n}\r\n\r\n"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/PPPDDD.ApplicationServices.Gambling/ApplicationServices/RequestReply/RecommendAFriend.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Web;\nusing Domain;\nusing NewAccount = Domain.NewAccount;\nusing PPPDDD.ApplicationServices.Gambling.ApplicationServices.ErrorHandling;\n\nnamespace PPPDDD.ApplicationServices.Gambling.ApplicationServices.RequestReply\n{\n    public class RecommendAFriendService\n    {\n        private IReferralPolicy policy;\n\n        public RecommendAFriendService(Domain.IReferralPolicy policy)\n        {\n            this.policy = policy;\n        }\n\n        public RecommendAFriendResponse RecommendAFriend(RecommendAFriendRequest request)\n        {\n            try\n            {\n                var command = new RecommendAFriend\n                {\n                    ReferrerId = request.ReferrerId,\n                    Friend = request.Friend\n                };\n\n                policy.Apply(command);\n\n                return new RecommendAFriendResponse\n                {\n                    Status = RecommendAFriendStatus.Success\n                };\n            }\n            catch (ReferralRejectedDueToLongTermOutstandingBalance)\n            {\n                return new RecommendAFriendResponse\n                {\n                    Status = RecommendAFriendStatus.ReferralRejected\n                };\n            }\n        }\n    }\n\n    public class RecommendAFriendRequest\n    {\n        public int ReferrerId { get; set; }\n\n        public NewAccount Friend { get; set; }\n    }\n\n    public class RecommendAFriendResponse\n    {\n        public RecommendAFriendStatus Status { get; set; }\n    }\n\n    public enum RecommendAFriendStatus\n    {\n        Success,\n        ReferralRejected\n    }\n}\n"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/PPPDDD.ApplicationServices.Gambling/Controllers/RecommendAFriendController.cs",
    "content": "﻿using System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Web;\r\nusing System.Web.Mvc;\r\nusing ControllerDomain;\r\nusing System.Threading.Tasks;\r\n\r\nnamespace PPPDDD.ApplicationServices.Gambling.Controllers\r\n{\r\n    public class RecommendAFriendController : Controller\r\n    {\r\n        private ICustomerDirectory directory;\r\n        private IReferAFriendPolicy policy;\r\n\r\n        public RecommendAFriendController(\r\n            ICustomerDirectory customerDirectory, IReferAFriendPolicy policy)\r\n        {\r\n            this.directory = customerDirectory;\r\n            this.policy = policy;\r\n        }\r\n\r\n        // all infrastructure concerns handled by framework\r\n        public ActionResult Index(int referrerId, NewAccount friend)\r\n        {\r\n            var referrer = directory.Find(referrerId);\r\n            var newAcct = directory.Create(friend);\r\n            policy.Apply(referrer, newAcct);\r\n\r\n            return View();\r\n        }\r\n\t}\r\n}\r\n\r\nnamespace ControllerDomain\r\n{\r\n    public interface ICustomerDirectory\r\n    {\r\n        Customer Find(int customerId);\r\n\r\n        Customer Create(NewAccount details);\r\n    }\r\n\r\n    public class NewAccount\r\n    {\r\n        public string Email { get; set; }\r\n\r\n        public string Nickname { get; set; }\r\n\r\n        public int Age { get; set; }\r\n    }\r\n\r\n    public class Customer\r\n    {\r\n        public int Id { get; set; }\r\n    }\r\n\r\n    public interface IReferAFriendPolicy\r\n    {\r\n        void Apply(Customer referrer, Customer friend);\r\n    }\r\n}"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/PPPDDD.ApplicationServices.Gambling/Global.asax",
    "content": "﻿<%@ Application Codebehind=\"Global.asax.cs\" Inherits=\"PPPDDD.ApplicationServices.Gambling.MvcApplication\" Language=\"C#\" %>\r\n"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/PPPDDD.ApplicationServices.Gambling/Global.asax.cs",
    "content": "﻿using System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Web;\r\nusing System.Web.Mvc;\r\nusing System.Web.Routing;\r\n\r\nnamespace PPPDDD.ApplicationServices.Gambling\r\n{\r\n    public class MvcApplication : System.Web.HttpApplication\r\n    {\r\n        protected void Application_Start()\r\n        {\r\n            AreaRegistration.RegisterAllAreas();\r\n            RouteConfig.RegisterRoutes(RouteTable.Routes);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/PPPDDD.ApplicationServices.Gambling/PPPDDD.ApplicationServices.RecommendAFriend.csproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"12.0\" DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <Import Project=\"$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props\" Condition=\"Exists('$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props')\" />\n  <PropertyGroup>\n    <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>\n    <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>\n    <ProductVersion>\n    </ProductVersion>\n    <SchemaVersion>2.0</SchemaVersion>\n    <ProjectGuid>{DF2F8764-86BC-4833-98A0-5A7E34A6EB7E}</ProjectGuid>\n    <ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>\n    <OutputType>Library</OutputType>\n    <AppDesignerFolder>Properties</AppDesignerFolder>\n    <RootNamespace>PPPDDD.ApplicationServices.Gambling</RootNamespace>\n    <AssemblyName>PPPDDD.ApplicationServices.Gambling</AssemblyName>\n    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\n    <UseIISExpress>true</UseIISExpress>\n    <IISExpressSSLPort />\n    <IISExpressAnonymousAuthentication />\n    <IISExpressWindowsAuthentication />\n    <IISExpressUseClassicPipelineMode />\n    <SolutionDir Condition=\"$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'\">..\\</SolutionDir>\n    <RestorePackages>true</RestorePackages>\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' \">\n    <DebugSymbols>true</DebugSymbols>\n    <DebugType>full</DebugType>\n    <Optimize>false</Optimize>\n    <OutputPath>bin\\</OutputPath>\n    <DefineConstants>DEBUG;TRACE</DefineConstants>\n    <ErrorReport>prompt</ErrorReport>\n    <WarningLevel>4</WarningLevel>\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' \">\n    <DebugType>pdbonly</DebugType>\n    <Optimize>true</Optimize>\n    <OutputPath>bin\\</OutputPath>\n    <DefineConstants>TRACE</DefineConstants>\n    <ErrorReport>prompt</ErrorReport>\n    <WarningLevel>4</WarningLevel>\n  </PropertyGroup>\n  <ItemGroup>\n    <Reference Include=\"log4net\">\n      <HintPath>..\\packages\\log4net.2.0.3\\lib\\net40-full\\log4net.dll</HintPath>\n    </Reference>\n    <Reference Include=\"Microsoft.CSharp\" />\n    <Reference Include=\"NServiceBus\">\n      <HintPath>..\\packages\\NServiceBus.Interfaces.4.6.1\\lib\\net40\\NServiceBus.dll</HintPath>\n    </Reference>\n    <Reference Include=\"NServiceBus.Core\">\n      <HintPath>..\\packages\\NServiceBus.4.6.1\\lib\\net40\\NServiceBus.Core.dll</HintPath>\n    </Reference>\n    <Reference Include=\"Raven.Abstractions\">\n      <HintPath>..\\packages\\RavenDB.Client.2.5.2874\\lib\\net45\\Raven.Abstractions.dll</HintPath>\n    </Reference>\n    <Reference Include=\"Raven.Client.Lightweight\">\n      <HintPath>..\\packages\\RavenDB.Client.2.5.2874\\lib\\net45\\Raven.Client.Lightweight.dll</HintPath>\n    </Reference>\n    <Reference Include=\"StatsdClient\">\n      <HintPath>..\\packages\\StatsdClient.1.0.0.16\\lib\\net35\\StatsdClient.dll</HintPath>\n    </Reference>\n    <Reference Include=\"StatsdClient.Configuration\">\n      <HintPath>..\\packages\\StatsdClient.1.0.0.16\\lib\\net35\\StatsdClient.Configuration.dll</HintPath>\n    </Reference>\n    <Reference Include=\"System.ComponentModel.Composition\" />\n    <Reference Include=\"System.Transactions\" />\n    <Reference Include=\"System.Web.DynamicData\" />\n    <Reference Include=\"System.Web.Entity\" />\n    <Reference Include=\"System.Web.ApplicationServices\" />\n    <Reference Include=\"System.ComponentModel.DataAnnotations\" />\n    <Reference Include=\"System\" />\n    <Reference Include=\"System.Data\" />\n    <Reference Include=\"System.Core\" />\n    <Reference Include=\"System.Data.DataSetExtensions\" />\n    <Reference Include=\"System.Web.Extensions\" />\n    <Reference Include=\"System.Xml.Linq\" />\n    <Reference Include=\"System.Drawing\" />\n    <Reference Include=\"System.Web\" />\n    <Reference Include=\"System.Xml\" />\n    <Reference Include=\"System.Configuration\" />\n    <Reference Include=\"System.Web.Services\" />\n    <Reference Include=\"System.EnterpriseServices\" />\n  </ItemGroup>\n  <ItemGroup>\n    <Reference Include=\"System.Web.Razor\">\n      <HintPath>..\\packages\\Microsoft.AspNet.Razor.3.0.0\\lib\\net45\\System.Web.Razor.dll</HintPath>\n    </Reference>\n    <Reference Include=\"System.Web.Webpages\">\n      <HintPath>..\\packages\\Microsoft.AspNet.Webpages.3.0.0\\lib\\net45\\System.Web.Webpages.dll</HintPath>\n    </Reference>\n    <Reference Include=\"System.Web.Webpages.Deployment\">\n      <HintPath>..\\packages\\Microsoft.AspNet.Webpages.3.0.0\\lib\\net45\\System.Web.Webpages.Deployment.dll</HintPath>\n    </Reference>\n    <Reference Include=\"System.Web.Webpages.Razor\">\n      <HintPath>..\\packages\\Microsoft.AspNet.Webpages.3.0.0\\lib\\net45\\System.Web.Webpages.Razor.dll</HintPath>\n    </Reference>\n    <Reference Include=\"System.Web.Helpers\">\n      <HintPath>..\\packages\\Microsoft.AspNet.Webpages.3.0.0\\lib\\net45\\System.Web.Helpers.dll</HintPath>\n    </Reference>\n    <Reference Include=\"System.Web.Mvc\">\n      <HintPath>..\\packages\\Microsoft.AspNet.Mvc.5.0.0\\lib\\net45\\System.Web.Mvc.dll</HintPath>\n    </Reference>\n  </ItemGroup>\n  <ItemGroup>\n    <Content Include=\"Global.asax\" />\n    <Content Include=\"Web.config\" />\n  </ItemGroup>\n  <ItemGroup>\n    <Compile Include=\"ApplicationServices\\1_validation\\RecommendAFriendService.cs\" />\n    <Compile Include=\"ApplicationServices\\2_transaction\\RecommendAFriendService.cs\" />\n    <Compile Include=\"ApplicationServices\\3_error_handling\\RecommendAFriendService.cs\" />\n    <Compile Include=\"ApplicationServices\\4_logging_metrics\\RecommendAFriendService.cs\" />\n    <Compile Include=\"ApplicationServices\\5_authentication\\AdminRecommendAFriendService.cs\" />\n    <Compile Include=\"ApplicationServices\\6_communication\\RecommendAFriendService.cs\" />\n    <Compile Include=\"ApplicationServices\\AsyncAwait\\RecommendAFriend.cs\" />\n    <Compile Include=\"ApplicationServices\\CommandProcessorChained\\RecommendAFriend.cs\" />\n    <Compile Include=\"ApplicationServices\\CommandProcessor\\BloatedRecommendAFriendService.cs\" />\n    <Compile Include=\"ApplicationServices\\CommandProcessor\\RecommendAFriend.cs\" />\n    <Compile Include=\"ApplicationServices\\FrameworkHooks\\ErrorFilter.cs\" />\n    <Compile Include=\"ApplicationServices\\FrameworkHooks\\TransactionFilter.cs\" />\n    <Compile Include=\"ApplicationServices\\PublishSubscribeAsync\\ReferAFriend.cs\" />\n    <Compile Include=\"ApplicationServices\\PublishSubscribe\\RecommendAFriend.cs\" />\n    <Compile Include=\"ApplicationServices\\RequestReply\\RecommendAFriend.cs\" />\n    <Compile Include=\"App_Start\\RouteConfig.cs\" />\n    <Compile Include=\"Controllers\\RecommendAFriendController.cs\" />\n    <Compile Include=\"Global.asax.cs\">\n      <DependentUpon>Global.asax</DependentUpon>\n    </Compile>\n    <Compile Include=\"Properties\\AssemblyInfo.cs\" />\n  </ItemGroup>\n  <ItemGroup>\n    <Content Include=\"Views\\web.config\" />\n    <Content Include=\"packages.config\" />\n    <None Include=\"Web.Debug.config\">\n      <DependentUpon>Web.config</DependentUpon>\n    </None>\n    <None Include=\"Web.Release.config\">\n      <DependentUpon>Web.config</DependentUpon>\n    </None>\n  </ItemGroup>\n  <ItemGroup>\n    <Folder Include=\"App_Data\\\" />\n    <Folder Include=\"Models\\\" />\n    <Folder Include=\"Views\\RecommendAFriend\\\" />\n  </ItemGroup>\n  <PropertyGroup>\n    <VisualStudioVersion Condition=\"'$(VisualStudioVersion)' == ''\">10.0</VisualStudioVersion>\n    <VSToolsPath Condition=\"'$(VSToolsPath)' == ''\">$(MSBuildExtensionsPath32)\\Microsoft\\VisualStudio\\v$(VisualStudioVersion)</VSToolsPath>\n  </PropertyGroup>\n  <Import Project=\"$(MSBuildBinPath)\\Microsoft.CSharp.targets\" />\n  <Import Project=\"$(VSToolsPath)\\WebApplications\\Microsoft.WebApplication.targets\" Condition=\"'$(VSToolsPath)' != ''\" />\n  <Import Project=\"$(MSBuildExtensionsPath32)\\Microsoft\\VisualStudio\\v10.0\\WebApplications\\Microsoft.WebApplication.targets\" Condition=\"false\" />\n  <ProjectExtensions>\n    <VisualStudio>\n      <FlavorProperties GUID=\"{349c5851-65df-11da-9384-00065b846f21}\">\n        <WebProjectProperties>\n          <UseIIS>True</UseIIS>\n          <AutoAssignPort>True</AutoAssignPort>\n          <DevelopmentServerPort>1154</DevelopmentServerPort>\n          <DevelopmentServerVPath>/</DevelopmentServerVPath>\n          <IISUrl>http://localhost:1154/</IISUrl>\n          <NTLMAuthentication>False</NTLMAuthentication>\n          <UseCustomServer>False</UseCustomServer>\n          <CustomServerUrl>\n          </CustomServerUrl>\n          <SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>\n        </WebProjectProperties>\n      </FlavorProperties>\n    </VisualStudio>\n  </ProjectExtensions>\n  <Import Project=\"$(SolutionDir)\\.nuget\\NuGet.targets\" Condition=\"Exists('$(SolutionDir)\\.nuget\\NuGet.targets')\" />\n  <Target Name=\"EnsureNuGetPackageBuildImports\" BeforeTargets=\"PrepareForBuild\">\n    <PropertyGroup>\n      <ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them.  For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>\n    </PropertyGroup>\n    <Error Condition=\"!Exists('$(SolutionDir)\\.nuget\\NuGet.targets')\" Text=\"$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\\.nuget\\NuGet.targets'))\" />\n  </Target>\n  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \n       Other similar extension points exist, see Microsoft.Common.targets.\n  <Target Name=\"BeforeBuild\">\n  </Target>\n  <Target Name=\"AfterBuild\">\n  </Target>\n  -->\n</Project>"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/PPPDDD.ApplicationServices.Gambling/PPPDDD.ApplicationServices.RecommendAFriend.sln",
    "content": "﻿\nMicrosoft Visual Studio Solution File, Format Version 12.00\n# Visual Studio Express 2013 for Web\nVisualStudioVersion = 12.0.31101.0\nMinimumVisualStudioVersion = 10.0.40219.1\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"PPPDDD.ApplicationServices.RecommendAFriend\", \"PPPDDD.ApplicationServices.RecommendAFriend.csproj\", \"{DF2F8764-86BC-4833-98A0-5A7E34A6EB7E}\"\nEndProject\nGlobal\n\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\n\t\tDebug|Any CPU = Debug|Any CPU\n\t\tRelease|Any CPU = Release|Any CPU\n\tEndGlobalSection\n\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\n\t\t{DF2F8764-86BC-4833-98A0-5A7E34A6EB7E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{DF2F8764-86BC-4833-98A0-5A7E34A6EB7E}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{DF2F8764-86BC-4833-98A0-5A7E34A6EB7E}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{DF2F8764-86BC-4833-98A0-5A7E34A6EB7E}.Release|Any CPU.Build.0 = Release|Any CPU\n\tEndGlobalSection\n\tGlobalSection(SolutionProperties) = preSolution\n\t\tHideSolutionNode = FALSE\n\tEndGlobalSection\nEndGlobal\n"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/PPPDDD.ApplicationServices.Gambling/Properties/AssemblyInfo.cs",
    "content": "﻿using System.Reflection;\r\nusing System.Runtime.CompilerServices;\r\nusing System.Runtime.InteropServices;\r\n\r\n// General Information about an assembly is controlled through the following \r\n// set of attributes. Change these attribute values to modify the information\r\n// associated with an assembly.\r\n[assembly: AssemblyTitle(\"PPPDDD.ApplicationServices.Gambling\")]\r\n[assembly: AssemblyDescription(\"\")]\r\n[assembly: AssemblyConfiguration(\"\")]\r\n[assembly: AssemblyCompany(\"\")]\r\n[assembly: AssemblyProduct(\"PPPDDD.ApplicationServices.Gambling\")]\r\n[assembly: AssemblyCopyright(\"Copyright ©  2014\")]\r\n[assembly: AssemblyTrademark(\"\")]\r\n[assembly: AssemblyCulture(\"\")]\r\n\r\n// Setting ComVisible to false makes the types in this assembly not visible \r\n// to COM components.  If you need to access a type in this assembly from \r\n// COM, set the ComVisible attribute to true on that type.\r\n[assembly: ComVisible(false)]\r\n\r\n// The following GUID is for the ID of the typelib if this project is exposed to COM\r\n[assembly: Guid(\"38a58e47-9ce5-499a-a7ad-15f23a5d0083\")]\r\n\r\n// Version information for an assembly consists of the following four values:\r\n//\r\n//      Major Version\r\n//      Minor Version \r\n//      Build Number\r\n//      Revision\r\n//\r\n// You can specify all the values or you can default the Revision and Build Numbers \r\n// by using the '*' as shown below:\r\n[assembly: AssemblyVersion(\"1.0.0.0\")]\r\n[assembly: AssemblyFileVersion(\"1.0.0.0\")]\r\n"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/PPPDDD.ApplicationServices.Gambling/Views/web.config",
    "content": "﻿<?xml version=\"1.0\"?>\r\n\r\n<configuration>\r\n  <configSections>\r\n    <sectionGroup name=\"system.web.webPages.razor\" type=\"System.Web.WebPages.Razor.Configuration.RazorWebSectionGroup, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35\">\r\n      <section name=\"host\" type=\"System.Web.WebPages.Razor.Configuration.HostSection, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35\" requirePermission=\"false\" />\r\n      <section name=\"pages\" type=\"System.Web.WebPages.Razor.Configuration.RazorPagesSection, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35\" requirePermission=\"false\" />\r\n    </sectionGroup>\r\n  </configSections>\r\n\r\n  <system.web.webPages.razor>\r\n    <host factoryType=\"System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35\" />\r\n    <pages pageBaseType=\"System.Web.Mvc.WebViewPage\">\r\n      <namespaces>\r\n        <add namespace=\"System.Web.Mvc\" />\r\n        <add namespace=\"System.Web.Mvc.Ajax\" />\r\n        <add namespace=\"System.Web.Mvc.Html\" />\r\n        <add namespace=\"System.Web.Routing\" />\r\n        <add namespace=\"PPPDDD.ApplicationServices.Gambling\" />\r\n      </namespaces>\r\n    </pages>\r\n  </system.web.webPages.razor>\r\n\r\n  <appSettings>\r\n    <add key=\"webpages:Enabled\" value=\"false\" />\r\n  </appSettings>\r\n\r\n  <system.webServer>\r\n    <handlers>\r\n      <remove name=\"BlockViewHandler\"/>\r\n      <add name=\"BlockViewHandler\" path=\"*\" verb=\"*\" preCondition=\"integratedMode\" type=\"System.Web.HttpNotFoundHandler\" />\r\n    </handlers>\r\n  </system.webServer>\r\n</configuration>\r\n"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/PPPDDD.ApplicationServices.Gambling/Web.Debug.config",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n\r\n<!-- For more information on using web.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 -->\r\n\r\n<configuration xmlns:xdt=\"http://schemas.microsoft.com/XML-Document-Transform\">\r\n  <!--\r\n    In the example below, the \"SetAttributes\" transform will change the value of \r\n    \"connectionString\" to use \"ReleaseSQLServer\" only when the \"Match\" locator \r\n    finds an attribute \"name\" that has a value of \"MyDB\".\r\n    \r\n    <connectionStrings>\r\n      <add name=\"MyDB\" \r\n        connectionString=\"Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True\" \r\n        xdt:Transform=\"SetAttributes\" xdt:Locator=\"Match(name)\"/>\r\n    </connectionStrings>\r\n  -->\r\n  <system.web>\r\n    <!--\r\n      In the example below, the \"Replace\" transform will replace the entire \r\n      <customErrors> section of your web.config file.\r\n      Note that because there is only one customErrors section under the \r\n      <system.web> node, there is no need to use the \"xdt:Locator\" attribute.\r\n      \r\n      <customErrors defaultRedirect=\"GenericError.htm\"\r\n        mode=\"RemoteOnly\" xdt:Transform=\"Replace\">\r\n        <error statusCode=\"500\" redirect=\"InternalError.htm\"/>\r\n      </customErrors>\r\n    -->\r\n  </system.web>\r\n</configuration>"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/PPPDDD.ApplicationServices.Gambling/Web.Release.config",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n\r\n<!-- For more information on using web.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 -->\r\n\r\n<configuration xmlns:xdt=\"http://schemas.microsoft.com/XML-Document-Transform\">\r\n  <!--\r\n    In the example below, the \"SetAttributes\" transform will change the value of \r\n    \"connectionString\" to use \"ReleaseSQLServer\" only when the \"Match\" locator \r\n    finds an attribute \"name\" that has a value of \"MyDB\".\r\n    \r\n    <connectionStrings>\r\n      <add name=\"MyDB\" \r\n        connectionString=\"Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True\" \r\n        xdt:Transform=\"SetAttributes\" xdt:Locator=\"Match(name)\"/>\r\n    </connectionStrings>\r\n  -->\r\n  <system.web>\r\n    <compilation xdt:Transform=\"RemoveAttributes(debug)\" />\r\n    <!--\r\n      In the example below, the \"Replace\" transform will replace the entire \r\n      <customErrors> section of your web.config file.\r\n      Note that because there is only one customErrors section under the \r\n      <system.web> node, there is no need to use the \"xdt:Locator\" attribute.\r\n      \r\n      <customErrors defaultRedirect=\"GenericError.htm\"\r\n        mode=\"RemoteOnly\" xdt:Transform=\"Replace\">\r\n        <error statusCode=\"500\" redirect=\"InternalError.htm\"/>\r\n      </customErrors>\r\n    -->\r\n  </system.web>\r\n</configuration>"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/PPPDDD.ApplicationServices.Gambling/Web.config",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<!--\r\n  For more information on how to configure your ASP.NET application, please visit\r\n  http://go.microsoft.com/fwlink/?LinkId=301880\r\n  -->\r\n<configuration>\r\n  <appSettings>\r\n    <add key=\"webpages:Version\" value=\"3.0.0.0\" />\r\n    <add key=\"webpages:Enabled\" value=\"false\" />\r\n     <add key=\"ClientValidationEnabled\" value=\"true\" />\r\n    <add key=\"UnobtrusiveJavaScriptEnabled\" value=\"true\" />\r\n  </appSettings>\r\n  <system.web>\r\n    <compilation debug=\"true\" targetFramework=\"4.5\" />\r\n    <httpRuntime targetFramework=\"4.5\" />\r\n  </system.web>\r\n  <runtime>\r\n    <assemblyBinding xmlns=\"urn:schemas-microsoft-com:asm.v1\">\r\n      <dependentAssembly>\r\n        <assemblyIdentity name=\"Raven.Client.Lightweight\" publicKeyToken=\"37f41c7f99471593\" culture=\"neutral\" />\r\n        <bindingRedirect oldVersion=\"0.0.0.0-2.5.0.0\" newVersion=\"2.5.0.0\" />\r\n      </dependentAssembly>\r\n      <dependentAssembly>\r\n        <assemblyIdentity name=\"Raven.Abstractions\" publicKeyToken=\"37f41c7f99471593\" culture=\"neutral\" />\r\n        <bindingRedirect oldVersion=\"0.0.0.0-2.5.0.0\" newVersion=\"2.5.0.0\" />\r\n      </dependentAssembly>\r\n    </assemblyBinding>\r\n  </runtime>\r\n</configuration>\r\n"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/PPPDDD.ApplicationServices.Gambling/packages.config",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<packages>\r\n  <package id=\"log4net\" version=\"2.0.3\" targetFramework=\"net45\" />\r\n  <package id=\"Microsoft.AspNet.Mvc\" version=\"5.0.0\" targetFramework=\"net45\" />\r\n  <package id=\"Microsoft.AspNet.Razor\" version=\"3.0.0\" targetFramework=\"net45\" />\r\n  <package id=\"Microsoft.AspNet.WebPages\" version=\"3.0.0\" targetFramework=\"net45\" />\r\n  <package id=\"NServiceBus\" version=\"4.6.1\" targetFramework=\"net45\" />\r\n  <package id=\"NServiceBus.Interfaces\" version=\"4.6.1\" targetFramework=\"net45\" />\r\n  <package id=\"RavenDB.Client\" version=\"2.5.2874\" targetFramework=\"net45\" />\r\n  <package id=\"StatsdClient\" version=\"1.0.0.16\" targetFramework=\"net45\" />\r\n</packages>"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/PPPDDD.ApplicationServices.RecommendAFriend.sln",
    "content": "﻿\nMicrosoft Visual Studio Solution File, Format Version 12.00\n# Visual Studio Express 2013 for Web\nVisualStudioVersion = 12.0.31101.0\nMinimumVisualStudioVersion = 10.0.40219.1\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"Tests\", \"PPPDDD.ApplicationServices.Tests\\Tests.csproj\", \"{E9ED1E1B-7722-4AF7-86B3-6FDE6A3B6A15}\"\nEndProject\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"PPPDDD.ApplicationServices.RecommendAFriend\", \"PPPDDD.ApplicationServices.Gambling\\PPPDDD.ApplicationServices.RecommendAFriend.csproj\", \"{DF2F8764-86BC-4833-98A0-5A7E34A6EB7E}\"\nEndProject\nProject(\"{2150E333-8FDC-42A3-9474-1A3956D46DE8}\") = \".nuget\", \".nuget\", \"{4DE68C7C-1370-4861-97C9-79840B6B1A0F}\"\n\tProjectSection(SolutionItems) = preProject\n\t\t.nuget\\NuGet.Config = .nuget\\NuGet.Config\n\t\t.nuget\\NuGet.exe = .nuget\\NuGet.exe\n\t\t.nuget\\NuGet.targets = .nuget\\NuGet.targets\n\tEndProjectSection\nEndProject\nGlobal\n\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\n\t\tDebug|Any CPU = Debug|Any CPU\n\t\tRelease|Any CPU = Release|Any CPU\n\tEndGlobalSection\n\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\n\t\t{E9ED1E1B-7722-4AF7-86B3-6FDE6A3B6A15}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{E9ED1E1B-7722-4AF7-86B3-6FDE6A3B6A15}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{E9ED1E1B-7722-4AF7-86B3-6FDE6A3B6A15}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{E9ED1E1B-7722-4AF7-86B3-6FDE6A3B6A15}.Release|Any CPU.Build.0 = Release|Any CPU\n\t\t{DF2F8764-86BC-4833-98A0-5A7E34A6EB7E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{DF2F8764-86BC-4833-98A0-5A7E34A6EB7E}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{DF2F8764-86BC-4833-98A0-5A7E34A6EB7E}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{DF2F8764-86BC-4833-98A0-5A7E34A6EB7E}.Release|Any CPU.Build.0 = Release|Any CPU\n\tEndGlobalSection\n\tGlobalSection(SolutionProperties) = preSolution\n\t\tHideSolutionNode = FALSE\n\tEndGlobalSection\nEndGlobal\n"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/PPPDDD.ApplicationServices.Tests/Properties/AssemblyInfo.cs",
    "content": "﻿using System.Reflection;\r\nusing System.Runtime.CompilerServices;\r\nusing System.Runtime.InteropServices;\r\n\r\n// General Information about an assembly is controlled through the following \r\n// set of attributes. Change these attribute values to modify the information\r\n// associated with an assembly.\r\n[assembly: AssemblyTitle(\"Tests\")]\r\n[assembly: AssemblyDescription(\"\")]\r\n[assembly: AssemblyConfiguration(\"\")]\r\n[assembly: AssemblyCompany(\"\")]\r\n[assembly: AssemblyProduct(\"Tests\")]\r\n[assembly: AssemblyCopyright(\"Copyright ©  2014\")]\r\n[assembly: AssemblyTrademark(\"\")]\r\n[assembly: AssemblyCulture(\"\")]\r\n\r\n// Setting ComVisible to false makes the types in this assembly not visible \r\n// to COM components.  If you need to access a type in this assembly from \r\n// COM, set the ComVisible attribute to true on that type.\r\n[assembly: ComVisible(false)]\r\n\r\n// The following GUID is for the ID of the typelib if this project is exposed to COM\r\n[assembly: Guid(\"80819b98-929a-4d49-99ef-ed0e759fca74\")]\r\n\r\n// Version information for an assembly consists of the following four values:\r\n//\r\n//      Major Version\r\n//      Minor Version \r\n//      Build Number\r\n//      Revision\r\n//\r\n// You can specify all the values or you can default the Build and Revision Numbers \r\n// by using the '*' as shown below:\r\n// [assembly: AssemblyVersion(\"1.0.*\")]\r\n[assembly: AssemblyVersion(\"1.0.0.0\")]\r\n[assembly: AssemblyFileVersion(\"1.0.0.0\")]\r\n"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/PPPDDD.ApplicationServices.Tests/Refer_a_friend.cs",
    "content": "﻿using System;\r\nusing Microsoft.VisualStudio.TestTools.UnitTesting;\r\nusing TestApplication;\r\nusing TestDomain;\r\nusing Rhino.Mocks;\r\n\r\nnamespace Tests\r\n{\r\n    [TestClass]\r\n    public class Recommend_a_friend // class named after domain concept / use-case\r\n    {\r\n        private ReferAFriendService service;\r\n        private IEmailer emailer;\r\n        private ICustomerDirectory directory;\r\n\r\n        // test data\r\n        private int referrerId = 454456;\r\n        private NewAccount friendsDetails = new NewAccount\r\n        {\r\n            Age = 24,\r\n            Email = \"pppddd@wrox.com\",\r\n            Nickname = \"Deedeedee\"\r\n        };\r\n\r\n        // this will run first (once only) then each test will run\r\n        [ClassInitialize]\r\n        public void When_a_user_signs_up_with_a_referral_from_a_friend()\r\n        {\r\n            // test as much of the implementation as possible\r\n            directory = new CustomerDirectory(new InMemoryDatabase());\r\n            var policy = new ReferralPolicy();\r\n            \r\n            // cannot test emailing implementation - easier to stub\r\n            emailer = MockRepository.GenerateStub<IEmailer>();\r\n\r\n            service = new ReferAFriendService(directory, policy, emailer);\r\n            \r\n            service.ReferAFriend(referrerId, friendsDetails);\r\n        }\r\n\r\n        [TestMethod]\r\n        public void The_referrer_has_50_dollars_credited_to_their_account()\r\n        {\r\n            // ...\r\n        }\r\n\r\n        [TestMethod]\r\n        public void The_friend_has_an_account_created_with_an_initial_50_dollars()\r\n        {\r\n            // ...\r\n        }\r\n\r\n        [TestMethod]\r\n        public void The_referrers_loyalty_is_upgraded_to_gold_status()\r\n        {\r\n            var referrer = directory.Find(referrerId);\r\n            Assert.AreEqual(LoyaltyStatus.Gold, referrer.LoyaltyStatus);\r\n        }\r\n\r\n        [TestMethod]\r\n        public void The_refferer_gets_an_email_notifying_of_the_referral()\r\n        {\r\n            var referrer = directory.Find(referrerId);\r\n            emailer.AssertWasCalled(em => \r\n            {\r\n                em.SendReferralAcknowledgement(referrer);\r\n            });\r\n        }\r\n\r\n        [TestMethod]\r\n        public void The_friend_gets_an_email_notifying_of_account_creation()\r\n        {\r\n            // ...\r\n        }\r\n    }\r\n}\r\n\r\n// mimick an application\r\nnamespace TestApplication\r\n{\r\n    public class ReferAFriendService\r\n    {\r\n        private ICustomerDirectory directory;\r\n        private IReferralPolicy policy;\r\n        private IEmailer emailer;\r\n\r\n        public ReferAFriendService(ICustomerDirectory directory, IReferralPolicy policy,\r\n                                   IEmailer emailer)\r\n        {\r\n            this.directory = directory;\r\n            this.policy = policy;\r\n            this.emailer = emailer;\r\n        }\r\n\r\n        public void ReferAFriend(int referrerId, NewAccount friend)\r\n        {\r\n            // ***** Activity 1 - implement this if you want to make the tests pass\r\n        }\r\n    }\r\n\r\n    public interface IEmailer\r\n    {\r\n        void SendReferralAcknowledgement(Customer customer);\r\n\r\n        void SendPostReferralSignUpWelcome(Customer customer);\r\n    }\r\n\r\n    public class CustomerDirectory : ICustomerDirectory\r\n    {\r\n        public CustomerDirectory(InMemoryDatabase databaseContext)\r\n        {\r\n            // replace database context with a technology of your choice\r\n        }\r\n\r\n        public Customer Find(int customerId)\r\n        {\r\n            // ***** Activity 2 - implement this if you want to make the tests pass\r\n            // You will need to choose an appropriate in-memory database\r\n            return null;\r\n        }\r\n    }\r\n\r\n    public class InMemoryDatabase\r\n    {\r\n        /*\r\n         * Options for in-memory databases include:\r\n         * - SQLite for use with SQL Server\r\n         * - RavenDB embedded for RavenDB\r\n         */\r\n    }\r\n}\r\n\r\n// mimick a domain\r\nnamespace TestDomain\r\n{\r\n    public interface ICustomerDirectory\r\n    {\r\n        Customer Find(int customerId);\r\n    }\r\n\r\n    public interface IReferralPolicy\r\n    {\r\n        void Apply(Customer referrer, Customer friend);\r\n    }\r\n\r\n    public class ReferralPolicy : IReferralPolicy\r\n    {\r\n        public void Apply(Customer referrer, Customer friend)\r\n        {\r\n            // ***** Activity 3 - implement this if you want to make the tests pass\r\n        }\r\n    }\r\n\r\n    public class Customer\r\n    {\r\n        public int ID { get; set; }\r\n\r\n        public string Email { get; set; }\r\n\r\n        public string Nickname { get; set; }\r\n\r\n        public int Age { get; set; }\r\n\r\n        public LoyaltyStatus LoyaltyStatus { get; set; }\r\n    }\r\n\r\n    public class NewAccount\r\n    {\r\n        public string Email { get; set; }\r\n\r\n        public string Nickname { get; set; }\r\n\r\n        public int Age { get; set; }\r\n    }\r\n\r\n    public enum LoyaltyStatus\r\n    {\r\n        Bronze,\r\n        Silver,\r\n        Gold\r\n    }\r\n}\r\n\r\n"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/PPPDDD.ApplicationServices.Tests/Tests.csproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"12.0\" DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <PropertyGroup>\n    <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>\n    <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>\n    <ProjectGuid>{E9ED1E1B-7722-4AF7-86B3-6FDE6A3B6A15}</ProjectGuid>\n    <OutputType>Library</OutputType>\n    <AppDesignerFolder>Properties</AppDesignerFolder>\n    <RootNamespace>Tests</RootNamespace>\n    <AssemblyName>Tests</AssemblyName>\n    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\n    <FileAlignment>512</FileAlignment>\n    <ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>\n    <VisualStudioVersion Condition=\"'$(VisualStudioVersion)' == ''\">10.0</VisualStudioVersion>\n    <VSToolsPath Condition=\"'$(VSToolsPath)' == ''\">$(MSBuildExtensionsPath32)\\Microsoft\\VisualStudio\\v$(VisualStudioVersion)</VSToolsPath>\n    <ReferencePath>$(ProgramFiles)\\Common Files\\microsoft shared\\VSTT\\$(VisualStudioVersion)\\UITestExtensionPackages</ReferencePath>\n    <IsCodedUITest>False</IsCodedUITest>\n    <TestProjectType>UnitTest</TestProjectType>\n    <SolutionDir Condition=\"$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'\">..\\</SolutionDir>\n    <RestorePackages>true</RestorePackages>\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' \">\n    <DebugSymbols>true</DebugSymbols>\n    <DebugType>full</DebugType>\n    <Optimize>false</Optimize>\n    <OutputPath>bin\\Debug\\</OutputPath>\n    <DefineConstants>DEBUG;TRACE</DefineConstants>\n    <ErrorReport>prompt</ErrorReport>\n    <WarningLevel>4</WarningLevel>\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' \">\n    <DebugType>pdbonly</DebugType>\n    <Optimize>true</Optimize>\n    <OutputPath>bin\\Release\\</OutputPath>\n    <DefineConstants>TRACE</DefineConstants>\n    <ErrorReport>prompt</ErrorReport>\n    <WarningLevel>4</WarningLevel>\n  </PropertyGroup>\n  <ItemGroup>\n    <Reference Include=\"Rhino.Mocks\">\n      <HintPath>..\\packages\\RhinoMocks.3.6.1\\lib\\net\\Rhino.Mocks.dll</HintPath>\n    </Reference>\n    <Reference Include=\"System\" />\n  </ItemGroup>\n  <Choose>\n    <When Condition=\"('$(VisualStudioVersion)' == '10.0' or '$(VisualStudioVersion)' == '') and '$(TargetFrameworkVersion)' == 'v3.5'\">\n      <ItemGroup>\n        <Reference Include=\"Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL\" />\n      </ItemGroup>\n    </When>\n    <Otherwise>\n      <ItemGroup>\n        <Reference Include=\"Microsoft.VisualStudio.QualityTools.UnitTestFramework\" />\n      </ItemGroup>\n    </Otherwise>\n  </Choose>\n  <ItemGroup>\n    <Compile Include=\"Refer_a_friend.cs\" />\n    <Compile Include=\"Properties\\AssemblyInfo.cs\" />\n  </ItemGroup>\n  <ItemGroup>\n    <None Include=\"packages.config\" />\n  </ItemGroup>\n  <Choose>\n    <When Condition=\"'$(VisualStudioVersion)' == '10.0' And '$(IsCodedUITest)' == 'True'\">\n      <ItemGroup>\n        <Reference Include=\"Microsoft.VisualStudio.QualityTools.CodedUITestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL\">\n          <Private>False</Private>\n        </Reference>\n        <Reference Include=\"Microsoft.VisualStudio.TestTools.UITest.Common, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL\">\n          <Private>False</Private>\n        </Reference>\n        <Reference Include=\"Microsoft.VisualStudio.TestTools.UITest.Extension, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL\">\n          <Private>False</Private>\n        </Reference>\n        <Reference Include=\"Microsoft.VisualStudio.TestTools.UITesting, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL\">\n          <Private>False</Private>\n        </Reference>\n      </ItemGroup>\n    </When>\n  </Choose>\n  <Import Project=\"$(VSToolsPath)\\TeamTest\\Microsoft.TestTools.targets\" Condition=\"Exists('$(VSToolsPath)\\TeamTest\\Microsoft.TestTools.targets')\" />\n  <Import Project=\"$(MSBuildToolsPath)\\Microsoft.CSharp.targets\" />\n  <Import Project=\"$(SolutionDir)\\.nuget\\NuGet.targets\" Condition=\"Exists('$(SolutionDir)\\.nuget\\NuGet.targets')\" />\n  <Target Name=\"EnsureNuGetPackageBuildImports\" BeforeTargets=\"PrepareForBuild\">\n    <PropertyGroup>\n      <ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them.  For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>\n    </PropertyGroup>\n    <Error Condition=\"!Exists('$(SolutionDir)\\.nuget\\NuGet.targets')\" Text=\"$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\\.nuget\\NuGet.targets'))\" />\n  </Target>\n  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \n       Other similar extension points exist, see Microsoft.Common.targets.\n  <Target Name=\"BeforeBuild\">\n  </Target>\n  <Target Name=\"AfterBuild\">\n  </Target>\n  -->\n</Project>"
  },
  {
    "path": "25 - Commands Application Service Patterns for processing Business Use Cases/PPPDDD.ApplicationServices.Tests/packages.config",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<packages>\n  <package id=\"RhinoMocks\" version=\"3.6.1\" targetFramework=\"net45\" />\n</packages>"
  },
  {
    "path": "26 - Queries Domain Reporting/PPPDDD.Reporting/App_Start/RouteConfig.cs",
    "content": "﻿using System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Web;\r\nusing System.Web.Mvc;\r\nusing System.Web.Routing;\r\n\r\nnamespace PPPDDD.Reporting\r\n{\r\n    public class RouteConfig\r\n    {\r\n        public static void RegisterRoutes(RouteCollection routes)\r\n        {\r\n            routes.IgnoreRoute(\"{resource}.axd/{*pathInfo}\");\r\n\r\n            routes.MapRoute(\r\n                name: \"Default\",\r\n                url: \"{controller}/{action}/{id}\",\r\n                defaults: new { controller = \"Home\", action = \"Index\", id = UrlParameter.Optional }\r\n            );\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "26 - Queries Domain Reporting/PPPDDD.Reporting/Controllers/DealershipPerformanceReportController.cs",
    "content": "﻿using System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Web;\r\nusing System.Web.Mvc;\r\nusing DealershipPerformanceReportDomain;\r\n\r\nnamespace PPPDDD.Reporting.Controllers\r\n{\r\n    public class DealershipPerformanceReportController : Controller\r\n    {\r\n        private DealershipPerformanceReportBuilder builder;\r\n\r\n        public DealershipPerformanceReportController(IDealershipRepository repository,\r\n            IDealershipRevenueCalculator calculator, IDealershipPerformanceTargetsProvider provider)\r\n        {\r\n            this.builder = new DealershipPerformanceReportBuilder(\r\n                repository, calculator, provider\r\n            );\r\n        }\r\n\r\n        public ActionResult Index(IEnumerable<int> dealershipIds, DateTime start, DateTime end)\r\n        {\r\n            var viewModel = builder.BuildReport(dealershipIds, start, end);\r\n\r\n            return View(viewModel);\r\n        }\r\n\t}\r\n\r\n    // Application Service\r\n    public class DealershipPerformanceReportBuilder\r\n    {\r\n        private IDealershipRepository repository;\r\n        private IDealershipRevenueCalculator calculator;\r\n        private IDealershipPerformanceTargetsProvider provider;\r\n\r\n        public DealershipPerformanceReportBuilder(IDealershipRepository repository,\r\n            IDealershipRevenueCalculator calculator, IDealershipPerformanceTargetsProvider provider)\r\n        {\r\n            this.repository = repository;\r\n            this.calculator = calculator;\r\n            this.provider = provider;\r\n        }\r\n\r\n        public DealershipPerformanceReport BuildReport(IEnumerable<int> dealershipIds, DateTime start, DateTime end)\r\n        {\r\n            var statuses = BuildStatuses(dealershipIds, start, end);\r\n\r\n            return new DealershipPerformanceReport\r\n            {\r\n                ReportStartDate = start,\r\n                ReportEndDate = end,\r\n                Dealerships = statuses\r\n            };\r\n        }\r\n\r\n        private List<DealershipPerformanceStatus> BuildStatuses(IEnumerable<int> dealershipIds, DateTime start, DateTime end)\r\n        {\r\n            var statuses = new List<DealershipPerformanceStatus>();\r\n            foreach (var id in dealershipIds)\r\n            {\r\n                // select N+1 - potentially bad for performance and efficiency\r\n                // re-using existing domain code - quick to implement\r\n                var dealership = repository.Get(id);\r\n                var targets = provider.Get(dealership, start, end);\r\n                var actuals = calculator.CalculateFor(dealership, start, end);\r\n\r\n                // map from domain to view model so UI is not coupled to domain objects\r\n                // could move this logic into a separate mapper\r\n                statuses.Add(new DealershipPerformanceStatus\r\n                {\r\n                    DealershipName = dealership.Name,\r\n                    TotalRevenue = actuals.TotalRevenue,\r\n                    TargetRevenue = targets.TargetRevenue,\r\n                    NetProfit = actuals.NetProfit,\r\n                    TargetProfit = targets.TargetProfit\r\n                });\r\n            }\r\n            return statuses;\r\n        }\r\n    }\r\n\r\n    // view model\r\n    public class DealershipPerformanceReport\r\n    {\r\n        public DateTime ReportStartDate { get; set; }\r\n\r\n        public DateTime ReportEndDate { get; set; }\r\n\r\n        public List<DealershipPerformanceStatus> Dealerships { get; set; }\r\n    }\r\n\r\n    public class DealershipPerformanceStatus\r\n    {\r\n        public string DealershipName { get; set; }\r\n\r\n        public int TotalRevenue { get; set; }\r\n\r\n        public int TargetRevenue { get; set; }\r\n\r\n        public int NetProfit { get; set; }\r\n\r\n        public int TargetProfit { get; set; }\r\n    }\r\n}\r\n\r\n// this would be a separate project\r\nnamespace DealershipPerformanceReportDomain\r\n{\r\n    public interface IDealershipRepository\r\n    {\r\n        Dealership Get(int dealershipId);\r\n    }\r\n    \r\n    public interface IDealershipRevenueCalculator\r\n    {\r\n        DealershipPerformanceActuals CalculateFor(Dealership dealership, DateTime start, DateTime end);\r\n    }\r\n\r\n    public interface IDealershipPerformanceTargetsProvider\r\n    {\r\n        DealershipPerformanceTargets Get(Dealership dealership, DateTime start, DateTime end);\r\n    }\r\n\r\n    public class DealershipPerformanceTargets\r\n    {\r\n        public int TargetRevenue { get; set; }\r\n\r\n        public int TargetProfit  { get; set; }\r\n    }\r\n\r\n    public class DealershipPerformanceActuals\r\n    {\r\n        public int TotalRevenue { get; set; }\r\n\r\n        public int NetProfit { get; set; }\r\n    }\r\n\r\n    public class Dealership\r\n    {\r\n        public int Id { get; set; }\r\n\r\n        public string Name { get; set; }\r\n    }\r\n}"
  },
  {
    "path": "26 - Queries Domain Reporting/PPPDDD.Reporting/Controllers/DealershipReportUsingMediatorController.cs",
    "content": "﻿using System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Web;\r\nusing System.Web.Mvc;\r\nusing DealershipPerformanceReportDomainForMediator;\r\n\r\nnamespace PPPDDD.Reporting.Controllers\r\n{\r\n    public class DealershipReportUsingMediatorController : Controller\r\n    {\r\n        private IDealershipRepository repository;\r\n\r\n        public DealershipReportUsingMediatorController(IDealershipRepository repository)\r\n        {\r\n            this.repository = repository;\r\n        }\r\n\r\n        public ActionResult Index(IEnumerable<int> dealershipIds, DateTime start, DateTime end)\r\n        {\r\n            var dealerships = repository.Get(dealershipIds);\r\n            var builder = new DealershipPerformanceReportBuilderUsingMediator();\r\n            var viewModel = builder.BuildReport(dealerships, start, end);\r\n\r\n            return View(viewModel);\r\n        }\r\n\t}\r\n\r\n    public class DealershipPerformanceReportBuilderUsingMediator\r\n    {\r\n        private IDealershipRevenueCalculator calculator;\r\n        private IDealershipPerformanceTargetsProvider provider;\r\n\r\n        public DealershipPerformanceReport BuildReport(IEnumerable<Dealership> dealerships, DateTime start, DateTime end)\r\n        {\r\n            var statuses = BuildStatuses(dealerships, start, end);\r\n\r\n            return new DealershipPerformanceReport\r\n            {\r\n                Dealerships = statuses,\r\n                ReportStartDate = start, \r\n                ReportEndDate = end\r\n            };\r\n        }\r\n\r\n        private List<DealershipPerformanceStatus> BuildStatuses(IEnumerable<Dealership> dealerships, DateTime start, DateTime end)\r\n        {\r\n            var statuses = new List<DealershipPerformanceStatus>();\r\n            foreach (var dealership in dealerships)\r\n            {\r\n                var status = new DealershipPerformanceStatus();\r\n                var mediator = new DealershipAssessmentMediator(status); // Mediator wraps status\r\n\r\n                var targets = provider.Get(dealership, start, end);\r\n                var actuals = calculator.CalculateFor(dealership, start, end);\r\n\r\n                // pass in the mediator, so private data can be set on the media\r\n                targets.Populate(mediator); \r\n                actuals.Populate(mediator);\r\n\r\n                statuses.Add(status); // values will have been set by the mediator when passed into domain objects\r\n            }\r\n            return statuses;\r\n        }\r\n    }\r\n\r\n    // \"mediator\" suffix on class name used for demo clarity\r\n    public class DealershipAssessmentMediator : IDealershipAssessment\r\n    {\r\n        private DealershipPerformanceStatus status;\r\n\r\n        public DealershipAssessmentMediator(DealershipPerformanceStatus status)\r\n        {\r\n            this.status = status;\r\n        }\r\n\r\n        public int TotalRevenue \r\n        {\r\n            get { return status.TotalRevenue;  }\r\n            set { status.TotalRevenue = value;  }\r\n        }\r\n\r\n        public int TargetRevenue \r\n        {\r\n            get { return status.TargetRevenue; }\r\n            set { status.TargetRevenue = value; }\r\n        }\r\n\r\n        public int NetProfit \r\n        {\r\n            get { return status.NetProfit;  }\r\n            set { status.NetProfit = value;  }\r\n        }\r\n\r\n        public int TargetProfit \r\n        {\r\n            get { return status.TargetProfit;  }\r\n            set { status.TargetProfit = value;  }\r\n        }\r\n    }\r\n    \r\n}\r\n\r\n// this would be a separate pure domain project\r\nnamespace DealershipPerformanceReportDomainForMediator\r\n{\r\n    // mediator interface - stable domain structure that can be exposed\r\n    public interface IDealershipAssessment\r\n    {\r\n        int TotalRevenue { get; set; }\r\n\r\n        int TargetRevenue { get; set; }\r\n\r\n        int NetProfit { get; set; }\r\n\r\n        int TargetProfit { get; set; }\r\n    }\r\n\r\n    public interface IDealershipRepository\r\n    {\r\n        Dealership Get(int dealershipId);\r\n\r\n        IEnumerable<Dealership> Get(IEnumerable<int> dealershipIds);\r\n    }\r\n\r\n    public interface IDealershipRevenueCalculator\r\n    {\r\n        DealershipPerformanceActuals CalculateFor(Dealership dealership, DateTime start, DateTime end);\r\n    }\r\n\r\n    public interface IDealershipPerformanceTargetsProvider\r\n    {\r\n        DealershipPerformanceTargets Get(Dealership dealership, DateTime start, DateTime end);\r\n    }\r\n\r\n    public class DealershipPerformanceTargets\r\n    {\r\n        // private fields hide potentially volatile domain structure\r\n        private int targetRevenue;\r\n        private int targetProfit;\r\n\r\n        public void Populate(IDealershipAssessment mediator)\r\n        {\r\n            mediator.TargetRevenue = targetRevenue;\r\n            mediator.TargetProfit = targetProfit;\r\n        }\r\n    }\r\n\r\n    public class DealershipPerformanceActuals\r\n    {\r\n        // private fields hide potentially volatile domain structure\r\n        private int totalRevenue;\r\n        private int netProfit;\r\n\r\n        public void Populate(IDealershipAssessment mediator)\r\n        {\r\n            mediator.TotalRevenue = totalRevenue;\r\n            mediator.NetProfit = netProfit;\r\n        }\r\n    }\r\n\r\n    public class DealershipPerformance\r\n    {\r\n        // private fields hide potentially volatile domain structure\r\n        private int totalRevenue;\r\n        private int netProfit;\r\n\r\n        public void Populate(IDealershipAssessment mediator)\r\n        {\r\n            mediator.TotalRevenue = totalRevenue;\r\n            mediator.NetProfit = netProfit;\r\n        }\r\n    }\r\n\r\n    public class Dealership\r\n    {\r\n        public int Id { get; set; }\r\n\r\n        public string Name { get; set; }\r\n    }\r\n}"
  },
  {
    "path": "26 - Queries Domain Reporting/PPPDDD.Reporting/Controllers/DenormalizedLoyaltyReportController.cs",
    "content": "﻿using System;\r\nusing System.Collections.Generic;\r\nusing System.Data.SqlClient;\r\nusing System.Linq;\r\nusing System.Web;\r\nusing System.Web.Mvc;\r\nusing Dapper;\r\n\r\nnamespace PPPDDD.Reporting.Controllers\r\n{\r\n    public class DenormalizedLoyaltyReportController : Controller\r\n    {\r\n        //\r\n        // GET: /DenormalizedLoyaltyReport/\r\n        public ActionResult Index()\r\n        {\r\n            return View();\r\n        }\r\n\r\n        public class DenormalizedLoyaltyReportBuilder\r\n        {\r\n            private string connString = \"\";\r\n\r\n            public LoyaltyReport Build(DateTime start, DateTime end)\r\n            {\r\n                IEnumerable<LoyaltySummary> summaries;\r\n                using(var con = new SqlConnection(connString))\r\n                {\r\n                    con.Open();\r\n                    var query = \"select [Month], PointsPerDollar, NetProfit, Signups, Purchases \" +\r\n                                \"from denormalizedLoyaltyReportViewCache \" +\r\n                                \"where [Month] >= @start \" +\r\n                                \"and [Month] < @end\";\r\n                    summaries = con.Query<LoyaltySummary>(query, new { start = start, end = end });\r\n                }\r\n\r\n                return new LoyaltyReport\r\n                {\r\n                    Summarries = summaries\r\n                };\r\n            }\r\n        }\r\n\t}\r\n}"
  },
  {
    "path": "26 - Queries Domain Reporting/PPPDDD.Reporting/Controllers/HealthcareEventProjectionReportController.cs",
    "content": "﻿using System;\r\nusing System.Collections.Generic;\r\nusing System.IO;\r\nusing System.Linq;\r\nusing System.Net;\r\nusing System.Web;\r\nusing System.Web.Helpers;\r\nusing System.Web.Mvc;\r\n\r\nnamespace PPPDDD.Reporting.Controllers\r\n{\r\n    public class HealthcareEventProjectionReportController : Controller\r\n    {\r\n        // Run the application and browser to this url \"/HealthcareProjectionReport/TestData\" to insert test data for this demo\r\n        public ActionResult TestData()\r\n        {\r\n            InsertTestData.Insert();\r\n            return Content(\"Test Data inserted. Navigate to: http://localhost:2113/web/streams.htm\");\r\n        }\r\n\r\n        // Example: http://localhost:{yourPort}/HealthcareEventProjectionReport?start=2014/01&end=2014/03&diagnosisIds=dg1\r\n        public ActionResult Index(DateTime start, DateTime end, string diagnosisIds)\r\n        {\r\n            var reportViewModel = new HealthcareReportBuilder().Build(start, end, diagnosisIds.Split(','));\r\n\r\n            // Optional: Create a view and display the report\r\n            return Json(reportViewModel, JsonRequestBehavior.AllowGet);\r\n        }\r\n\t}\r\n\r\n    // Report building Application Service\r\n    public class HealthcareReportBuilder\r\n    {\r\n        public HealthcareReport Build(DateTime start, DateTime end, IEnumerable<string> diagnosisIds)\r\n        {\r\n            var monthsInReport = GetMonthsInRange(start, end).ToList(); // report columns\r\n            var monthlyOverallTotals = FetchMonthlyTotalsFromES(monthsInReport); // used to calculate percentages\r\n            var queries = BuildQueriesFor(monthsInReport, diagnosisIds).ToList(); // queries for ES\r\n            var summaries = BuildMonthlySummariesFor(queries, monthlyOverallTotals).ToList(); // use queries\r\n            \r\n            return new HealthcareReport\r\n            {\r\n                Start = start,\r\n                End = end,\r\n                Summaries = summaries\r\n            };\r\n        }\r\n\r\n        private IEnumerable<DiagnosisSummary> BuildMonthlySummariesFor(IEnumerable<DiagnosisQuery> queries, \r\n            Dictionary<DateTime, int> monthlyTotals)\r\n        {\r\n            foreach (var q in queries) // may want to run these in parallel for perf\r\n            {\r\n                var diagnosisTotal = FetchTotalFromESFor(q);\r\n                var monthTotal = monthlyTotals[q.Month];\r\n                var percent = monthTotal == 0 ? 0 : ((decimal)diagnosisTotal / monthTotal) * 100;\r\n\r\n                yield return new DiagnosisSummary\r\n                {\r\n                    Amount = diagnosisTotal,\r\n                    DiagnosisName = GetDiagnosisName(q.DiagnosisId),\r\n                    Month = q.Month,\r\n                    Percentage = percent,\r\n                    MonthString = q.Month.ToString(\"yyyy/MM\")\r\n                };\r\n            }\r\n        }\r\n\r\n        private int FetchTotalFromESFor(DiagnosisQuery query)\r\n        {\r\n            // don't hard-code this URL. Access via entry point resource\r\n            var projectionStateUrl = \"http://localhost:2113/projection/DiagnosesByMonthCounts/state\";\r\n            var streamname = \"diagnosis-\" + query.DiagnosisId + \"_\" + query.Month.ToString(\"yyyyMM\");\r\n            \r\n            // may want to use caching here\r\n            var response = new WebClient().DownloadString(projectionStateUrl + \"?partition=\" + streamname);\r\n            var count = Json.Decode<DiagnosisCount>(response);\r\n            \r\n            return count == null ? 0 : count.Count;\r\n        }\r\n\r\n        private Dictionary<DateTime, int> FetchMonthlyTotalsFromES(IEnumerable<DateTime> months)\r\n        {\r\n            // don't hard-code this URL. Access via entry point resource\r\n            var projectionStateUrl = \"http://localhost:2113/projection/MonthsCounts/state\";\r\n\r\n            var totals = new Dictionary<DateTime, int>();\r\n            foreach(var m in months)\r\n            {\r\n                var streamName = \"month-\" + m.ToString(\"yyyyMM\");\r\n                var url = projectionStateUrl + \"?partition=\" + streamName;\r\n                var response = new WebClient().DownloadString(url);\r\n                var count = Json.Decode<DiagnosisCount>(response);\r\n\r\n                totals.Add(m, count == null ? 0 : count.Count);\r\n            }\r\n\r\n            return totals;\r\n        }\r\n\r\n        private IEnumerable<DiagnosisQuery> BuildQueriesFor(IEnumerable<DateTime> months, IEnumerable<string> diagnosisIds)\r\n        {\r\n            foreach (var month in months)\r\n            {\r\n                foreach (var id in diagnosisIds)\r\n                {\r\n                    yield return new DiagnosisQuery\r\n                    {\r\n                        DiagnosisId = id,\r\n                        Month = month,\r\n                    };\r\n                }\r\n            }\r\n        }\r\n\r\n        // this would problably live inside a helper, and not in an application service\r\n        private IEnumerable<DateTime> GetMonthsInRange(DateTime start, DateTime end)\r\n        {\r\n            var startOfFirst = new DateTime(start.Year, start.Month, 1);\r\n            var lastOfEnd = new DateTime(end.Year, end.Month + 1, 1);\r\n            var current = startOfFirst;\r\n            do\r\n            {\r\n                yield return current;\r\n                current = current.AddMonths(1);\r\n            } while (current < lastOfEnd);\r\n        }\r\n\r\n        private string GetDiagnosisName(string diagnosisId)\r\n        {\r\n            // many ways to implements this:\r\n                // could come from an event stream\r\n                // could live as a fixed list in cache if diagnosis never change \r\n                // could be a lookup from a datastore\r\n            switch(diagnosisId)\r\n            {\r\n                case \"dg1\": { return \"Eczema\"; break; };\r\n                case \"dg2\": { return \"Vertigo\"; break ;};\r\n                case \"dg3\": { return \"Hypochrondriac\"; break; };\r\n                default: { return \"Unknown\"; }\r\n            }\r\n        }\r\n    }\r\n\r\n    // represents state projection\r\n    public class DiagnosisCount\r\n    {\r\n        public int Count { get; set; }\r\n    }\r\n\r\n    public class DiagnosisQuery\r\n    {\r\n        public DateTime Month { get; set; }\r\n\r\n        public string DiagnosisId { get; set; }\r\n    }\r\n    \r\n\r\n    // report view models\r\n    public class HealthcareReport\r\n    {\r\n        public DateTime Start { get; set; }\r\n\r\n        public DateTime End { get; set; }\r\n\r\n        public IEnumerable<DiagnosisSummary> Summaries { get; set; }\r\n    }\r\n\r\n    public class DiagnosisSummary\r\n    {\r\n        public string DiagnosisName { get; set; }\r\n\r\n        public DateTime Month { get; set; }\r\n\r\n        public string MonthString { get; set; }\r\n\r\n        public int Amount { get; set; }\r\n\r\n        public decimal Percentage { get; set; }\r\n    }\r\n\r\n    /*\r\n     * Inserts test diagnosis events into Event Store.\r\n     * Requires event store to be running on port 2113. \r\n     */\r\n    public static class InsertTestData\r\n    {\r\n        private static string diagnosesStreamUrl = \"http://localhost:2113/streams/diagnoses\";\r\n        public static void Insert()\r\n        {\r\n            var request = (HttpWebRequest)WebRequest.Create(diagnosesStreamUrl);\r\n            request.ContentType = \"application/json\";\r\n            request.Method = \"POST\";\r\n            \r\n            var json = Json.Encode(DiagnosisEvents);\r\n           \r\n            using (var sr = new StreamWriter(request.GetRequestStream()))\r\n            {\r\n                sr.Write(json);\r\n                sr.Flush();\r\n                sr.Close();\r\n            }\r\n            request.GetResponse();\r\n        }\r\n\r\n        // model of an event - used to push data into ES not used for the report\r\n        private class Diagnosis\r\n        {\r\n            public Guid EventId { get; set; }\r\n\r\n            public string EventType { get; set; }\r\n\r\n            public DiagnosisData data { get; set; }\r\n        }\r\n\r\n        private class DiagnosisData\r\n        {\r\n            public string DiagnosisId { get; set; }\r\n\r\n            public string DiagnosisName { get; set; }\r\n\r\n            public string DoctorId { get; set; }\r\n\r\n            public string DoctorName { get; set; }\r\n\r\n            public string Date { get; set; }\r\n        }\r\n\r\n        private static IEnumerable<Diagnosis> DiagnosisEvents = new List<Diagnosis>\r\n        {\r\n            new Diagnosis\r\n            {\r\n                EventId = Guid.NewGuid(),\r\n                EventType = \"diagnosis\",\r\n                data = new DiagnosisData\r\n                {\r\n                    DiagnosisId = \"dg1\",\r\n                    DiagnosisName = \"Eczema\",\r\n                    DoctorId = \"doc1\",\r\n                    DoctorName = \"D.C. Green\",\r\n                    Date = \"2014/02\"\r\n                }\r\n            },\r\n            new Diagnosis\r\n            {\r\n                EventId = Guid.NewGuid(),\r\n                EventType = \"diagnosis\",\r\n                data = new DiagnosisData\r\n                {\r\n                    DiagnosisId = \"dg2\",\r\n                    DiagnosisName = \"Vertigo\",\r\n                    DoctorId = \"doc1\",\r\n                    DoctorName = \"D.C. Green\",\r\n                    Date = \"2014/02\"\r\n                }\r\n            },\r\n            new Diagnosis\r\n            {\r\n                EventId = Guid.NewGuid(),\r\n                EventType = \"diagnosis\",\r\n                data = new DiagnosisData\r\n                {\r\n                    DiagnosisId = \"dg1\",\r\n                    DiagnosisName = \"Eczema\",\r\n                    DoctorId = \"doc2\",\r\n                    DoctorName = \"J.P. Finch\",\r\n                    Date = \"2014/03\"\r\n                }\r\n            },\r\n            new Diagnosis\r\n            {\r\n                EventId = Guid.NewGuid(),\r\n                EventType = \"diagnosis\",\r\n                data = new DiagnosisData\r\n                {\r\n                    DiagnosisId = \"dg1\",\r\n                    DiagnosisName = \"Eczema\",\r\n                    DoctorId = \"doc2\",\r\n                    DoctorName = \"J.P. Finch\",\r\n                    Date = \"2014/03\"\r\n                }\r\n            },\r\n            new Diagnosis\r\n            {\r\n                EventId = Guid.NewGuid(),\r\n                EventType = \"diagnosis\",\r\n                data = new DiagnosisData\r\n                {\r\n                    DiagnosisId = \"dg3\",\r\n                    DiagnosisName = \"Hypochondriac\",\r\n                    DoctorId = \"doc3\",\r\n                    DoctorName = \"U.B Retters\",\r\n                    Date = \"2014/04\"\r\n                }\r\n            },\r\n        };\r\n    }\r\n\r\n    /*\r\n        Event Store Projections:\r\n        \r\n        DiagnosesByMonth:\r\n        fromStream('diagnoses')\r\n        .whenAny(function(state, ev) {\r\n            var date = ev.data.Date.replace('/', '');\r\n            var diagnosisId = ev.data.DiagnosisId;\r\n            linkTo('diagnosis-' + diagnosisId + '_' + date, ev);\r\n        });\r\n        \r\n        DiagnosesByMonthCounts:\r\n        fromCategory('diagnosis')\r\n        .foreachStream()\r\n        .when({ \r\n             $init : function(s,e) {return {count : 0}},\r\n             \"diagnosis\" : function(s,e) { s.count += 1} //mutate in place works\r\n        });\r\n      \r\n        Months:\r\n        fromStream('diagnoses')\r\n        .whenAny(function(state, ev) {\r\n            var date = ev.data.Date.replace('/', '');\r\n            linkTo('month-' + date, ev);\r\n        });\r\n     \r\n        MonthsCounts:\r\n        fromCategory('month')\r\n        .foreachStream()\r\n        .when({\r\n            $init : function(s,e) {return {count : 0}},\r\n            \"diagnosis\" : function(s,e) { s.count += 1 } //mutate in place works\r\n        }); \r\n      \r\n     */\r\n\r\n\r\n}"
  },
  {
    "path": "26 - Queries Domain Reporting/PPPDDD.Reporting/Controllers/LoyaltyReportQueryingDatastoreController.cs",
    "content": "﻿using Dapper;\nusing System;\nusing System.Collections.Generic;\nusing System.Data.SqlClient;\nusing System.Linq;\nusing System.Web;\nusing System.Web.Mvc;\n\n// right-click on the \"SportsStoreDatabase\" project and choose \"publish\"\n// this will create a local version of the database on this machine\nnamespace PPPDDD.Reporting.Controllers\n{\n    public class LoyaltyReportQueryingDatastoreController : Controller\n    {\n        public ActionResult Index(DateTime start, DateTime end)\n        {\n            var report = new LoyaltyReportBuilder().Build(start, end);\n\n            return View(report);\n        }\n\t}\n\n    // Application Service\n    public class LoyaltyReportBuilder\n    {\n        // see SportsStoreDatabase project in this solution\n        private string connString = \"\";\n\n        public LoyaltyReport Build(DateTime start, DateTime end)\n        {\n            IEnumerable<PurchasesAndProfit> profits;\n            IEnumerable<SignupCount> signups;\n            IEnumerable<LoyaltySettings> settings;\n\n            using(var con = new SqlConnection(connString))\n            {\n                con.Open();\n                var pointsQuery = \"select [Month], [PointsPerDollar] from loyaltySettings \" +\n                                  \"where [Month] >= @start \" + \n                                  \"and [Month] < @end\";\n                settings = con.Query<LoyaltySettings>(pointsQuery, new { start = start, end = end });\n\n                var signupsQuery = \"select count(*) from loyaltyAccounts\" +\n                                   \"where isActive = true \" +\n                                   \"and [created] >= @start \" +\n                                   \"and [created] < @end \";\n                signups = con.Query<SignupCount>(signupsQuery, new { start = start, end = end } );\n\n                var profitQuery = \"select \" +\n                                 \"      concat(month(o.[date]), '/', year(o.[date])) as Month, \" +\n                                 \"      (select ((cast(count(*) as decimal) / (\" +\n                                 \"          select count(*) from orders\" +\n                                 \"          where [date] >= @start\" +\n                                 \"          and [date] <  @end\" +\n                                 \"      )) * 100)) as Purchases,\" +\n                                 \"      (select ((sum(netProfit) / (\" +\n                                 \"          select sum(netProfit) from orders\" +\n                                 \"          where [date] >= @start\" +\n                                 \"          and [date] < @end \" +\n                                 \"      )) * 100)) as NetProfit\" +\n                                 \"  from orders o\" +\n                                 \"  join Users u on o.userId = u.id\" +\n                                 \"  join LoyaltyAccounts la on u.id = la.userId\" +\n                                 \"  where la.isActive = 1\" +\n                                 \"  and o.[date] >= @start\" +\n                                 \"  and o.[date] < @end\" +\n                                 \"  group by concat(month(o.[date]), '/', year(o.[date]))\";\n                profits = con.Query<PurchasesAndProfit>(profitQuery, new { start = start, end = end });\n            }\n\n            return Map(profits, signups, settings, start, end);\n        }\n\n        private LoyaltyReport Map(IEnumerable<PurchasesAndProfit> profits, IEnumerable<SignupCount> signups, \n            IEnumerable<LoyaltySettings> loyaltySettings, DateTime start, DateTime end)\n        {\n            var summaries = new List<LoyaltySummary>();\n\n            // Create a summary for each month in the report's range\n            foreach (var month in MonthsBetweenInclusive(start, end))\n            {\n                var monthsProfits = profits.Single(s => s.Month == month);\n                var monthsSettings = loyaltySettings.Single(s => s.Month == month);\n                var monthsSignups = signups.Single(s => s.Month == month);\n                \n                var summary = new LoyaltySummary\n                {\n                    Month = month,\n                    NetProfit = monthsProfits.Profit,\n                    PointsPerDollar = monthsSettings.PointsPerDollar,\n                    Purchases = monthsProfits.Purchases,\n                    SignUps = monthsSignups.Signups\n                };\n\n                summaries.Add(summary);\n            }\n                \n            return new LoyaltyReport\n            {\n                Summarries = summaries\n            };\n        }\n\n        private IEnumerable<DateTime> MonthsBetweenInclusive(DateTime start, DateTime end)\n        {\n            var firstMonth = new DateTime(start.Year, start.Month, 1);\n            var lastMonth = new DateTime(end.Year, end.Month, 1);\n\n            var months = new List<DateTime>();\n\n            var currentMonth = firstMonth;\n            while(currentMonth < lastMonth)\n            {\n                months.Add(currentMonth);\n                currentMonth = currentMonth.AddMonths(1);\n            }\n\n            return months;\n        }\n    }\n\n    // view / presentation models\n    public class LoyaltyReport\n    {\n        public IEnumerable<LoyaltySummary> Summarries { get; set; }\n    }\n\n    public class LoyaltySummary\n    {\n        public DateTime Month { get; set; }\n\n        public int PointsPerDollar { get; set; }\n\n        public double NetProfit { get; set; }\n\n        public int SignUps { get; set; }\n\n        public int Purchases { get; set; }\n    }\n\n    // database models\n    public class LoyaltySettings\n    {\n        public DateTime Month { get; set; }\n\n        public int PointsPerDollar { get; set; }\n    }\n\n    public class SignupCount\n    {\n        public DateTime Month { get; set; }\n\n        public int Signups { get; set; }\n    }\n\n    public class PurchasesAndProfit\n    {\n        public DateTime Month { get; set; }\n\n        public int Purchases { get; set; }\n\n        public double Profit { get; set; }\n    }\n}"
  },
  {
    "path": "26 - Queries Domain Reporting/PPPDDD.Reporting/Global.asax",
    "content": "﻿<%@ Application Codebehind=\"Global.asax.cs\" Inherits=\"PPPDDD.Reporting.MvcApplication\" Language=\"C#\" %>\r\n"
  },
  {
    "path": "26 - Queries Domain Reporting/PPPDDD.Reporting/Global.asax.cs",
    "content": "﻿using System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Web;\r\nusing System.Web.Mvc;\r\nusing System.Web.Routing;\r\n\r\nnamespace PPPDDD.Reporting\r\n{\r\n    public class MvcApplication : System.Web.HttpApplication\r\n    {\r\n        protected void Application_Start()\r\n        {\r\n            AreaRegistration.RegisterAllAreas();\r\n            RouteConfig.RegisterRoutes(RouteTable.Routes);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "26 - Queries Domain Reporting/PPPDDD.Reporting/PPPDDD.Reporting.csproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Project ToolsVersion=\"12.0\" DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\r\n  <Import Project=\"$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props\" Condition=\"Exists('$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props')\" />\r\n  <PropertyGroup>\r\n    <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>\r\n    <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>\r\n    <ProductVersion>\r\n    </ProductVersion>\r\n    <SchemaVersion>2.0</SchemaVersion>\r\n    <ProjectGuid>{182A344B-3104-4158-A25E-1A5742944BF8}</ProjectGuid>\r\n    <ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>\r\n    <OutputType>Library</OutputType>\r\n    <AppDesignerFolder>Properties</AppDesignerFolder>\r\n    <RootNamespace>PPPDDD.Reporting</RootNamespace>\r\n    <AssemblyName>PPPDDD.Reporting</AssemblyName>\r\n    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r\n    <UseIISExpress>true</UseIISExpress>\r\n    <IISExpressSSLPort />\r\n    <IISExpressAnonymousAuthentication />\r\n    <IISExpressWindowsAuthentication />\r\n    <IISExpressUseClassicPipelineMode />\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' \">\r\n    <DebugSymbols>true</DebugSymbols>\r\n    <DebugType>full</DebugType>\r\n    <Optimize>false</Optimize>\r\n    <OutputPath>bin\\</OutputPath>\r\n    <DefineConstants>DEBUG;TRACE</DefineConstants>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <WarningLevel>4</WarningLevel>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' \">\r\n    <DebugType>pdbonly</DebugType>\r\n    <Optimize>true</Optimize>\r\n    <OutputPath>bin\\</OutputPath>\r\n    <DefineConstants>TRACE</DefineConstants>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <WarningLevel>4</WarningLevel>\r\n  </PropertyGroup>\r\n  <ItemGroup>\r\n    <Reference Include=\"Dapper\">\r\n      <HintPath>..\\packages\\Dapper.1.22\\lib\\net45\\Dapper.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"Microsoft.CSharp\" />\r\n    <Reference Include=\"System.Web.DynamicData\" />\r\n    <Reference Include=\"System.Web.Entity\" />\r\n    <Reference Include=\"System.Web.ApplicationServices\" />\r\n    <Reference Include=\"System.ComponentModel.DataAnnotations\" />\r\n    <Reference Include=\"System\" />\r\n    <Reference Include=\"System.Data\" />\r\n    <Reference Include=\"System.Core\" />\r\n    <Reference Include=\"System.Data.DataSetExtensions\" />\r\n    <Reference Include=\"System.Web.Extensions\" />\r\n    <Reference Include=\"System.Xml.Linq\" />\r\n    <Reference Include=\"System.Drawing\" />\r\n    <Reference Include=\"System.Web\" />\r\n    <Reference Include=\"System.Xml\" />\r\n    <Reference Include=\"System.Configuration\" />\r\n    <Reference Include=\"System.Web.Services\" />\r\n    <Reference Include=\"System.EnterpriseServices\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <Reference Include=\"System.Web.Razor\">\r\n      <HintPath>..\\packages\\Microsoft.AspNet.Razor.3.0.0\\lib\\net45\\System.Web.Razor.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"System.Web.Webpages\">\r\n      <HintPath>..\\packages\\Microsoft.AspNet.Webpages.3.0.0\\lib\\net45\\System.Web.Webpages.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"System.Web.Webpages.Deployment\">\r\n      <HintPath>..\\packages\\Microsoft.AspNet.Webpages.3.0.0\\lib\\net45\\System.Web.Webpages.Deployment.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"System.Web.Webpages.Razor\">\r\n      <HintPath>..\\packages\\Microsoft.AspNet.Webpages.3.0.0\\lib\\net45\\System.Web.Webpages.Razor.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"System.Web.Helpers\">\r\n      <HintPath>..\\packages\\Microsoft.AspNet.Webpages.3.0.0\\lib\\net45\\System.Web.Helpers.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"System.Web.Mvc\">\r\n      <HintPath>..\\packages\\Microsoft.AspNet.Mvc.5.0.0\\lib\\net45\\System.Web.Mvc.dll</HintPath>\r\n    </Reference>\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <Content Include=\"Global.asax\" />\r\n    <Content Include=\"Web.config\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <Compile Include=\"App_Start\\RouteConfig.cs\" />\r\n    <Compile Include=\"Controllers\\DealershipPerformanceReportController.cs\" />\r\n    <Compile Include=\"Controllers\\DealershipReportUsingMediatorController.cs\" />\r\n    <Compile Include=\"Controllers\\DenormalizedLoyaltyReportController.cs\" />\r\n    <Compile Include=\"Controllers\\HealthcareEventProjectionReportController.cs\" />\r\n    <Compile Include=\"Controllers\\LoyaltyReportQueryingDatastoreController.cs\" />\r\n    <Compile Include=\"Global.asax.cs\">\r\n      <DependentUpon>Global.asax</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Properties\\AssemblyInfo.cs\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <Content Include=\"Views\\web.config\" />\r\n    <Content Include=\"packages.config\" />\r\n    <None Include=\"Web.Debug.config\">\r\n      <DependentUpon>Web.config</DependentUpon>\r\n    </None>\r\n    <None Include=\"Web.Release.config\">\r\n      <DependentUpon>Web.config</DependentUpon>\r\n    </None>\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <Folder Include=\"App_Data\\\" />\r\n    <Folder Include=\"Models\\\" />\r\n    <Folder Include=\"Views\\DealershipPerformanceReport\\\" />\r\n    <Folder Include=\"Views\\DealershipReportUsingMediator\\\" />\r\n    <Folder Include=\"Views\\DenormalizedLoyaltyReport\\\" />\r\n    <Folder Include=\"Views\\HealthcareEventProjectionReport\\\" />\r\n    <Folder Include=\"Views\\LoyaltyReportQueryingDatastore\\\" />\r\n  </ItemGroup>\r\n  <PropertyGroup>\r\n    <VisualStudioVersion Condition=\"'$(VisualStudioVersion)' == ''\">10.0</VisualStudioVersion>\r\n    <VSToolsPath Condition=\"'$(VSToolsPath)' == ''\">$(MSBuildExtensionsPath32)\\Microsoft\\VisualStudio\\v$(VisualStudioVersion)</VSToolsPath>\r\n  </PropertyGroup>\r\n  <Import Project=\"$(MSBuildBinPath)\\Microsoft.CSharp.targets\" />\r\n  <Import Project=\"$(VSToolsPath)\\WebApplications\\Microsoft.WebApplication.targets\" Condition=\"'$(VSToolsPath)' != ''\" />\r\n  <Import Project=\"$(MSBuildExtensionsPath32)\\Microsoft\\VisualStudio\\v10.0\\WebApplications\\Microsoft.WebApplication.targets\" Condition=\"false\" />\r\n  <ProjectExtensions>\r\n    <VisualStudio>\r\n      <FlavorProperties GUID=\"{349c5851-65df-11da-9384-00065b846f21}\">\r\n        <WebProjectProperties>\r\n          <UseIIS>True</UseIIS>\r\n          <AutoAssignPort>True</AutoAssignPort>\r\n          <DevelopmentServerPort>49645</DevelopmentServerPort>\r\n          <DevelopmentServerVPath>/</DevelopmentServerVPath>\r\n          <IISUrl>http://localhost:49645/</IISUrl>\r\n          <NTLMAuthentication>False</NTLMAuthentication>\r\n          <UseCustomServer>False</UseCustomServer>\r\n          <CustomServerUrl>\r\n          </CustomServerUrl>\r\n          <SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>\r\n        </WebProjectProperties>\r\n      </FlavorProperties>\r\n    </VisualStudio>\r\n  </ProjectExtensions>\r\n  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \r\n       Other similar extension points exist, see Microsoft.Common.targets.\r\n  <Target Name=\"BeforeBuild\">\r\n  </Target>\r\n  <Target Name=\"AfterBuild\">\r\n  </Target>\r\n  -->\r\n</Project>"
  },
  {
    "path": "26 - Queries Domain Reporting/PPPDDD.Reporting/Properties/AssemblyInfo.cs",
    "content": "﻿using System.Reflection;\r\nusing System.Runtime.CompilerServices;\r\nusing System.Runtime.InteropServices;\r\n\r\n// General Information about an assembly is controlled through the following \r\n// set of attributes. Change these attribute values to modify the information\r\n// associated with an assembly.\r\n[assembly: AssemblyTitle(\"PPPDDD.Reporting\")]\r\n[assembly: AssemblyDescription(\"\")]\r\n[assembly: AssemblyConfiguration(\"\")]\r\n[assembly: AssemblyCompany(\"\")]\r\n[assembly: AssemblyProduct(\"PPPDDD.Reporting\")]\r\n[assembly: AssemblyCopyright(\"Copyright ©  2014\")]\r\n[assembly: AssemblyTrademark(\"\")]\r\n[assembly: AssemblyCulture(\"\")]\r\n\r\n// Setting ComVisible to false makes the types in this assembly not visible \r\n// to COM components.  If you need to access a type in this assembly from \r\n// COM, set the ComVisible attribute to true on that type.\r\n[assembly: ComVisible(false)]\r\n\r\n// The following GUID is for the ID of the typelib if this project is exposed to COM\r\n[assembly: Guid(\"86d22301-9c68-4217-9447-2e9b1952e792\")]\r\n\r\n// Version information for an assembly consists of the following four values:\r\n//\r\n//      Major Version\r\n//      Minor Version \r\n//      Build Number\r\n//      Revision\r\n//\r\n// You can specify all the values or you can default the Revision and Build Numbers \r\n// by using the '*' as shown below:\r\n[assembly: AssemblyVersion(\"1.0.0.0\")]\r\n[assembly: AssemblyFileVersion(\"1.0.0.0\")]\r\n"
  },
  {
    "path": "26 - Queries Domain Reporting/PPPDDD.Reporting/Views/web.config",
    "content": "﻿<?xml version=\"1.0\"?>\r\n\r\n<configuration>\r\n  <configSections>\r\n    <sectionGroup name=\"system.web.webPages.razor\" type=\"System.Web.WebPages.Razor.Configuration.RazorWebSectionGroup, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35\">\r\n      <section name=\"host\" type=\"System.Web.WebPages.Razor.Configuration.HostSection, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35\" requirePermission=\"false\" />\r\n      <section name=\"pages\" type=\"System.Web.WebPages.Razor.Configuration.RazorPagesSection, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35\" requirePermission=\"false\" />\r\n    </sectionGroup>\r\n  </configSections>\r\n\r\n  <system.web.webPages.razor>\r\n    <host factoryType=\"System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35\" />\r\n    <pages pageBaseType=\"System.Web.Mvc.WebViewPage\">\r\n      <namespaces>\r\n        <add namespace=\"System.Web.Mvc\" />\r\n        <add namespace=\"System.Web.Mvc.Ajax\" />\r\n        <add namespace=\"System.Web.Mvc.Html\" />\r\n        <add namespace=\"System.Web.Routing\" />\r\n        <add namespace=\"PPPDDD.Reporting\" />\r\n      </namespaces>\r\n    </pages>\r\n  </system.web.webPages.razor>\r\n\r\n  <appSettings>\r\n    <add key=\"webpages:Enabled\" value=\"false\" />\r\n  </appSettings>\r\n\r\n  <system.webServer>\r\n    <handlers>\r\n      <remove name=\"BlockViewHandler\"/>\r\n      <add name=\"BlockViewHandler\" path=\"*\" verb=\"*\" preCondition=\"integratedMode\" type=\"System.Web.HttpNotFoundHandler\" />\r\n    </handlers>\r\n  </system.webServer>\r\n</configuration>\r\n"
  },
  {
    "path": "26 - Queries Domain Reporting/PPPDDD.Reporting/Web.Debug.config",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n\r\n<!-- For more information on using web.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 -->\r\n\r\n<configuration xmlns:xdt=\"http://schemas.microsoft.com/XML-Document-Transform\">\r\n  <!--\r\n    In the example below, the \"SetAttributes\" transform will change the value of \r\n    \"connectionString\" to use \"ReleaseSQLServer\" only when the \"Match\" locator \r\n    finds an attribute \"name\" that has a value of \"MyDB\".\r\n    \r\n    <connectionStrings>\r\n      <add name=\"MyDB\" \r\n        connectionString=\"Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True\" \r\n        xdt:Transform=\"SetAttributes\" xdt:Locator=\"Match(name)\"/>\r\n    </connectionStrings>\r\n  -->\r\n  <system.web>\r\n    <!--\r\n      In the example below, the \"Replace\" transform will replace the entire \r\n      <customErrors> section of your web.config file.\r\n      Note that because there is only one customErrors section under the \r\n      <system.web> node, there is no need to use the \"xdt:Locator\" attribute.\r\n      \r\n      <customErrors defaultRedirect=\"GenericError.htm\"\r\n        mode=\"RemoteOnly\" xdt:Transform=\"Replace\">\r\n        <error statusCode=\"500\" redirect=\"InternalError.htm\"/>\r\n      </customErrors>\r\n    -->\r\n  </system.web>\r\n</configuration>"
  },
  {
    "path": "26 - Queries Domain Reporting/PPPDDD.Reporting/Web.Release.config",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n\r\n<!-- For more information on using web.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 -->\r\n\r\n<configuration xmlns:xdt=\"http://schemas.microsoft.com/XML-Document-Transform\">\r\n  <!--\r\n    In the example below, the \"SetAttributes\" transform will change the value of \r\n    \"connectionString\" to use \"ReleaseSQLServer\" only when the \"Match\" locator \r\n    finds an attribute \"name\" that has a value of \"MyDB\".\r\n    \r\n    <connectionStrings>\r\n      <add name=\"MyDB\" \r\n        connectionString=\"Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True\" \r\n        xdt:Transform=\"SetAttributes\" xdt:Locator=\"Match(name)\"/>\r\n    </connectionStrings>\r\n  -->\r\n  <system.web>\r\n    <compilation xdt:Transform=\"RemoveAttributes(debug)\" />\r\n    <!--\r\n      In the example below, the \"Replace\" transform will replace the entire \r\n      <customErrors> section of your web.config file.\r\n      Note that because there is only one customErrors section under the \r\n      <system.web> node, there is no need to use the \"xdt:Locator\" attribute.\r\n      \r\n      <customErrors defaultRedirect=\"GenericError.htm\"\r\n        mode=\"RemoteOnly\" xdt:Transform=\"Replace\">\r\n        <error statusCode=\"500\" redirect=\"InternalError.htm\"/>\r\n      </customErrors>\r\n    -->\r\n  </system.web>\r\n</configuration>"
  },
  {
    "path": "26 - Queries Domain Reporting/PPPDDD.Reporting/Web.config",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<!--\r\n  For more information on how to configure your ASP.NET application, please visit\r\n  http://go.microsoft.com/fwlink/?LinkId=301880\r\n  -->\r\n<configuration>\r\n  <appSettings>\r\n    <add key=\"webpages:Version\" value=\"3.0.0.0\" />\r\n    <add key=\"webpages:Enabled\" value=\"false\" />\r\n     <add key=\"ClientValidationEnabled\" value=\"true\" />\r\n    <add key=\"UnobtrusiveJavaScriptEnabled\" value=\"true\" />\r\n  </appSettings>\r\n  <system.web>\r\n    <compilation debug=\"true\" targetFramework=\"4.5\" />\r\n    <httpRuntime targetFramework=\"4.5\" />\r\n  </system.web>\r\n</configuration>\r\n"
  },
  {
    "path": "26 - Queries Domain Reporting/PPPDDD.Reporting/packages.config",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<packages>\r\n  <package id=\"Dapper\" version=\"1.22\" targetFramework=\"net45\" />\r\n  <package id=\"Microsoft.AspNet.Mvc\" version=\"5.0.0\" targetFramework=\"net45\" />\r\n  <package id=\"Microsoft.AspNet.Razor\" version=\"3.0.0\" targetFramework=\"net45\" />\r\n  <package id=\"Microsoft.AspNet.WebPages\" version=\"3.0.0\" targetFramework=\"net45\" />\r\n</packages>"
  },
  {
    "path": "26 - Queries Domain Reporting/PPPDDD.Reporting.sln",
    "content": "﻿\r\nMicrosoft Visual Studio Solution File, Format Version 12.00\r\n# Visual Studio Express 2013 for Web\r\nVisualStudioVersion = 12.0.21005.1\r\nMinimumVisualStudioVersion = 10.0.40219.1\r\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"PPPDDD.Reporting\", \"PPPDDD.Reporting\\PPPDDD.Reporting.csproj\", \"{182A344B-3104-4158-A25E-1A5742944BF8}\"\r\nEndProject\r\nProject(\"{00D1A9C2-B5F0-4AF3-8072-F6C62B433612}\") = \"SportsStoreDatabase\", \"SportsStoreDatabase\\SportsStoreDatabase.sqlproj\", \"{5188E6CC-59AF-4993-B666-A1FA448D36C6}\"\r\nEndProject\r\nGlobal\r\n\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\r\n\t\tDebug|Any CPU = Debug|Any CPU\r\n\t\tRelease|Any CPU = Release|Any CPU\r\n\tEndGlobalSection\r\n\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\r\n\t\t{182A344B-3104-4158-A25E-1A5742944BF8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r\n\t\t{182A344B-3104-4158-A25E-1A5742944BF8}.Debug|Any CPU.Build.0 = Debug|Any CPU\r\n\t\t{182A344B-3104-4158-A25E-1A5742944BF8}.Release|Any CPU.ActiveCfg = Release|Any CPU\r\n\t\t{182A344B-3104-4158-A25E-1A5742944BF8}.Release|Any CPU.Build.0 = Release|Any CPU\r\n\t\t{5188E6CC-59AF-4993-B666-A1FA448D36C6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r\n\t\t{5188E6CC-59AF-4993-B666-A1FA448D36C6}.Debug|Any CPU.Build.0 = Debug|Any CPU\r\n\t\t{5188E6CC-59AF-4993-B666-A1FA448D36C6}.Debug|Any CPU.Deploy.0 = Debug|Any CPU\r\n\t\t{5188E6CC-59AF-4993-B666-A1FA448D36C6}.Release|Any CPU.ActiveCfg = Release|Any CPU\r\n\t\t{5188E6CC-59AF-4993-B666-A1FA448D36C6}.Release|Any CPU.Build.0 = Release|Any CPU\r\n\t\t{5188E6CC-59AF-4993-B666-A1FA448D36C6}.Release|Any CPU.Deploy.0 = Release|Any CPU\r\n\tEndGlobalSection\r\n\tGlobalSection(SolutionProperties) = preSolution\r\n\t\tHideSolutionNode = FALSE\r\n\tEndGlobalSection\r\nEndGlobal\r\n"
  },
  {
    "path": "26 - Queries Domain Reporting/README.md",
    "content": "PPPDDD\n======\n\nSample code for the book Principles, Practices and Patterns of Domain-Driven Design. From the book http://www.amazon.com/Professional-Domain-Driven-Design-Patterns/dp/1118714709/\n"
  },
  {
    "path": "26 - Queries Domain Reporting/SportsStoreDatabase/LoyaltyAccounts.sql",
    "content": "﻿CREATE TABLE [dbo].[LoyaltyAccounts]\r\n(\r\n\t[Id] INT NOT NULL PRIMARY KEY,\r\n\t[UserId] INT NOT NULL,\r\n\t[IsActive] BIT NOT NULL,\r\n\t[Create] DATE NOT NULL,\r\n\tFOREIGN KEY (UserId) REFERENCES Users(Id)\r\n)\r\n"
  },
  {
    "path": "26 - Queries Domain Reporting/SportsStoreDatabase/LoyaltySettings.sql",
    "content": "﻿CREATE TABLE [dbo].[LoyaltySettings]\r\n(\r\n\t[Id] INT NOT NULL PRIMARY KEY,\r\n\t[Month] DATE NOT NULL,\r\n\t[PointsPerDollar] INT NOT NULL\r\n)\r\n"
  },
  {
    "path": "26 - Queries Domain Reporting/SportsStoreDatabase/Orders.sql",
    "content": "﻿CREATE TABLE [dbo].[Orders]\r\n(\r\n\t[Id] INT NOT NULL PRIMARY KEY,\r\n\t[Date] Date NOT NULL,\r\n\t[UserId] INT NOT NULL,\r\n\t[NetProfit] DECIMAL NOT NULL,\r\n\tFOREIGN KEY (UserId) REFERENCES Users(Id)\r\n)\r\n"
  },
  {
    "path": "26 - Queries Domain Reporting/SportsStoreDatabase/TestData.sql",
    "content": "﻿/*\r\nPost-Deployment Script Template\t\t\t\t\t\t\t\r\n--------------------------------------------------------------------------------------\r\n This file contains SQL statements that will be appended to the build script.\t\t\r\n Use SQLCMD syntax to include a file in the post-deployment script.\t\t\t\r\n Example:      :r .\\myfile.sql\t\t\t\t\t\t\t\t\r\n Use SQLCMD syntax to reference a variable in the post-deployment script.\t\t\r\n Example:      :setvar TableName MyTable\t\t\t\t\t\t\t\r\n               SELECT * FROM [$(TableName)]\t\t\t\t\t\r\n--------------------------------------------------------------------------------------\r\n*/\r\ninsert into Users\r\nvalues (1), (2)\r\n\r\ninsert into LoyaltyAccounts (Id, UserId, IsActive)\r\nvalues (1, 1, 1), (2, 2, 0)\r\n\r\ninsert into Orders (Id, UserId, [Date], NetProfit)\r\nvalues (1, 1, '2014-02-05', 25.25), (2, 2, '2014-02-10', 44.55)\r\n"
  },
  {
    "path": "26 - Queries Domain Reporting/SportsStoreDatabase/Users.sql",
    "content": "﻿CREATE TABLE [dbo].[Users]\r\n(\r\n\t[Id] INT NOT NULL PRIMARY KEY\r\n)\r\n"
  },
  {
    "path": "26 - Queries Domain Reporting/SportsStoreDatabase/sportsstoredatabase.sqlproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Project DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\" ToolsVersion=\"4.0\">\r\n  <Import Project=\"$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props\" Condition=\"Exists('$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props')\" />\r\n  <PropertyGroup>\r\n    <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>\r\n    <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>\r\n    <Name>SportsStoreDatabase</Name>\r\n    <SchemaVersion>2.0</SchemaVersion>\r\n    <ProjectVersion>4.1</ProjectVersion>\r\n    <ProjectGuid>{5188e6cc-59af-4993-b666-a1fa448d36c6}</ProjectGuid>\r\n    <DSP>Microsoft.Data.Tools.Schema.Sql.Sql110DatabaseSchemaProvider</DSP>\r\n    <OutputType>Database</OutputType>\r\n    <RootPath>\r\n    </RootPath>\r\n    <RootNamespace>SportsStoreDatabase</RootNamespace>\r\n    <AssemblyName>SportsStoreDatabase</AssemblyName>\r\n    <ModelCollation>1033, CI</ModelCollation>\r\n    <DefaultFileStructure>BySchemaAndSchemaType</DefaultFileStructure>\r\n    <DeployToDatabase>True</DeployToDatabase>\r\n    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r\n    <TargetLanguage>CS</TargetLanguage>\r\n    <AppDesignerFolder>Properties</AppDesignerFolder>\r\n    <SqlServerVerification>False</SqlServerVerification>\r\n    <IncludeCompositeObjects>True</IncludeCompositeObjects>\r\n    <TargetDatabaseSet>True</TargetDatabaseSet>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' \">\r\n    <OutputPath>bin\\Release\\</OutputPath>\r\n    <BuildScriptName>$(MSBuildProjectName).sql</BuildScriptName>\r\n    <TreatWarningsAsErrors>False</TreatWarningsAsErrors>\r\n    <DebugType>pdbonly</DebugType>\r\n    <Optimize>true</Optimize>\r\n    <DefineDebug>false</DefineDebug>\r\n    <DefineTrace>true</DefineTrace>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <WarningLevel>4</WarningLevel>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' \">\r\n    <OutputPath>bin\\Debug\\</OutputPath>\r\n    <BuildScriptName>$(MSBuildProjectName).sql</BuildScriptName>\r\n    <TreatWarningsAsErrors>false</TreatWarningsAsErrors>\r\n    <DebugSymbols>true</DebugSymbols>\r\n    <DebugType>full</DebugType>\r\n    <Optimize>false</Optimize>\r\n    <DefineDebug>true</DefineDebug>\r\n    <DefineTrace>true</DefineTrace>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <WarningLevel>4</WarningLevel>\r\n  </PropertyGroup>\r\n  <!-- VS10 without SP1 will not have VisualStudioVersion set, so do that here -->\r\n  <PropertyGroup>\r\n    <VisualStudioVersion Condition=\"'$(VisualStudioVersion)' == ''\">10.0</VisualStudioVersion>\r\n    <!-- Default to the v10.0 targets path if the targets file for the current VS version is not found -->\r\n    <SSDTExists Condition=\"Exists('$(MSBuildExtensionsPath)\\Microsoft\\VisualStudio\\v$(VisualStudioVersion)\\SSDT\\Microsoft.Data.Tools.Schema.SqlTasks.targets')\">True</SSDTExists>\r\n    <VisualStudioVersion Condition=\"'$(SSDTExists)' == ''\">10.0</VisualStudioVersion>\r\n  </PropertyGroup>\r\n  <Import Project=\"$(MSBuildExtensionsPath)\\Microsoft\\VisualStudio\\v$(VisualStudioVersion)\\SSDT\\Microsoft.Data.Tools.Schema.SqlTasks.targets\" />\r\n  <ItemGroup>\r\n    <Folder Include=\"Properties\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <Build Include=\"Orders.sql\" />\r\n    <Build Include=\"Users.sql\" />\r\n    <Build Include=\"LoyaltySettings.sql\" />\r\n    <Build Include=\"LoyaltyAccounts.sql\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <PostDeploy Include=\"TestData.sql\" />\r\n  </ItemGroup>\r\n</Project>"
  },
  {
    "path": "README.md",
    "content": "PPPDDD\n======\n\nSample code for the book Principles, Practices and Patterns of Domain-Driven Design. From the book http://www.amazon.com/Professional-Domain-Driven-Design-Patterns/dp/1118714709/\n"
  },
  {
    "path": "eBidder Case Study/README.md",
    "content": "PPPDDD\n======\n\nSample code for the book Principles, Practices and Patterns of Domain-Driven Design. From the book http://www.amazon.com/Professional-Domain-Driven-Design-Patterns/dp/1118714709/\n"
  }
]